Created attachment 330017
spec files for test rpms
Attached are specs for test RPMs. s,/home/mitr/ht,your_test_directory,g, and build all using the default settings (md5), and build all but *1.spec with "--define '_binary_filedigest_algorithm 8'" as well.
Setting up testing environment
==============================
ht=/home/mitr/ht # or your own
mkdir -p $ht/rpmdb
cd $ht
myrpm() { rpm --dbpath $ht/rpmdb "$@"; }
myrpm --initdb
Testing %config handling (rpmfiDecideFate)
==========================================
# %files of ht_config* contain:
# %config(noreplace) config_file
# %config config_replace
for action in (do nothing, change config_*), new in (changed,same) do:
myrpm -ivh ht_config-1-1.noarch.rpm
# $action
myrpm -Uvh ht_config-2$new-1.noarch.rpm
ll $ht/config_*
myrpm -ev ht_config
results when all packages use md5:
(do nothing, changed): files changed
(do nothing, same): file dates changed
(change files, changed): creates config_file.rpmnew, config_replace.rpmsave; on erase creates config_file.rpmsave
(change files, same): changes kept on disk; on erase .rpmsave created for both files
results when *1 uses md5, *2* uses sha2:
(do nothing, changed): files changed
(do nothing, same): file dates changed
(change files, changed): files overwritten, old data lost!
(change files, same): files overwritten, old data lost!
results when *1 uses md5, *2* uses sha2, after applying rpm-4.6.0-rc3-config-hashes.patch:
(do nothing, changed): files changed
(do nothing, same): file dates changed
(change files, changed): creates config_file.rpmnew, config_replace.rpmsave; on erase creates config_file.rpmsave
(change files, same): config_file change kept on disk (creates .rpmnew), config_replace overwritten (creates .rpmsave)
on erase creates config_file.rpmsave
Testing file conflict handling (handleInstInstalledFiles, handleOverlappedFiles):
================================================================================
for kind in (same,different), action in (together,separately):
other=ht_conflict$(kind==same ? 1a : 2)-1-1
if action==together:
myrpm -ivh ht_conflict1-1-1.noarch.rpm $other.noarch.rpm
else:
myrpm -ivh ht_conflict1-1-1.noarch.rpm
myrpm -ivh $other.noarch.rpm
myrpm -ev ht_conflict1 $other
results when all packages use md5:
(same,together): installs OK
(same,separately): installs OK
(different,together): conflict message, nothing installed
(different,separately): conflict message, $other not installed
Results when *1.* uses md5, $other uses sha2:
(same,together): conflict message, nothing installed
(same,separately): conflict message, $other not installed
(different,together): conflict message, nothing installed
(different,separately): conflict message, $other not installed
Created attachment 330017
spec files for test rpms
Attached are specs for test RPMs. s,/home/ mitr/ht, your_test_ directory, g, and build all using the default settings (md5), and build all but *1.spec with "--define '_binary_ filedigest_ algorithm 8'" as well.
Setting up testing environment ======= ======= ======= ==
=======
ht=/home/mitr/ht # or your own
mkdir -p $ht/rpmdb
cd $ht
myrpm() { rpm --dbpath $ht/rpmdb "$@"; }
myrpm --initdb
Testing %config handling (rpmfiDecideFate) ======= ======= ======= ======= ======= 1-1.noarch. rpm 2$new-1. noarch. rpm
=======
# %files of ht_config* contain:
# %config(noreplace) config_file
# %config config_replace
for action in (do nothing, change config_*), new in (changed,same) do:
myrpm -ivh ht_config-
# $action
myrpm -Uvh ht_config-
ll $ht/config_*
myrpm -ev ht_config
results when all packages use md5: replace. rpmsave;
on erase creates config_file.rpmsave
on erase .rpmsave created for both files 0-rc3-config- hashes. patch: replace. rpmsave;
on erase creates config_file.rpmsave
config_ replace overwritten (creates .rpmsave)
(do nothing, changed): files changed
(do nothing, same): file dates changed
(change files, changed): creates config_file.rpmnew, config_
(change files, same): changes kept on disk;
results when *1 uses md5, *2* uses sha2:
(do nothing, changed): files changed
(do nothing, same): file dates changed
(change files, changed): files overwritten, old data lost!
(change files, same): files overwritten, old data lost!
results when *1 uses md5, *2* uses sha2, after applying rpm-4.6.
(do nothing, changed): files changed
(do nothing, same): file dates changed
(change files, changed): creates config_file.rpmnew, config_
(change files, same): config_file change kept on disk (creates .rpmnew),
on erase creates config_file.rpmsave
Testing file conflict handling (handleInstInst alledFiles, handleOverlappe dFiles) : ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= === separately) : ht_conflict$ (kind== same ? 1a : 2)-1-1 1-1.noarch. rpm $other.noarch.rpm 1-1.noarch. rpm together) : installs OK separately) : installs OK together) : conflict message, nothing installed separately) : conflict message, $other not installed together) : conflict message, nothing installed separately) : conflict message, $other not installed together) : conflict message, nothing installed separately) : conflict message, $other not installed
=======
for kind in (same,different), action in (together,
other=
if action==together:
myrpm -ivh ht_conflict1-
else:
myrpm -ivh ht_conflict1-
myrpm -ivh $other.noarch.rpm
myrpm -ev ht_conflict1 $other
results when all packages use md5:
(same,
(same,
(different,
(different,
Results when *1.* uses md5, $other uses sha2:
(same,
(same,
(different,
(different,