diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:51:41 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:51:41 +0200 |
commit | 1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e (patch) | |
tree | a21a5fc103bb3bd65ecd85ed22be5228fc54e447 /meta-oe/recipes-support/openldap | |
download | meta-openembedded-1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e.tar.gz |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-oe/recipes-support/openldap')
9 files changed, 452 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/openldap/openldap-2.4.39/ITS-7723-fix-reference-counting.patch b/meta-oe/recipes-support/openldap/openldap-2.4.39/ITS-7723-fix-reference-counting.patch new file mode 100644 index 000000000..9a0f4cb14 --- /dev/null +++ b/meta-oe/recipes-support/openldap/openldap-2.4.39/ITS-7723-fix-reference-counting.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 59688044386dfeee0c837a15133f4e878f1bb661 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jan Synacek <jsynacek@redhat.com> | ||
3 | Date: Wed, 13 Nov 2013 09:06:54 +0100 | ||
4 | Subject: [PATCH] ITS#7723 fix reference counting | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | |||
8 | Commit 59688044386dfeee0c837a15133f4e878f1bb661 upstream | ||
9 | |||
10 | Signed-off-by: Yue Tao <Yue.Tao@windriver.com> | ||
11 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
12 | --- | ||
13 | libraries/librewrite/session.c | 2 ++ | ||
14 | 1 files changed, 2 insertions(+), 0 deletions(-) | ||
15 | |||
16 | diff --git a/libraries/librewrite/session.c b/libraries/librewrite/session.c | ||
17 | index fcc7698..02fc054 100644 | ||
18 | --- a/libraries/librewrite/session.c | ||
19 | +++ b/libraries/librewrite/session.c | ||
20 | @@ -161,6 +161,7 @@ rewrite_session_find( | ||
21 | #ifdef USE_REWRITE_LDAP_PVT_THREADS | ||
22 | if ( session ) { | ||
23 | ldap_pvt_thread_mutex_lock( &session->ls_mutex ); | ||
24 | + session->ls_count++; | ||
25 | } | ||
26 | ldap_pvt_thread_rdwr_runlock( &info->li_cookies_mutex ); | ||
27 | #endif /* USE_REWRITE_LDAP_PVT_THREADS */ | ||
28 | @@ -178,6 +179,7 @@ rewrite_session_return( | ||
29 | ) | ||
30 | { | ||
31 | assert( session != NULL ); | ||
32 | + session->ls_count--; | ||
33 | ldap_pvt_thread_mutex_unlock( &session->ls_mutex ); | ||
34 | } | ||
35 | |||
36 | -- | ||
37 | 1.7.5.4 | ||
38 | |||
diff --git a/meta-oe/recipes-support/openldap/openldap-2.4.39/gnutls-Avoid-use-of-deprecated-function.patch b/meta-oe/recipes-support/openldap/openldap-2.4.39/gnutls-Avoid-use-of-deprecated-function.patch new file mode 100644 index 000000000..dffd3ca51 --- /dev/null +++ b/meta-oe/recipes-support/openldap/openldap-2.4.39/gnutls-Avoid-use-of-deprecated-function.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 0205e83f4670d10ad3c6ae4b8fc5ec1d0c7020c0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Howard Chu <hyc@openldap.org> | ||
3 | Date: Sat, 7 Sep 2013 09:39:24 -0700 | ||
4 | Subject: [PATCH] ITS#7430 GnuTLS: Avoid use of deprecated function | ||
5 | |||
6 | Upstream-status: Backport | ||
7 | |||
8 | --- | ||
9 | libraries/libldap/tls_g.c | 12 ++++++++++++ | ||
10 | 1 files changed, 12 insertions(+), 0 deletions(-) | ||
11 | |||
12 | diff --git a/libraries/libldap/tls_g.c b/libraries/libldap/tls_g.c | ||
13 | index 9acffaf..c793828 100644 | ||
14 | --- a/libraries/libldap/tls_g.c | ||
15 | +++ b/libraries/libldap/tls_g.c | ||
16 | @@ -368,6 +368,17 @@ tlsg_ctx_init( struct ldapoptions *lo, struct ldaptls *lt, int is_server ) | ||
17 | * then we have to build the cert chain. | ||
18 | */ | ||
19 | if ( max == 1 && !gnutls_x509_crt_check_issuer( certs[0], certs[0] )) { | ||
20 | +#if GNUTLS_VERSION_NUMBER >= 0x020c00 | ||
21 | + unsigned int i; | ||
22 | + for ( i = 1; i<VERIFY_DEPTH; i++ ) { | ||
23 | + if ( gnutls_certificate_get_issuer( ctx->cred, certs[i-1], &certs[i], 0 )) | ||
24 | + break; | ||
25 | + max++; | ||
26 | + /* If this CA is self-signed, we're done */ | ||
27 | + if ( gnutls_x509_crt_check_issuer( certs[i], certs[i] )) | ||
28 | + break; | ||
29 | + } | ||
30 | +#else | ||
31 | gnutls_x509_crt_t *cas; | ||
32 | unsigned int i, j, ncas; | ||
33 | |||
34 | @@ -387,6 +398,7 @@ tlsg_ctx_init( struct ldapoptions *lo, struct ldaptls *lt, int is_server ) | ||
35 | if ( j == ncas ) | ||
36 | break; | ||
37 | } | ||
38 | +#endif | ||
39 | } | ||
40 | rc = gnutls_certificate_set_x509_key( ctx->cred, certs, max, key ); | ||
41 | if ( rc ) return -1; | ||
42 | -- | ||
43 | 1.7.4.2 | ||
44 | |||
diff --git a/meta-oe/recipes-support/openldap/openldap-2.4.39/initscript b/meta-oe/recipes-support/openldap/openldap-2.4.39/initscript new file mode 100644 index 000000000..08d1067a7 --- /dev/null +++ b/meta-oe/recipes-support/openldap/openldap-2.4.39/initscript | |||
@@ -0,0 +1,35 @@ | |||
1 | #! /bin/sh | ||
2 | # | ||
3 | # This is an init script for openembedded | ||
4 | # Copy it to /etc/init.d/openldap and type | ||
5 | # > update-rc.d openldap defaults 60 | ||
6 | # | ||
7 | |||
8 | # Source function library. | ||
9 | . /etc/init.d/functions | ||
10 | |||
11 | slapd=/usr/sbin/slapd | ||
12 | test -x "$slapd" || exit 0 | ||
13 | |||
14 | |||
15 | case "$1" in | ||
16 | start) | ||
17 | echo -n "Starting OpenLDAP: " | ||
18 | start-stop-daemon --start --quiet --exec $slapd | ||
19 | echo "." | ||
20 | ;; | ||
21 | stop) | ||
22 | echo -n "Stopping OpenLDAP: " | ||
23 | start-stop-daemon --stop --quiet --pidfile /var/run/slapd.pid | ||
24 | echo "." | ||
25 | ;; | ||
26 | status) | ||
27 | status $slapd; | ||
28 | exit $? | ||
29 | ;; | ||
30 | *) | ||
31 | echo "Usage: /etc/init.d/openldap {start|stop|status}" | ||
32 | exit 1 | ||
33 | esac | ||
34 | |||
35 | exit 0 | ||
diff --git a/meta-oe/recipes-support/openldap/openldap-2.4.39/install-strip.patch b/meta-oe/recipes-support/openldap/openldap-2.4.39/install-strip.patch new file mode 100644 index 000000000..2992b7030 --- /dev/null +++ b/meta-oe/recipes-support/openldap/openldap-2.4.39/install-strip.patch | |||
@@ -0,0 +1,14 @@ | |||
1 | # This patch ensures that the install operations which strip | ||
2 | # programs and libraries (LTINSTALL) work in a cross build | ||
3 | # environment. | ||
4 | --- openldap-2.2.24/.pc/install-strip.patch/build/top.mk 2005-01-20 09:00:55.000000000 -0800 | ||
5 | +++ openldap-2.2.24/build/top.mk 2005-04-16 13:48:20.536710376 -0700 | ||
6 | @@ -116,7 +116,7 @@ | ||
7 | LTLINK_MOD = $(LIBTOOL) $(LTONLY_MOD) --mode=link \ | ||
8 | $(CC) $(LT_CFLAGS) $(LDFLAGS) $(LTFLAGS_MOD) | ||
9 | |||
10 | -LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL) | ||
11 | +LTINSTALL = STRIPPROG="" $(LIBTOOL) --mode=install $(top_srcdir)/contrib/ldapc++/install-sh -c | ||
12 | LTFINISH = $(LIBTOOL) --mode=finish | ||
13 | |||
14 | # Misc UNIX commands used in build environment | ||
diff --git a/meta-oe/recipes-support/openldap/openldap-2.4.39/kill-icu.patch b/meta-oe/recipes-support/openldap/openldap-2.4.39/kill-icu.patch new file mode 100644 index 000000000..dcf541137 --- /dev/null +++ b/meta-oe/recipes-support/openldap/openldap-2.4.39/kill-icu.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> | ||
2 | |||
3 | slapd depends on ICU if it was built first. | ||
4 | |||
5 | Upstream-status: inappropiate [embedded specific] | ||
6 | --- | ||
7 | configure.in | 8 -------- | ||
8 | 1 file changed, 8 deletions(-) | ||
9 | |||
10 | --- openldap-2.4.23.orig/configure.in | ||
11 | +++ openldap-2.4.23/configure.in | ||
12 | @@ -2045,18 +2045,10 @@ if test $ol_enable_ndb != no ; then | ||
13 | SLAPD_LIBS="$SLAPD_LIBS \$(SLAPD_NDB_LIBS)" | ||
14 | fi | ||
15 | fi | ||
16 | |||
17 | dnl ---------------------------------------------------------------- | ||
18 | -dnl International Components for Unicode | ||
19 | -OL_ICU | ||
20 | -if test "$ol_icu" = no ; then | ||
21 | - AC_MSG_WARN([ICU not available]) | ||
22 | -else | ||
23 | - ICU_LIBS="$ol_icu" | ||
24 | -fi | ||
25 | -dnl ---------------------------------------------------------------- | ||
26 | dnl | ||
27 | dnl Check for Cyrus SASL | ||
28 | dnl | ||
29 | WITH_SASL=no | ||
30 | ol_link_sasl=no | ||
diff --git a/meta-oe/recipes-support/openldap/openldap-2.4.39/openldap-2.4.28-gnutls-gcrypt.patch b/meta-oe/recipes-support/openldap/openldap-2.4.39/openldap-2.4.28-gnutls-gcrypt.patch new file mode 100644 index 000000000..c7b1552c1 --- /dev/null +++ b/meta-oe/recipes-support/openldap/openldap-2.4.39/openldap-2.4.28-gnutls-gcrypt.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | From http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-nds/openldap/files/ | ||
2 | |||
3 | Upstream-status: Unknown | ||
4 | |||
5 | -- | ||
6 | |||
7 | --- openldap-2.4.28/configure.in.orig 2012-02-11 22:40:36.004360795 +0000 | ||
8 | +++ openldap-2.4.28/configure.in 2012-02-11 22:40:13.410986851 +0000 | ||
9 | @@ -1214,7 +1214,7 @@ | ||
10 | ol_with_tls=gnutls | ||
11 | ol_link_tls=yes | ||
12 | |||
13 | - TLS_LIBS="-lgnutls" | ||
14 | + TLS_LIBS="-lgnutls -lgcrypt" | ||
15 | |||
16 | AC_DEFINE(HAVE_GNUTLS, 1, | ||
17 | [define if you have GNUtls]) | ||
diff --git a/meta-oe/recipes-support/openldap/openldap-2.4.39/openldap-m4-pthread.patch b/meta-oe/recipes-support/openldap/openldap-2.4.39/openldap-m4-pthread.patch new file mode 100644 index 000000000..b669b7254 --- /dev/null +++ b/meta-oe/recipes-support/openldap/openldap-2.4.39/openldap-m4-pthread.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | --- openldap-2.3.11/build/openldap.m4.orig 2005-11-11 00:11:18.604322590 -0800 | ||
2 | +++ openldap-2.3.11/build/openldap.m4 2005-11-11 00:26:21.621145856 -0800 | ||
3 | @@ -788,7 +788,7 @@ AC_DEFUN([OL_PTHREAD_TEST_FUNCTION],[[ | ||
4 | ]]) | ||
5 | |||
6 | AC_DEFUN([OL_PTHREAD_TEST_PROGRAM], | ||
7 | -AC_LANG_SOURCE([OL_PTHREAD_TEST_INCLUDES | ||
8 | +[AC_LANG_SOURCE([[OL_PTHREAD_TEST_INCLUDES | ||
9 | |||
10 | int main(argc, argv) | ||
11 | int argc; | ||
12 | @@ -796,7 +796,7 @@ int main(argc, argv) | ||
13 | { | ||
14 | OL_PTHREAD_TEST_FUNCTION | ||
15 | } | ||
16 | -])) | ||
17 | +]])]) | ||
18 | dnl -------------------------------------------------------------------- | ||
19 | AC_DEFUN([OL_PTHREAD_TRY], [# Pthread try link: $1 ($2) | ||
20 | if test "$ol_link_threads" = no ; then | ||
diff --git a/meta-oe/recipes-support/openldap/openldap-2.4.39/use-urandom.patch b/meta-oe/recipes-support/openldap/openldap-2.4.39/use-urandom.patch new file mode 100644 index 000000000..e7b988faf --- /dev/null +++ b/meta-oe/recipes-support/openldap/openldap-2.4.39/use-urandom.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | openldap: assume /dev/urandom exists | ||
2 | |||
3 | When we are cross-compiling, we want to assume | ||
4 | that /dev/urandom exists. We could change the source | ||
5 | code to look for it, but this is the easy way out. | ||
6 | |||
7 | Upstream-Status: pending | ||
8 | |||
9 | Signed-off-by: Joe Slater <jslater@windriver.com> | ||
10 | |||
11 | |||
12 | --- a/configure.in | ||
13 | +++ b/configure.in | ||
14 | @@ -2142,8 +2142,8 @@ fi | ||
15 | |||
16 | dnl ---------------------------------------------------------------- | ||
17 | dnl Check for entropy sources | ||
18 | +dev=no | ||
19 | if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then | ||
20 | - dev=no | ||
21 | if test -r /dev/urandom ; then | ||
22 | dev="/dev/urandom"; | ||
23 | elif test -r /idev/urandom ; then | ||
24 | @@ -2156,9 +2156,11 @@ if test $cross_compiling != yes && test | ||
25 | dev="/idev/random"; | ||
26 | fi | ||
27 | |||
28 | - if test $dev != no ; then | ||
29 | - AC_DEFINE_UNQUOTED(URANDOM_DEVICE,"$dev",[set to urandom device]) | ||
30 | - fi | ||
31 | +elif test $cross_compiling == yes ; then | ||
32 | + dev="/dev/urandom"; | ||
33 | +fi | ||
34 | +if test $dev != no ; then | ||
35 | + AC_DEFINE_UNQUOTED(URANDOM_DEVICE,"$dev",[set to urandom device]) | ||
36 | fi | ||
37 | |||
38 | dnl ---------------------------------------------------------------- | ||
diff --git a/meta-oe/recipes-support/openldap/openldap_2.4.39.bb b/meta-oe/recipes-support/openldap/openldap_2.4.39.bb new file mode 100644 index 000000000..8752395fa --- /dev/null +++ b/meta-oe/recipes-support/openldap/openldap_2.4.39.bb | |||
@@ -0,0 +1,216 @@ | |||
1 | # OpenLDAP, a license free (see http://www.OpenLDAP.org/license.html) | ||
2 | # | ||
3 | SUMMARY = "OpenLDAP Directory Service" | ||
4 | DESCRIPTION = "OpenLDAP Software is an open source implementation of the Lightweight Directory Access Protocol." | ||
5 | HOMEPAGE = "http://www.OpenLDAP.org/license.html" | ||
6 | # The OpenLDAP Public License - see the HOMEPAGE - defines | ||
7 | # the license. www.openldap.org claims this is Open Source | ||
8 | # (see http://www.openldap.org), the license appears to be | ||
9 | # basically BSD. opensource.org does not record this license | ||
10 | # at present (so it is apparently not OSI certified). | ||
11 | LICENSE = "OpenLDAP" | ||
12 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=f2bdbaa4f50199a00b6de2ca7ec1db05 \ | ||
13 | file://LICENSE;md5=153d07ef052c4a37a8fac23bc6031972 \ | ||
14 | " | ||
15 | SECTION = "libs" | ||
16 | |||
17 | LDAP_VER = "${@'.'.join(d.getVar('PV',1).split('.')[0:2])}" | ||
18 | |||
19 | SRC_URI = "ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/${BP}.tgz \ | ||
20 | file://openldap-m4-pthread.patch \ | ||
21 | file://kill-icu.patch \ | ||
22 | file://gnutls-Avoid-use-of-deprecated-function.patch \ | ||
23 | file://openldap-2.4.28-gnutls-gcrypt.patch \ | ||
24 | file://ITS-7723-fix-reference-counting.patch \ | ||
25 | file://use-urandom.patch \ | ||
26 | file://initscript \ | ||
27 | " | ||
28 | SRC_URI[md5sum] = "b0d5ee4b252c841dec6b332d679cf943" | ||
29 | SRC_URI[sha256sum] = "8267c87347103fef56b783b24877c0feda1063d3cb85d070e503d076584bf8a7" | ||
30 | |||
31 | DEPENDS = "util-linux groff-native" | ||
32 | |||
33 | # The original top.mk used INSTALL, not INSTALL_STRIP_PROGRAM when | ||
34 | # installing .so and executables, this fails in cross compilation | ||
35 | # environments | ||
36 | SRC_URI += "file://install-strip.patch" | ||
37 | |||
38 | inherit autotools-brokensep update-rc.d | ||
39 | |||
40 | # CV SETTINGS | ||
41 | # Required to work round AC_FUNC_MEMCMP which gets the wrong answer | ||
42 | # when cross compiling (should be in site?) | ||
43 | EXTRA_OECONF += "ac_cv_func_memcmp_working=yes" | ||
44 | |||
45 | # CONFIG DEFINITIONS | ||
46 | # The following is necessary because it cannot be determined for a | ||
47 | # cross compile automagically. Select should yield fine on all OE | ||
48 | # systems... | ||
49 | EXTRA_OECONF += "--with-yielding-select=yes" | ||
50 | # Shared libraries are nice... | ||
51 | EXTRA_OECONF += "--enable-dynamic" | ||
52 | |||
53 | PACKAGECONFIG ??= "gnutls modules \ | ||
54 | bdb hdb ldap meta monitor null passwd shell proxycache dnssrv \ | ||
55 | " | ||
56 | #--with-tls with TLS/SSL support auto|openssl|gnutls [auto] | ||
57 | PACKAGECONFIG[gnutls] = "--with-tls=gnutls,,gnutls libgcrypt" | ||
58 | PACKAGECONFIG[openssl] = "--with-tls=openssl,,openssl" | ||
59 | |||
60 | PACKAGECONFIG[sasl] = "--with-cyrus-sasl,--without-cyrus-sasl,cyrus-sasl" | ||
61 | PACKAGECONFIG[modules] = "lt_cv_dlopen_self=yes --enable-modules,--disable-modules,libtool" | ||
62 | |||
63 | # SLAPD options | ||
64 | # | ||
65 | # UNIX crypt(3) passwd support: | ||
66 | EXTRA_OECONF += "--enable-crypt" | ||
67 | |||
68 | # SLAPD BACKEND | ||
69 | # | ||
70 | # The backend must be set by the configuration. This controls the | ||
71 | # required database. | ||
72 | # | ||
73 | # Backends="bdb dnssrv hdb ldap mdb meta monitor ndb null passwd perl relay shell sock sql" | ||
74 | # | ||
75 | # Note that multiple backends can be built. The ldbm backend requires a | ||
76 | # build-time choice of database API. The bdb backend forces this to be | ||
77 | # DB4. To use the gdbm (or other) API the Berkely database module must | ||
78 | # be removed from the build. | ||
79 | md = "${libexecdir}/openldap" | ||
80 | # | ||
81 | #--enable-bdb enable Berkeley DB backend no|yes|mod yes | ||
82 | # The Berkely DB is the standard choice. This version of OpenLDAP requires | ||
83 | # the version 4 implementation or better. | ||
84 | PACKAGECONFIG[bdb] = "--enable-bdb=yes,--enable-bdb=no,db" | ||
85 | |||
86 | #--enable-dnssrv enable dnssrv backend no|yes|mod no | ||
87 | PACKAGECONFIG[dnssrv] = "--enable-dnssrv=mod,--enable-dnssrv=no" | ||
88 | |||
89 | #--enable-hdb enable Hierarchical DB backend no|yes|mod no | ||
90 | PACKAGECONFIG[hdb] = "--enable-hdb=yes,--enable-hdb=no,db" | ||
91 | |||
92 | #--enable-ldap enable ldap backend no|yes|mod no | ||
93 | PACKAGECONFIG[ldap] = "--enable-ldap=mod,--enable-ldap=no," | ||
94 | |||
95 | #--enable-mdb enable mdb database backend no|yes|mod [yes] | ||
96 | PACKAGECONFIG[mdb] = "--enable-mdb=mod,--enable-mdb=no," | ||
97 | |||
98 | #--enable-meta enable metadirectory backend no|yes|mod no | ||
99 | PACKAGECONFIG[meta] = "--enable-meta=mod,--enable-meta=no," | ||
100 | |||
101 | #--enable-monitor enable monitor backend no|yes|mod yes | ||
102 | PACKAGECONFIG[monitor] = "--enable-monitor=mod,--enable-monitor=no," | ||
103 | |||
104 | #--enable-ndb enable MySQL NDB Cluster backend no|yes|mod [no] | ||
105 | PACKAGECONFIG[ndb] = "--enable-ndb=mod,--enable-ndb=no," | ||
106 | |||
107 | #--enable-null enable null backend no|yes|mod no | ||
108 | PACKAGECONFIG[null] = "--enable-null=mod,--enable-null=no," | ||
109 | |||
110 | #--enable-passwd enable passwd backend no|yes|mod no | ||
111 | PACKAGECONFIG[passwd] = "--enable-passwd=mod,--enable-passwd=no," | ||
112 | |||
113 | #--enable-perl enable perl backend no|yes|mod no | ||
114 | # This requires a loadable perl dynamic library, if enabled without | ||
115 | # doing something appropriate (building perl?) the build will pick | ||
116 | # up the build machine perl - not good (inherit perlnative?) | ||
117 | PACKAGECONFIG[perl] = "--enable-perl=mod,--enable-perl=no,perl" | ||
118 | |||
119 | #--enable-relay enable relay backend no|yes|mod [yes] | ||
120 | PACKAGECONFIG[relay] = "--enable-relay=mod,--enable-relay=no," | ||
121 | |||
122 | #--enable-shell enable shell backend no|yes|mod no | ||
123 | # configure: WARNING: Use of --without-threads is recommended with back-shell | ||
124 | PACKAGECONFIG[shell] = "--enable-shell=mod --without-threads,--enable-shell=no," | ||
125 | |||
126 | #--enable-sock enable sock backend no|yes|mod [no] | ||
127 | PACKAGECONFIG[sock] = "--enable-sock=mod,--enable-sock=no," | ||
128 | |||
129 | #--enable-sql enable sql backend no|yes|mod no | ||
130 | # sql requires some sql backend which provides sql.h, sqlite* provides | ||
131 | # sqlite.h (which may be compatible but hasn't been tried.) | ||
132 | PACKAGECONFIG[sql] = "--enable-sql=mod,--enable-sql=no,sqlite3" | ||
133 | |||
134 | #--enable-dyngroup Dynamic Group overlay no|yes|mod no | ||
135 | # This is a demo, Proxy Cache defines init_module which conflicts with the | ||
136 | # same symbol in dyngroup | ||
137 | PACKAGECONFIG[dyngroup] = "--enable-dyngroup=mod,--enable-dyngroup=no," | ||
138 | |||
139 | #--enable-proxycache Proxy Cache overlay no|yes|mod no | ||
140 | PACKAGECONFIG[proxycache] = "--enable-proxycache=mod,--enable-proxycache=no," | ||
141 | FILES_${PN}-overlay-proxycache = "${md}/pcache-*.so.*" | ||
142 | PACKAGES += "${PN}-overlay-proxycache" | ||
143 | |||
144 | # Append URANDOM_DEVICE='/dev/urandom' to CPPFLAGS: | ||
145 | # This allows tls to obtain random bits from /dev/urandom, by default | ||
146 | # it was disabled for cross-compiling. | ||
147 | CPPFLAGS_append = " -D_GNU_SOURCE -DURANDOM_DEVICE=\'/dev/urandom\'" | ||
148 | |||
149 | do_configure() { | ||
150 | cp ${STAGING_DATADIR_NATIVE}/libtool/config/ltmain.sh ${S}/build | ||
151 | rm -f ${S}/libtool | ||
152 | aclocal | ||
153 | libtoolize --force --copy | ||
154 | gnu-configize | ||
155 | autoconf | ||
156 | oe_runconf | ||
157 | } | ||
158 | |||
159 | LEAD_SONAME = "libldap-${LDAP_VER}.so.*" | ||
160 | |||
161 | # The executables go in a separate package. This allows the | ||
162 | # installation of the libraries with no daemon support. | ||
163 | # Each module also has its own package - see above. | ||
164 | PACKAGES += "${PN}-slapd ${PN}-slurpd ${PN}-bin" | ||
165 | |||
166 | # Package contents - shift most standard contents to -bin | ||
167 | FILES_${PN} = "${libdir}/lib*.so.* ${sysconfdir}/openldap/ldap.* ${localstatedir}/openldap-data" | ||
168 | FILES_${PN}-slapd = "${sysconfdir}/init.d ${libexecdir}/slapd ${sbindir} ${localstatedir}/run ${localstatedir}/volatile/run \ | ||
169 | ${sysconfdir}/openldap/slapd.* ${sysconfdir}/openldap/schema \ | ||
170 | ${sysconfdir}/openldap/DB_CONFIG.example" | ||
171 | FILES_${PN}-slurpd = "${libexecdir}/slurpd ${localstatedir}/openldap-slurp ${localstatedir}/run ${localstatedir}/volatile/run" | ||
172 | FILES_${PN}-bin = "${bindir}" | ||
173 | FILES_${PN}-dev = "${includedir} ${libdir}/lib*.so ${libdir}/*.la ${libdir}/*.a ${libexecdir}/openldap/*.a ${libexecdir}/openldap/*.la ${libexecdir}/openldap/*.so" | ||
174 | FILES_${PN}-dbg += "${libexecdir}/openldap/.debug" | ||
175 | |||
176 | do_install_append() { | ||
177 | install -d ${D}${sysconfdir}/init.d | ||
178 | cat ${WORKDIR}/initscript > ${D}${sysconfdir}/init.d/openldap | ||
179 | chmod 755 ${D}${sysconfdir}/init.d/openldap | ||
180 | # This is duplicated in /etc/openldap and is for slapd | ||
181 | rm -f ${D}${localstatedir}/openldap-data/DB_CONFIG.example | ||
182 | |||
183 | # Installing slapd under ${sbin} is more FHS and LSB compliance | ||
184 | mv ${D}${libexecdir}/slapd ${D}/${sbindir}/slapd | ||
185 | SLAPTOOLS="slapadd slapcat slapdn slapindex slappasswd slaptest slapauth slapacl slapschema" | ||
186 | cd ${D}/${sbindir}/ | ||
187 | rm -f ${SLAPTOOLS} | ||
188 | for i in ${SLAPTOOLS}; do ln -sf slapd $i; done | ||
189 | |||
190 | rmdir "${D}${localstatedir}/run" | ||
191 | rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" | ||
192 | } | ||
193 | |||
194 | INITSCRIPT_PACKAGES = "${PN}-slapd" | ||
195 | INITSCRIPT_NAME_${PN}-slapd = "openldap" | ||
196 | INITSCRIPT_PARAMS_${PN}-slapd = "defaults" | ||
197 | |||
198 | PACKAGES_DYNAMIC += "^${PN}-backends.* ^${PN}-backend-.*" | ||
199 | |||
200 | python populate_packages_prepend () { | ||
201 | backend_dir = d.expand('${libexecdir}/openldap') | ||
202 | do_split_packages(d, backend_dir, 'back_([a-z]*)\-.*\.so\..*$', 'openldap-backend-%s', 'OpenLDAP %s backend', extra_depends='', allow_links=True) | ||
203 | |||
204 | metapkg = "${PN}-backends" | ||
205 | d.setVar('ALLOW_EMPTY_' + metapkg, "1") | ||
206 | d.setVar('FILES_' + metapkg, "") | ||
207 | metapkg_rdepends = [] | ||
208 | packages = d.getVar('PACKAGES', 1).split() | ||
209 | for pkg in packages[1:]: | ||
210 | if pkg.count("openldap-backend-") and not pkg in metapkg_rdepends and not pkg.count("-dev") and not pkg.count("-dbg") and not pkg.count("static") and not pkg.count("locale"): | ||
211 | metapkg_rdepends.append(pkg) | ||
212 | d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends)) | ||
213 | d.setVar('DESCRIPTION_' + metapkg, 'OpenLDAP backends meta package') | ||
214 | packages.append(metapkg) | ||
215 | d.setVar('PACKAGES', ' '.join(packages)) | ||
216 | } | ||