build: make sure we can overwrite config.{guess,sub} before doing so #27875

pull 0xB10C wants to merge 1 commits into bitcoin:master from 0xB10C:2023-06-fix-config.guess-permissions changing 1 files +4 −0
  1. 0xB10C commented at 1:01 pm on June 13, 2023: contributor

    Since ea7b8528 (#26422), autogen.sh overwrites the build-aux/config.{guess, sub} files (installed there by autoreconf) with the depends/config.{guess, sub} files if these are newer.

    The autoreconf tool copies them from it’s share/autoconf/build-aux/ directory. Specifically on NixOS, the share/autoconf/build-aux/ files are located in the nix-store and are read-only. autoreconf preserves the read-only permissions when copying. Overwriting them with our depends/config.{guess, sub} files subsequently fails.

    To make sure we can overwrite the files, set write permissions to the current user and group before overwriting. This fixes the problem on NixOS.

    fixes #27873

  2. build: make sure we can overwrite config.{guess,sub}
    Since ea7b8528 (#26422), autogen.sh overwrites the
    build-aux/config.{guess, sub} files (installed there by autoreconf)
    with the depends/config.{guess, sub} files if these are newer.
    
    The autoreconf tool copies them from it's share/autoconf/build-aux/
    directory. Specifically on NixOS, the share/autoconf/build-aux/
    files are located in the nix-store and are read-only. autoreconf
    preserves the read-only permissions when copying. Overwriting them
    with our depends/config.{guess, sub} subsequently fails.
    
    To make sure we can overwrite the files, we set write permissions to
    the current user and group before overwriting. This fixes the problem
    on NixOS.
    
    fixes #27873: Can't copy to 'build-aux/config.guess' in autoconf.sh: Permission denied
    fc6c17b838
  3. DrahtBot commented at 1:01 pm on June 13, 2023: contributor

    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 dergoegge, fanquake
    Concept ACK hebasto, TheCharlatan

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

  4. DrahtBot added the label Build system on Jun 13, 2023
  5. hebasto commented at 1:13 pm on June 13, 2023: member
    Concept ACK. However, I’m not a NixOS user and cannot test this PR, unfortunately.
  6. dergoegge commented at 2:04 pm on June 13, 2023: member

    Concept ACK

    I’ve been having this issue on my NixOS machine, will test.

  7. dergoegge approved
  8. dergoegge commented at 2:31 pm on June 13, 2023: member
    tACK fc6c17b83887ef193f2b97264b1843c94dcb915d
  9. fanquake commented at 2:36 pm on June 13, 2023: member
    Concept ACK
  10. TheCharlatan commented at 8:40 pm on June 13, 2023: contributor
    Concept ACK
  11. fanquake commented at 2:30 pm on June 14, 2023: member

    Guix build:

     0f18a12cd7d70759bd02d62b6ef5bb473f40d2ae2b4ab868005005cd16beb66ab  guix-build-fc6c17b83887/output/aarch64-linux-gnu/SHA256SUMS.part
     1c9324853dbc4cde7ec50e5f3c86388fcdfff754c49cdb14b549f808ba7988718  guix-build-fc6c17b83887/output/aarch64-linux-gnu/bitcoin-fc6c17b83887-aarch64-linux-gnu-debug.tar.gz
     21aa109712af8bfca4cbaab2f570941343667f0524331d6b919d42e3bbd35c53a  guix-build-fc6c17b83887/output/aarch64-linux-gnu/bitcoin-fc6c17b83887-aarch64-linux-gnu.tar.gz
     3a3f34dde5216f1eca8130c7f346aeb5cd92b0175f3855d35c371924114c580fc  guix-build-fc6c17b83887/output/arm-linux-gnueabihf/SHA256SUMS.part
     4e2a2ba40ddd06d85ff0d11f67a2a352e718a85268d5684671fc59dd723473a75  guix-build-fc6c17b83887/output/arm-linux-gnueabihf/bitcoin-fc6c17b83887-arm-linux-gnueabihf-debug.tar.gz
     5a24ad6e20f3ab8280f0cc5ed74b415b12df955ef48471359f376bda38bb530b0  guix-build-fc6c17b83887/output/arm-linux-gnueabihf/bitcoin-fc6c17b83887-arm-linux-gnueabihf.tar.gz
     6d5c8a4162ccffc0fa520915183a692256432e8b6197f5caf10ba66eff03cae13  guix-build-fc6c17b83887/output/arm64-apple-darwin/SHA256SUMS.part
     74ff57b8adda39e9cc71d6ed22f3a79baa8f37cc9de5e0540c9441ba201f341cd  guix-build-fc6c17b83887/output/arm64-apple-darwin/bitcoin-fc6c17b83887-arm64-apple-darwin-unsigned.dmg
     8440d0f3d48ea8d3d8a3e94c16cbb40ae1f6a29e445124272499485a93a99d4a0  guix-build-fc6c17b83887/output/arm64-apple-darwin/bitcoin-fc6c17b83887-arm64-apple-darwin-unsigned.tar.gz
     9b93e6565115235fe7309249418c22ba1151ddc82a9acb4dfcf5e0bfeefa4a897  guix-build-fc6c17b83887/output/arm64-apple-darwin/bitcoin-fc6c17b83887-arm64-apple-darwin.tar.gz
    1076a91bdf64fdc4df1204990028f826c5394eb10b8411381d2ba9fe0282fa177a  guix-build-fc6c17b83887/output/dist-archive/bitcoin-fc6c17b83887.tar.gz
    11f3723c8fd632db7eb9cf99ab088192fc71b27577cc8095cfff938b477c3de1e4  guix-build-fc6c17b83887/output/powerpc64-linux-gnu/SHA256SUMS.part
    123e57a7261ce5fe436e4e24dcbb64a758d79df6d507cc3a74784ab44979162914  guix-build-fc6c17b83887/output/powerpc64-linux-gnu/bitcoin-fc6c17b83887-powerpc64-linux-gnu-debug.tar.gz
    1308ab1c7b7198f01a37b13a59e00bda2f6e69a2f70f48ecf5f5c5f51d0a97ab40  guix-build-fc6c17b83887/output/powerpc64-linux-gnu/bitcoin-fc6c17b83887-powerpc64-linux-gnu.tar.gz
    14028c18dbe9d8b6779fbac71d8d9b31db7f98b92e20259f7d8fc0e4867bbf9154  guix-build-fc6c17b83887/output/powerpc64le-linux-gnu/SHA256SUMS.part
    1568579746e39d7be0b240812704f24498c298ef68da6f1c268871d0fba46e550e  guix-build-fc6c17b83887/output/powerpc64le-linux-gnu/bitcoin-fc6c17b83887-powerpc64le-linux-gnu-debug.tar.gz
    161f3b113671259beb10c5f176c2b4cd99aecc2b4cc23d9a364f68bf4b2c7b8b86  guix-build-fc6c17b83887/output/powerpc64le-linux-gnu/bitcoin-fc6c17b83887-powerpc64le-linux-gnu.tar.gz
    1709c377ca1137fd15f101baedb69d2ff2e77336d3df64c8f91a3de7c5f7b0025d  guix-build-fc6c17b83887/output/riscv64-linux-gnu/SHA256SUMS.part
    1874f132b24814b058dcc910d793dfc9e8dbea83bbb61b6d49fa4c159b05e7682f  guix-build-fc6c17b83887/output/riscv64-linux-gnu/bitcoin-fc6c17b83887-riscv64-linux-gnu-debug.tar.gz
    1962fc9f914ecdb4ed35d775483b8028c827ce467fd15f50dbe8c54fd8fa56551d  guix-build-fc6c17b83887/output/riscv64-linux-gnu/bitcoin-fc6c17b83887-riscv64-linux-gnu.tar.gz
    203642b38e824845a5d07b0ad3485c8db1f7b7b94409f8949d7176fe9a0608ecd7  guix-build-fc6c17b83887/output/x86_64-apple-darwin/SHA256SUMS.part
    21f5fefdf50957c2f4d36f2b065917584bf7b800be4784d404c39401847090feb8  guix-build-fc6c17b83887/output/x86_64-apple-darwin/bitcoin-fc6c17b83887-x86_64-apple-darwin-unsigned.dmg
    22949e069be2c222e36a3ee4f8f0f54f0f4365d1e42a02f1be7bdc3ded9d345cc7  guix-build-fc6c17b83887/output/x86_64-apple-darwin/bitcoin-fc6c17b83887-x86_64-apple-darwin-unsigned.tar.gz
    23c29c049fb1315b47c2499672795e1e23348d0dacf28c84db8611fa839c6dac03  guix-build-fc6c17b83887/output/x86_64-apple-darwin/bitcoin-fc6c17b83887-x86_64-apple-darwin.tar.gz
    24af50042f2455d55e32c3d84f7b6125a1585089f87fd37f987a40e4b4b21f12a8  guix-build-fc6c17b83887/output/x86_64-linux-gnu/SHA256SUMS.part
    251f91bcce2fb3d4df7ee37e8f3e02ff4d4b16c891bf649fdbaa20193d26839ff2  guix-build-fc6c17b83887/output/x86_64-linux-gnu/bitcoin-fc6c17b83887-x86_64-linux-gnu-debug.tar.gz
    2679a7476a5f87e9b8b914dba9553978d71fedc7ec8e68b39e99167a919fb8d461  guix-build-fc6c17b83887/output/x86_64-linux-gnu/bitcoin-fc6c17b83887-x86_64-linux-gnu.tar.gz
    2735ca373bf33e7ce3b0beec8959329a3740d569053437c46a2005129d1149a643  guix-build-fc6c17b83887/output/x86_64-w64-mingw32/SHA256SUMS.part
    284e99f1e0882611a01d73eece2dbefdbc22602453e94d582f4c4af880a5654ea2  guix-build-fc6c17b83887/output/x86_64-w64-mingw32/bitcoin-fc6c17b83887-win64-debug.zip
    29b38df4035704ddee1b9c4fff9e3d50c5dc5877ac48e266f09d85e60fc1287479  guix-build-fc6c17b83887/output/x86_64-w64-mingw32/bitcoin-fc6c17b83887-win64-setup-unsigned.exe
    30c5feb714cda8f7dd9bbbd970c3122795dca71809a194b1b6a81445306a085b9b  guix-build-fc6c17b83887/output/x86_64-w64-mingw32/bitcoin-fc6c17b83887-win64-unsigned.tar.gz
    3199b8762bc9b34ae81cd247a7b852c3d4c527fdd7c4cafcee5930017c82b343b6  guix-build-fc6c17b83887/output/x86_64-w64-mingw32/bitcoin-fc6c17b83887-win64.zip
    
  12. TheCharlatan commented at 4:20 pm on June 14, 2023: contributor
     0find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
     1f18a12cd7d70759bd02d62b6ef5bb473f40d2ae2b4ab868005005cd16beb66ab  guix-build-fc6c17b83887/output/aarch64-linux-gnu/SHA256SUMS.part
     2c9324853dbc4cde7ec50e5f3c86388fcdfff754c49cdb14b549f808ba7988718  guix-build-fc6c17b83887/output/aarch64-linux-gnu/bitcoin-fc6c17b83887-aarch64-linux-gnu-debug.tar.gz
     31aa109712af8bfca4cbaab2f570941343667f0524331d6b919d42e3bbd35c53a  guix-build-fc6c17b83887/output/aarch64-linux-gnu/bitcoin-fc6c17b83887-aarch64-linux-gnu.tar.gz
     4a3f34dde5216f1eca8130c7f346aeb5cd92b0175f3855d35c371924114c580fc  guix-build-fc6c17b83887/output/arm-linux-gnueabihf/SHA256SUMS.part
     5e2a2ba40ddd06d85ff0d11f67a2a352e718a85268d5684671fc59dd723473a75  guix-build-fc6c17b83887/output/arm-linux-gnueabihf/bitcoin-fc6c17b83887-arm-linux-gnueabihf-debug.tar.gz
     6a24ad6e20f3ab8280f0cc5ed74b415b12df955ef48471359f376bda38bb530b0  guix-build-fc6c17b83887/output/arm-linux-gnueabihf/bitcoin-fc6c17b83887-arm-linux-gnueabihf.tar.gz
     7d5c8a4162ccffc0fa520915183a692256432e8b6197f5caf10ba66eff03cae13  guix-build-fc6c17b83887/output/arm64-apple-darwin/SHA256SUMS.part
     84ff57b8adda39e9cc71d6ed22f3a79baa8f37cc9de5e0540c9441ba201f341cd  guix-build-fc6c17b83887/output/arm64-apple-darwin/bitcoin-fc6c17b83887-arm64-apple-darwin-unsigned.dmg
     9440d0f3d48ea8d3d8a3e94c16cbb40ae1f6a29e445124272499485a93a99d4a0  guix-build-fc6c17b83887/output/arm64-apple-darwin/bitcoin-fc6c17b83887-arm64-apple-darwin-unsigned.tar.gz
    10b93e6565115235fe7309249418c22ba1151ddc82a9acb4dfcf5e0bfeefa4a897  guix-build-fc6c17b83887/output/arm64-apple-darwin/bitcoin-fc6c17b83887-arm64-apple-darwin.tar.gz
    1176a91bdf64fdc4df1204990028f826c5394eb10b8411381d2ba9fe0282fa177a  guix-build-fc6c17b83887/output/dist-archive/bitcoin-fc6c17b83887.tar.gz
    12f3723c8fd632db7eb9cf99ab088192fc71b27577cc8095cfff938b477c3de1e4  guix-build-fc6c17b83887/output/powerpc64-linux-gnu/SHA256SUMS.part
    133e57a7261ce5fe436e4e24dcbb64a758d79df6d507cc3a74784ab44979162914  guix-build-fc6c17b83887/output/powerpc64-linux-gnu/bitcoin-fc6c17b83887-powerpc64-linux-gnu-debug.tar.gz
    1408ab1c7b7198f01a37b13a59e00bda2f6e69a2f70f48ecf5f5c5f51d0a97ab40  guix-build-fc6c17b83887/output/powerpc64-linux-gnu/bitcoin-fc6c17b83887-powerpc64-linux-gnu.tar.gz
    15028c18dbe9d8b6779fbac71d8d9b31db7f98b92e20259f7d8fc0e4867bbf9154  guix-build-fc6c17b83887/output/powerpc64le-linux-gnu/SHA256SUMS.part
    1668579746e39d7be0b240812704f24498c298ef68da6f1c268871d0fba46e550e  guix-build-fc6c17b83887/output/powerpc64le-linux-gnu/bitcoin-fc6c17b83887-powerpc64le-linux-gnu-debug.tar.gz
    171f3b113671259beb10c5f176c2b4cd99aecc2b4cc23d9a364f68bf4b2c7b8b86  guix-build-fc6c17b83887/output/powerpc64le-linux-gnu/bitcoin-fc6c17b83887-powerpc64le-linux-gnu.tar.gz
    1809c377ca1137fd15f101baedb69d2ff2e77336d3df64c8f91a3de7c5f7b0025d  guix-build-fc6c17b83887/output/riscv64-linux-gnu/SHA256SUMS.part
    1974f132b24814b058dcc910d793dfc9e8dbea83bbb61b6d49fa4c159b05e7682f  guix-build-fc6c17b83887/output/riscv64-linux-gnu/bitcoin-fc6c17b83887-riscv64-linux-gnu-debug.tar.gz
    2062fc9f914ecdb4ed35d775483b8028c827ce467fd15f50dbe8c54fd8fa56551d  guix-build-fc6c17b83887/output/riscv64-linux-gnu/bitcoin-fc6c17b83887-riscv64-linux-gnu.tar.gz
    213642b38e824845a5d07b0ad3485c8db1f7b7b94409f8949d7176fe9a0608ecd7  guix-build-fc6c17b83887/output/x86_64-apple-darwin/SHA256SUMS.part
    22f5fefdf50957c2f4d36f2b065917584bf7b800be4784d404c39401847090feb8  guix-build-fc6c17b83887/output/x86_64-apple-darwin/bitcoin-fc6c17b83887-x86_64-apple-darwin-unsigned.dmg
    23949e069be2c222e36a3ee4f8f0f54f0f4365d1e42a02f1be7bdc3ded9d345cc7  guix-build-fc6c17b83887/output/x86_64-apple-darwin/bitcoin-fc6c17b83887-x86_64-apple-darwin-unsigned.tar.gz
    24c29c049fb1315b47c2499672795e1e23348d0dacf28c84db8611fa839c6dac03  guix-build-fc6c17b83887/output/x86_64-apple-darwin/bitcoin-fc6c17b83887-x86_64-apple-darwin.tar.gz
    25af50042f2455d55e32c3d84f7b6125a1585089f87fd37f987a40e4b4b21f12a8  guix-build-fc6c17b83887/output/x86_64-linux-gnu/SHA256SUMS.part
    261f91bcce2fb3d4df7ee37e8f3e02ff4d4b16c891bf649fdbaa20193d26839ff2  guix-build-fc6c17b83887/output/x86_64-linux-gnu/bitcoin-fc6c17b83887-x86_64-linux-gnu-debug.tar.gz
    2779a7476a5f87e9b8b914dba9553978d71fedc7ec8e68b39e99167a919fb8d461  guix-build-fc6c17b83887/output/x86_64-linux-gnu/bitcoin-fc6c17b83887-x86_64-linux-gnu.tar.gz
    2835ca373bf33e7ce3b0beec8959329a3740d569053437c46a2005129d1149a643  guix-build-fc6c17b83887/output/x86_64-w64-mingw32/SHA256SUMS.part
    294e99f1e0882611a01d73eece2dbefdbc22602453e94d582f4c4af880a5654ea2  guix-build-fc6c17b83887/output/x86_64-w64-mingw32/bitcoin-fc6c17b83887-win64-debug.zip
    30b38df4035704ddee1b9c4fff9e3d50c5dc5877ac48e266f09d85e60fc1287479  guix-build-fc6c17b83887/output/x86_64-w64-mingw32/bitcoin-fc6c17b83887-win64-setup-unsigned.exe
    31c5feb714cda8f7dd9bbbd970c3122795dca71809a194b1b6a81445306a085b9b  guix-build-fc6c17b83887/output/x86_64-w64-mingw32/bitcoin-fc6c17b83887-win64-unsigned.tar.gz
    3299b8762bc9b34ae81cd247a7b852c3d4c527fdd7c4cafcee5930017c82b343b6  guix-build-fc6c17b83887/output/x86_64-w64-mingw32/bitcoin-fc6c17b83887-win64.zip
    
  13. fanquake approved
  14. fanquake commented at 9:06 am on June 16, 2023: member
    ACK fc6c17b83887ef193f2b97264b1843c94dcb915d
  15. fanquake merged this on Jun 16, 2023
  16. fanquake closed this on Jun 16, 2023

  17. 0xB10C deleted the branch on Jun 17, 2023
  18. sidhujag referenced this in commit f11de516d9 on Jun 19, 2023
  19. luke-jr commented at 2:04 pm on June 24, 2023: member

    late nits: *it may be a security issue to grant access to the group *if autoreconf uses symlinks, chmod will fail too

    Better would be to just delete the current files first.

  20. bitcoin locked this on Jun 23, 2024

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: 2024-12-22 09:12 UTC

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