1
0

Accepting request 948973 from openSUSE:Tools

- Generate OS_VERSION based on os-release VERSION (bsc#1195061).
- Bump version to 0.5

OBS-URL: https://build.opensuse.org/request/show/948973
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/obs-service-kiwi_metainfo_helper?expand=0&rev=11
This commit is contained in:
Dominique Leuenberger 2022-01-26 20:26:41 +00:00 committed by Git OBS Bridge
commit 2ca48e6a57
5 changed files with 12 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 |
| %OS_VERSION% | VERSION 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.0 |
| %OS_PRETTY_NAME% | PRETTY_NAME in the os-release file | SUSE Linux Enterprise Server 15 SP3 (Snapshot16) |

View File

@ -77,6 +77,7 @@ if grep -q "%OS_" ${files[@]}; then
[ -f "${tempdir}/usr/lib/os-release" ] && . "${tempdir}/usr/lib/os-release"
[ -f "${tempdir}/etc/os-release" ] && . "${tempdir}/etc/os-release"
VERSION="${VERSION:-}"
# Special case for SLE X "SP 0", make sure it has .0
VERSION_ID_SP="${VERSION_ID}"
[[ "${VERSION_ID_SP%}" == *"."* ]] || VERSION_ID_SP="${VERSION_ID}.0"
@ -118,6 +119,7 @@ if grep -q "%OS_" ${files[@]}; then
-e "s/%OS_PRETTY_NAME_DASHED%/${PRETTY_NAME_DASHED}/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_VERSION%/${VERSION}/g" \
-e "s/%OS_VERSION_ID_SP%/${VERSION_ID_SP}/g" "${files[@]}"
fi

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jan 24 09:36:17 UTC 2022 - Frederic Crozat <fcrozat@suse.com>
- Generate OS_VERSION based on os-release VERSION (bsc#1195061).
- Bump version to 0.5
-------------------------------------------------------------------
Mon Jan 17 09:57:02 UTC 2022 - Fabian Vogt <fvogt@suse.com>

View File

@ -17,7 +17,7 @@
Name: obs-service-kiwi_metainfo_helper
Version: 0.4
Version: 0.5
Release: 0
Summary: Service for substituting various variables in build recipes
License: GPL-2.0-or-later

View File

@ -33,6 +33,7 @@ DISTURL=%DISTURL%
SOURCEURL=%SOURCEURL%
RELEASE=%RELEASE%
BUILDTIME=%BUILDTIME%
OS_VERSION=%OS_VERSION%
OS_VERSION_ID=%OS_VERSION_ID%
OS_VERSION_ID_SP=%OS_VERSION_ID_SP%
OS_PRETTY_NAME=%OS_PRETTY_NAME%
@ -49,6 +50,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
OS_VERSION=15-SP4
OS_VERSION_ID=15.4
OS_VERSION_ID_SP=15.4
OS_PRETTY_NAME=SUSE Linux Enterprise Server 15 SP4