diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-17 03:01:54 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-17 03:01:54 -0500 |
| commit | 704b2332929c5ee3a704315e1b371a864f9f463e (patch) | |
| tree | 5112e7a1a49250008a19bd1c18e2142a8a5ed3f3 /net-p2p | |
| parent | 7c679258085e25fd48f6bc6a44d6554b82d83c09 (diff) | |
| download | baldeagleos-repo-704b2332929c5ee3a704315e1b371a864f9f463e.tar.gz baldeagleos-repo-704b2332929c5ee3a704315e1b371a864f9f463e.tar.xz baldeagleos-repo-704b2332929c5ee3a704315e1b371a864f9f463e.zip | |
Adding metadata
Diffstat (limited to 'net-p2p')
| -rw-r--r-- | net-p2p/bitcoin-core/Manifest | 3 | ||||
| -rw-r--r-- | net-p2p/bitcoin-core/bitcoin-core-29.3-r1.ebuild | 346 | ||||
| -rw-r--r-- | net-p2p/bitcoin-core/bitcoin-core-30.2-r1.ebuild | 341 | ||||
| -rw-r--r-- | net-p2p/bitcoin-core/bitcoin-core-31.0.ebuild | 6 | ||||
| -rw-r--r-- | net-p2p/rtorrent/Manifest | 1 | ||||
| -rw-r--r-- | net-p2p/rtorrent/files/rtorrent-r1.init | 3 | ||||
| -rw-r--r-- | net-p2p/rtorrent/files/rtorrentd.conf | 5 | ||||
| -rw-r--r-- | net-p2p/rtorrent/rtorrent-0.16.14.ebuild | 120 | ||||
| -rw-r--r-- | net-p2p/rtorrent/rtorrent-9999.ebuild | 7 |
9 files changed, 824 insertions, 8 deletions
diff --git a/net-p2p/bitcoin-core/Manifest b/net-p2p/bitcoin-core/Manifest index 3704a6279a1d..f8e36f91a3c7 100644 --- a/net-p2p/bitcoin-core/Manifest +++ b/net-p2p/bitcoin-core/Manifest @@ -1,5 +1,8 @@ DIST bitcoin-core-29.0-qt6.patch 16737 BLAKE2B bf863852ad8d313ad26612f149612944949b93f3b6f4f1891587226bbf11fcfc5c29b63a59965bfd56f7edec27c82cef2209e40201963d4227e46fa87664f694 SHA512 af19a7ddee9f0cce85684149a130715df8511b9e4f38e5e3a79cf14586f1f73bde671a5ed1d44da870b3f2352d3c8e561b1ffa01e224e253019c71dfc4544476 +DIST bitcoin-core-29.3-multi_index-fix-compilation-failure-with-boost-1.91.patch 4701 BLAKE2B ed2bb27a7ef296f8b59d03778ec1826d1b8423edf7be4bc4173837639ef92ef170a06c8b37989037c47823b1933f9d732e94ebfbe38c0df5c62ba93641809bd9 SHA512 aa297ef62ae7fc5bc9f0b8ed55bdbad099809b503fb583459d579523c0091c33822a376ac5e8c39a25051be4ac1414b0043226a52d4f738bd66037f03d69e0e4 DIST bitcoin-core-29.3.tar.gz 12882742 BLAKE2B eac67459c29ceb38b685a5de9ebf382371f24175885e9d9ff2964746ee848bec56e71ac048e9727db5a2010dfd3c995ace05e266af00107c2af172889fd29703 SHA512 66e726eff5cca74c0baa58a4ac85ff054849567dc8b9c1dd221ca11dfbdf52887835afc5b8c9cf5c8acc1c8045c815e720cfb92ec8dfe07a06ecdf673e52294d +DIST bitcoin-core-30.2-multi_index-fix-compilation-failure-with-boost-1.91.patch 5942 BLAKE2B 485b43a9a7c4d9674482a1f4205153b967b3d4a8e45548e75f82e0f793aea1ef0ad0b423c31762ae0e212d26d9f2c054f3ab285612601fbf1bf7e40153ae6b5e SHA512 1efe666feb18b3e0c8f0a925fe8ba065c82ea9ebc824fa71113cc54ff52f9f563aa58333f538500c2583dc55ca478a5bbd94233d2f174b10d72a3b46accfc5ea DIST bitcoin-core-30.2.tar.gz 12682326 BLAKE2B 426ea9126ea8ee0eb0152a0e4806d7f6920be067bf4203bf98d91bcb74544383652c9406da23aaf15d72b4fd55584bd6c5fcc66267741a3cc35a338e379f8ea7 SHA512 850d8da77875b9a385c92f3a25be10d13f5961f10867cce0811e6dbf0c22edf00caa283bdfee6771978fa00bdc3865a06fa252232366b7231fded65e6ea0b5a5 +DIST bitcoin-core-31.0-multi_index-fix-compilation-failure-with-boost-1.91.patch 4754 BLAKE2B c9da6c63ae8bcae07fb5f2768df2a0f839c383618d0ff8664cbe75cc86aa8789ea88b7e18b44dd7a143730e2cd12d5e2903fa3b48a5a77afb07d6d472d318e25 SHA512 a704f1aa8eb194fe5615d3403d91adccdbbf72f8ee1746aa59b033f68efdce42f1c2a1d924cf19b16df086e4cda1a062b562bf5018b47d0a11e6b5f5082e2d09 DIST bitcoin-core-31.0.tar.gz 14636887 BLAKE2B 782b172442c527ea43da7c456b31a5f6720ca494b6bc99438942637a2d8c4907aff96c3c2758d46f2d1788782c55e684ebbed83e4fe26a0323f83f7d1c39ea6b SHA512 776273cd494dbffc25a7145cd2c6f56df163e532af3685fbbd2bbe35b0df7d97eaa7ffda7c9d51e25b1064aa3552af575ee6aebe6c79d0542a5e1d312edd324c DIST bitcoin-core-fix-mempool_updatefromblock.patch 3361 BLAKE2B f307270c1b28d5d93815ad96c1b7b69ddd0c9e0f4a818cffdef01293a4dd8e752ae3786fe23dd8d4efacfc9bcddc582d23210df090e53aaf1e6521ec5527a5e0 SHA512 537b9998d8354fca1158970d73cfc0488e5f7a1f1eed3c0ff4956d2fe63d8cd526540c88e8750bacdb75edd9bd053eb9f4b37813e3159bea5e66b3acba3063d6 diff --git a/net-p2p/bitcoin-core/bitcoin-core-29.3-r1.ebuild b/net-p2p/bitcoin-core/bitcoin-core-29.3-r1.ebuild new file mode 100644 index 000000000000..a16074851a3f --- /dev/null +++ b/net-p2p/bitcoin-core/bitcoin-core-29.3-r1.ebuild @@ -0,0 +1,346 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) + +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 + https://github.com/bitcoin/bitcoin/commit/546598b73675bd5663de6df8f4e3a23a0e7eceb7.patch?full_index=1 -> ${PN}-29.3-multi_index-fix-compilation-failure-with-boost-1.91.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" + "${DISTDIR}/${PN}-29.3-multi_index-fix-compilation-failure-with-boost-1.91.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 + + # check for auto-loaded wallets in the obsolete (soon to be unsupported) format + if use daemon && use berkdb && [[ -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 will no longer be supported by the next major version of Bitcoin Core: + $(printf ' - %s\n' "${bdb_wallets[@]}") + EOF + use cli && efmt ewarn <<-EOF + You may want to convert them to descriptor wallets by executing + \`bitcoin-cli migratewallet "<wallet_name>" ["<passphrase>"]\` + after starting bitcoind. + 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 + + # 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_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 +} diff --git a/net-p2p/bitcoin-core/bitcoin-core-30.2-r1.ebuild b/net-p2p/bitcoin-core/bitcoin-core-30.2-r1.ebuild new file mode 100644 index 000000000000..0de6900ecd14 --- /dev/null +++ b/net-p2p/bitcoin-core/bitcoin-core-30.2-r1.ebuild @@ -0,0 +1,341 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..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 + https://github.com/bitcoin/bitcoin/commit/fac5a1b10a6979a7898c5c3555d62b593560772f.patch?full_index=1 -> ${PN}-fix-mempool_updatefromblock.patch + https://github.com/bitcoin/bitcoin/commit/9632450ff65c1fee29c2564a6ad64dfaad4d663c.patch?full_index=1 -> ${PN}-30.2-multi_index-fix-compilation-failure-with-boost-1.91.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 +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=( + "${DISTDIR}/${PN}-30.2-multi_index-fix-compilation-failure-with-boost-1.91.patch" + "${FILESDIR}/30.0-cmake-syslibs.patch" + "${FILESDIR}/26.0-init.patch" + "${T}/${PN}-fix-mempool_updatefromblock.patch" +) + +efmt() { + : ${1:?} ; local l ; while read -r l ; do "${!#}" "${l}" ; done < <(fmt "${@:1:$#-1}") +} + +# lifted from https://gitlab.com/bitcoin/gentoo/-/blob/master/eclass/backports.eclass +backports_mod_strip() { + (( ${#} == 2 )) || die 'strip mod requires argument' + sed -ne ':0;/^diff --git a\/'"${2////\\/}"'/{:1;n;/^diff --git /!b1;b0};p' \ + -i "${1}" || die +} + +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 + + # https://github.com/bitcoin/bitcoin/pull/34136 + cp -- "${DISTDIR}/${PN}-fix-mempool_updatefromblock.patch" "${T}/" || die + backports_mod_strip "${T}/${PN}-fix-mempool_updatefromblock.patch" 'ci/' + + 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-31.0.ebuild b/net-p2p/bitcoin-core/bitcoin-core-31.0.ebuild index 39c4515e46c4..a63ac3455ad3 100644 --- a/net-p2p/bitcoin-core/bitcoin-core-31.0.ebuild +++ b/net-p2p/bitcoin-core/bitcoin-core-31.0.ebuild @@ -9,7 +9,10 @@ inherit bash-completion-r1 check-reqs cmake desktop edo multiprocessing python-a 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" +SRC_URI=" + https://github.com/bitcoin/bitcoin/archive/v${PV/_rc/rc}.tar.gz -> ${P}.tar.gz + https://github.com/bitcoin/bitcoin/commit/0bc9d354dfd8074d1c36a891a69b6585a8775c65.patch?full_index=1 -> ${PN}-31.0-multi_index-fix-compilation-failure-with-boost-1.91.patch +" S="${WORKDIR}/${PN/-core}-${PV/_rc/rc}" LICENSE="MIT" @@ -88,6 +91,7 @@ DOCS=( ) PATCHES=( + "${DISTDIR}/${PN}-31.0-multi_index-fix-compilation-failure-with-boost-1.91.patch" "${FILESDIR}/30.0-cmake-syslibs.patch" "${FILESDIR}/26.0-init.patch" ) diff --git a/net-p2p/rtorrent/Manifest b/net-p2p/rtorrent/Manifest index 0f79f0a82b84..3b5e03da297e 100644 --- a/net-p2p/rtorrent/Manifest +++ b/net-p2p/rtorrent/Manifest @@ -1,3 +1,4 @@ DIST rtorrent-0.15.7.tar.gz 866976 BLAKE2B e826f55b7411d0f11278a64b1851d4b5ff479b6872e513466d484000032a22d56025d4b04246ecd31b3229d71c0cb9738ac8bb76ed41865ef67dc27e4fe15b6c SHA512 99d8e276fb4044b123a5d8f147f8de521d228087ea13ce702cb8d601a14ce6b69cfbeb9a3d6ff394d49a5b0ae0a597c2dbafa687b550835ba5372e094c6b8ce6 DIST rtorrent-0.16.11.tar.gz 858663 BLAKE2B f71f65e87c4752f44371b50bbd5862e557ffe6583096b15119037551b43d2ebfa94d3af430d07f3a46f455d6e4f2376dc2730883b1f0d75f230b7d4fe7ab4da7 SHA512 e156bdf923b8a07755aa061459042c1ed2970d64adca8e177125e7b1c2329edaeb4a8f134ec278d5a83ae844c514ca6a124645f6df01876640a67a273906b5f8 DIST rtorrent-0.16.13.tar.gz 870773 BLAKE2B 1fe4489e7ab76730c156bcad020104084b116749cc1c38e441a06676642c3337814ae03bfb4f3279c7ac881483fbc234e09f9e42ed381772eef888b7bbbed12e SHA512 56f5860e81b148014bdb567a8b0d34979fbbbfed0a6a453e861b8f7444b88af9fd62fc7e90644254b79f73c4c58016c9a57a550596fcb51f4c9e64262610eea0 +DIST rtorrent-0.16.14.tar.gz 868131 BLAKE2B 072382493b8e0e782664f0b47ddaeb5e2314cfe3637e388503709fa8f391dd158f9635f192f8056dbc6d11ce0e580e5469b6bc3e8d6358e43c907e6c4739bcc0 SHA512 27ff4bb7bbba0134fe470a7da437497b6696fb4975745f5438b34278a9d6a2080c2467e070ac74b3610ad6e1ae90e7958aaf83f86eeea1e1526e8cc2d60531d7 diff --git a/net-p2p/rtorrent/files/rtorrent-r1.init b/net-p2p/rtorrent/files/rtorrent-r1.init index e16f262bfbe3..9564b333f27e 100644 --- a/net-p2p/rtorrent/files/rtorrent-r1.init +++ b/net-p2p/rtorrent/files/rtorrent-r1.init @@ -4,10 +4,11 @@ description="rTorrent BitTorrent client" command="/usr/bin/rtorrent" -command_args="-o system.daemon.set=true" +command_args="-o system.daemon.set=true ${EXTRA_ARGS}" command_background=true command_user="${USER}" pidfile="/run/rtorrent.pid" +output_log="${LOGFILE:-/dev/null}" depend() { diff --git a/net-p2p/rtorrent/files/rtorrentd.conf b/net-p2p/rtorrent/files/rtorrentd.conf index 5ff2328b2544..79e6a9acac2c 100644 --- a/net-p2p/rtorrent/files/rtorrentd.conf +++ b/net-p2p/rtorrent/files/rtorrentd.conf @@ -1 +1,6 @@ USER="$USER" + +# Extra arguments. See rtorrent -h for additional info. +EXTRA_ARGS="" + +#LOGFILE="/var/log/rtorrent/rtorrent.log" diff --git a/net-p2p/rtorrent/rtorrent-0.16.14.ebuild b/net-p2p/rtorrent/rtorrent-0.16.14.ebuild new file mode 100644 index 000000000000..571bf34c59f5 --- /dev/null +++ b/net-p2p/rtorrent/rtorrent-0.16.14.ebuild @@ -0,0 +1,120 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# require 64-bit integer +LUA_COMPAT=( lua5-{1,3,4} luajit ) + +inherit autotools lua-single systemd toolchain-funcs + +DESCRIPTION="BitTorrent Client using libtorrent" +HOMEPAGE="https://rtorrent.net" +if [[ ${PV} == *9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/rakshasa/${PN}.git" +else + SRC_URI="https://github.com/rakshasa/rtorrent/releases/download/v${PV}/${P}.tar.gz" + KEYWORDS="~amd64 ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-macos ~x64-solaris" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="debug lua +ncurses selinux systemd test tinyxml2 xmlrpc" +RESTRICT="!test? ( test )" +REQUIRED_USE=" + lua? ( ${LUA_REQUIRED_USE} ) + tinyxml2? ( !xmlrpc ) +" + +COMMON_DEPEND=" + ~net-libs/libtorrent-${PV} + virtual/zlib:= + lua? ( ${LUA_DEPS} ) + ncurses? ( sys-libs/ncurses:0= ) + systemd? ( sys-apps/systemd:= ) + xmlrpc? ( dev-libs/xmlrpc-c:=[libxml2] ) +" +DEPEND="${COMMON_DEPEND} + dev-cpp/nlohmann_json + test? ( dev-util/cppunit ) +" +RDEPEND="${COMMON_DEPEND} + selinux? ( sec-policy/selinux-rtorrent ) +" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${PN}-0.16.13-cross_checks.patch +) + +DOCS=( doc/rtorrent.rc ) + +pkg_setup() { + use lua && lua-single_pkg_setup +} + +src_prepare() { + default + + # use system-json + rm -r src/rpc/nlohmann || die + sed -e 's@"rpc/nlohmann/json.h"@<nlohmann/json.hpp>@' \ + -i src/rpc/jsonrpc.cc || die + + # https://github.com/rakshasa/rtorrent/issues/332 + cp "${FILESDIR}"/rtorrent.1 "${S}"/doc/ || die + + eautoreconf +} + +src_configure() { + tc-export PKG_CONFIG + local myeconfargs=( + $(use_enable debug) + $(use_with lua) + $(usev !ncurses --without-ncurses) + $(use_with systemd) + $(usev xmlrpc --with-xmlrpc-c="${PKG_CONFIG}") + $(usev tinyxml2 --with-xmlrpc-tinyxml2) + ) + + use lua && myeconfargs+=( + LUA_INCLUDE="$(lua_get_CFLAGS)" + LUA_LIB="$(lua_get_LIBS)" + LUA_VERSION="${ELUA/lua/}" + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + doman doc/rtorrent.1 + + # lua file is installed then in the proper directory + rm "${ED}"/usr/share/rtorrent/lua/rtorrent.lua || die + if use lua; then + insinto $(lua_get_lmod_dir) + doins lua/${PN}.lua + fi + + newinitd "${FILESDIR}/rtorrent-r1.init" rtorrent + newconfd "${FILESDIR}/rtorrentd.conf" rtorrent + systemd_newunit "${FILESDIR}/rtorrentd_at-r1.service" "rtorrentd@.service" +} + +pkg_postinst() { + einfo "This release could deprecate or introduce commands to configure RTorrent." + einfo "Please read the release notes before restarting:" + einfo "https://github.com/rakshasa/rtorrent/releases" + einfo "" + einfo "For configuration assistance, see:" + einfo "https://github.com/rakshasa/rtorrent/wiki" + + if ! use ncurses; then + einfo "${PN} was installed without ncurses support." + einfo "It can only be launched using:" + einfo "rtorrent -o system.daemon.set=true" + fi +} diff --git a/net-p2p/rtorrent/rtorrent-9999.ebuild b/net-p2p/rtorrent/rtorrent-9999.ebuild index 3087c8484104..571bf34c59f5 100644 --- a/net-p2p/rtorrent/rtorrent-9999.ebuild +++ b/net-p2p/rtorrent/rtorrent-9999.ebuild @@ -65,11 +65,6 @@ src_prepare() { # https://github.com/rakshasa/rtorrent/issues/332 cp "${FILESDIR}"/rtorrent.1 "${S}"/doc/ || die - if [[ ${CHOST} != *-darwin* ]]; then - # syslibroot is only for macos, change to sysroot for others - sed -i 's/Wl,-syslibroot,/Wl,--sysroot,/' "${S}/scripts/common.m4" || die - fi - eautoreconf } @@ -110,7 +105,7 @@ src_install() { } pkg_postinst() { - einfo "This release could introduce new commands to configure RTorrent." + einfo "This release could deprecate or introduce commands to configure RTorrent." einfo "Please read the release notes before restarting:" einfo "https://github.com/rakshasa/rtorrent/releases" einfo "" |
