forked from pool/obs-service-kiwi_metainfo_helper
Accepting request 1144543 from openSUSE:Tools
OBS-URL: https://build.opensuse.org/request/show/1144543 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/obs-service-kiwi_metainfo_helper?expand=0&rev=16
This commit is contained in:
commit
c0d16915df
1
README
1
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/ |
|
| %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 |
|
| %RELEASE% | The OBS release number (<cicnt\>.<bldcnt\>) | 4.2 |
|
||||||
| %BUILDTIME% | $(date --utc +%FT%T.%NZ) | 2018-10-30T09:19:02.074934628Z |
|
| %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% | 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_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 |
|
| %OS_VERSION_ID% | VERSION_ID in the os-release file | 15 |
|
||||||
|
@ -11,6 +11,7 @@ fi
|
|||||||
BUILD_DATA="${BUILD_DIST/.dist/.data}"
|
BUILD_DATA="${BUILD_DIST/.dist/.data}"
|
||||||
if [ -e "${BUILD_DATA}" ]; then
|
if [ -e "${BUILD_DATA}" ]; then
|
||||||
. "${BUILD_DATA}"
|
. "${BUILD_DATA}"
|
||||||
|
BUILD_ARCH="${BUILD_ARCH%%:*}"
|
||||||
|
|
||||||
# The build script renames the recipe (to strip _service:foo:), but doesn't update .data
|
# The build script renames the recipe (to strip _service:foo:), but doesn't update .data
|
||||||
RECIPEFILE="${RECIPEFILE##*:}"
|
RECIPEFILE="${RECIPEFILE##*:}"
|
||||||
@ -25,6 +26,7 @@ else
|
|||||||
echo "Warning: No build data found - chroot build?"
|
echo "Warning: No build data found - chroot build?"
|
||||||
DISTURL="local"
|
DISTURL="local"
|
||||||
RELEASE=0
|
RELEASE=0
|
||||||
|
BUILD_ARCH="noarch"
|
||||||
|
|
||||||
# Guess the build recipe
|
# Guess the build recipe
|
||||||
files=(*.kiwi Dockerfile* Chart.yaml*)
|
files=(*.kiwi Dockerfile* Chart.yaml*)
|
||||||
@ -129,4 +131,5 @@ sed -i"" \
|
|||||||
-e "s#%DISTURL%#${DISTURL}#g" \
|
-e "s#%DISTURL%#${DISTURL}#g" \
|
||||||
-e "s#%SOURCEURL%#${SOURCEURL}#g" \
|
-e "s#%SOURCEURL%#${SOURCEURL}#g" \
|
||||||
-e "s/%RELEASE%/${RELEASE}/g" \
|
-e "s/%RELEASE%/${RELEASE}/g" \
|
||||||
|
-e "s/%ARCH%/${BUILD_ARCH}/g" \
|
||||||
-e "s/%BUILDTIME%/$(date --utc +%FT%T.%NZ)/g" "${files[@]}"
|
-e "s/%BUILDTIME%/$(date --utc +%FT%T.%NZ)/g" "${files[@]}"
|
||||||
|
@ -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>
|
Fri Sep 15 13:08:03 UTC 2023 - Michal Suchanek <msuchanek@suse.com>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package obs-service-kiwi_metainfo_helper
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
6
test.sh
6
test.sh
@ -25,6 +25,7 @@ cat >.data <<EOF
|
|||||||
DISTURL="obs://build.opensuse.org/openSUSE:Factory/images/0f40c57dd619e1dff9e512949b6bca09-opensuse-tumbleweed-image:docker"
|
DISTURL="obs://build.opensuse.org/openSUSE:Factory/images/0f40c57dd619e1dff9e512949b6bca09-opensuse-tumbleweed-image:docker"
|
||||||
RELEASE=4.2
|
RELEASE=4.2
|
||||||
RECIPEFILE=_service:foobar:Dockerfile
|
RECIPEFILE=_service:foobar:Dockerfile
|
||||||
|
BUILD_ARCH=aarch64:aarch64_ilp32:armv8l
|
||||||
EOF
|
EOF
|
||||||
export BUILD_DIST=.dist
|
export BUILD_DIST=.dist
|
||||||
|
|
||||||
@ -33,6 +34,7 @@ DISTURL=%DISTURL%
|
|||||||
SOURCEURL=%SOURCEURL%
|
SOURCEURL=%SOURCEURL%
|
||||||
RELEASE=%RELEASE%
|
RELEASE=%RELEASE%
|
||||||
BUILDTIME=%BUILDTIME%
|
BUILDTIME=%BUILDTIME%
|
||||||
|
ARCH=%ARCH%
|
||||||
OS_VERSION=%OS_VERSION%
|
OS_VERSION=%OS_VERSION%
|
||||||
OS_VERSION_NO_DASH=%OS_VERSION_NO_DASH%
|
OS_VERSION_NO_DASH=%OS_VERSION_NO_DASH%
|
||||||
OS_VERSION_ID=%OS_VERSION_ID%
|
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
|
SOURCEURL=https://build.opensuse.org/package/show/openSUSE:Factory/opensuse-tumbleweed-image?rev=0f40c57dd619e1dff9e512949b6bca09
|
||||||
RELEASE=4.2
|
RELEASE=4.2
|
||||||
BUILDTIME=2018-10-30T09:19:02.074934628Z
|
BUILDTIME=2018-10-30T09:19:02.074934628Z
|
||||||
|
ARCH=aarch64
|
||||||
OS_VERSION=15-SP4
|
OS_VERSION=15-SP4
|
||||||
OS_VERSION_NO_DASH=15 SP4
|
OS_VERSION_NO_DASH=15 SP4
|
||||||
OS_VERSION_ID=15.4
|
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"
|
DISTURL="obs://build.suse.de/SUSE:SLE-15-SP3:Update:CR/images/5f0a221b7877396cbf977205e64690d2-sles15-image"
|
||||||
RELEASE=4.2
|
RELEASE=4.2
|
||||||
RECIPEFILE=_service:foobar:Dockerfile
|
RECIPEFILE=_service:foobar:Dockerfile
|
||||||
|
BUILD_ARCH=aarch64:aarch64_ilp32:armv8l
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat >Dockerfile <<EOF
|
cat >Dockerfile <<EOF
|
||||||
@ -89,6 +93,7 @@ DISTURL=%DISTURL%
|
|||||||
SOURCEURL=%SOURCEURL%
|
SOURCEURL=%SOURCEURL%
|
||||||
RELEASE=%RELEASE%
|
RELEASE=%RELEASE%
|
||||||
BUILDTIME=%BUILDTIME%
|
BUILDTIME=%BUILDTIME%
|
||||||
|
ARCH=%ARCH%
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
bash "${script}"
|
bash "${script}"
|
||||||
@ -98,4 +103,5 @@ DISTURL=local
|
|||||||
SOURCEURL=https://local/package/show/local/local?rev=local
|
SOURCEURL=https://local/package/show/local/local?rev=local
|
||||||
RELEASE=0
|
RELEASE=0
|
||||||
BUILDTIME=2018-10-30T09:19:02.074934628Z
|
BUILDTIME=2018-10-30T09:19:02.074934628Z
|
||||||
|
ARCH=noarch
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user