From 40b1825a4434334f3513f94775b176545f8d2f3a Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Mon, 20 May 2019 19:30:52 +0300 Subject: libpam: Upgrade 1.3.0 -> 1.3.1 Remove patch applied upstream. Upstream tarball location changed. Signed-off-by: Adrian Bunk Signed-off-by: Richard Purdie --- .../libpam-xtests-remove-bash-dependency.patch | 226 --------------------- meta/recipes-extended/pam/libpam_1.3.0.bb | 166 --------------- meta/recipes-extended/pam/libpam_1.3.1.bb | 163 +++++++++++++++ 3 files changed, 163 insertions(+), 392 deletions(-) delete mode 100644 meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch delete mode 100644 meta/recipes-extended/pam/libpam_1.3.0.bb create mode 100644 meta/recipes-extended/pam/libpam_1.3.1.bb (limited to 'meta/recipes-extended/pam') diff --git a/meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch b/meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch deleted file mode 100644 index 680029ae0d..0000000000 --- a/meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch +++ /dev/null @@ -1,226 +0,0 @@ -From 555407ff6e2f742df64ae93859f14a0fc1397829 Mon Sep 17 00:00:00 2001 -From: Wenzong Fan -Date: Fri, 12 Sep 2014 05:35:05 -0400 -Subject: [PATCH] libpam/xtests: remove bash dependency - -There's not bash specific syntax in the xtest scripts: - - # after below patches applied: - $ cd Linux-PAM-1.1.6/xtests - $ checkbashisms *.sh - No output - -Just remove the runtime dependency to bash. - -Upstream-Status: Pending - -Signed-off-by: Wenzong Fan ---- - xtests/run-xtests.sh | 2 +- - xtests/tst-pam_access1.sh | 2 +- - xtests/tst-pam_access2.sh | 2 +- - xtests/tst-pam_access3.sh | 2 +- - xtests/tst-pam_access4.sh | 2 +- - xtests/tst-pam_assemble_line1.sh | 2 +- - xtests/tst-pam_group1.sh | 2 +- - xtests/tst-pam_limits1.sh | 2 +- - xtests/tst-pam_pwhistory1.sh | 2 +- - xtests/tst-pam_substack1.sh | 2 +- - xtests/tst-pam_substack2.sh | 2 +- - xtests/tst-pam_substack3.sh | 2 +- - xtests/tst-pam_substack4.sh | 2 +- - xtests/tst-pam_substack5.sh | 2 +- - xtests/tst-pam_succeed_if1.sh | 2 +- - xtests/tst-pam_unix1.sh | 2 +- - xtests/tst-pam_unix2.sh | 2 +- - xtests/tst-pam_unix3.sh | 2 +- - xtests/tst-pam_unix4.sh | 2 +- - 19 files changed, 19 insertions(+), 19 deletions(-) - -diff --git a/xtests/run-xtests.sh b/xtests/run-xtests.sh -index 3a89057..1cf8684 100755 ---- a/xtests/run-xtests.sh -+++ b/xtests/run-xtests.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - SRCDIR=$1 - shift 1 -diff --git a/xtests/tst-pam_access1.sh b/xtests/tst-pam_access1.sh -index 180d256..70521d2 100755 ---- a/xtests/tst-pam_access1.sh -+++ b/xtests/tst-pam_access1.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - /usr/sbin/groupadd tstpamaccess - /usr/sbin/useradd -G tstpamaccess -p '!!' tstpamaccess1 -diff --git a/xtests/tst-pam_access2.sh b/xtests/tst-pam_access2.sh -index 0a30275..7e3e60f 100755 ---- a/xtests/tst-pam_access2.sh -+++ b/xtests/tst-pam_access2.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - /usr/sbin/groupadd tstpamaccess - /usr/sbin/useradd -p '!!' tstpamaccess2 -diff --git a/xtests/tst-pam_access3.sh b/xtests/tst-pam_access3.sh -index 348e0c3..3630e2e 100755 ---- a/xtests/tst-pam_access3.sh -+++ b/xtests/tst-pam_access3.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - /usr/sbin/useradd -p '!!' tstpamaccess3 - ./tst-pam_access3 -diff --git a/xtests/tst-pam_access4.sh b/xtests/tst-pam_access4.sh -index 61e7b44..4538df4 100755 ---- a/xtests/tst-pam_access4.sh -+++ b/xtests/tst-pam_access4.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - /usr/sbin/useradd -p '!!' tstpamaccess4 - ./tst-pam_access4 -diff --git a/xtests/tst-pam_assemble_line1.sh b/xtests/tst-pam_assemble_line1.sh -index 248d47e..dc2a675 100755 ---- a/xtests/tst-pam_assemble_line1.sh -+++ b/xtests/tst-pam_assemble_line1.sh -@@ -1,3 +1,3 @@ --#!/bin/bash -+#!/bin/sh - - exec ./tst-pam_authfail tst-pam_assemble_line1 -diff --git a/xtests/tst-pam_group1.sh b/xtests/tst-pam_group1.sh -index b76377f..44faca9 100755 ---- a/xtests/tst-pam_group1.sh -+++ b/xtests/tst-pam_group1.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - /usr/sbin/groupadd tstpamgrpg - /usr/sbin/useradd -p '!!' tstpamgrp -diff --git a/xtests/tst-pam_limits1.sh b/xtests/tst-pam_limits1.sh -index 4faa822..32c021d 100755 ---- a/xtests/tst-pam_limits1.sh -+++ b/xtests/tst-pam_limits1.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - /usr/sbin/useradd -p '!!' tstpamlimits - ./tst-pam_limits1 -diff --git a/xtests/tst-pam_pwhistory1.sh b/xtests/tst-pam_pwhistory1.sh -index ddb3b8b..0f212e2 100644 ---- a/xtests/tst-pam_pwhistory1.sh -+++ b/xtests/tst-pam_pwhistory1.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - /usr/sbin/useradd tstpampwhistory - ./tst-pam_pwhistory1 -diff --git a/xtests/tst-pam_substack1.sh b/xtests/tst-pam_substack1.sh -index 5260175..f1b72a7 100755 ---- a/xtests/tst-pam_substack1.sh -+++ b/xtests/tst-pam_substack1.sh -@@ -1,3 +1,3 @@ --#!/bin/bash -+#!/bin/sh - - exec ./tst-pam_authfail tst-pam_substack1 -diff --git a/xtests/tst-pam_substack2.sh b/xtests/tst-pam_substack2.sh -index c02f597..3804fa7 100755 ---- a/xtests/tst-pam_substack2.sh -+++ b/xtests/tst-pam_substack2.sh -@@ -1,3 +1,3 @@ --#!/bin/bash -+#!/bin/sh - - exec ./tst-pam_authsucceed tst-pam_substack2 -diff --git a/xtests/tst-pam_substack3.sh b/xtests/tst-pam_substack3.sh -index 0e572aa..aa48e8e 100755 ---- a/xtests/tst-pam_substack3.sh -+++ b/xtests/tst-pam_substack3.sh -@@ -1,3 +1,3 @@ --#!/bin/bash -+#!/bin/sh - - exec ./tst-pam_authsucceed tst-pam_substack3 -diff --git a/xtests/tst-pam_substack4.sh b/xtests/tst-pam_substack4.sh -index a3ef08a..958a07a 100755 ---- a/xtests/tst-pam_substack4.sh -+++ b/xtests/tst-pam_substack4.sh -@@ -1,3 +1,3 @@ --#!/bin/bash -+#!/bin/sh - - exec ./tst-pam_authsucceed tst-pam_substack4 -diff --git a/xtests/tst-pam_substack5.sh b/xtests/tst-pam_substack5.sh -index e2714fd..7e0da74 100755 ---- a/xtests/tst-pam_substack5.sh -+++ b/xtests/tst-pam_substack5.sh -@@ -1,3 +1,3 @@ --#!/bin/bash -+#!/bin/sh - - exec ./tst-pam_authfail tst-pam_substack5 -diff --git a/xtests/tst-pam_succeed_if1.sh b/xtests/tst-pam_succeed_if1.sh -index a643b2e..58e57b4 100755 ---- a/xtests/tst-pam_succeed_if1.sh -+++ b/xtests/tst-pam_succeed_if1.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - /usr/sbin/useradd -p '!!' tstpamtest - /usr/sbin/useradd -p '!!' pamtest -diff --git a/xtests/tst-pam_unix1.sh b/xtests/tst-pam_unix1.sh -index f75bd84..72deac0 100755 ---- a/xtests/tst-pam_unix1.sh -+++ b/xtests/tst-pam_unix1.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - /usr/sbin/useradd -p '!!' tstpamunix - ./tst-pam_unix1 -diff --git a/xtests/tst-pam_unix2.sh b/xtests/tst-pam_unix2.sh -index 7093155..c04d6e6 100755 ---- a/xtests/tst-pam_unix2.sh -+++ b/xtests/tst-pam_unix2.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - # pamunix0 = 0aXKZztA.d1KY - /usr/sbin/useradd -p 0aXKZztA.d1KY tstpamunix -diff --git a/xtests/tst-pam_unix3.sh b/xtests/tst-pam_unix3.sh -index ef4a07c..b52db2b 100755 ---- a/xtests/tst-pam_unix3.sh -+++ b/xtests/tst-pam_unix3.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - # pamunix01 = 0aXKZztA.d1KYIuFXArmd2jU - /usr/sbin/useradd -p 0aXKZztA.d1KYIuFXArmd2jU tstpamunix -diff --git a/xtests/tst-pam_unix4.sh b/xtests/tst-pam_unix4.sh -index 787c2f9..e7976fd 100755 ---- a/xtests/tst-pam_unix4.sh -+++ b/xtests/tst-pam_unix4.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - - # pamunix01 = 0aXKZztA.d1KYIuFXArmd2jU - /usr/sbin/useradd -p 0aXKZztA.d1KYIuFXArmd2jU tstpamunix --- -1.7.9.5 - diff --git a/meta/recipes-extended/pam/libpam_1.3.0.bb b/meta/recipes-extended/pam/libpam_1.3.0.bb deleted file mode 100644 index c124e3bb02..0000000000 --- a/meta/recipes-extended/pam/libpam_1.3.0.bb +++ /dev/null @@ -1,166 +0,0 @@ -SUMMARY = "Linux-PAM (Pluggable Authentication Modules)" -DESCRIPTION = "Linux-PAM (Pluggable Authentication Modules for Linux), a flexible mechanism for authenticating users" -HOMEPAGE = "https://fedorahosted.org/linux-pam/" -BUGTRACKER = "https://fedorahosted.org/linux-pam/newticket" -SECTION = "base" -# PAM is dual licensed under GPL and BSD. -# /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time -# libpam-runtime-1.0.1 is GPLv2+), by openembedded -LICENSE = "GPLv2+ | BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3 \ - file://libpamc/License;md5=a4da476a14c093fdc73be3c3c9ba8fb3 \ - " - -SRC_URI = "http://linux-pam.org/library/Linux-PAM-${PV}.tar.bz2 \ - file://99_pam \ - file://pam.d/common-account \ - file://pam.d/common-auth \ - file://pam.d/common-password \ - file://pam.d/common-session \ - file://pam.d/common-session-noninteractive \ - file://pam.d/other \ - file://libpam-xtests.patch \ - file://fixsepbuild.patch \ - file://pam-security-abstract-securetty-handling.patch \ - file://pam-unix-nullok-secure.patch \ - file://libpam-xtests-remove-bash-dependency.patch \ - file://crypt_configure.patch \ - " - -SRC_URI[md5sum] = "da4b2289b7cfb19583d54e9eaaef1c3a" -SRC_URI[sha256sum] = "241aed1ef522f66ed672719ecf2205ec513fd0075ed80cda8e086a5b1a01d1bb" - -SRC_URI_append_libc-musl = " file://0001-Add-support-for-defining-missing-funcitonality.patch \ - file://include_paths_header.patch \ - " - -DEPENDS = "bison-native flex flex-native cracklib libxml2-native virtual/crypt" - -EXTRA_OECONF = "--with-db-uniquename=_pam \ - --includedir=${includedir}/security \ - --libdir=${base_libdir} \ - --disable-nis \ - --disable-regenerate-docu \ - --disable-prelude" - -CFLAGS_append = " -fPIC " - -PR = "r5" - -S = "${WORKDIR}/Linux-PAM-${PV}" - -inherit autotools gettext pkgconfig - -PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit," - -PACKAGES += "${PN}-runtime ${PN}-xtests" -FILES_${PN} = "${base_libdir}/lib*${SOLIBS}" -FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}" -FILES_${PN}-runtime = "${sysconfdir}" -FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests" - -PACKAGES_DYNAMIC += "^${MLPREFIX}pam-plugin-.*" - -def get_multilib_bit(d): - baselib = d.getVar('baselib') or '' - return baselib.replace('lib', '') - -libpam_suffix = "suffix${@get_multilib_bit(d)}" - -RPROVIDES_${PN} += "${PN}-${libpam_suffix}" -RPROVIDES_${PN}-runtime += "${PN}-runtime-${libpam_suffix}" - -RDEPENDS_${PN}-runtime = "${PN}-${libpam_suffix} \ - ${MLPREFIX}pam-plugin-deny-${libpam_suffix} \ - ${MLPREFIX}pam-plugin-permit-${libpam_suffix} \ - ${MLPREFIX}pam-plugin-warn-${libpam_suffix} \ - ${MLPREFIX}pam-plugin-unix-${libpam_suffix} \ - " -RDEPENDS_${PN}-xtests = "${PN}-${libpam_suffix} \ - ${MLPREFIX}pam-plugin-access-${libpam_suffix} \ - ${MLPREFIX}pam-plugin-debug-${libpam_suffix} \ - ${MLPREFIX}pam-plugin-cracklib-${libpam_suffix} \ - ${MLPREFIX}pam-plugin-pwhistory-${libpam_suffix} \ - ${MLPREFIX}pam-plugin-succeed-if-${libpam_suffix} \ - ${MLPREFIX}pam-plugin-time-${libpam_suffix} \ - coreutils" - -# FIXME: Native suffix breaks here, disable it for now -RRECOMMENDS_${PN} = "${PN}-runtime-${libpam_suffix}" -RRECOMMENDS_${PN}_class-native = "" - -python populate_packages_prepend () { - def pam_plugin_append_file(pn, dir, file): - nf = os.path.join(dir, file) - of = d.getVar('FILES_' + pn) - if of: - nf = of + " " + nf - d.setVar('FILES_' + pn, nf) - - def pam_plugin_hook(file, pkg, pattern, format, basename): - pn = d.getVar('PN') - libpam_suffix = d.getVar('libpam_suffix') - - rdeps = d.getVar('RDEPENDS_' + pkg) - if rdeps: - rdeps = rdeps + " " + pn + "-" + libpam_suffix - else: - rdeps = pn + "-" + libpam_suffix - d.setVar('RDEPENDS_' + pkg, rdeps) - - provides = d.getVar('RPROVIDES_' + pkg) - if provides: - provides = provides + " " + pkg + "-" + libpam_suffix - else: - provides = pkg + "-" + libpam_suffix - d.setVar('RPROVIDES_' + pkg, provides) - - mlprefix = d.getVar('MLPREFIX') or '' - dvar = d.expand('${WORKDIR}/package') - pam_libdir = d.expand('${base_libdir}/security') - pam_sbindir = d.expand('${sbindir}') - pam_filterdir = d.expand('${base_libdir}/security/pam_filter') - 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_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_chkpwd') - pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_update') - pam_plugin_append_file('%spam-plugin-tally' % mlprefix, pam_sbindir, 'pam_tally') - pam_plugin_append_file('%spam-plugin-tally2' % mlprefix, pam_sbindir, 'pam_tally2') - pam_plugin_append_file('%spam-plugin-timestamp' % mlprefix, pam_sbindir, 'pam_timestamp_check') - pam_plugin_append_file('%spam-plugin-mkhomedir' % mlprefix, pam_sbindir, 'mkhomedir_helper') - pam_plugin_append_file('%spam-plugin-console' % mlprefix, pam_sbindir, 'pam_console_apply') - do_split_packages(d, pam_filterdir, r'^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='') -} - -do_install() { - autotools_do_install - - # don't install /var/run when populating rootfs. Do it through volatile - rm -rf ${D}${localstatedir} - install -d ${D}${sysconfdir}/default/volatiles - install -m 0644 ${WORKDIR}/99_pam ${D}${sysconfdir}/default/volatiles - - install -d ${D}${sysconfdir}/pam.d/ - install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ - - # The lsb requires unix_chkpwd has setuid permission - chmod 4755 ${D}${sbindir}/unix_chkpwd - - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - echo "session optional pam_systemd.so" >> ${D}${sysconfdir}/pam.d/common-session - fi -} - -inherit distro_features_check -REQUIRED_DISTRO_FEATURES = "pam" - -BBCLASSEXTEND = "nativesdk native" - -CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session" -CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-auth" -CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-password" -CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session-noninteractive" -CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-account" -CONFFILES_${PN}-runtime += "${sysconfdir}/security/limits.conf" diff --git a/meta/recipes-extended/pam/libpam_1.3.1.bb b/meta/recipes-extended/pam/libpam_1.3.1.bb new file mode 100644 index 0000000000..63ba0c16aa --- /dev/null +++ b/meta/recipes-extended/pam/libpam_1.3.1.bb @@ -0,0 +1,163 @@ +SUMMARY = "Linux-PAM (Pluggable Authentication Modules)" +DESCRIPTION = "Linux-PAM (Pluggable Authentication Modules for Linux), a flexible mechanism for authenticating users" +HOMEPAGE = "https://fedorahosted.org/linux-pam/" +BUGTRACKER = "https://fedorahosted.org/linux-pam/newticket" +SECTION = "base" +# PAM is dual licensed under GPL and BSD. +# /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time +# libpam-runtime-1.0.1 is GPLv2+), by openembedded +LICENSE = "GPLv2+ | BSD" +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 \ + file://99_pam \ + file://pam.d/common-account \ + file://pam.d/common-auth \ + file://pam.d/common-password \ + file://pam.d/common-session \ + file://pam.d/common-session-noninteractive \ + file://pam.d/other \ + file://libpam-xtests.patch \ + file://fixsepbuild.patch \ + file://pam-security-abstract-securetty-handling.patch \ + file://pam-unix-nullok-secure.patch \ + file://crypt_configure.patch \ + " + +SRC_URI[md5sum] = "558ff53b0fc0563ca97f79e911822165" +SRC_URI[sha256sum] = "eff47a4ecd833fbf18de9686632a70ee8d0794b79aecb217ebd0ce11db4cd0db" + +SRC_URI_append_libc-musl = " file://0001-Add-support-for-defining-missing-funcitonality.patch \ + file://include_paths_header.patch \ + " + +DEPENDS = "bison-native flex flex-native cracklib libxml2-native virtual/crypt" + +EXTRA_OECONF = "--with-db-uniquename=_pam \ + --includedir=${includedir}/security \ + --libdir=${base_libdir} \ + --disable-nis \ + --disable-regenerate-docu \ + --disable-prelude" + +CFLAGS_append = " -fPIC " + +S = "${WORKDIR}/Linux-PAM-${PV}" + +inherit autotools gettext pkgconfig + +PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit," + +PACKAGES += "${PN}-runtime ${PN}-xtests" +FILES_${PN} = "${base_libdir}/lib*${SOLIBS}" +FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}" +FILES_${PN}-runtime = "${sysconfdir}" +FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests" + +PACKAGES_DYNAMIC += "^${MLPREFIX}pam-plugin-.*" + +def get_multilib_bit(d): + baselib = d.getVar('baselib') or '' + return baselib.replace('lib', '') + +libpam_suffix = "suffix${@get_multilib_bit(d)}" + +RPROVIDES_${PN} += "${PN}-${libpam_suffix}" +RPROVIDES_${PN}-runtime += "${PN}-runtime-${libpam_suffix}" + +RDEPENDS_${PN}-runtime = "${PN}-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-deny-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-permit-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-warn-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-unix-${libpam_suffix} \ + " +RDEPENDS_${PN}-xtests = "${PN}-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-access-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-debug-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-cracklib-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-pwhistory-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-succeed-if-${libpam_suffix} \ + ${MLPREFIX}pam-plugin-time-${libpam_suffix} \ + coreutils" + +# FIXME: Native suffix breaks here, disable it for now +RRECOMMENDS_${PN} = "${PN}-runtime-${libpam_suffix}" +RRECOMMENDS_${PN}_class-native = "" + +python populate_packages_prepend () { + def pam_plugin_append_file(pn, dir, file): + nf = os.path.join(dir, file) + of = d.getVar('FILES_' + pn) + if of: + nf = of + " " + nf + d.setVar('FILES_' + pn, nf) + + def pam_plugin_hook(file, pkg, pattern, format, basename): + pn = d.getVar('PN') + libpam_suffix = d.getVar('libpam_suffix') + + rdeps = d.getVar('RDEPENDS_' + pkg) + if rdeps: + rdeps = rdeps + " " + pn + "-" + libpam_suffix + else: + rdeps = pn + "-" + libpam_suffix + d.setVar('RDEPENDS_' + pkg, rdeps) + + provides = d.getVar('RPROVIDES_' + pkg) + if provides: + provides = provides + " " + pkg + "-" + libpam_suffix + else: + provides = pkg + "-" + libpam_suffix + d.setVar('RPROVIDES_' + pkg, provides) + + mlprefix = d.getVar('MLPREFIX') or '' + dvar = d.expand('${WORKDIR}/package') + pam_libdir = d.expand('${base_libdir}/security') + pam_sbindir = d.expand('${sbindir}') + pam_filterdir = d.expand('${base_libdir}/security/pam_filter') + 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_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_chkpwd') + pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_update') + pam_plugin_append_file('%spam-plugin-tally' % mlprefix, pam_sbindir, 'pam_tally') + pam_plugin_append_file('%spam-plugin-tally2' % mlprefix, pam_sbindir, 'pam_tally2') + pam_plugin_append_file('%spam-plugin-timestamp' % mlprefix, pam_sbindir, 'pam_timestamp_check') + pam_plugin_append_file('%spam-plugin-mkhomedir' % mlprefix, pam_sbindir, 'mkhomedir_helper') + pam_plugin_append_file('%spam-plugin-console' % mlprefix, pam_sbindir, 'pam_console_apply') + do_split_packages(d, pam_filterdir, r'^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='') +} + +do_install() { + autotools_do_install + + # don't install /var/run when populating rootfs. Do it through volatile + rm -rf ${D}${localstatedir} + install -d ${D}${sysconfdir}/default/volatiles + install -m 0644 ${WORKDIR}/99_pam ${D}${sysconfdir}/default/volatiles + + install -d ${D}${sysconfdir}/pam.d/ + install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ + + # The lsb requires unix_chkpwd has setuid permission + chmod 4755 ${D}${sbindir}/unix_chkpwd + + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + echo "session optional pam_systemd.so" >> ${D}${sysconfdir}/pam.d/common-session + fi +} + +inherit distro_features_check +REQUIRED_DISTRO_FEATURES = "pam" + +BBCLASSEXTEND = "nativesdk native" + +CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session" +CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-auth" +CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-password" +CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session-noninteractive" +CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-account" +CONFFILES_${PN}-runtime += "${sysconfdir}/security/limits.conf" -- cgit 1.2.3-korg