From 8257d87d2d5fba22ecf5c70cc5f7322087ac50b1 Mon Sep 17 00:00:00 2001 From: Wang Mingyu Date: Fri, 7 Jul 2023 13:49:31 +0800 Subject: passwdqc: upgrade 2.0.2 -> 2.0.3 makefile-add-ldflags.patch refreshed for 2.0.3 Changelog: =========== -Added pkg-config file. -Changed enforce=users to support "chpasswd" PAM service in addition to traditionally supported "passwd". Signed-off-by: Wang Mingyu Signed-off-by: Khem Raj --- .../passwdqc/passwdqc/makefile-add-ldflags.patch | 13 ++++- .../recipes-security/passwdqc/passwdqc_2.0.2.bb | 65 ---------------------- .../recipes-security/passwdqc/passwdqc_2.0.3.bb | 65 ++++++++++++++++++++++ 3 files changed, 77 insertions(+), 66 deletions(-) delete mode 100644 meta-oe/recipes-security/passwdqc/passwdqc_2.0.2.bb create mode 100644 meta-oe/recipes-security/passwdqc/passwdqc_2.0.3.bb diff --git a/meta-oe/recipes-security/passwdqc/passwdqc/makefile-add-ldflags.patch b/meta-oe/recipes-security/passwdqc/passwdqc/makefile-add-ldflags.patch index 6e4803f4f3..4e9659aa58 100644 --- a/meta-oe/recipes-security/passwdqc/passwdqc/makefile-add-ldflags.patch +++ b/meta-oe/recipes-security/passwdqc/passwdqc/makefile-add-ldflags.patch @@ -3,10 +3,15 @@ Add LDFLAGS variable to Makefile so that extra linker flags can be sent via this Upstream-Status: Pending Signed-off-by: Yi Zhao +--- + Makefile | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) +diff --git a/Makefile b/Makefile +index 404f036..a9b18f0 100644 --- a/Makefile +++ b/Makefile -@@ -68,18 +68,17 @@ XGETTEXT = xgettext +@@ -75,13 +75,12 @@ XGETTEXT = xgettext XGETTEXT_OPTS = --keyword=_ --keyword=P2_:1,1 --keyword=P3_:1,2 --language=C --add-comments MSGMERGE = msgmerge @@ -21,9 +26,15 @@ Signed-off-by: Yi Zhao -Wl,--soname,$(SHARED_LIB),--version-script,$(MAP_LIB) LDFLAGS_lib_SUN = $(LDFLAGS_shared_SUN) LDFLAGS_lib_HP = $(LDFLAGS_shared_HP) +@@ -90,7 +89,7 @@ LDFLAGS_lib_CYGWIN = $(LDFLAGS_shared) \ + -Wl,--export-all-symbols \ + -Wl,--enable-auto-import LDFLAGS_pam = $(LDFLAGS_shared) -LDFLAGS_pam_LINUX = $(LDFLAGS_shared_LINUX) \ +LDFLAGS_pam_LINUX = $(LDFLAGS) $(LDFLAGS_shared_LINUX) \ -Wl,--version-script,$(MAP_PAM) LDFLAGS_pam_SUN = $(LDFLAGS_shared_SUN) LDFLAGS_pam_HP = $(LDFLAGS_shared_HP) +-- +2.34.1 + diff --git a/meta-oe/recipes-security/passwdqc/passwdqc_2.0.2.bb b/meta-oe/recipes-security/passwdqc/passwdqc_2.0.2.bb deleted file mode 100644 index 8462701b31..0000000000 --- a/meta-oe/recipes-security/passwdqc/passwdqc_2.0.2.bb +++ /dev/null @@ -1,65 +0,0 @@ -SUMMARY = "A password/passphrase strength checking and enforcement toolset" -DESCRIPTION = "\ -passwdqc is a password/passphrase strength checking and policy enforcement \ -toolset, including an optional PAM module (pam_passwdqc), command-line \ -programs (pwqcheck and pwqgen), and a library (libpasswdqc). \ -pam_passwdqc is normally invoked on password changes by programs such as \ -passwd(1). It is capable of checking password or passphrase strength, \ -enforcing a policy, and offering randomly-generated passphrases, with \ -all of these features being optional and easily (re-)configurable. \ -\ -pwqcheck and pwqgen are standalone password/passphrase strength checking \ -and random passphrase generator programs, respectively, which are usable \ -from scripts. \ -\ -libpasswdqc is the underlying library, which may also be used from \ -third-party programs. \ -" - -HOMEPAGE = "http://www.openwall.com/passwdqc" -SECTION = "System Environment/Base" - -DEPENDS += "libpam" - -inherit features_check -REQUIRED_DISTRO_FEATURES = "pam" - -LICENSE = "BSD-1-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=ac99c8678577a1c2f9f04cccee411d5d" - -SRC_URI = "http://www.openwall.com/${BPN}/${BP}.tar.gz \ - file://makefile-add-ldflags.patch \ - " -SRC_URI[sha256sum] = "ff1f505764c020f6a4484b1e0cc4fdbf2e3f71b522926d90b4709104ca0604ab" - -# explicitly define LINUX_PAM in case DISTRO_FEATURES no pam -# this package's pam_passwdqc.so needs pam -CFLAGS:append = " -Wall -fPIC -DHAVE_SHADOW -DLINUX_PAM" - -# -e is no longer default setting in bitbake.conf -EXTRA_OEMAKE = "-e" - -do_compile() { - # make sure sub make use environment to override variables in Makefile - # Linux) $(MAKE), there is a tab between - sed -i -e 's/Linux) $(MAKE) CFLAGS_lib/Linux) $(MAKE) -e CFLAGS_lib/' ${S}/Makefile - - # LD_lib and LD must be CC because of Makefile - oe_runmake LD="${CC}" -} - -do_install() { - oe_runmake install DESTDIR=${D} SHARED_LIBDIR=${base_libdir} \ - DEVEL_LIBDIR=${libdir} SECUREDIR=${base_libdir}/security \ - INSTALL="install -p" -} - -PROVIDES += "pam-${BPN}" -PACKAGES =+ "lib${BPN} pam-${BPN}" - -FILES:lib${BPN} = "${base_libdir}/libpasswdqc.so.1" -FILES:pam-${BPN} = "${base_libdir}/security/pam_passwdqc.so" -FILES:${PN}-dbg += "${base_libdir}/security/.debug" - -RDEPENDS:${PN} = "lib${BPN} pam-${BPN}" -RDEPENDS:pam-${BPN} = "lib${BPN}" diff --git a/meta-oe/recipes-security/passwdqc/passwdqc_2.0.3.bb b/meta-oe/recipes-security/passwdqc/passwdqc_2.0.3.bb new file mode 100644 index 0000000000..8694052e61 --- /dev/null +++ b/meta-oe/recipes-security/passwdqc/passwdqc_2.0.3.bb @@ -0,0 +1,65 @@ +SUMMARY = "A password/passphrase strength checking and enforcement toolset" +DESCRIPTION = "\ +passwdqc is a password/passphrase strength checking and policy enforcement \ +toolset, including an optional PAM module (pam_passwdqc), command-line \ +programs (pwqcheck and pwqgen), and a library (libpasswdqc). \ +pam_passwdqc is normally invoked on password changes by programs such as \ +passwd(1). It is capable of checking password or passphrase strength, \ +enforcing a policy, and offering randomly-generated passphrases, with \ +all of these features being optional and easily (re-)configurable. \ +\ +pwqcheck and pwqgen are standalone password/passphrase strength checking \ +and random passphrase generator programs, respectively, which are usable \ +from scripts. \ +\ +libpasswdqc is the underlying library, which may also be used from \ +third-party programs. \ +" + +HOMEPAGE = "http://www.openwall.com/passwdqc" +SECTION = "System Environment/Base" + +DEPENDS += "libpam" + +inherit features_check +REQUIRED_DISTRO_FEATURES = "pam" + +LICENSE = "BSD-1-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ac99c8678577a1c2f9f04cccee411d5d" + +SRC_URI = "http://www.openwall.com/${BPN}/${BP}.tar.gz \ + file://makefile-add-ldflags.patch \ + " +SRC_URI[sha256sum] = "53b0f4bc49369f06195e9e13abb6cff352d5acb79e861004ec95973896488cf4" + +# explicitly define LINUX_PAM in case DISTRO_FEATURES no pam +# this package's pam_passwdqc.so needs pam +CFLAGS:append = " -Wall -fPIC -DHAVE_SHADOW -DLINUX_PAM" + +# -e is no longer default setting in bitbake.conf +EXTRA_OEMAKE = "-e" + +do_compile() { + # make sure sub make use environment to override variables in Makefile + # Linux) $(MAKE), there is a tab between + sed -i -e 's/Linux) $(MAKE) CFLAGS_lib/Linux) $(MAKE) -e CFLAGS_lib/' ${S}/Makefile + + # LD_lib and LD must be CC because of Makefile + oe_runmake LD="${CC}" +} + +do_install() { + oe_runmake install DESTDIR=${D} SHARED_LIBDIR=${base_libdir} \ + DEVEL_LIBDIR=${libdir} SECUREDIR=${base_libdir}/security \ + INSTALL="install -p" +} + +PROVIDES += "pam-${BPN}" +PACKAGES =+ "lib${BPN} pam-${BPN}" + +FILES:lib${BPN} = "${base_libdir}/libpasswdqc.so.1" +FILES:pam-${BPN} = "${base_libdir}/security/pam_passwdqc.so" +FILES:${PN}-dbg += "${base_libdir}/security/.debug" + +RDEPENDS:${PN} = "lib${BPN} pam-${BPN}" +RDEPENDS:pam-${BPN} = "lib${BPN}" -- cgit v1.2.3-54-g00ecf