Skip to content

Commit

Permalink
mkosi: Fix particle profile
Browse files Browse the repository at this point in the history
The sbsign and ukify part was moved into a finalize script
rather than a postinst.chroot script so was using host tools
instead of just-built.
  • Loading branch information
richardmaw-codethink authored and DaanDeMeyer committed May 3, 2024
1 parent 85e23ef commit a56820d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
9 changes: 0 additions & 9 deletions mkosi.images/system/mkosi.conf.d/20-particle/mkosi.finalize
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,3 @@ set -e

mkdir -p "$BUILDROOT"/usr/share/factory/mkosi
cp --archive --recursive --no-target-directory --reflink=auto "$BUILDROOT"/etc "$BUILDROOT"/usr/share/factory/mkosi

# 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
12 changes: 12 additions & 0 deletions mkosi.images/system/mkosi.conf.d/20-particle/mkosi.postinst.chroot
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
# SPDX-License-Identifier: LGPL-2.1-or-later
set -e

# 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

0 comments on commit a56820d

Please sign in to comment.