From 6ef0a7c05cd5d2cc181ca7e6f90ab0c6e32e38d3 Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Wed, 12 May 2021 16:26:46 +0800 Subject: [PATCH] shadow: 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: I3a2a60f06408a1bca6e9657e025029eb1705bcb1 --- .../recipes-extended/shadow/shadow_%.bbappend | 35 +++++++--------------- 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/meta-starlingx/meta-stx-integ/recipes-extended/shadow/shadow_%.bbappend b/meta-starlingx/meta-stx-integ/recipes-extended/shadow/shadow_%.bbappend index c887329..0d72b72 100644 --- a/meta-starlingx/meta-stx-integ/recipes-extended/shadow/shadow_%.bbappend +++ b/meta-starlingx/meta-stx-integ/recipes-extended/shadow/shadow_%.bbappend @@ -1,36 +1,23 @@ -SRCREV_FORMAT = "opendev" -SRCREV_opendev = "d778e862571957ece3c404c0c37d325769772fde" -SUBPATH0 = "shadow-utils-config" -DSTSUFX0 = "stx-configfiles" -SUBPATH1 = "util-linux-config" -DSTSUFX1 = "stx-util-linux" +inherit stx-metadata + +STX_REPO = "config-files" +STX_SUBPATH0 = "shadow-utils-config" +STX_SUBPATH1 = "util-linux-config" LICENSE_append = "& Apache-2.0" LIC_FILES_CHKSUM += "\ - file://stx-configfiles-LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ - file://stx-util-linux-LICENSE;beginline=1;endline=10;md5=5801a9b9ee2a1468c289f27bd8ee8af3 \ - " -SRC_URI += " \ - git://opendev.org/starlingx/config-files.git;protocol=https;destsuffix=${DSTSUFX0};branch="r/stx.3.0";subpath=${SUBPATH0};name=opendev \ - git://opendev.org/starlingx/config-files.git;protocol=https;destsuffix=${DSTSUFX1};branch="r/stx.3.0";subpath=${SUBPATH1};name=opendev \ + file://${STX_METADATA_PATH}/${STX_SUBPATH0}/files/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ + file://${STX_METADATA_PATH}/${STX_SUBPATH1}/centos/util-linux-config.spec;beginline=1;endline=10;md5=5801a9b9ee2a1468c289f27bd8ee8af3 \ " -do_unpack_append() { - bb.build.exec_func('do_copy_config_files', d) -} - -do_copy_config_files () { - cp -pf ${WORKDIR}/stx-configfiles/files/LICENSE ${S}/stx-configfiles-LICENSE - cp -pf ${WORKDIR}/stx-util-linux/centos/util-linux-config.spec ${S}/stx-util-linux-LICENSE -} do_install_append_class-target () { install -d ${D}/${sysconfdir}/pam.d - install -m 644 ${WORKDIR}/stx-util-linux/files/stx.su ${D}/${sysconfdir}/pam.d/su - install -m 644 ${WORKDIR}/stx-util-linux/files/stx.login ${D}/${sysconfdir}/pam.d/login + install -m 644 ${STX_METADATA_PATH}/${STX_SUBPATH1}/files/stx.su ${D}/${sysconfdir}/pam.d/su + install -m 644 ${STX_METADATA_PATH}/${STX_SUBPATH1}/files/stx.login ${D}/${sysconfdir}/pam.d/login - install -D -m644 ${WORKDIR}/${DSTSUFX0}/files/login.defs ${D}/${sysconfdir}/login.defs - install -D -m644 ${WORKDIR}/${DSTSUFX0}/files/clear_shadow_locks.service \ + install -D -m644 ${STX_METADATA_PATH}/${STX_SUBPATH0}/files/login.defs ${D}/${sysconfdir}/login.defs + install -D -m644 ${STX_METADATA_PATH}/${STX_SUBPATH0}/files/clear_shadow_locks.service \ ${D}/${systemd_system_unitdir}/clear_shadow_locks.service } -- 2.16.6