Based on: #22075
Code reviewers: I recommend reading the new guix-{attest,verify}
files instead of trying to read the diff
The following changes resolve many usability improvements which were pointed out to me:
- Some maintainers like to extract their “uncodesigned tarball” inside the
output/
directory, resulting in the olderguix-attest
mistakenly attesting to the extracted contents - Maintainers whose GPG keys reside on an external smartcard often need to physically interact with the smartcard as a way to approve the signing operation, having one signature per platform means a lot of fidgeting
- Maintainers wishing to sign on a separate machine now has the option of transferring only a subtree of
output/
, namelyoutput/*/SHA256SUMS.part
, in order to perform a signature (you may need to specify an$OUTDIR_BASE
env var) - An
all.SHA256SUMS
file should be usable as the baseSHA256SUMS
in bitcoin core torrents and on the release server.
For those who sign on an separate machine than the one you do builds on, the following steps will work:
env GUIX_SIGS_REPO=/home/achow101/guix.sigs SIGNER=achow101 NO_SIGN=1 ./contrib/guix/guix-attest
- Copy
/home/achow101/guix.sigs/<tag>/achow101
(which does not yet have signatures) to signing machine - Sign the
SHA256SUMS
files:0for i in "<path-to-achow101>/*.SHA256SUMS"; do 1 gpg --detach-sign --local-user "<your-key-here>" --armor --output "$i"{.asc,} 2done
- Upload
<path-to-achow101>
(now with signatures) toguix.sigs
After this change, output directories will now include a SHA256SUMS.part
fragment, created immediately after a successful build:
0output
1└── x86_64-w64-mingw32
2 ├── bitcoin-4e069f7589da-win64-debug.zip
3 ├── bitcoin-4e069f7589da-win64-setup-unsigned.exe
4 ├── bitcoin-4e069f7589da-win64.zip
5 ├── bitcoin-4e069f7589da-win-unsigned.tar.gz
6 └── SHA256SUMS.part
These SHA256SUMS.part
fragments look something like:
03ebd7262b1a0a5bb757fef1f70e7e14033c70f98c059bc4dbfee5d1992b25825 dist-archive/bitcoin-4e069f7589da.tar.gz
1def2e7d3de5ab3e3f955344e75151df4f33713f9101f5295bd13c9375bdf633b x86_64-w64-mingw32/bitcoin-4e069f7589da-win64-debug.zip
2643049fe3ee4a4e83a1739607e67b11b7c9b1a66208a6f35a9ff634ba795500e x86_64-w64-mingw32/bitcoin-4e069f7589da-win64-setup-unsigned.exe
3a247a1ccec0ccc2e138c648284bd01f6a761f2d8d6d07d91b5b4a6670ec3f288 x86_64-w64-mingw32/bitcoin-4e069f7589da-win-unsigned.tar.gz
4fab76a836dcc592e39c04fd2396696633fb6eb56e39ecbf6c909bd173ed4280c x86_64-w64-mingw32/bitcoin-4e069f7589da-win64.zip
Meaning that they are valid SHA256SUMS
files when sha256sum --check
’d at the guix-build-*/output
directory level
When guix-attest
is invoked, these SHA256SUMS.part
files are combined and sorted (by -k2
, LC_ALL=C
) to create:
noncodesigned.SHA256SUMS
for a manifest of all non-codesigned outputs, andall.SHA256SUMS
for a manifest of all outputs including non-codesigned outputs
Then both files are signed, resulting in the following guix.sigs
hierarchy:
04e069f7589da/
1└── dongcarl
2 ├── all.SHA256SUMS
3 ├── all.SHA256SUMS.asc
4 ├── noncodesigned.SHA256SUMS
5 └── noncodesigned.SHA256SUMS.asc