diff options
Diffstat (limited to 'net-p2p')
-rw-r--r-- | net-p2p/Manifest.gz | bin | 7602 -> 7598 bytes | |||
-rw-r--r-- | net-p2p/bitcoin-cli/Manifest | 3 | ||||
-rw-r--r-- | net-p2p/bitcoin-cli/bitcoin-cli-24.0.1.ebuild | 77 | ||||
-rw-r--r-- | net-p2p/bitcoin-cli/files/24.0.1-syslibs.patch | 281 | ||||
-rw-r--r-- | net-p2p/bitcoin-qt/Manifest | 3 | ||||
-rw-r--r-- | net-p2p/bitcoin-qt/bitcoin-qt-24.0.1.ebuild | 159 | ||||
-rw-r--r-- | net-p2p/bitcoin-qt/files/24.0.1-syslibs.patch | 281 | ||||
-rw-r--r-- | net-p2p/bitcoind/Manifest | 3 | ||||
-rw-r--r-- | net-p2p/bitcoind/bitcoind-24.0.1.ebuild | 162 | ||||
-rw-r--r-- | net-p2p/bitcoind/files/24.0.1-syslibs.patch | 281 |
10 files changed, 1250 insertions, 0 deletions
diff --git a/net-p2p/Manifest.gz b/net-p2p/Manifest.gz Binary files differindex f25c57ccda33..a969816dded3 100644 --- a/net-p2p/Manifest.gz +++ b/net-p2p/Manifest.gz diff --git a/net-p2p/bitcoin-cli/Manifest b/net-p2p/bitcoin-cli/Manifest index 7bc2e5f14d59..e0b809ea94ec 100644 --- a/net-p2p/bitcoin-cli/Manifest +++ b/net-p2p/bitcoin-cli/Manifest @@ -1,7 +1,10 @@ +AUX 24.0.1-syslibs.patch 9037 BLAKE2B fa634a8f18d1f1c32d1c3cb18bdfcafc89838a7f5b3a075a40ad3354d1253f1d637351d2661475eb86110db470a7b29c9cfb6266a7f61623c0865939c9e74453 SHA512 fcf8114174e69c5385058b190fa2c0b0ef105869d5d6a40a3cc6bb8e8ef1518cb8bc1fb7cc3a7ec28f361d91f66e4253420c2b50a0004a2dc0978910254cae3d DIST bitcoin-0.21.0.knots20210130.patches.tar.xz 505040 BLAKE2B c8999de4158b8781bba6ad014ae14859f1e0bab3080c59a18910cf7447eb56da4b17a0e1843fdd3669d22636df9e4ddcc4526e4293bfd86dc884983a29a5f76c SHA512 7ee27da3d26be0e93ecddff7bb21ef1746bcdb07f9a2b0ea48065367b4c44391e974e04a21e511c05fca8f55971ab8e3c3ac01a3775cc52a537d9e10966d9871 DIST bitcoin-22.0.knots20211108.patches.tar.xz 1318256 BLAKE2B d6e56bc0ca1d706e99e7f42d8f335f016335b6bf3637c733d993696872f0a4c655cc58fc0394dfdf9916e13f0d7fbdcebf25fbdc9a165227e3c59133033644c0 SHA512 daab5860b7c7e137b6bf350cdc153e6e19172e49935640d1f6fe1f1be1e4df805b1db7fd30b0f95a560106956adab70cc6282fe933ae9de153cb971dd280f83d +DIST bitcoin-24.0.1.tar.gz 11412628 BLAKE2B 2a8c83aecd12d8d40305d78ede1f389884ee62cfe4af39a9b416b8887a595f3393d599ebe9ddeb576bba5896923feb7ee45ba32d7d4cb0ce9e6d0ef39ecf83c7 SHA512 de1ddb543429f70b0b55a46500e0bc4807cca1b1655a28f8ab186d6f6e620f8cf82420bbdf412976ffed9bc6d742926b19933429c734edaf7430a4f8c37e1685 DIST bitcoin-v0.21.0.tar.gz 7533957 BLAKE2B 01247cbb9fca2381a8c08ab1c88c479c640963caef22e4207aab46b05813dbf2a5286ac9e98132fb34db0e9ac6c18c79e45a89de166f5c6d480d8ac6e14ecca2 SHA512 c58187996932b0151432a65885b7e8a7b216fb1ab0576fb7d4b5e9620d957594b05e181153e2e0e50bcd5ce764861ec11019ffbb1095d3e704f441e61ac6a04f DIST bitcoin-v22.0.tar.gz 7977783 BLAKE2B ba212037bc8efcfbbbf6340c48ed886c4a5aa93e4a34097eafea39734a6f4e25fa6b174f894655f63c504380d8761657771795bfcc641018bf1f1661deef9321 SHA512 1b4b17360e97f390ae678adb7a239c359d3a1288799710683e26f09fc53341b6fca3211465fa3e4fdee37324d85ec1a31ffd1a3714e969df13441f755fa4b7ad EBUILD bitcoin-cli-0.21.0.ebuild 2392 BLAKE2B 814a5a4e662a5d6f4f382535b57137404361a460f8d88130677d574c7ce54926b147a5d3cba2775393f10a41a826b77b3ea612ff599dace61bc1c2eb07511ce7 SHA512 078f07ea656c7db87b4266d188c5394cf45266c40a5ee63fb070b7a3abfd83366df5ca18549ca3b2af5261cdce1cb208a8fc8a232277c7b8e394fc1b6889f95f EBUILD bitcoin-cli-22.0.ebuild 2596 BLAKE2B 05c1d22d1b33fdabb77b289591fb8b8fa85f520a8361dbcc648193f476cbd29d3e976d2245b075bb1c62be362d394cfa5bd3ad7e0ac3afae7cefc0787e86a57b SHA512 9522cf5e9543902e609b8022ae657b489014c3d98f6065a0348f0c38aeb0389d12908ff38482cb469c62a8a549419aa687844d28cb2a221ebea03786bb25c761 +EBUILD bitcoin-cli-24.0.1.ebuild 1425 BLAKE2B 6128dab65d8dea1ec8265fed55e0defb4ce11652cc6bdddb422d847b0d0389cfbdc96e2e99e63786d6aa90e652a1a065449cef87c028bea1dd8e16a8e41071b0 SHA512 4f82520d3a14c7118c212cd189132217d506a712c8e886e4ff96d76a950dc519077354430f3012eee7fa08643b45bfb2b5389d42fc7ecceb2e002e9ddfa3ada9 MISC metadata.xml 794 BLAKE2B d7258cb6e38b7f95f72212b3d67f2a6c4f69b8a94a55d46189b970bca6c56ba23ec44b1c36a6b4bce19ba65be0b8879fd8240a48324c296d72d0d87e52e41568 SHA512 ef417ee4a492db03efa50d88b16b35a1b1768b7b04aaecd8676539572f25b96a427caab6dae9f5568241e5f1eda06159bd9a52b12a9002c0611b349ad2656470 diff --git a/net-p2p/bitcoin-cli/bitcoin-cli-24.0.1.ebuild b/net-p2p/bitcoin-cli/bitcoin-cli-24.0.1.ebuild new file mode 100644 index 000000000000..cbf563fcda34 --- /dev/null +++ b/net-p2p/bitcoin-cli/bitcoin-cli-24.0.1.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools bash-completion-r1 + +DESCRIPTION="Command-line JSON-RPC client specifically for interfacing with bitcoind" +HOMEPAGE="https://bitcoincore.org/" +SRC_URI=" + https://bitcoincore.org/bin/bitcoin-core-${PV}/${P/-cli}.tar.gz +" +S="${WORKDIR}"/${P/-cli} + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" + +RDEPEND=" + dev-libs/boost:= + dev-libs/libevent:= +" +DEPEND="${RDEPEND}" + +DOCS=( doc/release-notes.md ) + +PATCHES=( + "${FILESDIR}"/24.0.1-syslibs.patch +) + +pkg_pretend() { + elog "You are building ${PN} from Bitcoin Core." + elog "For more information, see:" + elog "https://bitcoincore.org/en/releases/${PV}/" +} + +src_prepare() { + default + + eautoreconf + + rm -r src/leveldb src/secp256k1 || die +} + +src_configure() { + local myeconfargs=( + --disable-asm + --without-qtdbus + --disable-ebpf + --without-natpmp + --without-qrencode + --without-miniupnpc + --disable-tests + --disable-wallet + --disable-zmq + --enable-util-cli + --disable-util-tx + --disable-util-util + --disable-util-wallet + --disable-bench + --without-libs + --without-daemon + --without-gui + --disable-fuzz + --disable-fuzz-binary + --disable-ccache + --disable-static + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + newbashcomp contrib/bitcoin-cli.bash-completion ${PN} +} diff --git a/net-p2p/bitcoin-cli/files/24.0.1-syslibs.patch b/net-p2p/bitcoin-cli/files/24.0.1-syslibs.patch new file mode 100644 index 000000000000..00404a2ff021 --- /dev/null +++ b/net-p2p/bitcoin-cli/files/24.0.1-syslibs.patch @@ -0,0 +1,281 @@ +Originally based on 22.0-fix_build_without_leveldb.patch. + +- Allow system libsecp256k1 +- Allow system leveldb +- Abort if runtime leveldb != compiled-against leveldb +- Handle berkdb support being disabled better +--- a/configure.ac ++++ b/configure.ac +@@ -1362,6 +1362,23 @@ if test "$enable_fuzz_binary" = "yes"; then + CHECK_RUNTIME_LIB + fi + ++dnl Check for libsecp256k1, only if explicitly requested ++AC_ARG_WITH([system-libsecp256k1], ++ [AS_HELP_STRING([--with-system-libsecp256k1], ++ [Build with system libsecp256k1 (default is no; DANGEROUS; NOT SUPPORTED)])], ++ [system_libsecp256k1=$withval], ++ [system_libsecp256k1=no] ++) ++if test x$system_libsecp256k1 != xno; then ++ PKG_CHECK_MODULES([libsecp256k1],[libsecp256k1],,[true]) ++else ++ libsecp256k1_CFLAGS='-I$(srcdir)/secp256k1/include' ++ libsecp256k1_LIBS='secp256k1/libsecp256k1.la' ++fi ++AM_CONDITIONAL([EMBEDDED_LIBSECP256K1],[test x$system_libsecp256k1 = xno]) ++AC_SUBST(libsecp256k1_CFLAGS) ++AC_SUBST(libsecp256k1_LIBS) ++ + if test "$enable_wallet" != "no"; then + dnl Check for libdb_cxx only if wallet enabled + if test "$use_bdb" != "no"; then +@@ -1413,11 +1430,76 @@ if test "$use_usdt" != "no"; then + fi + AM_CONDITIONAL([ENABLE_USDT_TRACEPOINTS], [test "$use_usdt" = "yes"]) + ++build_leveldb=yes + if test "$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_util$build_bitcoind$bitcoin_enable_qt$use_bench$use_tests" = "nonononononono"; then + use_upnp=no + use_natpmp=no + use_zmq=no ++ build_leveldb=no ++fi ++ ++if test x$build_leveldb = xno; then ++ system_leveldb=no ++fi ++dnl Check for leveldb, only if explicitly requested ++if test x$system_leveldb != xno; then ++ build_leveldb=no ++ LEVELDB_CPPFLAGS= ++ AC_CHECK_LIB([leveldb],[main],[ ++ LIBLEVELDB=-lleveldb ++ ],[ ++ AC_MSG_ERROR([leveldb library not found; using --with-system-leveldb is not supported anyway]) ++ ]) ++ AC_CHECK_HEADER([leveldb/filter_policy.h],[],[ ++ AC_MSG_ERROR([LevelDB headers not found; using --with-system-leveldb is not supported anyway]) ++ ]) ++ AC_CHECK_HEADER([leveldb/helpers/memenv.h],[ ++ AC_MSG_CHECKING([for memenv.h path]) ++ BITCOIN_SUBDIR_TO_INCLUDE([LEVELDB_CPPFLAGS],[leveldb/helpers/],[memenv]) ++ ],[ ++ AC_CHECK_HEADER([memenv.h],[],[ ++ AC_MSG_ERROR([LevelDB headers not found; using --with-system-leveldb is not supported anyway]) ++ ]) ++ ]) ++ ++ AC_MSG_CHECKING([library containing leveldb::NewMemEnv]) ++ TEMP_LIBS="$LIBS" ++ TEMP_CPPFLAGS="$CPPFLAGS" ++ CPPFLAGS="$CPPFLAGS $LEVELDB_CPPFLAGS" ++ for searchlib in "" "-lmemenv" ERR; do ++ if test "x$searchlib" = "xERR"; then ++ AC_MSG_RESULT([no]) ++ AC_MSG_ERROR([LevelDB's memenv helper not found; using --with-system-leveldb is not supported anyway]) ++ fi ++ searchlib="$searchlib $LIBLEVELDB" ++ LIBS="$searchlib $TEMP_LIBS" ++ AC_LINK_IFELSE([AC_LANG_SOURCE([ ++ #include <leveldb/env.h> ++ #include <leveldb/helpers/memenv.h> ++ ++ int main() { ++ leveldb::Env *myenv = leveldb::NewMemEnv(leveldb::Env::Default()); ++ delete myenv; ++ } ++ ])],[ ++ AC_MSG_RESULT([$searchlib]) ++ LIBMEMENV="$searchlib" ++ break ++ ]) ++ done ++ LIBS="$TEMP_LIBS" ++ CPPFLAGS="$TEMP_CPPFLAGS" + fi ++AM_CONDITIONAL([EMBEDDED_LEVELDB],[test x$build_leveldb = xyes]) ++AC_SUBST(LEVELDB_CPPFLAGS) ++AC_SUBST(LIBLEVELDB) ++AC_SUBST(LIBMEMENV) ++AC_ARG_WITH([system-leveldb], ++ [AS_HELP_STRING([--with-system-leveldb], ++ [Build with system LevelDB (default is no; DANGEROUS; NOT SUPPORTED)])], ++ [system_leveldb=$withval], ++ [system_leveldb=no] ++) + + dnl Check for libminiupnpc (optional) + if test "$use_upnp" != "no"; then +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -23,7 +23,7 @@ noinst_PROGRAMS = + TESTS = + BENCHMARKS = + +-BITCOIN_INCLUDES=-I$(builddir) -I$(srcdir)/$(MINISKETCH_INCLUDE_DIR_INT) -I$(srcdir)/secp256k1/include -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT) $(LEVELDB_CPPFLAGS) ++BITCOIN_INCLUDES=-I$(builddir) -I$(srcdir)/$(MINISKETCH_INCLUDE_DIR_INT) $(libsecp256k1_CFLAGS) -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT) $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) + + LIBBITCOIN_NODE=libbitcoin_node.a + LIBBITCOIN_COMMON=libbitcoin_common.a +@@ -32,7 +32,11 @@ LIBBITCOIN_CLI=libbitcoin_cli.a + LIBBITCOIN_UTIL=libbitcoin_util.a + LIBBITCOIN_CRYPTO_BASE=crypto/libbitcoin_crypto_base.la + LIBBITCOINQT=qt/libbitcoinqt.a ++if EMBEDDED_LIBSECP256K1 + LIBSECP256K1=secp256k1/libsecp256k1.la ++else ++LIBSECP256K1=$(libsecp256k1_LIBS) ++endif + + if ENABLE_ZMQ + LIBBITCOIN_ZMQ=libbitcoin_zmq.a +@@ -67,8 +71,10 @@ LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_ARM_SHANI) + endif + noinst_LTLIBRARIES += $(LIBBITCOIN_CRYPTO) + ++if EMBEDDED_LIBSECP256K1 + $(LIBSECP256K1): $(wildcard secp256k1/src/*.h) $(wildcard secp256k1/src/*.c) $(wildcard secp256k1/include/*) + $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) ++endif + + # Make is not made aware of per-object dependencies to avoid limiting building parallelization + # But to build the less dependent modules first, we manually select their order here: +@@ -1080,7 +1086,9 @@ endif + include Makefile.minisketch.include + + include Makefile.crc32c.include ++if EMBEDDED_LEVELDB + include Makefile.leveldb.include ++endif + + include Makefile.test_util.include + include Makefile.test_fuzz.include +--- a/src/Makefile.test.include ++++ b/src/Makefile.test.include +@@ -377,8 +377,9 @@ if ENABLE_BENCH + $(BENCH_BINARY) --sanity-check > /dev/null + endif + endif ++if EMBEDDED_LIBSECP256K1 + $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check +- ++endif + if ENABLE_TESTS + UNIVALUE_TESTS = univalue/test/object univalue/test/unitester + noinst_PROGRAMS += $(UNIVALUE_TESTS) +--- a/src/dbwrapper.cpp ++++ b/src/dbwrapper.cpp +@@ -7,26 +7,45 @@ + #include <fs.h> + #include <logging.h> + #include <random.h> ++#include <node/interface_ui.h> + #include <tinyformat.h> + #include <util/strencodings.h> + #include <util/system.h> ++#include <util/translation.h> + + #include <algorithm> + #include <cassert> + #include <cstdarg> + #include <cstdint> + #include <cstdio> ++#include <leveldb/c.h> + #include <leveldb/cache.h> + #include <leveldb/db.h> + #include <leveldb/env.h> + #include <leveldb/filter_policy.h> +-#include <leveldb/helpers/memenv/memenv.h> ++#include <leveldb/helpers/memenv.h> + #include <leveldb/iterator.h> + #include <leveldb/options.h> + #include <leveldb/status.h> + #include <memory> + #include <optional> + ++bool dbwrapper_SanityCheck() ++{ ++ unsigned long header_version = (leveldb::kMajorVersion << 16) | leveldb::kMinorVersion; ++ unsigned long library_version = (leveldb_major_version() << 16) | leveldb_minor_version(); ++ ++ if (header_version != library_version) { ++ InitError(Untranslated(strprintf("Compiled with LevelDB %d.%d, but linked with LevelDB %d.%d (incompatible).", ++ leveldb::kMajorVersion, leveldb::kMinorVersion, ++ leveldb_major_version(), leveldb_minor_version() ++ ))); ++ return false; ++ } ++ ++ return true; ++} ++ + class CBitcoinLevelDBLogger : public leveldb::Logger { + public: + // This code is adapted from posix_logger.h, which is why it is using vsprintf. +--- a/src/dbwrapper.h ++++ b/src/dbwrapper.h +@@ -31,6 +31,8 @@ class Env; + static const size_t DBWRAPPER_PREALLOC_KEY_SIZE = 64; + static const size_t DBWRAPPER_PREALLOC_VALUE_SIZE = 1024; + ++bool dbwrapper_SanityCheck(); ++ + class dbwrapper_error : public std::runtime_error + { + public: +--- a/src/kernel/checks.cpp ++++ b/src/kernel/checks.cpp +@@ -3,9 +3,10 @@ + // file COPYING or http://www.opensource.org/licenses/mit-license.php. + + #include <kernel/checks.h> +- ++#include <dbwrapper.h> + #include <key.h> + #include <random.h> ++#include <node/interface_ui.h> + #include <util/time.h> + #include <util/translation.h> + +@@ -15,6 +16,10 @@ namespace kernel { + + std::optional<bilingual_str> SanityChecks(const Context&) + { ++ if (!dbwrapper_SanityCheck()) { ++ return Untranslated("Database sanity check failure. Aborting."); ++ } ++ + if (!ECC_InitSanityCheck()) { + return Untranslated("Elliptic curve cryptography sanity check failure. Aborting."); + } +--- a/src/qt/createwalletdialog.cpp ++++ b/src/qt/createwalletdialog.cpp +@@ -12,6 +12,7 @@ + + #include <qt/guiutil.h> + ++#include <QMessageBox> + #include <QPushButton> + + CreateWalletDialog::CreateWalletDialog(QWidget* parent) : +@@ -94,9 +95,16 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) : + ui->external_signer_checkbox->setChecked(false); + #endif + +-#ifndef USE_BDB +- ui->descriptor_checkbox->setEnabled(false); +- ui->descriptor_checkbox->setChecked(true); ++#ifdef USE_BDB ++ connect(ui->buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); ++#else ++ connect(ui->buttonBox, &QDialogButtonBox::accepted, [this]() { ++ if (!this->isDescriptorWalletChecked()) { ++ QMessageBox::critical(this, tr("Cannot create wallet"), tr("This build was compiled without BDB support, so only experimental descriptor wallets are supported.")); ++ return; ++ } ++ this->accept(); ++ }); + #endif + + #ifndef ENABLE_EXTERNAL_SIGNER diff --git a/net-p2p/bitcoin-qt/Manifest b/net-p2p/bitcoin-qt/Manifest index cf18777a07d6..4ae745fa700e 100644 --- a/net-p2p/bitcoin-qt/Manifest +++ b/net-p2p/bitcoin-qt/Manifest @@ -1,10 +1,13 @@ +AUX 24.0.1-syslibs.patch 9037 BLAKE2B fa634a8f18d1f1c32d1c3cb18bdfcafc89838a7f5b3a075a40ad3354d1253f1d637351d2661475eb86110db470a7b29c9cfb6266a7f61623c0865939c9e74453 SHA512 fcf8114174e69c5385058b190fa2c0b0ef105869d5d6a40a3cc6bb8e8ef1518cb8bc1fb7cc3a7ec28f361d91f66e4253420c2b50a0004a2dc0978910254cae3d AUX bitcoin-qt-0.20.1-boost-1.77-compat.patch 2255 BLAKE2B 9a65c1640fd4090840070865265b7529324e850a7f34cc13c6e6a940f0a706cf5b3849497044233f3cf5b3fde177afb4d160ded2ed3a8adfc0ae8d488724539f SHA512 f1326a67749949efee07e01175b227ff16fda8f88e0a956598013399ad3b0ae652bb3206a0ce08edfbf4a712d523f2018de684d4c747c9d234d1fab6088e42ad AUX bitcoin-qt.protocol 150 BLAKE2B b18645f52a6884fc0e475a85809d5b79e207adc346307623c5f1edececcb4564ac17bdb9a0deeb5c12c41409a34f83c1f22ab89f32852c58d948affa1de57edb SHA512 6b71d9d3fc9e05e6c6595aaaa307be9b5007c25f4b11162c5d873e200576d35156c2c660f229799400a3fba6dc8a9663ff8824371d83242d52ee6472687118ab AUX org.bitcoin.bitcoin-qt.desktop 468 BLAKE2B e00d41612be14770d1f34b83f98a104aed197eb62707382a0189c5b9559f572336e8d236dcd290e1a4a43df041bfdef23209e1533401659228af8b004c9b3d76 SHA512 0cecb04d7813bcc0e5c9f1a5dfc32859708d3524548f6dcee33ba9fd600a7000f64b3d5f2dbdc1dcfce0a68fd82ea932b338da77ad495ebc03b097f462a75d88 DIST bitcoin-0.21.0.knots20210130.patches.tar.xz 505040 BLAKE2B c8999de4158b8781bba6ad014ae14859f1e0bab3080c59a18910cf7447eb56da4b17a0e1843fdd3669d22636df9e4ddcc4526e4293bfd86dc884983a29a5f76c SHA512 7ee27da3d26be0e93ecddff7bb21ef1746bcdb07f9a2b0ea48065367b4c44391e974e04a21e511c05fca8f55971ab8e3c3ac01a3775cc52a537d9e10966d9871 DIST bitcoin-22.0.knots20211108.patches.tar.xz 1318256 BLAKE2B d6e56bc0ca1d706e99e7f42d8f335f016335b6bf3637c733d993696872f0a4c655cc58fc0394dfdf9916e13f0d7fbdcebf25fbdc9a165227e3c59133033644c0 SHA512 daab5860b7c7e137b6bf350cdc153e6e19172e49935640d1f6fe1f1be1e4df805b1db7fd30b0f95a560106956adab70cc6282fe933ae9de153cb971dd280f83d +DIST bitcoin-24.0.1.tar.gz 11412628 BLAKE2B 2a8c83aecd12d8d40305d78ede1f389884ee62cfe4af39a9b416b8887a595f3393d599ebe9ddeb576bba5896923feb7ee45ba32d7d4cb0ce9e6d0ef39ecf83c7 SHA512 de1ddb543429f70b0b55a46500e0bc4807cca1b1655a28f8ab186d6f6e620f8cf82420bbdf412976ffed9bc6d742926b19933429c734edaf7430a4f8c37e1685 DIST bitcoin-v0.21.0.tar.gz 7533957 BLAKE2B 01247cbb9fca2381a8c08ab1c88c479c640963caef22e4207aab46b05813dbf2a5286ac9e98132fb34db0e9ac6c18c79e45a89de166f5c6d480d8ac6e14ecca2 SHA512 c58187996932b0151432a65885b7e8a7b216fb1ab0576fb7d4b5e9620d957594b05e181153e2e0e50bcd5ce764861ec11019ffbb1095d3e704f441e61ac6a04f DIST bitcoin-v22.0.tar.gz 7977783 BLAKE2B ba212037bc8efcfbbbf6340c48ed886c4a5aa93e4a34097eafea39734a6f4e25fa6b174f894655f63c504380d8761657771795bfcc641018bf1f1661deef9321 SHA512 1b4b17360e97f390ae678adb7a239c359d3a1288799710683e26f09fc53341b6fca3211465fa3e4fdee37324d85ec1a31ffd1a3714e969df13441f755fa4b7ad EBUILD bitcoin-qt-0.21.0.ebuild 4935 BLAKE2B 5483b44409cac50b71ee0298be28538e25ebc3e40ac50730a1d31575f9f82c165edca17ae0b43da6c9023c3e0f0088b18df0fa7f0d9a83ccacb6380b04620bab SHA512 c04215777cd7ac8a27c965151bad35ce89b4d7f1d4eb5b9c2a120ca053af6be640516c810d3f42c9c1fa1c6b6c0cb7a5d030ba5bba00757dcbcf6a47c230b61b EBUILD bitcoin-qt-22.0.ebuild 6217 BLAKE2B 38dd68fb740efd51c131edbdc1b1bd59aa91c4a3fca89bd1510b7ee59953a021f9504c94967c75ea09db128c7d0d07bfcba5534e623b813f2e516ab9ac4c8d4b SHA512 14a190c28acc6fa618a341220a51d86f0f8c648a6f9f05f88e8593471678285016ba3444e93c261d5e3736df434977577e23bcf869aab406e26c3e01d4ae04bd +EBUILD bitcoin-qt-24.0.1.ebuild 3881 BLAKE2B bd0a8155afb55c5c3f6b355460da406a1e92fe19ee908742ee7d49e7db9ae2c6e13bb6d7355c2a8718fca3f419f3a86c9d5df36ec45e523189a4d9c878e0c77b SHA512 9f82b1c9078bf94d3a8f05941968a1d07dfa8444c6f972b5561bc105dd29d3a2db383cfcb1a9fcbd822db816f748848f6b8c472bbf371cfde0fd24f8cab907eb MISC metadata.xml 1434 BLAKE2B e6e1f0ffac2e6be3bc19fe8bb8e9b18b5b50da6255d70d92fdc28a6e040b54ed4d5b94643835043eb64eae0273111f73c30e93a6d9b7203368aeedb880961c8a SHA512 5e7f2f044b27e4ac21d1e18d177bb1bd493feaad5598ad44abed8a0053403565100877498da29aa4f35e59d570d2a499daea58285dd59f3e62eafba7ee3460e7 diff --git a/net-p2p/bitcoin-qt/bitcoin-qt-24.0.1.ebuild b/net-p2p/bitcoin-qt/bitcoin-qt-24.0.1.ebuild new file mode 100644 index 000000000000..76fdba8ff317 --- /dev/null +++ b/net-p2p/bitcoin-qt/bitcoin-qt-24.0.1.ebuild @@ -0,0 +1,159 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DB_VER="4.8" +inherit autotools bash-completion-r1 db-use desktop xdg + +DESCRIPTION="An end-user Qt GUI for the Bitcoin crypto-currency" +HOMEPAGE="https://bitcoincore.org/" +SRC_URI=" + https://bitcoincore.org/bin/bitcoin-core-${PV}/${P/-qt}.tar.gz +" +S="${WORKDIR}"/${P/-qt} + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="+asm +berkdb dbus +external-signer kde nat-pmp +qrcode sqlite systemtap test upnp +wallet zeromq" +RESTRICT="!test? ( test )" + +REQUIRED_USE=" + sqlite? ( wallet ) + berkdb? ( wallet ) + wallet? ( || ( berkdb sqlite ) ) +" +# 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:= + >=dev-libs/libsecp256k1-0.2.0:=[recovery,schnorr] + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtnetwork:5 + dev-qt/qtwidgets:5 + virtual/bitcoin-leveldb + dbus? ( dev-qt/qtdbus:5 ) + dev-libs/libevent:= + nat-pmp? ( net-libs/libnatpmp ) + qrcode? ( + media-gfx/qrencode:= + ) + sqlite? ( >=dev-db/sqlite-3.7.17:= ) + upnp? ( >=net-libs/miniupnpc-1.9.20150916:= ) + berkdb? ( sys-libs/db:$(db_ver_to_slot "${DB_VER}")=[cxx] ) + zeromq? ( net-libs/zeromq:= ) +" +DEPEND=" + ${RDEPEND} + systemtap? ( dev-util/systemtap ) +" +BDEPEND="dev-qt/linguist-tools:5" + +DOCS=( + doc/bips.md + doc/bitcoin-conf.md + doc/descriptors.md + doc/files.md + doc/JSON-RPC-interface.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}"/24.0.1-syslibs.patch +) + +pkg_pretend() { + elog "You are building ${PN} from Bitcoin Core." + elog "For more information, see:" + elog "https://bitcoincore.org/en/releases/${PV}/" +} + +src_prepare() { + sed -i 's/^\(complete -F _bitcoind \)bitcoind \(bitcoin-qt\)$/\1\2/' contrib/bitcoind.bash-completion || die + + # Save the generic icon for later + cp src/qt/res/src/bitcoin.svg bitcoin128.svg || die + + default + + eautoreconf + + rm -r src/leveldb src/secp256k1 || die +} + +src_configure() { + local myeconfargs=( + $(use_enable asm) + $(use_with dbus qtdbus) + $(use_enable systemtap ebpf) + $(use_enable external-signer) + $(use_with nat-pmp natpmp) + $(use_with nat-pmp natpmp-default) + $(use_with qrcode qrencode) + $(use_with upnp miniupnpc) + $(use_enable upnp upnp-default) + $(use_enable test tests) + $(use_enable wallet) + $(use_enable zeromq zmq) + --with-gui=qt5 + --disable-util-cli + --disable-util-tx + --disable-util-util + --disable-util-wallet + --disable-bench + --without-libs + --without-daemon + --disable-fuzz + --disable-fuzz-binary + --disable-ccache + --disable-static + $(use_with berkdb bdb) + $(use_with sqlite) + --with-system-leveldb + --with-system-libsecp256k1 + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + if use test; then + rm -f "${ED}/usr/bin/test_bitcoin" || die + rm -f "${ED}/usr/bin/test_bitcoin-qt" || die + fi + + insinto /usr/share/icons/hicolor/scalable/apps/ + doins bitcoin128.svg + + cp "${FILESDIR}/org.bitcoin.bitcoin-qt.desktop" "${T}" || die + sed -i 's/Knots/Core/;s/^\(Icon=\).*$/\1bitcoin128/' "${T}/org.bitcoin.bitcoin-qt.desktop" || die + domenu "${T}/org.bitcoin.bitcoin-qt.desktop" + + use zeromq && dodoc doc/zmq.md + + newbashcomp contrib/bitcoind.bash-completion ${PN} + + if use kde; then + insinto /usr/share/kservices5 + doins "${FILESDIR}/bitcoin-qt.protocol" + dosym "../../kservices5/bitcoin-qt.protocol" "/usr/share/kde4/services/bitcoin-qt.protocol" + fi +} + +pkg_postinst() { + xdg_pkg_postinst + + elog "To have ${PN} automatically use Tor when it's running, be sure your" + elog "'torrc' config file has 'ControlPort' and 'CookieAuthentication' setup" + elog "correctly, and add your user to the 'tor' user group." +} diff --git a/net-p2p/bitcoin-qt/files/24.0.1-syslibs.patch b/net-p2p/bitcoin-qt/files/24.0.1-syslibs.patch new file mode 100644 index 000000000000..00404a2ff021 --- /dev/null +++ b/net-p2p/bitcoin-qt/files/24.0.1-syslibs.patch @@ -0,0 +1,281 @@ +Originally based on 22.0-fix_build_without_leveldb.patch. + +- Allow system libsecp256k1 +- Allow system leveldb +- Abort if runtime leveldb != compiled-against leveldb +- Handle berkdb support being disabled better +--- a/configure.ac ++++ b/configure.ac +@@ -1362,6 +1362,23 @@ if test "$enable_fuzz_binary" = "yes"; then + CHECK_RUNTIME_LIB + fi + ++dnl Check for libsecp256k1, only if explicitly requested ++AC_ARG_WITH([system-libsecp256k1], ++ [AS_HELP_STRING([--with-system-libsecp256k1], ++ [Build with system libsecp256k1 (default is no; DANGEROUS; NOT SUPPORTED)])], ++ [system_libsecp256k1=$withval], ++ [system_libsecp256k1=no] ++) ++if test x$system_libsecp256k1 != xno; then ++ PKG_CHECK_MODULES([libsecp256k1],[libsecp256k1],,[true]) ++else ++ libsecp256k1_CFLAGS='-I$(srcdir)/secp256k1/include' ++ libsecp256k1_LIBS='secp256k1/libsecp256k1.la' ++fi ++AM_CONDITIONAL([EMBEDDED_LIBSECP256K1],[test x$system_libsecp256k1 = xno]) ++AC_SUBST(libsecp256k1_CFLAGS) ++AC_SUBST(libsecp256k1_LIBS) ++ + if test "$enable_wallet" != "no"; then + dnl Check for libdb_cxx only if wallet enabled + if test "$use_bdb" != "no"; then +@@ -1413,11 +1430,76 @@ if test "$use_usdt" != "no"; then + fi + AM_CONDITIONAL([ENABLE_USDT_TRACEPOINTS], [test "$use_usdt" = "yes"]) + ++build_leveldb=yes + if test "$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_util$build_bitcoind$bitcoin_enable_qt$use_bench$use_tests" = "nonononononono"; then + use_upnp=no + use_natpmp=no + use_zmq=no ++ build_leveldb=no ++fi ++ ++if test x$build_leveldb = xno; then ++ system_leveldb=no ++fi ++dnl Check for leveldb, only if explicitly requested ++if test x$system_leveldb != xno; then ++ build_leveldb=no ++ LEVELDB_CPPFLAGS= ++ AC_CHECK_LIB([leveldb],[main],[ ++ LIBLEVELDB=-lleveldb ++ ],[ ++ AC_MSG_ERROR([leveldb library not found; using --with-system-leveldb is not supported anyway]) ++ ]) ++ AC_CHECK_HEADER([leveldb/filter_policy.h],[],[ ++ AC_MSG_ERROR([LevelDB headers not found; using --with-system-leveldb is not supported anyway]) ++ ]) ++ AC_CHECK_HEADER([leveldb/helpers/memenv.h],[ ++ AC_MSG_CHECKING([for memenv.h path]) ++ BITCOIN_SUBDIR_TO_INCLUDE([LEVELDB_CPPFLAGS],[leveldb/helpers/],[memenv]) ++ ],[ ++ AC_CHECK_HEADER([memenv.h],[],[ ++ AC_MSG_ERROR([LevelDB headers not found; using --with-system-leveldb is not supported anyway]) ++ ]) ++ ]) ++ ++ AC_MSG_CHECKING([library containing leveldb::NewMemEnv]) ++ TEMP_LIBS="$LIBS" ++ TEMP_CPPFLAGS="$CPPFLAGS" ++ CPPFLAGS="$CPPFLAGS $LEVELDB_CPPFLAGS" ++ for searchlib in "" "-lmemenv" ERR; do ++ if test "x$searchlib" = "xERR"; then ++ AC_MSG_RESULT([no]) ++ AC_MSG_ERROR([LevelDB's memenv helper not found; using --with-system-leveldb is not supported anyway]) ++ fi ++ searchlib="$searchlib $LIBLEVELDB" ++ LIBS="$searchlib $TEMP_LIBS" ++ AC_LINK_IFELSE([AC_LANG_SOURCE([ ++ #include <leveldb/env.h> ++ #include <leveldb/helpers/memenv.h> ++ ++ int main() { ++ leveldb::Env *myenv = leveldb::NewMemEnv(leveldb::Env::Default()); ++ delete myenv; ++ } ++ ])],[ ++ AC_MSG_RESULT([$searchlib]) ++ LIBMEMENV="$searchlib" ++ break ++ ]) ++ done ++ LIBS="$TEMP_LIBS" ++ CPPFLAGS="$TEMP_CPPFLAGS" + fi ++AM_CONDITIONAL([EMBEDDED_LEVELDB],[test x$build_leveldb = xyes]) ++AC_SUBST(LEVELDB_CPPFLAGS) ++AC_SUBST(LIBLEVELDB) ++AC_SUBST(LIBMEMENV) ++AC_ARG_WITH([system-leveldb], ++ [AS_HELP_STRING([--with-system-leveldb], ++ [Build with system LevelDB (default is no; DANGEROUS; NOT SUPPORTED)])], ++ [system_leveldb=$withval], ++ [system_leveldb=no] ++) + + dnl Check for libminiupnpc (optional) + if test "$use_upnp" != "no"; then +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -23,7 +23,7 @@ noinst_PROGRAMS = + TESTS = + BENCHMARKS = + +-BITCOIN_INCLUDES=-I$(builddir) -I$(srcdir)/$(MINISKETCH_INCLUDE_DIR_INT) -I$(srcdir)/secp256k1/include -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT) $(LEVELDB_CPPFLAGS) ++BITCOIN_INCLUDES=-I$(builddir) -I$(srcdir)/$(MINISKETCH_INCLUDE_DIR_INT) $(libsecp256k1_CFLAGS) -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT) $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) + + LIBBITCOIN_NODE=libbitcoin_node.a + LIBBITCOIN_COMMON=libbitcoin_common.a +@@ -32,7 +32,11 @@ LIBBITCOIN_CLI=libbitcoin_cli.a + LIBBITCOIN_UTIL=libbitcoin_util.a + LIBBITCOIN_CRYPTO_BASE=crypto/libbitcoin_crypto_base.la + LIBBITCOINQT=qt/libbitcoinqt.a ++if EMBEDDED_LIBSECP256K1 + LIBSECP256K1=secp256k1/libsecp256k1.la ++else ++LIBSECP256K1=$(libsecp256k1_LIBS) ++endif + + if ENABLE_ZMQ + LIBBITCOIN_ZMQ=libbitcoin_zmq.a +@@ -67,8 +71,10 @@ LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_ARM_SHANI) + endif + noinst_LTLIBRARIES += $(LIBBITCOIN_CRYPTO) + ++if EMBEDDED_LIBSECP256K1 + $(LIBSECP256K1): $(wildcard secp256k1/src/*.h) $(wildcard secp256k1/src/*.c) $(wildcard secp256k1/include/*) + $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) ++endif + + # Make is not made aware of per-object dependencies to avoid limiting building parallelization + # But to build the less dependent modules first, we manually select their order here: +@@ -1080,7 +1086,9 @@ endif + include Makefile.minisketch.include + + include Makefile.crc32c.include ++if EMBEDDED_LEVELDB + include Makefile.leveldb.include ++endif + + include Makefile.test_util.include + include Makefile.test_fuzz.include +--- a/src/Makefile.test.include ++++ b/src/Makefile.test.include +@@ -377,8 +377,9 @@ if ENABLE_BENCH + $(BENCH_BINARY) --sanity-check > /dev/null + endif + endif ++if EMBEDDED_LIBSECP256K1 + $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check +- ++endif + if ENABLE_TESTS + UNIVALUE_TESTS = univalue/test/object univalue/test/unitester + noinst_PROGRAMS += $(UNIVALUE_TESTS) +--- a/src/dbwrapper.cpp ++++ b/src/dbwrapper.cpp +@@ -7,26 +7,45 @@ + #include <fs.h> + #include <logging.h> + #include <random.h> ++#include <node/interface_ui.h> + #include <tinyformat.h> + #include <util/strencodings.h> + #include <util/system.h> ++#include <util/translation.h> + + #include <algorithm> + #include <cassert> + #include <cstdarg> + #include <cstdint> + #include <cstdio> ++#include <leveldb/c.h> + #include <leveldb/cache.h> + #include <leveldb/db.h> + #include <leveldb/env.h> + #include <leveldb/filter_policy.h> +-#include <leveldb/helpers/memenv/memenv.h> ++#include <leveldb/helpers/memenv.h> + #include <leveldb/iterator.h> + #include <leveldb/options.h> + #include <leveldb/status.h> + #include <memory> + #include <optional> + ++bool dbwrapper_SanityCheck() ++{ ++ unsigned long header_version = (leveldb::kMajorVersion << 16) | leveldb::kMinorVersion; ++ unsigned long library_version = (leveldb_major_version() << 16) | leveldb_minor_version(); ++ ++ if (header_version != library_version) { ++ InitError(Untranslated(strprintf("Compiled with LevelDB %d.%d, but linked with LevelDB %d.%d (incompatible).", ++ leveldb::kMajorVersion, leveldb::kMinorVersion, ++ leveldb_major_version(), leveldb_minor_version() ++ ))); ++ return false; ++ } ++ ++ return true; ++} ++ + class CBitcoinLevelDBLogger : public leveldb::Logger { + public: + // This code is adapted from posix_logger.h, which is why it is using vsprintf. +--- a/src/dbwrapper.h ++++ b/src/dbwrapper.h +@@ -31,6 +31,8 @@ class Env; + static const size_t DBWRAPPER_PREALLOC_KEY_SIZE = 64; + static const size_t DBWRAPPER_PREALLOC_VALUE_SIZE = 1024; + ++bool dbwrapper_SanityCheck(); ++ + class dbwrapper_error : public std::runtime_error + { + public: +--- a/src/kernel/checks.cpp ++++ b/src/kernel/checks.cpp +@@ -3,9 +3,10 @@ + // file COPYING or http://www.opensource.org/licenses/mit-license.php. + + #include <kernel/checks.h> +- ++#include <dbwrapper.h> + #include <key.h> + #include <random.h> ++#include <node/interface_ui.h> + #include <util/time.h> + #include <util/translation.h> + +@@ -15,6 +16,10 @@ namespace kernel { + + std::optional<bilingual_str> SanityChecks(const Context&) + { ++ if (!dbwrapper_SanityCheck()) { ++ return Untranslated("Database sanity check failure. Aborting."); ++ } ++ + if (!ECC_InitSanityCheck()) { + return Untranslated("Elliptic curve cryptography sanity check failure. Aborting."); + } +--- a/src/qt/createwalletdialog.cpp ++++ b/src/qt/createwalletdialog.cpp +@@ -12,6 +12,7 @@ + + #include <qt/guiutil.h> + ++#include <QMessageBox> + #include <QPushButton> + + CreateWalletDialog::CreateWalletDialog(QWidget* parent) : +@@ -94,9 +95,16 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) : + ui->external_signer_checkbox->setChecked(false); + #endif + +-#ifndef USE_BDB +- ui->descriptor_checkbox->setEnabled(false); +- ui->descriptor_checkbox->setChecked(true); ++#ifdef USE_BDB ++ connect(ui->buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); ++#else ++ connect(ui->buttonBox, &QDialogButtonBox::accepted, [this]() { ++ if (!this->isDescriptorWalletChecked()) { ++ QMessageBox::critical(this, tr("Cannot create wallet"), tr("This build was compiled without BDB support, so only experimental descriptor wallets are supported.")); ++ return; ++ } ++ this->accept(); ++ }); + #endif + + #ifndef ENABLE_EXTERNAL_SIGNER diff --git a/net-p2p/bitcoind/Manifest b/net-p2p/bitcoind/Manifest index 2a65256b9e25..6fef48f5d90c 100644 --- a/net-p2p/bitcoind/Manifest +++ b/net-p2p/bitcoind/Manifest @@ -1,11 +1,14 @@ +AUX 24.0.1-syslibs.patch 9037 BLAKE2B fa634a8f18d1f1c32d1c3cb18bdfcafc89838a7f5b3a075a40ad3354d1253f1d637351d2661475eb86110db470a7b29c9cfb6266a7f61623c0865939c9e74453 SHA512 fcf8114174e69c5385058b190fa2c0b0ef105869d5d6a40a3cc6bb8e8ef1518cb8bc1fb7cc3a7ec28f361d91f66e4253420c2b50a0004a2dc0978910254cae3d AUX bitcoin.conf 80 BLAKE2B be9f776453fce1081dfa95fd844089d51e8212731d7bb460256a3b258b5369fe14b0bd19af15d9c360fbc07232e8718056acd829e03138a326faba32ac42e4da SHA512 43bef890505a1fac88887bb39e9fdd4ec673ae8838a40279b33711e970551f5a75ac25171c41f8c83de2c953b157f7a3f57171e868fd9f626007d9909331a19f AUX bitcoin.conf.5 1438 BLAKE2B 8664545f78ee9e48a9c9ea2d11f54d7320d205182f6b81f705262826f470e0bf9c86fa3a93aab81ccb1dd139bd01cb399a7b2c6a37109cc21aba5606ca9bc593 SHA512 1dd9dfdfb530d1bfb20bc84590034ab6902f25714b3c5bfa2418ad27515bc895fa16968880ec326641f0e58f9364e666764972b5a8782acb2e7494207d629888 AUX bitcoind-0.20.1-boost-1.77-compat.patch 2255 BLAKE2B 9a65c1640fd4090840070865265b7529324e850a7f34cc13c6e6a940f0a706cf5b3849497044233f3cf5b3fde177afb4d160ded2ed3a8adfc0ae8d488724539f SHA512 f1326a67749949efee07e01175b227ff16fda8f88e0a956598013399ad3b0ae652bb3206a0ce08edfbf4a712d523f2018de684d4c747c9d234d1fab6088e42ad AUX bitcoind.logrotate-r1 121 BLAKE2B 815316d97eaf71f1fe94673a58a91eaee3020fac39d5d6b84cc72afe5c22d48cb80ed561f9c6b43b6f85bd6f269f37fdd4fc1e4e96688f7a8ae25023ac560cea SHA512 a4783a310ea6b77f607bcc45d86d25ffd72794983bd1854b77eb057e86377e067f666ca38073c8efcb06256e1202918c77c8e09382cd8462832dee769017dde1 DIST bitcoin-0.21.0.knots20210130.patches.tar.xz 505040 BLAKE2B c8999de4158b8781bba6ad014ae14859f1e0bab3080c59a18910cf7447eb56da4b17a0e1843fdd3669d22636df9e4ddcc4526e4293bfd86dc884983a29a5f76c SHA512 7ee27da3d26be0e93ecddff7bb21ef1746bcdb07f9a2b0ea48065367b4c44391e974e04a21e511c05fca8f55971ab8e3c3ac01a3775cc52a537d9e10966d9871 DIST bitcoin-22.0.knots20211108.patches.tar.xz 1318256 BLAKE2B d6e56bc0ca1d706e99e7f42d8f335f016335b6bf3637c733d993696872f0a4c655cc58fc0394dfdf9916e13f0d7fbdcebf25fbdc9a165227e3c59133033644c0 SHA512 daab5860b7c7e137b6bf350cdc153e6e19172e49935640d1f6fe1f1be1e4df805b1db7fd30b0f95a560106956adab70cc6282fe933ae9de153cb971dd280f83d +DIST bitcoin-24.0.1.tar.gz 11412628 BLAKE2B 2a8c83aecd12d8d40305d78ede1f389884ee62cfe4af39a9b416b8887a595f3393d599ebe9ddeb576bba5896923feb7ee45ba32d7d4cb0ce9e6d0ef39ecf83c7 SHA512 de1ddb543429f70b0b55a46500e0bc4807cca1b1655a28f8ab186d6f6e620f8cf82420bbdf412976ffed9bc6d742926b19933429c734edaf7430a4f8c37e1685 DIST bitcoin-v0.21.0.tar.gz 7533957 BLAKE2B 01247cbb9fca2381a8c08ab1c88c479c640963caef22e4207aab46b05813dbf2a5286ac9e98132fb34db0e9ac6c18c79e45a89de166f5c6d480d8ac6e14ecca2 SHA512 c58187996932b0151432a65885b7e8a7b216fb1ab0576fb7d4b5e9620d957594b05e181153e2e0e50bcd5ce764861ec11019ffbb1095d3e704f441e61ac6a04f DIST bitcoin-v22.0.tar.gz 7977783 BLAKE2B ba212037bc8efcfbbbf6340c48ed886c4a5aa93e4a34097eafea39734a6f4e25fa6b174f894655f63c504380d8761657771795bfcc641018bf1f1661deef9321 SHA512 1b4b17360e97f390ae678adb7a239c359d3a1288799710683e26f09fc53341b6fca3211465fa3e4fdee37324d85ec1a31ffd1a3714e969df13441f755fa4b7ad EBUILD bitcoind-0.21.0.ebuild 4846 BLAKE2B c3c34145dbec98868341d2b7ea3e70f3cd7b6319a86a5b301ccc2ec4171abaad281bc6b6e8ddfa2e82ce13023775cd38b09072bca63361ccbf43433783640ee7 SHA512 81758d6d8710c53afc970ab2e66e1784c6ea9871dcb57d465de3359e24375a2e7f79841821a4cf0695802e814b1c8ff3324a0081f17a9e7099a3024d325627a1 EBUILD bitcoind-22.0.ebuild 6129 BLAKE2B a0d216be9433985ce7f345ab80a03d343f3e4a465ff8b3b1e75ce614854f0f45f15d5422ee6f7ebe98570ce8517dfb88d258f28bb9808412df14ea380b3e0456 SHA512 017604c3cf07ad4f6a4836755252794f33188033d48b0abcc1040771e0e2d37264c033e4cd56048545aed227c6aacebab25d729a7bbf906a962689e8150019ea +EBUILD bitcoind-24.0.1.ebuild 4044 BLAKE2B d035547cef0e1ddfb63248e5206737423a8c4c73e98384eabca2bb8a4642e9509cdaebbde3cd4b9467526185f29959fd35c5aa510a5b2d84b32a83462e3a1366 SHA512 f052cf3d8bc3991faae98c74745e66625228804c0e85d4d68c5ff95806c194f1c2f92d7d3e045607d940f90f2abafe78e704df94cc7e98db2fb3da7612ab6b70 MISC metadata.xml 1352 BLAKE2B a924424d5811e88d1dbc6cff68289695e270854d8afb811c4d5d682fc893d2434d166f26c229e5f8ab62e4161944940ee6eb55aa3149b93d69f288a023aa6d3d SHA512 a024d33e339da9e75e10137568503187f186fc717d6bc1f170e478f06fb577340b36a7f13fea070ef98faa97c8bc52e4f60698df4a09b28050656ddd06d842fc diff --git a/net-p2p/bitcoind/bitcoind-24.0.1.ebuild b/net-p2p/bitcoind/bitcoind-24.0.1.ebuild new file mode 100644 index 000000000000..15346a5e3025 --- /dev/null +++ b/net-p2p/bitcoind/bitcoind-24.0.1.ebuild @@ -0,0 +1,162 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DB_VER="4.8" +inherit autotools bash-completion-r1 db-use systemd + +DESCRIPTION="Original Bitcoin crypto-currency wallet for automated services" +HOMEPAGE="https://bitcoincore.org/" +SRC_URI=" + https://bitcoincore.org/bin/bitcoin-core-${PV}/${P/d}.tar.gz +" +S="${WORKDIR}"/${P/d} + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="+asm +berkdb examples +external-signer nat-pmp sqlite systemtap test upnp +wallet zeromq" +RESTRICT="!test? ( test )" + +REQUIRED_USE=" + sqlite? ( wallet ) + berkdb? ( wallet ) + wallet? ( || ( berkdb sqlite ) ) +" +# 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=" + acct-group/bitcoin + acct-user/bitcoin + dev-libs/boost:= + dev-libs/libevent:= + >=dev-libs/libsecp256k1-0.2.0:=[recovery,schnorr] + >=dev-libs/univalue-1.0.4:= + virtual/bitcoin-leveldb + nat-pmp? ( net-libs/libnatpmp ) + sqlite? ( >=dev-db/sqlite-3.7.17:= ) + upnp? ( >=net-libs/miniupnpc-1.9.20150916:= ) + berkdb? ( sys-libs/db:$(db_ver_to_slot "${DB_VER}")=[cxx] ) + zeromq? ( net-libs/zeromq:= ) +" +DEPEND=" + ${RDEPEND} + systemtap? ( dev-util/systemtap ) +" + +DOCS=( + doc/bips.md + doc/bitcoin-conf.md + doc/descriptors.md + doc/files.md + doc/JSON-RPC-interface.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}"/24.0.1-syslibs.patch +) + +pkg_pretend() { + elog "You are building ${PN} from Bitcoin Core." + elog "For more information, see:" + elog "https://bitcoincore.org/en/releases/${PV}/" +} + +src_prepare() { + sed -i 's/^\(complete -F _bitcoind bitcoind\) bitcoin-qt$/\1/' contrib/${PN}.bash-completion || die + + default + + eautoreconf + + rm -r src/leveldb src/secp256k1 || die +} + +src_configure() { + local myeconfargs=( + $(use_enable asm) + --without-qtdbus + $(use_enable systemtap ebpf) + $(use_enable external-signer) + $(use_with nat-pmp natpmp) + $(use_with nat-pmp natpmp-default) + --without-qrencode + $(use_with upnp miniupnpc) + $(use_enable upnp upnp-default) + $(use_enable test tests) + $(use_enable wallet) + $(use_enable zeromq zmq) + --with-daemon + --disable-util-cli + --disable-util-tx + --disable-util-util + --disable-util-wallet + --disable-bench + --without-libs + --without-gui + --disable-fuzz + --disable-fuzz-binary + --disable-ccache + --disable-static + $(use_with berkdb bdb) + $(use_with sqlite) + --with-system-leveldb + --with-system-libsecp256k1 + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + if use test; then + rm -f "${ED}/usr/bin/test_bitcoin" || die + fi + + insinto /etc/bitcoin + newins "${FILESDIR}/bitcoin.conf" bitcoin.conf + fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf + fperms 600 /etc/bitcoin/bitcoin.conf + + newconfd "contrib/init/bitcoind.openrcconf" ${PN} + newinitd "contrib/init/bitcoind.openrc" ${PN} + systemd_newunit "contrib/init/bitcoind.service" "bitcoind.service" + + keepdir /var/lib/bitcoin/.bitcoin + fperms 700 /var/lib/bitcoin + fowners bitcoin:bitcoin /var/lib/bitcoin/ + fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin + dosym ../../../../etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf + + doman "${FILESDIR}/bitcoin.conf.5" + + use zeromq && dodoc doc/zmq.md + + newbashcomp contrib/${PN}.bash-completion ${PN} + + if use examples; then + docinto examples + dodoc -r contrib/{linearize,qos} + use zeromq && dodoc -r contrib/zmq + fi + + insinto /etc/logrotate.d + newins "${FILESDIR}/bitcoind.logrotate-r1" bitcoind +} + +pkg_postinst() { + elog "To have ${PN} automatically use Tor when it's running, be sure your" + elog "'torrc' config file has 'ControlPort' and 'CookieAuthentication' setup" + elog "correctly, and:" + elog "- Using an init script: add the 'bitcoin' user to the 'tor' user group." + elog "- Running bitcoind directly: add that user to the 'tor' user group." +} diff --git a/net-p2p/bitcoind/files/24.0.1-syslibs.patch b/net-p2p/bitcoind/files/24.0.1-syslibs.patch new file mode 100644 index 000000000000..00404a2ff021 --- /dev/null +++ b/net-p2p/bitcoind/files/24.0.1-syslibs.patch @@ -0,0 +1,281 @@ +Originally based on 22.0-fix_build_without_leveldb.patch. + +- Allow system libsecp256k1 +- Allow system leveldb +- Abort if runtime leveldb != compiled-against leveldb +- Handle berkdb support being disabled better +--- a/configure.ac ++++ b/configure.ac +@@ -1362,6 +1362,23 @@ if test "$enable_fuzz_binary" = "yes"; then + CHECK_RUNTIME_LIB + fi + ++dnl Check for libsecp256k1, only if explicitly requested ++AC_ARG_WITH([system-libsecp256k1], ++ [AS_HELP_STRING([--with-system-libsecp256k1], ++ [Build with system libsecp256k1 (default is no; DANGEROUS; NOT SUPPORTED)])], ++ [system_libsecp256k1=$withval], ++ [system_libsecp256k1=no] ++) ++if test x$system_libsecp256k1 != xno; then ++ PKG_CHECK_MODULES([libsecp256k1],[libsecp256k1],,[true]) ++else ++ libsecp256k1_CFLAGS='-I$(srcdir)/secp256k1/include' ++ libsecp256k1_LIBS='secp256k1/libsecp256k1.la' ++fi ++AM_CONDITIONAL([EMBEDDED_LIBSECP256K1],[test x$system_libsecp256k1 = xno]) ++AC_SUBST(libsecp256k1_CFLAGS) ++AC_SUBST(libsecp256k1_LIBS) ++ + if test "$enable_wallet" != "no"; then + dnl Check for libdb_cxx only if wallet enabled + if test "$use_bdb" != "no"; then +@@ -1413,11 +1430,76 @@ if test "$use_usdt" != "no"; then + fi + AM_CONDITIONAL([ENABLE_USDT_TRACEPOINTS], [test "$use_usdt" = "yes"]) + ++build_leveldb=yes + if test "$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_util$build_bitcoind$bitcoin_enable_qt$use_bench$use_tests" = "nonononononono"; then + use_upnp=no + use_natpmp=no + use_zmq=no ++ build_leveldb=no ++fi ++ ++if test x$build_leveldb = xno; then ++ system_leveldb=no ++fi ++dnl Check for leveldb, only if explicitly requested ++if test x$system_leveldb != xno; then ++ build_leveldb=no ++ LEVELDB_CPPFLAGS= ++ AC_CHECK_LIB([leveldb],[main],[ ++ LIBLEVELDB=-lleveldb ++ ],[ ++ AC_MSG_ERROR([leveldb library not found; using --with-system-leveldb is not supported anyway]) ++ ]) ++ AC_CHECK_HEADER([leveldb/filter_policy.h],[],[ ++ AC_MSG_ERROR([LevelDB headers not found; using --with-system-leveldb is not supported anyway]) ++ ]) ++ AC_CHECK_HEADER([leveldb/helpers/memenv.h],[ ++ AC_MSG_CHECKING([for memenv.h path]) ++ BITCOIN_SUBDIR_TO_INCLUDE([LEVELDB_CPPFLAGS],[leveldb/helpers/],[memenv]) ++ ],[ ++ AC_CHECK_HEADER([memenv.h],[],[ ++ AC_MSG_ERROR([LevelDB headers not found; using --with-system-leveldb is not supported anyway]) ++ ]) ++ ]) ++ ++ AC_MSG_CHECKING([library containing leveldb::NewMemEnv]) ++ TEMP_LIBS="$LIBS" ++ TEMP_CPPFLAGS="$CPPFLAGS" ++ CPPFLAGS="$CPPFLAGS $LEVELDB_CPPFLAGS" ++ for searchlib in "" "-lmemenv" ERR; do ++ if test "x$searchlib" = "xERR"; then ++ AC_MSG_RESULT([no]) ++ AC_MSG_ERROR([LevelDB's memenv helper not found; using --with-system-leveldb is not supported anyway]) ++ fi ++ searchlib="$searchlib $LIBLEVELDB" ++ LIBS="$searchlib $TEMP_LIBS" ++ AC_LINK_IFELSE([AC_LANG_SOURCE([ ++ #include <leveldb/env.h> ++ #include <leveldb/helpers/memenv.h> ++ ++ int main() { ++ leveldb::Env *myenv = leveldb::NewMemEnv(leveldb::Env::Default()); ++ delete myenv; ++ } ++ ])],[ ++ AC_MSG_RESULT([$searchlib]) ++ LIBMEMENV="$searchlib" ++ break ++ ]) ++ done ++ LIBS="$TEMP_LIBS" ++ CPPFLAGS="$TEMP_CPPFLAGS" + fi ++AM_CONDITIONAL([EMBEDDED_LEVELDB],[test x$build_leveldb = xyes]) ++AC_SUBST(LEVELDB_CPPFLAGS) ++AC_SUBST(LIBLEVELDB) ++AC_SUBST(LIBMEMENV) ++AC_ARG_WITH([system-leveldb], ++ [AS_HELP_STRING([--with-system-leveldb], ++ [Build with system LevelDB (default is no; DANGEROUS; NOT SUPPORTED)])], ++ [system_leveldb=$withval], ++ [system_leveldb=no] ++) + + dnl Check for libminiupnpc (optional) + if test "$use_upnp" != "no"; then +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -23,7 +23,7 @@ noinst_PROGRAMS = + TESTS = + BENCHMARKS = + +-BITCOIN_INCLUDES=-I$(builddir) -I$(srcdir)/$(MINISKETCH_INCLUDE_DIR_INT) -I$(srcdir)/secp256k1/include -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT) $(LEVELDB_CPPFLAGS) ++BITCOIN_INCLUDES=-I$(builddir) -I$(srcdir)/$(MINISKETCH_INCLUDE_DIR_INT) $(libsecp256k1_CFLAGS) -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT) $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) + + LIBBITCOIN_NODE=libbitcoin_node.a + LIBBITCOIN_COMMON=libbitcoin_common.a +@@ -32,7 +32,11 @@ LIBBITCOIN_CLI=libbitcoin_cli.a + LIBBITCOIN_UTIL=libbitcoin_util.a + LIBBITCOIN_CRYPTO_BASE=crypto/libbitcoin_crypto_base.la + LIBBITCOINQT=qt/libbitcoinqt.a ++if EMBEDDED_LIBSECP256K1 + LIBSECP256K1=secp256k1/libsecp256k1.la ++else ++LIBSECP256K1=$(libsecp256k1_LIBS) ++endif + + if ENABLE_ZMQ + LIBBITCOIN_ZMQ=libbitcoin_zmq.a +@@ -67,8 +71,10 @@ LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_ARM_SHANI) + endif + noinst_LTLIBRARIES += $(LIBBITCOIN_CRYPTO) + ++if EMBEDDED_LIBSECP256K1 + $(LIBSECP256K1): $(wildcard secp256k1/src/*.h) $(wildcard secp256k1/src/*.c) $(wildcard secp256k1/include/*) + $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F) ++endif + + # Make is not made aware of per-object dependencies to avoid limiting building parallelization + # But to build the less dependent modules first, we manually select their order here: +@@ -1080,7 +1086,9 @@ endif + include Makefile.minisketch.include + + include Makefile.crc32c.include ++if EMBEDDED_LEVELDB + include Makefile.leveldb.include ++endif + + include Makefile.test_util.include + include Makefile.test_fuzz.include +--- a/src/Makefile.test.include ++++ b/src/Makefile.test.include +@@ -377,8 +377,9 @@ if ENABLE_BENCH + $(BENCH_BINARY) --sanity-check > /dev/null + endif + endif ++if EMBEDDED_LIBSECP256K1 + $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check +- ++endif + if ENABLE_TESTS + UNIVALUE_TESTS = univalue/test/object univalue/test/unitester + noinst_PROGRAMS += $(UNIVALUE_TESTS) +--- a/src/dbwrapper.cpp ++++ b/src/dbwrapper.cpp +@@ -7,26 +7,45 @@ + #include <fs.h> + #include <logging.h> + #include <random.h> ++#include <node/interface_ui.h> + #include <tinyformat.h> + #include <util/strencodings.h> + #include <util/system.h> ++#include <util/translation.h> + + #include <algorithm> + #include <cassert> + #include <cstdarg> + #include <cstdint> + #include <cstdio> ++#include <leveldb/c.h> + #include <leveldb/cache.h> + #include <leveldb/db.h> + #include <leveldb/env.h> + #include <leveldb/filter_policy.h> +-#include <leveldb/helpers/memenv/memenv.h> ++#include <leveldb/helpers/memenv.h> + #include <leveldb/iterator.h> + #include <leveldb/options.h> + #include <leveldb/status.h> + #include <memory> + #include <optional> + ++bool dbwrapper_SanityCheck() ++{ ++ unsigned long header_version = (leveldb::kMajorVersion << 16) | leveldb::kMinorVersion; ++ unsigned long library_version = (leveldb_major_version() << 16) | leveldb_minor_version(); ++ ++ if (header_version != library_version) { ++ InitError(Untranslated(strprintf("Compiled with LevelDB %d.%d, but linked with LevelDB %d.%d (incompatible).", ++ leveldb::kMajorVersion, leveldb::kMinorVersion, ++ leveldb_major_version(), leveldb_minor_version() ++ ))); ++ return false; ++ } ++ ++ return true; ++} ++ + class CBitcoinLevelDBLogger : public leveldb::Logger { + public: + // This code is adapted from posix_logger.h, which is why it is using vsprintf. +--- a/src/dbwrapper.h ++++ b/src/dbwrapper.h +@@ -31,6 +31,8 @@ class Env; + static const size_t DBWRAPPER_PREALLOC_KEY_SIZE = 64; + static const size_t DBWRAPPER_PREALLOC_VALUE_SIZE = 1024; + ++bool dbwrapper_SanityCheck(); ++ + class dbwrapper_error : public std::runtime_error + { + public: +--- a/src/kernel/checks.cpp ++++ b/src/kernel/checks.cpp +@@ -3,9 +3,10 @@ + // file COPYING or http://www.opensource.org/licenses/mit-license.php. + + #include <kernel/checks.h> +- ++#include <dbwrapper.h> + #include <key.h> + #include <random.h> ++#include <node/interface_ui.h> + #include <util/time.h> + #include <util/translation.h> + +@@ -15,6 +16,10 @@ namespace kernel { + + std::optional<bilingual_str> SanityChecks(const Context&) + { ++ if (!dbwrapper_SanityCheck()) { ++ return Untranslated("Database sanity check failure. Aborting."); ++ } ++ + if (!ECC_InitSanityCheck()) { + return Untranslated("Elliptic curve cryptography sanity check failure. Aborting."); + } +--- a/src/qt/createwalletdialog.cpp ++++ b/src/qt/createwalletdialog.cpp +@@ -12,6 +12,7 @@ + + #include <qt/guiutil.h> + ++#include <QMessageBox> + #include <QPushButton> + + CreateWalletDialog::CreateWalletDialog(QWidget* parent) : +@@ -94,9 +95,16 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) : + ui->external_signer_checkbox->setChecked(false); + #endif + +-#ifndef USE_BDB +- ui->descriptor_checkbox->setEnabled(false); +- ui->descriptor_checkbox->setChecked(true); ++#ifdef USE_BDB ++ connect(ui->buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); ++#else ++ connect(ui->buttonBox, &QDialogButtonBox::accepted, [this]() { ++ if (!this->isDescriptorWalletChecked()) { ++ QMessageBox::critical(this, tr("Cannot create wallet"), tr("This build was compiled without BDB support, so only experimental descriptor wallets are supported.")); ++ return; ++ } ++ this->accept(); ++ }); + #endif + + #ifndef ENABLE_EXTERNAL_SIGNER |