Commit b8a8ecd4 authored by David Bender's avatar David Bender Committed by Peter Korsgaard
Browse files

package/openldap: new package



Signed-off-by: default avatarDavid Bender <codehero@gmail.com>
[yann.morin.1998@free.fr:
  - remove ldaps config option, use build-time dependencies
  - add dependencies against openssl/gnutls/libnss as appropriate
  - fix mis-detected tls support when openssl is enabled
  - fix strip at install time
  - cleanup configure arguments
  - add hash file
  - fix help entry
]
[Peter: needs wchar]
Signed-off-by: default avatarYann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: default avatarPeter Korsgaard <peter@korsgaard.com>
parent b8e13fbe
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -872,6 +872,7 @@ menu "Networking"
	source "package/neon/Config.in"
	source "package/nss-mdns/Config.in"
	source "package/omniorb/Config.in"
	source "package/openldap/Config.in"
	source "package/openpgm/Config.in"
	source "package/ortp/Config.in"
	source "package/qdecoder/Config.in"
+74 −0
Original line number Diff line number Diff line
Fix stripping when cross-compiling

Probably-Signed-off-by: Dave Bender <bender@benegon.com>
[yann.morin.1998@free.fr: patch was made by Dave, but he
 forgot his SoB line, so I added it]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

diff -rupN openldap-2.4.40/build/shtool openldap-2.4.40-br/build/shtool
--- openldap-2.4.40/build/shtool	2014-09-18 21:48:49.000000000 -0400
+++ openldap-2.4.40-br/build/shtool	2015-01-21 13:21:35.689829372 -0500
@@ -981,7 +981,7 @@ install )
             if [ ".$opt_t" = .yes ]; then
                 echo "strip $dsttmp" 1>&2
             fi
-            strip $dsttmp || shtool_exit $?
+            $STRIP $dsttmp || shtool_exit $?
         fi
         if [ ".$opt_o" != . ]; then
             if [ ".$opt_t" = .yes ]; then
diff -rupN openldap-2.4.40/build/top.mk openldap-2.4.40-br/build/top.mk
--- openldap-2.4.40/build/top.mk	2014-09-18 21:48:49.000000000 -0400
+++ openldap-2.4.40-br/build/top.mk	2015-01-21 13:23:41.027810097 -0500
@@ -59,7 +59,7 @@ INSTALL_PROGRAM = $(INSTALL)
 INSTALL_DATA = $(INSTALL) -m 644
 INSTALL_SCRIPT = $(INSTALL)
 
-STRIP = -s
+STRIP_OPTS = -s
 
 LINT = lint
 5LINT = 5lint
diff -rupN openldap-2.4.40/clients/tools/Makefile.in openldap-2.4.40-br/clients/tools/Makefile.in
--- openldap-2.4.40/clients/tools/Makefile.in	2014-09-18 21:48:49.000000000 -0400
+++ openldap-2.4.40-br/clients/tools/Makefile.in	2015-01-21 13:23:35.827727946 -0500
@@ -120,7 +120,7 @@ install-local:	FORCE
 	-$(MKDIR) $(DESTDIR)$(bindir)
 	@(								\
 	    for prg in $(PROGRAMS); do					\
-		$(LTINSTALL) $(INSTALLFLAGS) $(STRIP) -m 755 $$prg$(EXEEXT)	\
+		$(LTINSTALL) $(INSTALLFLAGS) $(STRIP_OPTS) -m 755 $$prg$(EXEEXT)	\
 		    $(DESTDIR)$(bindir);				\
 	    done							\
 	)
diff -rupN openldap-2.4.40/configure.in openldap-2.4.40-br/configure.in
--- openldap-2.4.40/configure.in	2014-09-18 21:48:49.000000000 -0400
+++ openldap-2.4.40-br/configure.in	2015-01-16 15:50:48.874816786 -0500
@@ -669,6 +669,15 @@ if test -z "${AR}"; then
 	fi
 fi
 
+if test -z "${STRIP}"; then
+	AC_CHECK_PROGS(STRIP,strip,missing)
+
+	if test "${STRIP}" = "missing" ; then
+		AC_MSG_ERROR([Unable to locate strip(1) or suitable replacement.  Check PATH or set STRIP.])
+	fi
+fi
+
+
 AC_LIBTOOL_WIN32_DLL
 AC_LIBTOOL_DLOPEN
 AC_PROG_LIBTOOL
