Skip to content
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

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

into-the-v0id
Copy link
Contributor

@into-the-v0id into-the-v0id commented Jan 29, 2024

See #284 for details on the problem.

This PR updates the mkinitcpio post hook to only sign the kernel/UKI which is currently being built instead of all the files in the sbctl database.

References:

Fixes #284

…currently being built instead of all the files in the sbctl database
@into-the-v0id into-the-v0id temporarily deployed to Build, sign, release binaries February 22, 2024 17:48 — with GitHub Actions Inactive
@into-the-v0id into-the-v0id temporarily deployed to Build, sign, release binaries February 22, 2024 17:48 — with GitHub Actions Inactive
@into-the-v0id into-the-v0id temporarily deployed to Build, sign, release binaries February 22, 2024 17:48 — with GitHub Actions Inactive
@Foxboron
Copy link
Owner

Thanks!

@Foxboron Foxboron merged commit e03264c into Foxboron:master Feb 22, 2024
3 of 5 checks passed
@marmitar
Copy link

@Foxboron any plan to release this fix?

@Foxboron
Copy link
Owner

@TiagodePAlves Can probably try and do a release one of the up comming weekends.

echo "Signing EFI binaries..."
/usr/bin/sbctl sign-all -g

KERENEL_FILE="$1"
Copy link

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?

fi

echo "Signing $IMAGE_FILE"
sbctl sign -s "$IMAGE_FILE"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really need -s here?

Copy link

@marmitar marmitar May 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, this has already been merged, but I think the -s is right here. Initramfs files should always be saved to the database and resigned as soon as possible, when necessary.

Copy link

Choose a reason for hiding this comment

The 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

Choose a reason for hiding this comment

The 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mkinitcpio post hook error
4 participants