diff --git a/mkosi.changes b/mkosi.changes index 8906be2..ed1bff2 100644 --- a/mkosi.changes +++ b/mkosi.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 27 15:50:17 UTC 2024 - Alberto Planas Dominguez + +- Add opensuse-dont-install-distribution-release-by-default.patch + ------------------------------------------------------------------- Tue Mar 26 14:37:39 UTC 2024 - Richard Brown diff --git a/mkosi.spec b/mkosi.spec index 57a6a02..940ae4c 100644 --- a/mkosi.spec +++ b/mkosi.spec @@ -26,6 +26,8 @@ License: LGPL-2.1-or-later Group: System/Management URL: https://github.com/systemd/mkosi Source: https://github.com/systemd/mkosi/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +# PATCH-FIX-UPSTREAM https://github.com/systemd/mkosi/pull/2606 +Patch0: opensuse-dont-install-distribution-release-by-default.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module wheel} @@ -60,7 +62,7 @@ may be generated. Moreover, for bootable images only EFI systems are supported (not plain MBR/BIOS). %prep -%setup -q +%autosetup -p1 %build tools/make-man-page.sh diff --git a/opensuse-dont-install-distribution-release-by-default.patch b/opensuse-dont-install-distribution-release-by-default.patch new file mode 100644 index 0000000..232c87f --- /dev/null +++ b/opensuse-dont-install-distribution-release-by-default.patch @@ -0,0 +1,70 @@ +From 6cbf5cc1375525f71819416dfae8206ff3c4e1ea Mon Sep 17 00:00:00 2001 +From: Daan De Meyer +Date: Mon, 8 Apr 2024 13:40:35 +0200 +Subject: [PATCH] opensuse: Don't install distribution-release by default + +distribution-release is a virtual package that is satisfied by +multiple packages. By installing it by default in the first transaction +we can't override it anymore later. Let's fix the issue by not explicitly +installing distribution-release. + +To make sure openSUSE-release is pulled in by default to satisfy +distribution-release, we install patterns-base-minimal_base which has +a Suggests dependency on openSUSE-release. +--- + mkosi.conf.d/20-opensuse.conf | 1 + + mkosi/distributions/opensuse.py | 2 +- + mkosi/resources/mkosi-initrd/mkosi.conf.d/10-opensuse.conf | 2 ++ + mkosi/resources/mkosi-tools/mkosi.conf.d/10-opensuse.conf | 1 + + 4 files changed, 5 insertions(+), 1 deletion(-) + +Index: mkosi-22/mkosi.conf.d/20-opensuse.conf +=================================================================== +--- mkosi-22.orig/mkosi.conf.d/20-opensuse.conf ++++ mkosi-22/mkosi.conf.d/20-opensuse.conf +@@ -34,6 +34,7 @@ Packages= + openssh-server + openssl + ovmf ++ patterns-base-minimal_base + perf + pesign + python3-pefile +Index: mkosi-22/mkosi/distributions/opensuse.py +=================================================================== +--- mkosi-22.orig/mkosi/distributions/opensuse.py ++++ mkosi-22/mkosi/distributions/opensuse.py +@@ -69,7 +69,7 @@ class Installer(DistributionInstaller): + + @classmethod + def install(cls, context: Context) -> None: +- cls.install_packages(context, ["filesystem", "distribution-release"], apivfs=False) ++ cls.install_packages(context, ["filesystem"], apivfs=False) + + @classmethod + def install_packages(cls, context: Context, packages: Sequence[str], apivfs: bool = True) -> None: +Index: mkosi-22/mkosi/resources/mkosi-initrd/mkosi.conf.d/10-opensuse.conf +=================================================================== +--- mkosi-22.orig/mkosi/resources/mkosi-initrd/mkosi.conf.d/10-opensuse.conf ++++ mkosi-22/mkosi/resources/mkosi-initrd/mkosi.conf.d/10-opensuse.conf +@@ -5,6 +5,8 @@ Distribution=opensuse + + [Content] + Packages= ++ patterns-base-minimal_base ++ + # Various libraries that are dlopen'ed by systemd + libfido2-1 + tpm2-0-tss +Index: mkosi-22/mkosi/resources/mkosi-tools/mkosi.conf.d/10-opensuse.conf +=================================================================== +--- mkosi-22.orig/mkosi/resources/mkosi-tools/mkosi.conf.d/10-opensuse.conf ++++ mkosi-22/mkosi/resources/mkosi-tools/mkosi.conf.d/10-opensuse.conf +@@ -16,6 +16,7 @@ Packages= + grub2 + openssh-clients + ovmf ++ patterns-base-minimal_base + pesign + policycoreutils + python3-pefile