base-files: 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

* install the issue* files from sub-dir
  centos-release-config

Story: 2008952
Task: 42576

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

View File

@ -1,31 +1,22 @@
SRCREV_FORMAT = "opendev"
SRCREV_opendev = "d778e862571957ece3c404c0c37d325769772fde"
SUBPATH0 = "setup-config"
DSTSUFX0 = "stx-configfiles"
inherit stx-metadata
STX_REPO = "config-files"
STX_SUBPATH0 = "setup-config"
STX_SUBPATH1 = "centos-release-config"
LICENSE_append = "& Apache-2.0"
LIC_FILES_CHKSUM += "\
file://stx-configfiles-LICENSE;beginline=1;endline=10;md5=0ba4936433e3eb7acdd7d236af0d2496 \
file://${STX_METADATA_PATH}/${STX_SUBPATH0}/centos/setup-config.spec;beginline=1;endline=10;md5=0ba4936433e3eb7acdd7d236af0d2496 \
"
SRC_URI += " \
git://opendev.org/starlingx/config-files.git;protocol=https;destsuffix=${DSTSUFX0};branch="r/stx.3.0";subpath=${SUBPATH0};name=opendev \
"
do_unpack_append() {
bb.build.exec_func('do_copy_config_files', d)
}
do_copy_config_files () {
cp -pf ${WORKDIR}/stx-configfiles/centos/setup-config.spec ${S}/stx-configfiles-LICENSE
}
do_install_append() {
install -d ${D}/${sysconfdir}/profile.d
install -m 644 ${WORKDIR}/${DSTSUFX0}/files/motd ${D}/${sysconfdir}/motd
install -m 644 ${WORKDIR}/${DSTSUFX0}/files/prompt.sh ${D}/${sysconfdir}/profile.d/prompt.sh
install -m 644 ${WORKDIR}/${DSTSUFX0}/files/custom.sh ${D}/${sysconfdir}/profile.d/custom.sh
# chmod 600 ${D}/{sysconfdir}/exports
# chmod 600 ${D}/{sysconfdir}/fstab
install -m 644 ${STX_METADATA_PATH}/${STX_SUBPATH0}/files/motd ${D}/${sysconfdir}/motd
install -m 644 ${STX_METADATA_PATH}/${STX_SUBPATH0}/files/prompt.sh ${D}/${sysconfdir}/profile.d/prompt.sh
install -m 644 ${STX_METADATA_PATH}/${STX_SUBPATH0}/files/custom.sh ${D}/${sysconfdir}/profile.d/custom.sh
install -m 644 ${STX_METADATA_PATH}/${STX_SUBPATH1}/files/issue ${D}/${sysconfdir}/issue
install -m 644 ${STX_METADATA_PATH}/${STX_SUBPATH1}/files/issue.net ${D}/${sysconfdir}/issue.net
sed -i -e 's/@PLATFORM_RELEASE@/${STX_REL}/' ${D}${sysconfdir}/issue*
}