guix: Added guix-shasums script for gathering and formatting build output checksums #33465

pull janb84 wants to merge 1 commits into bitcoin:master from janb84:guix-shasum changing 2 files +112 −0
  1. janb84 commented at 5:44 pm on September 23, 2025: contributor

    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
  2. guix: Added guix-shasums for gathering checksums
    Script for gathering and formatting shasum build outputs for (easy) inclusion in guix PR comments.
    Also added a section to the README explaining the new functionality.
    a6cdf03681
  3. DrahtBot added the label Build system on Sep 23, 2025
  4. DrahtBot commented at 5:44 pm on September 23, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33465.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Approach NACK trevarj

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  5. janb84 commented at 8:48 pm on September 23, 2025: contributor

    Guix Build Output

    Host architecture: aarch64 Commit: a6cdf0368194

    File Checksums

    SHA256 FILE
    631ef0d74ff8260c57cb0bfd5d5592735eb659852b97bd6312ede60297a25354 guix-build-a6cdf0368194/output/aarch64-linux-gnu/SHA256SUMS.part
    8b444b56d08047c199635bd150bca809aade5458df4db4f1ed99939b998371cd guix-build-a6cdf0368194/output/aarch64-linux-gnu/bitcoin-a6cdf0368194-aarch64-linux-gnu-debug.tar.gz
    063b9c9c55aebc0f073b5fee553b210f791e106d9286b8f23c0532b4f26f2ac1 guix-build-a6cdf0368194/output/aarch64-linux-gnu/bitcoin-a6cdf0368194-aarch64-linux-gnu.tar.gz
    4525a288d363c214cec616f4c000c7d2b75d0ed598993b86cfc70a7dcce549d7 guix-build-a6cdf0368194/output/arm-linux-gnueabihf/SHA256SUMS.part
    91a2509b538b10ea610c22510edc2c33a69325cbeb1c86be8ffeb0a2b0188af7 guix-build-a6cdf0368194/output/arm-linux-gnueabihf/bitcoin-a6cdf0368194-arm-linux-gnueabihf-debug.tar.gz
    48969a2a5246b7eb4687f69c278067b817aa82862f75af94e54f18e5a9bf528a guix-build-a6cdf0368194/output/arm-linux-gnueabihf/bitcoin-a6cdf0368194-arm-linux-gnueabihf.tar.gz
    b18f14659f5a54b47e7eb14e23d971c5efb28d769d425bd3d37b9e4f56168c79 guix-build-a6cdf0368194/output/arm64-apple-darwin/SHA256SUMS.part
    c83de824a3393117d82139a2b410a7a20f84340944657744705d30b6b3910829 guix-build-a6cdf0368194/output/arm64-apple-darwin/bitcoin-a6cdf0368194-arm64-apple-darwin-codesigning.tar.gz
    36f7d6ac1822c63adef5a7559ac599cfdc62fea70fba5a6cfd32032dc1b24f6c guix-build-a6cdf0368194/output/arm64-apple-darwin/bitcoin-a6cdf0368194-arm64-apple-darwin-unsigned.tar.gz
    7d1b12c88c79f2fc4cb5bb58d62eebdbf12c0ca50f77e55c0238260ba4416849 guix-build-a6cdf0368194/output/arm64-apple-darwin/bitcoin-a6cdf0368194-arm64-apple-darwin-unsigned.zip
    a7ff8e72ceb4af9dae5e99cb7b91e3f455d3b5bb3d55f9ea76dd9be316d5a6f7 guix-build-a6cdf0368194/output/dist-archive/bitcoin-a6cdf0368194.tar.gz
    71aee39825dd9e715bd7ce3521775f12442ed2b2dffe06e1dcbe113fb40c51a0 guix-build-a6cdf0368194/output/powerpc64-linux-gnu/SHA256SUMS.part
    0d39457604777f93638f12f0e8b0c43536c070e56bfc25de15e0c50fdbfdbd14 guix-build-a6cdf0368194/output/powerpc64-linux-gnu/bitcoin-a6cdf0368194-powerpc64-linux-gnu-debug.tar.gz
    a783393595ac8db0a822b7b4a0a6e3b35095d3d0135fde97a85dfd245dff7492 guix-build-a6cdf0368194/output/powerpc64-linux-gnu/bitcoin-a6cdf0368194-powerpc64-linux-gnu.tar.gz
    56e0025fe5cc32c7f592142e36fece97cf998f6c5687af80455418b293b50100 guix-build-a6cdf0368194/output/riscv64-linux-gnu/SHA256SUMS.part
    98c6680e17f33a5e87a8d15ed91bc618623d5b66d0e03afb23615f4693a87ed7 guix-build-a6cdf0368194/output/riscv64-linux-gnu/bitcoin-a6cdf0368194-riscv64-linux-gnu-debug.tar.gz
    972138c8755e60a110bf702e99520f8110479056a13926fdd8389256de97f3ef guix-build-a6cdf0368194/output/riscv64-linux-gnu/bitcoin-a6cdf0368194-riscv64-linux-gnu.tar.gz
    694da005c941d7bb675cad5f3be9e27e8224516c9cc28fc9f827aae099606761 guix-build-a6cdf0368194/output/x86_64-apple-darwin/SHA256SUMS.part
    0616deeade13f8eb61abedaea5e37b100acee80e920b40ec76ec25cf55bc0daa guix-build-a6cdf0368194/output/x86_64-apple-darwin/bitcoin-a6cdf0368194-x86_64-apple-darwin-codesigning.tar.gz
    648fc40cf0233c7a3ca8b598f3a837ac102db462c651723a1eb9dfde524e3dcd guix-build-a6cdf0368194/output/x86_64-apple-darwin/bitcoin-a6cdf0368194-x86_64-apple-darwin-unsigned.tar.gz
    af9bd72a255a9153985b929d753b8f1af01982f8d7ebbb6329e3bd1f32fe7a56 guix-build-a6cdf0368194/output/x86_64-apple-darwin/bitcoin-a6cdf0368194-x86_64-apple-darwin-unsigned.zip
    a928b290915dea2c2bedfdd780a9f13d258d23723f117cabb08fdef8437befd8 guix-build-a6cdf0368194/output/x86_64-linux-gnu/SHA256SUMS.part
    193a9b527deaad389cfeba5467157074399aa1a2c91889793938c190c1533ef8 guix-build-a6cdf0368194/output/x86_64-linux-gnu/bitcoin-a6cdf0368194-x86_64-linux-gnu-debug.tar.gz
    01fd59505faeeb7e97870e34b481281b7591e1b4b7a837b36344f772d31a241c guix-build-a6cdf0368194/output/x86_64-linux-gnu/bitcoin-a6cdf0368194-x86_64-linux-gnu.tar.gz
    c07b6c9825cdb193592c99b0d3fc35851c0b1a0d059f3f5ca1ac804204b2fb8b guix-build-a6cdf0368194/output/x86_64-w64-mingw32/SHA256SUMS.part
    4403b9a2a4f5ca75a46e3345b3ea5eae7697c0988b7d349ed6688641db0bed23 guix-build-a6cdf0368194/output/x86_64-w64-mingw32/bitcoin-a6cdf0368194-win64-codesigning.tar.gz
    42d46319a8df3cc3b179ba3fa573f8222c76aa90cc1e29ade194dd2811f8014c guix-build-a6cdf0368194/output/x86_64-w64-mingw32/bitcoin-a6cdf0368194-win64-debug.zip
    543024beae93ce26e54b08fb449c7e0f5bef6a114fa1a2e73c532e7e7bde80e6 guix-build-a6cdf0368194/output/x86_64-w64-mingw32/bitcoin-a6cdf0368194-win64-setup-unsigned.exe
    cbe5d3bff373111413c6e1da54448a49f56deb294d075295c791b1e642677cfe guix-build-a6cdf0368194/output/x86_64-w64-mingw32/bitcoin-a6cdf0368194-win64-unsigned.zip
  6. fanquake commented at 8:53 pm on September 23, 2025: member
    ~0. I’m not sure if 90 lines of bash, is better than documenting and using the one-liner? Note that the markdown also bloats the size of the comment dramatically (https://github.com/bitcoin/bitcoin/pull/33465#issuecomment-3325505399), compared to what is currently used (https://github.com/bitcoin/bitcoin/pull/33185#issuecomment-31968446200 (and makes it harder to copy paste).
  7. hebasto commented at 9:25 pm on September 23, 2025: member

    ~0. I’m not sure if 90 lines of bash, is better than documenting and using the one-liner? Note that the markdown also bloats the size of the comment dramatically (#33465 (comment)), compared to what is currently used (#33185 (comment) (and makes it harder to copy paste).

    Same from me.

  8. trevarj commented at 10:10 pm on September 23, 2025: none

    Firstly, thanks for sharing that one-liner. I looked everywhere for it and ended up doing it manually 😊

    Approach NACK from me as well, since I think the compact code block is more legible due to not having newlines in the markdown table cells. I don’t mine the one-liner in its own script, but having it documented seems necessary.

  9. janb84 commented at 8:42 am on September 24, 2025: contributor

    closing in favour of #33472

    Thanks for the feedback

  10. janb84 closed this on Sep 24, 2025

  11. janb84 deleted the branch on Sep 24, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-09-26 15:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me