diff --git a/.github/workflows/mkosi.yml b/.github/workflows/mkosi.yml index a394e121cf7..020f7638521 100644 --- a/.github/workflows/mkosi.yml +++ b/.github/workflows/mkosi.yml @@ -140,6 +140,7 @@ jobs: SANITIZERS=${{ matrix.sanitizers }} MESON_OPTIONS=--werror LLVM=${{ matrix.llvm }} + SYSEXT=1 [Host] QemuMem=4G diff --git a/mkosi.clean b/mkosi.clean index 64810b79571..bcd1ae42c89 100755 --- a/mkosi.clean +++ b/mkosi.clean @@ -2,4 +2,4 @@ set -e set -o nounset -rm -f "$OUTPUTDIR"/*.{rpm,deb,pkg.tar} +rm -f "$OUTPUTDIR"/*.{rpm,deb,pkg.tar} "$OUTPUTDIR"/systemd.raw diff --git a/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot b/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot index 21f106292bb..37a4377f2f1 100755 --- a/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot +++ b/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot @@ -2,6 +2,8 @@ # SPDX-License-Identifier: LGPL-2.1-or-later set -e +. mkosi.functions + if ((NO_BUILD)); then exit 0 fi @@ -120,3 +122,5 @@ CXX_LD="$( ((LLVM)) && echo lld)" \ cp "$OUTPUTDIR"/*.rpm "$PACKAGEDIR" cp "$OUTPUTDIR"/*.rpm "$BUILDDIR" + +make_sysext_unsigned /var/tmp/BUILD/*/BUILDROOT diff --git a/mkosi.conf.d/10-opensuse/mkosi.build.chroot b/mkosi.conf.d/10-opensuse/mkosi.build.chroot index 67481d0b10c..e9f1e8a123e 100755 --- a/mkosi.conf.d/10-opensuse/mkosi.build.chroot +++ b/mkosi.conf.d/10-opensuse/mkosi.build.chroot @@ -2,6 +2,8 @@ # SPDX-License-Identifier: LGPL-2.1-or-later set -e +. mkosi.functions + if ((NO_BUILD)); then exit 0 fi @@ -139,3 +141,5 @@ fi cp "$OUTPUTDIR"/*.rpm "$PACKAGEDIR" cp "$OUTPUTDIR"/*.rpm "$BUILDDIR" + +make_sysext_unsigned /var/tmp/BUILD/*/BUILDROOT diff --git a/mkosi.functions b/mkosi.functions new file mode 100644 index 00000000000..c19c1aa6435 --- /dev/null +++ b/mkosi.functions @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +make_sysext_unsigned() { + if ! ((SYSEXT)); then + return + fi + + mkdir -p /usr/lib/systemd/repart/definitions/sysext-unsigned.repart.d + cat >/usr/lib/systemd/repart/definitions/sysext-unsigned.repart.d/10-root.conf <"$1"/usr/lib/extension-release.d/extension-release.systemd <>"$1"/usr/lib/extension-release.d/extension-release.systemd <>"$1"/usr/lib/extension-release.d/extension-release.systemd <