Surfaced when building with musl This details are in patch headers
Enabel innetgr.patch for musl as well

Signed-off-by: Khem Raj <raj.k...@gmail.com>
---
 .../pam/libpam/crypt_configure.patch               | 31 ++++++++++++++++++++++
 meta/recipes-extended/pam/libpam_1.1.6.bb          |  6 +++--
 2 files changed, 35 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-extended/pam/libpam/crypt_configure.patch

diff --git a/meta/recipes-extended/pam/libpam/crypt_configure.patch 
b/meta/recipes-extended/pam/libpam/crypt_configure.patch
new file mode 100644
index 0000000..efa82fb
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/crypt_configure.patch
@@ -0,0 +1,31 @@
+This patch fixes a case where it find crypt defined in libc (musl) but
+not in specified libraries then it ends up assigning
+
+LIBCRYPT="-l" which then goes into makefile cause all sort of problems
+e.g.
+
+ld: cannot find -l-m32
+| collect2: error: ld returned 1 exit status
+
+The reason is that -l appears on commandline with out any library and
+compiler treats the next argument as library name whatever it is.
+
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.k...@gmail.com>
+
+Index: Linux-PAM-1.1.6/configure.in
+===================================================================
+--- Linux-PAM-1.1.6.org/configure.in
++++ Linux-PAM-1.1.6/configure.in
+@@ -400,7 +400,9 @@ AS_IF([test "x$ac_cv_header_xcrypt_h" =
+   [crypt_libs="crypt"])
+ 
+ BACKUP_LIBS=$LIBS
+-AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="-l$ac_lib", LIBCRYPT="")
++AC_SEARCH_LIBS([crypt],[$crypt_libs],
++             [test "$ac_cv_search_crypt" = "none required" ||
++              LIBCRYPT="$ac_cv_search_crypt"])
+ AC_CHECK_FUNCS(crypt_r crypt_gensalt_r)
+ LIBS=$BACKUP_LIBS
+ AC_SUBST(LIBCRYPT)
diff --git a/meta/recipes-extended/pam/libpam_1.1.6.bb 
b/meta/recipes-extended/pam/libpam_1.1.6.bb
index b3b39da..d347bdc 100644
--- a/meta/recipes-extended/pam/libpam_1.1.6.bb
+++ b/meta/recipes-extended/pam/libpam_1.1.6.bb
@@ -4,7 +4,7 @@ HOMEPAGE = "https://fedorahosted.org/linux-pam/";
 BUGTRACKER = "https://fedorahosted.org/linux-pam/newticket";
 SECTION = "base"
 # PAM is dual licensed under GPL and BSD.
-# /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time 
+# /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time
 # libpam-runtime-1.0.1 is GPLv2+), by openembedded
 LICENSE = "GPLv2+ | BSD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3"
@@ -27,11 +27,13 @@ SRC_URI = 
"http://linux-pam.org/library/Linux-PAM-${PV}.tar.bz2 \
            file://pam-unix-nullok-secure.patch \
            file://pam_timestamp-fix-potential-directory-traversal-issu.patch \
            file://libpam-xtests-remove-bash-dependency.patch \
+           file://crypt_configure.patch \
           "
 SRC_URI[md5sum] = "7b73e58b7ce79ffa321d408de06db2c4"
 SRC_URI[sha256sum] = 
"bab887d6280f47fc3963df3b95735a27a16f0f663636163ddf3acab5f1149fc2"
 
 SRC_URI_append_libc-uclibc = " file://pam-no-innetgr.patch"
+SRC_URI_append_libc-musl = " file://pam-no-innetgr.patch"
 
 DEPENDS = "bison flex flex-native cracklib"
 
@@ -145,7 +147,7 @@ do_install() {
        install -d ${D}${sysconfdir}/default/volatiles
        install -m 0644 ${WORKDIR}/99_pam ${D}${sysconfdir}/default/volatiles
 
-       install -d ${D}${sysconfdir}/pam.d/     
+       install -d ${D}${sysconfdir}/pam.d/
        install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
 
        # The lsb requires unix_chkpwd has setuid permission
-- 
2.1.4

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to