1 Submitted by: Bruce Dubbs <bdubbs at linuxfromscratch.org>
3 Initial Package Version: 2.4.40
4 Upstream Status: BLFS Specific
5 Origin: Armin K. <krejzi at email dot com> and Debian
6 Comment: Rediffed by Fernando de Oliveira <famobr at yahoo dot
7 com dot br> for version 2.4.44 - 2016.02.06
8 Rediffed by Pierre Labastie <pierre dot labastie at
9 neuf dot fr> to add mdb backend and slapd.ldif. See
10 ticket #7394 - 2016.02.24
11 Description: Consolidate earlier patches to:
12 1. Update various installation options, such as ldap database path,
13 configuration file options, slapd install location, etc.
14 2. Remove reference to bdb module
15 3. Enables symbol versioning in ldap libraries. Without these changes
16 some applications might generate a warning about missing symbol versions.
18 diff -Naur openldap-2.4.40.orig/build/openldap.m4 openldap-2.4.40/build/openldap.m4
19 --- openldap-2.4.40.orig/build/openldap.m4 2014-09-18 20:48:49.000000000 -0500
20 +++ openldap-2.4.40/build/openldap.m4 2015-03-26 15:37:39.801077750 -0500
21 @@ -1142,3 +1142,54 @@
23 ], [ol_cv_ssl_crl_compat=yes], [ol_cv_ssl_crl_compat=no])])
26 +dnl ====================================================================
27 +dnl check for symbol versioning support
28 +AC_DEFUN([OL_SYMBOL_VERSIONING],
29 +[AC_CACHE_CHECK([for .symver assembler directive],
30 + [ol_cv_asm_symver_directive],[
31 +cat > conftest.s <<EOF
34 +.symver _sym,sym@VERS
36 +if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
37 + ol_cv_asm_symver_directive=yes
39 + ol_cv_asm_symver_directive=no
42 +AC_CACHE_CHECK([for ld --version-script],
43 + [ol_cv_ld_version_script_option],[
44 +if test $ol_cv_asm_symver_directive = yes; then
45 + cat > conftest.s <<EOF
48 +.symver _sym,sym@VERS
50 + cat > conftest.map <<EOF
59 + if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
60 + if AC_TRY_COMMAND([${CC-cc} $CFLAGS $LDFLAGS -shared
61 + -o conftest.so conftest.o
62 + -Wl,--version-script,conftest.map
63 + 1>&AS_MESSAGE_LOG_FD]);
65 + ol_cv_ld_version_script_option=yes
67 + ol_cv_ld_version_script_option=no
70 + ol_cv_ld_version_script_option=no
73 + ol_cv_ld_version_script_option=no
76 diff -Naur openldap-2.4.40.orig/build/top.mk openldap-2.4.40/build/top.mk
77 --- openldap-2.4.40.orig/build/top.mk 2014-09-18 20:48:49.000000000 -0500
78 +++ openldap-2.4.40/build/top.mk 2015-03-26 15:37:39.801077750 -0500
80 # LINK_LIBS referenced in library and module link commands.
81 LINK_LIBS = $(MOD_LIBS) $(@PLAT@_LINK_LIBS)
83 +# option to pass to $(CC) to support library symbol versioning, if any
84 +VERSION_OPTION = @VERSION_OPTION@
88 LTLINK = $(LIBTOOL) --mode=link \
90 $(CC) $(LT_CFLAGS) $(LT_CPPFLAGS) $(LIB_DEFS) -c
92 LTLINK_LIB = $(LIBTOOL) $(LTONLY_LIB) --mode=link \
93 - $(CC) $(LT_CFLAGS) $(LDFLAGS) $(LTFLAGS_LIB)
94 + $(CC) $(LT_CFLAGS) $(LDFLAGS) $(LTFLAGS_LIB) $(VERSION_FLAGS)
96 LTCOMPILE_MOD = $(LIBTOOL) $(LTONLY_MOD) --mode=compile \
97 $(CC) $(LT_CFLAGS) $(LT_CPPFLAGS) $(MOD_DEFS) -c
98 diff -Naur openldap-2.4.40.orig/configure.in openldap-2.4.40/configure.in
99 --- openldap-2.4.40.orig/configure.in 2014-09-18 20:48:49.000000000 -0500
100 +++ openldap-2.4.40/configure.in 2015-03-26 15:37:39.801077750 -0500
101 @@ -1916,6 +1916,13 @@
103 AC_SUBST(LTSTATIC)dnl
106 +OL_SYMBOL_VERSIONING
107 +if test $ol_cv_ld_version_script_option = yes ; then
108 + VERSION_OPTION="-Wl,--version-script="
110 +AC_SUBST(VERSION_OPTION)
112 dnl ----------------------------------------------------------------
113 if test $ol_enable_wrappers != no ; then
114 AC_CHECK_HEADERS(tcpd.h,[
115 diff -Naur openldap-2.4.40.orig/doc/man/man5/slapd-bdb.5 openldap-2.4.40/doc/man/man5/slapd-bdb.5
116 --- openldap-2.4.40.orig/doc/man/man5/slapd-bdb.5 2014-09-18 20:48:49.000000000 -0500
117 +++ openldap-2.4.40/doc/man/man5/slapd-bdb.5 2015-03-26 15:36:59.637464038 -0500
119 associated indexes live.
120 A separate directory must be specified for each database.
122 -.BR LOCALSTATEDIR/openldap\-data .
123 +.BR LOCALSTATEDIR/lib/openldap .
126 Allow reads of modified but not yet committed data.
127 diff -Naur openldap-2.4.40.orig/doc/man/man5/slapd-config.5 openldap-2.4.40/doc/man/man5/slapd-config.5
128 --- openldap-2.4.40.orig/doc/man/man5/slapd-config.5 2014-09-18 20:48:49.000000000 -0500
129 +++ openldap-2.4.40/doc/man/man5/slapd-config.5 2015-03-26 15:36:59.638464004 -0500
130 @@ -2051,7 +2051,7 @@
131 # The database directory MUST exist prior to
132 # running slapd AND should only be accessible
133 # by the slapd/tools. Mode 0700 recommended.
134 -olcDbDirectory: LOCALSTATEDIR/openldap\-data
135 +olcDbDirectory: LOCALSTATEDIR/lib/openldap
136 # Indices to maintain
137 olcDbIndex: objectClass eq
138 olcDbIndex: cn,sn,mail pres,eq,approx,sub
139 diff -Naur openldap-2.4.40.orig/doc/man/man5/slapd.conf.5 openldap-2.4.40/doc/man/man5/slapd.conf.5
140 --- openldap-2.4.40.orig/doc/man/man5/slapd.conf.5 2014-09-18 20:48:49.000000000 -0500
141 +++ openldap-2.4.40/doc/man/man5/slapd.conf.5 2015-03-26 15:36:59.638464004 -0500
142 @@ -2021,7 +2021,7 @@
143 # The database directory MUST exist prior to
144 # running slapd AND should only be accessible
145 # by the slapd/tools. Mode 0700 recommended.
146 -directory LOCALSTATEDIR/openldap\-data
147 +directory LOCALSTATEDIR/lib/openldap
148 # Indices to maintain
150 index cn,sn,mail pres,eq,approx,sub
151 diff -Naur openldap-2.4.40.orig/include/ldap_defaults.h openldap-2.4.40/include/ldap_defaults.h
152 --- openldap-2.4.40.orig/include/ldap_defaults.h 2014-09-18 20:48:49.000000000 -0500
153 +++ openldap-2.4.40/include/ldap_defaults.h 2015-03-26 15:36:59.638464004 -0500
155 #define LDAP_ENV_PREFIX "LDAP"
157 /* default ldapi:// socket */
158 -#define LDAPI_SOCK LDAP_RUNDIR LDAP_DIRSEP "run" LDAP_DIRSEP "ldapi"
159 +#define LDAPI_SOCK LDAP_RUNDIR LDAP_DIRSEP "run" LDAP_DIRSEP "openldap" LDAP_DIRSEP "ldapi"
164 /* location of the default slapd config file */
165 #define SLAPD_DEFAULT_CONFIGFILE LDAP_SYSCONFDIR LDAP_DIRSEP "slapd.conf"
166 #define SLAPD_DEFAULT_CONFIGDIR LDAP_SYSCONFDIR LDAP_DIRSEP "slapd.d"
167 -#define SLAPD_DEFAULT_DB_DIR LDAP_RUNDIR LDAP_DIRSEP "openldap-data"
168 +#define SLAPD_DEFAULT_DB_DIR LDAP_RUNDIR LDAP_DIRSEP "lib" LDAP_DIRSEP "openldap"
169 #define SLAPD_DEFAULT_DB_MODE 0600
170 #define SLAPD_DEFAULT_UCDATA LDAP_DATADIR LDAP_DIRSEP "ucdata"
171 /* default max deref depth for aliases */
172 diff -Naur openldap-2.4.40.orig/libraries/liblber/Makefile.in openldap-2.4.40/libraries/liblber/Makefile.in
173 --- openldap-2.4.40.orig/libraries/liblber/Makefile.in 2014-09-18 20:48:49.000000000 -0500
174 +++ openldap-2.4.40/libraries/liblber/Makefile.in 2015-03-26 15:37:39.801077750 -0500
177 NT_LINK_LIBS = $(AC_LIBS)
178 UNIX_LINK_LIBS = $(AC_LIBS)
179 +ifneq (,$(VERSION_OPTION))
180 + VERSION_FLAGS = "$(VERSION_OPTION)$(srcdir)/liblber.map"
183 dtest: $(XLIBS) dtest.o
184 $(LTLINK) -o $@ dtest.o $(LIBS)
188 -$(MKDIR) $(DESTDIR)$(libdir)
189 - $(LTINSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(DESTDIR)$(libdir)
190 + $(LTINSTALL) $(INSTALLFLAGS) -m 755 $(LIBRARY) $(DESTDIR)$(libdir)
191 $(LTFINISH) $(DESTDIR)$(libdir)
193 diff -Naur openldap-2.4.40.orig/libraries/liblber/liblber.map openldap-2.4.40/libraries/liblber/liblber.map
194 --- openldap-2.4.40.orig/libraries/liblber/liblber.map 1969-12-31 18:00:00.000000000 -0600
195 +++ openldap-2.4.40/libraries/liblber/liblber.map 2015-03-26 15:37:39.801077750 -0500
205 diff -Naur openldap-2.4.40.orig/libraries/libldap/Makefile.in openldap-2.4.40/libraries/libldap/Makefile.in
206 --- openldap-2.4.40.orig/libraries/libldap/Makefile.in 2014-09-18 20:48:49.000000000 -0500
207 +++ openldap-2.4.40/libraries/libldap/Makefile.in 2015-03-26 15:37:39.802077716 -0500
209 XXLIBS = $(SECURITY_LIBS) $(LUTIL_LIBS)
210 NT_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS)
211 UNIX_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS)
212 +ifneq (,$(VERSION_OPTION))
213 + VERSION_FLAGS = $(VERSION_OPTION)$(srcdir)/libldap.map
216 apitest: $(XLIBS) apitest.o
217 $(LTLINK) -o $@ apitest.o $(LIBS)
220 install-local: $(CFFILES) FORCE
221 -$(MKDIR) $(DESTDIR)$(libdir)
222 - $(LTINSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(DESTDIR)$(libdir)
223 + $(LTINSTALL) $(INSTALLFLAGS) -m 755 $(LIBRARY) $(DESTDIR)$(libdir)
224 $(LTFINISH) $(DESTDIR)$(libdir)
225 -$(MKDIR) $(DESTDIR)$(sysconfdir)
226 @for i in $(CFFILES); do \
227 diff -Naur openldap-2.4.40.orig/libraries/libldap/libldap.map openldap-2.4.40/libraries/libldap/libldap.map
228 --- openldap-2.4.40.orig/libraries/libldap/libldap.map 1969-12-31 18:00:00.000000000 -0600
229 +++ openldap-2.4.40/libraries/libldap/libldap.map 2015-03-26 15:37:39.802077716 -0500
238 diff -Naur openldap-2.4.40.orig/libraries/libldap_r/Makefile.in openldap-2.4.40/libraries/libldap_r/Makefile.in
239 --- openldap-2.4.40.orig/libraries/libldap_r/Makefile.in 2014-09-18 20:48:49.000000000 -0500
240 +++ openldap-2.4.40/libraries/libldap_r/Makefile.in 2015-03-26 15:37:39.802077716 -0500
242 XXXLIBS = $(LTHREAD_LIBS)
243 NT_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS)
244 UNIX_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS) $(LTHREAD_LIBS)
245 +ifneq (,$(VERSION_OPTION))
246 + VERSION_FLAGS = "$(VERSION_OPTION)$(XXDIR)/libldap.map"
250 @for i in $(XXSRCS); do \
253 install-local: $(CFFILES) FORCE
254 -$(MKDIR) $(DESTDIR)$(libdir)
255 - $(LTINSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(DESTDIR)$(libdir)
256 + $(LTINSTALL) $(INSTALLFLAGS) -m 755 $(LIBRARY) $(DESTDIR)$(libdir)
257 $(LTFINISH) $(DESTDIR)$(libdir)
259 diff -Naur openldap-2.4.40.orig/servers/slapd/Makefile.in openldap-2.4.40/servers/slapd/Makefile.in
260 --- openldap-2.4.40.orig/servers/slapd/Makefile.in 2014-09-18 20:48:49.000000000 -0500
261 +++ openldap-2.4.40/servers/slapd/Makefile.in 2015-03-26 15:36:59.639463969 -0500
262 @@ -376,10 +376,10 @@
263 install-conf install-dbc-maybe install-schema install-tools
266 - -$(MKDIR) $(DESTDIR)$(libexecdir)
267 + -$(MKDIR) $(DESTDIR)$(sbindir)
268 -$(MKDIR) $(DESTDIR)$(localstatedir)/run
269 $(LTINSTALL) $(INSTALLFLAGS) $(STRIP) -m 755 \
270 - slapd$(EXEEXT) $(DESTDIR)$(libexecdir)
271 + slapd$(EXEEXT) $(DESTDIR)$(sbindir)
272 @for i in $(SUBDIRS); do \
273 if test -d $$i && test -f $$i/Makefile ; then \
274 echo; echo " cd $$i; $(MAKE) $(MFLAGS) install"; \
277 install-db-config: FORCE
278 @-$(MKDIR) $(DESTDIR)$(localstatedir) $(DESTDIR)$(sysconfdir)
279 - @-$(INSTALL) -m 700 -d $(DESTDIR)$(localstatedir)/openldap-data
280 + @-$(INSTALL) -m 700 -d $(DESTDIR)$(localstatedir)/lib/openldap
281 $(INSTALL) $(INSTALLFLAGS) -m 600 $(srcdir)/DB_CONFIG \
282 - $(DESTDIR)$(localstatedir)/openldap-data/DB_CONFIG.example
283 + $(DESTDIR)$(localstatedir)/lib/openldap/DB_CONFIG.example
284 $(INSTALL) $(INSTALLFLAGS) -m 600 $(srcdir)/DB_CONFIG \
285 $(DESTDIR)$(sysconfdir)/DB_CONFIG.example
288 -$(MKDIR) $(DESTDIR)$(sbindir)
289 for i in $(SLAPTOOLS); do \
290 $(RM) $(DESTDIR)$(sbindir)/$$i$(EXEEXT); \
291 - $(LN_S) -f $(DESTDIR)$(libexecdir)/slapd$(EXEEXT) $(DESTDIR)$(sbindir)/$$i$(EXEEXT); \
292 + $(LN_S) -f $(DESTDIR)$(sbindir)/slapd$(EXEEXT) $(DESTDIR)$(sbindir)/$$i$(EXEEXT); \
295 diff -Naur openldap-2.4.44.orig/servers/slapd/slapd.conf openldap-2.4.44/servers/slapd/slapd.conf
296 --- openldap-2.4.44.orig/servers/slapd/slapd.conf 2016-02-06 00:57:45.000000000 +0100
297 +++ openldap-2.4.44/servers/slapd/slapd.conf 2016-02-22 23:01:47.681372594 +0100
299 # service AND an understanding of referrals.
300 #referral ldap://root.openldap.org
302 -pidfile %LOCALSTATEDIR%/run/slapd.pid
303 -argsfile %LOCALSTATEDIR%/run/slapd.args
304 +pidfile %LOCALSTATEDIR%/run/openldap/slapd.pid
305 +argsfile %LOCALSTATEDIR%/run/openldap/slapd.args
307 # Load dynamic backend modules:
308 -# modulepath %MODULEDIR%
309 -# moduleload back_mdb.la
310 +modulepath %MODULEDIR%
311 +moduleload back_mdb.la
312 # moduleload back_ldap.la
314 # Sample security restrictions
316 # The database directory MUST exist prior to running slapd AND
317 # should only be accessible by the slapd and slap tools.
318 # Mode 700 recommended.
319 -directory %LOCALSTATEDIR%/openldap-data
320 +directory %LOCALSTATEDIR%/lib/openldap
321 # Indices to maintain
323 diff -Naur openldap-2.4.44.orig/servers/slapd/slapd.ldif openldap-2.4.44/servers/slapd/slapd.ldif
324 --- openldap-2.4.44.orig/servers/slapd/slapd.ldif 2016-02-06 00:57:45.000000000 +0100
325 +++ openldap-2.4.44/servers/slapd/slapd.ldif 2016-02-22 22:59:57.824364446 +0100
328 # Define global ACLs to disable default read access.
330 -olcArgsFile: %LOCALSTATEDIR%/run/slapd.args
331 -olcPidFile: %LOCALSTATEDIR%/run/slapd.pid
332 +olcArgsFile: %LOCALSTATEDIR%/run/openldap/slapd.args
333 +olcPidFile: %LOCALSTATEDIR%/run/openldap/slapd.pid
335 # Do not enable referrals until AFTER you have a working directory
336 # service AND an understanding of referrals.
339 # Load dynamic backend modules:
341 -#dn: cn=module,cn=config
342 -#objectClass: olcModuleList
344 -#olcModulepath: %MODULEDIR%
345 +dn: cn=module,cn=config
346 +objectClass: olcModuleList
348 +olcModulepath: %MODULEDIR%
349 +olcModuleload: back_mdb.la
350 #olcModuleload: back_bdb.la
351 #olcModuleload: back_hdb.la
352 #olcModuleload: back_ldap.la
354 # The database directory MUST exist prior to running slapd AND
355 # should only be accessible by the slapd and slap tools.
356 # Mode 700 recommended.
357 -olcDbDirectory: %LOCALSTATEDIR%/openldap-data
358 +olcDbDirectory: %LOCALSTATEDIR%/lib/openldap
359 # Indices to maintain
360 olcDbIndex: objectClass eq
361 diff -Naur openldap-2.4.40.orig/servers/slapd/slapi/Makefile.in openldap-2.4.40/servers/slapd/slapi/Makefile.in
362 --- openldap-2.4.40.orig/servers/slapd/slapi/Makefile.in 2014-09-18 20:48:49.000000000 -0500
363 +++ openldap-2.4.40/servers/slapd/slapi/Makefile.in 2015-03-26 15:36:59.639463969 -0500
366 if test "$(BUILD_MOD)" = "yes"; then \
367 $(MKDIR) $(DESTDIR)$(libdir); \
368 - $(LTINSTALL) $(INSTALLFLAGS) -m 644 $(LIBRARY) $(DESTDIR)$(libdir); \
369 + $(LTINSTALL) $(INSTALLFLAGS) -m 755 $(LIBRARY) $(DESTDIR)$(libdir); \