diff options
| author | Armin Kuster <akuster808@gmail.com> | 2017-10-26 14:15:14 -0700 |
|---|---|---|
| committer | Armin Kuster <akuster808@gmail.com> | 2018-03-01 16:10:37 -0800 |
| commit | a1c660848d8f3879ad4396b021e3dafdefeda333 (patch) | |
| tree | 09c4936ef0ace6062fb433e119ad9c9d25fc5e48 /meta-oe/recipes-security/passwdqc | |
| parent | 0df104e33d7f9aa969af56ff12756f09269e8e7a (diff) | |
| download | meta-openembedded-a1c660848d8f3879ad4396b021e3dafdefeda333.tar.gz | |
passwdqc: move to recipes-security
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-security/passwdqc')
| -rw-r--r-- | meta-oe/recipes-security/passwdqc/passwdqc/makefile-add-ldflags.patch | 31 | ||||
| -rw-r--r-- | meta-oe/recipes-security/passwdqc/passwdqc_1.3.1.bb | 63 |
2 files changed, 94 insertions, 0 deletions
diff --git a/meta-oe/recipes-security/passwdqc/passwdqc/makefile-add-ldflags.patch b/meta-oe/recipes-security/passwdqc/passwdqc/makefile-add-ldflags.patch new file mode 100644 index 0000000000..e9023492e0 --- /dev/null +++ b/meta-oe/recipes-security/passwdqc/passwdqc/makefile-add-ldflags.patch | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | Add LDFLAGS variable to Makefile so that extra linker flags can be sent via this variable. | ||
| 2 | |||
| 3 | Upstream-Status: Pending | ||
| 4 | |||
| 5 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
| 6 | |||
| 7 | diff --git a/Makefile b/Makefile | ||
| 8 | index 49d622d..cd17334 100644 | ||
| 9 | --- a/Makefile | ||
| 10 | +++ b/Makefile | ||
| 11 | @@ -48,18 +48,17 @@ CFLAGS = -Wall -W -O2 | ||
| 12 | CFLAGS_lib = $(CFLAGS) -fPIC | ||
| 13 | CFLAGS_bin = $(CFLAGS) -fomit-frame-pointer | ||
| 14 | |||
| 15 | -LDFLAGS = | ||
| 16 | LDFLAGS_shared = --shared | ||
| 17 | LDFLAGS_shared_LINUX = --shared | ||
| 18 | LDFLAGS_shared_SUN = -G | ||
| 19 | LDFLAGS_shared_HP = -b | ||
| 20 | LDFLAGS_lib = $(LDFLAGS_shared) | ||
| 21 | -LDFLAGS_lib_LINUX = $(LDFLAGS_shared_LINUX) \ | ||
| 22 | +LDFLAGS_lib_LINUX = $(LDFLAGS) $(LDFLAGS_shared_LINUX) \ | ||
| 23 | -Wl,--soname,$(SHARED_LIB),--version-script,$(MAP_LIB) | ||
| 24 | LDFLAGS_lib_SUN = $(LDFLAGS_shared_SUN) | ||
| 25 | LDFLAGS_lib_HP = $(LDFLAGS_shared_HP) | ||
| 26 | LDFLAGS_pam = $(LDFLAGS_shared) | ||
| 27 | -LDFLAGS_pam_LINUX = $(LDFLAGS_shared_LINUX) \ | ||
| 28 | +LDFLAGS_pam_LINUX = $(LDFLAGS) $(LDFLAGS_shared_LINUX) \ | ||
| 29 | -Wl,--version-script,$(MAP_PAM) | ||
| 30 | LDFLAGS_pam_SUN = $(LDFLAGS_shared_SUN) | ||
| 31 | LDFLAGS_pam_HP = $(LDFLAGS_shared_HP) | ||
diff --git a/meta-oe/recipes-security/passwdqc/passwdqc_1.3.1.bb b/meta-oe/recipes-security/passwdqc/passwdqc_1.3.1.bb new file mode 100644 index 0000000000..198db3ce72 --- /dev/null +++ b/meta-oe/recipes-security/passwdqc/passwdqc_1.3.1.bb | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | SUMMARY = "A password/passphrase strength checking and enforcement toolset" | ||
| 2 | DESCRIPTION = "\ | ||
| 3 | passwdqc is a password/passphrase strength checking and policy enforcement \ | ||
| 4 | toolset, including an optional PAM module (pam_passwdqc), command-line \ | ||
| 5 | programs (pwqcheck and pwqgen), and a library (libpasswdqc). \ | ||
| 6 | pam_passwdqc is normally invoked on password changes by programs such as \ | ||
| 7 | passwd(1). It is capable of checking password or passphrase strength, \ | ||
| 8 | enforcing a policy, and offering randomly-generated passphrases, with \ | ||
| 9 | all of these features being optional and easily (re-)configurable. \ | ||
| 10 | \ | ||
| 11 | pwqcheck and pwqgen are standalone password/passphrase strength checking \ | ||
| 12 | and random passphrase generator programs, respectively, which are usable \ | ||
| 13 | from scripts. \ | ||
| 14 | \ | ||
| 15 | libpasswdqc is the underlying library, which may also be used from \ | ||
| 16 | third-party programs. \ | ||
| 17 | " | ||
| 18 | |||
| 19 | HOMEPAGE = "http://www.openwall.com/passwdqc" | ||
| 20 | SECTION = "System Environment/Base" | ||
| 21 | |||
| 22 | DEPENDS += "libpam" | ||
| 23 | |||
| 24 | LICENSE = "BSD" | ||
| 25 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1b4af6f3d4ee079a38107366e93b334d" | ||
| 26 | |||
| 27 | SRC_URI = "http://www.openwall.com/${BPN}/${BP}.tar.gz \ | ||
| 28 | file://makefile-add-ldflags.patch \ | ||
| 29 | " | ||
| 30 | SRC_URI[md5sum] = "3878b57bcd3fdbcf3d4b362dbc6228b9" | ||
| 31 | SRC_URI[sha256sum] = "d1fedeaf759e8a0f32d28b5811ef11b5a5365154849190f4b7fab670a70ffb14" | ||
| 32 | |||
| 33 | # explicitly define LINUX_PAM in case DISTRO_FEATURES no pam | ||
| 34 | # this package's pam_passwdqc.so needs pam | ||
| 35 | CFLAGS_append += "-Wall -fPIC -DHAVE_SHADOW -DLINUX_PAM" | ||
| 36 | |||
| 37 | # -e is no longer default setting in bitbake.conf | ||
| 38 | EXTRA_OEMAKE = "-e" | ||
| 39 | |||
| 40 | do_compile() { | ||
| 41 | # make sure sub make use environment to override variables in Makefile | ||
| 42 | # Linux) $(MAKE), there is a tab between | ||
| 43 | sed -i -e 's/Linux) $(MAKE) CFLAGS_lib/Linux) $(MAKE) -e CFLAGS_lib/' ${S}/Makefile | ||
| 44 | |||
| 45 | # LD_lib and LD must be CC because of Makefile | ||
| 46 | oe_runmake LD="${CC}" | ||
| 47 | } | ||
| 48 | |||
| 49 | do_install() { | ||
| 50 | oe_runmake install DESTDIR=${D} SHARED_LIBDIR=${base_libdir} \ | ||
| 51 | DEVEL_LIBDIR=${libdir} SECUREDIR=${base_libdir}/security \ | ||
| 52 | INSTALL="install -p" | ||
| 53 | } | ||
| 54 | |||
| 55 | PROVIDES += "pam-${BPN}" | ||
| 56 | PACKAGES =+ "lib${BPN} pam-${BPN}" | ||
| 57 | |||
| 58 | FILES_lib${BPN} = "${base_libdir}/libpasswdqc.so.0" | ||
| 59 | FILES_pam-${BPN} = "${base_libdir}/security/pam_passwdqc.so" | ||
| 60 | FILES_${PN}-dbg += "${base_libdir}/security/.debug" | ||
| 61 | |||
| 62 | RDEPENDS_${PN} = "lib${BPN} pam-${BPN}" | ||
| 63 | RDEPENDS_pam-${BPN} = "lib${BPN}" | ||
