cmake: Move internal binaries from bin/ to libexec/ #31679

pull ryanofsky wants to merge 1 commits into bitcoin:master from ryanofsky:pr/libexec changing 5 files +25 −15
  1. ryanofsky commented at 5:01 pm on January 17, 2025: contributor

    Currently when “make install” or “cmake –install” are run, various internal binaries that are confusing and not typically useful are installed to ${CMAKE_INSTALL_PREFIX}/bin and can wind up on the system PATH. This PR moves internal binaries out of bin/ into libexec/ where they will still be accessible but will not be automatically placed on the PATH or be confused with more useful binaries. The PR also adds an install rule for the bitcoin-chainstate binary. After this PR binaries installed to bin/ are:

    • bitcoin-cli
    • bitcoind
    • bitcoin-qt
    • bitcoin-tx
    • bitcoin-util
    • bitcoin-wallet

    And binaries installed to libexec/ are:

    • bench_bitcoin
    • bitcoin-chainstate
    • bitcoin-gui
    • bitcoin-node
    • test_bitcoin
    • test_bitcoin-qt

    In the future if #31375 gets merged, there will be a new bitcoin wrapper executable in bin/ that can be used to call other binaries, and with that present, we could consider moving other binaries from bin/ to libexec/ and recommending that most users should use the wrapper instead of calling the different utilities directly. But this PR should make still make sense without #31375 to organize the binaries better.

  2. cmake: Move internal binaries from bin/ to libexec/
    Currently when "make install" or "cmake --install" are run, various internal
    binaries that are confusing and not typically useful and installed to
    `${CMAKE_INSTALL_PREFIX}/bin` and can wind up on the system PATH. This PR moves
    internal binaries out of bin/ into libexec/ where they will still be accessible
    but will not be automatically placed on the PATH or be confused with more
    useful binaries. The PR also adds an install rule for the bitcoin-chainstate
    binary. After this PR binaries installed to bin/ are:
    
    - bitcoin-cli
    - bitcoind
    - bitcoin-qt
    - bitcoin-tx
    - bitcoin-util
    - bitcoin-wallet
    
    And binaries installed to libexec/ are:
    
    - bench_bitcoin
    - bitcoin-gui
    - bitcoin-node
    - test_bitcoin
    - test_bitcoin-qt
    
    In the future if #31375 gets merged, there will be a new `bitcoin` wrapper
    executable in bin/ that can be used to call other binaries, and with that
    present, we could consider moving other binaries from bin/ to libexec/ and
    recommending that most users should use the wrapper instead of calling the
    different utilities directly. But this PR should make sense with or without
    #31375.
    2a95271066
  3. DrahtBot commented at 5:01 pm on January 17, 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/31679.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  4. DrahtBot added the label Build system on Jan 17, 2025
  5. DrahtBot added the label CI failed on Jan 17, 2025
  6. DrahtBot commented at 7:52 am on January 18, 2025: contributor
    CI failed with [17:52:38.033] /ci_container_base/ci/test/03_test_script.sh: line 154: /ci_container_base/ci/scratch/out/bin/test_bitcoin: No such file or directory

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-01-21 03:12 UTC

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