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

Suggestion: Only sign generated file in initcpio hook, use sign-all in a separate pacman hook #306

Open
m00nwtchr opened this issue May 1, 2024 · 4 comments

Comments

@m00nwtchr
Copy link

m00nwtchr commented May 1, 2024

That way you avoid repeated "X has already been signed" messages in mkinitcpio -P output, while retaining compatibility with signing files from other packages.

(I use the following for my initcpio hook:)

#!/usr/bin/env bash

uki="$3"
[[ -n "$uki" ]] || exit 0

sbctl sign "$uki"
@detiam
Copy link

detiam commented May 5, 2024

In case user are using sbctl for generate uki:

#!/usr/bin/env bash

uki="$3"
if [[ -n $uki ]]; then
    /usr/bin/sbctl sign "$uki"
else
    /usr/bin/sbctl sign-all -g
fi

@m00nwtchr
Copy link
Author

m00nwtchr commented May 7, 2024

Is there any reason to use sbctl for UKI generation when mkinitcpio already supports it? (afaict the options supported by sbctl and mkinitcpio for ukis are the same)

From the sbctl manpage:

Note that dracut(8) and mkinitcpio(8) supports unified kernel features, and they should be preferred over the sbctl implementation. It is mostly provided in the cases where this feature is not supported by the initramfs generator of the distribution.

@detiam
Copy link

detiam commented May 8, 2024

@m00nwtchr Maybe for ensuring the UKI image always been signed? But I just thought we can't leave the UKI generation feature in sbctl broken if this really get accepted.

Edit: found this already been implemented 4 months ago xd
https://github.com/Foxboron/sbctl/blob/8e0e68bc0959f4e86ffcde9e8fa3f0a1680bf06e/contrib/mkinitcpio/sbctl
wait for release then

@Foxboron
Copy link
Owner

Foxboron commented May 8, 2024

But I just thought we can't leave the UKI generation feature in sbctl broken if this really get accepted.

Fwiw, it's already "almost" broken as the ukify wrapper from systemd supports all the new features.

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

No branches or pull requests

3 participants