summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorRoy.Li <rongqing.li@windriver.com>2013-07-19 14:29:31 +0800
committerJoe MacDonald <joe.macdonald@windriver.com>2013-07-19 08:26:55 -0400
commitfe85f4980e7c7c35df8fc6b93431c125577dd643 (patch)
tree527567de7d36407e894b95d5fdb276903476eecb /meta-networking
parent5102691729fe8371fee0fefd55694f122e412ef0 (diff)
downloadmeta-openembedded-fe85f4980e7c7c35df8fc6b93431c125577dd643.tar.gz
cyrus-sasl: several fixes
1. Fix hardcoded libdir 2. configure cyrus-sasl based on PACKAGECONFIG 3. create user by inherit useradd 4. add -fPIC to CFLAG to fix the below building failure: ld: ../sasldb/.libs/libsasldb.a(db_berkeley.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC ../sasldb/.libs/libsasldb.a(db_berkeley.o): could not read symbols: Bad value The cause is that libsasldb.a is built twice since {.c.o: and .c.lo} co-exist, one with -fPIC, other without -fPIC. if no -fPIC library follows behind, this error will appear. so we enable -fPIC no matter whatever objects are built. 5. The version of db in oe-core is 5.0 Signed-off-by: Roy.Li <rongqing.li@windriver.com> Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb31
-rw-r--r--meta-networking/recipes-daemons/cyrus-sasl/files/Fix-hardcoded-libdir.patch25
2 files changed, 51 insertions, 5 deletions
diff --git a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb
index 431154013..7dcef26db 100644
--- a/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb
+++ b/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb
@@ -5,21 +5,39 @@ LICENSE = "BSD"
5LIC_FILES_CHKSUM = "file://COPYING;md5=3f55e0974e3d6db00ca6f57f2d206396" 5LIC_FILES_CHKSUM = "file://COPYING;md5=3f55e0974e3d6db00ca6f57f2d206396"
6 6
7SRC_URI = "ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-${PV}.tar.gz \ 7SRC_URI = "ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-${PV}.tar.gz \
8 file://avoid-to-call-AC_TRY_RUN.patch" 8 file://avoid-to-call-AC_TRY_RUN.patch \
9 file://Fix-hardcoded-libdir.patch"
9 10
10inherit autotools pkgconfig 11inherit autotools pkgconfig useradd
11 12
12EXTRA_OECONF += "--with-dblib=berkeley \ 13EXTRA_OECONF += "--with-dblib=berkeley \
13 --with-bdb-libdir=${STAGING_LIBDIR} \ 14 --with-bdb-libdir=${STAGING_LIBDIR} \
14 --with-bdb-incdir=${STAGING_INCDIR} \ 15 --with-bdb-incdir=${STAGING_INCDIR} \
15 --without-pam --without-opie --without-des \ 16 --with-bdb=db-5.3 \
17 --with-plugindir="${libdir}/sasl2/" \
16 andrew_cv_runpath_switch=none" 18 andrew_cv_runpath_switch=none"
17 19
18PACKAGECONFIG ??= "" 20PACKAGECONFIG ??= "ntlm \
21 ${@base_contains('DISTRO_FEATURES', 'ldap', 'ldap', '', d)} \
22 ${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
23 "
19PACKAGECONFIG[gssapi] = "--enable-gssapi=yes,--enable-gssapi=no,krb5," 24PACKAGECONFIG[gssapi] = "--enable-gssapi=yes,--enable-gssapi=no,krb5,"
25PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,"
26PACKAGECONFIG[opie] = "--with-opie,--without-opie,opie,"
27PACKAGECONFIG[des] = "--with-des,--without-des,,"
28PACKAGECONFIG[ldap] = "--with-ldap=${STAGING_LIBDIR} --enable-ldapdb,--without-ldap --disable-ldapdb,openldap,"
29PACKAGECONFIG[ntlm] = "--with-ntlm,--without-ntlm,,"
30
31CFLAGS += "-fPIC"
20 32
21do_configure_prepend () { 33do_configure_prepend () {
22 rm -f acinclude.m4 config/libtool.m4 34 rm -f acinclude.m4 config/libtool.m4
35
36 # make it be able to work with db 5.0 version
37 local sed_files="sasldb/db_berkeley.c utils/dbconverter-2.c"
38 for sed_file in $sed_files; do
39 sed -i 's#DB_VERSION_MAJOR == 4.*#(&) || DB_VERSION_MAJOR == 5#' $sed_file
40 done
23} 41}
24 42
25do_compile_prepend () { 43do_compile_prepend () {
@@ -29,8 +47,11 @@ do_compile_prepend () {
29 cd .. 47 cd ..
30} 48}
31 49
50USERADD_PACKAGES = "${PN}-bin"
51GROUPADD_PARAM_${PN}-bin = "--system mail"
52USERADD_PARAM_${PN}-bin = "--system --home=/var/spool/mail -g mail cyrus"
53
32pkg_postinst_${PN}-bin () { 54pkg_postinst_${PN}-bin () {
33 grep cyrus /etc/passwd || adduser --disabled-password --home=/var/spool/mail --ingroup mail -g "Cyrus sasl" cyrus
34 echo "cyrus" | saslpasswd2 -p -c cyrus 55 echo "cyrus" | saslpasswd2 -p -c cyrus
35 chgrp mail /etc/sasldb2 56 chgrp mail /etc/sasldb2
36} 57}
diff --git a/meta-networking/recipes-daemons/cyrus-sasl/files/Fix-hardcoded-libdir.patch b/meta-networking/recipes-daemons/cyrus-sasl/files/Fix-hardcoded-libdir.patch
new file mode 100644
index 000000000..3fa8431c3
--- /dev/null
+++ b/meta-networking/recipes-daemons/cyrus-sasl/files/Fix-hardcoded-libdir.patch
@@ -0,0 +1,25 @@
1Fix hardcoded libdir.
2
3Upstream-Status: Pending
4
5Signed-off-by: Roy.Li <rongqing.li@windriver.com>
6---
7 plugins/Makefile.am | 2 +-
8 1 files changed, 1 insertions(+), 1 deletions(-)
9
10diff --git a/plugins/Makefile.am b/plugins/Makefile.am
11index b00915f..25262a1 100644
12--- a/plugins/Makefile.am
13+++ b/plugins/Makefile.am
14@@ -62,7 +62,7 @@ plugindir = @plugindir@
15
16 common_sources = plugin_common.c plugin_common.h
17
18-sasldir = $(prefix)/lib/sasl2
19+sasldir = $(libdir)/sasl2
20 sasl_LTLIBRARIES = @SASL_MECHS@
21 EXTRA_LTLIBRARIES = libplain.la libanonymous.la libkerberos4.la libcrammd5.la \
22 libgs2.la libgssapiv2.la libdigestmd5.la liblogin.la libsrp.la libotp.la \
23--
241.7.4.1
25