diff options
author | Khem Raj <raj.khem@gmail.com> | 2015-06-03 09:42:01 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-08 17:34:03 +0100 |
commit | 554e25546f057c020e2fb49ca99c1ef7a83d0b7b (patch) | |
tree | 6999d8e59cc3a1a814bc581e4a8c6ee272a591dd /meta/recipes-extended | |
parent | f73abe5c257cfbfd52ae9db41521822e1119b0c9 (diff) | |
download | poky-554e25546f057c020e2fb49ca99c1ef7a83d0b7b.tar.gz |
libpam: Fix wrong crypt library detection
Surfaced when building with musl This details are in patch headers
Enabel innetgr.patch for musl as well
(From OE-Core rev: 6ec229d8dec6a5978ebf6b264c332590c8be0b3a)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r-- | meta/recipes-extended/pam/libpam/crypt_configure.patch | 31 | ||||
-rw-r--r-- | meta/recipes-extended/pam/libpam_1.1.6.bb | 6 |
2 files changed, 35 insertions, 2 deletions
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 0000000000..efa82fb9b9 --- /dev/null +++ b/meta/recipes-extended/pam/libpam/crypt_configure.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | This patch fixes a case where it find crypt defined in libc (musl) but | ||
2 | not in specified libraries then it ends up assigning | ||
3 | |||
4 | LIBCRYPT="-l" which then goes into makefile cause all sort of problems | ||
5 | e.g. | ||
6 | |||
7 | ld: cannot find -l-m32 | ||
8 | | collect2: error: ld returned 1 exit status | ||
9 | |||
10 | The reason is that -l appears on commandline with out any library and | ||
11 | compiler treats the next argument as library name whatever it is. | ||
12 | |||
13 | |||
14 | Upstream-Status: Pending | ||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | |||
17 | Index: Linux-PAM-1.1.6/configure.in | ||
18 | =================================================================== | ||
19 | --- Linux-PAM-1.1.6.org/configure.in | ||
20 | +++ Linux-PAM-1.1.6/configure.in | ||
21 | @@ -400,7 +400,9 @@ AS_IF([test "x$ac_cv_header_xcrypt_h" = | ||
22 | [crypt_libs="crypt"]) | ||
23 | |||
24 | BACKUP_LIBS=$LIBS | ||
25 | -AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="-l$ac_lib", LIBCRYPT="") | ||
26 | +AC_SEARCH_LIBS([crypt],[$crypt_libs], | ||
27 | + [test "$ac_cv_search_crypt" = "none required" || | ||
28 | + LIBCRYPT="$ac_cv_search_crypt"]) | ||
29 | AC_CHECK_FUNCS(crypt_r crypt_gensalt_r) | ||
30 | LIBS=$BACKUP_LIBS | ||
31 | 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 b3b39da864..d347bdc43b 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/" | |||
4 | BUGTRACKER = "https://fedorahosted.org/linux-pam/newticket" | 4 | BUGTRACKER = "https://fedorahosted.org/linux-pam/newticket" |
5 | SECTION = "base" | 5 | SECTION = "base" |
6 | # PAM is dual licensed under GPL and BSD. | 6 | # PAM is dual licensed under GPL and BSD. |
7 | # /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time | 7 | # /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time |
8 | # libpam-runtime-1.0.1 is GPLv2+), by openembedded | 8 | # libpam-runtime-1.0.1 is GPLv2+), by openembedded |
9 | LICENSE = "GPLv2+ | BSD" | 9 | LICENSE = "GPLv2+ | BSD" |
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3" | 10 | LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3" |
@@ -27,11 +27,13 @@ SRC_URI = "http://linux-pam.org/library/Linux-PAM-${PV}.tar.bz2 \ | |||
27 | file://pam-unix-nullok-secure.patch \ | 27 | file://pam-unix-nullok-secure.patch \ |
28 | file://pam_timestamp-fix-potential-directory-traversal-issu.patch \ | 28 | file://pam_timestamp-fix-potential-directory-traversal-issu.patch \ |
29 | file://libpam-xtests-remove-bash-dependency.patch \ | 29 | file://libpam-xtests-remove-bash-dependency.patch \ |
30 | file://crypt_configure.patch \ | ||
30 | " | 31 | " |
31 | SRC_URI[md5sum] = "7b73e58b7ce79ffa321d408de06db2c4" | 32 | SRC_URI[md5sum] = "7b73e58b7ce79ffa321d408de06db2c4" |
32 | SRC_URI[sha256sum] = "bab887d6280f47fc3963df3b95735a27a16f0f663636163ddf3acab5f1149fc2" | 33 | SRC_URI[sha256sum] = "bab887d6280f47fc3963df3b95735a27a16f0f663636163ddf3acab5f1149fc2" |
33 | 34 | ||
34 | SRC_URI_append_libc-uclibc = " file://pam-no-innetgr.patch" | 35 | SRC_URI_append_libc-uclibc = " file://pam-no-innetgr.patch" |
36 | SRC_URI_append_libc-musl = " file://pam-no-innetgr.patch" | ||
35 | 37 | ||
36 | DEPENDS = "bison flex flex-native cracklib" | 38 | DEPENDS = "bison flex flex-native cracklib" |
37 | 39 | ||
@@ -145,7 +147,7 @@ do_install() { | |||
145 | install -d ${D}${sysconfdir}/default/volatiles | 147 | install -d ${D}${sysconfdir}/default/volatiles |
146 | install -m 0644 ${WORKDIR}/99_pam ${D}${sysconfdir}/default/volatiles | 148 | install -m 0644 ${WORKDIR}/99_pam ${D}${sysconfdir}/default/volatiles |
147 | 149 | ||
148 | install -d ${D}${sysconfdir}/pam.d/ | 150 | install -d ${D}${sysconfdir}/pam.d/ |
149 | install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ | 151 | install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ |
150 | 152 | ||
151 | # The lsb requires unix_chkpwd has setuid permission | 153 | # The lsb requires unix_chkpwd has setuid permission |