-
Notifications
You must be signed in to change notification settings - Fork 38.7k
build: make sure we can overwrite config.{guess,sub} before doing so #27875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: make sure we can overwrite config.{guess,sub} before doing so #27875
Conversation
Since ea7b852 (bitcoin#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 bitcoin#27873: Can't copy to 'build-aux/config.guess' in autoconf.sh: Permission denied
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
|
Concept ACK. However, I'm not a NixOS user and cannot test this PR, unfortunately. |
|
Concept ACK I've been having this issue on my NixOS machine, will test. |
dergoegge
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK fc6c17b
|
Concept ACK |
1 similar comment
|
Concept ACK |
|
Guix build: f18a12cd7d70759bd02d62b6ef5bb473f40d2ae2b4ab868005005cd16beb66ab guix-build-fc6c17b83887/output/aarch64-linux-gnu/SHA256SUMS.part
c9324853dbc4cde7ec50e5f3c86388fcdfff754c49cdb14b549f808ba7988718 guix-build-fc6c17b83887/output/aarch64-linux-gnu/bitcoin-fc6c17b83887-aarch64-linux-gnu-debug.tar.gz
1aa109712af8bfca4cbaab2f570941343667f0524331d6b919d42e3bbd35c53a guix-build-fc6c17b83887/output/aarch64-linux-gnu/bitcoin-fc6c17b83887-aarch64-linux-gnu.tar.gz
a3f34dde5216f1eca8130c7f346aeb5cd92b0175f3855d35c371924114c580fc guix-build-fc6c17b83887/output/arm-linux-gnueabihf/SHA256SUMS.part
e2a2ba40ddd06d85ff0d11f67a2a352e718a85268d5684671fc59dd723473a75 guix-build-fc6c17b83887/output/arm-linux-gnueabihf/bitcoin-fc6c17b83887-arm-linux-gnueabihf-debug.tar.gz
a24ad6e20f3ab8280f0cc5ed74b415b12df955ef48471359f376bda38bb530b0 guix-build-fc6c17b83887/output/arm-linux-gnueabihf/bitcoin-fc6c17b83887-arm-linux-gnueabihf.tar.gz
d5c8a4162ccffc0fa520915183a692256432e8b6197f5caf10ba66eff03cae13 guix-build-fc6c17b83887/output/arm64-apple-darwin/SHA256SUMS.part
4ff57b8adda39e9cc71d6ed22f3a79baa8f37cc9de5e0540c9441ba201f341cd guix-build-fc6c17b83887/output/arm64-apple-darwin/bitcoin-fc6c17b83887-arm64-apple-darwin-unsigned.dmg
440d0f3d48ea8d3d8a3e94c16cbb40ae1f6a29e445124272499485a93a99d4a0 guix-build-fc6c17b83887/output/arm64-apple-darwin/bitcoin-fc6c17b83887-arm64-apple-darwin-unsigned.tar.gz
b93e6565115235fe7309249418c22ba1151ddc82a9acb4dfcf5e0bfeefa4a897 guix-build-fc6c17b83887/output/arm64-apple-darwin/bitcoin-fc6c17b83887-arm64-apple-darwin.tar.gz
76a91bdf64fdc4df1204990028f826c5394eb10b8411381d2ba9fe0282fa177a guix-build-fc6c17b83887/output/dist-archive/bitcoin-fc6c17b83887.tar.gz
f3723c8fd632db7eb9cf99ab088192fc71b27577cc8095cfff938b477c3de1e4 guix-build-fc6c17b83887/output/powerpc64-linux-gnu/SHA256SUMS.part
3e57a7261ce5fe436e4e24dcbb64a758d79df6d507cc3a74784ab44979162914 guix-build-fc6c17b83887/output/powerpc64-linux-gnu/bitcoin-fc6c17b83887-powerpc64-linux-gnu-debug.tar.gz
08ab1c7b7198f01a37b13a59e00bda2f6e69a2f70f48ecf5f5c5f51d0a97ab40 guix-build-fc6c17b83887/output/powerpc64-linux-gnu/bitcoin-fc6c17b83887-powerpc64-linux-gnu.tar.gz
028c18dbe9d8b6779fbac71d8d9b31db7f98b92e20259f7d8fc0e4867bbf9154 guix-build-fc6c17b83887/output/powerpc64le-linux-gnu/SHA256SUMS.part
68579746e39d7be0b240812704f24498c298ef68da6f1c268871d0fba46e550e guix-build-fc6c17b83887/output/powerpc64le-linux-gnu/bitcoin-fc6c17b83887-powerpc64le-linux-gnu-debug.tar.gz
1f3b113671259beb10c5f176c2b4cd99aecc2b4cc23d9a364f68bf4b2c7b8b86 guix-build-fc6c17b83887/output/powerpc64le-linux-gnu/bitcoin-fc6c17b83887-powerpc64le-linux-gnu.tar.gz
09c377ca1137fd15f101baedb69d2ff2e77336d3df64c8f91a3de7c5f7b0025d guix-build-fc6c17b83887/output/riscv64-linux-gnu/SHA256SUMS.part
74f132b24814b058dcc910d793dfc9e8dbea83bbb61b6d49fa4c159b05e7682f guix-build-fc6c17b83887/output/riscv64-linux-gnu/bitcoin-fc6c17b83887-riscv64-linux-gnu-debug.tar.gz
62fc9f914ecdb4ed35d775483b8028c827ce467fd15f50dbe8c54fd8fa56551d guix-build-fc6c17b83887/output/riscv64-linux-gnu/bitcoin-fc6c17b83887-riscv64-linux-gnu.tar.gz
3642b38e824845a5d07b0ad3485c8db1f7b7b94409f8949d7176fe9a0608ecd7 guix-build-fc6c17b83887/output/x86_64-apple-darwin/SHA256SUMS.part
f5fefdf50957c2f4d36f2b065917584bf7b800be4784d404c39401847090feb8 guix-build-fc6c17b83887/output/x86_64-apple-darwin/bitcoin-fc6c17b83887-x86_64-apple-darwin-unsigned.dmg
949e069be2c222e36a3ee4f8f0f54f0f4365d1e42a02f1be7bdc3ded9d345cc7 guix-build-fc6c17b83887/output/x86_64-apple-darwin/bitcoin-fc6c17b83887-x86_64-apple-darwin-unsigned.tar.gz
c29c049fb1315b47c2499672795e1e23348d0dacf28c84db8611fa839c6dac03 guix-build-fc6c17b83887/output/x86_64-apple-darwin/bitcoin-fc6c17b83887-x86_64-apple-darwin.tar.gz
af50042f2455d55e32c3d84f7b6125a1585089f87fd37f987a40e4b4b21f12a8 guix-build-fc6c17b83887/output/x86_64-linux-gnu/SHA256SUMS.part
1f91bcce2fb3d4df7ee37e8f3e02ff4d4b16c891bf649fdbaa20193d26839ff2 guix-build-fc6c17b83887/output/x86_64-linux-gnu/bitcoin-fc6c17b83887-x86_64-linux-gnu-debug.tar.gz
79a7476a5f87e9b8b914dba9553978d71fedc7ec8e68b39e99167a919fb8d461 guix-build-fc6c17b83887/output/x86_64-linux-gnu/bitcoin-fc6c17b83887-x86_64-linux-gnu.tar.gz
35ca373bf33e7ce3b0beec8959329a3740d569053437c46a2005129d1149a643 guix-build-fc6c17b83887/output/x86_64-w64-mingw32/SHA256SUMS.part
4e99f1e0882611a01d73eece2dbefdbc22602453e94d582f4c4af880a5654ea2 guix-build-fc6c17b83887/output/x86_64-w64-mingw32/bitcoin-fc6c17b83887-win64-debug.zip
b38df4035704ddee1b9c4fff9e3d50c5dc5877ac48e266f09d85e60fc1287479 guix-build-fc6c17b83887/output/x86_64-w64-mingw32/bitcoin-fc6c17b83887-win64-setup-unsigned.exe
c5feb714cda8f7dd9bbbd970c3122795dca71809a194b1b6a81445306a085b9b guix-build-fc6c17b83887/output/x86_64-w64-mingw32/bitcoin-fc6c17b83887-win64-unsigned.tar.gz
99b8762bc9b34ae81cd247a7b852c3d4c527fdd7c4cafcee5930017c82b343b6 guix-build-fc6c17b83887/output/x86_64-w64-mingw32/bitcoin-fc6c17b83887-win64.zip |
|
fanquake
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK fc6c17b
…sub} before doing so fc6c17b build: make sure we can overwrite config.{guess,sub} (0xb10c) Pull request description: Since ea7b852 (bitcoin#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 bitcoin#27873 ACKs for top commit: dergoegge: tACK fc6c17b fanquake: ACK fc6c17b Tree-SHA512: e8a31f739d5b598b2fe9fe6fc3d02303c117a6adccc49b8d0fea4980027a64f915a0e1e00e4788dce6113ef1b9ec9acf9e4164486f6e4904bad405f20b6746a0
|
late nits: Better would be to just delete the current files first. |
Since ea7b852 (#26422),
autogen.shoverwrites thebuild-aux/config.{guess, sub}files (installed there byautoreconf) with thedepends/config.{guess, sub}files if these are newer.The
autoreconftool copies them from it'sshare/autoconf/build-aux/directory. Specifically on NixOS, theshare/autoconf/build-aux/files are located in the nix-store and are read-only.autoreconfpreserves the read-only permissions when copying. Overwriting them with ourdepends/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