When a PR requires proof of Guix builds (sha256sums), the PR author or reviewer uses a not well documented command to collect the sha256sums of build outputs or manually gathers them from files:
0guix describe
1uname -m
2find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
This PR introduces a guix-shasums script that gathers all the sha256sums from the output directories and either outputs them on the screen or formats them as Markdown formatted output (to the screen or a file) for easy inclusion in a PR or PR comment. The script is based on the commonly used command (as displayed above)
Example of Markdown formatted output:
Guix Build Output
Host architecture: aarch64
Commit: 7d846e5aeae6
File Checksums
SHA256 | FILE |
---|---|
8f0e314bfcc701bd184eb93d6236dd5a115fa03f74a0702abd66e9b1ffc9f136 |
guix-build-7d846e5aeae6/output/aarch64-linux-gnu/SHA256SUMS.part |
f9485defe7044cb02dffbdf49d95cf00631b8f314289376ea1aff54f595f0f8e |
guix-build-7d846e5aeae6/output/aarch64-linux-gnu/bitcoin-7d846e5aeae6-aarch64-linux-gnu-debug.tar.gz |
9eeb2e4c796b3cdee5267cd2a1ca91225b00e3035195a162f52380b45d6487db |
guix-build-7d846e5aeae6/output/aarch64-linux-gnu/bitcoin-7d846e5aeae6-aarch64-linux-gnu.tar.gz |
d88bc97752f27c618868fab92daa39cab265f4a00dd82837c77bc09e10fe3fe5 |
guix-build-7d846e5aeae6/output/dist-archive/bitcoin-7d846e5aeae6.tar.gz |
2bc6e86d713efcb23a34aa679a1b45fc4fedbddefa656eeb6cc0bb442f6630e4 |
guix-build-7d846e5aeae6/output/riscv64-linux-gnu/SHA256SUMS.part |
b995f2b23d3be189709931cd15a15746d0a05a4c4cdbc40674dfcd2fee157f92 |
guix-build-7d846e5aeae6/output/riscv64-linux-gnu/bitcoin-7d846e5aeae6-riscv64-linux-gnu-debug.tar.gz |
c5f2b8f328a5559e3e604267f3e4dd329158d3f7fcb1111fe459c275864db3a8 |
guix-build-7d846e5aeae6/output/riscv64-linux-gnu/bitcoin-7d846e5aeae6-riscv64-linux-gnu.tar.gz |