SHA256
1
0
forked from pool/openldap2

Accepting request 530541 from network:ldap

1

OBS-URL: https://build.opensuse.org/request/show/530541
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openldap2?expand=0&rev=127
This commit is contained in:
Dominique Leuenberger 2017-10-07 15:47:47 +00:00 committed by Git OBS Bridge
commit 4191a8e99b
3 changed files with 48 additions and 3 deletions

24
openldap-r-only.dif Normal file
View File

@ -0,0 +1,24 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2017-07-04 13:53:32.386698982 +0200
Build all own programs exclusively with libldap_r and not libldap.
References: http://bugzilla.redhat.com/1370065
References: http://bugzilla.opensuse.org/996551
---
build/top.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: openldap-2.4.45/build/top.mk
===================================================================
--- openldap-2.4.45.orig/build/top.mk
+++ openldap-2.4.45/build/top.mk
@@ -171,7 +171,7 @@ LDAP_LIBLUNICODE_A = $(LDAP_LIBDIR)/libl
LDAP_LIBLUTIL_A = $(LDAP_LIBDIR)/liblutil/liblutil.a
LDAP_L = $(LDAP_LIBLUTIL_A) \
- $(LDAP_LIBLDAP_LA) $(LDAP_LIBLBER_LA)
+ $(LDAP_LIBLDAP_R_LA) $(LDAP_LIBLBER_LA)
SLAPD_L = $(LDAP_LIBLUNICODE_A) $(LDAP_LIBREWRITE_A) \
$(LDAP_LIBLUTIL_A) $(LDAP_LIBLDAP_R_LA) $(LDAP_LIBLBER_LA)

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Mon Oct 2 18:15:46 UTC 2017 - jengelh@inai.de
- Add openldap-r-only.dif so that openldap2's own tools also
link against libldap_r rather than libldap.
- Make libldap equivalent to libldap_r (like Debian) to avoid
crashes in threaded programs which unknowingly get both
libraries inserted into their process image.
[rh#1370065, boo#996551]
-------------------------------------------------------------------
Mon Oct 2 13:18:54 UTC 2017 - mrueckert@suse.de
- use existing groups instead of inventing new ones
-------------------------------------------------------------------
Mon Sep 18 20:45:58 UTC 2017 - michael@stroeder.com

View File

@ -60,6 +60,7 @@ Patch11: 0011-openldap-re24-its7796.patch
Patch12: 0012-ITS8051-sockdnpat.patch
Patch13: 0013-ITS-8692-let-back-sock-generate-increment-line.patch
Patch14: 0014-ITS-8714-Send-out-EXTENDED-operation-message-from-back-sock.patch
Patch15: openldap-r-only.dif
Source200: %{name_ppolicy_check_module}-%{version_ppolicy_check_module}.tar.gz
Source201: %{name_ppolicy_check_module}.Makefile
Source202: %{name_ppolicy_check_module}.conf
@ -135,7 +136,7 @@ to do any programming.
%package -n libldap-data
Summary: Configuration file for system-wide defaults for all uses of libldap
Group: Productivity/Networking/LDAP
Group: Productivity/Networking/LDAP/Clients
%if 0%{?suse_version} != 1110
BuildArch: noarch
%endif
@ -186,8 +187,8 @@ OpenLDAP client utilities such as ldapadd, ldapsearch, ldapmodify.
%package devel
Summary: Libraries, Header Files and Documentation for OpenLDAP
Group: Development/Libraries/C and C++
# bug437293
Group: Development/Libraries/C and C++
%ifarch ppc64
Obsoletes: openldap2-devel-64bit
%endif
@ -255,6 +256,7 @@ gzip -k %{S:203}
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
cp %{SOURCE5} .
# Move ppolicy check module and its Makefile into openldap-2.4/contrib/slapd-modules/
@ -359,7 +361,6 @@ install -m 644 %{SOURCE4} ${RPM_BUILD_ROOT}/%{_sysconfdir}/sasl2/slapd.conf
install -m 755 -d ${RPM_BUILD_ROOT}/var/lib/ldap
chmod a+x ${RPM_BUILD_ROOT}/%{_libdir}/liblber.so*
chmod a+x ${RPM_BUILD_ROOT}/%{_libdir}/libldap_r.so*
chmod a+x ${RPM_BUILD_ROOT}/%{_libdir}/libldap.so*
install -m 755 %{SOURCE6} ${RPM_BUILD_ROOT}/usr/sbin/schema2ldif
# Install ppolicy check module
@ -424,6 +425,11 @@ rm -f ${RPM_BUILD_ROOT}/usr/share/man/man5/slapd-tcl.5
# Remove *.la files, libtool does not handle this correct
rm -f ${RPM_BUILD_ROOT}%{_libdir}/lib*.la
# Make ldap_r the only copy in the system [rh#1370065].
# libldap.so is only for `gcc/ld -lldap`. Make no libldap-2.4.so.2.
rm -f "%{buildroot}/%{_libdir}"/libldap-2.4.so*
ln -fs libldap_r.so "%{buildroot}/%{_libdir}/libldap.so"
%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