From 2000f81da4dc9971f6e1e5d00b315816d4188f4c Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 25 Oct 2023 14:40:37 +0100 Subject: gentoo auto-resync : 25:10:2023 - 14:40:37 --- net-p2p/Manifest.gz | Bin 6914 -> 6922 bytes net-p2p/bitcoin-cli/Manifest | 2 +- net-p2p/bitcoin-cli/bitcoin-cli-25.1.ebuild | 2 +- net-p2p/bitcoin-core/Manifest | 4 +- net-p2p/bitcoin-core/bitcoin-core-25.1-r1.ebuild | 397 +++++++++++++++++++++++ net-p2p/bitcoin-core/bitcoin-core-25.1.ebuild | 340 ------------------- net-p2p/bitcoin-core/metadata.xml | 5 +- net-p2p/bitcoin-qt/Manifest | 2 +- net-p2p/bitcoin-qt/bitcoin-qt-25.1.ebuild | 4 +- net-p2p/bitcoind/Manifest | 2 +- net-p2p/bitcoind/bitcoind-25.1.ebuild | 2 +- 11 files changed, 409 insertions(+), 351 deletions(-) create mode 100644 net-p2p/bitcoin-core/bitcoin-core-25.1-r1.ebuild delete mode 100644 net-p2p/bitcoin-core/bitcoin-core-25.1.ebuild (limited to 'net-p2p') diff --git a/net-p2p/Manifest.gz b/net-p2p/Manifest.gz index f00f1f8beafd..05eb82a6a125 100644 Binary files a/net-p2p/Manifest.gz and b/net-p2p/Manifest.gz differ diff --git a/net-p2p/bitcoin-cli/Manifest b/net-p2p/bitcoin-cli/Manifest index 5b2a10bdbe2d..fd9adc9d1288 100644 --- a/net-p2p/bitcoin-cli/Manifest +++ b/net-p2p/bitcoin-cli/Manifest @@ -1,2 +1,2 @@ -EBUILD bitcoin-cli-25.1.ebuild 373 BLAKE2B 5da7609dd849bdb9cac2f39886b35653505ecfcc652860fe4a92f2f1391592b8d73a705b9e0a2eda0bd2d50c49d1e5acb9eacb5017298ec2076ef6ab0fb2b5e8 SHA512 274ae5e9e6d8617d367e00943636993dfe07c9b8b8b940ba8a589dd15e957afc4e33cddd68ee7c4b0cd15c00ec0bc7ee2eb99718253c30880c9f78da9807d0be +EBUILD bitcoin-cli-25.1.ebuild 373 BLAKE2B ae2ef339207886de65307f3c95e220361b7f14b576da53f4bfef6ca5118883dddbb417161a1a312c80757754920eacb9ee3e7052f5b96b2e44549a1e6012cb74 SHA512 9327881780ee706ad66abc1af4a9a1487028217e7bbced977a238f0aed713d24669464613b8cb63aff21dbaee8a57dd00c89477f89326cb478482166f9584191 MISC metadata.xml 688 BLAKE2B cb000a96069fc03cfdbf6c724a51dcb378b6d1f05bb4b06da065d52af2e71f1293b5cad7ee805871e3d377df6a93f44650059deb1f398e5f54c076713b119e94 SHA512 886f87c7bfc2049959e16f7233f1208649f66d9597e713296c8510081c4db02562df4eae9376e37c4978c7d06f17fdbacbcf6c14d594f40aec6a6b2751a9cc84 diff --git a/net-p2p/bitcoin-cli/bitcoin-cli-25.1.ebuild b/net-p2p/bitcoin-cli/bitcoin-cli-25.1.ebuild index 81c2ad58ef7c..825014256779 100644 --- a/net-p2p/bitcoin-cli/bitcoin-cli-25.1.ebuild +++ b/net-p2p/bitcoin-cli/bitcoin-cli-25.1.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 DESCRIPTION="Transitional package for net-p2p/bitcoin-core[bitcoin-cli]" HOMEPAGE="https://bitcoincore.org/" diff --git a/net-p2p/bitcoin-core/Manifest b/net-p2p/bitcoin-core/Manifest index 9787b11a50cf..ca83748db539 100644 --- a/net-p2p/bitcoin-core/Manifest +++ b/net-p2p/bitcoin-core/Manifest @@ -5,5 +5,5 @@ AUX bitcoind.openrc 2690 BLAKE2B ef44f88f5d03e488ba4793954ff22949fdb293fac64c426 AUX init.patch 1472 BLAKE2B 5974542d0890234ccb2cbbcbe022c45c94e5f0235ebb3b7cee3e2e6d61b9e45d7ec31c2ae7c560d38654fda3b6b7e6c4193b02985fe65502a26cb7bc3641dd8f SHA512 b303fa6adecc0d5aac6a9b78d0ab5d4df797e3af80568a0c08ba2b06296a80b9d5cb7e5b1e9af1fb0c83ad5d6e026fec492dfaee7fba56883325ee64f2b78840 AUX org.bitcoin.bitcoin-qt.desktop 465 BLAKE2B 7ce8818cd967e478e6d41106b7111616b81856ae83db742ee53a28dde203cc6a2230daa562c78e7b59d1014bfe1633b4074685acb404966b2b9649c22c356262 SHA512 4f9e20094a6fb99dc47a799c9fd752d328efa2539aaab2230f9225cb80f8889fa7a28e1277694d04db72f7a052d208d6a208671dd3d0c77a9ec9d7a95169f148 DIST bitcoin-25.1.tar.gz 12498596 BLAKE2B e8e4ea99cb40db420033c4df75e985af93cbb64f9862376e2de1a0731b4aeafbf43a95b33770e882ad77b73e454d48dbd5744902c78ade2b965e3d2d4e4b4656 SHA512 310e5d976a062496d2b99d0e64c4d5d2b536a747901e887f85b75151d94237f0de800163b534c812d390eb5e93b3f7284cd7f71843ec35e891f34634b6b142ab -EBUILD bitcoin-core-25.1.ebuild 10362 BLAKE2B a7f67d055ac6a301152c560577baa2a0c6778865188dff77e11829a5e8a93b6be52780d4f5c0ea073496245f896442dec8399ffd0ee93e9e0fd91e00df2abc70 SHA512 0bc7582aae46faa7ac4b967d6bbc164246b22416315ce6786b42bcca7dea00f6c4e456c372f430b71cd21afa74eb978eb5112c623af9f1322784f18670cd312c -MISC metadata.xml 1630 BLAKE2B 0e76ab08d978f6e5f5514806bb7712d3ed2a051c96b94d40fa980ec4f904095c469534a148a54c752fe98128849526ab7a0233bcaaeb1c03c91db171409f762a SHA512 a0be2eb6aeb79995f133d94eae5fef6b700f7150b0a8b3d375e8b34f190ac9993e573256ba9fb9cc7d23401f5f281567f9cf1e64c55b4685cfda059a6c98fdf9 +EBUILD bitcoin-core-25.1-r1.ebuild 12482 BLAKE2B 5205f70e05e80ab89bd617c6046ce6f08e53d3c068a46e7535e25bd04dbb3c53f10609182601beb3093d126f45442b71c8197cd3925af0633136b9c4715fefb7 SHA512 f83c0bf1657e0ff3a84977cc2178e18f08ef9812cc0882a194b91636496fea6021ba6f97b0ea1387baf89e38e4c24d6f44da9d355280b623a25118de64cc0218 +MISC metadata.xml 1711 BLAKE2B c8756ad1f01cde5e3c22cf2b62b3b905248cbd7f6121e77dcd45039163ed3954ce323c5ceb0c863e5394c0ecdf8828a8234ea137c6a350eca8c200bf92897e7d SHA512 fd9ac5a2e636acbddf72fd759a2366efefb178634667ab03a8db8d718169c2bd87b18b742cd62c4951a8230161ba9c19d7b46fa6fcdc96e714f20bf5c495d804 diff --git a/net-p2p/bitcoin-core/bitcoin-core-25.1-r1.ebuild b/net-p2p/bitcoin-core/bitcoin-core-25.1-r1.ebuild new file mode 100644 index 000000000000..4d55cae08417 --- /dev/null +++ b/net-p2p/bitcoin-core/bitcoin-core-25.1-r1.ebuild @@ -0,0 +1,397 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit autotools bash-completion-r1 check-reqs db-use desktop edo multiprocessing python-any-r1 systemd xdg-utils + +DESCRIPTION="Reference implementation of the Bitcoin cryptocurrency" +HOMEPAGE="https://bitcoincore.org/" +SRC_URI="https://bitcoincore.org/bin/${P}/${P/-core}.tar.gz" +S="${WORKDIR}/${P/-core}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux" +# IUSE="+cli" doesn't work due to https://bugs.gentoo.org/831045#c3 +IUSE="+asm +berkdb +bitcoin-cli +daemon dbus examples +external-signer gui kde libs +man nat-pmp +qrcode +sqlite system-leveldb +system-libsecp256k1 systemtap test upnp zeromq" +RESTRICT="!test? ( test )" + +REQUIRED_USE=" + dbus? ( gui ) + kde? ( gui ) + qrcode? ( gui ) + system-leveldb? ( || ( daemon gui ) ) +" +# dev-libs/univalue is now bundled, as upstream dropped support for system copy +# and their version in the Bitcoin repo has deviated a fair bit from upstream. +# Upstream also seems very inactive. +RDEPEND=" + !=dev-libs/boost-1.81.0:= + >=dev-libs/libevent-2.1.12:= + berkdb? ( >=sys-libs/db-4.8.30:$(db_ver_to_slot 4.8)=[cxx] ) + bitcoin-cli? ( !=dev-qt/qtcore-5.15.5:5 + >=dev-qt/qtgui-5.15.5:5 + >=dev-qt/qtnetwork-5.15.5:5 + >=dev-qt/qtwidgets-5.15.5:5 + dbus? ( >=dev-qt/qtdbus-5.15.5:5 ) + ) + libs? ( !=net-libs/libnatpmp-20220705:= ) + qrcode? ( >=media-gfx/qrencode-4.1.1:= ) + sqlite? ( >=dev-db/sqlite-3.38.5:= ) + system-leveldb? ( virtual/bitcoin-leveldb ) + system-libsecp256k1? ( >=dev-libs/libsecp256k1-0.3.1:=[recovery,schnorr] ) + upnp? ( >=net-libs/miniupnpc-2.2.2:= ) + zeromq? ( >=net-libs/zeromq-4.3.4:= ) +" +DEPEND=" + ${RDEPEND} + systemtap? ( >=dev-util/systemtap-4.8 ) +" +BDEPEND=" + virtual/pkgconfig + daemon? ( + acct-group/bitcoin + acct-user/bitcoin + ) + gui? ( >=dev-qt/linguist-tools-5.15.5:5 ) + test? ( ${PYTHON_DEPS} ) +" +IDEPEND=" + gui? ( dev-util/desktop-file-utils ) +" + +DOCS=( + doc/bips.md + doc/bitcoin-conf.md + doc/descriptors.md + doc/files.md + doc/i2p.md + doc/JSON-RPC-interface.md + doc/multisig-tutorial.md + doc/p2p-bad-ports.md + doc/psbt.md + doc/reduce-memory.md + doc/reduce-traffic.md + doc/release-notes.md + doc/REST-interface.md + doc/tor.md +) + +PATCHES=( + "${FILESDIR}/25.0-syslibs.patch" + "${FILESDIR}/init.patch" +) + +efmt() { + : ${1:?} ; local l ; while read -r l ; do "${!#}" "${l}" ; done < <(fmt "${@:1:$#-1}") +} + +pkg_pretend() { + if ! use daemon && ! use gui && ! has_version "${CATEGORY}/${PN}[-daemon,-gui(-),-qt5(-)]" ; then + efmt ewarn <<-EOF + You are enabling neither USE="daemon" nor USE="gui". This is a valid + configuration, but you will be unable to run a Bitcoin node using this + installation. + EOF + fi + if use daemon && ! use bitcoin-cli && ! has_version "${CATEGORY}/${PN}[daemon,-bitcoin-cli]" ; then + efmt ewarn <<-EOF + You are enabling USE="daemon" but not USE="bitcoin-cli". This is a valid + configuration, but you will be unable to interact with your bitcoind node + via the command line using this installation. + EOF + fi + if ! use berkdb && ! use sqlite && + { { use daemon && ! has_version "${CATEGORY}/${PN}[daemon,-berkdb,-sqlite]" ; } || + { use gui && ! has_version "${CATEGORY}/${PN}[gui,-berkdb,-sqlite]" ; } ; } + then + efmt ewarn <<-EOF + You are enabling neither USE="berkdb" nor USE="sqlite". This is a valid + configuration, but your Bitcoin node will be unable to open any wallets. + EOF + fi + + # test/functional/feature_pruning.py requires 4 GB disk space + # test/functional/wallet_pruning.py requires 1.3 GB disk space + use test && CHECKREQS_DISK_BUILD="6G" check-reqs_pkg_pretend +} + +pkg_setup() { + if use test ; then + CHECKREQS_DISK_BUILD="6G" check-reqs_pkg_setup + python-any-r1_pkg_setup + fi +} + +src_prepare() { + default + ! use system-leveldb || rm -r src/leveldb || die + if use system-libsecp256k1 ; then + rm -r src/secp256k1 || die + sed -e '/^DIST_SUBDIRS *=/s/\bsecp256k1\b//' -i src/Makefile.am || die + else + pushd src/secp256k1 >/dev/null || die + AT_NOELIBTOOLIZE=yes eautoreconf + popd >/dev/null || die + fi + eautoreconf + + # we say --disable-util-util, so we can't test bitcoin-util + sed -ne '/^ {/{h;:0;n;H;/^ }/!b0;g;\|"exec": *"\./bitcoin-util"|d};p' \ + -i test/util/data/bitcoin-util-test.json || die + + sed -e 's/^\(complete -F _bitcoind\b\).*$/\1'"$(usev daemon ' bitcoind')$(usev gui ' bitcoin-qt')/" \ + -i contrib/completions/bash/bitcoind.bash-completion || die +} + +src_configure() { + local wallet ; if use berkdb || use sqlite ; then wallet=enable ; else wallet=disable ; fi + local myeconfargs=( + --disable-static + --${wallet}-wallet + $(use_with sqlite) + $(use_with berkdb bdb) + $(use_enable systemtap usdt) + $(use_with upnp miniupnpc) + $(use_with nat-pmp natpmp) + $(use_enable test tests) + --disable-bench + --disable-fuzz{,-binary} + $(use_with qrcode qrencode) + --disable-ccache + $(use_enable asm) + $(use_enable zeromq zmq) + $(use_enable man) + $(use_enable external-signer) + --with-utils + $(use_enable {bitcoin,util}-cli) + --enable-util-tx + --${wallet}-util-wallet + --disable-util-util + # syscall sandbox is missing faccessat2 and pselect6, causing bitcoind to crash during tests; + # removed upstream for 26.0 in https://github.com/bitcoin/bitcoin/commit/32e2ffc39374f61bb2435da507f285459985df9e + --without-seccomp + $(use_with libs) + $(use_with daemon) + $(use_with gui gui qt5) + $(use_with dbus qtdbus) + $(use_with system-leveldb) + $(use_with system-libsecp256k1) + ) + econf "${myeconfargs[@]}" +} + +src_test() { + emake check + + use daemon && edo "${PYTHON}" test/functional/test_runner.py \ + --ansi --extended --jobs="$(get_makeopts_jobs)" --timeout-factor="${TIMEOUT_FACTOR:-15}" +} + +src_install() { + use external-signer && DOCS+=( doc/external-signer.md ) + use berkdb || use sqlite && DOCS+=( doc/managing-wallets.md ) + use libs && DOCS+=( doc/shared-libraries.md ) + use systemtap && DOCS+=( doc/tracing.md ) + use zeromq && DOCS+=( doc/zmq.md ) + + if use daemon ; then + # https://bugs.gentoo.org/757102 + DOCS+=( share/rpcauth/rpcauth.py ) + docompress -x "/usr/share/doc/${PF}/rpcauth.py" + fi + + default + + find "${ED}" -type f -name '*.la' -delete || die + ! use test || rm -f -- "${ED}"/usr/bin/test_bitcoin{,-qt} || die + + newbashcomp contrib/completions/bash/bitcoin-tx.bash-completion bitcoin-tx + use bitcoin-cli && newbashcomp contrib/completions/bash/bitcoin-cli.bash-completion bitcoin-cli + use daemon || use gui && newbashcomp contrib/completions/bash/bitcoind.bash-completion bitcoind + + if use daemon ; then + insinto /etc/bitcoin + sed -ne 's/ To use, copy this file$//p;Tp;:0;n;/save the file\.$/!b0;d;:p;p' \ + share/examples/bitcoin.conf >"${ED}/etc/bitcoin/bitcoin.conf" || die + fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf + fperms 0660 /etc/bitcoin/bitcoin.conf + + newconfd contrib/init/bitcoind.openrcconf bitcoind + newinitd "${FILESDIR}/bitcoind.openrc" bitcoind + systemd_newunit contrib/init/bitcoind.service bitcoind.service + + keepdir /var/lib/bitcoind + fperms 0750 /var/lib/bitcoind + fowners bitcoin:bitcoin /var/lib/bitcoind + dosym -r {/etc/bitcoin,/var/lib/bitcoind}/bitcoin.conf + + insinto /etc/logrotate.d + newins "${FILESDIR}/bitcoind.logrotate-r1" bitcoind + fi + + if use gui ; then + insinto /usr/share/icons/hicolor/scalable/apps + newins src/qt/res/src/bitcoin.svg bitcoin128.svg + + domenu "${FILESDIR}/org.bitcoin.bitcoin-qt.desktop" + + if use kde ; then + insinto /usr/share/kservices5 + doins "${FILESDIR}/bitcoin-qt.protocol" + fi + fi + + if use examples ; then + docinto examples + dodoc -r contrib/{linearize,qos} + use zeromq && dodoc -r contrib/zmq + fi +} + +pkg_preinst() { + if use daemon && [[ -d "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then + if [[ -h "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then + dosym -r /var/lib/bitcoin{d,/.bitcoin} + elif [[ ! -e "${EROOT}/var/lib/bitcoind" || -h "${EROOT}/var/lib/bitcoind" ]] ; then + efmt ewarn <<-EOF + Your bitcoind data directory is located at ${EPREFIX}/var/lib/bitcoin/.bitcoin, + a deprecated location. To perform an automated migration to + ${EPREFIX}/var/lib/bitcoind, first shut down any running bitcoind instances + that may be using the deprecated path, and then run: + + # emerge --config ${CATEGORY}/${PN} + EOF + insinto /var/lib/bitcoin + mv -- "${ED}/var/lib/bitcoin"{d,/.bitcoin} || die + dosym -r {/etc/,/var/lib/bitcoin/.}bitcoin/bitcoin.conf + dosym -r /var/lib/bitcoin{/.bitcoin,d} + fi + fi + + if use kde && [[ -d "${EROOT}/usr/share/kde4" ]] ; then + dosym -r /usr/share/{kservices5,kde4/services}/bitcoin-qt.protocol + fi +} + +pkg_postinst() { + # we don't use xdg.eclass because it adds unconditional IDEPENDs + if use gui ; then + xdg_desktop_database_update + xdg_icon_cache_update + fi + + if use daemon && [[ -z "${REPLACING_VERSIONS}" ]] ; then + efmt -su elog <<-EOF + To have ${PN} automatically use Tor when it's running, be sure your \ + 'torrc' config file has 'ControlPort' and 'CookieAuthentication' set up \ + correctly, and: + - Using an init script: add the 'bitcoin' user to the 'tor' user group. + - Running bitcoind directly: add that user to the 'tor' user group. + EOF + fi + + if use bitcoin-cli && use daemon ; then + efmt -su elog <<-EOF + To use bitcoin-cli with the /etc/init.d/bitcoind service: + - Add your user(s) to the 'bitcoin' group. + - Symlink ~/.bitcoin to /var/lib/bitcoind. + EOF + fi +} + +pkg_postrm() { + if use gui ; then + xdg_desktop_database_update + xdg_icon_cache_update + fi +} + +pkg_config() { + if [[ -d "${EROOT}/var/lib/bitcoin/.bitcoin" && ! -h "${EROOT}/var/lib/bitcoin/.bitcoin" ]] && + [[ ! -e "${EROOT}/var/lib/bitcoind" || -h "${EROOT}/var/lib/bitcoind" ]] + then + in_use() { + : ${1:?} ; local each + if command -v fuser >/dev/null ; then + fuser "${@}" >/dev/null 2>&1 + elif command -v lsof >/dev/null ; then + for each ; do + lsof -- "${each}" && return + done >/dev/null 2>&1 + elif mountpoint -q /proc ; then + { find /proc/[0-9]*/{cwd,exe,fd} -type l -exec readlink -- {} + + awk '{ print $6 }' /proc/[0-9]*/maps + } 2>/dev/null | grep -Fqx -f <(printf '%s\n' "${@}" ; readlink -m -- "${@}") + else + return 13 + fi + } + ebegin "Checking that ${EPREFIX}/var/lib/bitcoin/.bitcoin is not in use" + in_use "${EROOT}/var/lib/bitcoin/.bitcoin"{,/.lock} + case $? in + 0) + eend 1 + efmt eerror <<-EOF + ${EPREFIX}/var/lib/bitcoin/.bitcoin is currently in use. Please stop any + running bitcoind instances that may be using this data directory, and then + retry this migration. + EOF + die "${EPREFIX}/var/lib/bitcoin/.bitcoin is in use" + ;; + 13) + eend 1 + if [[ "${BITCOIND_IS_NOT_RUNNING}" != 1 ]] ; then + efmt eerror <<-EOF + Found no way to check whether ${EPREFIX}/var/lib/bitcoin/.bitcoin is in use. + Do you have /proc mounted? To force the migration without checking, re-run + this command with BITCOIND_IS_NOT_RUNNING=1. + EOF + die "could not check whether ${EPREFIX}/var/lib/bitcoin/.bitcoin is in use" + fi + ;; + *) + eend 0 + ;; + esac + + # find all relative symlinks that point outside the data dir + local -A symlinks + cd -- "${EROOT}/var/lib/bitcoin/.bitcoin" || die + local each ; while read -r -d '' each ; do + local target=$(readlink -- "${each}") && [[ "${target}" == ../* ]] && + target=$(readlink -e -- "${each}") && [[ "${target}" != "${EROOT}/var/lib/bitcoin/.bitcoin/"* ]] && + symlinks["${each}"]="${target}" + done < <(find -type l -print0) + + einfo "Moving your ${EPREFIX}/var/lib/bitcoin/.bitcoin to ${EPREFIX}/var/lib/bitcoind." + rm -f -- "${EROOT}/var/lib/bitcoind" || die + mv --no-clobber --no-copy --no-target-directory -- "${EROOT}/var/lib/bitcoin"{/.bitcoin,d} || + die "Failed to move your ${EPREFIX}/var/lib/bitcoin/.bitcoin to ${EPREFIX}/var/lib/bitcoind." + + # fix up the relative symlinks + cd -- "${EROOT}/var/lib/bitcoind" || die + for each in "${!symlinks[@]}" ; do + ln -fnrs -- "${symlinks[${each}]}" "${each}" # keep going even if this fails + done + + einfo 'Creating a transitional symlink for your convenience.' + ln -fnrsv -- "${EROOT}/var/lib/bitcoin"{d,/.bitcoin} + einfo 'You may remove this link when you no longer need it.' + else + einfo 'Nothing to do.' + fi +} diff --git a/net-p2p/bitcoin-core/bitcoin-core-25.1.ebuild b/net-p2p/bitcoin-core/bitcoin-core-25.1.ebuild deleted file mode 100644 index 7697985bd4d0..000000000000 --- a/net-p2p/bitcoin-core/bitcoin-core-25.1.ebuild +++ /dev/null @@ -1,340 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..12} ) - -inherit autotools bash-completion-r1 db-use desktop python-any-r1 systemd xdg-utils - -DESCRIPTION="Reference implementation of the Bitcoin cryptocurrency" -HOMEPAGE="https://bitcoincore.org/" -SRC_URI="https://bitcoincore.org/bin/${P}/${P/-core}.tar.gz" -S="${WORKDIR}/${P/-core}" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux" -# IUSE="+cli" doesn't work due to https://bugs.gentoo.org/831045#c3 -IUSE="+asm +berkdb +bitcoin-cli +daemon dbus examples +external-signer kde libs +man nat-pmp +qrcode gui +sqlite system-leveldb +system-libsecp256k1 systemtap test upnp zeromq" -RESTRICT="!test? ( test )" - -REQUIRED_USE=" - dbus? ( gui ) - kde? ( gui ) - qrcode? ( gui ) - system-leveldb? ( || ( daemon gui ) ) -" -# dev-libs/univalue is now bundled, as upstream dropped support for system copy -# and their version in the Bitcoin repo has deviated a fair bit from upstream. -# Upstream also seems very inactive. -RDEPEND=" - !=dev-libs/boost-1.81.0:= - >=dev-libs/libevent-2.1.12:= - berkdb? ( >=sys-libs/db-4.8.30:$(db_ver_to_slot 4.8)=[cxx] ) - bitcoin-cli? ( !=net-libs/libnatpmp-20220705:= ) - qrcode? ( >=media-gfx/qrencode-4.1.1:= ) - gui? ( - !=dev-qt/qtcore-5.15.5:5 - >=dev-qt/qtgui-5.15.5:5 - >=dev-qt/qtnetwork-5.15.5:5 - >=dev-qt/qtwidgets-5.15.5:5 - dbus? ( >=dev-qt/qtdbus-5.15.5:5 ) - ) - sqlite? ( >=dev-db/sqlite-3.38.5:= ) - system-leveldb? ( virtual/bitcoin-leveldb ) - system-libsecp256k1? ( >=dev-libs/libsecp256k1-0.3.1:=[recovery,schnorr] ) - upnp? ( >=net-libs/miniupnpc-2.2.2:= ) - zeromq? ( >=net-libs/zeromq-4.3.4:= ) -" -DEPEND=" - ${RDEPEND} - systemtap? ( >=dev-util/systemtap-4.8 ) -" -BDEPEND=" - virtual/pkgconfig - daemon? ( - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( >=dev-qt/linguist-tools-5.15.5:5 ) - test? ( ${PYTHON_DEPS} ) -" -IDEPEND=" - gui? ( dev-util/desktop-file-utils ) -" - -DOCS=( - doc/bips.md - doc/bitcoin-conf.md - doc/descriptors.md - doc/files.md - doc/i2p.md - doc/JSON-RPC-interface.md - doc/multisig-tutorial.md - doc/p2p-bad-ports.md - doc/psbt.md - doc/reduce-memory.md - doc/reduce-traffic.md - doc/release-notes.md - doc/REST-interface.md - doc/tor.md -) - -PATCHES=( - "${FILESDIR}/25.0-syslibs.patch" - "${FILESDIR}/init.patch" -) - -pkg_setup() { - use test && python-any-r1_pkg_setup -} - -src_prepare() { - default - ! use system-leveldb || rm -r src/leveldb || die - if use system-libsecp256k1 ; then - rm -r src/secp256k1 || die - sed -e '/^DIST_SUBDIRS *=/s/\bsecp256k1\b//' -i src/Makefile.am || die - else - pushd src/secp256k1 >/dev/null || die - AT_NOELIBTOOLIZE=yes eautoreconf - popd >/dev/null || die - fi - eautoreconf - - # we say --disable-util-util, so we can't test bitcoin-util - sed -ne '/^ {/{h;:0;n;H;/^ }/!b0;g;\|"exec": *"\./bitcoin-util"|d};p' \ - -i test/util/data/bitcoin-util-test.json || die - - sed -e 's/^\(complete -F _bitcoind\b\).*$/\1'"$(usev daemon ' bitcoind')$(usev gui ' bitcoin-qt')/" \ - -i contrib/completions/bash/bitcoind.bash-completion || die -} - -src_configure() { - local wallet ; if use berkdb || use sqlite ; then wallet=enable ; else wallet=disable ; fi - local myeconfargs=( - --disable-static - --${wallet}-wallet - $(use_with sqlite) - $(use_with berkdb bdb) - $(use_enable systemtap usdt) - $(use_with upnp miniupnpc) - $(use_with nat-pmp natpmp) - $(use_enable test tests) - --disable-bench - --disable-fuzz{,-binary} - $(use_with qrcode qrencode) - --disable-ccache - $(use_enable asm) - $(use_enable zeromq zmq) - $(use_enable man) - $(use_enable external-signer) - --with-utils - $(use_enable {bitcoin,util}-cli) - --enable-util-tx - --${wallet}-util-wallet - --disable-util-util - $(use_with libs) - $(use_with daemon) - $(use_with gui) - $(use_with dbus qtdbus) - $(use_with system-leveldb) - $(use_with system-libsecp256k1) - ) - econf "${myeconfargs[@]}" -} - -src_install() { - use external-signer && DOCS+=( doc/external-signer.md ) - use berkdb || use sqlite && DOCS+=( doc/managing-wallets.md ) - use libs && DOCS+=( doc/shared-libraries.md ) - use systemtap && DOCS+=( doc/tracing.md ) - use zeromq && DOCS+=( doc/zmq.md ) - - default - - find "${ED}" -type f -name '*.la' -delete || die - ! use test || rm -f -- "${ED}"/usr/bin/test_bitcoin{,-qt} || die - - newbashcomp contrib/completions/bash/bitcoin-tx.bash-completion bitcoin-tx - use bitcoin-cli && newbashcomp contrib/completions/bash/bitcoin-cli.bash-completion bitcoin-cli - use daemon || use gui && newbashcomp contrib/completions/bash/bitcoind.bash-completion bitcoind - - if use daemon ; then - insinto /etc/bitcoin - sed -ne 's/ To use, copy this file$//p;Tp;:0;n;/save the file\.$/!b0;d;:p;p' \ - share/examples/bitcoin.conf >"${ED}/etc/bitcoin/bitcoin.conf" || die - fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf - fperms 0660 /etc/bitcoin/bitcoin.conf - - newconfd contrib/init/bitcoind.openrcconf bitcoind - newinitd "${FILESDIR}/bitcoind.openrc" bitcoind - systemd_newunit contrib/init/bitcoind.service bitcoind.service - - keepdir /var/lib/bitcoind - fperms 0750 /var/lib/bitcoind - fowners bitcoin:bitcoin /var/lib/bitcoind - dosym -r {/etc/bitcoin,/var/lib/bitcoind}/bitcoin.conf - - insinto /etc/logrotate.d - newins "${FILESDIR}/bitcoind.logrotate-r1" bitcoind - fi - - if use gui ; then - insinto /usr/share/icons/hicolor/scalable/apps - newins src/qt/res/src/bitcoin.svg bitcoin128.svg - - domenu "${FILESDIR}/org.bitcoin.bitcoin-qt.desktop" - - if use kde ; then - insinto /usr/share/kservices5 - doins "${FILESDIR}/bitcoin-qt.protocol" - fi - fi - - if use examples ; then - docinto examples - dodoc -r contrib/{linearize,qos} - use zeromq && dodoc -r contrib/zmq - fi -} - -efmt() { - : ${1:?} ; local l ; while read -r l ; do "${!#}" "${l}" ; done < <(fmt "${@:1:$#-1}") -} - -pkg_preinst() { - if use daemon && [[ -d "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then - if [[ -h "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then - dosym -r /var/lib/bitcoin{d,/.bitcoin} - elif [[ ! -e "${EROOT}/var/lib/bitcoind" || -h "${EROOT}/var/lib/bitcoind" ]] ; then - efmt ewarn <<-EOF - Your bitcoind data directory is located at ${EPREFIX}/var/lib/bitcoin/.bitcoin, - a deprecated location. To perform an automated migration to - ${EPREFIX}/var/lib/bitcoind, first shut down any running bitcoind instances - that may be using the deprecated path, and then run: - - # emerge --config ${CATEGORY}/${PN} - EOF - insinto /var/lib/bitcoin - mv -- "${ED}/var/lib/bitcoin"{d,/.bitcoin} || die - dosym -r {/etc/,/var/lib/bitcoin/.}bitcoin/bitcoin.conf - dosym -r /var/lib/bitcoin{/.bitcoin,d} - fi - fi - - if use kde && [[ -d "${EROOT}/usr/share/kde4" ]] ; then - dosym -r /usr/share/{kservices5,kde4/services}/bitcoin-qt.protocol - fi -} - -pkg_postinst() { - # we don't use xdg.eclass because it adds unconditional IDEPENDs - if use gui ; then - xdg_desktop_database_update - xdg_icon_cache_update - fi - - if use daemon && [[ -z "${REPLACING_VERSIONS}" ]] ; then - efmt -su elog <<-EOF - To have ${PN} automatically use Tor when it's running, be sure your \ - 'torrc' config file has 'ControlPort' and 'CookieAuthentication' set up \ - correctly, and: - - Using an init script: add the 'bitcoin' user to the 'tor' user group. - - Running bitcoind directly: add that user to the 'tor' user group. - EOF - fi -} - -pkg_postrm() { - if use gui ; then - xdg_desktop_database_update - xdg_icon_cache_update - fi -} - -pkg_config() { - if [[ -d "${EROOT}/var/lib/bitcoin/.bitcoin" && ! -h "${EROOT}/var/lib/bitcoin/.bitcoin" ]] && - [[ ! -e "${EROOT}/var/lib/bitcoind" || -h "${EROOT}/var/lib/bitcoind" ]] - then - in_use() { - : ${1:?} ; local each - if command -v fuser >/dev/null ; then - fuser "${@}" >/dev/null 2>&1 - elif command -v lsof >/dev/null ; then - for each ; do - lsof -- "${each}" && return - done >/dev/null 2>&1 - elif mountpoint -q /proc ; then - { find /proc/[0-9]*/{cwd,exe,fd} -type l -exec readlink -- {} + - awk '{ print $6 }' /proc/[0-9]*/maps - } 2>/dev/null | grep -Fqx -f <(printf '%s\n' "${@}" ; readlink -m -- "${@}") - else - return 13 - fi - } - ebegin "Checking that ${EPREFIX}/var/lib/bitcoin/.bitcoin is not in use" - in_use "${EROOT}/var/lib/bitcoin/.bitcoin"{,/.lock} - case $? in - 0) - eend 1 - efmt eerror <<-EOF - ${EPREFIX}/var/lib/bitcoin/.bitcoin is currently in use. Please stop any - running bitcoind instances that may be using this data directory, and then - retry this migration. - EOF - die "${EPREFIX}/var/lib/bitcoin/.bitcoin is in use" - ;; - 13) - eend 1 - if [[ "${BITCOIND_IS_NOT_RUNNING}" != 1 ]] ; then - efmt eerror <<-EOF - Found no way to check whether ${EPREFIX}/var/lib/bitcoin/.bitcoin is in use. - Do you have /proc mounted? To force the migration without checking, re-run - this command with BITCOIND_IS_NOT_RUNNING=1. - EOF - die "could not check whether ${EPREFIX}/var/lib/bitcoin/.bitcoin is in use" - fi - ;; - *) - eend 0 - ;; - esac - - # find all relative symlinks that point outside the data dir - local -A symlinks - cd -- "${EROOT}/var/lib/bitcoin/.bitcoin" || die - local each ; while read -r -d '' each ; do - local target=$(readlink -- "${each}") && [[ "${target}" == ../* ]] && - target=$(readlink -e -- "${each}") && [[ "${target}" != "${EROOT}/var/lib/bitcoin/.bitcoin/"* ]] && - symlinks["${each}"]="${target}" - done < <(find -type l -print0) - - einfo "Moving your ${EPREFIX}/var/lib/bitcoin/.bitcoin to ${EPREFIX}/var/lib/bitcoind." - rm -f -- "${EROOT}/var/lib/bitcoind" || die - mv --no-clobber --no-copy --no-target-directory -- "${EROOT}/var/lib/bitcoin"{/.bitcoin,d} || - die "Failed to move your ${EPREFIX}/var/lib/bitcoin/.bitcoin to ${EPREFIX}/var/lib/bitcoind." - - # fix up the relative symlinks - cd -- "${EROOT}/var/lib/bitcoind" || die - for each in "${!symlinks[@]}" ; do - ln -fnrs -- "${symlinks[${each}]}" "${each}" # keep going even if this fails - done - - einfo 'Creating a transitional symlink for your convenience.' - ln -fnrsv -- "${EROOT}/var/lib/bitcoin"{d,/.bitcoin} - einfo 'You may remove this link when you no longer need it.' - else - einfo 'Nothing to do.' - fi -} diff --git a/net-p2p/bitcoin-core/metadata.xml b/net-p2p/bitcoin-core/metadata.xml index c5c7717fa5e5..6e6d7e4563b0 100644 --- a/net-p2p/bitcoin-core/metadata.xml +++ b/net-p2p/bitcoin-core/metadata.xml @@ -15,12 +15,13 @@ Build and install bitcoin-cli command line interface Build and install bitcoind daemon Include support for external wallet signer programs + Build and install Bitcoin-Qt GUI Build and install libbitcoinconsensus Enable NAT-PMP port forwarding Enable generation of QR Codes for receiving payments Support descriptor wallets in SQLite format - Link with virtual/bitcoin-leveldb rather than embedding an internal copy - Link with dev-libs/libsecp256k1 rather than embedding an internal copy + Link with virtual/bitcoin-leveldb rather than embedding an internal copy + Link with dev-libs/libsecp256k1 rather than embedding an internal copy Enable SystemTAP/DTrace tracing Enable Universal Plug and Play Report blocks and transactions via zeromq diff --git a/net-p2p/bitcoin-qt/Manifest b/net-p2p/bitcoin-qt/Manifest index 9a9b35460534..824ad594f0f7 100644 --- a/net-p2p/bitcoin-qt/Manifest +++ b/net-p2p/bitcoin-qt/Manifest @@ -1,2 +1,2 @@ -EBUILD bitcoin-qt-25.1.ebuild 682 BLAKE2B 93a029e4f064ff33b81a85457e288b114f35a76c3862ee5c034fa11f86a683a9813261e264c950b06fed1b3ae9b0a4cfe1a9b3ae916ce65c14576dd67b77b0cb SHA512 95a2e63257cb201848e4560ce8bc4a02b245874a033394dc68737c25cf3e962af22001574c81f22e8cf61fcad3e992366815188e858e4ab6798fb23a889c49e2 +EBUILD bitcoin-qt-25.1.ebuild 682 BLAKE2B 9c500be2f9b386cda4c32c495ba955c3a317eecfe55fb8a7f8b307da3ec274aa1d59c61604347c346d3acfc808460c95e2e8fc08a151d3d50b0f1c8213254d5a SHA512 f442991025d8889b7059456141e50a8fabb0f9c68e769c309034f3e7b1288d618836bf4cb19e66adb19db218c23d92e23534ebed7346d4956d54b869c877bb95 MISC metadata.xml 1239 BLAKE2B fe2609a22d201628f89d1e1663b4b439069ac09c130116aba2c6942ffdd0e604ba12146c065fa83102eea96f89ac3a8d19b3b259550d03cab2121c300a2f0bde SHA512 e45a9abf8f9d05f5d265c4db53a5fe477186de595d3b26a725dc483439c95eada137a2e7836ffc9bddc695886968360156fd788f465c4c3a75651e09c91b64a4 diff --git a/net-p2p/bitcoin-qt/bitcoin-qt-25.1.ebuild b/net-p2p/bitcoin-qt/bitcoin-qt-25.1.ebuild index ac87d00b9779..3f60924f5d31 100644 --- a/net-p2p/bitcoin-qt/bitcoin-qt-25.1.ebuild +++ b/net-p2p/bitcoin-qt/bitcoin-qt-25.1.ebuild @@ -1,9 +1,9 @@ # Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -DESCRIPTION="Transitional package for net-p2p/bitcoin-core[qt5]" +DESCRIPTION="Transitional package for net-p2p/bitcoin-core[gui]" HOMEPAGE="https://bitcoincore.org/" LICENSE="MIT" diff --git a/net-p2p/bitcoind/Manifest b/net-p2p/bitcoind/Manifest index 3a1a9da6c329..35a5eaf3a517 100644 --- a/net-p2p/bitcoind/Manifest +++ b/net-p2p/bitcoind/Manifest @@ -1,2 +1,2 @@ -EBUILD bitcoind-25.1.ebuild 670 BLAKE2B 13bafd9fbf062a458ac335ec83111e37866ddf1c3e120b0aa51335421abc98b0ebae97710d7442eca6c9e0cf01dc64f60ab3e965fb33673b7d186fcca2b03f0a SHA512 5931a45e5d366b34a2be6286599401d3e1dd70e3f8ae1d49496dd48cc6ba397d628f47391dd5f25053cecb8e6b000fefb1c1b432eff8ca9c5430d5173a32d5d1 +EBUILD bitcoind-25.1.ebuild 670 BLAKE2B 63036876d7cea3f972314d0eb2886405d033714fd651c09419d3bc165c37ae37a6d363bfd5f9dc7574d0172e0d6e372c915116781b256b132c20ff22d2343af9 SHA512 a4632fdb206bae74c8e9043f1e0ac1a5784a59ea12a9f424bdf9bb8bc487583223d1771b0700afc74d775bd85329b76860ed6cb96ed15f918d953897a5b69d8f MISC metadata.xml 1157 BLAKE2B 6468568ff3d317aefd1a59b735c48bcf46c5e651fceea6b079ef449934b9807fbf28d21159296a426ebb75358eb0dd826c45b12622267858066593d8ea41b792 SHA512 197c97b856058aebc8a91fdfd7bd79f24a7ff56f7a6750222a3e76e0b2383934aa37ff11ff813e13070ac3fd220e422f1ee1851274f45a06761c1732ab703945 diff --git a/net-p2p/bitcoind/bitcoind-25.1.ebuild b/net-p2p/bitcoind/bitcoind-25.1.ebuild index 7808d912fce7..4edfd29b0a84 100644 --- a/net-p2p/bitcoind/bitcoind-25.1.ebuild +++ b/net-p2p/bitcoind/bitcoind-25.1.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 DESCRIPTION="Transitional package for net-p2p/bitcoin-core[daemon]" HOMEPAGE="https://bitcoincore.org/" -- cgit v1.2.3