From 146741f94136638635cf0f02187e7edb6f1f034c1904875f4689af3546ee3e18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Str=C3=B6der?= Date: Thu, 30 Mar 2017 11:33:14 +0000 Subject: [PATCH] Accepting request 483798 from home:jengelh:branches:network:ldap - Work around ldconfig removing files [boo#1031464] - Do not ignore failure to create user/groups OBS-URL: https://build.opensuse.org/request/show/483798 OBS-URL: https://build.opensuse.org/package/show/network:ldap/openldap2?expand=0&rev=173 --- openldap2.changes | 6 ++++++ openldap2.spec | 15 ++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/openldap2.changes b/openldap2.changes index df81bce..c3cc33e 100644 --- a/openldap2.changes +++ b/openldap2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Mar 29 20:56:33 UTC 2017 - jengelh@inai.de + +- Work around ldconfig removing files [boo#1031464] +- Do not ignore failure to create user/groups + ------------------------------------------------------------------- Thu Mar 23 15:06:27 UTC 2017 - jengelh@inai.de diff --git a/openldap2.spec b/openldap2.spec index 0038fdb..c99400a 100644 --- a/openldap2.spec +++ b/openldap2.spec @@ -430,12 +430,12 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/lib*.la # Make ldap_r the only copy in the system [rh#1370065] rm -f "%{buildroot}/%{_libdir}"/libldap-2.4.so* -ln -fs libldap_r-2.4.so.2 "%{buildroot}/%{_libdir}/libldap-2.4.so.2" ln -fs libldap_r.so "%{buildroot}/%{_libdir}/libldap.so" +ln -s libldap_r-2.4.so.2 "%{buildroot}/%{_libdir}/libldap-2.4.so.2" %pre -getent group ldap >/dev/null || /usr/sbin/groupadd -g 70 -o -r ldap || : -getent passwd ldap >/dev/null || /usr/sbin/useradd -r -o -g ldap -u 76 -s /bin/false -c "User for OpenLDAP" -d /var/lib/ldap ldap || : +getent group ldap >/dev/null || /usr/sbin/groupadd -g 70 -o -r ldap +getent passwd ldap >/dev/null || /usr/sbin/useradd -r -o -g ldap -u 76 -s /bin/false -c "User for OpenLDAP" -d /var/lib/ldap ldap if /usr/bin/chkconfig ldap 2>&1 | grep -q on; then touch %{_rundir}/enable_slapd_service fi @@ -463,6 +463,15 @@ fi %postun %service_del_postun slapd.service +%triggerun -n libldap-2_4-2 -- libldap-2_4-2 +if [ "$1" -eq 2 ]; then + # The %%postun from prior libldap versions calls ldconfig, which + # remembers libldap-2.4.so.2 as a symlink and will remove it, defeating + # rpm file tracking :-( + # Restore it. + ln -fs libldap_r-2.4.so.2 "%{_libdir}/libldap-2.4.so.2" +fi + %files %defattr(-,root,root) %config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/openldap