diff --git a/0001-osbuild-manifest-type-in-config.patch b/0001-osbuild-manifest-type-in-config.patch new file mode 100644 index 00000000..588a4bb9 --- /dev/null +++ b/0001-osbuild-manifest-type-in-config.patch @@ -0,0 +1,63 @@ +From f30a8b4d15610f40439895b5eb23014650487541 Mon Sep 17 00:00:00 2001 +From: Simon de Vlieger +Date: Fri, 22 Sep 2023 11:21:02 +0200 +Subject: [PATCH] osbuild: manifest type in config + +Allow the manifest type used to be specified in the pungi configuration +instead of always selecting the manifest type based on the koji output. + +Signed-off-by: Simon de Vlieger +--- + doc/configuration.rst | 2 ++ + pungi/checks.py | 1 + + pungi/phases/osbuild.py | 9 ++++++++- + 3 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/doc/configuration.rst b/doc/configuration.rst +index fd6a7eeb..238dc0b3 100644 +--- a/doc/configuration.rst ++++ b/doc/configuration.rst +@@ -1652,6 +1652,8 @@ OSBuild Composer for building images + * ``arches`` -- list of architectures for which to build the image. By + default, the variant arches are used. This option can only restrict it, + not add a new one. ++ * ``manifest_type`` -- the image type that is put into the manifest by ++ pungi. If not supplied then it is autodetected from the Koji output. + * ``ostree_url`` -- URL of the repository that's used to fetch the parent + commit from. + * ``ostree_ref`` -- name of the ostree branch +diff --git a/pungi/checks.py b/pungi/checks.py +index d6ffabe1..abdbf46c 100644 +--- a/pungi/checks.py ++++ b/pungi/checks.py +@@ -1244,6 +1244,7 @@ def make_schema(): + "ostree_url": {"type": "string"}, + "ostree_ref": {"type": "string"}, + "ostree_parent": {"type": "string"}, ++ "manifest_type": {"type": "string"}, + "upload_options": { + # this should be really 'oneOf', but the minimal + # required properties in AWSEC2 and GCP options +diff --git a/pungi/phases/osbuild.py b/pungi/phases/osbuild.py +index aef1f008..19bc23e2 100644 +--- a/pungi/phases/osbuild.py ++++ b/pungi/phases/osbuild.py +@@ -249,7 +249,14 @@ class RunOSBuildThread(WorkerThread): + + # Update image manifest + img = Image(compose.im) +- img.type = archive["type_name"] if archive["type_name"] != "iso" else "dvd" ++ ++ # Get the manifest type from the config if supplied, otherwise we ++ # determine the manifest type based on the koji output ++ img.type = config.get( ++ "manifest_type", ++ archive["type_name"] if archive["type_name"] != "iso" else "dvd", ++ ) ++ + img.format = suffix + img.path = os.path.join(rel_image_dir, archive["filename"]) + img.mtime = util.get_mtime(image_dest) +-- +2.41.0 + diff --git a/pungi.spec b/pungi.spec index 929d9446..2c073d3d 100644 --- a/pungi.spec +++ b/pungi.spec @@ -8,6 +8,7 @@ Summary: Distribution compose tool License: GPL-2.0-only URL: https://pagure.io/pungi Source0: %{name}-%{version}.tar.bz2 +Patch1: 0001-osbuild-manifest-type-in-config.patch BuildRequires: make BuildRequires: python3-pytest @@ -165,6 +166,9 @@ rm %{buildroot}%{_bindir}/pungi %{_bindir}/%{name}-cache-cleanup %changelog +* Mon Sep 25 2023 Lubomír Sedlář - 4.5.0-7 +- Backport patch for explicit setting of osbuild image type in metadata + * Mon Nov 21 2023 Stepan Oksanichenko - 4.5.0-3 - Method `get_remote_file_content` is object's method now