diff options
Diffstat (limited to 'meta/recipes-extended/pam')
-rw-r--r-- | meta/recipes-extended/pam/libpam/0001-run-xtests.sh-check-whether-files-exist.patch | 65 | ||||
-rw-r--r-- | meta/recipes-extended/pam/libpam/libpam-xtests.patch | 22 | ||||
-rw-r--r-- | meta/recipes-extended/pam/libpam_1.6.1.bb (renamed from meta/recipes-extended/pam/libpam_1.5.2.bb) | 43 |
3 files changed, 39 insertions, 91 deletions
diff --git a/meta/recipes-extended/pam/libpam/0001-run-xtests.sh-check-whether-files-exist.patch b/meta/recipes-extended/pam/libpam/0001-run-xtests.sh-check-whether-files-exist.patch deleted file mode 100644 index 40040a873a..0000000000 --- a/meta/recipes-extended/pam/libpam/0001-run-xtests.sh-check-whether-files-exist.patch +++ /dev/null @@ -1,65 +0,0 @@ -From e8e8ccfd57e0274b431bc5717bf37c488285b07b Mon Sep 17 00:00:00 2001 -From: Mingli Yu <mingli.yu@windriver.com> -Date: Wed, 27 Oct 2021 10:30:46 +0800 -Subject: [PATCH] run-xtests.sh: check whether files exist - -Fixes: - # ./run-xtests.sh . tst-pam_access1 - mv: cannot stat '/etc/security/opasswd': No such file or directory - PASS: tst-pam_access1 - mv: cannot stat '/etc/security/opasswd-pam-xtests': No such file or directory - ================== - 1 tests passed - 0 tests not run - ================== - -Upstream-Status: Backport [https://github.com/linux-pam/linux-pam/commit/e8e8ccfd57e0274b431bc5717bf37c488285b07b] - -Signed-off-by: Mingli Yu <mingli.yu@windriver.com> ---- - xtests/run-xtests.sh | 20 +++++++++++++------- - 1 file changed, 13 insertions(+), 7 deletions(-) - -diff --git a/xtests/run-xtests.sh b/xtests/run-xtests.sh -index 14f585d9..ff9a4dc1 100755 ---- a/xtests/run-xtests.sh -+++ b/xtests/run-xtests.sh -@@ -18,10 +18,12 @@ all=0 - - mkdir -p /etc/security - for config in access.conf group.conf time.conf limits.conf ; do -- cp /etc/security/$config /etc/security/$config-pam-xtests -+ [ -f "/etc/security/$config" ] && -+ mv /etc/security/$config /etc/security/$config-pam-xtests - install -m 644 "${SRCDIR}"/$config /etc/security/$config - done --mv /etc/security/opasswd /etc/security/opasswd-pam-xtests -+[ -f /etc/security/opasswd ] && -+ mv /etc/security/opasswd /etc/security/opasswd-pam-xtests - - for testname in $XTESTS ; do - for cfg in "${SRCDIR}"/$testname*.pamd ; do -@@ -47,11 +49,15 @@ for testname in $XTESTS ; do - all=`expr $all + 1` - rm -f /etc/pam.d/$testname* - done --mv /etc/security/access.conf-pam-xtests /etc/security/access.conf --mv /etc/security/group.conf-pam-xtests /etc/security/group.conf --mv /etc/security/time.conf-pam-xtests /etc/security/time.conf --mv /etc/security/limits.conf-pam-xtests /etc/security/limits.conf --mv /etc/security/opasswd-pam-xtests /etc/security/opasswd -+ -+for config in access.conf group.conf time.conf limits.conf opasswd ; do -+ if [ -f "/etc/security/$config-pam-xtests" ]; then -+ mv /etc/security/$config-pam-xtests /etc/security/$config -+ else -+ rm -f /etc/security/$config -+ fi -+done -+ - if test "$failed" -ne 0; then - echo "===================" - echo "$failed of $all tests failed" --- -2.32.0 - diff --git a/meta/recipes-extended/pam/libpam/libpam-xtests.patch b/meta/recipes-extended/pam/libpam/libpam-xtests.patch index ea145899b4..f2dafa72a5 100644 --- a/meta/recipes-extended/pam/libpam/libpam-xtests.patch +++ b/meta/recipes-extended/pam/libpam/libpam-xtests.patch @@ -1,13 +1,21 @@ -This patch is used to create a new sub package libpam-xtests to do more checks. +From 060726f7e60c8ecb5bf50fd776910b290d9a0a69 Mon Sep 17 00:00:00 2001 +From: Kang Kai <kai.kang@windriver.com> +Date: Tue, 19 Jul 2011 17:08:31 +0800 +Subject: [PATCH] This patch is used to create a new sub package libpam-xtests + to do more checks. Upstream-Status: Pending Signed-off-by: Kang Kai <kai.kang@windriver.com> -Index: Linux-PAM-1.3.0/xtests/Makefile.am -=================================================================== ---- Linux-PAM-1.3.0.orig/xtests/Makefile.am -+++ Linux-PAM-1.3.0/xtests/Makefile.am -@@ -7,7 +7,7 @@ AM_CFLAGS = -DLIBPAM_COMPILE -I$(top_src +--- + xtests/Makefile.am | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) + +diff --git a/xtests/Makefile.am b/xtests/Makefile.am +index acf9746..9826c9f 100644 +--- a/xtests/Makefile.am ++++ b/xtests/Makefile.am +@@ -8,7 +8,7 @@ AM_CFLAGS = -DLIBPAM_COMPILE -I$(top_srcdir)/libpam/include \ LDADD = $(top_builddir)/libpam/libpam.la \ $(top_builddir)/libpam_misc/libpam_misc.la @@ -16,7 +24,7 @@ Index: Linux-PAM-1.3.0/xtests/Makefile.am EXTRA_DIST = run-xtests.sh tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd \ tst-pam_dispatch3.pamd tst-pam_dispatch4.pamd \ -@@ -51,3 +51,18 @@ EXTRA_PROGRAMS = $(XTESTS) +@@ -55,3 +55,18 @@ EXTRA_PROGRAMS = $(XTESTS) xtests: $(XTESTS) run-xtests.sh "$(srcdir)"/run-xtests.sh "$(srcdir)" ${XTESTS} ${NOSRCTESTS} diff --git a/meta/recipes-extended/pam/libpam_1.5.2.bb b/meta/recipes-extended/pam/libpam_1.6.1.bb index 081986ef43..9f2106ea73 100644 --- a/meta/recipes-extended/pam/libpam_1.5.2.bb +++ b/meta/recipes-extended/pam/libpam_1.6.1.bb @@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3 \ file://libpamc/License;md5=a4da476a14c093fdc73be3c3c9ba8fb3 \ " -SRC_URI = "https://github.com/linux-pam/linux-pam/releases/download/v${PV}/Linux-PAM-${PV}.tar.xz \ +SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/Linux-PAM-${PV}.tar.xz \ file://99_pam \ file://pam.d/common-account \ file://pam.d/common-auth \ @@ -21,14 +21,13 @@ SRC_URI = "https://github.com/linux-pam/linux-pam/releases/download/v${PV}/Linux file://pam.d/common-session-noninteractive \ file://pam.d/other \ file://libpam-xtests.patch \ - file://0001-run-xtests.sh-check-whether-files-exist.patch \ file://run-ptest \ file://pam-volatiles.conf \ " -SRC_URI[sha256sum] = "e4ec7131a91da44512574268f493c6d8ca105c87091691b8e9b56ca685d4f94d" +SRC_URI[sha256sum] = "f8923c740159052d719dbfc2a2f81942d68dd34fcaf61c706a02c9b80feeef8e" -DEPENDS = "bison-native flex flex-native cracklib libxml2-native virtual/crypt" +DEPENDS = "bison-native flex-native cracklib libxml2-native virtual/crypt" EXTRA_OECONF = "--includedir=${includedir}/security \ --libdir=${base_libdir} \ @@ -42,18 +41,26 @@ CFLAGS:append = " -fPIC " S = "${WORKDIR}/Linux-PAM-${PV}" -inherit autotools gettext pkgconfig systemd ptest +inherit autotools gettext pkgconfig systemd ptest github-releases PACKAGECONFIG ??= "" PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit," PACKAGECONFIG[userdb] = "--enable-db=db,--enable-db=no,db," PACKAGES += "${PN}-runtime ${PN}-xtests" -FILES:${PN} = "${base_libdir}/lib*${SOLIBS}" +FILES:${PN} = " \ + ${base_libdir}/lib*${SOLIBS} \ + ${nonarch_libdir}/tmpfiles.d/*.conf \ +" FILES:${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}" FILES:${PN}-runtime = "${sysconfdir} ${sbindir} ${systemd_system_unitdir}" FILES:${PN}-xtests = "${datadir}/Linux-PAM/xtests" +# libpam installs /etc/environment for use with the pam_env plugin. Make sure it is +# packaged with the pam-plugin-env package to avoid breaking installations which +# install that file via other packages +FILES:pam-plugin-env = "${sysconfdir}/environment" + PACKAGES_DYNAMIC += "^${MLPREFIX}pam-plugin-.*" def get_multilib_bit(d): @@ -110,7 +117,7 @@ python populate_packages:prepend () { pam_pkgname = mlprefix + 'pam-plugin%s' do_split_packages(d, pam_libdir, r'^pam(.*)\.so$', pam_pkgname, - 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='') + 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='', prepend=True) do_split_packages(d, pam_filterdir, r'^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='') } @@ -130,17 +137,17 @@ do_install() { if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)}; then rm -rf ${D}${sysconfdir}/init.d/ rm -rf ${D}${sysconfdir}/rc* - install -d ${D}${sysconfdir}/tmpfiles.d - install -m 0644 ${WORKDIR}/pam-volatiles.conf \ - ${D}${sysconfdir}/tmpfiles.d/pam.conf + install -d ${D}${nonarch_libdir}/tmpfiles.d + install -m 0644 ${UNPACKDIR}/pam-volatiles.conf \ + ${D}${nonarch_libdir}/tmpfiles.d/pam.conf else install -d ${D}${sysconfdir}/default/volatiles - install -m 0644 ${WORKDIR}/99_pam \ + install -m 0644 ${UNPACKDIR}/99_pam \ ${D}${sysconfdir}/default/volatiles/ fi install -d ${D}${sysconfdir}/pam.d/ - install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ + install -m 0644 ${UNPACKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ # The lsb requires unix_chkpwd has setuid permission chmod 4755 ${D}${sbindir}/unix_chkpwd @@ -155,11 +162,9 @@ do_install() { } do_install_ptest() { - if [ ${PTEST_ENABLED} = "1" ]; then - mkdir -p ${D}${PTEST_PATH}/tests - install -m 0755 ${B}/tests/.libs/* ${D}${PTEST_PATH}/tests - install -m 0644 ${S}/tests/confdir ${D}${PTEST_PATH}/tests - fi + mkdir -p ${D}${PTEST_PATH}/tests + install -m 0755 ${B}/tests/.libs/* ${D}${PTEST_PATH}/tests + install -m 0644 ${S}/tests/confdir ${D}${PTEST_PATH}/tests } pkg_postinst:${PN}() { @@ -169,7 +174,7 @@ pkg_postinst:${PN}() { } inherit features_check -REQUIRED_DISTRO_FEATURES = "pam" +ANY_OF_DISTRO_FEATURES = "pam systemd" BBCLASSEXTEND = "nativesdk native" @@ -180,6 +185,6 @@ CONFFILES:${PN}-runtime += "${sysconfdir}/pam.d/common-session-noninteractive" CONFFILES:${PN}-runtime += "${sysconfdir}/pam.d/common-account" CONFFILES:${PN}-runtime += "${sysconfdir}/security/limits.conf" -UPSTREAM_CHECK_URI = "https://github.com/linux-pam/linux-pam/releases" +GITHUB_BASE_URI = "https://github.com/linux-pam/linux-pam/releases" CVE_PRODUCT = "linux-pam" |