From 192e721c9758b2230a8df393c3b2b1b4698d2dc5 Mon Sep 17 00:00:00 2001 From: Heitor Matsui Date: Thu, 10 Aug 2023 16:57:03 -0300 Subject: [PATCH] Create metadata file for GA release This commit creates a metadata file for the GA release in the same format as the patches metadata, so that the USM framework is able to recognize the GA load and use it's information. Test Plan PASS: build-pkgs and build-image successfully PASS: install the designer iso and verify the GA release metadata file exists and contain the expected information Story: 2010676 Task: 48596 Change-Id: I27c36802d7f5f358b64a0d8368b34c92bf656f1b Signed-off-by: Heitor Matsui --- software/debian/deb_folder/control | 5 +++-- software/debian/deb_folder/rules | 8 ++++++++ software/service-files/STX_GA-metadata.xml | 18 ++++++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 software/service-files/STX_GA-metadata.xml diff --git a/software/debian/deb_folder/control b/software/debian/deb_folder/control index 7ab373d6..334bc6e0 100644 --- a/software/debian/deb_folder/control +++ b/software/debian/deb_folder/control @@ -6,10 +6,11 @@ Build-Depends: debhelper-compat (= 13), dh-python, python3-all, python3-setuptools, - python3-wheel + python3-wheel, + build-info-dev Build-Depends-Indep: python3-keystonemiddleware, - python3-oslo.config + python3-oslo.config Standards-Version: 4.5.1 Homepage: https://www.starlingx.io Rules-Requires-Root: no diff --git a/software/debian/deb_folder/rules b/software/debian/deb_folder/rules index fddd8781..28242507 100755 --- a/software/debian/deb_folder/rules +++ b/software/debian/deb_folder/rules @@ -5,10 +5,16 @@ export PBR_VERSION=1.0.0 PMONDIR := ${ROOT}/usr/share/starlingx/pmon.d ROOT := $(CURDIR)/debian/tmp +export PLATFORM_RELEASE="$(shell grep SW_VERSION /usr/include/build_info.h | cut -d ' ' -f 3)" +export METADATA_FILE="STX_${PLATFORM_RELEASE}_GA-metadata.xml" %: dh $@ --with python3 --buildsystem=pybuild +override_dh_auto_build: + cp service-files/STX_GA-metadata.xml ${METADATA_FILE} + sed -i "s/xxxPLATFORM_RELEASExxx/${PLATFORM_RELEASE}/g" ${METADATA_FILE} + override_dh_install: python3 setup.py install -f --install-layout=deb --root=$(ROOT) python3 setup.py bdist_wheel --universal -d $(CURDIR)/debian/$(PYBUILD_NAME)-wheels/usr/share/python-wheels @@ -59,4 +65,6 @@ override_dh_install: ${ROOT}/etc/logrotate.d/software install -m 755 scripts/platform-upgrade-precheck \ ${ROOT}/usr/sbin/platform-upgrade-precheck + install -m 444 ${METADATA_FILE} \ + ${ROOT}/etc/software/${METADATA_FILE} dh_install diff --git a/software/service-files/STX_GA-metadata.xml b/software/service-files/STX_GA-metadata.xml new file mode 100644 index 00000000..dc30dbb2 --- /dev/null +++ b/software/service-files/STX_GA-metadata.xml @@ -0,0 +1,18 @@ + + + STX_xxxPLATFORM_RELEASExxx_GA + xxxPLATFORM_RELEASExxx + STX xxxPLATFORM_RELEASExxx GA release + STX xxxPLATFORM_RELEASExxx major GA release + + + REL + Y + Y + + + + + + +