commit: 53efb9d288088441b74afe4578046dee5fa4cbe1 Author: Matt Whitlock <gentoo <AT> mattwhitlock <DOT> name> AuthorDate: Sat Jan 10 06:22:49 2026 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Jan 10 08:34:48 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53efb9d2
net-p2p/bitcoin-core: drop old Note: Releases 30.0 and 30.1 contained a potentially money-losing bug that could delete wallet files upon a failed legacy wallet migration. See https://github.com/bitcoin/bitcoin/issues/34128 for more info. Signed-off-by: Matt Whitlock <gentoo <AT> mattwhitlock.name> Part-of: https://github.com/gentoo/gentoo/pull/45310 Closes: https://github.com/gentoo/gentoo/pull/45310 Signed-off-by: Sam James <sam <AT> gentoo.org> net-p2p/bitcoin-core/Manifest | 3 - net-p2p/bitcoin-core/bitcoin-core-29.1.ebuild | 411 ----------------------- net-p2p/bitcoin-core/bitcoin-core-30.0-r1.ebuild | 320 ------------------ net-p2p/bitcoin-core/bitcoin-core-30.1.ebuild | 324 ------------------ 4 files changed, 1058 deletions(-) diff --git a/net-p2p/bitcoin-core/Manifest b/net-p2p/bitcoin-core/Manifest index 1c27538fa1f7..83266f0ae102 100644 --- a/net-p2p/bitcoin-core/Manifest +++ b/net-p2p/bitcoin-core/Manifest @@ -1,7 +1,4 @@ DIST bitcoin-core-29.0.tar.gz 12931219 BLAKE2B ee4a9b67ceb3e7a1851f844a090a099267798f83fbeb4fb76e0dd30ec24ce3fb967ab032179492cb8c02f0e470b3c2546ad589f940487bb0a0cc4d469bf3e1f9 SHA512 1373348fff7ac978fd28a8e29eda9ba9af745f947153a2c6c099b1e997d0d55611627f4c5299e350be3a9b555406da6bf056d2c5f6c123077e2872f5db7b3459 DIST bitcoin-core-29.0-qt6.patch 16737 BLAKE2B bf863852ad8d313ad26612f149612944949b93f3b6f4f1891587226bbf11fcfc5c29b63a59965bfd56f7edec27c82cef2209e40201963d4227e46fa87664f694 SHA512 af19a7ddee9f0cce85684149a130715df8511b9e4f38e5e3a79cf14586f1f73bde671a5ed1d44da870b3f2352d3c8e561b1ffa01e224e253019c71dfc4544476 -DIST bitcoin-core-29.1.tar.gz 12876068 BLAKE2B ed8afd0d4a9ef82ac3fb4ec440fbe166db027b1cc961b0cb4cbaf3497883902bc3e6af23296cbc04bf6404f51a1e725bdf536a0dc7976d1082ccd03b4a500879 SHA512 0110ea33787fc2fad152578dddd7c55e4219d9753d22b7fbb050755bdaa0f9dccd88c254f072ce855869ed9cddfb99015818ce1f44bbd1e25b2129a036d8fdf5 DIST bitcoin-core-29.2.tar.gz 12874820 BLAKE2B 43c57637f9ae842935cc27c8d16cfbdc7a2abe7ed55f58666f3bd3a2aa2826532a2207a35a27ed846b86ea2b304e22a99446d6d7138d202029ce9bde82353577 SHA512 1c3eb5988e1f6b0292f103de3e7911dc9430429687158988c510e647520d094e55b7cc63fd9044db9225111811368c1998b8320066bcec4f154e771e2beee7eb -DIST bitcoin-core-30.0.tar.gz 12676071 BLAKE2B 4204613d7b24193520bd5c539b45d368a5348a7aace365b8909ba439dbe0393d2e58b498431d492901abf09963408d3661998f1cbdf987e6074be117a3ad44f4 SHA512 290bdbffc945f34cb5571c19bcb41265cb3f209fd86018694a2426555456812c56bba5a4271e6928ccc4468a1f0175a6769d4745ecb213e521d3201cd557a21f -DIST bitcoin-core-30.1.tar.gz 12678968 BLAKE2B 9a724098f275066d5550e1036a2773136355bc59402de5773a0d13d397876d397c7f1702b2ae9fa38ed99b6a96e3af3fc56378db633f42578223eea8a9ae0667 SHA512 537bef288134c21a1d19814c5fcdcbae3096370c000a3b8284d4edfc9aa8e096975d69660e2623c90d7429b8808b20ea7b9330a66e0913868d575259e2e2cc83 DIST bitcoin-core-30.2.tar.gz 12682326 BLAKE2B 426ea9126ea8ee0eb0152a0e4806d7f6920be067bf4203bf98d91bcb74544383652c9406da23aaf15d72b4fd55584bd6c5fcc66267741a3cc35a338e379f8ea7 SHA512 850d8da77875b9a385c92f3a25be10d13f5961f10867cce0811e6dbf0c22edf00caa283bdfee6771978fa00bdc3865a06fa252232366b7231fded65e6ea0b5a5 diff --git a/net-p2p/bitcoin-core/bitcoin-core-29.1.ebuild b/net-p2p/bitcoin-core/bitcoin-core-29.1.ebuild deleted file mode 100644 index 1639994b592b..000000000000 --- a/net-p2p/bitcoin-core/bitcoin-core-29.1.ebuild +++ /dev/null @@ -1,411 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..13} ) - -inherit bash-completion-r1 check-reqs cmake db-use desktop edo multiprocessing python-any-r1 systemd toolchain-funcs xdg-utils - -DESCRIPTION="Reference implementation of the Bitcoin cryptocurrency" -HOMEPAGE="https://bitcoincore.org/" -SRC_URI=" - https://github.com/bitcoin/bitcoin/archive/v${PV/_rc/rc}.tar.gz -> ${P}.tar.gz - https://github.com/bitcoin/bitcoin/commit/6d4214925fadc36d26aa58903db5788c742e68c6.patch?full_index=1 -> ${PN}-29.0-qt6.patch -" -S="${WORKDIR}/${PN/-core}-${PV/_rc/rc}" - -LICENSE="MIT" -SLOT="0" -if [[ "${PV}" != *_rc* ]] ; then - KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" -fi -IUSE="asm +berkdb +cli +daemon dbus examples +external-signer gui qrcode +sqlite +system-libsecp256k1 systemtap test test-full zeromq" -RESTRICT="!test? ( test )" - -REQUIRED_USE=" - dbus? ( gui ) - qrcode? ( gui ) - test-full? ( test ) -" -# 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. -COMMON_DEPEND=" - >=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] ) - daemon? ( - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( - >=dev-qt/qtbase-6.2:6[dbus?,gui,network,widgets] - ) - qrcode? ( >=media-gfx/qrencode-4.1.1:= ) - sqlite? ( >=dev-db/sqlite-3.38.5:= ) - system-libsecp256k1? ( >=dev-libs/libsecp256k1-0.6.0:=[asm=,ellswift,extrakeys,recovery,schnorr] ) - zeromq? ( >=net-libs/zeromq-4.3.4:= ) -" -RDEPEND=" - ${COMMON_DEPEND} - !dev-util/bitcoin-tx - cli? ( !net-p2p/bitcoin-cli ) - daemon? ( !net-p2p/bitcoind ) - gui? ( !net-p2p/bitcoin-qt ) -" -DEPEND=" - ${COMMON_DEPEND} - systemtap? ( >=dev-debug/systemtap-4.8 ) -" -BDEPEND=" - >=dev-build/cmake-3.25 - virtual/pkgconfig - daemon? ( - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( >=dev-qt/qttools-6.2:6[linguist] ) - 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=( - "${DISTDIR}/${PN}-29.0-qt6.patch" - "${FILESDIR}/29.0-cmake-syslibs.patch" - "${FILESDIR}/26.0-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 cli && ! has_version "${CATEGORY}/${PN}[daemon,-bitcoin-cli(-),-cli(-)]" ; then - efmt ewarn <<-EOF - You are enabling USE="daemon" but not USE="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() { - # https://bugs.gentoo.org/958361 - # https://github.com/google/crc32c/commit/2bbb3be42e20a0e6c0f7b39dc07dc863d9ffbc07 - sed -e '/^cmake_minimum_required(VERSION 3\.1)$/s/)$/6)/' -i src/crc32c/CMakeLists.txt || die - - eapply_user - ! use system-libsecp256k1 || rm -r src/secp256k1 || die - cmake_src_prepare - - # we set BUILD_UTIL=OFF, 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 || die -} - -src_configure() { - local wallet ; if use berkdb || use sqlite ; then wallet=ON ; else wallet=OFF ; fi - local mycmakeargs=( - -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON # https://github.com/bitcoin/bitcoin/pull/32220 - -DBUILD_SHARED_LIBS=ON - -DENABLE_WALLET=${wallet} - -DWITH_SQLITE=$(usex sqlite) - -DWITH_BDB=$(usex berkdb) - -DWITH_USDT=$(usex systemtap) - -DBUILD_TESTS=$(usex test) - -DBUILD_BENCH=OFF - -DBUILD_{FOR_FUZZING,FUZZ_BINARY}=OFF - -DWITH_QRENCODE=$(usex qrcode) - -DWITH_CCACHE=OFF - -DWITH_ZMQ=$(usex zeromq) - -DENABLE_EXTERNAL_SIGNER=$(usex external-signer) - -DBUILD_CLI=$(usex cli) - -DBUILD_TX=ON - -DBUILD_WALLET_TOOL=${wallet} - -DBUILD_UTIL=OFF - -DBUILD_DAEMON=$(usex daemon) - -DBUILD_GUI=$(usex gui) - -DWITH_DBUS=$(usex dbus) - -DWITH_SYSTEM_LIBSECP256K1=$(usex system-libsecp256k1 ON \ - "OFF -DSECP256K1_ASM=$(usex asm AUTO OFF)") - ) - cmake_src_configure -} - -src_compile() { - cmake_src_compile - - if use daemon && ! tc-is-cross-compiler ; then - TOPDIR="${S}" BUILDDIR="${BUILD_DIR}" bash contrib/devtools/gen-bitcoin-conf.sh || die - fi - sed -e 's/ To use, copy this file$//p;Tp;:0;n;/save the file\.$/!b0;d;:p;p' \ - -ni share/examples/bitcoin.conf || die -} - -src_test() { - cmake_src_test - - if use daemon ; then - cd -- "${BUILD_DIR}" || die - edo "${PYTHON}" test/functional/test_runner.py \ - --ansi $(usev test-full --extended) --jobs="$(get_makeopts_jobs)" --timeout-factor="${TIMEOUT_FACTOR:-15}" - fi -} - -src_install() { - dodoc -r doc/release-notes - - use external-signer && DOCS+=( doc/external-signer.md ) - use berkdb || use sqlite && DOCS+=( doc/managing-wallets.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 - - einstalldocs - cmake_src_install - - 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 bitcoin-tx - use cli && newbashcomp contrib/completions/bash/bitcoin-cli.bash bitcoin-cli - if use daemon ; then - newbashcomp contrib/completions/bash/bitcoind.bash bitcoind - use gui && bashcomp_alias bitcoind bitcoin-qt - elif use gui ; then - newbashcomp contrib/completions/bash/bitcoind.bash bitcoin-qt - fi - - if use daemon ; then - insinto /etc/bitcoin - doins share/examples/bitcoin.conf - 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" - 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 -} - -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 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 - - if use berkdb ; then - # https://github.com/bitcoin/bitcoin/pull/28597 - # https://bitcoincore.org/en/releases/26.0/#wallet - efmt ewarn <<-EOF - Creation of legacy (Berkeley DB) wallets is refused starting with Bitcoin - Core 26.0, pending the deprecation and eventual removal of support for - legacy wallets altogether in future releases. At present you can still - force support for the creation of legacy wallets by adding the following - line to your bitcoin.conf: - - deprecatedrpc=create_bdb - 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-30.0-r1.ebuild b/net-p2p/bitcoin-core/bitcoin-core-30.0-r1.ebuild deleted file mode 100644 index 7a0a01111d79..000000000000 --- a/net-p2p/bitcoin-core/bitcoin-core-30.0-r1.ebuild +++ /dev/null @@ -1,320 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{11..14} ) - -inherit bash-completion-r1 check-reqs cmake desktop edo multiprocessing python-any-r1 systemd toolchain-funcs xdg-utils - -DESCRIPTION="Reference implementation of the Bitcoin cryptocurrency" -HOMEPAGE="https://bitcoincore.org/" -SRC_URI="https://github.com/bitcoin/bitcoin/archive/v${PV/_rc/rc}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/${PN/-core}-${PV/_rc/rc}" - -LICENSE="MIT" -SLOT="0" -if [[ "${PV}" != *_rc* ]] ; then - KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" -fi -IUSE="asm +cli +daemon dbus examples +external-signer gui qrcode +system-libsecp256k1 systemtap test test-full +wallet zeromq" -RESTRICT="!test? ( test )" - -REQUIRED_USE=" - dbus? ( gui ) - qrcode? ( gui ) - test-full? ( test ) -" -# 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. -COMMON_DEPEND=" - >=dev-libs/boost-1.81.0:= - >=dev-libs/libevent-2.1.12:= - daemon? ( - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( - >=dev-qt/qtbase-6.2:6[dbus?,gui,network,widgets] - ) - qrcode? ( >=media-gfx/qrencode-4.1.1:= ) - system-libsecp256k1? ( >=dev-libs/libsecp256k1-0.6.0:=[asm=,ellswift,extrakeys,musig,recovery,schnorr] ) - wallet? ( >=dev-db/sqlite-3.38.5:= ) - zeromq? ( >=net-libs/zeromq-4.3.4:= ) -" -RDEPEND=" - ${COMMON_DEPEND} - !dev-util/bitcoin-tx - cli? ( !net-p2p/bitcoin-cli ) - daemon? ( !net-p2p/bitcoind ) - gui? ( !net-p2p/bitcoin-qt ) -" -DEPEND=" - ${COMMON_DEPEND} - systemtap? ( >=dev-debug/systemtap-4.8 ) -" -BDEPEND=" - >=dev-build/cmake-3.25 - virtual/pkgconfig - daemon? ( - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( >=dev-qt/qttools-6.2:6[linguist] ) - 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}/30.0-cmake-syslibs.patch" - "${FILESDIR}/26.0-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 cli && ! has_version "${CATEGORY}/${PN}[daemon,-bitcoin-cli(-),-cli(-)]" ; then - efmt ewarn <<-EOF - You are enabling USE="daemon" but not USE="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 - - # 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 - - # check for auto-loaded wallets in the obsolete (now unsupported) format - if use daemon && use wallet && [[ -r "${EROOT}/var/lib/bitcoind/settings.json" ]] ; then - local wallet bdb_wallets=() - while read -rd '' wallet ; do - # printf interprets any C-style escape sequences in ${wallet} - wallet="${EROOT}$(printf "/var/lib/bitcoind/wallets/${wallet:+${wallet//\%/%%}/}wallet.dat")" - [[ -r "${wallet}" && "$(file -b -- "${wallet}")" == *'Berkeley DB'* ]] && bdb_wallets+=( "${wallet}" ) - done < <( - # parsing settings.json using jq would be far cleaner, but jq might not be installed - sed -Enze 'H;${x;s/^.*"wallet"\s*:\s*\[\s*("([^"\\]|\\.)*"(\s*,\s*"([^"\\]|\\.)*")*)\s*\].*$/\1/;T' \ - -e 's/"(([^"\\]|\\.)*)"\s*(,\s*)?/\1\x0/gp}' -- "${EROOT}/var/lib/bitcoind/settings.json" - ) - if (( ${#bdb_wallets[@]} )) ; then - efmt -su ewarn <<-EOF - The following auto-loaded wallets are in the legacy (Berkeley DB) format, \ - which is no longer supported by this version of Bitcoin Core: - $(printf ' - %s\n' "${bdb_wallets[@]}") - You may need to remove these wallets from your auto-load configuration \ - at ${EROOT}/var/lib/bitcoind/settings.json$(use cli && cat <<-EOS - and convert them to descriptor wallets by executing \ - \`bitcoin-cli migratewallet "<wallet_name>" ["<passphrase>"]\` \ - after starting bitcoind - EOS - ). - EOF - fi - fi -} - -src_prepare() { - # https://bugs.gentoo.org/958361 - # https://github.com/google/crc32c/commit/2bbb3be42e20a0e6c0f7b39dc07dc863d9ffbc07 - sed -e '/^cmake_minimum_required(VERSION 3\.1)$/s/)$/6)/' -i src/crc32c/CMakeLists.txt || die - - eapply_user - ! use system-libsecp256k1 || rm -r src/secp256k1 || die - cmake_src_prepare - - sed -e 's/^\(complete -F _bitcoind\b\).*$/\1'"$(usev daemon ' bitcoind')$(usev gui ' bitcoin-qt')/" \ - -i contrib/completions/bash/bitcoind.bash || die -} - -src_configure() { - local mycmakeargs=( -# -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON # https://github.com/bitcoin/bitcoin/pull/32220 - -DBUILD_SHARED_LIBS=ON - -DENABLE_IPC=OFF - -DENABLE_WALLET=$(usex wallet) - -DWITH_USDT=$(usex systemtap) - -DBUILD_TESTS=$(usex test) - -DBUILD_BENCH=OFF - -DBUILD_{FOR_FUZZING,FUZZ_BINARY}=OFF - -DWITH_QRENCODE=$(usex qrcode) - -DWITH_CCACHE=OFF - -DWITH_ZMQ=$(usex zeromq) - -DENABLE_EXTERNAL_SIGNER=$(usex external-signer) - -DBUILD_CLI=$(usex cli) - -DBUILD_TX=ON - -DBUILD_WALLET_TOOL=$(usex wallet) - -DBUILD_UTIL=OFF - -DBUILD_DAEMON=$(usex daemon) - -DBUILD_GUI=$(usex gui) - -DWITH_DBUS=$(usex dbus) - -DWITH_SYSTEM_LIBSECP256K1=$(usex system-libsecp256k1 ON \ - "OFF -DSECP256K1_ASM=$(usex asm AUTO OFF)") - ) - cmake_src_configure -} - -src_compile() { - cmake_src_compile - - if use daemon && ! tc-is-cross-compiler ; then - TOPDIR="${S}" BUILDDIR="${BUILD_DIR}" bash contrib/devtools/gen-bitcoin-conf.sh || die - fi - sed -e 's/ To use, copy this file$//p;Tp;:0;n;/save the file\.$/!b0;d;:p;p' \ - -ni share/examples/bitcoin.conf || die -} - -src_test() { - cmake_src_test - - if use daemon ; then - cd -- "${BUILD_DIR}" || die - edo "${PYTHON}" test/functional/test_runner.py \ - --ansi $(usev test-full --extended) --jobs="$(get_makeopts_jobs)" --timeout-factor="${TIMEOUT_FACTOR:-15}" - fi -} - -src_install() { - dodoc -r doc/release-notes - - use external-signer && DOCS+=( doc/external-signer.md ) - use wallet && DOCS+=( doc/managing-wallets.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 - - einstalldocs - cmake_src_install - - find "${ED}" -type f -name '*.la' -delete || die - ! use test || rm -f -- "${ED}"/usr/libexec/test_bitcoin{,-qt} || die - - newbashcomp contrib/completions/bash/bitcoin-tx.bash bitcoin-tx - use cli && newbashcomp contrib/completions/bash/bitcoin-cli.bash bitcoin-cli - if use daemon ; then - newbashcomp contrib/completions/bash/bitcoind.bash bitcoind - use gui && bashcomp_alias bitcoind bitcoin-qt - elif use gui ; then - newbashcomp contrib/completions/bash/bitcoind.bash bitcoin-qt - fi - - if use daemon ; then - insinto /etc/bitcoin - doins share/examples/bitcoin.conf - 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" - fi - - if use examples ; then - docinto examples - dodoc -r contrib/{linearize,qos} - use zeromq && dodoc -r contrib/zmq - 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 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 - - if use wallet && [[ -r "${EROOT}/etc/bitcoin/bitcoin.conf" ]] && - grep -q '^\s*deprecatedrpc\s*=.*\bcreate_bdb\b' -- "${EROOT}/etc/bitcoin/bitcoin.conf" - then - # https://github.com/bitcoin/bitcoin/pull/31250 - efmt ewarn <<-EOF - Creation of legacy (Berkeley DB) wallets is no longer possible starting with - Bitcoin Core 30.0. You must remove the following line from your bitcoin.conf: - - deprecatedrpc=create_bdb - EOF - fi -} - -pkg_postrm() { - if use gui ; then - xdg_desktop_database_update - xdg_icon_cache_update - fi -} diff --git a/net-p2p/bitcoin-core/bitcoin-core-30.1.ebuild b/net-p2p/bitcoin-core/bitcoin-core-30.1.ebuild deleted file mode 100644 index 5e2ae87a74c3..000000000000 --- a/net-p2p/bitcoin-core/bitcoin-core-30.1.ebuild +++ /dev/null @@ -1,324 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{11..14} ) - -inherit bash-completion-r1 check-reqs cmake desktop edo multiprocessing python-any-r1 systemd toolchain-funcs xdg-utils - -DESCRIPTION="Reference implementation of the Bitcoin cryptocurrency" -HOMEPAGE="https://bitcoincore.org/" -SRC_URI="https://github.com/bitcoin/bitcoin/archive/v${PV/_rc/rc}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/${PN/-core}-${PV/_rc/rc}" - -LICENSE="MIT" -SLOT="0" -if [[ "${PV}" != *_rc* ]] ; then - KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" -fi -IUSE="asm +cli +daemon dbus examples +external-signer gui qrcode +system-libsecp256k1 systemtap test test-full +wallet zeromq" -RESTRICT="!test? ( test )" - -REQUIRED_USE=" - dbus? ( gui ) - qrcode? ( gui ) - test-full? ( test ) -" -# 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. -COMMON_DEPEND=" - >=dev-libs/boost-1.81.0:= - >=dev-libs/libevent-2.1.12:= - daemon? ( - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( - >=dev-qt/qtbase-6.2:6[dbus?,gui,network,widgets] - ) - qrcode? ( >=media-gfx/qrencode-4.1.1:= ) - system-libsecp256k1? ( >=dev-libs/libsecp256k1-0.6.0:=[asm=,ellswift,extrakeys,musig,recovery,schnorr] ) - wallet? ( >=dev-db/sqlite-3.38.5:= ) - zeromq? ( >=net-libs/zeromq-4.3.4:= ) -" -RDEPEND=" - ${COMMON_DEPEND} - !dev-util/bitcoin-tx - cli? ( !net-p2p/bitcoin-cli ) - daemon? ( !net-p2p/bitcoind ) - gui? ( !net-p2p/bitcoin-qt ) -" -DEPEND=" - ${COMMON_DEPEND} - systemtap? ( >=dev-debug/systemtap-4.8 ) -" -BDEPEND=" - >=dev-build/cmake-3.25 - virtual/pkgconfig - daemon? ( - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( >=dev-qt/qttools-6.2:6[linguist] ) - 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}/30.0-cmake-syslibs.patch" - "${FILESDIR}/26.0-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 cli && ! has_version "${CATEGORY}/${PN}[daemon,-bitcoin-cli(-),-cli(-)]" ; then - efmt ewarn <<-EOF - You are enabling USE="daemon" but not USE="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 - - # 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 - - # check for auto-loaded wallets in the obsolete (now unsupported) format - if use daemon && use wallet && [[ -r "${EROOT}/var/lib/bitcoind/settings.json" ]] ; then - local wallet bdb_wallets=() - while read -rd '' wallet ; do - # printf interprets any C-style escape sequences in ${wallet} - wallet="${EROOT}$(printf "/var/lib/bitcoind/wallets/${wallet:+${wallet//\%/%%}/}wallet.dat")" - [[ -r "${wallet}" && "$(file -b -- "${wallet}")" == *'Berkeley DB'* ]] && bdb_wallets+=( "${wallet}" ) - done < <( - # parsing settings.json using jq would be far cleaner, but jq might not be installed - sed -Enze 'H;${x;s/^.*"wallet"\s*:\s*\[\s*("([^"\\]|\\.)*"(\s*,\s*"([^"\\]|\\.)*")*)\s*\].*$/\1/;T' \ - -e 's/"(([^"\\]|\\.)*)"\s*(,\s*)?/\1\x0/gp}' -- "${EROOT}/var/lib/bitcoind/settings.json" - ) - if (( ${#bdb_wallets[@]} )) ; then - efmt -su ewarn <<-EOF - The following auto-loaded wallets are in the legacy (Berkeley DB) format, \ - which is no longer supported by this version of Bitcoin Core: - $(printf ' - %s\n' "${bdb_wallets[@]}") - You may need to remove these wallets from your auto-load configuration \ - at ${EROOT}/var/lib/bitcoind/settings.json$(use cli && cat <<-EOS - and convert them to descriptor wallets by executing \ - \`bitcoin-cli migratewallet "<wallet_name>" ["<passphrase>"]\` \ - after starting bitcoind - EOS - ). - EOF - fi - fi -} - -src_prepare() { - # https://bugs.gentoo.org/958361 - # https://github.com/google/crc32c/commit/2bbb3be42e20a0e6c0f7b39dc07dc863d9ffbc07 - sed -e '/^cmake_minimum_required(VERSION 3\.1)$/s/)$/6)/' -i src/crc32c/CMakeLists.txt || die - - # https://bugs.gentoo.org/965371 - # https://github.com/google/leveldb/issues/1289 - sed -e '/^cmake_minimum_required(VERSION 3\.9)$/s/9)$/10)/' -i src/leveldb/CMakeLists.txt || die - - eapply_user - ! use system-libsecp256k1 || rm -r src/secp256k1 || die - cmake_src_prepare - - sed -e 's/^\(complete -F _bitcoind\b\).*$/\1'"$(usev daemon ' bitcoind')$(usev gui ' bitcoin-qt')/" \ - -i contrib/completions/bash/bitcoind.bash || die -} - -src_configure() { - local mycmakeargs=( -# -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON # https://github.com/bitcoin/bitcoin/pull/32220 - -DBUILD_SHARED_LIBS=ON - -DENABLE_IPC=OFF - -DENABLE_WALLET=$(usex wallet) - -DWITH_USDT=$(usex systemtap) - -DBUILD_TESTS=$(usex test) - -DBUILD_BENCH=OFF - -DBUILD_{FOR_FUZZING,FUZZ_BINARY}=OFF - -DWITH_QRENCODE=$(usex qrcode) - -DWITH_CCACHE=OFF - -DWITH_ZMQ=$(usex zeromq) - -DENABLE_EXTERNAL_SIGNER=$(usex external-signer) - -DBUILD_CLI=$(usex cli) - -DBUILD_TX=ON - -DBUILD_WALLET_TOOL=$(usex wallet) - -DBUILD_UTIL=OFF - -DBUILD_DAEMON=$(usex daemon) - -DBUILD_GUI=$(usex gui) - -DWITH_DBUS=$(usex dbus) - -DWITH_SYSTEM_LIBSECP256K1=$(usex system-libsecp256k1 ON \ - "OFF -DSECP256K1_ASM=$(usex asm AUTO OFF)") - ) - cmake_src_configure -} - -src_compile() { - cmake_src_compile - - if use daemon && ! tc-is-cross-compiler ; then - TOPDIR="${S}" BUILDDIR="${BUILD_DIR}" bash contrib/devtools/gen-bitcoin-conf.sh || die - fi - sed -e 's/ To use, copy this file$//p;Tp;:0;n;/save the file\.$/!b0;d;:p;p' \ - -ni share/examples/bitcoin.conf || die -} - -src_test() { - cmake_src_test - - if use daemon ; then - cd -- "${BUILD_DIR}" || die - edo "${PYTHON}" test/functional/test_runner.py \ - --ansi $(usev test-full --extended) --jobs="$(get_makeopts_jobs)" --timeout-factor="${TIMEOUT_FACTOR:-15}" - fi -} - -src_install() { - dodoc -r doc/release-notes - - use external-signer && DOCS+=( doc/external-signer.md ) - use wallet && DOCS+=( doc/managing-wallets.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 - - einstalldocs - cmake_src_install - - find "${ED}" -type f -name '*.la' -delete || die - ! use test || rm -f -- "${ED}"/usr/libexec/test_bitcoin{,-qt} || die - - newbashcomp contrib/completions/bash/bitcoin-tx.bash bitcoin-tx - use cli && newbashcomp contrib/completions/bash/bitcoin-cli.bash bitcoin-cli - if use daemon ; then - newbashcomp contrib/completions/bash/bitcoind.bash bitcoind - use gui && bashcomp_alias bitcoind bitcoin-qt - elif use gui ; then - newbashcomp contrib/completions/bash/bitcoind.bash bitcoin-qt - fi - - if use daemon ; then - insinto /etc/bitcoin - doins share/examples/bitcoin.conf - 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" - fi - - if use examples ; then - docinto examples - dodoc -r contrib/{linearize,qos} - use zeromq && dodoc -r contrib/zmq - 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 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 - - if use wallet && [[ -r "${EROOT}/etc/bitcoin/bitcoin.conf" ]] && - grep -q '^\s*deprecatedrpc\s*=.*\bcreate_bdb\b' -- "${EROOT}/etc/bitcoin/bitcoin.conf" - then - # https://github.com/bitcoin/bitcoin/pull/31250 - efmt ewarn <<-EOF - Creation of legacy (Berkeley DB) wallets is no longer possible starting with - Bitcoin Core 30.0. You must remove the following line from your bitcoin.conf: - - deprecatedrpc=create_bdb - EOF - fi -} - -pkg_postrm() { - if use gui ; then - xdg_desktop_database_update - xdg_icon_cache_update - fi -}
