Hello community,
here is the log from the commit of package obs-service-kiwi_metainfo_helper for
openSUSE:Factory checked in at 2019-01-21 10:55:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/obs-service-kiwi_metainfo_helper (Old)
and
/work/SRC/openSUSE:Factory/.obs-service-kiwi_metainfo_helper.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "obs-service-kiwi_metainfo_helper"
Mon Jan 21 10:55:15 2019 rev:2 rq:666180 version:0.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/obs-service-kiwi_metainfo_helper/obs-service-kiwi_metainfo_helper.changes
2019-01-11 14:05:10.443819067 +0100
+++
/work/SRC/openSUSE:Factory/.obs-service-kiwi_metainfo_helper.new.28833/obs-service-kiwi_metainfo_helper.changes
2019-01-21 10:55:21.803655720 +0100
@@ -1,0 +2,5 @@
+Thu Jan 10 15:42:38 UTC 2019 - Fabian Vogt <[email protected]>
+
+- Add %OS_VERSION_ID(_SP)% and %PRETTY_NAME% (boo#1119378)
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ obs-service-kiwi_metainfo_helper.spec ++++++
--- /var/tmp/diff_new_pack.VAba4C/_old 2019-01-21 10:55:22.607654752 +0100
+++ /var/tmp/diff_new_pack.VAba4C/_new 2019-01-21 10:55:22.607654752 +0100
@@ -27,6 +27,12 @@
Source1: kiwi_metainfo_helper
Source2: README
Requires: sed
+# For os-release
+%if 0%{?is_opensuse}
+Requires: openSUSE-release
+%else
+Requires: sles-release
+%endif
BuildArch: noarch
%description
++++++ README ++++++
--- /var/tmp/diff_new_pack.VAba4C/_old 2019-01-21 10:55:22.635654718 +0100
+++ /var/tmp/diff_new_pack.VAba4C/_new 2019-01-21 10:55:22.639654713 +0100
@@ -4,8 +4,10 @@
This service can be enabled to run during buildtime, when it will edit the
kiwi image description to replace placeholders with build-specific metainfo.
-| Placeholder| Value | Example
|
-|------------|--------------------------------------------|-----------------------------------------------------------------------------------------------|
-| %DISTURL% | The OBS dist url |
obs://build.suse.de/SUSE:SLE-15:Update:CR/images/2951b67133dd6384cacb28203174e030-sles15-image|
-| %RELEASE% | The OBS release number (<cicnt\>.<bldcnt\>)| 4.2
|
-| %BUILDTIME%| $(date --utc +%FT%T.%NZ) |
2018-10-30T09:19:02.074934628Z
|
+| Placeholder | Value | Example
|
+|--------------------|--------------------------------------------|-----------------------------------------------------------------------------------------------|
+| %DISTURL% | The OBS dist url |
obs://build.suse.de/SUSE:SLE-15:Update:CR/images/2951b67133dd6384cacb28203174e030-sles15-image|
+| %RELEASE% | The OBS release number (<cicnt\>.<bldcnt\>)| 4.2
|
+| %BUILDTIME% | $(date --utc +%FT%T.%NZ) |
2018-10-30T09:19:02.074934628Z
|
+| %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
|
++++++ kiwi_metainfo_helper ++++++
--- /var/tmp/diff_new_pack.VAba4C/_old 2019-01-21 10:55:22.647654704 +0100
+++ /var/tmp/diff_new_pack.VAba4C/_new 2019-01-21 10:55:22.647654704 +0100
@@ -17,3 +17,15 @@
sed -i"" "s#%DISTURL%#${DISTURL}#g" "${RECIPEFILE}"
sed -i"" "s/%RELEASE%/${RELEASE}/g" "${RECIPEFILE}"
sed -i"" "s/%BUILDTIME%/$(date --utc +%FT%T.%NZ)/g" "${RECIPEFILE}"
+
+[ -f /usr/lib/os-release ] && . /usr/lib/os-release
+[ -f /etc/os-release ] && . /etc/os-release
+
+sed -i"" "s/%OS_VERSION_ID%/${VERSION_ID}/g" "${RECIPEFILE}"
+sed -i"" "s/%OS_PRETTY_NAME%/${PRETTY_NAME}/g" "${RECIPEFILE}"
+
+# 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"
+
+sed -i"" "s/%OS_VERSION_ID_SP%/${VERSION_ID_SP}/g" "${RECIPEFILE}"