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

This commit is contained in:
Vitezslav Crhonek 2011-03-22 13:00:11 +01:00
parent 19fa0a82d3
commit ad763f246d
2 changed files with 18 additions and 2 deletions

View File

@ -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@redhat.com> - 2:2.10.1-3
- Use %%ghost for /var/run/tog-pegasus
Resolves: #656705
* Thu Feb 17 2011 Vitezslav Crhonek <vcrhonek@redhat.com> - 2:2.10.1-2
- Remove dubuginfo files from -libs subpackage

1
tog-pegasus.tmpfiles Normal file
View File

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