-
Notifications
You must be signed in to change notification settings - Fork 335
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
Add scripts and config to support signing UKIs in OBS #3377
base: main
Are you sure you want to change the base?
Conversation
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.
Making the output directory available to build scripts is not an option, because we don't clean up the output directory when Format=none which causes a big mess if we make it available to build scripts.
Please use either the build directory or the source directories via BuildSources=
to get stuff out of the build script.
But how? Everything in the build directory is lost after the build |
Huh? Not at all, |
wat |
But I mean that whatever is in there is not then moved to the output directory, so the build finishes and there's nothing, it's all lost |
It's there
|
I mean that you make the output directory available to the build script via |
8aae290
to
2db4034
Compare
4644447
to
b252a0d
Compare
0deaae1
to
5bf44db
Compare
c6c20a5
to
6377a9e
Compare
947a019
to
ccd73a9
Compare
This comment was marked as resolved.
This comment was marked as resolved.
44447de
to
b936a7c
Compare
3f6d077
to
25dc6ce
Compare
while read -r pol; do | ||
echo -n "$pol" | tr '[:lower:]' '[:upper:]' | basenc --base16 --decode >"hashes/pcrs/${f}/${pol}" | ||
done < <(jq -r 'to_entries[] | .value[].pol' <"${OUTPUTDIR}/${f%.efi}.pcrs") |
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.
haven't checked this with actual data yet, but maybe the whole thing could be
while read -r pol; do | |
echo -n "$pol" | tr '[:lower:]' '[:upper:]' | basenc --base16 --decode >"hashes/pcrs/${f}/${pol}" | |
done < <(jq -r 'to_entries[] | .value[].pol' <"${OUTPUTDIR}/${f%.efi}.pcrs") | |
jq -r 'to_entries[] | .value[].pol | ascii_downcase' "${OUTPUTDIR}/${f%.efi}.pcrs" | | |
basenc --base16 --decode >"hashes/pcrs/${f}/${pol}" |
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.
$pol is not defined in that case
When building a UKI emit a JSON blob containing all the PCR policy blobs, so that it can be signed offline. A single JSON file is written out, even if multiple profiles are used, as ukify can be used to reattach a single blob and will ensure the right signature is applied to the right PE .pcrsig section in case of multiple profiles.
Signs both PCR digests (including multi-profile) and UKIs themselves. Requires new ukify.
https://build.opensuse.org/package/show/home:bluca:branches:home:bluca:systemd/debian-image