From 0b6d9d97302aca678745941fe53653a13e9e5b8c Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Wed, 3 Aug 2016 06:51:57 +1000 Subject: [PATCH] ctdb-packaging: Stop RPM from renaming working config to ctdb.rpmsave The change to ctdbd.conf and removal of /etc/sysconfig/ctdb as a configuration file makes RPM rename the latter with a .rpmsave suffix. This means that a working configuration is moved aside on upgrade and manual intervention is needed. Avoid this by convincing RPM that the existing /etc/sysconfig/ctdb is still a configuration file. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12125 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Martin Schwenke Autobuild-Date(master): Mon Aug 8 11:30:58 CEST 2016 on sn-devel-144 (cherry picked from commit 464b386d55b0c509b86645bdac7f6d3df489e902) --- ctdb/packaging/RPM/ctdb.spec.in | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ctdb/packaging/RPM/ctdb.spec.in b/ctdb/packaging/RPM/ctdb.spec.in index b439e27..d096e71 100644 --- a/ctdb/packaging/RPM/ctdb.spec.in +++ b/ctdb/packaging/RPM/ctdb.spec.in @@ -115,6 +115,15 @@ DESTDIR=$RPM_BUILD_ROOT ./buildtools/bin/waf install install -m644 config/ctdbd.conf $RPM_BUILD_ROOT%{_sysconfdir}/ctdb +# Add a pointer to modern location for configuration file. Allow with +# "noreplace" in the files section, this stops RPM moving aside a +# working configuration. +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig +cat >$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ctdb <