From 995ac11ee34b0fe97dd6f78b3993e40c8265da275b48cded217b54701f586f52 Mon Sep 17 00:00:00 2001 From: Peter Varkoly Date: Thu, 8 Nov 2018 16:36:16 +0000 Subject: [PATCH 1/4] - Bug 1111388 openldap and /var/lib/ldap/DB_CONFIG* (transactional-update) OBS-URL: https://build.opensuse.org/package/show/network:ldap/openldap2?expand=0&rev=225 --- openldap.conf | 3 +++ openldap2.changes | 5 +++++ openldap2.spec | 12 ++++++++---- 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 openldap.conf diff --git a/openldap.conf b/openldap.conf new file mode 100644 index 0000000..579c6d0 --- /dev/null +++ b/openldap.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.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.spec b/openldap2.spec index f104c04..c13d542 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: openldap.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,8 @@ 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 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,15 +397,15 @@ 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 -m 644 %{SOURCE3} ${RPM_BUILD_ROOT}/%{DOCDIR}/ +install -m 644 ${RPM_BUILD_ROOT}/etc/openldap/DB_CONFIG.example ${RPM_BUILD_ROOT}/%{DOCDIR}/ install -d ${RPM_BUILD_ROOT}/%{DOCDIR}/adminguide \ ${RPM_BUILD_ROOT}/%{DOCDIR}/images \ ${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 @@ -478,7 +482,6 @@ fi %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 %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* From 9603bdafdf854f083d3bd324ba54886d71faa0d36b084f8c44aeb94ba6f1c4bc Mon Sep 17 00:00:00 2001 From: Peter Varkoly Date: Thu, 8 Nov 2018 17:33:32 +0000 Subject: [PATCH 2/4] Fix spec OBS-URL: https://build.opensuse.org/package/show/network:ldap/openldap2?expand=0&rev=226 --- openldap2.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openldap2.spec b/openldap2.spec index c13d542..e4f886c 100644 --- a/openldap2.spec +++ b/openldap2.spec @@ -376,6 +376,7 @@ 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 @@ -404,11 +405,10 @@ rm -rf doc/guide/release %define DOCDIR %{_defaultdocdir}/%{name} # Install default database optimisation -install -m 644 %{SOURCE3} ${RPM_BUILD_ROOT}/%{DOCDIR}/ -install -m 644 ${RPM_BUILD_ROOT}/etc/openldap/DB_CONFIG.example ${RPM_BUILD_ROOT}/%{DOCDIR}/ 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 @@ -481,7 +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(noreplace) %attr(640, ldap, ldap) %{_libexecdir}/openldap/DB_CONFIG %dir %{_libdir}/openldap %dir %{_libexecdir}/openldap %dir %{_sysconfdir}/sasl2 From ba6af7362fabe752af7aafbc00688190724cf5320147ac041df078a2138b9eee Mon Sep 17 00:00:00 2001 From: Peter Varkoly Date: Thu, 8 Nov 2018 17:42:38 +0000 Subject: [PATCH 3/4] Fix spec. OBS-URL: https://build.opensuse.org/package/show/network:ldap/openldap2?expand=0&rev=227 --- openldap.conf => openldap2.conf | 0 openldap2.spec | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename openldap.conf => openldap2.conf (100%) diff --git a/openldap.conf b/openldap2.conf similarity index 100% rename from openldap.conf rename to openldap2.conf diff --git a/openldap2.spec b/openldap2.spec index e4f886c..d2fa043 100644 --- a/openldap2.spec +++ b/openldap2.spec @@ -56,7 +56,7 @@ Source14: slapd.service Source15: SuSEfirewall2.openldap Source16: sysconfig.openldap Source17: openldap_update_modules_path.sh -Source18: openldap.conf +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 From ef5ad0a09de74911d9b46d18c2ec749d7097b02187b5918b8316dede7363720a Mon Sep 17 00:00:00 2001 From: Peter Varkoly Date: Thu, 8 Nov 2018 18:28:36 +0000 Subject: [PATCH 4/4] Fix spec. OBS-URL: https://build.opensuse.org/package/show/network:ldap/openldap2?expand=0&rev=228 --- openldap2.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/openldap2.spec b/openldap2.spec index d2fa043..fb5fab3 100644 --- a/openldap2.spec +++ b/openldap2.spec @@ -543,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)