package/linux-pam: add libxcrypt optional dependency
PATCH 1/1 package/linux-pam: add libxcrypt optional dependency
Add libxcrypt optional dependency and fix the following build failure with libxcrypt and uclibc-ng raised since the addition of libxcrypt in commit 464bbe26ff5fb9e5bfe26a26ea65c700b90598f5:
/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabihf/bin/ld: unix_chkpwd-passverify.o: in function `verify_pwd_hash':
passverify.c:(.text+0xab4): undefined reference to `crypt_checksalt'
Fixes:
- http://autobuild.buildroot.org/results/65d68b7c9c7de1c7cb0f941ff9982f93a49a56f8
--- ...0001-configure-test-a-o-is-not-POSIX.patch | 75 +++++++++ ...002-Remove-support-for-legacy-xcrypt.patch | 149 ++++++++++++++++++ ...x-build-with-libxcrypt-and-uclibc-ng.patch | 47 ++++++ package/linux-pam/linux-pam.mk | 3 + 4 files changed, 274 insertions(+) create mode 100644 package/linux-pam/0001-configure-test-a-o-is-not-POSIX.patch create mode 100644 package/linux-pam/0002-Remove-support-for-legacy-xcrypt.patch create mode 100644 package/linux-pam/0003-configure.ac-fix-build-with-libxcrypt-and-uclibc-ng.patch
package/linux-pam/0001-configure-test-a-o-is-not-POSIX.patch new file +75 -0
@@ -0,0 +1,75 @@ +From 7c54428db5b639f05093459b1ba3b77456c5a548 Mon Sep 17 00:00:00 2001 +From: "Issam E. Maghni" <[email protected]> +Date: Wed, 16 Dec 2020 18:48:28 -0500 +Subject: [PATCH] configure: test -a|o is not POSIX + +Fixes `test: too many arguments` when building Linux-PAM using sbase. +This is due to a non-POSIX syntax test ... -a ... and test ... -o .... + +> The XSI extensions specifying the -a and -o binary primaries and the +> '(' and ')' operators have been marked obsolescent. + +See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html + +[Retrieved from: +https://github.com/linux-pam/linux-pam/commit/7c54428db5b639f05093459b1ba3b77456c5a548] +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + configure.ac | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 5eade7cd3..e325bdd3c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -346,7 +346,7 @@ if test x"$WITH_LIBAUDIT" != xno ; then + [HAVE_AUDIT_TTY_STATUS=""], + [#include <libaudit.h>])] + ) +- if test -n "$LIBAUDIT" -a "$ac_cv_header_libaudit_h" != "no" ; then ++ if test -n "$LIBAUDIT" && test "$ac_cv_header_libaudit_h" != "no" ; then + AC_DEFINE([HAVE_LIBAUDIT], 1, [Define to 1 if audit support should be compiled in.]) + fi + if test -n "$HAVE_AUDIT_TTY_STATUS" ; then +@@ -373,12 +373,12 @@ esac + AC_CHECK_FUNCS(crypt_r crypt_gensalt_r) + LIBS=$BACKUP_LIBS + AC_SUBST(LIBCRYPT) +-if test "$LIBCRYPT" = "-lxcrypt" -a "$ac_cv_header_xcrypt_h" = "yes" ; then ++if test "$LIBCRYPT" = "-lxcrypt" && test "$ac_cv_header_xcrypt_h" = "yes" ; then + AC_DEFINE([HAVE_LIBXCRYPT], 1, [Define to 1 if xcrypt support should be compiled in.]) + fi + + AC_ARG_WITH([randomdev], AS_HELP_STRING([--with-randomdev=(<path>|yes|no)],[use specified random device instead of /dev/urandom or 'no' to disable]), opt_randomdev=$withval) +-if test "$opt_randomdev" = yes -o -z "$opt_randomdev"; then ++if test "$opt_randomdev" = yes || test -z "$opt_randomdev"; then + opt_randomdev="/dev/urandom" + elif test "$opt_randomdev" = no; then + opt_randomdev= +@@ -395,7 +395,7 @@ AC_ARG_ENABLE([db], + AC_ARG_WITH([db-uniquename], + AS_HELP_STRING([--with-db-uniquename=extension],[Unique name for db libraries and functions.])) + if test x"$WITH_DB" != xno ; then +- if test x"$WITH_DB" = xyes -o x"$WITH_DB" = xdb ; then ++ if test x"$WITH_DB" = xyes || test x"$WITH_DB" = xdb ; then + old_libs=$LIBS + LIBS="$LIBS -ldb$with_db_uniquename" + AC_CHECK_FUNCS([db_create$with_db_uniquename db_create dbm_store$with_db_uniquename dbm_store], +@@ -572,7 +572,7 @@ fi + + AC_PATH_PROG([FO2PDF], [fop]) + +-AM_CONDITIONAL(ENABLE_REGENERATE_MAN, test x$enable_docu != xno -a x$enable_doc != xno) ++AM_CONDITIONAL(ENABLE_REGENERATE_MAN, test x$enable_docu != xno && test x$enable_doc != xno) + AM_CONDITIONAL(ENABLE_GENERATE_PDF, test -n "$FO2PDF") + + +@@ -625,7 +625,7 @@ esac + AM_CONDITIONAL([COND_BUILD_PAM_KEYINIT], [test "$have_key_syscalls" = 1]) + AM_CONDITIONAL([COND_BUILD_PAM_LASTLOG], [test "$ac_cv_func_logwtmp" = yes]) + AM_CONDITIONAL([COND_BUILD_PAM_NAMESPACE], [test "$ac_cv_func_unshare" = yes]) +-AM_CONDITIONAL([COND_BUILD_PAM_RHOSTS], [test "$ac_cv_func_ruserok_af" = yes -o "$ac_cv_func_ruserok" = yes]) ++AM_CONDITIONAL([COND_BUILD_PAM_RHOSTS], [test "$ac_cv_func_ruserok_af" = yes || test "$ac_cv_func_ruserok" = yes]) + AM_CONDITIONAL([COND_BUILD_PAM_SELINUX], [test -n "$LIBSELINUX"]) + AM_CONDITIONAL([COND_BUILD_PAM_SEPERMIT], [test -n "$LIBSELINUX"]) + AM_CONDITIONAL([COND_BUILD_PAM_SETQUOTA], [test "$ac_cv_func_quotactl" = yes])
package/linux-pam/0002-Remove-support-for-legacy-xcrypt.patch new file +149 -0
149 lines not on this page · raw message
package/linux-pam/0003-configure.ac-fix-build-with-libxcrypt-and-uclibc-ng.patch new file +47 -0
47 lines not on this page · raw message
package/linux-pam/linux-pam.mk +3 -0
@@ -17,11 +17,14 @@ LINUX_PAM_CONF_OPTS = \ --enable-securedir=/lib/security \ --libdir=/lib LINUX_PAM_DEPENDENCIES = flex host-flex host-pkgconf \ + $(if $(BR2_PACKAGE_LIBXCRYPT),libxcrypt) \ $(TARGET_NLS_DEPENDENCIES) LINUX_PAM_LICENSE = BSD-3-Clause LINUX_PAM_LICENSE_FILES = Copyright LINUX_PAM_MAKE_OPTS += LIBS=$(TARGET_NLS_LIBS) LINUX_PAM_CPE_ID_VENDOR = linux-pam +# We're patching configure.ac +LINUX_PAM_AUTORECONF = YES ifeq ($(BR2_PACKAGE_LIBSELINUX),y) LINUX_PAM_CONF_OPTS += --enable-selinux
Signature · 6 lines
2.32.0 _______________________________________________ buildroot mailing list [email protected] http://lists.busybox.net/mailman/listinfo/buildroot
Arnout Vandecappelle
AppliedQuoted 11 lines · Fabrice Fontaine
Add libxcrypt optional dependency and fix the following build failure with libxcrypt and uclibc-ng raised since the addition of libxcrypt in commit
464bbe26ff5fb9e5bfe26a26ea65c700b90598f5:
/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabihf/bin/ld: unix_chkpwd-passverify.o: in function `verify_pwd_hash':
passverify.c:(.text+0xab4): undefined reference to `crypt_checksalt'Fixes:
- http://autobuild.buildroot.org/results/65d68b7c9c7de1c7cb0f941ff9982f93a49a56f8Signed-off-by Fabrice Fontaine <[email protected]>
Applied to master, thanks.
Regards,
Arnout
[snip]
_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Fabrice" == Fabrice Fontaine <[email protected]> writes:
Add libxcrypt optional dependency and fix the following build failure with libxcrypt and uclibc-ng raised since the addition of libxcrypt in commit
464bbe26ff5fb9e5bfe26a26ea65c700b90598f5:
Quoted 7 lines
/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabihf/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabihf/bin/ld: unix_chkpwd-passverify.o: in function `verify_pwd_hash':
passverify.c:(.text+0xab4): undefined reference to `crypt_checksalt'Fixes:
- http://autobuild.buildroot.org/results/65d68b7c9c7de1c7cb0f941ff9982f93a49a56f8Signed-off-by Fabrice Fontaine <[email protected]>
Committed to 2021.05.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot