setup tempfiles.d to create runtime directory when using tmpfs
This commit is contained in:
parent
a44fb64495
commit
d70540ff1d
2
ldap.tmpfiles
Normal file
2
ldap.tmpfiles
Normal file
@ -0,0 +1,2 @@
|
||||
# openldap runtime directory for slapd.arg and slapd.pid
|
||||
d /var/run/openldap 0755 ldap ldap -
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user