Skip to content

Conversation

fanquake
Copy link
Member

Addresses a review comment from #24263, and addresses the comment where it was pointed out that we are inconsistent with emitting our copyright. After this change, the copyright is always emitted with -version, rather than -help, i.e:

bitcoind -version

Bitcoin Core version v22.99.0-fc1f355913f6-dirty
Copyright (C) 2009-2022 The Bitcoin Core developers

Please contribute if you find Bitcoin Core useful. Visit
<https://bitcoincore.org/> for further information about the software.
The source code is available from <https://github.com/bitcoin/bitcoin>.

This is experimental software.
Distributed under the MIT software license, see the accompanying file COPYING
or <https://opensource.org/licenses/MIT>

The info is also added to binaries other than bitcoind/bitcoin-qt. This change also prevents duplicate copyright info appearing in the bitcoind man page.

@laanwj
Copy link
Member

laanwj commented Feb 22, 2022

Concept ACK!

This change also prevents duplicate copyright info appearing in the bitcoind man page.

Heh. I did check the bitcoind manual page and didn't notice, it seemed to me that help2man was ignoring the initial message.

@@ -42,7 +42,7 @@
print(f'{abspath} not found or not an executable', file=sys.stderr)
sys.exit(1)
# take first line (which must contain version)
verstr = r.stdout.split('\n')[0]
verstr = r.stdout.splitlines()[0]
# last word of line is the actual version e.g. v22.99.0-5c6b3d5b3508
verstr = verstr.split()[-1]
assert verstr.startswith('v')
Copy link
Member

@laanwj laanwj Feb 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lines below here can go now ("Only bitcoin-qt prints the copyright message on --version, so store it specifically."). Could even store the copyright message per binary like the other version info.

Also another split('n') below.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, should be addressed.

@laanwj laanwj added this to the 23.0 milestone Feb 22, 2022
fanquake and others added 3 commits February 22, 2022 15:36
Consolidate to outputting the licensing info when we pass -version to a binary,
i.e bitcoind -version:
```bash
itcoin Core version v22.99.0-fc1f355913f6-dirty
Copyright (C) 2009-2022 The Bitcoin Core developers

Please contribute if you find Bitcoin Core useful. Visit
<https://bitcoincore.org/> for further information about the software.
The source code is available from <https://github.com/bitcoin/bitcoin>.

This is experimental software.
Distributed under the MIT software license, see the accompanying file COPYING
or <https://opensource.org/licenses/MIT>
```
Co-authored-by: Carl Dong <contact@carldong.me>
@laanwj
Copy link
Member

laanwj commented Feb 22, 2022

Updated table:

binary -help (before) -version (before) -help (after) -version (after)
bitcoind yes no no yes
bitcoin-cli no no no yes
bitcoin-tx no no no yes
bitcoin-wallet no no no yes
bitcoin-util no no no yes
bitcoin-qt no yes no yes

Also checked that manual pages are generated correctly.

Tested ACK 5a89bed

@maflcko maflcko merged commit 3c56530 into bitcoin:master Feb 23, 2022
@fanquake fanquake deleted the 24263_followups branch February 23, 2022 09:16
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Feb 23, 2022
@bitcoin bitcoin locked and limited conversation to collaborators Feb 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants