From d3bd2ddf192dfd1ca3326975cdfd8833deb6677b Mon Sep 17 00:00:00 2001 From: alperak Date: Fri, 1 Dec 2023 19:03:09 +0300 Subject: libpwquality: upgrade 1.4.4 -> 1.4.5 * 0001-fix-musl-build.patch removed because fixed in the new version. -> https://github.com/libpwquality/libpwquality/pull/53 * Copied ABOUT-NLS from native sysroot's gettext manually because of following error -> error: required file './ABOUT-NLS' not found Building from sources need additional steps. Gettextize would have produced this file properly. But, we don't run it as part of autotools bbclass's autoreconf step Instead of creating an empty ABOUT-NLS file, copied it from native sysroot's gettext manually. Changelog: * Translation updates * Minor bug fixes and documentation enhancements Signed-off-by: alperak Signed-off-by: Khem Raj --- .../libpwquality/files/0001-fix-musl-build.patch | 72 ---------------------- .../libpwquality/libpwquality_1.4.4.bb | 43 ------------- .../libpwquality/libpwquality_1.4.5.bb | 40 ++++++++++++ 3 files changed, 40 insertions(+), 115 deletions(-) delete mode 100644 meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch delete mode 100644 meta-oe/recipes-extended/libpwquality/libpwquality_1.4.4.bb create mode 100644 meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb (limited to 'meta-oe') diff --git a/meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch b/meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch deleted file mode 100644 index 2cbdd6c74c..0000000000 --- a/meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch +++ /dev/null @@ -1,72 +0,0 @@ -Do not use fgetpwent_r - -fgetpwent_r does not exist on musl - -Source: https://git.alpinelinux.org/aports/tree/community/libpwquality/0001-fix-musl-build.patch -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- a/src/pam_pwquality.c -+++ b/src/pam_pwquality.c -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - #include "pwquality.h" - - /* -@@ -43,8 +44,6 @@ struct module_options { - - #define CO_RETRY_TIMES 1 - --#define PATH_PASSWD "/etc/passwd" -- - static int - _pam_parse (pam_handle_t *pamh, struct module_options *opt, - int argc, const char **argv) -@@ -98,44 +97,7 @@ static int - check_local_user (pam_handle_t *pamh, - const char *user) - { -- struct passwd pw, *pwp; -- char buf[4096]; -- int found = 0; -- FILE *fp; -- int errn; -- -- fp = fopen(PATH_PASSWD, "r"); -- if (fp == NULL) { -- pam_syslog(pamh, LOG_ERR, "unable to open %s: %s", -- PATH_PASSWD, pam_strerror(pamh, errno)); -- return -1; -- } -- -- for (;;) { -- errn = fgetpwent_r(fp, &pw, buf, sizeof (buf), &pwp); -- if (errn == ERANGE) { -- pam_syslog(pamh, LOG_WARNING, "%s contains very long lines; corrupted?", -- PATH_PASSWD); -- /* we can continue here as next call will read further */ -- continue; -- } -- if (errn != 0) -- break; -- if (strcmp(pwp->pw_name, user) == 0) { -- found = 1; -- break; -- } -- } -- -- fclose (fp); -- -- if (errn != 0 && errn != ENOENT) { -- pam_syslog(pamh, LOG_ERR, "unable to enumerate local accounts: %s", -- pam_strerror(pamh, errn)); -- return -1; -- } else { -- return found; -- } -+ return pam_modutil_check_user_in_passwd(pamh, user, NULL) == PAM_SUCCESS; - } - - PAM_EXTERN int diff --git a/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.4.bb b/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.4.bb deleted file mode 100644 index b50c0f7de7..0000000000 --- a/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.4.bb +++ /dev/null @@ -1,43 +0,0 @@ -DESCRIPTION = "Library for password quality checking and generating random passwords" -HOMEPAGE = "https://github.com/libpwquality/libpwquality" -SECTION = "devel/lib" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=6bd2f1386df813a459a0c34fde676fc2" - -SRCNAME = "libpwquality" -SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/${SRCNAME}-${PV}/${SRCNAME}-${PV}.tar.bz2 \ - file://add-missing-python-include-dir-for-cross.patch \ -" -SRC_URI:append:libc-musl = " file://0001-fix-musl-build.patch " - -SRC_URI[md5sum] = "1fe43f6641dbf1e1766e2a02cf68a9c3" -SRC_URI[sha256sum] = "d43baf23dc6887fe8f8e9b75cabaabc5f4bbbaa0f9eff44278d276141752a545" - -UPSTREAM_CHECK_URI = "https://github.com/libpwquality/libpwquality/releases" - -S = "${WORKDIR}/${SRCNAME}-${PV}" - -DEPENDS = "cracklib virtual/gettext" - -inherit autotools setuptools3-base gettext - -B = "${S}" - -export PYTHON_DIR -export BUILD_SYS -export HOST_SYS - -EXTRA_OECONF += "--with-python-rev=${PYTHON_BASEVERSION} \ - --with-python-binary=${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \ - --with-pythonsitedir=${PYTHON_SITEPACKAGES_DIR} \ - --libdir=${libdir} \ - --with-securedir=${base_libdir}/security \ -" - -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" -PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam" - -FILES:${PN} += "${base_libdir}/security/pam_pwquality.so" -FILES:${PN}-dbg += "${base_libdir}/security/.debug" -FILES:${PN}-staticdev += "${base_libdir}/security/pam_pwquality.a" -FILES:${PN}-dev += "${base_libdir}/security/pam_pwquality.la" diff --git a/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb b/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb new file mode 100644 index 0000000000..5287430c41 --- /dev/null +++ b/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb @@ -0,0 +1,40 @@ +DESCRIPTION = "Library for password quality checking and generating random passwords" +HOMEPAGE = "https://github.com/libpwquality/libpwquality" +SECTION = "devel/lib" + +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=6bd2f1386df813a459a0c34fde676fc2" + +DEPENDS = "cracklib" + +SRC_URI = "git://github.com/libpwquality/libpwquality;branch=master;protocol=https \ + file://add-missing-python-include-dir-for-cross.patch \ +" +SRCREV = "5490e96a3dd6ed7371435ca5b3ccef98bdb48b5a" + +S = "${WORKDIR}/git" + +inherit autotools-brokensep gettext setuptools3-base + +do_configure:prepend() { + cp ${STAGING_DATADIR_NATIVE}/gettext/ABOUT-NLS ${AUTOTOOLS_AUXDIR}/ +} + +export PYTHON_DIR +export BUILD_SYS +export HOST_SYS + +EXTRA_OECONF += "--with-python-rev=${PYTHON_BASEVERSION} \ + --with-python-binary=${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \ + --with-pythonsitedir=${PYTHON_SITEPACKAGES_DIR} \ + --libdir=${libdir} \ + --with-securedir=${base_libdir}/security \ +" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" +PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam" + +FILES:${PN} += "${base_libdir}/security/pam_pwquality.so" +FILES:${PN}-dbg += "${base_libdir}/security/.debug" +FILES:${PN}-staticdev += "${base_libdir}/security/pam_pwquality.a" +FILES:${PN}-dev += "${base_libdir}/security/pam_pwquality.la" -- cgit v1.2.3-54-g00ecf