1
0
Ana Guerrero 2024-02-07 17:47:23 +00:00 committed by Git OBS Bridge
commit c0d16915df
5 changed files with 17 additions and 1 deletions

1
README
View File

@ -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 (<cicnt\>.<bldcnt\>) | 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 |

View File

@ -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[@]}"

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Feb 1 15:54:12 UTC 2024 - Marina Latini <marina.latini@suse.com>
- 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 <msuchanek@suse.com>

View File

@ -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

View File

@ -25,6 +25,7 @@ cat >.data <<EOF
DISTURL="obs://build.opensuse.org/openSUSE:Factory/images/0f40c57dd619e1dff9e512949b6bca09-opensuse-tumbleweed-image:docker"
RELEASE=4.2
RECIPEFILE=_service:foobar:Dockerfile
BUILD_ARCH=aarch64:aarch64_ilp32:armv8l
EOF
export BUILD_DIST=.dist
@ -33,6 +34,7 @@ DISTURL=%DISTURL%
SOURCEURL=%SOURCEURL%
RELEASE=%RELEASE%
BUILDTIME=%BUILDTIME%
ARCH=%ARCH%
OS_VERSION=%OS_VERSION%
OS_VERSION_NO_DASH=%OS_VERSION_NO_DASH%
OS_VERSION_ID=%OS_VERSION_ID%
@ -51,6 +53,7 @@ DISTURL=obs://build.opensuse.org/openSUSE:Factory/images/0f40c57dd619e1dff9e5129
SOURCEURL=https://build.opensuse.org/package/show/openSUSE:Factory/opensuse-tumbleweed-image?rev=0f40c57dd619e1dff9e512949b6bca09
RELEASE=4.2
BUILDTIME=2018-10-30T09:19:02.074934628Z
ARCH=aarch64
OS_VERSION=15-SP4
OS_VERSION_NO_DASH=15 SP4
OS_VERSION_ID=15.4
@ -67,6 +70,7 @@ cat >.data <<EOF
DISTURL="obs://build.suse.de/SUSE:SLE-15-SP3:Update:CR/images/5f0a221b7877396cbf977205e64690d2-sles15-image"
RELEASE=4.2
RECIPEFILE=_service:foobar:Dockerfile
BUILD_ARCH=aarch64:aarch64_ilp32:armv8l
EOF
cat >Dockerfile <<EOF
@ -89,6 +93,7 @@ DISTURL=%DISTURL%
SOURCEURL=%SOURCEURL%
RELEASE=%RELEASE%
BUILDTIME=%BUILDTIME%
ARCH=%ARCH%
EOF
bash "${script}"
@ -98,4 +103,5 @@ DISTURL=local
SOURCEURL=https://local/package/show/local/local?rev=local
RELEASE=0
BUILDTIME=2018-10-30T09:19:02.074934628Z
ARCH=noarch
EOF