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: Sun, 11 Jul 2021 14:42:03
Message-Id: 1626014515.7eda252dbf39643c627a4a4f89c29771e04d2115.candrews@gentoo
1 commit: 7eda252dbf39643c627a4a4f89c29771e04d2115
2 Author: Craig Andrews <candrews <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 10 22:04:47 2021 +0000
4 Commit: Craig Andrews <candrews <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 11 14:41:55 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7eda252d
7
8 net-p2p/bitcoind: Bump to 0.21.1
9
10 Signed-off-by: Luke Dashjr <luke-jr+git <AT> utopios.org>
11 Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>
12
13 net-p2p/bitcoind/Manifest | 2 +
14 net-p2p/bitcoind/bitcoind-0.21.1.ebuild | 190 ++++++++++++++++++++++++++++++++
15 2 files changed, 192 insertions(+)
16
17 diff --git a/net-p2p/bitcoind/Manifest b/net-p2p/bitcoind/Manifest
18 index 59fde979bce..01ce4fdf2a1 100644
19 --- a/net-p2p/bitcoind/Manifest
20 +++ b/net-p2p/bitcoind/Manifest
21 @@ -1,4 +1,6 @@
22 DIST bitcoin-0.20.1.knots20200815.patches.tar.xz 413244 BLAKE2B bc8fd6bfe0454439ae514086ea3e728df4f1ba069d33f79b047049a1a4d18543334217f25607b738f7f2d1245f64e5289aed00473c94edf5d660e0953e4d6b93 SHA512 98468f4f22d5b9d35c616796aa5a8fda20f775606f0cd4927b3b822dd5afd0fc208c23136306f79d01dbfd532b14a5905a8fb60a2d171d5022d2008772cf7b58
23 DIST bitcoin-0.21.0.knots20210130.patches.tar.xz 505040 BLAKE2B c8999de4158b8781bba6ad014ae14859f1e0bab3080c59a18910cf7447eb56da4b17a0e1843fdd3669d22636df9e4ddcc4526e4293bfd86dc884983a29a5f76c SHA512 7ee27da3d26be0e93ecddff7bb21ef1746bcdb07f9a2b0ea48065367b4c44391e974e04a21e511c05fca8f55971ab8e3c3ac01a3775cc52a537d9e10966d9871
24 +DIST bitcoin-0.21.1.knots20210629.patches.tar.xz 623916 BLAKE2B c6b669270b7f9718c8452a1c28280b6005edee299a3ab8d754dbf722d021576871ddce200342bf157dd5158c058686aa3dde913970779d8c2e560b8df772821c SHA512 ba058554453efc7ad036b8cc945ba403a6bd4e30dae0fbcee7fbe2f0ce90854a867fe49b0522595c081930d406bdf56987982f403fc8299b3c776eea4672abae
25 DIST bitcoin-v0.20.1.tar.gz 6986090 BLAKE2B ef0e6c424bcb7ffe9a2461e60499cebdfcd13faa794d534b4c508a61fa218dd58e64c9088584ea658736deeadc0306fbdf08daa3c395dac3d8f096a08ba42262 SHA512 73a103d4192eb12abed5aa84e9c7999d57e4da37f32e54107ab9f4297a29af64c0c56930674559073bed360f794d87ba5eb9e1ce4d1bd03402d56937490fa16e
26 DIST bitcoin-v0.21.0.tar.gz 7533957 BLAKE2B 01247cbb9fca2381a8c08ab1c88c479c640963caef22e4207aab46b05813dbf2a5286ac9e98132fb34db0e9ac6c18c79e45a89de166f5c6d480d8ac6e14ecca2 SHA512 c58187996932b0151432a65885b7e8a7b216fb1ab0576fb7d4b5e9620d957594b05e181153e2e0e50bcd5ce764861ec11019ffbb1095d3e704f441e61ac6a04f
27 +DIST bitcoin-v0.21.1.tar.gz 7635092 BLAKE2B 83610537c3cf6a11a1f59b92085b7a99fb22013ead1c6dce0c8f3182b69b11be6801f1f3b35bf31d72cfc15c76b6a69f1e6f3b754ff179565c0a687d16a35a48 SHA512 648739df8f360609d7b562e0bbfb3ab852eb6c538aa33ef56f71e7652ee766648ee8782aadeed1def1f2174d3330bbbdf9b1eee5090ca292e8d4a46c1b7f5c46
28
29 diff --git a/net-p2p/bitcoind/bitcoind-0.21.1.ebuild b/net-p2p/bitcoind/bitcoind-0.21.1.ebuild
30 new file mode 100644
31 index 00000000000..fc4654fa3b9
32 --- /dev/null
33 +++ b/net-p2p/bitcoind/bitcoind-0.21.1.ebuild
34 @@ -0,0 +1,190 @@
35 +# Copyright 1999-2021 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
42 +
43 +BITCOINCORE_COMMITHASH="194b9b8792d9b0798fdb570b79fa51f1d1f5ebaf"
44 +KNOTS_PV="${PV}.knots20210629"
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.21.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 +berkdb examples knots sqlite +system-leveldb test upnp +wallet zeromq"
58 +RESTRICT="!test? ( test )"
59 +
60 +REQUIRED_USE="
61 + sqlite? ( wallet )
62 + berkdb? ( wallet )
63 + wallet? ( || ( berkdb sqlite ) )
64 +"
65 +DEPEND="
66 + acct-group/bitcoin
67 + acct-user/bitcoin
68 + >=dev-libs/boost-1.58.0:=[threads(+)]
69 + dev-libs/libevent:=
70 + >dev-libs/libsecp256k1-0.1_pre20200911:=[recovery,schnorr]
71 + >=dev-libs/univalue-1.0.4:=
72 + system-leveldb? ( virtual/bitcoin-leveldb )
73 + sqlite? ( >=dev-db/sqlite-3.7.17:= )
74 + upnp? ( >=net-libs/miniupnpc-1.9.20150916:= )
75 + berkdb? ( sys-libs/db:$(db_ver_to_slot "${DB_VER}")=[cxx] )
76 + zeromq? ( net-libs/zeromq:= )
77 +"
78 +RDEPEND="${DEPEND}"
79 +BDEPEND="
80 + >=sys-devel/autoconf-2.69
81 + >=sys-devel/automake-1.13
82 +"
83 +
84 +DOCS=(
85 + doc/bips.md
86 + doc/bitcoin-conf.md
87 + doc/descriptors.md
88 + doc/files.md
89 + doc/JSON-RPC-interface.md
90 + doc/psbt.md
91 + doc/reduce-traffic.md
92 + doc/release-notes.md
93 + doc/REST-interface.md
94 + doc/tor.md
95 +)
96 +
97 +S="${WORKDIR}/bitcoin-${BITCOINCORE_COMMITHASH}"
98 +
99 +pkg_pretend() {
100 + if use knots; then
101 + elog "You are building ${PN} from Bitcoin Knots."
102 + elog "For more information, see:"
103 + elog "https://bitcoinknots.org/files/0.21.x/${KNOTS_PV}/${KNOTS_P}.desc.html"
104 + else
105 + elog "You are building ${PN} from Bitcoin Core."
106 + elog "For more information, see:"
107 + elog "https://bitcoincore.org/en/2021/05/01/release-${PV}/"
108 + fi
109 + elog
110 + elog "Replace By Fee policy is now always enabled by default: Your node will"
111 + elog "preferentially mine and relay transactions paying the highest fee, regardless"
112 + elog "of receive order. To disable RBF, set mempoolreplacement=never in bitcoin.conf"
113 + if has_version "<${CATEGORY}/${PN}-0.21.1" ; then
114 + ewarn "CAUTION: BITCOIN PROTOCOL CHANGE INCLUDED"
115 + ewarn "This release adds enforcement of the Taproot protocol change to the Bitcoin"
116 + ewarn "rules, beginning in November. Protocol changes require user consent to be"
117 + ewarn "effective, and if enforced inconsistently within the community may compromise"
118 + ewarn "your security or others! If you do not know what you are doing, learn more"
119 + ewarn "before November. (You must make a decision either way - simply not upgrading"
120 + ewarn "is insecure in all scenarios.)"
121 + ewarn "To learn more, see https://bitcointaproot.cc"
122 + fi
123 +}
124 +
125 +src_prepare() {
126 + sed -i 's/^\(complete -F _bitcoind bitcoind\) bitcoin-qt$/\1/' contrib/${PN}.bash-completion || die
127 +
128 + local knots_patchdir="${WORKDIR}/${KNOTS_P}.patches/"
129 +
130 + eapply "${knots_patchdir}/${KNOTS_P}.syslibs.patch"
131 +
132 + if use knots; then
133 + eapply "${knots_patchdir}/${KNOTS_P}.f.patch"
134 + eapply "${knots_patchdir}/${KNOTS_P}.branding.patch"
135 + eapply "${knots_patchdir}/${KNOTS_P}.ts.patch"
136 + fi
137 +
138 + default
139 +
140 + echo '#!/bin/true' >share/genbuild.sh || die
141 + mkdir -p src/obj || die
142 + echo "#define BUILD_SUFFIX gentoo${PVR#${PV}}" >src/obj/build.h || die
143 +
144 + eautoreconf
145 + rm -r src/secp256k1 || die
146 + if use system-leveldb; then
147 + rm -r src/leveldb || die
148 + fi
149 +}
150 +
151 +src_configure() {
152 + local my_econf=(
153 + $(use_enable asm)
154 + --without-qtdbus
155 + --without-qrencode
156 + $(use_with upnp miniupnpc)
157 + $(use_enable upnp upnp-default)
158 + $(use_enable test tests)
159 + $(use_enable wallet)
160 + $(use_enable zeromq zmq)
161 + --with-daemon
162 + --disable-util-cli
163 + --disable-util-tx
164 + --disable-util-wallet
165 + --disable-bench
166 + --without-libs
167 + --without-gui
168 + --disable-fuzz
169 + --disable-ccache
170 + --disable-static
171 + $(use_with berkdb bdb)
172 + $(use_with sqlite)
173 + $(use_with system-leveldb)
174 + --with-system-libsecp256k1
175 + --with-system-univalue
176 + )
177 + econf "${my_econf[@]}"
178 +}
179 +
180 +src_install() {
181 + default
182 +
183 + if use test; then
184 + rm -f "${ED}/usr/bin/test_bitcoin" || die
185 + fi
186 +
187 + insinto /etc/bitcoin
188 + newins "${FILESDIR}/bitcoin.conf" bitcoin.conf
189 + fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf
190 + fperms 600 /etc/bitcoin/bitcoin.conf
191 +
192 + newconfd "contrib/init/bitcoind.openrcconf" ${PN}
193 + newinitd "contrib/init/bitcoind.openrc" ${PN}
194 + systemd_newunit "contrib/init/bitcoind.service" "bitcoind.service"
195 +
196 + keepdir /var/lib/bitcoin/.bitcoin
197 + fperms 700 /var/lib/bitcoin
198 + fowners bitcoin:bitcoin /var/lib/bitcoin/
199 + fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin
200 + dosym ../../../../etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf
201 +
202 + doman "${FILESDIR}/bitcoin.conf.5"
203 +
204 + use zeromq && dodoc doc/zmq.md
205 +
206 + newbashcomp contrib/${PN}.bash-completion ${PN}
207 +
208 + if use examples; then
209 + docinto examples
210 + dodoc -r contrib/{linearize,qos}
211 + use zeromq && dodoc -r contrib/zmq
212 + fi
213 +
214 + insinto /etc/logrotate.d
215 + newins "${FILESDIR}/bitcoind.logrotate-r1" bitcoind
216 +}
217 +
218 +pkg_postinst() {
219 + elog "To have ${PN} automatically use Tor when it's running, be sure your"
220 + elog "'torrc' config file has 'ControlPort' and 'CookieAuthentication' setup"
221 + elog "correctly, and:"
222 + elog "- Using an init script: add the 'bitcoin' user to the 'tor' user group."
223 + elog "- Running bitcoind directly: add that user to the 'tor' user group."
224 +}