]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Only add UEFI tools tree packages on architectures that support UEFI
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 25 Oct 2023 14:16:33 +0000 (16:16 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 25 Oct 2023 14:16:33 +0000 (16:16 +0200)
These are not built for other architectures on Fedora/CentOS so let's
not try to add them there.

mkosi/distributions/centos.py
mkosi/distributions/fedora.py

index a04ebcdc9f15a446df9afefbb46f0e10226af4a6..49c2c0f5dc103b4e19ef6d2d92951249c87dafca 100644 (file)
@@ -60,7 +60,7 @@ class Installer(DistributionInstaller):
 
     @classmethod
     def tools_tree_packages(cls) -> list[str]:
-        return [
+        packages = [
             "apt",
             "bash",
             "bubblewrap",
@@ -73,11 +73,9 @@ class Installer(DistributionInstaller):
             "dnf",
             "dosfstools",
             "e2fsprogs",
-            "edk2-ovmf",
             "mtools",
             "openssh-clients",
             "openssl",
-            "pesign",
             "python3-cryptography",
             "qemu-kvm-core",
             "shadow-utils",
@@ -96,6 +94,14 @@ class Installer(DistributionInstaller):
             "zstd",
         ]
 
+        if Architecture.native() in (Architecture.x86_64, Architecture.arm64):
+            packages += [
+                "edk2-ovmf",
+                "pesign",
+            ]
+
+        return packages
+
     @classmethod
     def setup(cls, state: MkosiState) -> None:
         if GenericVersion(state.config.release) <= 7:
index 3837c6e8feb1f403c90afcb74ad216d73f1c2486..2f2134caa3aeea94583c74c96a97099fe26e9187 100644 (file)
@@ -37,7 +37,7 @@ class Installer(DistributionInstaller):
 
     @classmethod
     def tools_tree_packages(cls) -> list[str]:
-        return [
+        packages = [
             "apt",
             "archlinux-keyring",
             "bash",
@@ -52,16 +52,13 @@ class Installer(DistributionInstaller):
             "dnf5",
             "dosfstools",
             "e2fsprogs",
-            "edk2-ovmf",
             "erofs-utils",
             "mtools",
             "openssh-clients",
             "openssl",
             "pacman",
-            "pesign",
             "python3-cryptography",
             "qemu-kvm-core",
-            "sbsigntools",
             "shadow-utils",
             "socat",
             "squashfs-tools",
@@ -80,6 +77,15 @@ class Installer(DistributionInstaller):
             "zypper",
         ]
 
+        if Architecture.native() in (Architecture.x86_64, Architecture.arm64):
+            packages += [
+                "edk2-ovmf",
+                "pesign",
+                "sbsigntools",
+            ]
+
+        return packages
+
     @classmethod
     def setup(cls, state: MkosiState) -> None:
         gpgurls = (