summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended
diff options
context:
space:
mode:
authoralperak <alperyasinak1@gmail.com>2023-12-01 19:03:09 +0300
committerKhem Raj <raj.khem@gmail.com>2023-12-01 08:48:58 -0800
commitd3bd2ddf192dfd1ca3326975cdfd8833deb6677b (patch)
treeb0f81e2c5586c6c65e23a0c7fca255e354524bac /meta-oe/recipes-extended
parentb1d55efe056c5f66dd77ef2e6bf67203300db6dc (diff)
downloadmeta-openembedded-d3bd2ddf192dfd1ca3326975cdfd8833deb6677b.tar.gz
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 <alperyasinak1@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended')
-rw-r--r--meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch72
-rw-r--r--meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb (renamed from meta-oe/recipes-extended/libpwquality/libpwquality_1.4.4.bb)27
2 files changed, 12 insertions, 87 deletions
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 2cbdd6c74..000000000
--- a/meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch
+++ /dev/null
@@ -1,72 +0,0 @@
1Do not use fgetpwent_r
2
3fgetpwent_r does not exist on musl
4
5Source: https://git.alpinelinux.org/aports/tree/community/libpwquality/0001-fix-musl-build.patch
6Upstream-Status: Pending
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8--- a/src/pam_pwquality.c
9+++ b/src/pam_pwquality.c
10@@ -19,6 +19,7 @@
11 #include <stdio.h>
12 #include <pwd.h>
13 #include <errno.h>
14+#include <security/pam_modutil.h>
15 #include "pwquality.h"
16
17 /*
18@@ -43,8 +44,6 @@ struct module_options {
19
20 #define CO_RETRY_TIMES 1
21
22-#define PATH_PASSWD "/etc/passwd"
23-
24 static int
25 _pam_parse (pam_handle_t *pamh, struct module_options *opt,
26 int argc, const char **argv)
27@@ -98,44 +97,7 @@ static int
28 check_local_user (pam_handle_t *pamh,
29 const char *user)
30 {
31- struct passwd pw, *pwp;
32- char buf[4096];
33- int found = 0;
34- FILE *fp;
35- int errn;
36-
37- fp = fopen(PATH_PASSWD, "r");
38- if (fp == NULL) {
39- pam_syslog(pamh, LOG_ERR, "unable to open %s: %s",
40- PATH_PASSWD, pam_strerror(pamh, errno));
41- return -1;
42- }
43-
44- for (;;) {
45- errn = fgetpwent_r(fp, &pw, buf, sizeof (buf), &pwp);
46- if (errn == ERANGE) {
47- pam_syslog(pamh, LOG_WARNING, "%s contains very long lines; corrupted?",
48- PATH_PASSWD);
49- /* we can continue here as next call will read further */
50- continue;
51- }
52- if (errn != 0)
53- break;
54- if (strcmp(pwp->pw_name, user) == 0) {
55- found = 1;
56- break;
57- }
58- }
59-
60- fclose (fp);
61-
62- if (errn != 0 && errn != ENOENT) {
63- pam_syslog(pamh, LOG_ERR, "unable to enumerate local accounts: %s",
64- pam_strerror(pamh, errn));
65- return -1;
66- } else {
67- return found;
68- }
69+ return pam_modutil_check_user_in_passwd(pamh, user, NULL) == PAM_SUCCESS;
70 }
71
72 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.5.bb
index b50c0f7de..5287430c4 100644
--- a/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.4.bb
+++ b/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb
@@ -1,27 +1,24 @@
1DESCRIPTION = "Library for password quality checking and generating random passwords" 1DESCRIPTION = "Library for password quality checking and generating random passwords"
2HOMEPAGE = "https://github.com/libpwquality/libpwquality" 2HOMEPAGE = "https://github.com/libpwquality/libpwquality"
3SECTION = "devel/lib" 3SECTION = "devel/lib"
4LICENSE = "GPL-2.0-only" 4
5LICENSE = "GPL-2.0-or-later"
5LIC_FILES_CHKSUM = "file://COPYING;md5=6bd2f1386df813a459a0c34fde676fc2" 6LIC_FILES_CHKSUM = "file://COPYING;md5=6bd2f1386df813a459a0c34fde676fc2"
6 7
7SRCNAME = "libpwquality" 8DEPENDS = "cracklib"
8SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/${SRCNAME}-${PV}/${SRCNAME}-${PV}.tar.bz2 \ 9
10SRC_URI = "git://github.com/libpwquality/libpwquality;branch=master;protocol=https \
9 file://add-missing-python-include-dir-for-cross.patch \ 11 file://add-missing-python-include-dir-for-cross.patch \
10" 12"
11SRC_URI:append:libc-musl = " file://0001-fix-musl-build.patch " 13SRCREV = "5490e96a3dd6ed7371435ca5b3ccef98bdb48b5a"
12
13SRC_URI[md5sum] = "1fe43f6641dbf1e1766e2a02cf68a9c3"
14SRC_URI[sha256sum] = "d43baf23dc6887fe8f8e9b75cabaabc5f4bbbaa0f9eff44278d276141752a545"
15
16UPSTREAM_CHECK_URI = "https://github.com/libpwquality/libpwquality/releases"
17
18S = "${WORKDIR}/${SRCNAME}-${PV}"
19 14
20DEPENDS = "cracklib virtual/gettext" 15S = "${WORKDIR}/git"
21 16
22inherit autotools setuptools3-base gettext 17inherit autotools-brokensep gettext setuptools3-base
23 18
24B = "${S}" 19do_configure:prepend() {
20 cp ${STAGING_DATADIR_NATIVE}/gettext/ABOUT-NLS ${AUTOTOOLS_AUXDIR}/
21}
25 22
26export PYTHON_DIR 23export PYTHON_DIR
27export BUILD_SYS 24export BUILD_SYS
@@ -35,7 +32,7 @@ EXTRA_OECONF += "--with-python-rev=${PYTHON_BASEVERSION} \
35" 32"
36 33
37PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" 34PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
38PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam" 35PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam"
39 36
40FILES:${PN} += "${base_libdir}/security/pam_pwquality.so" 37FILES:${PN} += "${base_libdir}/security/pam_pwquality.so"
41FILES:${PN}-dbg += "${base_libdir}/security/.debug" 38FILES:${PN}-dbg += "${base_libdir}/security/.debug"