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])
12 rm -rf "${RPMTEST}/etc/my.conf"
14 for v in "1.0" "2.0"; do
15 run rpmbuild --quiet -bb \
17 --define "filedata foo" \
18 ${RPMDATA}/SPECS/configtest.spec
21 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-1.0-1.noarch.rpm
22 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-2.0-1.noarch.rpm
28 # ------------------------------
29 # Upgrade package with locally modified config file, unchanged in pkg
30 AT_SETUP([rpm -U to package with locally modified config file])
31 AT_KEYWORDS([install])
35 rm -rf "${RPMTEST}/etc/my.conf"
37 for v in "1.0" "2.0"; do
38 run rpmbuild --quiet -bb \
40 --define "filedata foo" \
41 ${RPMDATA}/SPECS/configtest.spec
44 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-1.0-1.noarch.rpm
45 echo "otherstuff" > "${RPMTEST}"/etc/my.conf
46 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-2.0-1.noarch.rpm
52 # ------------------------------
53 # Upgrade package with unmodified config file, changed in pkg
54 AT_SETUP([rpm -U to package with unchanged config file])
55 AT_KEYWORDS([install])
59 rm -rf "${RPMTEST}/etc/my.conf"
61 for v in "1.0" "2.0"; do
62 run rpmbuild --quiet -bb \
64 --define "filedata foo-$v" \
65 ${RPMDATA}/SPECS/configtest.spec
68 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-1.0-1.noarch.rpm
69 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-2.0-1.noarch.rpm
75 # ------------------------------
76 # Upgrade package with locally modified config file, changed in pkg
77 AT_SETUP([rpm -U to package with modified config file])
78 AT_KEYWORDS([install])
82 rm -rf "${RPMTEST}/etc/my.conf"
84 for v in "1.0" "2.0"; do
85 run rpmbuild --quiet -bb \
87 --define "filedata foo-$v" \
88 ${RPMDATA}/SPECS/configtest.spec
91 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-1.0-1.noarch.rpm
92 echo "otherstuff" > "${RPMTEST}"/etc/my.conf
93 runroot rpm -U "${TOPDIR}"/RPMS/noarch/configtest-2.0-1.noarch.rpm
97 [warning: /etc/my.conf saved as /etc/my.conf.rpmsave]