From 055e70e02d5ba140eb536762d6889a0bb71d0254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20M=C3=BCller?= Date: Fri, 25 Oct 2024 18:35:29 +0200 Subject: [PATCH] Overwrite the incorrect author from the base container in appcol Appcollection wants no maintainer, which is however inherited from the base container. --- src/bci_build/package/__init__.py | 4 ++-- src/bci_build/templates.py | 2 +- tests/test_build_recipe.py | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/bci_build/package/__init__.py b/src/bci_build/package/__init__.py index d65e0b84b..f54018f40 100644 --- a/src/bci_build/package/__init__.py +++ b/src/bci_build/package/__init__.py @@ -348,8 +348,8 @@ def __post_init__(self) -> None: # Limit to aarch64 and x86_64 if not self.exclusive_arch: self.exclusive_arch = [Arch.AARCH64, Arch.X86_64] - # Disable maintainer listing - self.maintainer = None + # Override maintainer listing from base container by setting an empty value + self.maintainer = "" # limit to tech preview for beta releases if ( diff --git a/src/bci_build/templates.py b/src/bci_build/templates.py index 4d3281832..1cbcf985e 100644 --- a/src/bci_build/templates.py +++ b/src/bci_build/templates.py @@ -57,7 +57,7 @@ COPY --from=builder /target /{% endif %} # Define labels according to https://en.opensuse.org/Building_derived_containers # labelprefix={{ image.labelprefix }} -{%- if image.maintainer %} +{%- if image.maintainer != None %} LABEL org.opencontainers.image.authors="{{ image.maintainer }}" {%- endif %} LABEL org.opencontainers.image.title="{{ image.title }}" diff --git a/tests/test_build_recipe.py b/tests/test_build_recipe.py index 316c36d81..e3b7bdae9 100644 --- a/tests/test_build_recipe.py +++ b/tests/test_build_recipe.py @@ -641,6 +641,7 @@ def test_os_build_recipe_templates(kiwi_xml: str, image: OsContainer) -> None: COPY --from=builder /target / # Define labels according to https://en.opensuse.org/Building_derived_containers # labelprefix=com.suse.application.test +LABEL org.opencontainers.image.authors="" LABEL org.opencontainers.image.title="Test" LABEL org.opencontainers.image.description="Test container based on the SLE Base Container Image." LABEL org.opencontainers.image.version="%%emacs_version%%"