-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the mkinitcpio post hook to only sign the kernel/UKI which is currently being built instead of all the files in the sbctl database #285
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
#!/usr/bin/bash | ||
echo "Signing EFI binaries..." | ||
/usr/bin/sbctl sign-all -g | ||
|
||
KERENEL_FILE="$1" | ||
UKI_FILE="$3" | ||
|
||
IMAGE_FILE="$KERENEL_FILE" | ||
if [ -n "$KERNELDESTINATION" ] && [ -f "$KERNELDESTINATION" ]; then | ||
IMAGE_FILE="$KERNELDESTINATION" | ||
fi | ||
if [ -n "$UKI_FILE" ]; then | ||
IMAGE_FILE="$UKI_FILE" | ||
fi | ||
|
||
if [ -z "$IMAGE_FILE" ]; then | ||
echo "No kernel or UKI found for signing" | ||
exit 0 | ||
fi | ||
|
||
echo "Signing $IMAGE_FILE" | ||
sbctl sign -s "$IMAGE_FILE" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we really need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, this has already been merged, but I think the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. problem is they're never removed from the sbctl "database", so if you remove the uki, now the sbctl database is out-of-sync There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In that case, sbctl will just display an error, but the exit code will still be zero. So you can just remove from the database file manually when you see the message. That's why the current behavior is ok IMHO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo in the var name?