1 # rpmvercmp.at: rpm config file behavior tests
3 # ------------------------------
4 # (Build and) upgrade package with config file, no backup here
5 AT_SETUP([rpm -U to package with unchanged config file])
9 rm -rf "${RPMTEST}/etc/my.conf"
11 for v in "1.0" "2.0"; do
12 run rpmbuild --quiet -bb \
14 --define "filedata foo" \
15 ${RPMDATA}/SPECS/configtest.spec
18 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-1.0-1.noarch.rpm
19 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-2.0-1.noarch.rpm
25 # ------------------------------
26 # Upgrade package with locally modified config file, unchanged in pkg
27 AT_SETUP([rpm -U to package with locally modified config file])
31 rm -rf "${RPMTEST}/etc/my.conf"
33 for v in "1.0" "2.0"; do
34 run rpmbuild --quiet -bb \
36 --define "filedata foo" \
37 ${RPMDATA}/SPECS/configtest.spec
40 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-1.0-1.noarch.rpm
41 echo "otherstuff" > "${RPMTEST}"/etc/my.conf
42 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-2.0-1.noarch.rpm
48 # ------------------------------
49 # Upgrade package with unmodified config file, changed in pkg
50 AT_SETUP([rpm -U to package with unchanged config file])
54 rm -rf "${RPMTEST}/etc/my.conf"
56 for v in "1.0" "2.0"; do
57 run rpmbuild --quiet -bb \
59 --define "filedata foo-$v" \
60 ${RPMDATA}/SPECS/configtest.spec
63 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-1.0-1.noarch.rpm
64 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-2.0-1.noarch.rpm
70 # ------------------------------
71 # Upgrade package with locally modified config file, changed in pkg
72 AT_SETUP([rpm -U to package with modified config file])
76 rm -rf "${RPMTEST}/etc/my.conf"
78 for v in "1.0" "2.0"; do
79 run rpmbuild --quiet -bb \
81 --define "filedata foo-$v" \
82 ${RPMDATA}/SPECS/configtest.spec
85 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-1.0-1.noarch.rpm
86 echo "otherstuff" > "${RPMTEST}"/etc/my.conf
87 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-2.0-1.noarch.rpm
91 [warning: /etc/my.conf saved as /etc/my.conf.rpmsave]