1 # rpmvercmp.at: rpm config file behavior tests
3 AT_BANNER([RPM config file behavior])
5 # ------------------------------
6 # (Build and) upgrade package with config file, no backup here
7 AT_SETUP([rpm -U to package with unchanged config file])
13 rm -rf "${RPMTEST}/etc/my.conf"
15 for v in "1.0" "2.0"; do
16 runroot rpmbuild --quiet -bb \
18 --define "filedata foo" \
19 /data/SPECS/configtest.spec
22 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-1.0-1.noarch.rpm
23 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-2.0-1.noarch.rpm
29 # ------------------------------
30 # Upgrade package with locally modified config file, unchanged in pkg
31 AT_SETUP([rpm -U to package with locally modified config file])
32 AT_KEYWORDS([install])
37 rm -rf "${RPMTEST}/etc/my.conf"
39 for v in "1.0" "2.0"; do
40 runroot rpmbuild --quiet -bb \
42 --define "filedata foo" \
43 /data/SPECS/configtest.spec
46 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-1.0-1.noarch.rpm
47 echo "otherstuff" > "${RPMTEST}"/etc/my.conf
48 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-2.0-1.noarch.rpm
54 # ------------------------------
55 # Upgrade package with unmodified config file, changed in pkg
56 AT_SETUP([rpm -U to package with unchanged config file])
57 AT_KEYWORDS([install])
62 rm -rf "${RPMTEST}/etc/my.conf"
64 for v in "1.0" "2.0"; do
65 runroot rpmbuild --quiet -bb \
67 --define "filedata foo-$v" \
68 /data/SPECS/configtest.spec
71 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-1.0-1.noarch.rpm
72 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-2.0-1.noarch.rpm
78 # ------------------------------
79 # Upgrade package with locally modified config file, changed in pkg
80 AT_SETUP([rpm -U to package with modified config file])
81 AT_KEYWORDS([install])
86 rm -rf "${RPMTEST}/etc/my.conf"
88 for v in "1.0" "2.0"; do
89 runroot rpmbuild --quiet -bb \
91 --define "filedata foo-$v" \
92 /data/SPECS/configtest.spec
95 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-1.0-1.noarch.rpm
96 echo "otherstuff" > "${RPMTEST}"/etc/my.conf
97 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-2.0-1.noarch.rpm
101 [warning: /etc/my.conf saved as /etc/my.conf.rpmsave]