Bug 193424 - net-p2p/bitcoin*: Split into (QT) GUI and CLI ports
Summary: net-p2p/bitcoin*: Split into (QT) GUI and CLI ports
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Kubilay Kocak
URL:
Keywords: needs-qa, patch
Depends on:
Blocks:
 
Reported: 2014-09-07 11:57 UTC by Andriy Voskoboinyk
Modified: 2015-03-19 11:24 UTC (History)
3 users (show)

See Also:


Attachments
patch-Makefile.diff (6.45 KB, patch)
2014-09-07 11:57 UTC, Andriy Voskoboinyk
no flags Details | Diff
patch-Makefile2.diff (6.45 KB, patch)
2014-09-07 12:04 UTC, Andriy Voskoboinyk
no flags Details | Diff
patch-Makefile3.diff (6.45 KB, patch)
2014-09-08 10:13 UTC, Andriy Voskoboinyk
no flags Details | Diff
poudriere-build.log (130.47 KB, text/plain)
2014-09-08 10:18 UTC, Andriy Voskoboinyk
no flags Details
portlint.log (240 bytes, text/plain)
2014-09-08 10:22 UTC, Andriy Voskoboinyk
no flags Details
patch-Makefile4.diff (6.41 KB, patch)
2014-09-08 13:28 UTC, Andriy Voskoboinyk
no flags Details | Diff
Update to patch - update to 0.9.2.1, downgrade my private vps in the distfiles list (7.33 KB, patch)
2014-09-13 04:54 UTC, robbak
robbak: maintainer-approval+
Details | Diff
Update to above patch - update to 0.9.3 (5.66 KB, patch)
2014-10-05 09:55 UTC, robbak
robbak: maintainer-approval+
Details | Diff
All above patches rolled together (7.00 KB, patch)
2015-01-27 06:03 UTC, robbak
robbak: maintainer-approval+
Details | Diff
All above patches rolled together + 0.9.4 update (7.00 KB, patch)
2015-01-27 08:28 UTC, robbak
robbak: maintainer-approval+
Details | Diff
All patches to update + urgently needed 0.10.0 update (11.47 KB, patch)
2015-02-20 13:02 UTC, robbak
robbak: maintainer-approval+
Details | Diff
poudriere log for bitcoin-daemon (70.88 KB, text/x-log)
2015-02-20 13:05 UTC, robbak
no flags Details
poudriere log for bitcoin-utils (45.16 KB, text/x-log)
2015-02-20 13:05 UTC, robbak
no flags Details
poudriere log for bitcoin (104.15 KB, text/x-log)
2015-02-20 13:07 UTC, robbak
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andriy Voskoboinyk freebsd_committer freebsd_triage 2014-09-07 11:57:19 UTC
Created attachment 147000 [details]
patch-Makefile.diff

- Split net-p2p/bitcoin to net-p2p/bitcoin (QT GUI only) and net-p2p/bitcoin-utils (bitcoin-cli); remove GUI option
- Add GNU_CONFIGURE=yes
- Use CPPFLAGS/LDFLAGS instead of CXXFLAGS
- Remove WITHOUT_X11
- Convert to OptionsNG
- Add DEBUG option (off by default)
- Add DBUS option (net-p2p/bitcoin only) (off by default)
- Use default UPnP description
- Fix dependencies:
  * mark qt4 build tools with _build suffix
  * remove testlib_build dependency
  * add database/db* dependency only when WALLET option is selected
  * use protoc build dependency for net-p2p/bitcoin only
  * add missed libprotobuf.so and qt4-network dependencies for net-p2p/bitcoin
- Fix conflict between net-p2p/bitcoin and net-p2p/bitcoin-daemon
- Break lines around 80 characters
- Bump portrevision
Comment 1 Andriy Voskoboinyk freebsd_committer freebsd_triage 2014-09-07 12:04:34 UTC
Created attachment 147001 [details]
patch-Makefile2.diff

fix sorting
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2014-09-07 14:04:45 UTC
Comment on attachment 147001 [details]
patch-Makefile2.diff

Thanks for your submission Andriy.

If possible please also include the following to promote quick 
resolution:

 * Attach successful poudriere testport, or redports.org build logs
 * portlint -AC output (after addressing any outstanding issues)
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2014-09-07 14:42:20 UTC
Fix assignee
Comment 4 robbak 2014-09-07 22:40:05 UTC
Most of these changes look good. But build logs would be good.

Could you explain why the separate slave ports are required? The existing bitcoin-daemon port is there for historical reasons only - older versions of bitcoin used qmake for the QT build and gnu configure for the daemon/command line builds, so you could only build one or the other. Now you can build both, or either, by choosing options, the separate port is no longer needed. My choice would be to remove the slave port, not make more.

That said, I would also be happy to hand the maintainership over to someone more qualified, if that is what others would prefer.
Comment 5 Andriy Voskoboinyk freebsd_committer freebsd_triage 2014-09-08 10:13:13 UTC
Created attachment 147054 [details]
patch-Makefile3.diff

