forked from jengelh/openldap2
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
This commit is contained in:
parent
3534858d61
commit
146741f941
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user