From 81f03942e5b5c3d30331745f8ab4c4845acd9d83 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Fri, 27 Apr 2012 13:34:17 -0400 Subject: make %ghost work on RHEL 5, Mandriva --- misc/bcfg2.spec | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'misc') diff --git a/misc/bcfg2.spec b/misc/bcfg2.spec index 191bfaf65..c3cc2f7be 100644 --- a/misc/bcfg2.spec +++ b/misc/bcfg2.spec @@ -268,6 +268,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 @@ -290,10 +294,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 %files server %defattr(-,root,root,-) @@ -328,9 +329,7 @@ mv build/dtd %{buildroot}%{_defaultdocdir}/bcfg2-doc-%{version}/ %{_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 doc %defattr(-,root,root,-) @@ -343,9 +342,7 @@ mv build/dtd %{buildroot}%{_defaultdocdir}/bcfg2-doc-%{version}/ %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 %post server # enable daemon on first install only (not on update). -- cgit v1.2.3-1-g7c22