summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-04-27 13:34:17 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-05-04 11:11:34 -0400
commitb74454be62e19ee806a508c55030ba67b4279c92 (patch)
treea946a62acbffb43bc3af873e111fd43c7073db92
parent771df2ac489131411a987f3e7e686cfc34c39bc1 (diff)
downloadbcfg2-b74454be62e19ee806a508c55030ba67b4279c92.tar.gz
bcfg2-b74454be62e19ee806a508c55030ba67b4279c92.tar.bz2
bcfg2-b74454be62e19ee806a508c55030ba67b4279c92.zip
make %ghost work on RHEL 5, Mandriva
-rw-r--r--misc/bcfg2.spec17
1 files changed, 7 insertions, 10 deletions
diff --git a/misc/bcfg2.spec b/misc/bcfg2.spec
index 8fbc0c7e6..24328f8de 100644
--- a/misc/bcfg2.spec
+++ b/misc/bcfg2.spec
@@ -264,6 +264,10 @@ mv build/dtd %{buildroot}%{_defaultdocdir}/bcfg2-doc-%{version}/
%{__mkdir_p} %{buildroot}%{_localstatedir}/cache/bcfg2
+# mandriva and RHEL 5 cannot handle %ghost without the file existing,
+# so let's touch a bunch of empty config files
+touch %{buildroot}%{_sysconfdir}/bcfg2.conf %{_sysconfdir}/bcfg2-web.conf
+
%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} || exit 2
@@ -286,10 +290,7 @@ mv build/dtd %{buildroot}%{_defaultdocdir}/bcfg2-doc-%{version}/
%{_sbindir}/rcbcfg2
%config(noreplace) /var/adm/fillup-templates/sysconfig.bcfg2
%endif
-%if 0%{?mandriva_version} == 0
-# mandriva (on OBS, at least) can't handle %ghost
-%ghost %attr(0600,root,root) %{_sysconfdir}/bcfg2.conf
-%endif
+%ghost %config(noreplace,missingok) %attr(0600,root,root) %{_sysconfdir}/bcfg2.conf
%post -n bcfg2-server
# enable daemon on first install only (not on update).
@@ -364,9 +365,7 @@ fi
%{_mandir}/man5/bcfg2-lint.conf.5*
%{_mandir}/man8/*.8*
%dir %{_prefix}/lib/bcfg2
-%if 0%{?mandriva_version} == 0
-%ghost %attr(0600,root,root) %{_sysconfdir}/bcfg2.conf
-%endif
+%ghost %config(noreplace,missingok) %attr(0600,root,root) %{_sysconfdir}/bcfg2.conf
%files -n bcfg2-doc
%defattr(-,root,root,-)
@@ -379,9 +378,7 @@ fi
%dir %{apache_conf}
%dir %{apache_conf}/conf.d
%config(noreplace) %{apache_conf}/conf.d/wsgi_bcfg2.conf
-%if 0%{?mandriva_version} == 0
-%ghost %attr(0600,root,root) %{_sysconfdir}/bcfg2-web.conf
-%endif
+%ghost %config(noreplace,missingok) %attr(0640,root,apache) %{_sysconfdir}/bcfg2-web.conf
%changelog
* Sat Feb 18 2012 Christopher 'm4z' Holm <686f6c6d@googlemail.com> 1.2.1