From 2ba58603bb7049d3a6fbd7fdca70d09e10f5688553c6a0ac9c78e2b33c3f1290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20M=C3=BCller?= Date: Tue, 22 Apr 2025 17:58:10 +0200 Subject: [PATCH 1/6] Remove no longer necessary workaround --- kiwi-builder-image/Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/kiwi-builder-image/Dockerfile b/kiwi-builder-image/Dockerfile index 4ff28c9..5d97b41 100644 --- a/kiwi-builder-image/Dockerfile +++ b/kiwi-builder-image/Dockerfile @@ -21,9 +21,6 @@ LABEL com.suse.image-type="application" LABEL com.suse.release-stage="released" # endlabelprefix -# Configure Kiwi to use kpartx -RUN echo -e "mapper:\n - part_mapper: kpartx" > /etc/kiwi.yml - # Copy build script into image and make it executable ADD build-image.sh /usr/bin/build-image RUN chmod a+x /usr/bin/build-image -- 2.49.0 From c913d6e401c2c13f164b4cadd4ab8937f862a6f93a5370a0edef591861125a18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20M=C3=BCller?= Date: Tue, 22 Apr 2025 18:02:50 +0200 Subject: [PATCH 2/6] Ensure kiwi versions and build tags actually align --- kiwi-builder-image/Dockerfile | 17 ++++++++++++----- kiwi-builder-image/_service | 5 +++++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/kiwi-builder-image/Dockerfile b/kiwi-builder-image/Dockerfile index 5d97b41..6a4c15c 100644 --- a/kiwi-builder-image/Dockerfile +++ b/kiwi-builder-image/Dockerfile @@ -1,6 +1,10 @@ -#!BuildTag: %%IMG_PREFIX%%kiwi-builder:10.1.16.0 -#!BuildTag: %%IMG_PREFIX%%kiwi-builder:10.1.16.0-%RELEASE% -FROM registry.suse.com/bci/kiwi:10.1.16 +#!BuildTag: %%IMG_PREFIX%%kiwi-builder:%%kiwi_version%%.1-%RELEASE% +#!BuildTag: %%IMG_PREFIX%%kiwi-builder:%%kiwi_version%%.1 + +ARG KIWIVERSION="10.2.12" +FROM registry.suse.com/bci/kiwi:${KIWIVERSION} +ARG KIWIVERSION + MAINTAINER SUSE LLC (https://www.suse.com/) # Define labels according to https://en.opensuse.org/Building_derived_containers @@ -8,11 +12,11 @@ MAINTAINER SUSE LLC (https://www.suse.com/) LABEL org.opencontainers.image.authors="SUSE LLC (https://www.suse.com/)" LABEL org.opencontainers.image.title="SLE Kiwi Builder Container Image" LABEL org.opencontainers.image.description="kiwi-builder based on the SLE Base Container Image." -LABEL org.opencontainers.image.version="%PACKAGE_VERSION%" +LABEL org.opencontainers.image.version="%%kiwi_version%%" LABEL org.opencontainers.image.url="https://www.suse.com/solutions/edge-computing/" LABEL org.opencontainers.image.created="%BUILDTIME%" LABEL org.opencontainers.image.vendor="SUSE LLC" -LABEL org.opensuse.reference="%%IMG_REPO%%/%%IMG_PREFIX%%kiwi-builder:10.1.16.0" +LABEL org.opensuse.reference="%%IMG_REPO%%/%%IMG_PREFIX%%kiwi-builder:%%kiwi_version%%.1-%RELEASE%" LABEL org.openbuildservice.disturl="%DISTURL%" LABEL com.suse.supportlevel="%%SUPPORT_LEVEL%%" LABEL com.suse.eula="SUSE Combined EULA February 2024" @@ -21,6 +25,9 @@ LABEL com.suse.image-type="application" LABEL com.suse.release-stage="released" # endlabelprefix +# help the build service understand the need for python3-kiwi +RUN zypper -n install -d -D python3-kiwi; [ "%%kiwi_version%%" = "${KIWIVERSION}" ] || echo "version mismatch" + # Copy build script into image and make it executable ADD build-image.sh /usr/bin/build-image RUN chmod a+x /usr/bin/build-image diff --git a/kiwi-builder-image/_service b/kiwi-builder-image/_service index 0def281..1640181 100644 --- a/kiwi-builder-image/_service +++ b/kiwi-builder-image/_service @@ -16,4 +16,9 @@ SUPPORT_LEVEL=$(rpm --macros=/root/.rpmmacros -E %support_level) SUPPORT_LEVEL + + Dockerfile + %%kiwi_version%% + python3-kiwi + -- 2.49.0 From baf71f063cc91b4f6d2da5cb985ef63ef67a4d3d1ec12ff3c9b1cdf6af245850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20M=C3=BCller?= Date: Tue, 22 Apr 2025 18:21:00 +0200 Subject: [PATCH 3/6] update README as well Although this file seems to be unused? --- kiwi-builder-image/README | 24 ++++++++++++------------ kiwi-builder-image/_service | 5 +++++ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/kiwi-builder-image/README b/kiwi-builder-image/README index b74c156..c2f6450 100644 --- a/kiwi-builder-image/README +++ b/kiwi-builder-image/README @@ -8,7 +8,7 @@ Please ensure that you're running this on a registered SLE Micro 6.0 system, and Next, download the podman image: -# podman pull %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:10.1.16.0 +# podman pull %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:%%kiwi_version%%.1 Make a local output directory (where the images will reside): @@ -16,40 +16,40 @@ Make a local output directory (where the images will reside): Then, to build a standard "Base" image, run the following in podman: -# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:10.1.16.0 build-image +# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:%%kiwi_version%%.1 build-image To build a "Base" SelfInstall ISO, you can add additional flags, for example: -# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:10.1.16.0 build-image -p Base-SelfInstall +# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:%%kiwi_version%%.1 build-image -p Base-SelfInstall Then, to build a standard "Default" image, run the following in podman: -# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:10.1.16.0 build-image -p Default +# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:%%kiwi_version%%.1 build-image -p Default To build a "Default" SelfInstall ISO, you can add additional flags, for example: -# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:10.1.16.0 build-image -p Default-SelfInstall +# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:%%kiwi_version%%.1 build-image -p Default-SelfInstall To build an image with a RealTime kernel, e.g. a RAW disk image ("Default"), use the following: -# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:10.1.16.0 build-image -p Base-RT +# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:%%kiwi_version%%.1 build-image -p Base-RT To build an image that supports a large block/sectorsize (4096), use the "-b" flag, for example: -# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:10.1.16.0 build-image -p Default-SelfInstall -b +# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:%%kiwi_version%%.1 build-image -p Default-SelfInstall -b # mkdir mydefs/ # cp /path/to/SL-Micro.kiwi mydefs/ # cp /path/to/config.sh mydefs/ -# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -v ./mydefs/:/micro-sdk/defs/ -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:10.1.16.0 build-image +# podman run --privileged -v /etc/zypp/repos.d:/micro-sdk/repos/ -v ./output:/tmp/output -v ./mydefs/:/micro-sdk/defs/ -it %%IMG_REPO%%/%%IMG_PREFIXkiwi-builder:%%kiwi_version%%.1 build-image All output will be in the local $(pwd)/output directory, for example: # ls -1 output/ -SLE-Micro.x86_64-6.0.changes -SLE-Micro.x86_64-6.0.packages -SLE-Micro.x86_64-6.0.raw -SLE-Micro.x86_64-6.0.verified +SL-Micro.x86_64-6.0.changes +SL-Micro.x86_64-6.0.packages +SL-Micro.x86_64-6.0.raw +SL-Micro.x86_64-6.0.verified build kiwi.result kiwi.result.json diff --git a/kiwi-builder-image/_service b/kiwi-builder-image/_service index 1640181..14f9667 100644 --- a/kiwi-builder-image/_service +++ b/kiwi-builder-image/_service @@ -21,4 +21,9 @@ %%kiwi_version%% python3-kiwi + + README + %%kiwi_version%% + python3-kiwi + -- 2.49.0 From 9eba6bc6b4b0eca43b4e157ff1a40e9a6972c489ecc3e50f1b6cb7a78bcdb685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20M=C3=BCller?= Date: Wed, 23 Apr 2025 13:43:25 +0200 Subject: [PATCH 4/6] make version mismatches fatal --- kiwi-builder-image/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kiwi-builder-image/Dockerfile b/kiwi-builder-image/Dockerfile index 6a4c15c..3926d56 100644 --- a/kiwi-builder-image/Dockerfile +++ b/kiwi-builder-image/Dockerfile @@ -26,7 +26,7 @@ LABEL com.suse.release-stage="released" # endlabelprefix # help the build service understand the need for python3-kiwi -RUN zypper -n install -d -D python3-kiwi; [ "%%kiwi_version%%" = "${KIWIVERSION}" ] || echo "version mismatch" +RUN zypper -n install -d -D python3-kiwi; [ "%%kiwi_version%%" = "${KIWIVERSION}" ] || { echo "expected kiwi version ${KIWIVERSION}: version mismatch"; exit 1; } # Copy build script into image and make it executable ADD build-image.sh /usr/bin/build-image -- 2.49.0 From 76b5fe17d0979151014303cdbb1a41f817e9c7242ec1936cea4a4a5533c6eef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20M=C3=BCller?= Date: Wed, 23 Apr 2025 14:51:07 +0200 Subject: [PATCH 5/6] build the kiwi-image in an images_6.0 repository --- _config | 16 +++++++++++++++- _meta | 13 +++++++++---- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/_config b/_config index 2fed4e4..63d0bdb 100644 --- a/_config +++ b/_config @@ -82,7 +82,6 @@ BuildFlags: onlybuild:release-manifest-image BuildFlags: onlybuild:ironic-image BuildFlags: onlybuild:ironic-ipa-downloader-image BuildFlags: onlybuild:ironic-ipa-ramdisk - BuildFlags: onlybuild:kiwi-builder-image BuildFlags: onlybuild:kube-rbac-proxy BuildFlags: onlybuild:kube-rbac-proxy-image BuildFlags: onlybuild:metallb @@ -105,6 +104,21 @@ BuildFlags: onlybuild:release-manifest-image PublishFlags: archsync %endif +%if "%_repository" == "images_6.0" + Prefer: container:sles15-image + Type: docker + BuildEngine: podman + Repotype: none + Patterntype: none + BuildFlags: dockerarg:SLE_VERSION=16.0 + BuildFlags: onlybuild:kiwi-builder-image + + # Publish multi-arch container images only once all archs have been built + PublishFlags: archsync +%endif + + + %if "%_repository" == "charts" || "%_repository" == "phantomcharts" || "%_repository" == "releasecharts" Type: helm Repotype: helm diff --git a/_meta b/_meta index fa14c49..5370112 100644 --- a/_meta +++ b/_meta @@ -31,14 +31,19 @@ x86_64 {%- endif %} -{%- for repository in ["images", "test_manifest_images"] %} +{%- for repository in ["images", "images_6.0", "test_manifest_images"] %} - {%- if release_project is defined and repository == "images" %} + {%- if release_project is defined and repository != "test_manifest_images" %} {%- endif %} - - + {%- if repository == "images_6.0" %} + + + {%- else %} + + + {%- endif %} x86_64 aarch64 -- 2.49.0 From e4faea07598d1a042612cfbea6de42df5813162111bf426ab62a43ac80dcb485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20M=C3=BCller?= Date: Wed, 23 Apr 2025 19:10:18 +0200 Subject: [PATCH 6/6] Remove MAINTAINER statement this is deprecated and already in oci.authors --- kiwi-builder-image/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/kiwi-builder-image/Dockerfile b/kiwi-builder-image/Dockerfile index 3926d56..e0862c8 100644 --- a/kiwi-builder-image/Dockerfile +++ b/kiwi-builder-image/Dockerfile @@ -5,8 +5,6 @@ ARG KIWIVERSION="10.2.12" FROM registry.suse.com/bci/kiwi:${KIWIVERSION} ARG KIWIVERSION -MAINTAINER SUSE LLC (https://www.suse.com/) - # Define labels according to https://en.opensuse.org/Building_derived_containers # labelprefix=com.suse.application.akri LABEL org.opencontainers.image.authors="SUSE LLC (https://www.suse.com/)" -- 2.49.0