[cyphesis] %ghost and tmpfiles.d, BZ 656567
Martin Preisler
mpreisle at fedoraproject.org
Thu Feb 16 13:36:09 UTC 2012
commit 64cae6e1eaeef2831028067e22fe0bcf07f24680
Author: Martin Preisler <mpreisle at redhat.com>
Date: Thu Feb 16 14:08:08 2012 +0100
%ghost and tmpfiles.d, BZ 656567
cyphesis-tmpfiles.conf | 1 +
cyphesis.spec | 13 +++++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/cyphesis-tmpfiles.conf b/cyphesis-tmpfiles.conf
new file mode 100644
index 0000000..dcc58f0
--- /dev/null
+++ b/cyphesis-tmpfiles.conf
@@ -0,0 +1 @@
+d /var/run/cyphesis 755 cyphesis cyphesis -
diff --git a/cyphesis.spec b/cyphesis.spec
index 77c43d7..0868da5 100644
--- a/cyphesis.spec
+++ b/cyphesis.spec
@@ -4,7 +4,7 @@
Name: cyphesis
Version: 0.5.26
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: WorldForge game server
Group: System Environment/Libraries
License: GPLv2+
@@ -14,6 +14,7 @@ Source4: logwatch.logconf.cyphesis
Source5: logwatch.script.cyphesis
Source6: logwatch.serviceconf.cyphesis
Source7: logwatch.shared.applycyphesisdate
+Source8: cyphesis-tmpfiles.conf
Patch0: cyphesis-0.5.19-init.patch
Patch1: cyphesis-0.5.11-logdir.patch
Patch5: cyphesis-0.5.21-dso-linking.patch
@@ -95,6 +96,9 @@ install -pD -m 0755 %{SOURCE5} %{buildroot}%{logwatch_scripts}/services/%{name}
install -pD -m 0644 %{SOURCE6} %{buildroot}%{logwatch_conf}/services/%{name}.conf
install -pD -m 0755 %{SOURCE7} %{buildroot}%{logwatch_scripts}/shared/applycyphesisdate
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d
+install -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/cyphesis.conf
+
mkdir -p %{buildroot}%{_var}/log/%{name}
mkdir -p %{buildroot}%{_var}/run/%{name}
@@ -128,6 +132,7 @@ if ! grep -q LOAD_RULES %{_sysconfdir}/%{name} ; then
else
echo "LOAD_RULES=1" >> %{_sysconfdir}/sysconfig/%{name}
fi
+/bin/systemd-tmpfiles --create %_sysconfdir/tmpfiles.d/cyphesis.conf
%preun
if [ "$1" = "0" ]; then
@@ -157,7 +162,8 @@ rm -rf %{buildroot}
# Package up the log and sock directory with special permissions so that the
# service can write to it.
%dir %attr(0755,cyphesis,cyphesis) %{_var}/log/%{name}
-%dir %attr(0755,cyphesis,cyphesis) %{_var}/run/%{name}
+%ghost %dir %attr(0755,cyphesis,cyphesis) %{_var}/run/%{name}
+%attr(644,root,root) %{_sysconfdir}/tmpfiles.d/cyphesis.conf
%files logwatch
%defattr(-,root,root,-)
@@ -168,6 +174,9 @@ rm -rf %{buildroot}
%changelog
+* Thu Feb 16 2012 Martin Preisler <mpreisle at redhat.com> 0.5.26-6
+- %ghost for /var/run/cyphesis, added tmpfiles.d
+
* Mon Jan 22 2012 Bruno Wolff III <bruno at wolff.to> 0.5.26-5
- Rebuild for wfmath soname bump
More information about the scm-commits
mailing list