From 9d7d952ddfee5f74f3c4bc6f7bc16ba9e64e0cf3 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Fri, 26 Nov 2021 17:30:27 +0100 Subject: [PATCH] stages/grub2.inst: Make grub-mkimage binary configurable On Arch Linux grub-mkimage is provided by the `grub` package which is grub2 and grub (1) no longer exists. --- stages/org.osbuild.grub2.inst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stages/org.osbuild.grub2.inst b/stages/org.osbuild.grub2.inst index 060a762b..f387985b 100755 --- a/stages/org.osbuild.grub2.inst +++ b/stages/org.osbuild.grub2.inst @@ -70,6 +70,11 @@ SCHEMA = r""" "filesystem": { "type": "string", "enum": ["ext4", "xfs", "btrfs"] + }, + "binary": { + "description": "grub-mkimage binary name", + "type": "string", + "default": "grub2-mkimage" } } }, @@ -231,7 +236,7 @@ def core_mkimage(platform: str, prefix: str, options: Dict,): raise ValueError(f"unknown boot filesystem type: '{fs_type}'") # now created the core image - subprocess.run(["grub2-mkimage", + subprocess.run([options.get("binary", "grub2-mkimage"), "--verbose", "--directory", f"/usr/lib/grub/{platform}", "--prefix", prefix,