scripted-diff: Use C.UTF-8 locale in Guix scripts #35775

pull hebasto wants to merge 4 commits into bitcoin:master from hebasto:260722-guix-locale changing 16 files +42 −24
  1. hebasto commented at 2:12 PM on July 22, 2026: member

    The C.UTF-8 locale is set by default in guix shell, and there is no reason to avoid it nowadays. This PR also silences superfluous warnings from Qt tools, making build logs cleaner and other issues easier to spot. For example:

    Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
    Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
    If this causes problems, reconfigure your locale. See the locale(1) manual
    for more information.
    

    Locales in the guix-* launch scripts have been updated as well for consistency with the rest of the codebase.

    Additionally, the headers of the Guix scripts have been adjusted for uniformity.

  2. hebasto added the label Build system on Jul 22, 2026
  3. DrahtBot commented at 2:12 PM on July 22, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK fanquake

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #25573 (guix: produce a -static-pie bitcoind by fanquake)

    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-->

  4. fanquake commented at 2:18 PM on July 22, 2026: member

    Use C.UTF-8 locale everywhere

    Should say "in Guix scripts", or similar, rather than everywhere, unless the intention was to also change the rest of the codebase?

  5. fanquake commented at 2:20 PM on July 22, 2026: member

    If this was meant to to be codebase wide, should also be updating the linter: https://github.com/bitcoin/bitcoin/blob/master/test/lint/lint-shell-locale.py#L18?

  6. scripted-diff: Use C.UTF-8 locale in Guix scripts
    The C.UTF-8 locale is set by default in `guix shell`, and there is no
    reason to avoid it nowadays. This change also silences superfluous
    warnings from Qt tools, making build logs cleaner and other issues
    easier to spot.
    
    Locales in the `guix-*` launch scripts have been updated as well for
    consistency with the rest of the codebase.
    
    -BEGIN VERIFY SCRIPT-
    
    sed -i "s/\<export LC_ALL=C\>/export LC_ALL=C.UTF-8/g" \
     $( git grep -l "export LC_ALL=C" ./contrib/guix/* )
    
    -END VERIFY SCRIPT-
    8916f7967e
  7. guix: Fix `glibc` version in comment
    At the current time-machine commit
    c5eee3336cc1d10a3cc1c97fde2809c3451624d3, the default `glibc` package
    version is 2.41.
    80f831494e
  8. hebasto force-pushed on Jul 22, 2026
  9. hebasto renamed this:
    scripted-diff: Use C.UTF-8 locale everywhere
    scripted-diff: Use C.UTF-8 locale in Guix scripts
    on Jul 22, 2026
  10. DrahtBot added the label CI failed on Jul 22, 2026
  11. hebasto commented at 2:39 PM on July 22, 2026: member

    Use C.UTF-8 locale everywhere

    Should say "in Guix scripts", or similar, rather than everywhere, unless the intention was to also change the rest of the codebase?

    Sure. Updated.

    If this was meant to to be codebase wide, should also be updating the linter: https://github.com/bitcoin/bitcoin/blob/master/test/lint/lint-shell-locale.py#L18?

    The intention is to keep the change scoped to /contib/guix.

  12. DrahtBot removed the label CI failed on Jul 22, 2026
  13. hebasto commented at 7:22 PM on July 22, 2026: member

    My Guix build:

    aarch64
    3af076b7d74599d88b679a525dcad755574f640ba51195046e0c6b7be4245d69  guix-build-80f831494e53/output/aarch64-linux-gnu/SHA256SUMS.part
    24e1d467f604809c18a299973daab110785e45702d33e17a6aa4d6c58ffe4bf6  guix-build-80f831494e53/output/aarch64-linux-gnu/bitcoin-80f831494e53-aarch64-linux-gnu-debug.tar.gz
    18fe84cbb48b3ae990ba487d19a23a6c0610e1bb99c020bb9138d6fceca5e6d8  guix-build-80f831494e53/output/aarch64-linux-gnu/bitcoin-80f831494e53-aarch64-linux-gnu.tar.gz
    59b0f1279f4417f3837dd62e7dccc1ed2d3e66b11a8d1e9ee5c285dd6fe78845  guix-build-80f831494e53/output/arm-linux-gnueabihf/SHA256SUMS.part
    78c6bf7b6f537aa6f20b0727335623f2221fdcd024207ce4fd7f27f025221a4a  guix-build-80f831494e53/output/arm-linux-gnueabihf/bitcoin-80f831494e53-arm-linux-gnueabihf-debug.tar.gz
    7fe7f475fab37ba6a4496b15361fdc57f4fe0185b9ef3b84662480a3a59f2690  guix-build-80f831494e53/output/arm-linux-gnueabihf/bitcoin-80f831494e53-arm-linux-gnueabihf.tar.gz
    cd5f0392439b87cf494b9c5c91ecc9d5743c136746e0f09d53597ceb9b49d60e  guix-build-80f831494e53/output/arm64-apple-darwin/SHA256SUMS.part
    e93a82bf9992a3fe75ab550d427c6c179e00c687fda5b35423306f75c86312f4  guix-build-80f831494e53/output/arm64-apple-darwin/bitcoin-80f831494e53-arm64-apple-darwin-codesigning.tar.gz
    f523cf3ffe1c2761479ae6f02a57ff988de1d737af266119f70286a590833eeb  guix-build-80f831494e53/output/arm64-apple-darwin/bitcoin-80f831494e53-arm64-apple-darwin-unsigned.tar.gz
    5a8324b54300dd713486c1ce3092e4841857222bc65d1fad8420b0a20d153a96  guix-build-80f831494e53/output/arm64-apple-darwin/bitcoin-80f831494e53-arm64-apple-darwin-unsigned.zip
    5c7199b51625439fa49549d699ee9600f642a0ea04310e7ea9966d36c0e21b63  guix-build-80f831494e53/output/dist-archive/bitcoin-80f831494e53.tar.gz
    bbe78f996161018681e4b31fbdcdee6af9067c896cd67f052ddd532cda76305b  guix-build-80f831494e53/output/powerpc64-linux-gnu/SHA256SUMS.part
    8c801ece8ad96b1fcd72b2cac852f8d30304532cdaf017fc801d51a9d695fa39  guix-build-80f831494e53/output/powerpc64-linux-gnu/bitcoin-80f831494e53-powerpc64-linux-gnu-debug.tar.gz
    8bb70d28b85e0010ac43d7ac7ca169822ed0b739cc991003b1477f2b0531fc12  guix-build-80f831494e53/output/powerpc64-linux-gnu/bitcoin-80f831494e53-powerpc64-linux-gnu.tar.gz
    6d7f0f08b295e32801d39f8b68163c944523400cb36900fda3f91b31027c253e  guix-build-80f831494e53/output/riscv64-linux-gnu/SHA256SUMS.part
    064c26023b62b6231f802d80bf41e8c3391f4b35f6e3d18a7fb150d241f1a960  guix-build-80f831494e53/output/riscv64-linux-gnu/bitcoin-80f831494e53-riscv64-linux-gnu-debug.tar.gz
    c58daf34c63f4549066f755bc4fce4b87d573af52025675f5dd7ddaab73198d3  guix-build-80f831494e53/output/riscv64-linux-gnu/bitcoin-80f831494e53-riscv64-linux-gnu.tar.gz
    13566caa7d243c395bf3878a4f354ec618402e0f5b32e787ca0132d6ba873b81  guix-build-80f831494e53/output/x86_64-apple-darwin/SHA256SUMS.part
    70d5e0636c51e49955489688e8ec4475d01834b38dbf1a27841648ae632feb2d  guix-build-80f831494e53/output/x86_64-apple-darwin/bitcoin-80f831494e53-x86_64-apple-darwin-codesigning.tar.gz
    3c2cba58ea7dc271d2850f3c8ce606371706dd3f565d53fd1e79383af7d2da09  guix-build-80f831494e53/output/x86_64-apple-darwin/bitcoin-80f831494e53-x86_64-apple-darwin-unsigned.tar.gz
    b86a31ed723ce82395c32bde10af540ff620763aa3c51e24c74bc08ac4640ec3  guix-build-80f831494e53/output/x86_64-apple-darwin/bitcoin-80f831494e53-x86_64-apple-darwin-unsigned.zip
    a6b88a0cecd9597daa6a5956204941a193dd17d9775d7af0bd2dc97b792e6d5c  guix-build-80f831494e53/output/x86_64-linux-gnu/SHA256SUMS.part
    6b77b576c11fd51cd33430ba98961dd611c7dd165d1e78c138216dde6087ec68  guix-build-80f831494e53/output/x86_64-linux-gnu/bitcoin-80f831494e53-x86_64-linux-gnu-debug.tar.gz
    85393ac5506bc7545c3f961cc2b78c880380c711cf6b0db696087936c94ac87a  guix-build-80f831494e53/output/x86_64-linux-gnu/bitcoin-80f831494e53-x86_64-linux-gnu.tar.gz
    b74712c1ac257196826d876c6430b459de5623aeeada73c0f6c6e34b8500ceb2  guix-build-80f831494e53/output/x86_64-w64-mingw32/SHA256SUMS.part
    6e1a6affce931082da6017c9c2586b4470fa2c95daafe31da6da3ece7d992180  guix-build-80f831494e53/output/x86_64-w64-mingw32/bitcoin-80f831494e53-win64-codesigning.tar.gz
    26ad49765138fe3d4c96ab24a310235a438999f25d1fc177ec1dbddbff30f3d1  guix-build-80f831494e53/output/x86_64-w64-mingw32/bitcoin-80f831494e53-win64-debug.zip
    286a6023769e123a9cd90fd9d18a7151308d7f92c47c020074331faa76912bb2  guix-build-80f831494e53/output/x86_64-w64-mingw32/bitcoin-80f831494e53-win64-setup-unsigned.exe
    08cb0a043fb5ee517c049988663435fc339606a3ff9cfb4ee9641c8f3f229f8a  guix-build-80f831494e53/output/x86_64-w64-mingw32/bitcoin-80f831494e53-win64-unsigned.zip
    
  14. in contrib/guix/guix-verify:3 in 80f831494e outdated
       0 | @@ -1,5 +1,5 @@
       1 |  #!/usr/bin/env bash
       2 | -export LC_ALL=C
       3 | +export LC_ALL=C.UTF-8
       4 |  set -e -o pipefail
    


    fanquake commented at 9:18 AM on July 23, 2026:

    Might as well consolidate all the headers, so we don't have to touch them again:

    #!/usr/bin/env bash
    # Copyright (c) The Bitcoin Core developers
    # Distributed under the MIT software license, see the accompanying
    # file COPYING or https://opensource.org/license/mit.
    export LC_ALL=C.UTF-8
    set -o errexit -o pipefail
    

    hebasto commented at 11:32 AM on July 23, 2026:

    Sure. Added commits to consolidate all the headers.

  15. fanquake commented at 9:21 AM on July 23, 2026: member

    ACK 80f831494e5347057199055b20c8b75bedd8bd07

  16. guix: Add copyright headers to Guix scripts 711eb10f08
  17. scripted-diff: Use long form of shell options in Guix scripts
    This improves readability and consistency across all Guix scripts.
    
    -BEGIN VERIFY SCRIPT-
    
    sed -i "s/^set -e\>/set -o errexit/g" \
     $( git grep -l "set -e" ./contrib/guix )
    
    -END VERIFY SCRIPT-
    2cb3bfa8df
  18. fanquake commented at 12:47 PM on July 23, 2026: member

    ACK 2cb3bfa8df7cab0635be221af1c8754dbbaff335

  19. fanquake merged this on Jul 23, 2026
  20. fanquake closed this on Jul 23, 2026

  21. hebasto deleted the branch on Jul 24, 2026

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-07-31 20:50 UTC

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