Gentoo Archives: gentoo-commits

From: Craig Andrews <candrews@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/bitcoind/
Date: Fri, 11 Jan 2019 21:39:01
Message-Id: 1547242695.799dde9c9c85df88a00ef6c070bacae96350c50e.candrews@gentoo
1 commit: 799dde9c9c85df88a00ef6c070bacae96350c50e
2 Author: Luke Dashjr <luke-jr+git <AT> utopios <DOT> org>
3 AuthorDate: Sat Dec 29 23:41:00 2018 +0000
4 Commit: Craig Andrews <candrews <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 11 21:38:15 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=799dde9c
7
8 net-p2p/bitcoind: Bump to 0.17.1
9
10 Closes: https://bugs.gentoo.org/672064
11 Signed-off-by: Luke Dashjr <luke-jr+git <AT> utopios.org>
12 Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>
13
14 net-p2p/bitcoind/Manifest | 2 +
15 net-p2p/bitcoind/bitcoind-0.17.1.ebuild | 164 ++++++++++++++++++++++++++++++++
16 net-p2p/bitcoind/metadata.xml | 1 +
17 3 files changed, 167 insertions(+)
18
19 diff --git a/net-p2p/bitcoind/Manifest b/net-p2p/bitcoind/Manifest
20 index 443491598dd..c3a90d5a2b6 100644
21 --- a/net-p2p/bitcoind/Manifest
22 +++ b/net-p2p/bitcoind/Manifest
23 @@ -1,2 +1,4 @@
24 DIST bitcoin-0.16.3.knots20180918.patches.tar.xz 466344 BLAKE2B c45b96513e4b6317e6a2a55cc3b47302fbe56fb87717ae0197010694013331b5d071b85a11a73c76f08f39e9f0294d3475e89ee63272047df83893de4dbaa390 SHA512 2c3540acc668aeef4b8f01774219736d95395201ddeaccaf70e0bad4a89f05cdd5ffaf630bae0577656efb3580fae92ce0ee4bb1a720ea757ca59e3fd66e1893
25 +DIST bitcoin-0.17.1.knots20181229.patches.tar.xz 475988 BLAKE2B ce19ccbbeaac48f24b2833858a186494f84cb54ac380c42104f4d16b0a6acb44bc7a83c1b11311e2c566326d7067530ea5f34404def5f22b4825e2fa15aca22d SHA512 da89f9510ee523c712aa137512dda752ab8d115eb8a45a999aa742555621f557694db34162a1f6979922268a3e22563883ea6d9d9a47e5c7613235c0ff06fda0
26 DIST bitcoin-v0.16.3.tar.gz 6658712 BLAKE2B 2c20b32ea30aed264115d1bd336b62fa28de69cbf116385508718efd7ff22537c3bd402c0965e0f6ddd8e79fc8b51f388f52f885847d36207a24523e927ca63e SHA512 2da25f56fe9b1f5a81815c14e70ff1a69ec15f742424e2c24d71303a71d57c8050dea5d5ba57425bbe0a01a3995ad9b30f0beea5dbafd1632a627cd3fd9a984d
27 +DIST bitcoin-v0.17.1.tar.gz 6224852 BLAKE2B efc86768ee2d23db83496ff9e62bc86d10c4d24a7343f4c706a4d336aeb94087b2d496db53e393beb5a9dc228bb9fe957ca89254c2fdaf9980b03029efbac2f8 SHA512 ef911ac6b49075a4f3d8db7f9f4dc59590d49847006fa36d7b8cce1634945d418accd95b12da505df38314fb7768f544863169d4b26b230e88dd627a83947466
28
29 diff --git a/net-p2p/bitcoind/bitcoind-0.17.1.ebuild b/net-p2p/bitcoind/bitcoind-0.17.1.ebuild
30 new file mode 100644
31 index 00000000000..71d8c912e3e
32 --- /dev/null
33 +++ b/net-p2p/bitcoind/bitcoind-0.17.1.ebuild
34 @@ -0,0 +1,164 @@
35 +# Copyright 1999-2019 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=7
39 +
40 +DB_VER="4.8"
41 +inherit autotools bash-completion-r1 db-use systemd user
42 +
43 +BITCOINCORE_COMMITHASH="ef70f9b52b851c7997a9f1a0834714e3eebc1fd8"
44 +KNOTS_PV="${PV}.knots20181229"
45 +KNOTS_P="bitcoin-${KNOTS_PV}"
46 +
47 +DESCRIPTION="Original Bitcoin crypto-currency wallet for automated services"
48 +HOMEPAGE="https://bitcoincore.org/ https://bitcoinknots.org/"
49 +SRC_URI="
50 + https://github.com/bitcoin/bitcoin/archive/${BITCOINCORE_COMMITHASH}.tar.gz -> bitcoin-v${PV}.tar.gz
51 + https://bitcoinknots.org/files/0.17.x/${KNOTS_PV}/${KNOTS_P}.patches.txz -> ${KNOTS_P}.patches.tar.xz
52 +"
53 +
54 +LICENSE="MIT"
55 +SLOT="0"
56 +KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
57 +IUSE="+asm +bitcoin_policy_rbf examples knots libressl +system-leveldb test upnp +wallet zeromq"
58 +
59 +DEPEND="
60 + >=dev-libs/boost-1.52.0:=[threads(+)]
61 + dev-libs/libevent:=
62 + >=dev-libs/libsecp256k1-0.0.0_pre20151118:=[recovery]
63 + >=dev-libs/univalue-1.0.4:=
64 + system-leveldb? ( virtual/bitcoin-leveldb )
65 + !libressl? ( dev-libs/openssl:0=[-bindist] )
66 + libressl? ( dev-libs/libressl:0= )
67 + upnp? ( >=net-libs/miniupnpc-1.9.20150916:= )
68 + wallet? ( sys-libs/db:$(db_ver_to_slot "${DB_VER}")=[cxx] )
69 + zeromq? ( net-libs/zeromq:= )
70 +"
71 +RDEPEND="${DEPEND}"
72 +
73 +DOCS=( doc/bips.md doc/descriptors.md doc/files.md doc/reduce-traffic.md doc/release-notes.md doc/REST-interface.md doc/tor.md )
74 +
75 +S="${WORKDIR}/bitcoin-${BITCOINCORE_COMMITHASH}"
76 +
77 +pkg_pretend() {
78 + if use knots; then
79 + elog "You are building ${PN} from Bitcoin Knots."
80 + elog "For more information, see:"
81 + elog "https://bitcoinknots.org/files/0.17.x/${KNOTS_PV}/${KNOTS_P}.desc.html"
82 + else
83 + elog "You are building ${PN} from Bitcoin Core."
84 + elog "For more information, see:"
85 + elog "https://bitcoincore.org/en/2018/12/25/release-${PV}/"
86 + fi
87 + if use bitcoin_policy_rbf; then
88 + elog "Replace By Fee policy is enabled: Your node will preferentially mine and"
89 + elog "relay transactions paying the highest fee, regardless of receive order."
90 + else
91 + elog "Replace By Fee policy is disabled: Your node will only accept the first"
92 + elog "transaction seen consuming a conflicting input, regardless of fee"
93 + elog "offered by later ones."
94 + fi
95 +}
96 +
97 +pkg_setup() {
98 + enewgroup bitcoin
99 + enewuser bitcoin -1 -1 /var/lib/bitcoin bitcoin
100 +}
101 +
102 +src_prepare() {
103 + sed -i 's/^\(complete -F _bitcoind bitcoind\) bitcoin-qt$/\1/' contrib/${PN}.bash-completion || die
104 +
105 + local knots_patchdir="${WORKDIR}/${KNOTS_P}.patches/"
106 +
107 + eapply "${knots_patchdir}/${KNOTS_P}.syslibs.patch"
108 +
109 + if use knots; then
110 + eapply "${knots_patchdir}/${KNOTS_P}.f.patch"
111 + eapply "${knots_patchdir}/${KNOTS_P}.branding.patch"
112 + eapply "${knots_patchdir}/${KNOTS_P}.ts.patch"
113 + fi
114 +
115 + eapply_user
116 +
117 + if ! use bitcoin_policy_rbf; then
118 + sed -i 's/\(DEFAULT_ENABLE_REPLACEMENT = \)true/\1false/' src/validation.h || die
119 + fi
120 +
121 + echo '#!/bin/true' >share/genbuild.sh || die
122 + mkdir -p src/obj || die
123 + echo "#define BUILD_SUFFIX gentoo${PVR#${PV}}" >src/obj/build.h || die
124 +
125 + eautoreconf
126 + if use system-leveldb; then
127 + rm -r src/leveldb src/secp256k1 || die
128 + fi
129 +}
130 +
131 +src_configure() {
132 + local my_econf=(
133 + $(use_enable asm)
134 + --without-qtdbus
135 + --without-qrencode
136 + $(use_with upnp miniupnpc)
137 + $(use_enable upnp upnp-default)
138 + $(use_enable test tests)
139 + $(use_enable wallet)
140 + $(use_enable zeromq zmq)
141 + --with-daemon
142 + --disable-util-cli
143 + --disable-util-tx
144 + --disable-bench
145 + --without-libs
146 + --without-gui
147 + --disable-ccache
148 + --disable-static
149 + $(use_with system-leveldb)
150 + --with-system-libsecp256k1
151 + --with-system-univalue
152 + )
153 + econf "${my_econf[@]}"
154 +}
155 +
156 +src_install() {
157 + default
158 +
159 + rm -f "${ED%/}/usr/bin/test_bitcoin" || die
160 +
161 + insinto /etc/bitcoin
162 + newins "${FILESDIR}/bitcoin.conf" bitcoin.conf
163 + fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf
164 + fperms 600 /etc/bitcoin/bitcoin.conf
165 +
166 + newconfd "contrib/init/bitcoind.openrcconf" ${PN}
167 + newinitd "contrib/init/bitcoind.openrc" ${PN}
168 + systemd_newunit "contrib/init/bitcoind.service" "bitcoind.service"
169 +
170 + keepdir /var/lib/bitcoin/.bitcoin
171 + fperms 700 /var/lib/bitcoin
172 + fowners bitcoin:bitcoin /var/lib/bitcoin/
173 + fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin
174 + dosym ../../../../etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf
175 +
176 + doman "${FILESDIR}/bitcoin.conf.5"
177 +
178 + use zeromq && dodoc doc/zmq.md
179 +
180 + newbashcomp contrib/${PN}.bash-completion ${PN}
181 +
182 + if use examples; then
183 + docinto examples
184 + dodoc -r contrib/{linearize,qos,tidy_datadir.sh}
185 + use zeromq && dodoc -r contrib/zmq
186 + fi
187 +
188 + insinto /etc/logrotate.d
189 + newins "${FILESDIR}/bitcoind.logrotate-r1" bitcoind
190 +}
191 +
192 +pkg_postinst() {
193 + elog "To have ${PN} automatically use Tor when it's running, be sure your"
194 + elog "'torrc' config file has 'ControlPort' and 'CookieAuthentication' setup"
195 + elog "correctly, and:"
196 + elog "- Using an init script: add the 'bitcoin' user to the 'tor' user group."
197 + elog "- Running bitcoind directly: add that user to the 'tor' user group."
198 +}
199
200 diff --git a/net-p2p/bitcoind/metadata.xml b/net-p2p/bitcoind/metadata.xml
201 index 91b80520930..6283c9d733c 100644
202 --- a/net-p2p/bitcoind/metadata.xml
203 +++ b/net-p2p/bitcoind/metadata.xml
204 @@ -13,6 +13,7 @@
205 <flag name="asm">Enable assembly for optimization</flag>
206 <flag name="bitcoin_policy_rbf">Replace By Fee policy: Your node will preferentially mine and relay transactions paying the highest fee, regardless of receive order</flag>
207 <flag name="knots">Build enhanced Bitcoin Knots version, rather than Bitcoin Core</flag>
208 + <flag name="system-leveldb">Use the system-wide dev-libs/leveldb instead of bundled</flag>
209 <flag name="upnp">Enable Universal Plug and Play</flag>
210 <flag name="wallet">Enable wallet support</flag>
211 <flag name="zeromq">Report blocks and transactions via zeromq</flag>