diff -rupN openldap-2.4.40/servers/slapd/Makefile.in openldap-2.4.40-br/servers/slapd/Makefile.in
--- openldap-2.4.40/servers/slapd/Makefile.in	2015-01-16 15:04:52.507473256 -0500
+++ openldap-2.4.40-br/servers/slapd/Makefile.in	2015-01-16 15:05:02.299627229 -0500
@@ -378,7 +378,7 @@ install-local-srv: install-slapd install
 install-slapd: FORCE
 	-$(MKDIR) $(DESTDIR)$(libexecdir)
 	-$(MKDIR) $(DESTDIR)$(localstatedir)/run
-	$(LTINSTALL) $(INSTALLFLAGS) $(STRIP) -m 755 \
+	$(LTINSTALL) $(INSTALLFLAGS) $(STRIP_OPTS) -m 755 \
 		slapd$(EXEEXT) $(DESTDIR)$(libexecdir)
 	@for i in $(SUBDIRS); do \
 	    if test -d $$i && test -f $$i/Makefile ; then \
+38 −0
Original line number Diff line number Diff line
configure: correctly detect bignum

Building with bignum is currently not possible, since we're checking
ol_with_tls against a value it is never assigned in any case.

Since bignum is from openssl, and openssl is the preferred TLS
implementation, if the bignum headers are found, it means we do have
TLS and it is opensl.

So, keep the check for the bignum header, but check against ol_link_tls
which means that openssl is enabled when we find the bignum headers.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

diff -durN openldap-2.4.40.orig/configure openldap-2.4.40/configure
--- openldap-2.4.40.orig/configure	2014-09-19 03:48:49.000000000 +0200
+++ openldap-2.4.40/configure	2015-01-25 18:44:54.216879362 +0100
@@ -23478,7 +23478,7 @@
 
 	if test "$ac_cv_header_openssl_bn_h" = "yes" &&
 		test "$ac_cv_header_openssl_crypto_h" = "yes" &&
-		test "$ol_with_tls" = "found" ; then
+		test "$ol_link_tls" = "yes" ; then
 		ol_with_mp=bignum
 
 $as_echo "#define USE_MP_BIGNUM 1" >>confdefs.h
diff -durN openldap-2.4.40.orig/configure.in openldap-2.4.40/configure.in
--- openldap-2.4.40.orig/configure.in	2014-09-19 03:48:49.000000000 +0200
+++ openldap-2.4.40/configure.in	2015-01-25 18:44:37.628676446 +0100
@@ -2367,7 +2367,7 @@
 	AC_CHECK_HEADERS(openssl/crypto.h)
 	if test "$ac_cv_header_openssl_bn_h" = "yes" &&
 		test "$ac_cv_header_openssl_crypto_h" = "yes" &&
-		test "$ol_with_tls" = "found" ; then
+		test "$ol_link_tls" = "yes" ; then
 		ol_with_mp=bignum
 		AC_DEFINE(USE_MP_BIGNUM,1,[define to use OpenSSL BIGNUM for MP])
 	elif test $ol_with_mp = bignum ; then
+13 −0
Original line number Diff line number Diff line
config BR2_PACKAGE_OPENLDAP
	bool "openldap"
	depends on BR2_USE_WCHAR
	help
	  OpenLDAP Software is an open source implementation of
	  the Lightweight Directory Access Protocol.

	  This only installs client-side support.

	  http://www.openldap.org/

comment "openldap needs a toolchain w/ wchar"
	depends on !BR2_USE_WCHAR
+4 −0
Original line number Diff line number Diff line
# From:  ftp://mirror.switch.ch/mirror/OpenLDAP/openldap-release/openldap-2.4.40.sha1
sha1  0cfac3b024b99de2e2456cc7254481b6644e0b96  openldap-2.4.40.tgz
# Locally computed:
sha256  d12611a5c25b6499293c2bb7b435dc2b174db73e83f5a8cb7e34f2ce5fa6dadb  openldap-2.4.40.tgz
Loading