[oe] [meta-networking][PATCH 6/6] samba: make cyrus-sasl optional

Jens Rehsack rehsack at gmail.com
Thu Nov 19 19:46:55 UTC 2015


Since waf doesn't allow override check results via environment, a patch
is needed to remove the bad check when an optional feature is unwanted.

Signed-off-by: Jens Rehsack <sno at netbsd.org>
---
 .../samba/samba-4.1.12/21-avoid-sasl-unless-wanted.patch       | 10 ++++++++++
 meta-networking/recipes-connectivity/samba/samba_4.1.12.bb     |  6 ++++--
 2 files changed, 14 insertions(+), 2 deletions(-)
 create mode 100644 meta-networking/recipes-connectivity/samba/samba-4.1.12/21-avoid-sasl-unless-wanted.patch

diff --git a/meta-networking/recipes-connectivity/samba/samba-4.1.12/21-avoid-sasl-unless-wanted.patch b/meta-networking/recipes-connectivity/samba/samba-4.1.12/21-avoid-sasl-unless-wanted.patch
new file mode 100644
index 0000000..4254e11
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba-4.1.12/21-avoid-sasl-unless-wanted.patch
@@ -0,0 +1,10 @@
+--- ./source4/auth/wscript_configure.orig	2015-11-19 19:53:11.022212181 +0100
++++ ./source4/auth/wscript_configure	2015-11-19 19:53:17.466212205 +0100
+@@ -2,7 +2,3 @@
+ 
+ conf.CHECK_HEADERS('security/pam_appl.h')
+ conf.CHECK_FUNCS_IN('pam_start', 'pam', checklibc=True)
+-
+-if (conf.CHECK_HEADERS('sasl/sasl.h') and
+-    conf.CHECK_FUNCS_IN('sasl_client_init', 'sasl2')):
+-    conf.DEFINE('HAVE_SASL', 1)
diff --git a/meta-networking/recipes-connectivity/samba/samba_4.1.12.bb b/meta-networking/recipes-connectivity/samba/samba_4.1.12.bb
index a2d3a2c..75cf5d2 100644
--- a/meta-networking/recipes-connectivity/samba/samba_4.1.12.bb
+++ b/meta-networking/recipes-connectivity/samba/samba_4.1.12.bb
@@ -40,8 +40,7 @@ SRC_URI[sha256sum] = "033604674936bf5c77d7df299b0626052b84a41505a6a6afe902f6274f
 
 inherit systemd waf-samba cpan-base perlnative
 
-DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb krb5 ctdb libbsd cyrus-sasl"
-
+DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb krb5 ctdb libbsd"
 
 SYSVINITTYPE_linuxstdbase = "lsb"
 SYSVINITTYPE = "sysv"
@@ -62,10 +61,13 @@ PACKAGECONFIG[pam] = "--with-pam --with-pam_smbpass --with-pammodulesdir=${base_
 PACKAGECONFIG[lsb] = ",,lsb"
 PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups"
 PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
+PACKAGECONFIG[sasl] = ",,cyrus-sasl"
 PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd"
 PACKAGECONFIG[dmapi] = "--with-dmapi,--without-dmapi,dmapi"
 PACKAGECONFIG[zeroconf] = "--enable-avahi,--disable-avahi,avahi"
 
+SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'sasl', '', 'file://21-avoid-sasl-unless-wanted.patch', d)}"
+
 SAMBA4_IDMAP_MODULES="idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2"
 SAMBA4_PDB_MODULES="pdb_tdbsam,${@bb.utils.contains('PACKAGECONFIG', 'ldap', 'pdb_ldap,', '', d)}pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4"
 SAMBA4_AUTH_MODULES="auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4"
-- 
1.9.1

-- 
Jens Rehsack - rehsack at gmail.com




More information about the Openembedded-devel mailing list