ci: have bash scripts explicitly opt out of locale dependence. #187

pull Sjors wants to merge 3 commits into bitcoin-core:master from Sjors:2025/06/export changing 7 files +18 −4
  1. Sjors commented at 7:15 am on June 27, 2025: member

    Prevents linter issues like reported here: https://github.com/Sjors/bitcoin/pull/90#issuecomment-3003870162

    But probably also just a good idea.

    Also make the use of #!/usr/bin/env bash consistent and added a copyright header (mostly for aesthetic reasons).

  2. DrahtBot commented at 7:15 am on June 27, 2025: none

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

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK ryanofsky

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

  3. Sjors force-pushed on Jun 27, 2025
  4. in ci/configs/default.sh:1 in 04eb50505b outdated
    0@@ -1,3 +1,6 @@
    1+#!/usr/bin/env bash
    


    ryanofsky commented at 2:30 pm on June 27, 2025:

    In commit “ci: export LC_ALL” (04eb50505be5700b374d552aaa814422b41ebc33)

    I don’t think the config fragments like ci/configs/default.sh should have hashbangs or export LC_ALL because they aren’t marked executable and aren’t designed to be run as standalone scripts. (They only set variables and I wouldn’t want to encourage them to do anything more than that.)

    To avoid the lint error, I’d suggest renaming the config files to ci/configs/*.bash instead. This would also be nice because it would indicate that the config files must use bash, not some other variant of shell script. (Note that renaming would also require updating .github/workflows/ci.yml and ci/README.md)

  5. in ci/configs/gnu32.sh:3 in fefee4bcdd outdated
    0@@ -1,4 +1,9 @@
    1 #!/usr/bin/env bash
    2+#
    3+# Copyright (c) The Bitcoin Core developers
    


    ryanofsky commented at 2:40 pm on June 27, 2025:

    In commit “ci: add copyright to bash scripts” (fefee4bcdd739b62f9c98df4706b3b5c5ab47087)

    Again would prefer to drop copyright from the config fragments, but keep it in the CI scripts. IMO copyright blends pretty well into source code but I find it jarring when it’s injected into things like minor pieces of documentation and config files, and would prefer keep distractions to a minimum in places like that. Ideally these files can just begin with CI_DESC="Description of CI job"

  6. ryanofsky approved
  7. ryanofsky commented at 2:43 pm on June 27, 2025: collaborator
    Code review ACK fefee4bcdd739b62f9c98df4706b3b5c5ab47087. This looks fine, and thanks for the fix! I did suggest some tweaks to consider, but this also looks ok as is
  8. ci: export LC_ALL
    Explicitly opt out of locale dependence.
    e956467ae4
  9. ci: add copyright to bash scripts 401e0ce1d9
  10. Sjors commented at 3:06 pm on June 27, 2025: member
    I dropped copyright and locale from ci/configs, and renamed them to .bash.
  11. Sjors force-pushed on Jun 27, 2025
  12. ci: rename configs to .bash
    Avoids locale linting error and indicates that the config files
    must use bash, not some other variant of shell script.
    3a6db38e56
  13. Sjors force-pushed on Jun 27, 2025
  14. Sjors commented at 3:10 pm on June 27, 2025: member
    I didn’t test if the new push actually satisfies the linter. Will test that again along with other changes (when they’re made).
  15. ryanofsky commented at 3:20 pm on June 27, 2025: collaborator

    Code review ACK 3a6db38e561f7645c6e14dd053ee15eb06347d20. Thanks!

    I assumed renaming should fix the lint issues based on the *.sh glob pattern in test/lint/lint-shell-locale.py, but will see. Will merge this shortly.

  16. ryanofsky merged this on Jun 27, 2025
  17. ryanofsky closed this on Jun 27, 2025

  18. Sjors referenced this in commit 74e21e9b88 on Jun 28, 2025
  19. Sjors referenced this in commit c909d3c2f7 on Jun 30, 2025
  20. Sjors referenced this in commit 134a57a242 on Jun 30, 2025
  21. ryanofsky referenced this in commit 96bcbb60a6 on Jul 1, 2025
  22. ryanofsky referenced this in commit 6e40719c06 on Jul 1, 2025
  23. ryanofsky referenced this in commit ca509dd2b9 on Jul 1, 2025
  24. ryanofsky referenced this in commit e886c65b6b on Aug 8, 2025
  25. Sjors referenced this in commit 8ce8288ee6 on Aug 12, 2025
  26. fanquake referenced this in commit f58de8749e on Aug 18, 2025
  27. janus referenced this in commit d7ab135840 on Sep 15, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/libmultiprocess. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-12-04 19:30 UTC

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