Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 445724

Summary: net-p2p/armory - New package. - Full-featured Bitcoin client, offering a dozen innovative features...
Product: Gentoo Linux Reporter: Justus Ranvier <gentoo>
Component: New packagesAssignee: Default Assignee for New Packages <maintainer-wanted>
Status: UNCONFIRMED ---    
Severity: enhancement CC: flow, gentoo, luke-jr+gentoobugs, tobias.pal, tomboy64, Xeha
Priority: Normal Keywords: EBUILD
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://bitcoinarmory.com/
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Example ebuild for armory-0.85 beta
armory 0.87.2-beta
armory-0.87.2_beta.ebuild
armory-0.88.ebuild
armory-0.88.ebuild

Description Justus Ranvier 2012-12-03 02:18:31 UTC
Armory is a Python-based Bitcoin client.

Reproducible: Always
Comment 1 Justus Ranvier 2012-12-03 02:19:04 UTC
Created attachment 331264 [details]
Example ebuild for armory-0.85 beta
Comment 2 Luke-Jr 2013-03-23 19:40:16 UTC
Please submit a merge request to the Bitcoin overlay for this.
https://gitorious.org/bitcoin/gentoo
Comment 3 Luke-Jr 2013-03-23 19:53:01 UTC
As for the attached ebuild, I found the following bugs:
- "full featured" doesn't seem right when it depends on another bitcoin client to do the basic networking/validation for it
- Pretty sure RDEPEND should be on bitcoind, at least as an alternative to bitcoin-qt.
- A number of DEPEND entries should likely be in RDEPEND instead/also.
Comment 4 M. B. 2013-04-09 13:23:27 UTC
Created attachment 344970 [details]
armory 0.87.2-beta

This is my ebuild; you can find it as well in the tbc overlay via layman. I'll try and track armory.

