Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/bitcoind/
Date: Sun, 07 Feb 2021 09:03:46
Message-Id: 1612688615.8dc85a9821d293c08215c0dee822ddd07cbbff31.juippis@gentoo
1 commit: 8dc85a9821d293c08215c0dee822ddd07cbbff31
2 Author: Luke Dashjr <luke-jr+git <AT> utopios <DOT> org>
3 AuthorDate: Mon Feb 1 01:41:08 2021 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 7 09:03:35 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8dc85a98
7
8 net-p2p/bitcoind: Bump to 0.21.0
9
10 Signed-off-by: Luke Dashjr <luke-jr+git <AT> utopios.org>
11 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
12
13 net-p2p/bitcoind/Manifest | 2 +
14 net-p2p/bitcoind/bitcoind-0.21.0.ebuild | 173 ++++++++++++++++++++++++++++++++
15 2 files changed, 175 insertions(+)
16
17 diff --git a/net-p2p/bitcoind/Manifest b/net-p2p/bitcoind/Manifest
18 index 16d898727cf..59fde979bce 100644
19 --- a/net-p2p/bitcoind/Manifest
20 +++ b/net-p2p/bitcoind/Manifest
21 @@ -1,2 +1,4 @@
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-v0.20.1.tar.gz 6986090 BLAKE2B ef0e6c424bcb7ffe9a2461e60499cebdfcd13faa794d534b4c508a61fa218dd58e64c9088584ea658736deeadc0306fbdf08daa3c395dac3d8f096a08ba42262 SHA512 73a103d4192eb12abed5aa84e9c7999d57e4da37f32e54107ab9f4297a29af64c0c56930674559073bed360f794d87ba5eb9e1ce4d1bd03402d56937490fa16e
25 +DIST bitcoin-v0.21.0.tar.gz 7533957 BLAKE2B 01247cbb9fca2381a8c08ab1c88c479c640963caef22e4207aab46b05813dbf2a5286ac9e98132fb34db0e9ac6c18c79e45a89de166f5c6d480d8ac6e14ecca2 SHA512 c58187996932b0151432a65885b7e8a7b216fb1ab0576fb7d4b5e9620d957594b05e181153e2e0e50bcd5ce764861ec11019ffbb1095d3e704f441e61ac6a04f
26
27 diff --git a/net-p2p/bitcoind/bitcoind-0.21.0.ebuild b/net-p2p/bitcoind/bitcoind-0.21.0.ebuild
28 new file mode 100644
29 index 00000000000..deccb3a88fd
30 --- /dev/null
31 +++ b/net-p2p/bitcoind/bitcoind-0.21.0.ebuild
32 @@ -0,0 +1,173 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +DB_VER="4.8"
39 +inherit autotools bash-completion-r1 db-use systemd
40 +
41 +BITCOINCORE_COMMITHASH="95ea54ba089610019a74c1176a2c7c0dba144b1c"
42 +KNOTS_PV="${PV}.knots20210130"
43 +KNOTS_P="bitcoin-${KNOTS_PV}"
44 +
45 +DESCRIPTION="Original Bitcoin crypto-currency wallet for automated services"
46 +HOMEPAGE="https://bitcoincore.org/ https://bitcoinknots.org/"
47 +SRC_URI="
48 + https://github.com/bitcoin/bitcoin/archive/${BITCOINCORE_COMMITHASH}.tar.gz -> bitcoin-v${PV}.tar.gz
49 + https://bitcoinknots.org/files/0.21.x/${KNOTS_PV}/${KNOTS_P}.patches.txz -> ${KNOTS_P}.patches.tar.xz
50 +"
51 +
52 +LICENSE="MIT"
53 +SLOT="0"
54 +KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
55 +IUSE="+asm examples knots +sqlite system-leveldb test upnp +wallet zeromq"
56 +RESTRICT="!test? ( test )"
57 +
58 +DEPEND="
59 + acct-group/bitcoin
60 + acct-user/bitcoin
61 + >=dev-libs/boost-1.58.0:=[threads(+)]
62 + dev-libs/libevent:=
63 + >dev-libs/libsecp256k1-0.1_pre20200911:=[recovery,schnorr]
64 + >=dev-libs/univalue-1.0.4:=
65 + system-leveldb? ( virtual/bitcoin-leveldb )
66 + sqlite? ( >=dev-db/sqlite-3.7.17:= )
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 +BDEPEND="
73 + >=sys-devel/autoconf-2.69
74 + >=sys-devel/automake-1.13
75 +"
76 +
77 +DOCS=(
78 + doc/bips.md
79 + doc/bitcoin-conf.md
80 + doc/descriptors.md
81 + doc/files.md
82 + doc/JSON-RPC-interface.md
83 + doc/psbt.md
84 + doc/reduce-traffic.md
85 + doc/release-notes.md
86 + doc/REST-interface.md
87 + doc/tor.md
88 +)
89 +
90 +S="${WORKDIR}/bitcoin-${BITCOINCORE_COMMITHASH}"
91 +
92 +pkg_pretend() {
93 + if use knots; then
94 + elog "You are building ${PN} from Bitcoin Knots."
95 + elog "For more information, see:"
96 + elog "https://bitcoinknots.org/files/0.21.x/${KNOTS_PV}/${KNOTS_P}.desc.html"
97 + else
98 + elog "You are building ${PN} from Bitcoin Core."
99 + elog "For more information, see:"
100 + elog "https://bitcoincore.org/en/2021/01/14/release-${PV}/"
101 + fi
102 + elog "Replace By Fee policy is now always enabled by default: Your node will"
103 + elog "preferentially mine and relay transactions paying the highest fee, regardless"
104 + elog "of receive order. To disable RBF, set mempoolreplacement=never in bitcoin.conf"
105 +}
106 +
107 +src_prepare() {
108 + sed -i 's/^\(complete -F _bitcoind bitcoind\) bitcoin-qt$/\1/' contrib/${PN}.bash-completion || die
109 +
110 + local knots_patchdir="${WORKDIR}/${KNOTS_P}.patches/"
111 +
112 + eapply "${knots_patchdir}/${KNOTS_P}.syslibs.patch"
113 +
114 + if use knots; then
115 + eapply "${knots_patchdir}/${KNOTS_P}.f.patch"
116 + eapply "${knots_patchdir}/${KNOTS_P}.branding.patch"
117 + eapply "${knots_patchdir}/${KNOTS_P}.ts.patch"
118 + fi
119 +
120 + default
121 +
122 + echo '#!/bin/true' >share/genbuild.sh || die
123 + mkdir -p src/obj || die
124 + echo "#define BUILD_SUFFIX gentoo${PVR#${PV}}" >src/obj/build.h || die
125 +
126 + eautoreconf
127 + rm -r src/secp256k1 || die
128 + if use system-leveldb; then
129 + rm -r src/leveldb || die
130 + fi
131 +}
132 +
133 +src_configure() {
134 + local my_econf=(
135 + $(use_enable asm)
136 + --without-qtdbus
137 + --without-qrencode
138 + $(use_with upnp miniupnpc)
139 + $(use_enable upnp upnp-default)
140 + $(use_enable test tests)
141 + $(use_enable wallet)
142 + $(use_enable zeromq zmq)
143 + --with-daemon
144 + --disable-util-cli
145 + --disable-util-tx
146 + --disable-util-wallet
147 + --disable-bench
148 + --without-libs
149 + --without-gui
150 + --disable-fuzz
151 + --disable-ccache
152 + --disable-static
153 + $(use_with sqlite)
154 + $(use_with system-leveldb)
155 + --with-system-libsecp256k1
156 + --with-system-univalue
157 + )
158 + econf "${my_econf[@]}"
159 +}
160 +
161 +src_install() {
162 + default
163 +
164 + if use test; then
165 + rm -f "${ED}/usr/bin/test_bitcoin" || die
166 + fi
167 +
168 + insinto /etc/bitcoin
169 + newins "${FILESDIR}/bitcoin.conf" bitcoin.conf
170 + fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf
171 + fperms 600 /etc/bitcoin/bitcoin.conf
172 +
173 + newconfd "contrib/init/bitcoind.openrcconf" ${PN}
174 + newinitd "contrib/init/bitcoind.openrc" ${PN}
175 + systemd_newunit "contrib/init/bitcoind.service" "bitcoind.service"
176 +
177 + keepdir /var/lib/bitcoin/.bitcoin
178 + fperms 700 /var/lib/bitcoin
179 + fowners bitcoin:bitcoin /var/lib/bitcoin/
180 + fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin
181 + dosym ../../../../etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf
182 +
183 + doman "${FILESDIR}/bitcoin.conf.5"
184 +
185 + use zeromq && dodoc doc/zmq.md
186 +
187 + newbashcomp contrib/${PN}.bash-completion ${PN}
188 +
189 + if use examples; then
190 + docinto examples
191 + dodoc -r contrib/{linearize,qos}
192 + use zeromq && dodoc -r contrib/zmq
193 + fi
194 +
195 + insinto /etc/logrotate.d
196 + newins "${FILESDIR}/bitcoind.logrotate-r1" bitcoind
197 +}
198 +
199 +pkg_postinst() {
200 + elog "To have ${PN} automatically use Tor when it's running, be sure your"
201 + elog "'torrc' config file has 'ControlPort' and 'CookieAuthentication' setup"
202 + elog "correctly, and:"
203 + elog "- Using an init script: add the 'bitcoin' user to the 'tor' user group."
204 + elog "- Running bitcoind directly: add that user to the 'tor' user group."
205 +}