guix, refactor: Minor script cleanups and improvements #35131

pull hebasto wants to merge 7 commits into bitcoin:master from hebasto:260421-guix-shell changing 5 files +53 −91
  1. hebasto commented at 2:17 PM on April 21, 2026: member

    While working on #35098, I reviewed my notes regarding a few minor Guix script flaws and decided to address them here.

    This PR:

    1. Removes unused code.

    2. Reduces code duplication.

    3. Improves consistency across function usage.

    4. Minimizes ShellCheck directive usage.

  2. guix, refactor: Remove unused `out_name()` function 54f6905c42
  3. guix, refactor: Remove `contains()` function fde3498401
  4. hebasto added the label Build system on Apr 21, 2026
  5. DrahtBot commented at 2:17 PM on April 21, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #35098 (guix: Compile GUI separately from other binaries by hebasto)
    • #34948 (guix: Split manifest into build and codesign manifests by hebasto)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  6. in contrib/guix/libexec/common.bash:3 in 93e0dd498a
       0 | @@ -0,0 +1,29 @@
       1 | +#!/usr/bin/env bash
       2 | +export LC_ALL=C
       3 | +set -e -o pipefail
    


    maflcko commented at 2:30 PM on April 21, 2026:

    style nit: My preference would be to use the long self-explanatory form. Also, is there a reason to tolerate unset? I.e. set -o errexit -o pipefail -o nounset, possibly with -o xtrace, but that may be more verbose. Just a style-nit/question, so feel free to ignore.


    hebasto commented at 2:35 PM on April 21, 2026:

    style nit: My preference would be to use the long self-explanatory form.

    Thanks! Taken.

    Not using -o nounset, as it proliferates to the parent script and breaks it.

  7. hebasto force-pushed on Apr 21, 2026
  8. hebasto marked this as a draft on Apr 21, 2026
  9. DrahtBot added the label CI failed on Apr 21, 2026
  10. guix, refactor: Move duplicated `outdir_for_host()` to `common.bash` 76a9705798
  11. guix, refactor: Move duplicated `profiledir_for_host()` to `common.bash` a5480d54f6
  12. guix, refactor: Move `distsrc_for_host()` to `common.bash`
    The `distsrc_for_host()` function now accepts a second optional
    argument, `SUFFIX`, making it consistent with other similar functions.
    6b4d761ca9
  13. guix, refactor: Add `BASE` argument to `{distsrc,outdir}_for_host` 6dd115af20
  14. guix: Remove redundant ShellCheck `source` directives 9496c44e27
  15. hebasto force-pushed on Apr 21, 2026
  16. hebasto marked this as ready for review on Apr 21, 2026
  17. DrahtBot removed the label CI failed on Apr 21, 2026
  18. hebasto commented at 10:56 AM on April 23, 2026: member

    My Guix build:

    aarch64
    b3fe990939c2c9da54cbfe983354236021a4839050797195fdcbe0131a24de73  guix-build-9496c44e2720/output/aarch64-linux-gnu/SHA256SUMS.part
    a98d0f282a41856af2d9413749b6623d94e8c8d13d87083f918e07e451e7b72d  guix-build-9496c44e2720/output/aarch64-linux-gnu/bitcoin-9496c44e2720-aarch64-linux-gnu-debug.tar.gz
    7912144c50e341afe53d7c33b4d473666b97117585b334d3843cd47ff8b2da39  guix-build-9496c44e2720/output/aarch64-linux-gnu/bitcoin-9496c44e2720-aarch64-linux-gnu.tar.gz
    b1d06da95dbcfeb78ab1d3563dd56e87985cdc46d7094615d19a87e2e3db4a7f  guix-build-9496c44e2720/output/arm-linux-gnueabihf/SHA256SUMS.part
    1f0b1223af265264d56654f75e165b0b538130d32f48396c8a6818d852f4f6f5  guix-build-9496c44e2720/output/arm-linux-gnueabihf/bitcoin-9496c44e2720-arm-linux-gnueabihf-debug.tar.gz
    0ad8f45d25b186af566062deefd8aa8b795ca606020adf2aa2f69d480a34043a  guix-build-9496c44e2720/output/arm-linux-gnueabihf/bitcoin-9496c44e2720-arm-linux-gnueabihf.tar.gz
    b374c831a4c63fdfd74d95dec2ad7fba0deeba19fed75bc0719aec7c486b2330  guix-build-9496c44e2720/output/arm64-apple-darwin/SHA256SUMS.part
    cfa9b5f995d2082b7a8a0d8b2beb106ceff812d83dda186a24919dd1811e5c9e  guix-build-9496c44e2720/output/arm64-apple-darwin/bitcoin-9496c44e2720-arm64-apple-darwin-codesigning.tar.gz
    b490f6fa87f339714f1def06a8bdf1abae9834c5d1fde698eb49173aa197be5f  guix-build-9496c44e2720/output/arm64-apple-darwin/bitcoin-9496c44e2720-arm64-apple-darwin-unsigned.tar.gz
    944cc088655eb362d8504e6150bba68d14e7038b604ca4b4d7779bf4d5bdae01  guix-build-9496c44e2720/output/arm64-apple-darwin/bitcoin-9496c44e2720-arm64-apple-darwin-unsigned.zip
    4aa527bb00b41480a215a8ae8ac01aeb75ab5e8950494ce17c47104d0d287625  guix-build-9496c44e2720/output/dist-archive/bitcoin-9496c44e2720.tar.gz
    09624483b0920e27dee6942d2a4a901257356e0562dfd5e88526a11749a102bd  guix-build-9496c44e2720/output/powerpc64-linux-gnu/SHA256SUMS.part
    5d1275a33c84f6f1ebd027ff3a210fae305168a09e31688c2610159b4981b76c  guix-build-9496c44e2720/output/powerpc64-linux-gnu/bitcoin-9496c44e2720-powerpc64-linux-gnu-debug.tar.gz
    3c38b14f2d877c429b9ffa8313679b6022304aecfc1dbe5c57b06a3d9c67f1c9  guix-build-9496c44e2720/output/powerpc64-linux-gnu/bitcoin-9496c44e2720-powerpc64-linux-gnu.tar.gz
    a4019ba74e62bcc11c089e5fd4a7c2c4f8d11cbf6ea693c1f19860708374f496  guix-build-9496c44e2720/output/riscv64-linux-gnu/SHA256SUMS.part
    94ccab2e4c8af907a043f85d95a3e3615a3a31cc5495e2da41684c46ce2b382c  guix-build-9496c44e2720/output/riscv64-linux-gnu/bitcoin-9496c44e2720-riscv64-linux-gnu-debug.tar.gz
    979b829d9920f99994589ea3793d82d02c4057b02669cae056222662f7e0a6ff  guix-build-9496c44e2720/output/riscv64-linux-gnu/bitcoin-9496c44e2720-riscv64-linux-gnu.tar.gz
    0f99750990bdbd423d5c3623453d19537eb8da969bb7f3a38e6ac49bd2aad3d6  guix-build-9496c44e2720/output/x86_64-apple-darwin/SHA256SUMS.part
    8ae8c9449c99c262a1b79c44c9dd8ea48ce9643c36df9f778f46cfa13d4816a6  guix-build-9496c44e2720/output/x86_64-apple-darwin/bitcoin-9496c44e2720-x86_64-apple-darwin-codesigning.tar.gz
    5bb1c12352146068827edc0cf3bfe90965d146a6806c72e687da5b59c4a270ea  guix-build-9496c44e2720/output/x86_64-apple-darwin/bitcoin-9496c44e2720-x86_64-apple-darwin-unsigned.tar.gz
    862c54560d702efd70b16e3f81addb24a374e6357d5de54bb8888d5a3230cdb5  guix-build-9496c44e2720/output/x86_64-apple-darwin/bitcoin-9496c44e2720-x86_64-apple-darwin-unsigned.zip
    08d8dcf5de4c05a9aa217de429642d0cdf67dbcd0d6c0aea65908a6e83a6b9b8  guix-build-9496c44e2720/output/x86_64-linux-gnu/SHA256SUMS.part
    b2facd7d71cc12963ec5491ebca858eed1782ac8682e2c61964bb02c9f6e4ddf  guix-build-9496c44e2720/output/x86_64-linux-gnu/bitcoin-9496c44e2720-x86_64-linux-gnu-debug.tar.gz
    3949ae75b05810a3e9a8fb063fed84459ee30d61c59d3d51a591dc5450e0e07f  guix-build-9496c44e2720/output/x86_64-linux-gnu/bitcoin-9496c44e2720-x86_64-linux-gnu.tar.gz
    d7bb100958443ad52c7b96d058e501f033b4f3d7351f3a3a686ca6819d91d89c  guix-build-9496c44e2720/output/x86_64-w64-mingw32/SHA256SUMS.part
    26accdf6618b5c45c0a8cb911e6f4d4208e55b788541a28b88adf4a435a9e7cf  guix-build-9496c44e2720/output/x86_64-w64-mingw32/bitcoin-9496c44e2720-win64-codesigning.tar.gz
    760e609156863e8ecc279d5bbaf4c6d71c0a32d6f3587ec7528ffaa8e13ff2d8  guix-build-9496c44e2720/output/x86_64-w64-mingw32/bitcoin-9496c44e2720-win64-debug.zip
    4741fc6bcad977434a12635be50f1b7a01a467bd8f5e55b0cf5e4f410d78dc2c  guix-build-9496c44e2720/output/x86_64-w64-mingw32/bitcoin-9496c44e2720-win64-setup-unsigned.exe
    d76a8cb6a35ef23af834f3d113bf94eaded4fc5722a8475a186704e0aa7dad6b  guix-build-9496c44e2720/output/x86_64-w64-mingw32/bitcoin-9496c44e2720-win64-unsigned.zip
    

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: 2026-04-24 21:12 UTC

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