forked from pool/obs-service-kiwi_metainfo_helper
Accepting request 962099 from home:fcrozat:branches:openSUSE:Tools
- Generate OS_VERSION_NO_DASH based on os-release VERSION, as workaround to replace dash with space in OS name (bsc#1195061). - Bump version to 0.6 OBS-URL: https://build.opensuse.org/request/show/962099 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-kiwi_metainfo_helper?expand=0&rev=30
This commit is contained in:
parent
34a9416822
commit
0e214541cb
3
README
3
README
@ -6,13 +6,14 @@ build recipe (.kiwi, Dockerfile, Chart.yaml) to replace placeholders with
|
|||||||
build-specific metainfo.
|
build-specific metainfo.
|
||||||
|
|
||||||
| Placeholder | Value | Example |
|
| Placeholder | Value | Example |
|
||||||
|--------------------------------------|----------------------------------------------- |-------------------------------------------------------------------------------------------------------------------------|
|
|--------------------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|
|
||||||
| %DISTURL% | The OBS dist url | obs://build.opensuse.org/openSUSE:Factory/images/0f40c57dd619e1dff9e512949b6bca09-opensuse-tumbleweed-image |
|
| %DISTURL% | The OBS dist url | obs://build.opensuse.org/openSUSE:Factory/images/0f40c57dd619e1dff9e512949b6bca09-opensuse-tumbleweed-image |
|
||||||
| %SOURCEURL% | Source url for container recipe (OBS) | https://build.opensuse.org/package/show/openSUSE:Factory/opensuse-tumbleweed-image?rev=0f40c57dd619e1dff9e512949b6bca09 |
|
| %SOURCEURL% | Source url for container recipe (OBS) | https://build.opensuse.org/package/show/openSUSE:Factory/opensuse-tumbleweed-image?rev=0f40c57dd619e1dff9e512949b6bca09 |
|
||||||
| %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 |
|
||||||
| %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_ID% | VERSION_ID in the os-release file | 15 |
|
| %OS_VERSION_ID% | VERSION_ID in the os-release file | 15 |
|
||||||
| %OS_VERSION_ID_SP% | Like VERSION_ID, but with SP (SLE only) | 15.3 |
|
| %OS_VERSION_ID_SP% | Like VERSION_ID, but with SP (SLE only) | 15.3 |
|
||||||
| %OS_PRETTY_NAME% | PRETTY_NAME in the os-release file | SUSE Linux Enterprise Server 15 SP3 (Snapshot16) |
|
| %OS_PRETTY_NAME% | PRETTY_NAME in the os-release file | SUSE Linux Enterprise Server 15 SP3 (Snapshot16) |
|
||||||
|
@ -78,6 +78,7 @@ if grep -q "%OS_" ${files[@]}; then
|
|||||||
[ -f "${tempdir}/etc/os-release" ] && . "${tempdir}/etc/os-release"
|
[ -f "${tempdir}/etc/os-release" ] && . "${tempdir}/etc/os-release"
|
||||||
|
|
||||||
VERSION="${VERSION:-}"
|
VERSION="${VERSION:-}"
|
||||||
|
VERSION_NO_DASH="${VERSION/-/ }"
|
||||||
# Special case for SLE X "SP 0", make sure it has .0
|
# Special case for SLE X "SP 0", make sure it has .0
|
||||||
VERSION_ID_SP="${VERSION_ID}"
|
VERSION_ID_SP="${VERSION_ID}"
|
||||||
[[ "${VERSION_ID_SP%}" == *"."* ]] || VERSION_ID_SP="${VERSION_ID}.0"
|
[[ "${VERSION_ID_SP%}" == *"."* ]] || VERSION_ID_SP="${VERSION_ID}.0"
|
||||||
@ -120,6 +121,7 @@ if grep -q "%OS_" ${files[@]}; then
|
|||||||
-e "s/%OS_PRETTY_NAME_BEFORE_PAREN%/${PRETTY_NAME_BEFORE_PAREN}/g" \
|
-e "s/%OS_PRETTY_NAME_BEFORE_PAREN%/${PRETTY_NAME_BEFORE_PAREN}/g" \
|
||||||
-e "s/%OS_PRETTY_NAME_BEFORE_PAREN_DASHED%/${PRETTY_NAME_BEFORE_PAREN_DASHED}/g" \
|
-e "s/%OS_PRETTY_NAME_BEFORE_PAREN_DASHED%/${PRETTY_NAME_BEFORE_PAREN_DASHED}/g" \
|
||||||
-e "s/%OS_VERSION%/${VERSION}/g" \
|
-e "s/%OS_VERSION%/${VERSION}/g" \
|
||||||
|
-e "s/%OS_VERSION_NO_DASH%/${VERSION_NO_DASH}/g" \
|
||||||
-e "s/%OS_VERSION_ID_SP%/${VERSION_ID_SP}/g" "${files[@]}"
|
-e "s/%OS_VERSION_ID_SP%/${VERSION_ID_SP}/g" "${files[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 15 11:03:50 UTC 2022 - Frederic Crozat <fcrozat@suse.com>
|
||||||
|
|
||||||
|
- Generate OS_VERSION_NO_DASH based on os-release VERSION,
|
||||||
|
as workaround to replace dash with space in OS name
|
||||||
|
(bsc#1195061).
|
||||||
|
- Bump version to 0.6
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Feb 8 16:10:01 UTC 2022 - Frederic Crozat <fcrozat@suse.com>
|
Tue Feb 8 16:10:01 UTC 2022 - Frederic Crozat <fcrozat@suse.com>
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: obs-service-kiwi_metainfo_helper
|
Name: obs-service-kiwi_metainfo_helper
|
||||||
Version: 0.5
|
Version: 0.6
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Service for substituting various variables in build recipes
|
Summary: Service for substituting various variables in build recipes
|
||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
|
2
test.sh
2
test.sh
@ -34,6 +34,7 @@ SOURCEURL=%SOURCEURL%
|
|||||||
RELEASE=%RELEASE%
|
RELEASE=%RELEASE%
|
||||||
BUILDTIME=%BUILDTIME%
|
BUILDTIME=%BUILDTIME%
|
||||||
OS_VERSION=%OS_VERSION%
|
OS_VERSION=%OS_VERSION%
|
||||||
|
OS_VERSION_NO_DASH=%OS_VERSION_NO_DASH%
|
||||||
OS_VERSION_ID=%OS_VERSION_ID%
|
OS_VERSION_ID=%OS_VERSION_ID%
|
||||||
OS_VERSION_ID_SP=%OS_VERSION_ID_SP%
|
OS_VERSION_ID_SP=%OS_VERSION_ID_SP%
|
||||||
OS_PRETTY_NAME=%OS_PRETTY_NAME%
|
OS_PRETTY_NAME=%OS_PRETTY_NAME%
|
||||||
@ -51,6 +52,7 @@ SOURCEURL=https://build.opensuse.org/package/show/openSUSE:Factory/opensuse-tumb
|
|||||||
RELEASE=4.2
|
RELEASE=4.2
|
||||||
BUILDTIME=2018-10-30T09:19:02.074934628Z
|
BUILDTIME=2018-10-30T09:19:02.074934628Z
|
||||||
OS_VERSION=15-SP4
|
OS_VERSION=15-SP4
|
||||||
|
OS_VERSION_NO_DASH=15 SP4
|
||||||
OS_VERSION_ID=15.4
|
OS_VERSION_ID=15.4
|
||||||
OS_VERSION_ID_SP=15.4
|
OS_VERSION_ID_SP=15.4
|
||||||
OS_PRETTY_NAME=SUSE Linux Enterprise Server 15 SP4
|
OS_PRETTY_NAME=SUSE Linux Enterprise Server 15 SP4
|
||||||
|
Loading…
Reference in New Issue
Block a user