Now let's see how to get in touch with the bitcoin overlay.
Comment 5 Luke-Jr 2013-04-14 22:10:26 UTC
(In reply to comment #4)
> Created attachment 344970 [details]
> armory 0.87.2-beta

Please correct the license to GPLv2 per skel.ebuild.

DESCRIPTION should be one line
Comment 6 M. B. 2013-04-14 23:38:22 UTC
Created attachment 345592 [details]
armory-0.87.2_beta.ebuild

I made the requested changes including the change to GPL-v2.

As the WTFPL is officially compatible with the GPL-v2 the ebuild in my personal overlay will retain that license.
Comment 7 Justus Ranvier 2013-06-04 03:36:01 UTC
(In reply to Luke-Jr from comment #3)
> - Pretty sure RDEPEND should be on bitcoind, at least as an alternative to
> bitcoin-qt.

The correct value for RDEPEND varies based on the mode of usage. If Armory is used in online mode it has a runtime dependence on either bitcoind or bitcoin-qt.

From versions 0.88 onward bitcoind is preferred for online mode.

If Armory is used in offline mode then it requires neither bitcoind nor bitcoin-qt.
Comment 8 Luke-Jr 2013-06-04 03:43:15 UTC
(In reply to Justus Ranvier from comment #7)
> (In reply to Luke-Jr from comment #3)
> > - Pretty sure RDEPEND should be on bitcoind, at least as an alternative to
> > bitcoin-qt.
> 
> The correct value for RDEPEND varies based on the mode of usage. If Armory
> is used in online mode it has a runtime dependence on either bitcoind or
> bitcoin-qt.
> 
> From versions 0.88 onward bitcoind is preferred for online mode.
> 
> If Armory is used in offline mode then it requires neither bitcoind nor
> bitcoin-qt.

How about "network? ( || ( net-p2p/bitcoind net-p2p/bitcoin-qt ) )" ?
Comment 9 Justus Ranvier 2013-06-04 05:44:27 UTC
Created attachment 350076 [details]
armory-0.88.ebuild

(In reply to Luke-Jr from comment #8)
> How about "network? ( || ( net-p2p/bitcoind net-p2p/bitcoin-qt ) )" ?

I've incorporated that into an updated ebuild for 0.88.

Another issue that I'm not sure how to best address is that Armory assumes bitcoind will store its files in the current user's home directory and the bitcoind ebuild stores them in /var/lib/bitcoin.

Making both Armory and bitcoind work as expected from a Gentoo perspective requires a signifigant amount of manual configuration.
Comment 10 Luke-Jr 2013-06-04 05:49:56 UTC
(In reply to Justus Ranvier from comment #9)
> I've incorporated that into an updated ebuild for 0.88.

RDEPEND can use ${DEPEND} to simplify.

sed never fails, even if no match is found.

> Another issue that I'm not sure how to best address is that Armory assumes
> bitcoind will store its files in the current user's home directory and the
> bitcoind ebuild stores them in /var/lib/bitcoin.
> 
> Making both Armory and bitcoind work as expected from a Gentoo perspective
> requires a signifigant amount of manual configuration.

Probably should provide a patch to handle this.
Maybe RDEPEND needs to be specific to bitcoind or Bitcoin-Qt for starters?
Comment 11 Justus Ranvier 2013-06-04 06:00:26 UTC
(In reply to Luke-Jr from comment #10)
> Probably should provide a patch to handle this.
> Maybe RDEPEND needs to be specific to bitcoind or Bitcoin-Qt for starters?

Might be able to convince Etotheipi to make some behavior configurable at compile time.

I think all that is needed to make everything work correctly as far as being able to start bitcoind via OpenRC and also use Armory is for the user running Armory to be in the bitcoin group and for Armory to be told at compile time to look for the block database in /var/lib/bitcoin/.bitcoin instead of ~/.bitcoin.

On the bitcoind side the permissions in /var/lib/bitcoin/.bitcoin would need to be adjusted so that users in the bitcoin group have read access to the block database but not wallet.dat.
Comment 12 Justus Ranvier 2013-06-04 06:03:26 UTC
Created attachment 350078 [details]
armory-0.88.ebuild
Comment 13 Luke-Jr 2013-06-04 06:08:35 UTC
(In reply to Justus Ranvier from comment #11)
> (In reply to Luke-Jr from comment #10)
> > Probably should provide a patch to handle this.
> > Maybe RDEPEND needs to be specific to bitcoind or Bitcoin-Qt for starters?
> 
> Might be able to convince Etotheipi to make some behavior configurable at
> compile time.

You mean run time, I think? :)

> I think all that is needed to make everything work correctly as far as being
> able to start bitcoind via OpenRC and also use Armory is for the user
> running Armory to be in the bitcoin group and for Armory to be told at
> compile time to look for the block database in /var/lib/bitcoin/.bitcoin
> instead of ~/.bitcoin.
> 
> On the bitcoind side the permissions in /var/lib/bitcoin/.bitcoin would need
> to be adjusted so that users in the bitcoin group have read access to the
> block database but not wallet.dat.

Maybe a sudoers.d file to allow the bitcoind init script to be started (only) by bitcoin group users, and modify Armory to attempt it.
Comment 14 Justus Ranvier 2013-06-04 06:14:51 UTC
(In reply to Luke-Jr from comment #13)
> You mean run time, I think? :)

No, compile time. There is already a -datadir option for Armory that can be used at run time but using that means patching the .desktop file.

I'd rather be able to do something like: configure --default-datadir=/var/lib/bitcoin
Comment 15 Luke-Jr 2013-06-04 06:19:52 UTC
(In reply to Justus Ranvier from comment #14)
> (In reply to Luke-Jr from comment #13)
> > You mean run time, I think? :)
> 
> No, compile time. There is already a -datadir option for Armory that can be
> used at run time but using that means patching the .desktop file.
> 
> I'd rather be able to do something like: configure
> --default-datadir=/var/lib/bitcoin

That doesn't sound like a good solution. We don't know at build-time whether Armory will be used with bitcoind or with Bitcoin-Qt.

Best to have the default datadir be autodetected in some way.
Comment 16 Justus Ranvier 2013-06-04 06:42:00 UTC
(In reply to Luke-Jr from comment #15)
> That doesn't sound like a good solution. We don't know at build-time whether
> Armory will be used with bitcoind or with Bitcoin-Qt.

In order to do this cleanly at run time Armory should check for the existance of an /etc/armory configuration file where command line parameters like -datadir can be specified.

It could also have a list of fallback locations to check in case the blockchain files aren't found in the specified location.
Comment 17 Luke-Jr 2013-06-04 07:00:53 UTC
(In reply to Justus Ranvier from comment #16)
> (In reply to Luke-Jr from comment #15)
> > That doesn't sound like a good solution. We don't know at build-time whether
> > Armory will be used with bitcoind or with Bitcoin-Qt.
> 
> In order to do this cleanly at run time Armory should check for the
> existance of an /etc/armory configuration file where command line parameters
> like -datadir can be specified.
> 
> It could also have a list of fallback locations to check in case the
> blockchain files aren't found in the specified location.

I don't think there's any reason Armory couldn't use multiple locations, even. :)
Comment 18 Justus Ranvier 2013-06-11 22:28:56 UTC
I've submitted pull requsts to the bitcoin overlay containing these ebuilds.