From patchwork Wed Nov 23 09:21:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 83587 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp2540943qge; Wed, 23 Nov 2016 01:36:58 -0800 (PST) X-Received: by 10.84.164.231 with SMTP id l36mr4726744plg.33.1479893818021; Wed, 23 Nov 2016 01:36:58 -0800 (PST) Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id 3si32837140pfh.232.2016.11.23.01.36.57; Wed, 23 Nov 2016 01:36:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 0A18071B4A; Wed, 23 Nov 2016 09:36:00 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) by mail.openembedded.org (Postfix) with ESMTP id 1419071A8B for ; Wed, 23 Nov 2016 09:22:26 +0000 (UTC) Received: by mail-pg0-f66.google.com with SMTP id x23so663747pgx.3 for ; Wed, 23 Nov 2016 01:22:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=w/cZegccxTGeHLOFIucRUT54CDoFZUP7h6HMCZI/wPA=; b=E2+N6PFFUiI4i4aA09Pbl7wq8PcDESOFKYUZVq0hasz0YgUrUJPVVt6uhC8izOVyCl rE9FX4aMuHug2zP/VdGpV3xBtC7l+6GguYOb9cVkxsdmMf/8HYo/N/ceMPN0bDYUFfR+ 2BQL34A1uQAhh+Y8OjdMlQ4Lm+i92qRv3eomAiMFBt9oS9nPd7N4gKKgadOPHhjdjTaC /AC/GogL/UMPuxfrBoHLZBhOKI5Cw6S/0RBpoC8Cf4bYXzQtunGpIDcalyqWh7eleXIe 9S0PmQK/BCHPd2dgPzHRikzk/mH7iqWagyi5Nr7eFErnQ8GptV+lvJYZQ70KepTZRZ9j mTEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=w/cZegccxTGeHLOFIucRUT54CDoFZUP7h6HMCZI/wPA=; b=Hq20ZfvW7qOW0xIouya56IfmuhUaAes9rkJurmJH79C8IMShdg3uXATldp5u7WUu1p 1Gjo0jh8iDXZ3MCAVnI3x9hW8jcr6HjdAdztSQ8bUOuMnLiqslHeBrlmFgCsK8qsvvRl v30hOUWT4Sov66F9Q0gYson96z1KpdSLQKGjUEtpPPwHv3NZaGN55GVRiVTNAYvfgXyn Fg/CKU6lNYCfQb+YqCv5CBnlhKe57KH1lmoF2acrr5FTJdly+QoruDj0R2XZ4VnreyYb npWgLcjf9IMS0Ia8fD+79U3WVW1w0KL7FuQVZvG8vuHucEunOSCCFwtc1Yn2yTk4nCB0 C+ig== X-Gm-Message-State: AKaTC03F4rk+2vD3Jdu0fYvoLV423YGdQfL8EmJuYTfrN1OHL+LwX1plTI5dJF2cCiM9Bg== X-Received: by 10.84.197.1 with SMTP id m1mr4521102pld.75.1479892948485; Wed, 23 Nov 2016 01:22:28 -0800 (PST) Received: from localhost.localdomain (c-76-102-32-192.hsd1.ca.comcast.net. [76.102.32.192]) by smtp.gmail.com with ESMTPSA id u23sm51056087pfg.86.2016.11.23.01.22.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Nov 2016 01:22:28 -0800 (PST) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Wed, 23 Nov 2016 01:21:35 -0800 Message-Id: <20161123092209.23699-15-raj.khem@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161123092209.23699-1-raj.khem@gmail.com> References: <20161123092209.23699-1-raj.khem@gmail.com> Subject: [oe] [meta-networking][PATCH 15/49] samba: Fix build with musl X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: openembedded-devel@lists.openembedded.org MIME-Version: 1.0 Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- .../samba/samba-4.4.5/samba-4.2.7-pam.patch | 36 +++++++++ .../samba-4.3.9-remove-getpwent_r.patch | 87 ++++++++++++++++++++++ .../recipes-connectivity/samba/samba_4.4.5.bb | 7 ++ 3 files changed, 130 insertions(+) create mode 100644 meta-networking/recipes-connectivity/samba/samba-4.4.5/samba-4.2.7-pam.patch create mode 100644 meta-networking/recipes-connectivity/samba/samba-4.4.5/samba-4.3.9-remove-getpwent_r.patch -- 2.10.2 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-networking/recipes-connectivity/samba/samba-4.4.5/samba-4.2.7-pam.patch b/meta-networking/recipes-connectivity/samba/samba-4.4.5/samba-4.2.7-pam.patch new file mode 100644 index 0000000..6b9ade9 --- /dev/null +++ b/meta-networking/recipes-connectivity/samba/samba-4.4.5/samba-4.2.7-pam.patch @@ -0,0 +1,36 @@ +Lifted from gentoo and ported to 4.4.5 + +http://data.gpo.zugaina.org/musl/net-fs/samba/files/samba-4.2.7-pam.patch + +Signed-off-by: Khem Raj + + +Index: samba-4.4.5/source3/wscript +=================================================================== +--- samba-4.4.5.orig/source3/wscript ++++ samba-4.4.5/source3/wscript +@@ -873,7 +873,7 @@ msg.msg_accrightslen = sizeof(fd); + if conf.env.with_iconv: + conf.DEFINE('HAVE_ICONV', 1) + +- if Options.options.with_pam: ++ if Options.options.with_pam != False: + use_pam=True + conf.CHECK_HEADERS('security/pam_appl.h pam/pam_appl.h') + if not conf.CONFIG_SET('HAVE_SECURITY_PAM_APPL_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_APPL_H'): +@@ -945,6 +945,15 @@ int i; i = PAM_RADIO_TYPE; + if use_pam: + conf.DEFINE('WITH_PAM', 1) + conf.DEFINE('WITH_PAM_MODULES', 1) ++ else: ++ Logs.warn("PAM disabled") ++ use_pam=False ++ conf.undefine('WITH_PAM') ++ conf.undefine('WITH_PAM_MODULES') ++ conf.undefine('HAVE_SECURITY_PAM_APPL_H') ++ conf.undefine('PAM_RHOST') ++ conf.undefine('PAM_TTY') ++ conf.undefine('HAVE_PAM_PAM_APPL_H') + + seteuid = False + diff --git a/meta-networking/recipes-connectivity/samba/samba-4.4.5/samba-4.3.9-remove-getpwent_r.patch b/meta-networking/recipes-connectivity/samba/samba-4.4.5/samba-4.3.9-remove-getpwent_r.patch new file mode 100644 index 0000000..71db99c --- /dev/null +++ b/meta-networking/recipes-connectivity/samba/samba-4.4.5/samba-4.3.9-remove-getpwent_r.patch @@ -0,0 +1,87 @@ +Musl does not have _r versions of getent() and getpwent() APIs + +Taken from gentoo +http://data.gpo.zugaina.org/musl/net-fs/samba/files/samba-4.3.9-remove-getpwent_r.patch + +Signed-off-by: Khem Raj + +Index: samba-4.4.5/source4/torture/local/nss_tests.c +=================================================================== +--- samba-4.4.5.orig/source4/torture/local/nss_tests.c ++++ samba-4.4.5/source4/torture/local/nss_tests.c +@@ -247,7 +247,6 @@ static bool test_getgrnam_r(struct tortu + return true; + } + +- + static bool test_getgrgid(struct torture_context *tctx, + gid_t gid, + struct group *grp_p) +@@ -333,6 +332,7 @@ static bool test_enum_passwd(struct tort + return true; + } + ++#if HAVE_GETPWENT_R + static bool test_enum_r_passwd(struct torture_context *tctx, + struct passwd **pwd_array_p, + size_t *num_pwd_p) +@@ -381,6 +381,7 @@ static bool test_enum_r_passwd(struct to + + return true; + } ++#endif + + static bool torture_assert_passwd_equal(struct torture_context *tctx, + const struct passwd *p1, +@@ -432,7 +433,7 @@ static bool test_passwd_r(struct torture + struct passwd *pwd, pwd1, pwd2; + size_t num_pwd; + +- torture_assert(tctx, test_enum_r_passwd(tctx, &pwd, &num_pwd), ++ torture_assert(tctx, test_enum_passwd(tctx, &pwd, &num_pwd), + "failed to enumerate passwd"); + + for (i=0; i < num_pwd; i++) { +@@ -460,7 +461,7 @@ static bool test_passwd_r_cross(struct t + struct passwd *pwd, pwd1, pwd2, pwd3, pwd4; + size_t num_pwd; + +- torture_assert(tctx, test_enum_r_passwd(tctx, &pwd, &num_pwd), ++ torture_assert(tctx, test_enum_passwd(tctx, &pwd, &num_pwd), + "failed to enumerate passwd"); + + for (i=0; i < num_pwd; i++) { +@@ -531,6 +532,7 @@ static bool test_enum_group(struct tortu + return true; + } + ++#if HAVE_GETGRENT_R + static bool test_enum_r_group(struct torture_context *tctx, + struct group **grp_array_p, + size_t *num_grp_p) +@@ -579,6 +581,7 @@ static bool test_enum_r_group(struct tor + + return true; + } ++#endif + + static bool torture_assert_group_equal(struct torture_context *tctx, + const struct group *g1, +@@ -635,7 +638,7 @@ static bool test_group_r(struct torture_ + struct group *grp, grp1, grp2; + size_t num_grp; + +- torture_assert(tctx, test_enum_r_group(tctx, &grp, &num_grp), ++ torture_assert(tctx, test_enum_group(tctx, &grp, &num_grp), + "failed to enumerate group"); + + for (i=0; i < num_grp; i++) { +@@ -663,7 +666,7 @@ static bool test_group_r_cross(struct to + struct group *grp, grp1, grp2, grp3, grp4; + size_t num_grp; + +- torture_assert(tctx, test_enum_r_group(tctx, &grp, &num_grp), ++ torture_assert(tctx, test_enum_group(tctx, &grp, &num_grp), + "failed to enumerate group"); + + for (i=0; i < num_grp; i++) { diff --git a/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb b/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb index e9694d4..a27bcd1 100644 --- a/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb +++ b/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb @@ -20,6 +20,10 @@ SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \ file://0006-avoid-using-colon-in-the-checking-msg.patch \ file://volatiles.03_samba \ " +SRC_URI_append_libc-musl = " \ + file://samba-4.2.7-pam.patch \ + file://samba-4.3.9-remove-getpwent_r.patch \ + " SRC_URI[md5sum] = "6950c5e9f7bdeb8a610c2ca957a15be4" SRC_URI[sha256sum] = "b876ef2e63f66265490e80a122e66ef2d7616112b839df68f56ac2e1ce17a7bd" @@ -29,6 +33,9 @@ inherit systemd waf-samba cpan-base perlnative update-rc.d RDEPENDS_${PN}_remove = "perl" DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb krb5 libbsd libaio libpam" +DEPENDS_append_libc-musl = " libtirpc" +CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc" +LDFLAGS_append_libc-musl = " -ltirpc" SYSVINITTYPE_linuxstdbase = "lsb" SYSVINITTYPE = "sysv"