base-files: update for stx 5.0 69/8269/1
authorJackie Huang <jackie.huang@windriver.com>
Wed, 12 May 2021 08:26:46 +0000 (16:26 +0800)
committerJackie Huang <jackie.huang@windriver.com>
Thu, 12 May 2022 13:43:54 +0000 (21:43 +0800)
* 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

Issue-ID: INF-215

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: I6d8861c611788fbc7201e165ea278d38ffd6a01d

meta-starlingx/meta-stx-integ/recipes-core/base-files/base-files_%.bbappend

index a0281d4..e28eaf7 100644 (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 \
-        "
-
-SRC_URI += " \
-        git://opendev.org/starlingx/config-files.git;protocol=https;destsuffix=${DSTSUFX0};branch="r/stx.3.0";subpath=${SUBPATH0};name=opendev \
+        file://${STX_METADATA_PATH}/${STX_SUBPATH0}/centos/setup-config.spec;beginline=1;endline=10;md5=0ba4936433e3eb7acdd7d236af0d2496 \
         "
 
-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*
 }