From 2fd7d33f1cbcb483824686e36cc49a0cede920de4df7b29f2cb3ef702f416007 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Tue, 6 Feb 2024 11:25:22 +0000 Subject: [PATCH] Accepting request 1144539 from home:deneb_alpha:branches:home:cbosdonnat:branches:systemsmanagement:Uyuni:Master Replace %ARCH% with the architecture in images for supporting subscriptions in SCC based on architectures OBS-URL: https://build.opensuse.org/request/show/1144539 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-kiwi_metainfo_helper?expand=0&rev=36 --- README | 1 + kiwi_metainfo_helper | 3 +++ obs-service-kiwi_metainfo_helper.changes | 6 ++++++ obs-service-kiwi_metainfo_helper.spec | 2 +- test.sh | 6 ++++++ 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/README b/README index 58b3a23..ef944b9 100644 --- a/README +++ b/README @@ -12,6 +12,7 @@ build-specific metainfo. | %SOURCEURL% | Source url for container recipe (IBS) | https://sources.suse.com/SUSE:SLE-15:Update:CR/sles15-image/2951b67133dd6384cacb28203174e030/ | | %RELEASE% | The OBS release number (.) | 4.2 | | %BUILDTIME% | $(date --utc +%FT%T.%NZ) | 2018-10-30T09:19:02.074934628Z | +| %ARCH% | The architecture of the image | aarch64 | | %OS_VERSION% | VERSION in the os-release file | 15-SP3 | | %OS_VERSION_NO_DASH% | VERSION in the os-release file, with space (SLE only) | 15 SP3 | | %OS_VERSION_ID% | VERSION_ID in the os-release file | 15 | diff --git a/kiwi_metainfo_helper b/kiwi_metainfo_helper index 73a2a44..95f1fc3 100644 --- a/kiwi_metainfo_helper +++ b/kiwi_metainfo_helper @@ -11,6 +11,7 @@ fi BUILD_DATA="${BUILD_DIST/.dist/.data}" if [ -e "${BUILD_DATA}" ]; then . "${BUILD_DATA}" + BUILD_ARCH="${BUILD_ARCH%%:*}" # The build script renames the recipe (to strip _service:foo:), but doesn't update .data RECIPEFILE="${RECIPEFILE##*:}" @@ -25,6 +26,7 @@ else echo "Warning: No build data found - chroot build?" DISTURL="local" RELEASE=0 + BUILD_ARCH="noarch" # Guess the build recipe files=(*.kiwi Dockerfile* Chart.yaml*) @@ -129,4 +131,5 @@ sed -i"" \ -e "s#%DISTURL%#${DISTURL}#g" \ -e "s#%SOURCEURL%#${SOURCEURL}#g" \ -e "s/%RELEASE%/${RELEASE}/g" \ + -e "s/%ARCH%/${BUILD_ARCH}/g" \ -e "s/%BUILDTIME%/$(date --utc +%FT%T.%NZ)/g" "${files[@]}" diff --git a/obs-service-kiwi_metainfo_helper.changes b/obs-service-kiwi_metainfo_helper.changes index 4da0780..ac4380e 100644 --- a/obs-service-kiwi_metainfo_helper.changes +++ b/obs-service-kiwi_metainfo_helper.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 1 15:54:12 UTC 2024 - Marina Latini + +- Replace %ARCH% with the architecture in images for supporting + subscriptions in SCC based on architectures + ------------------------------------------------------------------- Fri Sep 15 13:08:03 UTC 2023 - Michal Suchanek diff --git a/obs-service-kiwi_metainfo_helper.spec b/obs-service-kiwi_metainfo_helper.spec index 8a8e2f7..750f34a 100644 --- a/obs-service-kiwi_metainfo_helper.spec +++ b/obs-service-kiwi_metainfo_helper.spec @@ -1,7 +1,7 @@ # # spec file for package obs-service-kiwi_metainfo_helper # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/test.sh b/test.sh index 9249713..14fd5c6 100644 --- a/test.sh +++ b/test.sh @@ -25,6 +25,7 @@ cat >.data <.data <Dockerfile <