libpam: update for stx 5.0

* inherit stx-metadata to help install updated files
  from stx 'config-files' repo

* remove do_copy_config_files since it's not
  needed after using stx-metadata

Story: 2008952
Task: 42576

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: If193df0d389e6108de574ef69c569bbcd8ce232f
This commit is contained in:
Jackie Huang 2021-05-12 16:26:46 +08:00
parent ed2ee77c9c
commit ceaa9eb226

View File

@ -1,42 +1,34 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRCREV_FORMAT = "opendev"
SRCREV_opendev = "d778e862571957ece3c404c0c37d325769772fde"
SUBPATH = "pam-config"
DSTSUFX0 = "stx-configfiles"
inherit stx-metadata
STX_REPO = "config-files"
STX_SUBPATH = "pam-config"
LICENSE_append = " & Apache-2.0"
LIC_FILES_CHKSUM += "\
file://stx-configfiles-LICENSE;beginline=1;endline=10;md5=fa5ec877c97a75a09b397bccc95b2b87 \
file://${STX_METADATA_PATH}/centos/pam-config.spec;beginline=1;endline=10;md5=fa5ec877c97a75a09b397bccc95b2b87 \
"
SRC_URI += " \
git://opendev.org/starlingx/config-files.git;protocol=https;destsuffix=${DSTSUFX0};branch="r/stx.3.0";subpath=${SUBPATH};name=opendev \
file://util-linux-pam-postlogin.patch \
"
do_unpack_append() {
bb.build.exec_func('do_copy_config_files', d)
}
do_copy_config_files () {
cp -pf ${WORKDIR}/stx-configfiles/centos/pam-config.spec ${S}/stx-configfiles-LICENSE
}
do_install_append () {
# From util-linux-config patch
install -m 644 ${S}/stx.postlogin ${D}/${sysconfdir}/pam.d/postlogin
install -m 644 ${WORKDIR}/stx-configfiles/files/sshd.pam ${D}/${sysconfdir}/pam.d/sshd.pam
install -m 644 ${WORKDIR}/stx-configfiles/files/common-account ${D}/${sysconfdir}/pam.d/common-account
install -m 644 ${WORKDIR}/stx-configfiles/files/common-auth ${D}/${sysconfdir}/pam.d/common-auth
install -m 644 ${WORKDIR}/stx-configfiles/files/common-password ${D}/${sysconfdir}/pam.d/common-password
install -m 644 ${WORKDIR}/stx-configfiles/files/common-session ${D}/${sysconfdir}/pam.d/common-session
install -m 644 ${STX_METADATA_PATH}/files/sshd.pam ${D}/${sysconfdir}/pam.d/sshd.pam
install -m 644 ${STX_METADATA_PATH}/files/common-account ${D}/${sysconfdir}/pam.d/common-account
install -m 644 ${STX_METADATA_PATH}/files/common-auth ${D}/${sysconfdir}/pam.d/common-auth
install -m 644 ${STX_METADATA_PATH}/files/common-password ${D}/${sysconfdir}/pam.d/common-password
install -m 644 ${STX_METADATA_PATH}/files/common-session ${D}/${sysconfdir}/pam.d/common-session
install -m 644 ${WORKDIR}/stx-configfiles/files/common-session-noninteractive \
install -m 644 ${STX_METADATA_PATH}/files/common-session-noninteractive \
${D}/${sysconfdir}/pam.d/common-session-noninteractive
install -m 644 ${WORKDIR}/stx-configfiles/files/system-auth.pamd ${D}/${sysconfdir}/pam.d/system-auth
install -m 644 ${STX_METADATA_PATH}/files/system-auth.pamd ${D}/${sysconfdir}/pam.d/system-auth
# A better place is the autoconfig from kickstarter
sed -i -e '/password .*pam_ldap.so/,/session .*revoke/ s/^$/password required pam_deny.so\n/g' \
${D}/${sysconfdir}/pam.d/system-auth