summaryrefslogtreecommitdiffstats
path: root/mkosi.images/system
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2024-03-05 11:49:30 +0100
committerFrantisek Sumsal <frantisek@sumsal.cz>2024-03-05 12:16:44 +0100
commit374fa8e8533e4834337a22613c7bada205dc1853 (patch)
treed2331b2c2701cc1bb6c721002dcf911928689d84 /mkosi.images/system
parentFixing bad link to Debian packages tests (diff)
downloadsystemd-374fa8e8533e4834337a22613c7bada205dc1853.tar.xz
systemd-374fa8e8533e4834337a22613c7bada205dc1853.zip
mkosi: fix UKI addons test
The test hasn't been working for a while, since there's no /efi or /boot in $DESTDIR. Resolves: #31618
Diffstat (limited to 'mkosi.images/system')
-rw-r--r--mkosi.images/system/mkosi.conf.d/10-arch.conf1
-rw-r--r--mkosi.images/system/mkosi.conf.d/10-debian-ubuntu.conf1
-rw-r--r--mkosi.images/system/mkosi.conf.d/10-fedora.conf1
-rw-r--r--mkosi.images/system/mkosi.conf.d/10-opensuse.conf1
-rwxr-xr-xmkosi.images/system/mkosi.postinst.chroot11
5 files changed, 14 insertions, 1 deletions
diff --git a/mkosi.images/system/mkosi.conf.d/10-arch.conf b/mkosi.images/system/mkosi.conf.d/10-arch.conf
index e1a511c979..a3d008d10f 100644
--- a/mkosi.images/system/mkosi.conf.d/10-arch.conf
+++ b/mkosi.images/system/mkosi.conf.d/10-arch.conf
@@ -23,5 +23,6 @@ Packages=
python-pytest
python3
quota-tools
+ sbsigntools
shadow
vim
diff --git a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu.conf b/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu.conf
index 348bdb2992..d6e3f20222 100644
--- a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu.conf
+++ b/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu.conf
@@ -19,6 +19,7 @@ Packages=
netcat-openbsd
openssh-server
openssh-client
+ sbsigntool
passwd
policykit-1
procps
diff --git a/mkosi.images/system/mkosi.conf.d/10-fedora.conf b/mkosi.images/system/mkosi.conf.d/10-fedora.conf
index 5863f03b19..7554ad2dc3 100644
--- a/mkosi.images/system/mkosi.conf.d/10-fedora.conf
+++ b/mkosi.images/system/mkosi.conf.d/10-fedora.conf
@@ -9,3 +9,4 @@ Packages=
compsize
f2fs-tools
glibc-langpack-en
+ sbsigntools
diff --git a/mkosi.images/system/mkosi.conf.d/10-opensuse.conf b/mkosi.images/system/mkosi.conf.d/10-opensuse.conf
index 71434b4560..ffcb664224 100644
--- a/mkosi.images/system/mkosi.conf.d/10-opensuse.conf
+++ b/mkosi.images/system/mkosi.conf.d/10-opensuse.conf
@@ -20,5 +20,6 @@ Packages=
python3-psutil
python3-pytest
quota
+ sbsigntools
shadow
vim
diff --git a/mkosi.images/system/mkosi.postinst.chroot b/mkosi.images/system/mkosi.postinst.chroot
index 692242da38..330fa3b73e 100755
--- a/mkosi.images/system/mkosi.postinst.chroot
+++ b/mkosi.images/system/mkosi.postinst.chroot
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# SPDX-License-Identifier: LGPL-2.1-or-later
set -e
@@ -100,3 +100,12 @@ mkdir -p /usr/lib/tmpfiles.d
cat >/usr/lib/tmpfiles.d/testuser.conf <<EOF
q /home/testuser 0700 4711 4711
EOF
+
+# sbsign is not available on CentOS Stream
+if command -v sbsign &>/dev/null; then
+ # Ensure that side-loaded PE addons are loaded if signed, and ignored if not
+ addons_dir=/efi/loader/addons
+ mkdir -p "$addons_dir"
+ ukify build --secureboot-private-key mkosi.key --secureboot-certificate mkosi.crt --cmdline this_should_be_here -o "$addons_dir/good.addon.efi"
+ ukify build --cmdline this_should_not_be_here -o "$addons_dir/bad.addon.efi"
+fi