Always output license/copyright info with -version #24409

pull fanquake wants to merge 3 commits into bitcoin:master from fanquake:24263_followups changing 13 files +68 −55
  1. fanquake commented at 9:01 pm on February 21, 2022: 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:

     0bitcoind -version
     1
     2Bitcoin Core version v22.99.0-fc1f355913f6-dirty
     3Copyright (C) 2009-2022 The Bitcoin Core developers
     4
     5Please contribute if you find Bitcoin Core useful. Visit
     6<https://bitcoincore.org/> for further information about the software.
     7The source code is available from <https://github.com/bitcoin/bitcoin>.
     8
     9This is experimental software.
    10Distributed under the MIT software license, see the accompanying file COPYING
    11or <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.

  2. fanquake requested review from laanwj on Feb 21, 2022
  3. DrahtBot added the label Scripts and tools on Feb 21, 2022
  4. DrahtBot added the label Utils/log/libs on Feb 21, 2022
  5. laanwj commented at 8:49 am on February 22, 2022: member

    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.

  6. in contrib/devtools/gen-manpages.py:47 in 2b25810683 outdated
    41@@ -42,7 +42,7 @@
    42         print(f'{abspath} not found or not an executable', file=sys.stderr)
    43         sys.exit(1)
    44     # take first line (which must contain version)
    45-    verstr = r.stdout.split('\n')[0]
    46+    verstr = r.stdout.splitlines()[0]
    47     # last word of line is the actual version e.g. v22.99.0-5c6b3d5b3508
    48     verstr = verstr.split()[-1]
    49     assert verstr.startswith('v')
    


    laanwj commented at 8:51 am on February 22, 2022:

    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.


    fanquake commented at 10:17 am on February 22, 2022:
    Thanks, should be addressed.
  7. laanwj added this to the milestone 23.0 on Feb 22, 2022
  8. fanquake force-pushed on Feb 22, 2022
  9. refactor: shift CopyrightHolders() and LicenseInfo() to clientversion.cpp 4c3e3c5746
  10. Output license info when binaries are passed -version
    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>
    ```
    2618fb8d15
  11. contrib: address gen-manpages feedback from #24263
    Co-authored-by: Carl Dong <contact@carldong.me>
    5a89bed410
  12. fanquake force-pushed on Feb 22, 2022
  13. laanwj commented at 6:01 pm on February 22, 2022: member

    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 5a89bed410d724360b8f90bd9d7d28d6e62331c0

  14. MarcoFalke merged this on Feb 23, 2022
  15. MarcoFalke closed this on Feb 23, 2022

  16. fanquake deleted the branch on Feb 23, 2022
  17. sidhujag referenced this in commit 75b226a0c6 on Feb 23, 2022
  18. DrahtBot locked this on Feb 23, 2023

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-23 00:13 UTC

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