diff --git a/openldap2.changes b/openldap2.changes index 13d375d..aa4aa8d 100644 --- a/openldap2.changes +++ b/openldap2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Nov 8 15:25:08 UTC 2018 - varkoly@suse.com + +- Bug 1111388 openldap and /var/lib/ldap/DB_CONFIG* (transactional-update) + ------------------------------------------------------------------- Fri Oct 26 14:58:41 UTC 2018 - Michael Ströder diff --git a/openldap2.conf b/openldap2.conf new file mode 100644 index 0000000..579c6d0 --- /dev/null +++ b/openldap2.conf @@ -0,0 +1,3 @@ +# openldap needs a directory in /var/lib/: +d /var/lib/ldap 0750 ldap ldap - +L /var/lib/ldap/DB_CONFIG - - - - ../../../usr/lib/openldap/ diff --git a/openldap2.spec b/openldap2.spec index f104c04..fb5fab3 100644 --- a/openldap2.spec +++ b/openldap2.spec @@ -56,6 +56,7 @@ Source14: slapd.service Source15: SuSEfirewall2.openldap Source16: sysconfig.openldap Source17: openldap_update_modules_path.sh +Source18: openldap2.conf Patch1: 0001-ITS-8866-slapo-unique-to-return-filter-used-in-diagn.patch Patch3: 0003-LDAPI-socket-location.dif Patch5: 0005-pie-compile.dif @@ -373,6 +374,9 @@ chmod a+x ${RPM_BUILD_ROOT}/%{_libdir}/liblber.so* chmod a+x ${RPM_BUILD_ROOT}/%{_libdir}/libldap_r.so* install -m 755 %{SOURCE6} ${RPM_BUILD_ROOT}/usr/sbin/schema2ldif install -m 755 %{SOURCE17} ${RPM_BUILD_ROOT}/usr/sbin +mkdir -p ${RPM_BUILD_ROOT}/usr/lib/tmpfiles.d/ +install -m 644 %{SOURCE18} ${RPM_BUILD_ROOT}/usr/lib/tmpfiles.d/ +install -m 644 %{SOURCE3} ${RPM_BUILD_ROOT}/%{_libexecdir}/openldap/ # Install ppolicy check module make -C contrib/slapd-modules/ppolicy-check-password STRIP="" "DESTDIR=${RPM_BUILD_ROOT}" "sysconfdir=%{_sysconfdir}/openldap" "libdir=%{_libdir}" "libexecdir=%{_libexecdir}" install @@ -394,18 +398,17 @@ install -m 644 *.schema ${RPM_BUILD_ROOT}%{_sysconfdir}/openldap/schema install -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/openldap install -m 644 %{SOURCE2} ${RPM_BUILD_ROOT}%{_sysconfdir}/openldap install -m 644 %{SOURCE12} ${RPM_BUILD_ROOT}%{_sysconfdir}/openldap -# Install default database optimisations -install -m 644 %{SOURCE3} ${RPM_BUILD_ROOT}/var/lib/ldap/DB_CONFIG -install -m 644 ${RPM_BUILD_ROOT}/etc/openldap/DB_CONFIG.example ${RPM_BUILD_ROOT}/var/lib/ldap/DB_CONFIG.example install -d ${RPM_BUILD_ROOT}/etc/sysconfig/SuSEfirewall2.d/services/ install -m 644 %{SOURCE15} ${RPM_BUILD_ROOT}/etc/sysconfig/SuSEfirewall2.d/services/openldap find doc/guide '(' ! -name *.html -a ! -name *.gif -a ! -name *.png -a ! -type d ')' -delete rm -rf doc/guide/release %define DOCDIR %{_defaultdocdir}/%{name} +# Install default database optimisation install -d ${RPM_BUILD_ROOT}/%{DOCDIR}/adminguide \ ${RPM_BUILD_ROOT}/%{DOCDIR}/images \ ${RPM_BUILD_ROOT}/%{DOCDIR}/drafts +install -m 644 ${RPM_BUILD_ROOT}/etc/openldap/DB_CONFIG.example ${RPM_BUILD_ROOT}/%{DOCDIR}/ install -m 644 doc/guide/admin/* ${RPM_BUILD_ROOT}/%{DOCDIR}/adminguide install -m 644 doc/guide/images/*.gif ${RPM_BUILD_ROOT}/%{DOCDIR}/images install -m 644 doc/drafts/* ${RPM_BUILD_ROOT}/%{DOCDIR}/drafts @@ -458,6 +461,7 @@ fi %service_add_post slapd.service %post -n libldap-2_4-2 -p /sbin/ldconfig +%tmpfiles_create openldap.conf %postun -n libldap-2_4-2 -p /sbin/ldconfig @@ -477,8 +481,7 @@ fi %config(noreplace) %attr(640, root, ldap) %{_sysconfdir}/openldap/slapd.conf.olctemplate %config %attr(640, root, ldap) %{_sysconfdir}/openldap/slapd.conf.default %config %attr(640, root, ldap) %{_sysconfdir}/openldap/slapd.conf.example -%config(noreplace) %attr(640, ldap, ldap) /var/lib/ldap/DB_CONFIG -%config /var/lib/ldap/DB_CONFIG.example +%config(noreplace) %attr(640, ldap, ldap) %{_libexecdir}/openldap/DB_CONFIG %dir %{_libdir}/openldap %dir %{_libexecdir}/openldap %dir %{_sysconfdir}/sasl2 @@ -519,6 +522,7 @@ fi %{_libdir}/slapd %{_libexecdir}/openldap/start %{_unitdir}/slapd.service +/usr/lib/tmpfiles.d/%{name}.conf %dir %attr(0750, ldap, ldap) /var/lib/ldap %ghost %attr(0750, ldap, ldap) %{_rundir} %doc %{_mandir}/man8/sl* @@ -539,6 +543,7 @@ fi %doc %{DOCDIR}/README* %doc %{DOCDIR}/CHANGES %doc %{DOCDIR}/slapd.ldif.default +%doc %{DOCDIR}/DB_CONFIG.example %files back-perl %defattr(-,root,root)