[openldap] setup tempfiles.d to create runtime directory when using tmpfs
jvcelak
jvcelak at fedoraproject.org
Thu Jan 20 16:40:52 UTC 2011
commit d70540ff1d44a42aec537c52aa7bea775fc408b0
Author: Jan Vcelak <jvcelak at redhat.com>
Date: Mon Nov 29 13:36:20 2010 +0100
setup tempfiles.d to create runtime directory when using tmpfs
ldap.tmpfiles | 2 ++
openldap.spec | 6 ++++++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/ldap.tmpfiles b/ldap.tmpfiles
new file mode 100644
index 0000000..56aa32e
--- /dev/null
+++ b/ldap.tmpfiles
@@ -0,0 +1,2 @@
+# openldap runtime directory for slapd.arg and slapd.pid
+d /var/run/openldap 0755 ldap ldap -
diff --git a/openldap.spec b/openldap.spec
index 5e5eda0..93f966a 100644
--- a/openldap.spec
+++ b/openldap.spec
@@ -16,6 +16,7 @@ Source0: ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/openldap-%{version
Source1: ldap.init
Source2: ldap.sysconfig
Source3: README.evolution
+Source4: ldap.tmpfiles
# patches for 2.4
Patch0: openldap-slapd-conf.patch
@@ -328,6 +329,10 @@ mkdir -p %{buildroot}%{_sysconfdir}/pki/tls/certs
mkdir -p %{buildroot}/var/lib/ldap
mkdir -p %{buildroot}/var/run/openldap
+# setup autocreation of runtime directories on tmpfs
+mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d
+install -m 644 %SOURCE4 %{buildroot}%{_sysconfdir}/tmpfiles.d/openldap.conf
+
# remove build root from config files and manual pages
perl -pi -e "s|%{buildroot}||g" %{buildroot}/%{_sysconfdir}/openldap/*.conf
perl -pi -e "s|%{buildroot}||g" %{buildroot}%{_mandir}/*/*.*
@@ -631,6 +636,7 @@ exit 0
%attr(0644,root,root) %{_mandir}/man5/slapo-*.5*
%attr(0700,ldap,ldap) %dir /var/lib/ldap
%attr(0755,ldap,ldap) %dir /var/run/openldap
+%{_sysconfdir}/tmpfiles.d
%attr(0755,root,root) %dir %{_libdir}/openldap
%attr(0755,root,root) %{_libdir}/openldap/[^b]*
%attr(0755,root,root) %dir %{_datadir}/openldap-servers
More information about the scm-commits
mailing list