Install man pages + possibly install bitcoind into sbin #7626

issue AliceWonderMiscreations opened this issue on March 1, 2016
  1. AliceWonderMiscreations commented at 2:32 PM on March 1, 2016: contributor

    #1040

    I agree with @laanwj that man pages should be installed during normal "make install"

    I would also suggest that bitcoind be installed into the sbin directory of the prefix (opposed to the bin directory)

    daemons normally go in sbin as they should not be included in a directory included in the PATH environmental variable of non-admin users.

  2. laanwj commented at 4:03 PM on March 1, 2016: member

    I would also suggest that bitcoind be installed into the sbin directory of the prefix (opposed to the bin directory)

    Doesn't sbin imply that the command is intended to be executed by root? I think that's very wrong.

  3. laanwj added the label Build system on Mar 1, 2016
  4. AliceWonderMiscreations commented at 4:30 PM on March 1, 2016: contributor

    No, being in an sbin directory does not mean it is intended to executed by root. At least not traditionally on UNIX systems, maybe some of the newer ones are incorrectly making that distinction.

    Daemons usually fork to run in their own user/group - as apache (httpd), named, and bitcoind do - from a service script that is started by root. And they traditionally go into an sbin directory so that a user who might want to execute the command bitcoin-cli or bitcoin-tx doesn't have bitcoind in their path.

  5. jameshilliard commented at 4:52 AM on March 2, 2016: contributor

    From what I'm seeing the best option may be to use /usr/local/bin for "make install" and /usr/bin for distribution managed packages such as ppa's.

  6. Nolaan commented at 11:15 AM on March 2, 2016: none

    According to the FHS (https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard) sbin stand for system binaries for bins like fsck, init, route...

  7. AliceWonderMiscreations commented at 11:23 AM on March 2, 2016: contributor

    @jameshilliard make install uses whatever you specify with --prefix

    It defaults to /usr/local as the prefix unless you specify something with the --prefix switch to configure. That's standard.

    With ${PREFIX} there is bin for executables users are likely to use, sbin for daemons and executables the system administrator is likely to use that users are nor, lib (and/or lib64) for libraries, share for arch independent not executable stuff (like man pages, desktop files, etc.) etc.

    When building bitcoin for a package to be installed you would use --prefix=/usr and when building from source you would use --prefix=/usr/local or leave it off as that's the default.

    -=- @Nolaan yes, according to the FHS the bitcoind daemon would go in ${PREFIX}/sbin - which is where compliant *nix distributions put every other daemon they install.

    Daemons are not ordinarily started by users but are ordinarily started by the init process.

    It is true that bitcoind uses port numbers above 1024 and thus often can be started by non administrative users, e.g. when using a third party wallet that uses bitcoind to talk to the network, but it still is a system daemon that is ordinarily started by the init process and thus it belongs in ${PREFIX}/sbin where all the other daemons live.

    [alice@localhost ~]$ ls /usr/sbin/httpd 
    /usr/sbin/httpd
    [alice@localhost ~]$ ls /usr/sbin/named
    /usr/sbin/named
    [alice@localhost ~]$ ls /usr/sbin/haveged 
    /usr/sbin/haveged
    [alice@localhost ~]$ ls /usr/sbin/nsd
    /usr/sbin/nsd
    

    Etc.

  8. AliceWonderMiscreations commented at 11:35 AM on March 2, 2016: contributor

    It should be noted that with the autoconf system bitcoin uses, it can be modified to install bitcoind in ${PREFIX}/sbin and those who want it in ${PREFIX}/bin can use a configure switch to make that the directory. However as the autoconf is currently set up, there is no configure switch to bitcoind in ${PREFIX}/sbin that would not also put bitcoin-cli, bitcoin-tx, and bench_bitcoin in ${PREFIX}/sbin

    So changing the autoconf files would allow bitcoind to be installed in ${PREFIX}/sbin in accordance with the FHS and LSB while leaving the others in ${PREFIX}/bin where they belong - but for those who really want it all in ${PREFIX}/bin can do so with --sbindir=/usr{,/local}/bin as a configure switch.

  9. laanwj commented at 10:14 AM on March 18, 2016: member

    TBH i think this is too much bother to change this now. People expect bitcoind in bin, by now, and will have set up scripts to assume such. Also, many people run bitcoind as user, not as system daemon.

  10. laanwj renamed this:
    UNIX cleanup
    Install man pages + possibly install bitcoind into sbin
    on Mar 18, 2016
  11. laanwj added the label Easy to implement on Apr 28, 2016
  12. laanwj commented at 8:38 AM on September 13, 2016: member

    This was Done (#8608)

  13. laanwj closed this on Sep 13, 2016

  14. MarcoFalke locked this on Sep 8, 2021

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: 2026-04-14 18:15 UTC

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