Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 757102 - net-p2p/bitcoin-core does not install rpcauth.py during src_install() phase
Summary: net-p2p/bitcoin-core does not install rpcauth.py during src_install() phase
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matt Whitlock
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks:
 
Reported: 2020-11-27 03:41 UTC by Jason Chan
Modified: 2023-10-25 08:37 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
git diff of modified src_install() phase to include share/rpcauth (modify-bitcoind-install-to-include-rpcauth_py.diff,1.92 KB, patch)
2020-11-27 03:41 UTC, Jason Chan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Chan 2020-11-27 03:41:05 UTC
Created attachment 675238 [details, diff]
git diff of modified src_install() phase to include share/rpcauth

https://github.com/bitcoin/bitcoin/tree/v0.20.1/share/rpcauth

rpcauth.py is used to create credentials for JSON-RPC connections using a username and hashed password. It is mentioned in the bitcoind manpage and is required if using the -rpcauth option.

rpcauth.py was introduced in bitcoin's 0.16 branch so this affects all current versions available in Gentoo's main overlay.
Comment 1 Luke-Jr 2020-11-28 20:25:56 UTC
Not sure /usr/share makes sense...?

Either it belongs in /usr/share/doc/... as an example, or /usr/bin renamed IMO
Comment 2 Jason Chan 2020-11-30 13:43:50 UTC
(In reply to Luke-Jr from comment #1)
> Not sure /usr/share makes sense...?
> 
> Either it belongs in /usr/share/doc/... as an example, or /usr/bin renamed
> IMO

I agree that it is odd. I figured it'd be closest to the canonical path defined in the documentation.

I'll vote for /usr/share/doc; there it can be stored in /usr/share/doc/bitcoind-x.xx.x, giving clarity on which version rpcauth.py is.

Could it be possible to patch bitcoind to call rpcauth.py? I don't like the idea of adding yet another file to /usr/bin, especially considering the infrequency of needing to use rpcauth.py.
Comment 3 Jason Chan 2021-02-01 14:12:13 UTC
Just checking up. I don't have a preference for location. It would be good to include rpcauth.py in the 0.21.0 release.
Comment 4 Luke-Jr 2021-02-02 03:12:27 UTC
Forgot this for 0.21.0, but maybe a -r1...

Pondering the options, I think the best possibility is:

       newbin share/rpcauth/rpcauth.py bitcoind-rpcauth
       newdoc share/rpcauth/README.md bitcoind-rpcauth.md

Installed with examples means it gets compressed, effectively making it annoying to use.
Comment 5 Jason Chan 2021-02-09 10:25:50 UTC
>        newbin share/rpcauth/rpcauth.py bitcoind-rpcauth

That would be a wonderful idea. Keeps it simple and accessible to users. Are there any other scripts that should be considered besides rpcauth.py? If so, following the /usr/bin/bitcoind-* styling would be ideal in such a case.
Comment 6 Florian Schmaus gentoo-dev 2023-10-24 10:51:34 UTC
@matt please check if this is still valid for the new bitcoin-core ebuild.
Comment 7 Matt Whitlock 2023-10-24 14:57:01 UTC
rpcauth.py doesn't get installed. If upstream had intended it to be included in the canonical installation, they would have mentioned it in Makefile.am. Under that reasoning, I do believe it would make the most sense to install it in the doc dir. To address Luke's concern, compression of the script can be disabled with `docompress -x`. The README file is redundant to install since it's just a dump of the script's --help output.
Comment 8 Florian Schmaus gentoo-dev 2023-10-24 16:34:13 UTC
Yep, I am also skeptical regarding this script. But I guess placing it uncompressed into the docdir does not hurt much.
Comment 9 Larry the Git Cow gentoo-dev 2023-10-25 08:37:32 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d23ce0f6769a00197db3e28117a7e809dc92828

commit 2d23ce0f6769a00197db3e28117a7e809dc92828
Author:     Matt Whitlock <gentoo@mattwhitlock.name>
AuthorDate: 2023-10-24 15:46:17 +0000
Commit:     Florian Schmaus <flow@gentoo.org>
CommitDate: 2023-10-25 08:37:20 +0000

    net-p2p/bitcoin-core: install rpcauth.py to doc dir
    
    Closes: https://bugs.gentoo.org/757102
    Signed-off-by: Matt Whitlock <gentoo@mattwhitlock.name>
    Signed-off-by: Florian Schmaus <flow@gentoo.org>

 .../{bitcoin-core-25.1.ebuild => bitcoin-core-25.1-r1.ebuild}       | 6 ++++++
 1 file changed, 6 insertions(+)