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])
11 rm -rf "${RPMTEST}/etc/my.conf"
13 for v in "1.0" "2.0"; do
14 run rpmbuild --quiet -bb \
16 --define "filedata foo" \
17 ${RPMDATA}/SPECS/configtest.spec
20 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-1.0-1.noarch.rpm
21 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-2.0-1.noarch.rpm
27 # ------------------------------
28 # Upgrade package with locally modified config file, unchanged in pkg
29 AT_SETUP([rpm -U to package with locally modified config file])
33 rm -rf "${RPMTEST}/etc/my.conf"
35 for v in "1.0" "2.0"; do
36 run rpmbuild --quiet -bb \
38 --define "filedata foo" \
39 ${RPMDATA}/SPECS/configtest.spec
42 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-1.0-1.noarch.rpm
43 echo "otherstuff" > "${RPMTEST}"/etc/my.conf
44 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-2.0-1.noarch.rpm
50 # ------------------------------
51 # Upgrade package with unmodified config file, changed in pkg
52 AT_SETUP([rpm -U to package with unchanged config file])
56 rm -rf "${RPMTEST}/etc/my.conf"
58 for v in "1.0" "2.0"; do
59 run rpmbuild --quiet -bb \
61 --define "filedata foo-$v" \
62 ${RPMDATA}/SPECS/configtest.spec
65 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-1.0-1.noarch.rpm
66 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-2.0-1.noarch.rpm
72 # ------------------------------
73 # Upgrade package with locally modified config file, changed in pkg
74 AT_SETUP([rpm -U to package with modified config file])
78 rm -rf "${RPMTEST}/etc/my.conf"
80 for v in "1.0" "2.0"; do
81 run rpmbuild --quiet -bb \
83 --define "filedata foo-$v" \
84 ${RPMDATA}/SPECS/configtest.spec
87 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-1.0-1.noarch.rpm
88 echo "otherstuff" > "${RPMTEST}"/etc/my.conf
89 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-2.0-1.noarch.rpm
93 [warning: /etc/my.conf saved as /etc/my.conf.rpmsave]