From 3fb7bdb49195ebdaa7fcd27561e63f555bc31ec4 Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Wed, 12 May 2021 16:26:46 +0800 Subject: [PATCH] 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 Issue-ID: INF-215 Signed-off-by: Jackie Huang Change-Id: I3a14cf886c15a4d004d956c64b26cda85348bc54 --- .../recipes-extended/pam/libpam_%.bbappend | 34 +++++++++------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/meta-starlingx/meta-stx-integ/recipes-extended/pam/libpam_%.bbappend b/meta-starlingx/meta-stx-integ/recipes-extended/pam/libpam_%.bbappend index bd24ec6..cc966dc 100644 --- a/meta-starlingx/meta-stx-integ/recipes-extended/pam/libpam_%.bbappend +++ b/meta-starlingx/meta-stx-integ/recipes-extended/pam/libpam_%.bbappend @@ -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 -- 2.16.6