diff options
author | alperak <alperyasinak1@gmail.com> | 2023-12-01 19:03:09 +0300 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-12-01 08:48:58 -0800 |
commit | d3bd2ddf192dfd1ca3326975cdfd8833deb6677b (patch) | |
tree | b0f81e2c5586c6c65e23a0c7fca255e354524bac /meta-oe | |
parent | b1d55efe056c5f66dd77ef2e6bf67203300db6dc (diff) | |
download | meta-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')
-rw-r--r-- | meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch | 72 | ||||
-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 @@ | |||
1 | Do not use fgetpwent_r | ||
2 | |||
3 | fgetpwent_r does not exist on musl | ||
4 | |||
5 | Source: https://git.alpinelinux.org/aports/tree/community/libpwquality/0001-fix-musl-build.patch | ||
6 | Upstream-Status: Pending | ||
7 | Signed-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 @@ | |||
1 | DESCRIPTION = "Library for password quality checking and generating random passwords" | 1 | DESCRIPTION = "Library for password quality checking and generating random passwords" |
2 | HOMEPAGE = "https://github.com/libpwquality/libpwquality" | 2 | HOMEPAGE = "https://github.com/libpwquality/libpwquality" |
3 | SECTION = "devel/lib" | 3 | SECTION = "devel/lib" |
4 | LICENSE = "GPL-2.0-only" | 4 | |
5 | LICENSE = "GPL-2.0-or-later" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=6bd2f1386df813a459a0c34fde676fc2" | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=6bd2f1386df813a459a0c34fde676fc2" |
6 | 7 | ||
7 | SRCNAME = "libpwquality" | 8 | DEPENDS = "cracklib" |
8 | SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/${SRCNAME}-${PV}/${SRCNAME}-${PV}.tar.bz2 \ | 9 | |
10 | SRC_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 | " |
11 | SRC_URI:append:libc-musl = " file://0001-fix-musl-build.patch " | 13 | SRCREV = "5490e96a3dd6ed7371435ca5b3ccef98bdb48b5a" |
12 | |||
13 | SRC_URI[md5sum] = "1fe43f6641dbf1e1766e2a02cf68a9c3" | ||
14 | SRC_URI[sha256sum] = "d43baf23dc6887fe8f8e9b75cabaabc5f4bbbaa0f9eff44278d276141752a545" | ||
15 | |||
16 | UPSTREAM_CHECK_URI = "https://github.com/libpwquality/libpwquality/releases" | ||
17 | |||
18 | S = "${WORKDIR}/${SRCNAME}-${PV}" | ||
19 | 14 | ||
20 | DEPENDS = "cracklib virtual/gettext" | 15 | S = "${WORKDIR}/git" |
21 | 16 | ||
22 | inherit autotools setuptools3-base gettext | 17 | inherit autotools-brokensep gettext setuptools3-base |
23 | 18 | ||
24 | B = "${S}" | 19 | do_configure:prepend() { |
20 | cp ${STAGING_DATADIR_NATIVE}/gettext/ABOUT-NLS ${AUTOTOOLS_AUXDIR}/ | ||
21 | } | ||
25 | 22 | ||
26 | export PYTHON_DIR | 23 | export PYTHON_DIR |
27 | export BUILD_SYS | 24 | export BUILD_SYS |
@@ -35,7 +32,7 @@ EXTRA_OECONF += "--with-python-rev=${PYTHON_BASEVERSION} \ | |||
35 | " | 32 | " |
36 | 33 | ||
37 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" | 34 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" |
38 | PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam" | 35 | PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam" |
39 | 36 | ||
40 | FILES:${PN} += "${base_libdir}/security/pam_pwquality.so" | 37 | FILES:${PN} += "${base_libdir}/security/pam_pwquality.so" |
41 | FILES:${PN}-dbg += "${base_libdir}/security/.debug" | 38 | FILES:${PN}-dbg += "${base_libdir}/security/.debug" |