use a tab after OPTIONS_DEFINE
Comment 6 Andriy Voskoboinyk freebsd_committer freebsd_triage 2014-09-08 10:18:36 UTC
Created attachment 147055 [details]
poudriere-build.log
Comment 7 Andriy Voskoboinyk freebsd_committer freebsd_triage 2014-09-08 10:22:07 UTC
Created attachment 147056 [details]
portlint.log
Comment 8 Andriy Voskoboinyk freebsd_committer freebsd_triage 2014-09-08 11:09:16 UTC
(In reply to robbak from comment #4)
> Could you explain why the separate slave ports are required? The existing
> bitcoin-daemon port is there for historical reasons only - older versions of
> bitcoin used qmake for the QT build and gnu configure for the daemon/command
> line builds, so you could only build one or the other. Now you can build
> both, or either, by choosing options, the separate port is no longer needed.
> My choice would be to remove the slave port, not make more.

There are few advantages/disadvantages for this:
 Adv:
 - GUI/CLI/daemon separation results in separate packages too - so, if someone needs only CLI with default options he can just install it from packages without other binaries and their dependencies.
 - different configuration options for this ports (not sure about usefulness).
 Disadv:
 - bitcoin* ports will need to build all the shared code (libbitcoin_*, libleveldb) every time.
 - also, this will add some additional complexity for the main Makefile.
Comment 9 Andriy Voskoboinyk freebsd_committer freebsd_triage 2014-09-08 13:28:45 UTC
Created attachment 147062 [details]
patch-Makefile4.diff

Move pkgconfig to USES
Comment 10 robbak 2014-09-13 04:54:35 UTC
Created attachment 147264 [details]
Update to patch - update to 0.9.2.1, downgrade my private vps in the distfiles list

This looks good, so I'm approving it with some changes:
1. There has been an update since the previous commit, to 0.9.2.1, so move to that. It is a minor bugfix release, and builds fine with no additional changes.
2. The only reason that my vps is listed as a distfile location is that FreeBSD 8.4 on Redports will not pull the distfile from github. Preferably, the distfile should be uploaded to someone's people.freebsd.org/ webspace, and that location be placed into MASTER_SITES. I'd reccomend that the person who commits this also do that.
Comment 11 robbak 2014-09-26 06:36:26 UTC
QA- tested on Redports 8.4R, 11-C and 9.2-R. If there are other QA that we should do to get this committed, please inform me. There is another update to be released shortly, and I'd like this committed before then.

https://redports.org/~robbak/20140913050011-64216-244188/bitcoin-0.9.2.1.log
https://redports.org/~robbak/20140912142701-19441-243973/bitcoin-0.9.2.1.log
https://redports.org/~robbak/20140912142701-19441-243974/bitcoin-0.9.2.1.log
Comment 12 robbak 2014-10-05 09:55:22 UTC
Created attachment 147990 [details]
Update to above patch - update to 0.9.3

Update port to 0.9.3. This is the patch to bitcoin only, to replace net-p2p/bitcoin patches in above.

This patch, and all others are fully QA'd. See:

https://redports.org/~robbak/20141005091219-75165-250616/bitcoin-utils-0.9.3.log
https://redports.org/~robbak/20141005091152-45632-250613/bitcoin-daemon-0.9.3.log
https://redports.org/~robbak/20141005091152-45632-250615/bitcoin-daemon-0.9.3.log
https://redports.org/~robbak/20141005091118-45949-250612/bitcoin-0.9.3.log
Comment 13 Kubilay Kocak freebsd_committer freebsd_triage 2015-01-27 04:53:33 UTC
robbak, could you me a massive favour please and obsolete all existing patches (diffs to diffs) by replacing them with a single svn diff against the latest version of the ports tree.

Thanks in advance, and apologies for this taking so long.
Comment 14 robbak 2015-01-27 06:03:43 UTC
Created attachment 152247 [details]
All above patches rolled together

This patch is the result of applying the above patches to a copy of net-p2p. Specifically, the edits to net-p2p/bitcon was removed from patch-Makefile4.diff, and the edits were applied (some manually etc.), then update0.9.3.diff was applied. Then diff urN was used to produce this patch.
Comment 15 Kubilay Kocak freebsd_committer freebsd_triage 2015-01-27 06:46:13 UTC
Thanks robbak. I'll get these applied to my tree locally for QA.

If you have a successful poudriere build for the latest (combined) patch, please attach it
Comment 16 robbak 2015-01-27 08:28:04 UTC
Created attachment 152253 [details]
All above patches rolled together + 0.9.4 update

This patch includes them all, and a needed update to 0.9.4 (just found that the update has been released!) This updated fixes an incompatability with recent openssl updates (1.0.1k and later.
Comment 17 robbak 2015-02-20 13:02:52 UTC
Created attachment 153208 [details]
All patches to update + urgently needed 0.10.0 update

This patch includes the update to 0.10.0. Required changes involve swapping the --with[out]-utils for the old with[out]-cli and adding plist entries for a new shared library (libconsensus).

I have also completed libconsensus builds. Note that this update is urgent, as bitcoin is broken as it stands, with the current openssl versions.
Comment 18 robbak 2015-02-20 13:05:00 UTC
Created attachment 153209 [details]
poudriere log for bitcoin-daemon
Comment 19 robbak 2015-02-20 13:05:50 UTC
Created attachment 153210 [details]
poudriere log for bitcoin-utils
Comment 20 robbak 2015-02-20 13:07:18 UTC
Created attachment 153211 [details]
poudriere log for bitcoin
Comment 21 commit-hook freebsd_committer freebsd_triage 2015-02-24 11:10:30 UTC
A commit references this bug:

Author: koobs
Date: Tue Feb 24 11:10:25 UTC 2015
New revision: 379779
URL: https://svnweb.freebsd.org/changeset/ports/379779

Log:
  net-p2p/bitcoin: Update to 0.10.0, split bitcoin-utils, LOTS MORE

  - Update to 0.10.0
  - Split out bitcoin-cli and bitcoin-tx into net-p2p/bitcoin-utils
  - Slave out bitcoin-utils and bitcoin-daemon properly
  - Canonicalize MASTER_SITES to what USE_GITHUB uses
  - Update COMMENT so each port is unique
  - protobuf/protoc is GUI-only dependency, remove it from unconditional
    {BUILD,LIB}_DEPENDS.
  - Group and sort USES/USE_*
  - Deprecate USE_AUTOTOOLS in favour of USES=autoreconf
  - Remove {AUTOMAKE,ACLOCAL}_ARGS accordingly
  - Remove unconditional *FLAGS and replace then with OPTIONS-conditional
    ones.
  - Remove unnecessary CXXFLAGS
  - Add HARDENING and TESTS options, add them to OPTIONS_DEFAULT
  - Add DBUS and DEBUG options
  - Define OPTIONS only where they're relevant for each port
  - Rejig OPTIONS descriptions for greater clarity
  - Replace hard-coded SSL inc/lib flags with USE_OPENSSL variables to
    allow for switching between Base and Ports OpenSSL's.
  - Use OPTIONS helpers
  - Remove post-patch target
  - Canonicalize CONFIGURE_ARGS, with slave port specific overrides.
  - Verbosify builds (V=1)
  - Remove upstreamed patches
  - Add regression-test targets (requires TESTS option)
  - Add --disable-reduce-exports to CONFIGURE_ARGS until upstream PR #5819
    lands, which caused sanity test failure at run-time [1]

    P.S We now pass the test suite (not including python test, which
        has an error)

  Based on patch Submitted by:

   - Andriy Voskoboinyk  <s3erios gmail.com>
   - Robert Backhaus <robbak gmail.com>

  [1] https://github.com/bitcoin/bitcoin/pull/5819

  PR:		193424
  Reviewed by:	maintainer
  Approved by:	maintainer

Changes:
  head/UPDATING
  head/net-p2p/Makefile
  head/net-p2p/bitcoin/Makefile
  head/net-p2p/bitcoin/distinfo
  head/net-p2p/bitcoin/files/patch-Makefile_include_editSedCommands.patch
  head/net-p2p/bitcoin/files/patch-memenv.cc_enable_limit_macros
  head/net-p2p/bitcoin/files/patch-qt_makefile_am_editSedCommands.patch
  head/net-p2p/bitcoin-daemon/Makefile
  head/net-p2p/bitcoin-utils/
  head/net-p2p/bitcoin-utils/Makefile
Comment 22 Kubilay Kocak freebsd_committer freebsd_triage 2015-02-24 11:19:04 UTC
Committed, with major changes. Thank you Andriy and Robert :)
Comment 23 James Morrison 2015-03-19 01:45:34 UTC
I'm trying to install bitcoin-daemon so i can run a full node but I can't have bitcoin-utils installed at the same time. bitcoin-utils contains bitcoin-cli which is useful to query the bitcoind (bitcoin-cli getinfo). If I try and pkg install bitcoin-daemon it removes bitcoin-utils and vice versa.

Am I doing something wrong or is this intended behaviour ?
Comment 24 robbak 2015-03-19 01:57:46 UTC
(In reply to James Morrison from comment #23)
You want both bitcoin-daemon and bitcoin-utils installed. The system is supposed to allow this. If it is preventing you, what reason is it giving?

If there is a conflict with the binary bin/test_bitcoin, then that was unintentional, and would be fixed by disabling the TESTS option on one of the ports.
Comment 25 James Morrison 2015-03-19 11:24:16 UTC
(In reply to robbak from comment #24)

thanks for the quick reply. thats what i thought. heres the output when trying to install both :

pkg install bitcoin-daemon bitcoin-utils 

Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (1 conflicting)
pkg: Cannot solve problem using SAT solver:
conflict rule: The following packages conflict with each other: bitcoin-daemon-0.10.0_1(r), bitcoin-utils-0.10.0_1(r)
conflict rule: The following packages conflict with each other: bitcoin-daemon-0.10.0_1(r), bitcoin-daemon-0.10.0_1(r)
cannot install package bitcoin-daemon, remove it from request? [Y/n]: n
pkg: cannot solve job using SAT solver