1
0

Accepting request 948424 from home:fcrozat:branches: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/948424
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-kiwi_metainfo_helper?expand=0&rev=27
This commit is contained in:
Fabian Vogt 2022-01-24 15:02:01 +00:00 committed by Git OBS Bridge
parent 0250501b3c
commit e9cd211f28
4 changed files with 11 additions and 0 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/ | | %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 |
| %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.0 | | %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) | | %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}/usr/lib/os-release" ] && . "${tempdir}/usr/lib/os-release"
[ -f "${tempdir}/etc/os-release" ] && . "${tempdir}/etc/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 # 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"
@ -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_DASHED%/${PRETTY_NAME_DASHED}/g" \
-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_ID_SP%/${VERSION_ID_SP}/g" "${files[@]}" -e "s/%OS_VERSION_ID_SP%/${VERSION_ID_SP}/g" "${files[@]}"
fi 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> Mon Jan 17 09:57:02 UTC 2022 - Fabian Vogt <fvogt@suse.com>

View File

@ -33,6 +33,7 @@ DISTURL=%DISTURL%
SOURCEURL=%SOURCEURL% SOURCEURL=%SOURCEURL%
RELEASE=%RELEASE% RELEASE=%RELEASE%
BUILDTIME=%BUILDTIME% BUILDTIME=%BUILDTIME%
OS_VERSION=%OS_VERSION%
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%
@ -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 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
OS_VERSION=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