[tog-pegasus/f15/master] Use %%ghost for /var/run/tog-pegasus
vcrhonek
vcrhonek at fedoraproject.org
Tue Mar 22 12:00:51 UTC 2011
commit ad763f246d79a29d8db8927279e054accceb06db
Author: Vitezslav Crhonek <vcrhonek at redhat.com>
Date: Tue Mar 22 13:00:11 2011 +0100
Use %%ghost for /var/run/tog-pegasus
tog-pegasus.spec | 19 +++++++++++++++++--
tog-pegasus.tmpfiles | 1 +
2 files changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/tog-pegasus.spec b/tog-pegasus.spec
index cbbec34..5744132 100644
--- a/tog-pegasus.spec
+++ b/tog-pegasus.spec
@@ -8,7 +8,7 @@
Name: tog-pegasus
Version: %{major_ver}.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Epoch: 2
Summary: OpenPegasus WBEM Services for Linux
@@ -22,6 +22,8 @@ Source1: README.RedHat.Security
Source2: genOpenPegasusSSLCerts
# 3: Description of SSL settings
Source3: README.RedHat.SSL
+# 4: /etc/tmpfiles.d configuration file
+Source4: tog-pegasus.tmpfiles
# 0: Still not fixed by http://cvs.rdg.opengroup.org/bugzilla/show_bug.cgi?id=5008
# Changes to the init script to make it LSB compliant
@@ -235,6 +237,10 @@ make -f $PEGASUS_ROOT/Makefile.Release stage \
PEGASUS_STAGING_DIR=$PEGASUS_STAGING_DIR
%endif
+%if %{?fedora}0 > 140 || %{?rhel}0 > 60
+ install -p -D -m 644 %{SOURCE4} $RPM_BUILD_ROOT/%{_sysconfdir}/tmpfiles.d/tog-pegasus.conf
+%endif
+
# move files to right directories
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d/
mv $RPM_BUILD_ROOT/etc/init.d/tog-pegasus $RPM_BUILD_ROOT/etc/rc.d/init.d/tog-pegasus
@@ -267,7 +273,10 @@ rm -rf $RPM_BUILD_ROOT
%dir /var/lib/Pegasus/log
%defattr(0640, root, pegasus, 0750)
%dir /etc/Pegasus
-%dir %attr(1750,root,pegasus) /var/run/tog-pegasus
+%if %{?fedora}0 > 140 || %{?rhel}0 > 60
+ %config(noreplace) %{_sysconfdir}/tmpfiles.d/tog-pegasus.conf
+%endif
+%ghost /var/run/tog-pegasus
%ghost /var/run/tog-pegasus/cimserver.pid
%ghost /var/run/tog-pegasus/cimserver_start.lock
%ghost %attr(1640,root,pegasus) /var/run/tog-pegasus/cimxml.socket
@@ -335,6 +344,7 @@ fi
:;
%post
+install -d -m 1750 -o root -g pegasus /var/run/tog-pegasus
/sbin/ldconfig;
/sbin/chkconfig --add tog-pegasus;
if [ $1 -ge 1 ]; then
@@ -355,6 +365,7 @@ fi
if [ $1 -eq 0 ]; then
/sbin/service tog-pegasus stop >/dev/null 2>&1 || :;
/sbin/chkconfig --del tog-pegasus >/dev/null 2>&1 || :;
+ rm -rf /var/run/tog-pegasus
fi
:;
@@ -400,6 +411,10 @@ fi
%changelog
+* Tue Mar 22 2011 Vitezslav Crhonek <vcrhonek at redhat.com> - 2:2.10.1-3
+- Use %%ghost for /var/run/tog-pegasus
+ Resolves: #656705
+
* Thu Feb 17 2011 Vitezslav Crhonek <vcrhonek at redhat.com> - 2:2.10.1-2
- Remove dubuginfo files from -libs subpackage
diff --git a/tog-pegasus.tmpfiles b/tog-pegasus.tmpfiles
new file mode 100644
index 0000000..2fd3b8e
--- /dev/null
+++ b/tog-pegasus.tmpfiles
@@ -0,0 +1 @@
+d /var/run/tog-pegasus 1750 root pegasus -
More information about the scm-commits
mailing list