Use %%ghost for /var/run/tog-pegasus

This commit is contained in:
Vitezslav Crhonek 2011-03-22 12:39:44 +01:00
parent b1d60b9c4c
commit 0d9db52403
2 changed files with 18 additions and 2 deletions

View File

@ -8,7 +8,7 @@
Name: tog-pegasus
Version: %{major_ver}.0
Release: 3%{?dist}
Release: 4%{?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
@ -238,6 +240,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
@ -270,7 +276,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
@ -338,6 +347,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
@ -358,6 +368,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
:;
@ -403,6 +414,10 @@ fi
%changelog
* Tue Mar 22 2011 Vitezslav Crhonek <vcrhonek@redhat.com> - 2:2.10.1-4
- Use %%ghost for /var/run/tog-pegasus
Resolves: #656705
* Tue Mar 01 2011 Vitezslav Crhonek <vcrhonek@redhat.com> - 2:2.10.1-3
- Don't strip binaries

1
tog-pegasus.tmpfiles Normal file
View File

@ -0,0 +1 @@
d /var/run/tog-pegasus 1750 root pegasus -