commit obs-service-kiwi_metainfo_helper for openSUSE:Factory
Hello community, here is the log from the commit of package obs-service-kiwi_metainfo_helper for openSUSE:Factory checked in at 2020-09-05 23:59:32 Comparing /work/SRC/openSUSE:Factory/obs-service-kiwi_metainfo_helper (Old) and /work/SRC/openSUSE:Factory/.obs-service-kiwi_metainfo_helper.new.3399 (New) Package is "obs-service-kiwi_metainfo_helper" Sat Sep 5 23:59:32 2020 rev:6 rq:831457 version:0.1 Changes: --- /work/SRC/openSUSE:Factory/obs-service-kiwi_metainfo_helper/obs-service-kiwi_metainfo_helper.changes 2020-09-01 20:06:53.316578952 +0200 +++ /work/SRC/openSUSE:Factory/.obs-service-kiwi_metainfo_helper.new.3399/obs-service-kiwi_metainfo_helper.changes 2020-09-05 23:59:59.379181347 +0200 @@ -1,0 +2,7 @@ +Tue Sep 1 08:42:45 UTC 2020 - Fabian Vogt + +- Use a boolean dep to avoid use of %{is_opensuse}. The prjconf + selects which one to use this way. +- Bump version to 0.1 + +--- @@ -10 +17 @@ -- Also allow working on Chart.yaml +- Also allow working on Chart.yaml (jsc#CAPS-5) @@ -21 +28 @@ -- Also allow working on Dockerfile +- Also allow working on Dockerfile (jsc#CAPS-10) Other differences: -- ++ obs-service-kiwi_metainfo_helper.spec ++ --- /var/tmp/diff_new_pack.pYDnNW/_old 2020-09-06 00:00:01.151182235 +0200 +++ /var/tmp/diff_new_pack.pYDnNW/_new 2020-09-06 00:00:01.155182236 +0200 @@ -17,7 +17,7 @@ Name: obs-service-kiwi_metainfo_helper -Version:0.0 +Version:0.1 Release:0 Summary:Service for substituting various variables in build recipes License:GPL-2.0-or-later @@ -27,12 +27,11 @@ Source1:kiwi_metainfo_helper Source2:README Requires: sed -# For os-release -%if 0%{?is_opensuse} -Requires: openSUSE-release -%else -Requires: sles-release -%endif +# Technically, this should read os-release inside the built image, but doing +# that is much more complex. As obsrepositories:// has to be used anyway, +# using the system's os-release is fine for now. +Requires: (sles-release or openSUSE-release) +Conflicts: dummy-release BuildArch: noarch %description
commit obs-service-kiwi_metainfo_helper for openSUSE:Factory
Hello community, here is the log from the commit of package obs-service-kiwi_metainfo_helper for openSUSE:Factory checked in at 2020-09-01 20:05:51 Comparing /work/SRC/openSUSE:Factory/obs-service-kiwi_metainfo_helper (Old) and /work/SRC/openSUSE:Factory/.obs-service-kiwi_metainfo_helper.new.3399 (New) Package is "obs-service-kiwi_metainfo_helper" Tue Sep 1 20:05:51 2020 rev:5 rq:829911 version:0.0 Changes: --- /work/SRC/openSUSE:Factory/obs-service-kiwi_metainfo_helper/obs-service-kiwi_metainfo_helper.changes 2020-07-15 11:11:58.688819180 +0200 +++ /work/SRC/openSUSE:Factory/.obs-service-kiwi_metainfo_helper.new.3399/obs-service-kiwi_metainfo_helper.changes 2020-09-01 20:06:53.316578952 +0200 @@ -1,0 +2,11 @@ +Thu Aug 27 07:12:48 UTC 2020 - Fabian Vogt + +- Fix grammar, update README and .service. Technically the name + should be changed as well, but that's just cosmetic. + +--- +Tue Aug 25 11:10:50 UTC 2020 - Stefan Nica + +- Also allow working on Chart.yaml + +--- Other differences: -- ++ obs-service-kiwi_metainfo_helper.spec ++ --- /var/tmp/diff_new_pack.5g0ImX/_old 2020-09-01 20:06:54.540579525 +0200 +++ /var/tmp/diff_new_pack.5g0ImX/_new 2020-09-01 20:06:54.544579527 +0200 @@ -19,7 +19,7 @@ Name: obs-service-kiwi_metainfo_helper Version:0.0 Release:0 -Summary:Service for substituting various variables in kiwi recipes +Summary:Service for substituting various variables in build recipes License:GPL-2.0-or-later Group: Development/Tools/Building URL:https://build.opensuse.org @@ -37,7 +37,7 @@ %description This service can be used during buildtime to gain access to various variables -in kiwi recipes. +in build recipes. %prep %setup -q -D -T -n . ++ README ++ --- /var/tmp/diff_new_pack.5g0ImX/_old 2020-09-01 20:06:54.576579542 +0200 +++ /var/tmp/diff_new_pack.5g0ImX/_new 2020-09-01 20:06:54.576579542 +0200 @@ -2,7 +2,8 @@ This service can be enabled to run during buildtime, when it will edit the -kiwi image description to replace placeholders with build-specific metainfo. +build recipe (.kiwi, Dockerfile, Chart.yaml) to replace placeholders with +build-specific metainfo. | Placeholder| Value | Example | |||---| ++ kiwi_metainfo_helper ++ --- /var/tmp/diff_new_pack.5g0ImX/_old 2020-09-01 20:06:54.588579547 +0200 +++ /var/tmp/diff_new_pack.5g0ImX/_new 2020-09-01 20:06:54.592579549 +0200 @@ -14,8 +14,8 @@ # The build script renames the recipe (to strip _service:foo:), but doesn't update .data RECIPEFILE="${RECIPEFILE##*:}" - if [ "${RECIPEFILE##*.}" != "kiwi" ] && [ "${RECIPEFILE}" != "Dockerfile" ]; then - echo "Recipe is neither Dockerfile nor kiwi - exiting" + if [ "${RECIPEFILE##*.}" != "kiwi" ] && [ "${RECIPEFILE}" != "Dockerfile" ] && [ "${RECIPEFILE}" != "Chart.yaml" ]; then + echo "Recipe is neither Dockerfile, kiwi recipe nor helm chart - exiting" exit 0 fi @@ -26,9 +26,9 @@ RELEASE=0 # Guess the build recipe - files=(*.kiwi Dockerfile*) + files=(*.kiwi Dockerfile* Chart.yaml*) if [ "${#files}" -eq 0 ]; then - echo "No kiwi or Dockerfile found - exiting" + echo "No kiwi recipe, Dockerfile or helm chart found - exiting" exit 0 fi fi ++ kiwi_metainfo_helper.service ++ --- /var/tmp/diff_new_pack.5g0ImX/_old 2020-09-01 20:06:54.608579557 +0200 +++ /var/tmp/diff_new_pack.5g0ImX/_new 2020-09-01 20:06:54.608579557 +0200 @@ -1,4 +1,4 @@ - Substitute various variables in .kiwi files - Substitutes %DISTURL%, %RELEASE% and %BUILDTIME% in .kiwi files. + Substitute various variables in build recipes + Substitutes %DISTURL%, %RELEASE% and %BUILDTIME% in build recipes.
commit obs-service-kiwi_metainfo_helper for openSUSE:Factory
Hello community, here is the log from the commit of package obs-service-kiwi_metainfo_helper for openSUSE:Factory checked in at 2020-07-15 11:11:47 Comparing /work/SRC/openSUSE:Factory/obs-service-kiwi_metainfo_helper (Old) and /work/SRC/openSUSE:Factory/.obs-service-kiwi_metainfo_helper.new.3060 (New) Package is "obs-service-kiwi_metainfo_helper" Wed Jul 15 11:11:47 2020 rev:4 rq:819507 version:0.0 Changes: --- /work/SRC/openSUSE:Factory/obs-service-kiwi_metainfo_helper/obs-service-kiwi_metainfo_helper.changes 2020-05-07 17:49:46.509177626 +0200 +++ /work/SRC/openSUSE:Factory/.obs-service-kiwi_metainfo_helper.new.3060/obs-service-kiwi_metainfo_helper.changes 2020-07-15 11:11:58.688819180 +0200 @@ -1,0 +2,11 @@ +Tue Jul 7 13:53:33 UTC 2020 - Fabian Vogt + +- Add explicit fallback for chroot builds +- Refactor into a single sed call + +--- +Tue May 5 09:19:56 UTC 2020 - Fabian Vogt + +- Also allow working on Dockerfile + +--- Other differences: -- ++ kiwi_metainfo_helper ++ --- /var/tmp/diff_new_pack.ZPtKHc/_old 2020-07-15 11:11:59.140819647 +0200 +++ /var/tmp/diff_new_pack.ZPtKHc/_new 2020-07-15 11:11:59.140819647 +0200 @@ -1,5 +1,6 @@ #!/bin/bash set -eu +shopt -s nullglob if [ "${BUILD_DIST+x}" != "x" ]; then echo "Not running in an OBS build container" @@ -7,28 +8,42 @@ fi BUILD_DATA="${BUILD_DIST/.dist/.data}" -. "${BUILD_DATA}" +if [ -e "${BUILD_DATA}" ]; then + . "${BUILD_DATA}" -# The build script renames the recipe (to strip _service:foo:), but doesn't update .data -RECIPEFILE="${RECIPEFILE##*:}" + # The build script renames the recipe (to strip _service:foo:), but doesn't update .data + RECIPEFILE="${RECIPEFILE##*:}" -if [ "${RECIPEFILE##*.}" != "kiwi" ]; then - echo "Recipe is not a kiwi file - exiting" - exit 0 + if [ "${RECIPEFILE##*.}" != "kiwi" ] && [ "${RECIPEFILE}" != "Dockerfile" ]; then + echo "Recipe is neither Dockerfile nor kiwi - exiting" + exit 0 + fi + + files=("${RECIPEFILE}") +else + echo "Warning: No build data found - chroot build?" + DISTURL="local" + RELEASE=0 + + # Guess the build recipe + files=(*.kiwi Dockerfile*) + if [ "${#files}" -eq 0 ]; then + echo "No kiwi or Dockerfile found - exiting" + exit 0 + fi fi -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}" +sed -i"" \ +-e "s#%DISTURL%#${DISTURL}#g" \ +-e "s/%RELEASE%/${RELEASE}/g" \ +-e "s/%BUILDTIME%/$(date --utc +%FT%T.%NZ)/g" \ +-e "s/%OS_VERSION_ID%/${VERSION_ID}/g" \ +-e "s/%OS_PRETTY_NAME%/${PRETTY_NAME}/g" \ +-e "s/%OS_VERSION_ID_SP%/${VERSION_ID_SP}/g" "${files[@]}"
commit obs-service-kiwi_metainfo_helper for openSUSE:Factory
Hello community, here is the log from the commit of package obs-service-kiwi_metainfo_helper for openSUSE:Factory checked in at 2020-05-07 17:49:44 Comparing /work/SRC/openSUSE:Factory/obs-service-kiwi_metainfo_helper (Old) and /work/SRC/openSUSE:Factory/.obs-service-kiwi_metainfo_helper.new.2738 (New) Package is "obs-service-kiwi_metainfo_helper" Thu May 7 17:49:44 2020 rev:3 rq:800073 version:0.0 Changes: --- /work/SRC/openSUSE:Factory/obs-service-kiwi_metainfo_helper/obs-service-kiwi_metainfo_helper.changes 2019-01-21 10:55:21.803655720 +0100 +++ /work/SRC/openSUSE:Factory/.obs-service-kiwi_metainfo_helper.new.2738/obs-service-kiwi_metainfo_helper.changes 2020-05-07 17:49:46.509177626 +0200 @@ -1,0 +2,6 @@ +Mon May 4 13:40:20 UTC 2020 - Fabian Vogt + +- Strip service prefix from the recipe name to work with enabled + services in OBS + +--- Other differences: -- ++ obs-service-kiwi_metainfo_helper.spec ++ --- /var/tmp/diff_new_pack.H9dfnq/_old 2020-05-07 17:49:48.093180979 +0200 +++ /var/tmp/diff_new_pack.H9dfnq/_new 2020-05-07 17:49:48.097180988 +0200 @@ -1,7 +1,7 @@ # # spec file for package obs-service-kiwi_metainfo_helper # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -22,7 +22,7 @@ Summary:Service for substituting various variables in kiwi recipes License:GPL-2.0-or-later Group: Development/Tools/Building -Url:https://build.opensuse.org +URL:https://build.opensuse.org Source0:kiwi_metainfo_helper.service Source1:kiwi_metainfo_helper Source2:README ++ kiwi_metainfo_helper ++ --- /var/tmp/diff_new_pack.H9dfnq/_old 2020-05-07 17:49:48.141181081 +0200 +++ /var/tmp/diff_new_pack.H9dfnq/_new 2020-05-07 17:49:48.141181081 +0200 @@ -9,6 +9,9 @@ BUILD_DATA="${BUILD_DIST/.dist/.data}" . "${BUILD_DATA}" +# The build script renames the recipe (to strip _service:foo:), but doesn't update .data +RECIPEFILE="${RECIPEFILE##*:}" + if [ "${RECIPEFILE##*.}" != "kiwi" ]; then echo "Recipe is not a kiwi file - exiting" exit 0
commit obs-service-kiwi_metainfo_helper for openSUSE:Factory
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 + +- 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 (.)| 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 (.)| 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}"