contrib: fix manpage generation #33996

pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:fixup_gen_manpages changing 1 files +6 −4
  1. fanquake commented at 3:55 pm on December 2, 2025: member
    0972f5504021b482b27523fd3bcb8036cf6b439c from #33229 broke manpage generation, because the assumption that the last word in the line containing the version number, was the version number, no-longer holds for some binaries. i.e bitcoind.
  2. DrahtBot added the label Scripts and tools on Dec 2, 2025
  3. fanquake removed the label Scripts and tools on Dec 2, 2025
  4. fanquake added the label Needs backport (30.x) on Dec 2, 2025
  5. DrahtBot commented at 3:55 pm on December 2, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33996.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK janb84, rkrux

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

  6. fanquake added this to the milestone 30.1 on Dec 2, 2025
  7. fanquake force-pushed on Dec 2, 2025
  8. DrahtBot added the label CI failed on Dec 2, 2025
  9. DrahtBot commented at 4:05 pm on December 2, 2025: contributor

    🚧 At least one of the CI tasks failed. Task lint: https://github.com/bitcoin/bitcoin/actions/runs/19864860491/job/56924634590 LLM reason (✨ experimental): Lint check failed due to a Python type error in contrib/devtools/gen-manpages.py.

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

  10. DrahtBot removed the label CI failed on Dec 2, 2025
  11. rkrux approved
  12. rkrux commented at 9:41 am on December 3, 2025: contributor

    tACK 10e6417b3b33a7df18a61d657153f3d90b89dbf2

    The regex seems a little loose but ok.

  13. in contrib/devtools/gen-manpages.py:65 in 10e6417b3b
    64-    # last word of line is the actual version e.g. v22.99.0-5c6b3d5b3508
    65-    verstr = verstr.split()[-1]
    66-    assert verstr.startswith('v')
    67+    output = r.stdout.splitlines()[0]
    68+    # find the version e.g. v30.99.0-ce771726f3e7
    69+    search = re.search("v[0-9]\\S+", output)
    


    janb84 commented at 9:51 am on December 3, 2025:

    Non-blocking NIT: maybe use raw strings version of regex for clarity and following best practices

    0    search = re.search(r"v[0-9]\S+", output)
    

    fanquake commented at 10:12 am on December 3, 2025:
    Taken.
  14. janb84 commented at 9:51 am on December 3, 2025: contributor

    ACK 10e6417b3b33a7df18a61d657153f3d90b89dbf2

    This PR fixes gen-manpages to process the version in a different way.

    Master, breaks:

    0./contrib/devtools/gen-manpages.py
    1Traceback (most recent call last):
    2  File "/Users/arjan/Projects/bitcoin/./contrib/devtools/gen-manpages.py", line 65, in <module>
    3    assert verstr.startswith('v')
    4           ~~~~~~~~~~~~~~~~~^^^^^
    5AssertionError
    

    This PR, works:

    0 ./contrib/devtools/gen-manpages.py
    1Generating /Users/jan/Projects/bitcoin/doc/man/bitcoin.1…
    2Generating /Users/jan/Projects/bitcoin/doc/man/bitcoind.1…
    3Generating /Users/jan/Projects/bitcoin/doc/man/bitcoin-cli.1…
    4Generating /Users/jan/Projects/bitcoin/doc/man/bitcoin-tx.1…
    5Generating /Users/jan/Projects/bitcoin/doc/man/bitcoin-wallet.1…
    6Generating /Users/jan/Projects/bitcoin/doc/man/bitcoin-util.1…
    7Generating /Users/jan/Projects/bitcoin/doc/man/bitcoin-qt.1…
    

    Version is also picked up correctly:

    0.TH BITCOIND "1" "January 1980" "bitcoind v30.99.0-10e6417b3b33" "User Commands"
    1.SH NAME
    2bitcoind \- manual page for bitcoind v30.99.0-10e6417b3b33
    

    note: the date is local issue, not an error in the script.

  15. contrib: fix manpage generation
    0972f5504021b482b27523fd3bcb8036cf6b439c from #33229 broke manpage
    generation, because the assumption that the last word in the line
    containing the version number, was the version number, no-longer holds
    for some binaries. i.e bitcoind.
    e9536faaee
  16. fanquake force-pushed on Dec 3, 2025
  17. janb84 commented at 10:18 am on December 3, 2025: contributor

    re ACK e9536faaee2bdb53807aa7c48aafa269d18f19d3

    changes since last ack:

    • regex is now in raw string format.

    (thanks for incorporating my nit)

  18. DrahtBot requested review from rkrux on Dec 3, 2025
  19. rkrux approved
  20. rkrux commented at 10:27 am on December 3, 2025: contributor
    re-ACK e9536faaee2bdb53807aa7c48aafa269d18f19d3
  21. fanquake merged this on Dec 3, 2025
  22. fanquake closed this on Dec 3, 2025

  23. fanquake deleted the branch on Dec 3, 2025
  24. fanquake referenced this in commit d872277db5 on Dec 3, 2025
  25. fanquake commented at 11:34 am on December 3, 2025: member
    Backported to 30.x in #33997.
  26. fanquake removed the label Needs backport (30.x) on Dec 3, 2025
  27. DrahtBot added the label Scripts and tools on Dec 3, 2025

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: 2025-12-12 18:13 UTC

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