-
Notifications
You must be signed in to change notification settings - Fork 37.7k
script: add script to generate example bitcoin.conf #22235
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
script: add script to generate example bitcoin.conf #22235
Conversation
Good effort on this. Having a generated Tested on macOs and built cleanly. I think it might be better to add
|
thanks for the feedback, @klementtan , i was conflicted on whether or not to remove |
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.
This is definitely a nice-to-have
The first three commits should be squashed (634becf, 54235a3, cf90dc7) because the addition of the generate-example-bitcoin-conf.sh
script should be atomic.
In regards to: c4e94db
I don't think that we should remove the bitcoin.conf
example file. We should keep the file as part of the repo. The script can update the bitcoin.conf
example whenever there is a PR that changes an option or introduces an option.
You should update bitcoin-conf.md where appropriate to mention the inclusion of this script. This can included in the commit that will be created when you squash the first three commits.
thanks, @jarolrod , will definitely update the bitcoin-conf.md
do you have a reason you think it should be committed to the repo? #21911 indicates files generated by the build shouldn't be committed. id also be worried about someone changing either the options or option help text and not running the script. this would cause
if the developer always remembers to run the script, none of the above would be problems, but im hesitant to rely on developers remembering to do a manual step. thoughts? also tagging @laanwj for input as he was the one who made the comment about build generated files being in |
1f02938
to
9fab9de
Compare
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
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. |
Removed the one-line change behind the conflict. |
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 9fab9de
Tested successfully on Ubuntu 20.04
The PR is adding a script-based functionality to generate an example bitcoin.conf file instead of having a premade example bitcoin.conf file. This is done using a script generate-example-bitcoin-conf.sh
, which uses some predefined text and the output of ./src/bitcoind --help
to create an example bitcoin.conf
file.
Test failed while using both make install
and ./contrib/generate-example-bitcoin-conf.sh
command from root directory. Worked only after giving sudo
permission to these commands.
So tested successfully using sudo make install
and sudo ./contrib/generate-example-bitcoin-conf.sh
. This happened because the ./share/examples
folder was protected by default and could not be modified until given sudo
access.
I agree with the changes made by this PR because now the example bitcoin.conf
file is very highly detailed and arranged so that understanding and changing something on the file has become very easy compared to the master’s example bitcoin.conf
file.
Also in the current master the example bitcoin.conf
file is fixed so we have to keep updating it, with each change that might effect working of bitcoin.conf
file. With this PR the op is able to mitigate the example bitcoin.conf
maintenance cost, by basically generating the file from ./src/bitcoind --help
command. Which makes sure ./src/bitcoind --help
and example bitcoin.conf
file are always in sync.
Though I agree with the concept I would highly recommend adding the following changes to the PR:
-
In
doc/bitcoin-conf.md
file it should be mentioned that if both ways of creating thebitcoin.conf
example file (make file
and./contrib/generate-example-bitcoin-conf.sh
) fails then the issue could be that they requiresudo
permission to edit the./share/examples
folder. -
The PR describes the problem that it is trying to solve as:
per #10746 ,
bitcoin.conf
not being put into the data directory during installation causes some confusion for users when running bitcoin. more details in the issueBut in reality, the PR is not doing anything to make it easier to put example
bitcoin.conf
file in the data directory. The aim of the PR, as far as I can see, is to improve examplebitcoin.conf
file’s flexibility wrt future changes in./src/bitcoind --help
, and to make it easy to use.
So the PR description should be modified to display its motivations more accurately.
9fab9de
to
98d8482
Compare
good call out, i have updated the PR description to more accurately describe the problem this PR is addressing regarding your recommendation that the docs be updated to suggest running while trying to recreate your issue, i did note that the script will fail if |
worth mentioning, outside of this PR i normally encounter a failure running
to re-create your issue, i first configured with after updating the script to use |
Love this! I also didn't run into any issues with the |
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.
Approach ACK
configure.ac
Outdated
@@ -1857,6 +1857,7 @@ AC_SUBST(ANDROID_ARCH) | |||
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist test/config.ini]) | |||
AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh]) | |||
AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([doc/Doxyfile])]) | |||
AC_CONFIG_LINKS([contrib/generate-example-bitcoin-conf.sh:contrib/generate-example-bitcoin-conf.sh]) |
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.
nit, It seems like there is alphabetical sorting here, as so we'd probably want this after:
Line 1868 in 8193294
AC_CONFIG_LINKS([contrib/filter-lcov.py:contrib/filter-lcov.py]) |
|
||
EOF | ||
|
||
# parse the output from bitcoind --help |
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.
configuration options are categorized under groups (Connection Options, ZeroMQ notification options, ...). As such, when looking at the bitcoind -h
output, these can be considered headers. In the help output, you can easily distinguish the headers from options because they have different indentation. In the generated example introduced by this PR, there is no visual specialty, they are not so evident and get lost within all the other text.
I suggest making the headers more visible. My current suggestion is to prepend another new line at the start of a new section and prepend the header text with more #
. A benefit of making these headers more visible is that it will aid users find what they are looking for more quickly.
in terms of a rule for your script, headers end with :
. Additionally, you're skipping the first section header which is simply Options:
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.
agree, the groups do get lost in the text. i tried a few options and
### Group Name
# help text
#option=1
seemed to stand out well without being too cluttered. open to other suggestions
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.
Just tested, this separation looks good to me 👍
98d8482
to
aec77e9
Compare
hey @jarolrod , thanks so much for the thorough review. i incorporated the fixes and style changes you suggested. i was also able to re-create @ShaMan239 's issue: because files were being created in the script, if you ran a i tested that this does fix the permissions issue by running the following commands:
|
aec77e9
to
d6eac4f
Compare
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 d6eac4f
What i like about this is that it severely reduces any maintainance cost behind having an example bitcoin.conf
file. Addditionally, it's nice that the generated example file will only contain relevant options. For example, if i configure without wallet functionality, then the generated bitcoin.conf
will not include these options.
The presentation of sections in the output file looks good, thanks for picking up that suggestion!
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.
I tested that this does fix the permissions issue by running the following commands:
1. deleting the exambles directory 2. running `sudo make install` 3. verify directory and file created with correct permissions (local user) 4. ran `make install` and verified no failures
I followed the steps you suggested here; I could not use make install
without root permission even after that. I checked the created example bitcoin.conf permission, and I can see that it is -rw-r--r--
I am adding the error I am getting while using the make install
command without sudo:
/usr/bin/mkdir -p '/usr/local/lib'
/bin/bash ../libtool --preserve-dup-deps --mode=install /usr/bin/install -c libbitcoinconsensus.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libbitcoinconsensus.so.0.0.0 /usr/local/lib/libbitcoinconsensus.so.0.0.0
/usr/bin/install: cannot remove '/usr/local/lib/libbitcoinconsensus.so.0.0.0': Permission denied
Though the error seems unrelated to this PR, I am can still not understand why sudo make install
is creating the example bitcoin file with -rw-r--r--
permission.
d6eac4f
to
b915eff
Compare
rebased and force pushed to fix a conflict with the existing worth pointing out that this PR is meant to fix needing to edit the existing example file to keep it up to date with option help. in #23123 , a parameter was removed and this required the contributor to also remember to change the wording in the example file. this extra step will not be necessary if this PR is merged. |
this ensures bitcoind option help is the source of truth and also gives an example conf file for users to customize and copy to their data directory. closes bitcoin#10746
include instructions on how to run the script
fa67840
to
99c3ef3
Compare
thanks for the review @laanwj, I took your suggestions and also added an empty placeholder file, |
contrib/guix/libexec/build.sh
Outdated
@@ -368,6 +368,14 @@ mkdir -p "$DISTSRC" | |||
;; | |||
esac | |||
|
|||
# If a bitcoin.conf file has been generated, copy it over | |||
if [ -f "${DISTSRC}/share/examples/bitcoin.conf" ] |
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.
Now that the placeholder is always there, this if/else is no longer necessary and can be replaced with just a copy.
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.
fixed!
This seems ready for merge, sorry for finding a last-minute nit 😄 |
copy over bitcoin.conf during the build process. this means `contrib/devtools/gen-bitcoin-conf.sh` will need to be run and the generated file committed during the release process. this is the same process used for generating man pages for each release.
include running `gen-bitcoin-conf.sh` as part of the release process.
update help to reflect this option cannot be used from the config file
99c3ef3
to
b42643c
Compare
thanks for circling back! I've added your suggestion |
Tested and code review ACK b42643c |
@@ -368,6 +368,10 @@ mkdir -p "$DISTSRC" | |||
;; | |||
esac | |||
|
|||
# copy over the example bitcoin.conf file. if contrib/devtools/gen-bitcoin-conf.sh | |||
# has not been run before buildling, this file will be a stub | |||
cp "${DISTSRC}/share/examples/bitcoin.conf" "${DISTNAME}/" |
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.
Install a bitcoin.conf
file using Windows installer as well?
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.
I'll combine this into #25829.
…tarball 495caa9 build: add example bitcoin conf to win installer (fanquake) 0eac1f7 build: include share/rpcauth in tarball & installer (fanquake) Pull request description: Fixes #19081. Addresses: bitcoin/bitcoin#22235 (comment). Guix Build (x86_64): ```bash bdc14efe02553703f3f27438b17ee452fc0b08e37f626830857c60a7740ec990 guix-build-495caa9a0149/output/aarch64-linux-gnu/SHA256SUMS.part 0c541efd8e2e52f1915cab13c935f165f906e46590175d568be34e026b5f0d9e guix-build-495caa9a0149/output/aarch64-linux-gnu/bitcoin-495caa9a0149-aarch64-linux-gnu-debug.tar.gz 5ee15e11e0d52d5a2df6b6a60e4ae5b3adc4b259294ad53452478f28efbe70c8 guix-build-495caa9a0149/output/aarch64-linux-gnu/bitcoin-495caa9a0149-aarch64-linux-gnu.tar.gz 451152a282fd79db45a09e0ccb3491e3044ea5ad0931dfe2820bb5c45839a311 guix-build-495caa9a0149/output/arm-linux-gnueabihf/SHA256SUMS.part b88159ac78d427556e7f70e5da3b849da5491c98fa08c16c25adbfa8e3b44b58 guix-build-495caa9a0149/output/arm-linux-gnueabihf/bitcoin-495caa9a0149-arm-linux-gnueabihf-debug.tar.gz 54b59e4d06144d18b97a0260330383dafdcf3473b560c71f6304a8d1b9ef0100 guix-build-495caa9a0149/output/arm-linux-gnueabihf/bitcoin-495caa9a0149-arm-linux-gnueabihf.tar.gz 784f43a651ed6f9335117ca971c7c215eba536414792edf72a0dc372c901c3fa guix-build-495caa9a0149/output/arm64-apple-darwin/SHA256SUMS.part ace525b20dc4789c931cf781027680e5fe35bd987c8d1908590cd83ce7e44495 guix-build-495caa9a0149/output/arm64-apple-darwin/bitcoin-495caa9a0149-arm64-apple-darwin-unsigned.dmg 1ab6d5d91040567e4fccb4e2de49789f78bd1ce9b4a496486d837904591bfbc6 guix-build-495caa9a0149/output/arm64-apple-darwin/bitcoin-495caa9a0149-arm64-apple-darwin-unsigned.tar.gz a5cd681e67beda05cac83d133d6996699effb12b9830b269669057d02b0a4eef guix-build-495caa9a0149/output/arm64-apple-darwin/bitcoin-495caa9a0149-arm64-apple-darwin.tar.gz 01cc3a078a952ed9bbff38e79bad4885a5f8502906498f7b909cb2cc798ada64 guix-build-495caa9a0149/output/dist-archive/bitcoin-495caa9a0149.tar.gz d4652f912573d0c9ce11d7e84fad10ad03f67247f85b0a5d9c47db74508705ce guix-build-495caa9a0149/output/powerpc64-linux-gnu/SHA256SUMS.part 76facbb81819b2d81afd61e2234b65d99c9e28b28f2b1d3ee2d7119cf192ba60 guix-build-495caa9a0149/output/powerpc64-linux-gnu/bitcoin-495caa9a0149-powerpc64-linux-gnu-debug.tar.gz a75cef05abb05da4a1ba81669f6a66ecc790946b6b2fd3749bad0b462bb50219 guix-build-495caa9a0149/output/powerpc64-linux-gnu/bitcoin-495caa9a0149-powerpc64-linux-gnu.tar.gz 2b2ac79848a643f025960cabca2694cb3537d72d83477ed1b53bcc6e2ee11ce4 guix-build-495caa9a0149/output/powerpc64le-linux-gnu/SHA256SUMS.part d0542623109fb72d72dcd06f8de30edefdd7e0f1bf46a7be7c262c0e631c49d8 guix-build-495caa9a0149/output/powerpc64le-linux-gnu/bitcoin-495caa9a0149-powerpc64le-linux-gnu-debug.tar.gz b85dbcbe4f50cbddcd167568d31326d62e786720cb237aaf3d11b69394f01983 guix-build-495caa9a0149/output/powerpc64le-linux-gnu/bitcoin-495caa9a0149-powerpc64le-linux-gnu.tar.gz a85a00d353338d2e72a4218782e05a816f21aea0637eb21742c55ee9a9ce1f7b guix-build-495caa9a0149/output/riscv64-linux-gnu/SHA256SUMS.part e10561b08a91a22947ead27b6d4a07581fa566eb3e5d8161f97b2ff2708b85f4 guix-build-495caa9a0149/output/riscv64-linux-gnu/bitcoin-495caa9a0149-riscv64-linux-gnu-debug.tar.gz 994aca800c2580349a436fb1fa8195cd943363dee5c3ee7c91d726cc95cd3068 guix-build-495caa9a0149/output/riscv64-linux-gnu/bitcoin-495caa9a0149-riscv64-linux-gnu.tar.gz 5a063e6dbf64aca4a639fea10fcff2f7a533819607558cec25a9a88bc575c0dc guix-build-495caa9a0149/output/x86_64-apple-darwin/SHA256SUMS.part e7f36749c3a48ce7173ee100abb275eb217eee2713d52d8b576f8c749e0c2e9e guix-build-495caa9a0149/output/x86_64-apple-darwin/bitcoin-495caa9a0149-x86_64-apple-darwin-unsigned.dmg b0289c6caba5e092d8e287c9cb4f328844bce04fce74de91e76821423b7b8153 guix-build-495caa9a0149/output/x86_64-apple-darwin/bitcoin-495caa9a0149-x86_64-apple-darwin-unsigned.tar.gz 2bf983abcfd0d782632ef7fb116ba169a0b282264774c032a50beca016468ed0 guix-build-495caa9a0149/output/x86_64-apple-darwin/bitcoin-495caa9a0149-x86_64-apple-darwin.tar.gz 72705350ab34f8d33ef98e5563f36aa82f15e7b450e3914f591b9c88e8b385da guix-build-495caa9a0149/output/x86_64-linux-gnu/SHA256SUMS.part 7b5285bfd28acf8ae1471807962d31857afe70e13ae087a8aec83d5a8ac1a184 guix-build-495caa9a0149/output/x86_64-linux-gnu/bitcoin-495caa9a0149-x86_64-linux-gnu-debug.tar.gz 6544591754607792b731fe630bf8235e78e08c7edb4d1d210b35d6328240acc1 guix-build-495caa9a0149/output/x86_64-linux-gnu/bitcoin-495caa9a0149-x86_64-linux-gnu.tar.gz bbd6490489ddfde06b6cde602d317d84c09495de3cf033016ea0ba5e60770fdb guix-build-495caa9a0149/output/x86_64-w64-mingw32/SHA256SUMS.part f48f6efcf5822517a697d990eddbc03011b08c5e4be4886e25ab65c8a0951aaa guix-build-495caa9a0149/output/x86_64-w64-mingw32/bitcoin-495caa9a0149-win64-debug.zip b1a83e58d7b316c4743ae16d552f615aa710a4985ded5834d1de6fe6437ca3b2 guix-build-495caa9a0149/output/x86_64-w64-mingw32/bitcoin-495caa9a0149-win64-setup-unsigned.exe 0196abf8cb27f3cb03b4688a85a97c26975db4938f7a2dc0a09f11847f6530bb guix-build-495caa9a0149/output/x86_64-w64-mingw32/bitcoin-495caa9a0149-win64-unsigned.tar.gz 426994640e85f82b3d3bee25f07930f952edf4a60ecd7ba41f83c82cbbcc63d1 guix-build-495caa9a0149/output/x86_64-w64-mingw32/bitcoin-495caa9a0149-win64.zip ``` Guix Build (arm64): ```bash 506a2fade794398ec38cf9c59ca0b454fdcbb0080d7e40f1ace698a7b08eef77 guix-build-cf39913e5748/output/arm-linux-gnueabihf/SHA256SUMS.part 8ec3686ba80709eb024ea02b7b493e70af82383d814b105f157c94a86cb7efd6 guix-build-cf39913e5748/output/arm-linux-gnueabihf/bitcoin-cf39913e5748-arm-linux-gnueabihf-debug.tar.gz 4d9b3456c974f7f47dca64bcc994fa04888bf08518c902d12366798829a9100d guix-build-cf39913e5748/output/arm-linux-gnueabihf/bitcoin-cf39913e5748-arm-linux-gnueabihf.tar.gz 7c74610dcaa1dbb7fcadb2ad59520fdfa3fa02f26ceb88ada178ac35a0644840 guix-build-cf39913e5748/output/arm64-apple-darwin/SHA256SUMS.part fca59c367d2b5891186c546bd87ed66dcc4f0b11433b54c49ad72aa5e0e49978 guix-build-cf39913e5748/output/arm64-apple-darwin/bitcoin-cf39913e5748-arm64-apple-darwin-unsigned.dmg 467e5c2eeaccac995d14b41f5418ba783b31ee7c63d76d5fce5e667bd6ef6683 guix-build-cf39913e5748/output/arm64-apple-darwin/bitcoin-cf39913e5748-arm64-apple-darwin-unsigned.tar.gz 1f19caa059cd6b4adcc089f90ce33fe7f679b3a4beb970b3ef5c3292fe5841ee guix-build-cf39913e5748/output/arm64-apple-darwin/bitcoin-cf39913e5748-arm64-apple-darwin.tar.gz ea07945bf21cbe306e8afc815ccb5f4a363fb7335239fe35b3668bdef43f735a guix-build-cf39913e5748/output/dist-archive/bitcoin-cf39913e5748.tar.gz b699ae65b899192ad5afbe6a069d2113fda92b833f7db31a1487e7c4c04440f5 guix-build-cf39913e5748/output/powerpc64-linux-gnu/SHA256SUMS.part eeced64cd3e49ecd95ec29623f7cd3afe66ceffb8296af646ee4e1f3fe658ab0 guix-build-cf39913e5748/output/powerpc64-linux-gnu/bitcoin-cf39913e5748-powerpc64-linux-gnu-debug.tar.gz 20181015752a5d7bfc0d173fefb554b785ca0e566ffef443da6673d6a63ef10d guix-build-cf39913e5748/output/powerpc64-linux-gnu/bitcoin-cf39913e5748-powerpc64-linux-gnu.tar.gz 59338187f551f1c043e80f63c897899365fca4872b4d793e71423c1aa7ff1358 guix-build-cf39913e5748/output/powerpc64le-linux-gnu/SHA256SUMS.part 33d5d3113f176da881df06f5121d6003ae7f4e2d8124da805db1edab39161e81 guix-build-cf39913e5748/output/powerpc64le-linux-gnu/bitcoin-cf39913e5748-powerpc64le-linux-gnu-debug.tar.gz b5e9d3bf3e02aa6e3419c9f35118cb71323e0e01280b907e48fc335f8981cb6d guix-build-cf39913e5748/output/powerpc64le-linux-gnu/bitcoin-cf39913e5748-powerpc64le-linux-gnu.tar.gz ef5d9f2449ad570221209194af4c4824fc70cfacbaa020da24b9186212b81c5f guix-build-cf39913e5748/output/riscv64-linux-gnu/SHA256SUMS.part aafee42808b8bb2cdccbd919470bee2a1c9fcbb05daea32d15aa56288db7fc09 guix-build-cf39913e5748/output/riscv64-linux-gnu/bitcoin-cf39913e5748-riscv64-linux-gnu-debug.tar.gz 72e2f3c9a48f8f3f14ecac2e6a8645253a32bfad8a857d13824aedd1796cad6f guix-build-cf39913e5748/output/riscv64-linux-gnu/bitcoin-cf39913e5748-riscv64-linux-gnu.tar.gz 8637b4e85eb2d7be803e813fbf15ee597aa35c9910b4b413d657fa69c4d4569d guix-build-cf39913e5748/output/x86_64-apple-darwin/SHA256SUMS.part 7b384d2734bfd650f3f8096aa32b2aa6bddfee137c3e27ac75736989f7e6740e guix-build-cf39913e5748/output/x86_64-apple-darwin/bitcoin-cf39913e5748-x86_64-apple-darwin-unsigned.dmg 06960637c9322c3b97bb58331b3282e770b02b7b4d95100866a96c31400a9bb9 guix-build-cf39913e5748/output/x86_64-apple-darwin/bitcoin-cf39913e5748-x86_64-apple-darwin-unsigned.tar.gz cc524e73d9441fc0e396c6ae5847d9b395d27f8bfe65703520792ea509191e2e guix-build-cf39913e5748/output/x86_64-apple-darwin/bitcoin-cf39913e5748-x86_64-apple-darwin.tar.gz d99a7a48aa3a226d7f87c26dd4d6f12109e71fcb9f41052c0bcf5ba4bad1c408 guix-build-cf39913e5748/output/x86_64-linux-gnu/SHA256SUMS.part f2598fedf273244499f9481253f5114db2e299e132f5378c312f684d0a190f5f guix-build-cf39913e5748/output/x86_64-linux-gnu/bitcoin-cf39913e5748-x86_64-linux-gnu-debug.tar.gz 2151744dae55c460ad0c919101fcb845872060eef957d3ae0672f12098fa87b0 guix-build-cf39913e5748/output/x86_64-linux-gnu/bitcoin-cf39913e5748-x86_64-linux-gnu.tar.gz 6087d880cced5f30d9b70b592c91efc5677f470f82cc9ed00e0fc112ff36ac43 guix-build-cf39913e5748/output/x86_64-w64-mingw32/SHA256SUMS.part e91e48edb8819cd25b6d6b5f5421473c56859dbb17cf32108e906877097d454d guix-build-cf39913e5748/output/x86_64-w64-mingw32/bitcoin-cf39913e5748-win64-debug.zip ee4987cb94dcf4b5dfee65341a7a4f7b0865f1466c715c033a05591a749d43c3 guix-build-cf39913e5748/output/x86_64-w64-mingw32/bitcoin-cf39913e5748-win64-setup-unsigned.exe 43001b416664ea227d3f07100d8a60bcd20c761770a332374a1466d7af734127 guix-build-cf39913e5748/output/x86_64-w64-mingw32/bitcoin-cf39913e5748-win64-unsigned.tar.gz bb9a56856800e7d6e5c602302ec90704cb5dd917f52d122d783deee3ab1f149d guix-build-cf39913e5748/output/x86_64-w64-mingw32/bitcoin-cf39913e5748-win64.zip ``` ACKs for top commit: hebasto: ACK 495caa9, tested `bitcoin-495caa9a0149-win64-setup-unsigned.exe` on Windows 11 Pro: josibake: ACK bitcoin/bitcoin@495caa9 Tree-SHA512: aca9101aec9b517defc915c213af7c2fec0c254c13374e13bff715e1ee771a20fc1b487457d48809af0b82321c0be8c23c5e02444fadfca53bc6bfe16c0f4239
495caa9 build: add example bitcoin conf to win installer (fanquake) 0eac1f7 build: include share/rpcauth in tarball & installer (fanquake) Pull request description: Fixes bitcoin#19081. Addresses: bitcoin#22235 (comment). Guix Build (x86_64): ```bash bdc14efe02553703f3f27438b17ee452fc0b08e37f626830857c60a7740ec990 guix-build-495caa9a0149/output/aarch64-linux-gnu/SHA256SUMS.part 0c541efd8e2e52f1915cab13c935f165f906e46590175d568be34e026b5f0d9e guix-build-495caa9a0149/output/aarch64-linux-gnu/bitcoin-495caa9a0149-aarch64-linux-gnu-debug.tar.gz 5ee15e11e0d52d5a2df6b6a60e4ae5b3adc4b259294ad53452478f28efbe70c8 guix-build-495caa9a0149/output/aarch64-linux-gnu/bitcoin-495caa9a0149-aarch64-linux-gnu.tar.gz 451152a282fd79db45a09e0ccb3491e3044ea5ad0931dfe2820bb5c45839a311 guix-build-495caa9a0149/output/arm-linux-gnueabihf/SHA256SUMS.part b88159ac78d427556e7f70e5da3b849da5491c98fa08c16c25adbfa8e3b44b58 guix-build-495caa9a0149/output/arm-linux-gnueabihf/bitcoin-495caa9a0149-arm-linux-gnueabihf-debug.tar.gz 54b59e4d06144d18b97a0260330383dafdcf3473b560c71f6304a8d1b9ef0100 guix-build-495caa9a0149/output/arm-linux-gnueabihf/bitcoin-495caa9a0149-arm-linux-gnueabihf.tar.gz 784f43a651ed6f9335117ca971c7c215eba536414792edf72a0dc372c901c3fa guix-build-495caa9a0149/output/arm64-apple-darwin/SHA256SUMS.part ace525b20dc4789c931cf781027680e5fe35bd987c8d1908590cd83ce7e44495 guix-build-495caa9a0149/output/arm64-apple-darwin/bitcoin-495caa9a0149-arm64-apple-darwin-unsigned.dmg 1ab6d5d91040567e4fccb4e2de49789f78bd1ce9b4a496486d837904591bfbc6 guix-build-495caa9a0149/output/arm64-apple-darwin/bitcoin-495caa9a0149-arm64-apple-darwin-unsigned.tar.gz a5cd681e67beda05cac83d133d6996699effb12b9830b269669057d02b0a4eef guix-build-495caa9a0149/output/arm64-apple-darwin/bitcoin-495caa9a0149-arm64-apple-darwin.tar.gz 01cc3a078a952ed9bbff38e79bad4885a5f8502906498f7b909cb2cc798ada64 guix-build-495caa9a0149/output/dist-archive/bitcoin-495caa9a0149.tar.gz d4652f912573d0c9ce11d7e84fad10ad03f67247f85b0a5d9c47db74508705ce guix-build-495caa9a0149/output/powerpc64-linux-gnu/SHA256SUMS.part 76facbb81819b2d81afd61e2234b65d99c9e28b28f2b1d3ee2d7119cf192ba60 guix-build-495caa9a0149/output/powerpc64-linux-gnu/bitcoin-495caa9a0149-powerpc64-linux-gnu-debug.tar.gz a75cef05abb05da4a1ba81669f6a66ecc790946b6b2fd3749bad0b462bb50219 guix-build-495caa9a0149/output/powerpc64-linux-gnu/bitcoin-495caa9a0149-powerpc64-linux-gnu.tar.gz 2b2ac79848a643f025960cabca2694cb3537d72d83477ed1b53bcc6e2ee11ce4 guix-build-495caa9a0149/output/powerpc64le-linux-gnu/SHA256SUMS.part d0542623109fb72d72dcd06f8de30edefdd7e0f1bf46a7be7c262c0e631c49d8 guix-build-495caa9a0149/output/powerpc64le-linux-gnu/bitcoin-495caa9a0149-powerpc64le-linux-gnu-debug.tar.gz b85dbcbe4f50cbddcd167568d31326d62e786720cb237aaf3d11b69394f01983 guix-build-495caa9a0149/output/powerpc64le-linux-gnu/bitcoin-495caa9a0149-powerpc64le-linux-gnu.tar.gz a85a00d353338d2e72a4218782e05a816f21aea0637eb21742c55ee9a9ce1f7b guix-build-495caa9a0149/output/riscv64-linux-gnu/SHA256SUMS.part e10561b08a91a22947ead27b6d4a07581fa566eb3e5d8161f97b2ff2708b85f4 guix-build-495caa9a0149/output/riscv64-linux-gnu/bitcoin-495caa9a0149-riscv64-linux-gnu-debug.tar.gz 994aca800c2580349a436fb1fa8195cd943363dee5c3ee7c91d726cc95cd3068 guix-build-495caa9a0149/output/riscv64-linux-gnu/bitcoin-495caa9a0149-riscv64-linux-gnu.tar.gz 5a063e6dbf64aca4a639fea10fcff2f7a533819607558cec25a9a88bc575c0dc guix-build-495caa9a0149/output/x86_64-apple-darwin/SHA256SUMS.part e7f36749c3a48ce7173ee100abb275eb217eee2713d52d8b576f8c749e0c2e9e guix-build-495caa9a0149/output/x86_64-apple-darwin/bitcoin-495caa9a0149-x86_64-apple-darwin-unsigned.dmg b0289c6caba5e092d8e287c9cb4f328844bce04fce74de91e76821423b7b8153 guix-build-495caa9a0149/output/x86_64-apple-darwin/bitcoin-495caa9a0149-x86_64-apple-darwin-unsigned.tar.gz 2bf983abcfd0d782632ef7fb116ba169a0b282264774c032a50beca016468ed0 guix-build-495caa9a0149/output/x86_64-apple-darwin/bitcoin-495caa9a0149-x86_64-apple-darwin.tar.gz 72705350ab34f8d33ef98e5563f36aa82f15e7b450e3914f591b9c88e8b385da guix-build-495caa9a0149/output/x86_64-linux-gnu/SHA256SUMS.part 7b5285bfd28acf8ae1471807962d31857afe70e13ae087a8aec83d5a8ac1a184 guix-build-495caa9a0149/output/x86_64-linux-gnu/bitcoin-495caa9a0149-x86_64-linux-gnu-debug.tar.gz 6544591754607792b731fe630bf8235e78e08c7edb4d1d210b35d6328240acc1 guix-build-495caa9a0149/output/x86_64-linux-gnu/bitcoin-495caa9a0149-x86_64-linux-gnu.tar.gz bbd6490489ddfde06b6cde602d317d84c09495de3cf033016ea0ba5e60770fdb guix-build-495caa9a0149/output/x86_64-w64-mingw32/SHA256SUMS.part f48f6efcf5822517a697d990eddbc03011b08c5e4be4886e25ab65c8a0951aaa guix-build-495caa9a0149/output/x86_64-w64-mingw32/bitcoin-495caa9a0149-win64-debug.zip b1a83e58d7b316c4743ae16d552f615aa710a4985ded5834d1de6fe6437ca3b2 guix-build-495caa9a0149/output/x86_64-w64-mingw32/bitcoin-495caa9a0149-win64-setup-unsigned.exe 0196abf8cb27f3cb03b4688a85a97c26975db4938f7a2dc0a09f11847f6530bb guix-build-495caa9a0149/output/x86_64-w64-mingw32/bitcoin-495caa9a0149-win64-unsigned.tar.gz 426994640e85f82b3d3bee25f07930f952edf4a60ecd7ba41f83c82cbbcc63d1 guix-build-495caa9a0149/output/x86_64-w64-mingw32/bitcoin-495caa9a0149-win64.zip ``` Guix Build (arm64): ```bash 506a2fade794398ec38cf9c59ca0b454fdcbb0080d7e40f1ace698a7b08eef77 guix-build-cf39913e5748/output/arm-linux-gnueabihf/SHA256SUMS.part 8ec3686ba80709eb024ea02b7b493e70af82383d814b105f157c94a86cb7efd6 guix-build-cf39913e5748/output/arm-linux-gnueabihf/bitcoin-cf39913e5748-arm-linux-gnueabihf-debug.tar.gz 4d9b3456c974f7f47dca64bcc994fa04888bf08518c902d12366798829a9100d guix-build-cf39913e5748/output/arm-linux-gnueabihf/bitcoin-cf39913e5748-arm-linux-gnueabihf.tar.gz 7c74610dcaa1dbb7fcadb2ad59520fdfa3fa02f26ceb88ada178ac35a0644840 guix-build-cf39913e5748/output/arm64-apple-darwin/SHA256SUMS.part fca59c367d2b5891186c546bd87ed66dcc4f0b11433b54c49ad72aa5e0e49978 guix-build-cf39913e5748/output/arm64-apple-darwin/bitcoin-cf39913e5748-arm64-apple-darwin-unsigned.dmg 467e5c2eeaccac995d14b41f5418ba783b31ee7c63d76d5fce5e667bd6ef6683 guix-build-cf39913e5748/output/arm64-apple-darwin/bitcoin-cf39913e5748-arm64-apple-darwin-unsigned.tar.gz 1f19caa059cd6b4adcc089f90ce33fe7f679b3a4beb970b3ef5c3292fe5841ee guix-build-cf39913e5748/output/arm64-apple-darwin/bitcoin-cf39913e5748-arm64-apple-darwin.tar.gz ea07945bf21cbe306e8afc815ccb5f4a363fb7335239fe35b3668bdef43f735a guix-build-cf39913e5748/output/dist-archive/bitcoin-cf39913e5748.tar.gz b699ae65b899192ad5afbe6a069d2113fda92b833f7db31a1487e7c4c04440f5 guix-build-cf39913e5748/output/powerpc64-linux-gnu/SHA256SUMS.part eeced64cd3e49ecd95ec29623f7cd3afe66ceffb8296af646ee4e1f3fe658ab0 guix-build-cf39913e5748/output/powerpc64-linux-gnu/bitcoin-cf39913e5748-powerpc64-linux-gnu-debug.tar.gz 20181015752a5d7bfc0d173fefb554b785ca0e566ffef443da6673d6a63ef10d guix-build-cf39913e5748/output/powerpc64-linux-gnu/bitcoin-cf39913e5748-powerpc64-linux-gnu.tar.gz 59338187f551f1c043e80f63c897899365fca4872b4d793e71423c1aa7ff1358 guix-build-cf39913e5748/output/powerpc64le-linux-gnu/SHA256SUMS.part 33d5d3113f176da881df06f5121d6003ae7f4e2d8124da805db1edab39161e81 guix-build-cf39913e5748/output/powerpc64le-linux-gnu/bitcoin-cf39913e5748-powerpc64le-linux-gnu-debug.tar.gz b5e9d3bf3e02aa6e3419c9f35118cb71323e0e01280b907e48fc335f8981cb6d guix-build-cf39913e5748/output/powerpc64le-linux-gnu/bitcoin-cf39913e5748-powerpc64le-linux-gnu.tar.gz ef5d9f2449ad570221209194af4c4824fc70cfacbaa020da24b9186212b81c5f guix-build-cf39913e5748/output/riscv64-linux-gnu/SHA256SUMS.part aafee42808b8bb2cdccbd919470bee2a1c9fcbb05daea32d15aa56288db7fc09 guix-build-cf39913e5748/output/riscv64-linux-gnu/bitcoin-cf39913e5748-riscv64-linux-gnu-debug.tar.gz 72e2f3c9a48f8f3f14ecac2e6a8645253a32bfad8a857d13824aedd1796cad6f guix-build-cf39913e5748/output/riscv64-linux-gnu/bitcoin-cf39913e5748-riscv64-linux-gnu.tar.gz 8637b4e85eb2d7be803e813fbf15ee597aa35c9910b4b413d657fa69c4d4569d guix-build-cf39913e5748/output/x86_64-apple-darwin/SHA256SUMS.part 7b384d2734bfd650f3f8096aa32b2aa6bddfee137c3e27ac75736989f7e6740e guix-build-cf39913e5748/output/x86_64-apple-darwin/bitcoin-cf39913e5748-x86_64-apple-darwin-unsigned.dmg 06960637c9322c3b97bb58331b3282e770b02b7b4d95100866a96c31400a9bb9 guix-build-cf39913e5748/output/x86_64-apple-darwin/bitcoin-cf39913e5748-x86_64-apple-darwin-unsigned.tar.gz cc524e73d9441fc0e396c6ae5847d9b395d27f8bfe65703520792ea509191e2e guix-build-cf39913e5748/output/x86_64-apple-darwin/bitcoin-cf39913e5748-x86_64-apple-darwin.tar.gz d99a7a48aa3a226d7f87c26dd4d6f12109e71fcb9f41052c0bcf5ba4bad1c408 guix-build-cf39913e5748/output/x86_64-linux-gnu/SHA256SUMS.part f2598fedf273244499f9481253f5114db2e299e132f5378c312f684d0a190f5f guix-build-cf39913e5748/output/x86_64-linux-gnu/bitcoin-cf39913e5748-x86_64-linux-gnu-debug.tar.gz 2151744dae55c460ad0c919101fcb845872060eef957d3ae0672f12098fa87b0 guix-build-cf39913e5748/output/x86_64-linux-gnu/bitcoin-cf39913e5748-x86_64-linux-gnu.tar.gz 6087d880cced5f30d9b70b592c91efc5677f470f82cc9ed00e0fc112ff36ac43 guix-build-cf39913e5748/output/x86_64-w64-mingw32/SHA256SUMS.part e91e48edb8819cd25b6d6b5f5421473c56859dbb17cf32108e906877097d454d guix-build-cf39913e5748/output/x86_64-w64-mingw32/bitcoin-cf39913e5748-win64-debug.zip ee4987cb94dcf4b5dfee65341a7a4f7b0865f1466c715c033a05591a749d43c3 guix-build-cf39913e5748/output/x86_64-w64-mingw32/bitcoin-cf39913e5748-win64-setup-unsigned.exe 43001b416664ea227d3f07100d8a60bcd20c761770a332374a1466d7af734127 guix-build-cf39913e5748/output/x86_64-w64-mingw32/bitcoin-cf39913e5748-win64-unsigned.tar.gz bb9a56856800e7d6e5c602302ec90704cb5dd917f52d122d783deee3ab1f149d guix-build-cf39913e5748/output/x86_64-w64-mingw32/bitcoin-cf39913e5748-win64.zip ``` ACKs for top commit: hebasto: ACK 495caa9, tested `bitcoin-495caa9a0149-win64-setup-unsigned.exe` on Windows 11 Pro: josibake: ACK bitcoin@495caa9 Tree-SHA512: aca9101aec9b517defc915c213af7c2fec0c254c13374e13bff715e1ee771a20fc1b487457d48809af0b82321c0be8c23c5e02444fadfca53bc6bfe16c0f4239
create a script for parsing the output from
bitcoind --help
to create an example conf file for new usersproblem
per #10746 ,
bitcoin.conf
not being put into the data directory during installation causes some confusion for users when running bitcoin. in the discussion on the issue, one proposed solution was to have an example config file and instruct users tocp
it into their data directory after startup. in addition to #10746 , there have been other requests for a "skeleton config file" (#19641) to help users get started with configuring bitcoind.the main issue with an example config file is that it creates a second source of truth regarding what options are available for configuring bitcoind. this means any changes to the options (including the addition or removal of options) would have to be updated for the command line and also updated in the example file.
this PR addresses this issue by providing a script to generate an example file directly from the
bitcoind --help
on-demand by runningcontrib/devtools/gen-bitcoin-conf.sh
. this solution was originally proposed on #10746 and would also solve #19641 . this guarantees any changes made to the command-line options or the command-line options help would also be reflected in the example file after compiling and running the script.the main purpose of this script is to generate a config file to be included with releases, same as
gen-manpages.sh
. this ensures every release also includes an up-to-date, full example config file for users to edit. the script is also available for users who compile from source for generating an example config for their compiled binary.special considerations
this removes the
bitcoin.conf
example file from the repo as it is now generated by this script. the original example file did contain extra text related to how to use certain options but going forward all option help docs should be moved intoinit.cpp
this also edits
init.cpp
to have the option help indicate that-conf
is not usable from the config file. this is similar to how-includeconf
's help indicates it cannot be used from the command line