Skip to content

Commit 1ecdf6e

Browse files
committed
Merge bitcoin/bitcoin#27875: build: make sure we can overwrite config.{guess,sub} before doing so
fc6c17b build: make sure we can overwrite config.{guess,sub} (0xb10c) Pull request description: Since ea7b852 (#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 ACKs for top commit: dergoegge: tACK fc6c17b fanquake: ACK fc6c17b Tree-SHA512: e8a31f739d5b598b2fe9fe6fc3d02303c117a6adccc49b8d0fea4980027a64f915a0e1e00e4788dce6113ef1b9ec9acf9e4164486f6e4904bad405f20b6746a0
2 parents b3db18a + fc6c17b commit 1ecdf6e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

autogen.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ command -v autoreconf >/dev/null || \
1616
autoreconf --install --force --warnings=all
1717

1818
if expr "'$(build-aux/config.guess --timestamp)" \< "'$(depends/config.guess --timestamp)" > /dev/null; then
19+
chmod ug+w build-aux/config.guess
20+
chmod ug+w src/secp256k1/build-aux/config.guess
1921
cp depends/config.guess build-aux
2022
cp depends/config.guess src/secp256k1/build-aux
2123
fi
2224
if expr "'$(build-aux/config.sub --timestamp)" \< "'$(depends/config.sub --timestamp)" > /dev/null; then
25+
chmod ug+w build-aux/config.sub
26+
chmod ug+w src/secp256k1/build-aux/config.sub
2327
cp depends/config.sub build-aux
2428
cp depends/config.sub src/secp256k1/build-aux
2529
fi

0 commit comments

Comments
 (0)