From: Jonathan Billings Date: Thu, 8 Mar 2012 14:23:40 +0000 (-0500) Subject: redhat: Don't replace modified configuration files during rpm update X-Git-Tag: upstream/1.6.2_pre2^2~207 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=4ea64ceb0b1e45820646a7d310f1172d230bd4bf;p=packages%2Fo%2Fopenafs.git redhat: Don't replace modified configuration files during rpm update The previous setting for three %config files mentioned in the spec file: %config /etc/sysconfig/openafs %config %{_prefix}/vice/etc/ThisCell %config %{_prefix}/vice/etc/cacheinfo When using an unadorned %config, it's possible that these files will be replaced by the packaged version during a package update. Changing %config to %config(noreplace) means that the packaged file will be installed with the extension .rpmnew if there is already a modified (from the existing package's version) file with the same name on the installed machine. The concern here is that updating an existing system could potentially change the configuration if the person installing doesn't pay close attention. The Rule of Least Surprise indicates that we should try to preserve existing configuration changes whenever possible. Change-Id: Ie132c12a3c5defe9bf6fec9ec0f8bd08f3d98646 Reviewed-on: http://gerrit.openafs.org/6887 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/6889 Tested-by: BuildBot --- diff --git a/src/packaging/RedHat/openafs.spec.in b/src/packaging/RedHat/openafs.spec.in index 876c4ceb7..b38d3a62c 100644 --- a/src/packaging/RedHat/openafs.spec.in +++ b/src/packaging/RedHat/openafs.spec.in @@ -1499,7 +1499,7 @@ dkms remove -m %{name} -v %{dkms_version} --rpm_safe_upgrade --all ||: %files -f openafs-file-list %defattr(-,root,root) -%config /etc/sysconfig/openafs +%config(noreplace) /etc/sysconfig/openafs %doc %{_docdir}/openafs-%{afsvers}/LICENSE %files docs @@ -1517,8 +1517,8 @@ dkms remove -m %{name} -v %{dkms_version} --rpm_safe_upgrade --all ||: %dir %{_prefix}/vice/etc %dir %{_prefix}/vice/etc/C %{_prefix}/vice/etc/CellServDB.dist -%config %{_prefix}/vice/etc/ThisCell -%config %{_prefix}/vice/etc/cacheinfo +%config(noreplace) %{_prefix}/vice/etc/ThisCell +%config(noreplace) %{_prefix}/vice/etc/cacheinfo %{_bindir}/afsio %{_bindir}/cmdebug %{_bindir}/up