diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-12-29 06:30:44 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-12-29 06:30:44 +0000 |
commit | 0e12f8e53cdddba84b0eb27dca59153e2cf52309 (patch) | |
tree | 8dec970370295a71970b82457ae1db36dbbbd07c /net-p2p | |
parent | 72fd2b48b7154274a1d2009cdaab54e7f49fb3aa (diff) |
gentoo auto-resync : 29:12:2024 - 06:30:44
Diffstat (limited to 'net-p2p')
-rw-r--r-- | net-p2p/Manifest.gz | bin | 6765 -> 6761 bytes | |||
-rw-r--r-- | net-p2p/bitcoin-core/Manifest | 25 | ||||
-rw-r--r-- | net-p2p/bitcoin-core/bitcoin-core-25.1-r2.ebuild | 407 | ||||
-rw-r--r-- | net-p2p/bitcoin-core/bitcoin-core-25.2.ebuild | 417 | ||||
-rw-r--r-- | net-p2p/bitcoin-core/bitcoin-core-26.0-r1.ebuild | 427 | ||||
-rw-r--r-- | net-p2p/bitcoin-core/bitcoin-core-26.1.ebuild | 428 | ||||
-rw-r--r-- | net-p2p/bitcoin-core/bitcoin-core-26.2.ebuild | 426 | ||||
-rw-r--r-- | net-p2p/bitcoin-core/bitcoin-core-27.0.ebuild | 429 | ||||
-rw-r--r-- | net-p2p/bitcoin-core/bitcoin-core-27.1.ebuild | 429 | ||||
-rw-r--r-- | net-p2p/bitcoin-core/bitcoin-core-27.2.ebuild | 428 | ||||
-rw-r--r-- | net-p2p/bitcoin-core/files/25.0-gcc15.patch | 37 | ||||
-rw-r--r-- | net-p2p/bitcoin-core/files/25.0-syslibs.patch | 276 | ||||
-rw-r--r-- | net-p2p/bitcoin-core/files/26.0-syslibs.patch | 296 | ||||
-rw-r--r-- | net-p2p/bitcoin-core/files/27.0-gcc15.patch | 61 | ||||
-rw-r--r-- | net-p2p/bitcoin-core/files/27.0-syslibs.patch | 296 | ||||
-rw-r--r-- | net-p2p/bitcoin-core/files/init.patch | 43 | ||||
-rw-r--r-- | net-p2p/bitcoin-core/metadata.xml | 2 |
17 files changed, 1 insertions, 4426 deletions
diff --git a/net-p2p/Manifest.gz b/net-p2p/Manifest.gz Binary files differindex ba750125f7dd..30b7563d94e7 100644 --- a/net-p2p/Manifest.gz +++ b/net-p2p/Manifest.gz diff --git a/net-p2p/bitcoin-core/Manifest b/net-p2p/bitcoin-core/Manifest index 99ea9b8ba572..dceb8e3c4d9f 100644 --- a/net-p2p/bitcoin-core/Manifest +++ b/net-p2p/bitcoin-core/Manifest @@ -1,34 +1,11 @@ -AUX 25.0-gcc15.patch 960 BLAKE2B d795dcf023fa5299dd47c9f7dfe241d6237405d32028801dd893568bd55682b377548e719ec2f77d015c49aea5ff7499c4cfa3aa3a0c7469c333c4cba5966be6 SHA512 52a37610fa44be09775a672021bf4495e9cf2c36ddab9a63af00844402e412db5c3f2e976c5778a24507706fc51d41bc4fc5d5ceced7c82bce421c42aeb15ff9 -AUX 25.0-syslibs.patch 9154 BLAKE2B 6056ffa707c26dab36bdd885ff87fadda4ee5b3a0cb022fa22bd456636f2f8a6bcc2a660664d9debe95bc53b2636aa3418076f97f46bb7801d50a7a40357206e SHA512 5e593e8c18e281dccb40a303d832481d43553d086f7b7a3fcc1c9a823cda88889e7fe51473c049d57a3a2b2c49b7107febafcc60de12b1d91acc1134cb0377d9 AUX 26.0-init.patch 6487 BLAKE2B 22e7934a4eebc7cefa1ad0db7273f95a74e4e2605d9cc816267a74e030a531177ceec0bf1ffcdb1d31481073aa03474b83b7eb36e2d0ca50bc417f9f1ccdf1a5 SHA512 53994b0f1ad315e5dc490b3d3f1e0cfc692b2cb0ac1be10feb25395083f57a5c5a28df3035808ee83cd7c1769d5fb3e6c7ae9281dbee55bd5d12fac30f18b2fa -AUX 26.0-syslibs.patch 10109 BLAKE2B 0273b5c0a65fed9321b6af0196f4c5f80048eb5ff992cdd373999d0c29654f507b13556225c8b6ad1a71f512b4835ff133f55c5478755a1c2c567a2fb8e58e57 SHA512 42f071d8040cf68231a11ab296ea09b1f5cd658f4103aa1e07848ed63a6963e004570a121564da43079fb1830cd3f6c5ed865e1f8102a7050cb7c2aeca8b256d -AUX 27.0-gcc15.patch 5914 BLAKE2B f56c7404ea3d18de9c017561516c7a4dbcdd7798e027122ea1fe801125277761be2c1c698e398b8a45607500e8823d0907a75078057f97a5bffd15b8ed73bc10 SHA512 af888dc804fd5f935be247ae357395abc4c0412b1e976320b91816123d3c2af2830d35e83e649549caec87348baa8e1a399f127b9a89acb7ff9b3574b323989a -AUX 27.0-syslibs.patch 10150 BLAKE2B 4a6d15467f3893ee95a6fb33ec1e9f7725934e711033eff15fe41fc421724e6ff190bee854caf03edfd0d07e974ec363ba4c9ee6f3dc873a9acca1780ac13009 SHA512 25546325c758a812ac018ee14021ff2605ff904af5f4c0f6fe6c9694191c5127cf8957080309ecfcee9f4173a6ee8dabba9f88a0b2f6592e7a7e2c45c706e29b AUX 28.0-syslibs.patch 10157 BLAKE2B 83bb56a5168a38a3d048318565c96892b703aabc2adf21fe44355f2d2900aeb0742fe132ba389c03bb8feb8f3654b9af0577fc449ad9bce022bcf833bb91843b SHA512 590645ee78c1d463502884c20846fce420067bd9945920fb0049b1f81de952f7ddeae1f4bc37acf07e5e9e424e511b6184c0478358e6c76bf76c3b18528ee573 AUX bitcoin-qt.protocol 150 BLAKE2B b18645f52a6884fc0e475a85809d5b79e207adc346307623c5f1edececcb4564ac17bdb9a0deeb5c12c41409a34f83c1f22ab89f32852c58d948affa1de57edb SHA512 6b71d9d3fc9e05e6c6595aaaa307be9b5007c25f4b11162c5d873e200576d35156c2c660f229799400a3fba6dc8a9663ff8824371d83242d52ee6472687118ab AUX bitcoind.logrotate-r1 113 BLAKE2B ad27bb7f4f136c17117ca1f149b504da13f7a4ed1f7dce04f1ada2723a8900e94a0e2611aaa0f6d7545fc11d5ca3ecd6925e41875a2c3ed8a4f3e778bfcfb2a4 SHA512 51c77cddd6ff1c852112669b0c4180b04a6a91d8bfdce9d1df6560ac5ef5ebdfcc3998d81a0a47f24834b7314fe132fd9e90386c7eb8933b9c14d59bcc95d876 AUX bitcoind.openrc 2690 BLAKE2B ef44f88f5d03e488ba4793954ff22949fdb293fac64c4264041a7ccd3e261e98ee0d8037f1b4f851a0753295a44168f9ed352a3d09b423d52ffa289fdf7fd1e1 SHA512 827f049acdfff90b3d7dc211a199e86c66c59780a0590d586b1cedf164bfdfc73223b3881001b75d3bc9e5350e41f08a867f3d8fb8b154b284e4ddb90f9c2dd9 -AUX init.patch 1472 BLAKE2B 5974542d0890234ccb2cbbcbe022c45c94e5f0235ebb3b7cee3e2e6d61b9e45d7ec31c2ae7c560d38654fda3b6b7e6c4193b02985fe65502a26cb7bc3641dd8f SHA512 b303fa6adecc0d5aac6a9b78d0ab5d4df797e3af80568a0c08ba2b06296a80b9d5cb7e5b1e9af1fb0c83ad5d6e026fec492dfaee7fba56883325ee64f2b78840 AUX org.bitcoin.bitcoin-qt.desktop 465 BLAKE2B 7ce8818cd967e478e6d41106b7111616b81856ae83db742ee53a28dde203cc6a2230daa562c78e7b59d1014bfe1633b4074685acb404966b2b9649c22c356262 SHA512 4f9e20094a6fb99dc47a799c9fd752d328efa2539aaab2230f9225cb80f8889fa7a28e1277694d04db72f7a052d208d6a208671dd3d0c77a9ec9d7a95169f148 -DIST bitcoin-25.1.tar.gz 12498596 BLAKE2B e8e4ea99cb40db420033c4df75e985af93cbb64f9862376e2de1a0731b4aeafbf43a95b33770e882ad77b73e454d48dbd5744902c78ade2b965e3d2d4e4b4656 SHA512 310e5d976a062496d2b99d0e64c4d5d2b536a747901e887f85b75151d94237f0de800163b534c812d390eb5e93b3f7284cd7f71843ec35e891f34634b6b142ab -DIST bitcoin-26.0.tar.gz 12753904 BLAKE2B 35b5d40390dc5eab18a12b0f120619d40d9d0eaf4a59f5ed943a59189c0ede5d78207b7606f1c3490b90f14c17e87882242d6637fdc348005a6f60a1d8202d13 SHA512 31b7bc66b43d073611ccf19adc80a4dd3ce3a4b5cf4c8b814f4be9e771e88721d20ae0aa83d89cd8d55ffaf0853444479932b425e82081fd66bb037c6b53e4a8 -DIST bitcoin-core-25.2.tar.gz 12502724 BLAKE2B b6c4a2916c058a399c61ea3c57dd485a19d67fd71cdadf014b82d779792de65f7359d0cf994130681e5e27d568fbcfbc7dba22ff72b2dbc684c6bde9b99ab622 SHA512 bee23eee4d95dadabc34c72f48c940d81512c25b5db2fac8ed9f58bc433f6bdbe4e4aaba2a39b7d46c08355c957f8e7afc8e9a4836f634641c297dbc41ff0809 -DIST bitcoin-core-26.1.tar.gz 12822211 BLAKE2B 9093133f025a47cc93cc02056c2588be0eb8cc5dcb58c33111a79f88b7b07ef36e278ea7b95ee8d359ec0935a71846306b14d31f423e1af330dc55dcfa23abab SHA512 b7d364134b12bbd683661db95d2cd313644ca7e0f4d04163c09ab39753df55ce4943ae386e8f41b6787e993b2bbf674cde0a093487afe1a1504f0b6e45338ac9 -DIST bitcoin-core-26.2.tar.gz 12889171 BLAKE2B 9a0d5ed49eb4e14e9bd4c88fb5665536a82ad054c8a6756bed7eeff15be1fb15bca280e73ecd97a2a09d5a4bc9ae6c400f815a83e62959eac26a22d0803a2282 SHA512 4069a903423d58e29a49c638274f0916d6b8e6e8761b987e570a230ecb3b5f6ceaa499b1d6e3dd52bc16f2c3c229ad31ab2ce1d0c91e61d85a65fdc477b0e3ba -DIST bitcoin-core-27.0.tar.gz 13087956 BLAKE2B f625eaa2ce98cd8ed771f97d5a7e66733e94523d2ddda99cd858777bfb88a6e7eafae71e10fbf1ddadfcf629f2e3f790fb48c39f0e016d3fb22f1da7e7c93614 SHA512 0833fbd654570bc3e50efbe4da1f0bcab7744b92becc76d0dfea39a551325bd1b64ae746f7d9824d9e93fc53c95bc5eb5977869f0af04e26bd8ccb992d4c6e7c -DIST bitcoin-core-27.1.tar.gz 13146683 BLAKE2B 9df45ca67565aa1f1cb851e86302ab5e7edbc573642cbd66585910cbd20ecbe8b3a89f7441fc7f299bb3ff32cf687a617f7449cd1a4164e9ac78637501f619da SHA512 b3c2f90b125705401dbf1318db44be586f3609473a9aa3b7330d6c7f48bf5b31951f822e494ae607ebb96e5ffb62b909bea51be14fd91ed71ea62324d2736862 -DIST bitcoin-core-27.2.tar.gz 13148048 BLAKE2B 981064868267c1e7d880e556da1d5271c0989b9f97133ec209507a3dbb0af937e2f2684035f540680c242a523ff341118b7480e404d52c96bbb8a47105565a5d SHA512 d0e4f15327b8e443cb6a5fac7c5cf1387a867b90ce688e614374f0c73b448bf3a9aa01b1f89b898ace2753277ec766dafebdd12a106d1f8b12e8aee28e7e22db DIST bitcoin-core-28.0.tar.gz 12598313 BLAKE2B 20b189cc359d4ba1d2c61af6f69f050be32b3670a3df7e9d8fe53e55bd78fcac8dde07d6a5d32088981742aa97234aa38c19669d77837c5ab6b114260762e039 SHA512 67b2abf58c1bc57ce53b80d2d2bc9c83fc5b6d8ac08224073e03a7f13b7f6fef1127d9b825ff3594210a7c962098b520042f1eff9007ba26a5d8922f96f96e57 DIST bitcoin-core-28.1_rc2.tar.gz 12601765 BLAKE2B 3a16411497d00f635b89684e7cda69cac98aa03d442d5ad1bde6d0ca757cd65354687110d5ec71d05d4be55cc732b93f03cfc769b5ed278d6ae72bad28794039 SHA512 59f4176c8c456c410ea4adfe396c4bbf89a70b41c251c0d6aa8ed98b29b1b1826ed14b2c15409306330d29cd4337469e67179d102e777c3a945d438a912c974a -DIST bitcoin-core-miniupnpc-2.2.8-compat.patch 1130 BLAKE2B 4b1e8eaf4c7f13e9317fa4f69f6c2bce5f1663d8e4731bfe5ca5b4622fcd140e6532acdae544259727a59050b7f3f7bd7dab6f7f23dccebef4caf8fdef0f0c83 SHA512 ec0890d90a5ec3555b2e5477ead75ea5874c57aa3312dc64df5688224f51569f3f7c59593ed2f4336b283fff71c87b5d4fd786ab3cfecbb6407ef143b5018ba5 -EBUILD bitcoin-core-25.1-r2.ebuild 12854 BLAKE2B e15f2672515a2fde2ef77ef30aac0a08e6582ae16179008ac1108fa2324f161d993aa152a6a2b6073e02ecc7a415feb33d60012a98a0816cbcd75438387d5656 SHA512 e943858d51be62ef615505e7d7d844da4132c31adf903b505d25330f05318be062cba50a48a444e859144efb0288a82e8c250846bd2d6c758d681b352f10f7c9 -EBUILD bitcoin-core-25.2.ebuild 12958 BLAKE2B b3bc56661b766e19c3a961d625ee97a06b38de4eaba051a50703c207f94564690cf4fba81f43e682f56be9bed9ca8f3371826f8e553017f66b73af70fcd46c2d SHA512 bc26cf1770d75c6e6ef369305168349879c282a239e4fd7a458fbeab982fec1315af21321455af05c9e49d990a1f94956285f4a76c044fff4d4c40dbc701f3af -EBUILD bitcoin-core-26.0-r1.ebuild 13277 BLAKE2B fafd2674e2729bcb4817e631643b146e5cb7003bc8396bbed8d1195e414b0d572954fc1688f21367bbdba8feaab6edaeff5af1b7de2ad24bf5b62931da0fb1cd SHA512 d69dd44d29f4fba1d2bf1188466bdfb64928a0933d37cf41493161bf214ac8bb76878edcbd4b21e796cf25a72328e6b97f39950a21dc2f55a2cebfdf8379ba48 -EBUILD bitcoin-core-26.1.ebuild 13216 BLAKE2B 27c56e56e63d87147229ee2d7a494f95a30b4d36e0fe234986867cc028bb57b87b28b9294a9ce101c6b1df56f9b4e45c7e22326d2442500198e9adf126368d6b SHA512 2d7cb86d8fc924f206c308d9a0b4992ae9711977f6c874464a9fdfa90f054e5f40569f40bb54578c111dc1fa6464c796a178c37d40c1bfd2b1bdbb82947457f0 -EBUILD bitcoin-core-26.2.ebuild 13027 BLAKE2B 3c25802a28e20f27730fa9f8141f921f2fecda009f6b3d7ccd2d94360a4278d3a99941497ae079529848af1cb5a6357a188268c2f2b46fa21e7fbe226236ac88 SHA512 52a2159874e28f8b1e0023bda34362b4cde7a873c7ad90a2abd0b6a9775a8aa4bcbe6091038628a5d1c586f6c7d5256f68a464d7b98347eee8d76a4e3ffbc889 -EBUILD bitcoin-core-27.0.ebuild 13249 BLAKE2B 49b616304aebddb21844df04fdef65296beeb1ef3f148b82c76dbaf5c25ad27fadaac6762b034ec0e6596bc2145f178320d402bc2773813d1583c84a7031ecd0 SHA512 1213906b317cafe14ecd911443308aae090ef0df72b5dd78cf0c6352f786f1b07304778845effd4df3b6378ee0df91942547bc0a4a0f509e67734768314b87cc -EBUILD bitcoin-core-27.1.ebuild 13245 BLAKE2B 8241e319db74ef0f8bf5a2b707e91fdf44ebd89a82b57891f281da461e9ffd32325516900c48a8646001635b4cd3292fc3c2656d64656964416db8d9a78bb389 SHA512 7c91fb3b9d73d202accc7e7a9d6cbfecd993afe911447c639d18271fe3c30b354e8f0b69064472791aaf4f6bec48f8df65eb469cdb7158936972ecfb9ac17f47 -EBUILD bitcoin-core-27.2.ebuild 13073 BLAKE2B bb62712632f35779e97382e65e0447566b187ee9cd4367595ed95b872b8c972989c3d4dcd724ab0481a4f93d9a3d83533a35b2ede1471dbd1c8dbaaa9d6739c8 SHA512 cd59668ec6fc2a577e3139f02ea2a7f099228368ce20f5ed817ff1aa08fd988cc9fe29c1dae413083b45a264064b29ea55b10937f666212aefef8bc71b34f843 EBUILD bitcoin-core-28.0.ebuild 12940 BLAKE2B fdcb90a8d8399c99ebfe2839224df94b31c008332724564ed729a0378688c9f1e0c2689d11c2a20954cd668cddd19b99703b5213c6aaf8718c76a8d26dee622b SHA512 e34c429ee7d76cf85255dee72c3e5a443dc5fd0c4662ff094524f5079c0c153d3d2c889e7d2aba4509bed2f8a8143d4c94bd4daa8cb3483ba6e91afc60db313f EBUILD bitcoin-core-28.1_rc2.ebuild 12783 BLAKE2B 65609e03badfa9abf03d3fd7e3ce06313545c0f1648e393ef0579cb7de5b8c832df92e09be68763025865d3d9cc4bef0de4eb8355536d04857f54b6ef0aed503 SHA512 781738625d5d52b66cd9628afa08fd8deef0a289b7827c3683f5d97d66c807d68562783533d69b6751cc79427d77b8db3d7a8c833e14820a234225c4906312d7 -MISC metadata.xml 1795 BLAKE2B a419b3adc1bcde8add7583ae7118355d82e212a4f47dbac151d678285e321822826722b3028ccea8eff9abe0cc0cff9446c090d77c78f66eee0984f455d728fa SHA512 8864bccdd6f337c5d3bb6a18f7cefa0ec1edbf67b66addaa6ba346ef0f154cc7b1797c0c789bb0cff41bd413697ba791917a01fe3689889b09a08607806d0cbc +MISC metadata.xml 1643 BLAKE2B 35c9743c369e297d04428ba65a0389ff52db29a3fa42849332dca48d5bd8329447baf7e1311e16d5729fe5b2900cac56fb385f61f06a6d098ad5a6941a3ee6eb SHA512 3d69748916f62c2cf397100853e451bb10ce1a09d926bd7a280a1d5c80ef875adc34e227f9408dc7453bb3d155db1ef70d282cc59c5a701873368a5e63050c7c diff --git a/net-p2p/bitcoin-core/bitcoin-core-25.1-r2.ebuild b/net-p2p/bitcoin-core/bitcoin-core-25.1-r2.ebuild deleted file mode 100644 index 775041e6ebdd..000000000000 --- a/net-p2p/bitcoin-core/bitcoin-core-25.1-r2.ebuild +++ /dev/null @@ -1,407 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..12} ) - -inherit autotools bash-completion-r1 check-reqs db-use desktop edo multiprocessing python-any-r1 systemd xdg-utils - -DESCRIPTION="Reference implementation of the Bitcoin cryptocurrency" -HOMEPAGE="https://bitcoincore.org/" -SRC_URI=" - https://bitcoincore.org/bin/${P}/${P/-core}.tar.gz - https://github.com/bitcoin/bitcoin/commit/8acdf66540834b9f9cf28f16d389e8b6a48516d5.patch?full_index=1 -> ${PN}-miniupnpc-2.2.8-compat.patch -" -S="${WORKDIR}/${P/-core}" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux" -# IUSE="+cli" doesn't work due to https://bugs.gentoo.org/831045#c3 -IUSE="+asm +berkdb +bitcoin-cli +daemon dbus examples +external-signer gui kde libs +man nat-pmp +qrcode +sqlite system-leveldb +system-libsecp256k1 systemtap test upnp zeromq" -RESTRICT="!test? ( test )" - -REQUIRED_USE=" - dbus? ( gui ) - kde? ( gui ) - qrcode? ( gui ) - system-leveldb? ( || ( daemon gui ) ) -" -# dev-libs/univalue is now bundled, as upstream dropped support for system copy -# and their version in the Bitcoin repo has deviated a fair bit from upstream. -# Upstream also seems very inactive. -RDEPEND=" - !<dev-util/bitcoin-tx-25.0 - >=dev-libs/boost-1.81.0:= - >=dev-libs/libevent-2.1.12:= - berkdb? ( >=sys-libs/db-4.8.30:$(db_ver_to_slot 4.8)=[cxx] ) - bitcoin-cli? ( !<net-p2p/bitcoin-cli-25.0 ) - daemon? ( - !<net-p2p/bitcoind-25.0 - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( - !<net-p2p/bitcoin-qt-25.0 - >=dev-qt/qtcore-5.15.5:5 - >=dev-qt/qtgui-5.15.5:5 - >=dev-qt/qtnetwork-5.15.5:5 - >=dev-qt/qtwidgets-5.15.5:5 - dbus? ( >=dev-qt/qtdbus-5.15.5:5 ) - ) - libs? ( !<net-libs/libbitcoinconsensus-25.0 ) - nat-pmp? ( >=net-libs/libnatpmp-20220705:= ) - qrcode? ( >=media-gfx/qrencode-4.1.1:= ) - sqlite? ( >=dev-db/sqlite-3.38.5:= ) - system-leveldb? ( virtual/bitcoin-leveldb ) - system-libsecp256k1? ( >=dev-libs/libsecp256k1-0.3.1:=[recovery,schnorr] ) - upnp? ( >=net-libs/miniupnpc-2.2.2:= ) - zeromq? ( >=net-libs/zeromq-4.3.4:= ) -" -DEPEND=" - ${RDEPEND} - systemtap? ( >=dev-debug/systemtap-4.8 ) -" -BDEPEND=" - virtual/pkgconfig - daemon? ( - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( >=dev-qt/linguist-tools-5.15.5:5 ) - test? ( ${PYTHON_DEPS} ) -" -IDEPEND=" - gui? ( dev-util/desktop-file-utils ) -" - -DOCS=( - doc/bips.md - doc/bitcoin-conf.md - doc/descriptors.md - doc/files.md - doc/i2p.md - doc/JSON-RPC-interface.md - doc/multisig-tutorial.md - doc/p2p-bad-ports.md - doc/psbt.md - doc/reduce-memory.md - doc/reduce-traffic.md - doc/release-notes.md - doc/REST-interface.md - doc/tor.md -) - -PATCHES=( - "${DISTDIR}/${PN}-miniupnpc-2.2.8-compat.patch" - "${FILESDIR}/25.0-gcc15.patch" - "${FILESDIR}/25.0-syslibs.patch" - "${FILESDIR}/init.patch" -) - -efmt() { - : ${1:?} ; local l ; while read -r l ; do "${!#}" "${l}" ; done < <(fmt "${@:1:$#-1}") -} - -pkg_pretend() { - if ! use daemon && ! use gui && ! has_version "${CATEGORY}/${PN}[-daemon,-gui(-),-qt5(-)]" ; then - efmt ewarn <<-EOF - You are enabling neither USE="daemon" nor USE="gui". This is a valid - configuration, but you will be unable to run a Bitcoin node using this - installation. - EOF - fi - if use daemon && ! use bitcoin-cli && ! has_version "${CATEGORY}/${PN}[daemon,-bitcoin-cli]" ; then - efmt ewarn <<-EOF - You are enabling USE="daemon" but not USE="bitcoin-cli". This is a valid - configuration, but you will be unable to interact with your bitcoind node - via the command line using this installation. - EOF - fi - if ! use berkdb && ! use sqlite && - { { use daemon && ! has_version "${CATEGORY}/${PN}[daemon,-berkdb,-sqlite]" ; } || - { use gui && ! has_version "${CATEGORY}/${PN}[gui,-berkdb,-sqlite]" ; } ; } - then - efmt ewarn <<-EOF - You are enabling neither USE="berkdb" nor USE="sqlite". This is a valid - configuration, but your Bitcoin node will be unable to open any wallets. - EOF - fi - - # test/functional/feature_pruning.py requires 4 GB disk space - # test/functional/wallet_pruning.py requires 1.3 GB disk space - use test && CHECKREQS_DISK_BUILD="6G" check-reqs_pkg_pretend -} - -pkg_setup() { - if use test ; then - CHECKREQS_DISK_BUILD="6G" check-reqs_pkg_setup - python-any-r1_pkg_setup - fi -} - -src_prepare() { - default - ! use system-leveldb || rm -r src/leveldb || die - if use system-libsecp256k1 ; then - rm -r src/secp256k1 || die - sed -e '/^DIST_SUBDIRS *=/s/\bsecp256k1\b//' -i src/Makefile.am || die - else - pushd src/secp256k1 >/dev/null || die - AT_NOELIBTOOLIZE=yes eautoreconf - popd >/dev/null || die - fi - eautoreconf - - # we say --disable-util-util, so we can't test bitcoin-util - sed -ne '/^ {/{h;:0;n;H;/^ }/!b0;g;\|"exec": *"\./bitcoin-util"|d};p' \ - -i test/util/data/bitcoin-util-test.json || die - - sed -e 's/^\(complete -F _bitcoind\b\).*$/\1'"$(usev daemon ' bitcoind')$(usev gui ' bitcoin-qt')/" \ - -i contrib/completions/bash/bitcoind.bash-completion || die -} - -src_configure() { - local wallet ; if use berkdb || use sqlite ; then wallet=enable ; else wallet=disable ; fi - local myeconfargs=( - --disable-static - --${wallet}-wallet - $(use_with sqlite) - $(use_with berkdb bdb) - $(use_enable systemtap usdt) - $(use_with upnp miniupnpc) - $(use_with nat-pmp natpmp) - $(use_enable test tests) - --disable-bench - --disable-fuzz{,-binary} - $(use_with qrcode qrencode) - --disable-ccache - $(use_enable asm) - $(use_enable zeromq zmq) - $(use_enable man) - $(use_enable external-signer) - --with-utils - $(use_enable {bitcoin,util}-cli) - --enable-util-tx - --${wallet}-util-wallet - --disable-util-util - # syscall sandbox is missing faccessat2 and pselect6, causing bitcoind to crash during tests; - # removed upstream for 26.0 in https://github.com/bitcoin/bitcoin/commit/32e2ffc39374f61bb2435da507f285459985df9e - --without-seccomp - $(use_with libs) - $(use_with daemon) - $(use_with gui gui qt5) - $(use_with dbus qtdbus) - $(use_with system-leveldb) - $(use_with system-libsecp256k1) - ) - econf "${myeconfargs[@]}" -} - -src_test() { - emake check - - use daemon && edo "${PYTHON}" test/functional/test_runner.py \ - --ansi --extended --jobs="$(get_makeopts_jobs)" --timeout-factor="${TIMEOUT_FACTOR:-15}" -} - -src_install() { - use external-signer && DOCS+=( doc/external-signer.md ) - use berkdb || use sqlite && DOCS+=( doc/managing-wallets.md ) - use libs && DOCS+=( doc/shared-libraries.md ) - use systemtap && DOCS+=( doc/tracing.md ) - use zeromq && DOCS+=( doc/zmq.md ) - - if use daemon ; then - # https://bugs.gentoo.org/757102 - DOCS+=( share/rpcauth/rpcauth.py ) - docompress -x "/usr/share/doc/${PF}/rpcauth.py" - fi - - default - - find "${ED}" -type f -name '*.la' -delete || die - ! use test || rm -f -- "${ED}"/usr/bin/test_bitcoin{,-qt} || die - - newbashcomp contrib/completions/bash/bitcoin-tx.bash-completion bitcoin-tx - use bitcoin-cli && newbashcomp contrib/completions/bash/bitcoin-cli.bash-completion bitcoin-cli - if use daemon ; then - newbashcomp contrib/completions/bash/bitcoind.bash-completion bitcoind - use gui && bashcomp_alias bitcoind bitcoin-qt - elif use gui ; then - newbashcomp contrib/completions/bash/bitcoind.bash-completion bitcoin-qt - fi - - if use daemon ; then - insinto /etc/bitcoin - sed -ne 's/ To use, copy this file$//p;Tp;:0;n;/save the file\.$/!b0;d;:p;p' \ - share/examples/bitcoin.conf >"${ED}/etc/bitcoin/bitcoin.conf" || die - fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf - fperms 0660 /etc/bitcoin/bitcoin.conf - - newconfd contrib/init/bitcoind.openrcconf bitcoind - newinitd "${FILESDIR}/bitcoind.openrc" bitcoind - systemd_newunit contrib/init/bitcoind.service bitcoind.service - - keepdir /var/lib/bitcoind - fperms 0750 /var/lib/bitcoind - fowners bitcoin:bitcoin /var/lib/bitcoind - dosym -r {/etc/bitcoin,/var/lib/bitcoind}/bitcoin.conf - - insinto /etc/logrotate.d - newins "${FILESDIR}/bitcoind.logrotate-r1" bitcoind - fi - - if use gui ; then - insinto /usr/share/icons/hicolor/scalable/apps - newins src/qt/res/src/bitcoin.svg bitcoin128.svg - - domenu "${FILESDIR}/org.bitcoin.bitcoin-qt.desktop" - - if use kde ; then - insinto /usr/share/kservices5 - doins "${FILESDIR}/bitcoin-qt.protocol" - fi - fi - - if use examples ; then - docinto examples - dodoc -r contrib/{linearize,qos} - use zeromq && dodoc -r contrib/zmq - fi -} - -pkg_preinst() { - if use daemon && [[ -d "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then - if [[ -h "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then - dosym -r /var/lib/bitcoin{d,/.bitcoin} - elif [[ ! -e "${EROOT}/var/lib/bitcoind" || -h "${EROOT}/var/lib/bitcoind" ]] ; then - efmt ewarn <<-EOF - Your bitcoind data directory is located at ${EPREFIX}/var/lib/bitcoin/.bitcoin, - a deprecated location. To perform an automated migration to - ${EPREFIX}/var/lib/bitcoind, first shut down any running bitcoind instances - that may be using the deprecated path, and then run: - - # emerge --config ${CATEGORY}/${PN} - EOF - insinto /var/lib/bitcoin - mv -- "${ED}/var/lib/bitcoin"{d,/.bitcoin} || die - dosym -r {/etc/,/var/lib/bitcoin/.}bitcoin/bitcoin.conf - dosym -r /var/lib/bitcoin{/.bitcoin,d} - fi - fi - - if use kde && [[ -d "${EROOT}/usr/share/kde4" ]] ; then - dosym -r /usr/share/{kservices5,kde4/services}/bitcoin-qt.protocol - fi -} - -pkg_postinst() { - # we don't use xdg.eclass because it adds unconditional IDEPENDs - if use gui ; then - xdg_desktop_database_update - xdg_icon_cache_update - fi - - if use daemon && [[ -z "${REPLACING_VERSIONS}" ]] ; then - efmt -su elog <<-EOF - To have ${PN} automatically use Tor when it's running, be sure your \ - 'torrc' config file has 'ControlPort' and 'CookieAuthentication' set up \ - correctly, and: - - Using an init script: add the 'bitcoin' user to the 'tor' user group. - - Running bitcoind directly: add that user to the 'tor' user group. - EOF - fi - - if use bitcoin-cli && use daemon ; then - efmt -su elog <<-EOF - To use bitcoin-cli with the /etc/init.d/bitcoind service: - - Add your user(s) to the 'bitcoin' group. - - Symlink ~/.bitcoin to /var/lib/bitcoind. - EOF - fi -} - -pkg_postrm() { - if use gui ; then - xdg_desktop_database_update - xdg_icon_cache_update - fi -} - -pkg_config() { - if [[ -d "${EROOT}/var/lib/bitcoin/.bitcoin" && ! -h "${EROOT}/var/lib/bitcoin/.bitcoin" ]] && - [[ ! -e "${EROOT}/var/lib/bitcoind" || -h "${EROOT}/var/lib/bitcoind" ]] - then - in_use() { - : ${1:?} ; local each - if command -v fuser >/dev/null ; then - fuser "${@}" >/dev/null 2>&1 - elif command -v lsof >/dev/null ; then - for each ; do - lsof -- "${each}" && return - done >/dev/null 2>&1 - elif mountpoint -q /proc ; then - { find /proc/[0-9]*/{cwd,exe,fd} -type l -exec readlink -- {} + - awk '{ print $6 }' /proc/[0-9]*/maps - } 2>/dev/null | grep -Fqx -f <(printf '%s\n' "${@}" ; readlink -m -- "${@}") - else - return 13 - fi - } - ebegin "Checking that ${EPREFIX}/var/lib/bitcoin/.bitcoin is not in use" - in_use "${EROOT}/var/lib/bitcoin/.bitcoin"{,/.lock} - case $? in - 0) - eend 1 - efmt eerror <<-EOF - ${EPREFIX}/var/lib/bitcoin/.bitcoin is currently in use. Please stop any - running bitcoind instances that may be using this data directory, and then - retry this migration. - EOF - die "${EPREFIX}/var/lib/bitcoin/.bitcoin is in use" - ;; - 13) - eend 1 - if [[ "${BITCOIND_IS_NOT_RUNNING}" != 1 ]] ; then - efmt eerror <<-EOF - Found no way to check whether ${EPREFIX}/var/lib/bitcoin/.bitcoin is in use. - Do you have /proc mounted? To force the migration without checking, re-run - this command with BITCOIND_IS_NOT_RUNNING=1. - EOF - die "could not check whether ${EPREFIX}/var/lib/bitcoin/.bitcoin is in use" - fi - ;; - *) - eend 0 - ;; - esac - - # find all relative symlinks that point outside the data dir - local -A symlinks - cd -- "${EROOT}/var/lib/bitcoin/.bitcoin" || die - local each ; while read -r -d '' each ; do - local target=$(readlink -- "${each}") && [[ "${target}" == ../* ]] && - target=$(readlink -e -- "${each}") && [[ "${target}" != "${EROOT}/var/lib/bitcoin/.bitcoin/"* ]] && - symlinks["${each}"]="${target}" - done < <(find -type l -print0) - - einfo "Moving your ${EPREFIX}/var/lib/bitcoin/.bitcoin to ${EPREFIX}/var/lib/bitcoind." - rm -f -- "${EROOT}/var/lib/bitcoind" || die - mv --no-clobber --no-copy --no-target-directory -- "${EROOT}/var/lib/bitcoin"{/.bitcoin,d} || - die "Failed to move your ${EPREFIX}/var/lib/bitcoin/.bitcoin to ${EPREFIX}/var/lib/bitcoind." - - # fix up the relative symlinks - cd -- "${EROOT}/var/lib/bitcoind" || die - for each in "${!symlinks[@]}" ; do - ln -fnrs -- "${symlinks[${each}]}" "${each}" # keep going even if this fails - done - - einfo 'Creating a transitional symlink for your convenience.' - ln -fnrsv -- "${EROOT}/var/lib/bitcoin"{d,/.bitcoin} - einfo 'You may remove this link when you no longer need it.' - else - einfo 'Nothing to do.' - fi -} diff --git a/net-p2p/bitcoin-core/bitcoin-core-25.2.ebuild b/net-p2p/bitcoin-core/bitcoin-core-25.2.ebuild deleted file mode 100644 index a5bf6b1f0433..000000000000 --- a/net-p2p/bitcoin-core/bitcoin-core-25.2.ebuild +++ /dev/null @@ -1,417 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..12} ) - -inherit autotools bash-completion-r1 check-reqs db-use desktop edo multiprocessing python-any-r1 systemd 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/8acdf66540834b9f9cf28f16d389e8b6a48516d5.patch?full_index=1 -> ${PN}-miniupnpc-2.2.8-compat.patch -" -S="${WORKDIR}/${PN/-core}-${PV/_rc/rc}" - -LICENSE="MIT" -SLOT="0" -if [[ "${PV}" != *_rc* ]] ; then - KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" -fi -IUSE="+asm +berkdb +cli +daemon dbus examples +external-signer gui kde libs +man nat-pmp +qrcode +sqlite system-leveldb +system-libsecp256k1 systemtap test upnp zeromq" -RESTRICT="!test? ( test )" - -REQUIRED_USE=" - dbus? ( gui ) - kde? ( gui ) - qrcode? ( gui ) - system-leveldb? ( || ( daemon gui ) ) -" -# dev-libs/univalue is now bundled, as upstream dropped support for system copy -# and their version in the Bitcoin repo has deviated a fair bit from upstream. -# Upstream also seems very inactive. -RDEPEND=" - !dev-util/bitcoin-tx - >=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] ) - cli? ( !net-p2p/bitcoin-cli ) - daemon? ( - !net-p2p/bitcoind - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( - !net-p2p/bitcoin-qt - >=dev-qt/qtcore-5.15.5:5 - >=dev-qt/qtgui-5.15.5:5 - >=dev-qt/qtnetwork-5.15.5:5 - >=dev-qt/qtwidgets-5.15.5:5 - dbus? ( >=dev-qt/qtdbus-5.15.5:5 ) - ) - libs? ( !net-libs/libbitcoinconsensus ) - nat-pmp? ( >=net-libs/libnatpmp-20220705:= ) - qrcode? ( >=media-gfx/qrencode-4.1.1:= ) - sqlite? ( >=dev-db/sqlite-3.38.5:= ) - system-leveldb? ( virtual/bitcoin-leveldb ) - system-libsecp256k1? ( >=dev-libs/libsecp256k1-0.3.1:=[recovery,schnorr] ) - upnp? ( >=net-libs/miniupnpc-2.2.2:= ) - zeromq? ( >=net-libs/zeromq-4.3.4:= ) -" -DEPEND=" - ${RDEPEND} - systemtap? ( >=dev-debug/systemtap-4.8 ) -" -BDEPEND=" - virtual/pkgconfig - daemon? ( - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( >=dev-qt/linguist-tools-5.15.5:5 ) - test? ( ${PYTHON_DEPS} ) -" -IDEPEND=" - gui? ( dev-util/desktop-file-utils ) -" - -DOCS=( - doc/bips.md - doc/bitcoin-conf.md - doc/descriptors.md - doc/files.md - doc/i2p.md - doc/JSON-RPC-interface.md - doc/multisig-tutorial.md - doc/p2p-bad-ports.md - doc/psbt.md - doc/reduce-memory.md - doc/reduce-traffic.md - doc/release-notes.md - doc/REST-interface.md - doc/tor.md -) - -PATCHES=( - "${DISTDIR}/${PN}-miniupnpc-2.2.8-compat.patch" - "${FILESDIR}/25.0-gcc15.patch" - "${FILESDIR}/25.0-syslibs.patch" - "${FILESDIR}/init.patch" -) - -efmt() { - : ${1:?} ; local l ; while read -r l ; do "${!#}" "${l}" ; done < <(fmt "${@:1:$#-1}") -} - -pkg_pretend() { - if ! use daemon && ! use gui && ! has_version "${CATEGORY}/${PN}[-daemon,-gui(-),-qt5(-)]" ; then - efmt ewarn <<-EOF - You are enabling neither USE="daemon" nor USE="gui". This is a valid - configuration, but you will be unable to run a Bitcoin node using this - installation. - EOF - fi - if use daemon && ! use 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() { - default - ! use system-leveldb || rm -r src/leveldb || die - if use system-libsecp256k1 ; then - rm -r src/secp256k1 || die - sed -e '/^DIST_SUBDIRS *=/s/\bsecp256k1\b//' -i src/Makefile.am || die - else - pushd src/secp256k1 >/dev/null || die - AT_NOELIBTOOLIZE=yes eautoreconf - popd >/dev/null || die - fi - eautoreconf - - # we say --disable-util-util, so we can't test bitcoin-util - sed -ne '/^ {/{h;:0;n;H;/^ }/!b0;g;\|"exec": *"\./bitcoin-util"|d};p' \ - -i test/util/data/bitcoin-util-test.json || die - - sed -e 's/^\(complete -F _bitcoind\b\).*$/\1'"$(usev daemon ' bitcoind')$(usev gui ' bitcoin-qt')/" \ - -i contrib/completions/bash/bitcoind.bash-completion || die -} - -src_configure() { - local wallet ; if use berkdb || use sqlite ; then wallet=enable ; else wallet=disable ; fi - local myeconfargs=( - --disable-static - --${wallet}-wallet - $(use_with sqlite) - $(use_with berkdb bdb) - $(use_enable systemtap usdt) - $(use_with upnp miniupnpc) - $(use_with nat-pmp natpmp) - $(use_enable test tests) - --disable-bench - --disable-fuzz{,-binary} - $(use_with qrcode qrencode) - --disable-ccache - $(use_enable asm) - $(use_enable zeromq zmq) - $(use_enable man) - $(use_enable external-signer) - --with-utils - $(use_enable {,util-}cli) - --enable-util-tx - --${wallet}-util-wallet - --disable-util-util - # syscall sandbox is missing faccessat2 and pselect6, causing bitcoind to crash during tests; - # removed upstream for 26.0 in https://github.com/bitcoin/bitcoin/commit/32e2ffc39374f61bb2435da507f285459985df9e - --without-seccomp - $(use_with libs) - $(use_with daemon) - $(use_with gui gui qt5) - $(use_with dbus qtdbus) - $(use_with system-leveldb) - $(use_with system-libsecp256k1) - ) - econf "${myeconfargs[@]}" -} - -src_compile() { - default - - if use daemon && ! tc-is-cross-compiler ; then - TOPDIR="${S}" 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() { - emake check - - use daemon && edo "${PYTHON}" test/functional/test_runner.py \ - --ansi --extended --jobs="$(get_makeopts_jobs)" --timeout-factor="${TIMEOUT_FACTOR:-15}" -} - -src_install() { - use external-signer && DOCS+=( doc/external-signer.md ) - use berkdb || use sqlite && DOCS+=( doc/managing-wallets.md ) - use libs && DOCS+=( doc/shared-libraries.md ) - use systemtap && DOCS+=( doc/tracing.md ) - use zeromq && DOCS+=( doc/zmq.md ) - - if use daemon ; then - # https://bugs.gentoo.org/757102 - DOCS+=( share/rpcauth/rpcauth.py ) - docompress -x "/usr/share/doc/${PF}/rpcauth.py" - fi - - default - - find "${ED}" -type f -name '*.la' -delete || die - ! use test || rm -f -- "${ED}"/usr/bin/test_bitcoin{,-qt} || die - - newbashcomp contrib/completions/bash/bitcoin-tx.bash-completion bitcoin-tx - use cli && newbashcomp contrib/completions/bash/bitcoin-cli.bash-completion bitcoin-cli - if use daemon ; then - newbashcomp contrib/completions/bash/bitcoind.bash-completion bitcoind - use gui && bashcomp_alias bitcoind bitcoin-qt - elif use gui ; then - newbashcomp contrib/completions/bash/bitcoind.bash-completion 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" - - if use kde ; then - insinto /usr/share/kservices5 - doins "${FILESDIR}/bitcoin-qt.protocol" - fi - fi - - if use examples ; then - docinto examples - dodoc -r contrib/{linearize,qos} - use zeromq && dodoc -r contrib/zmq - fi -} - -pkg_preinst() { - if use daemon && [[ -d "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then - if [[ -h "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then - dosym -r /var/lib/bitcoin{d,/.bitcoin} - elif [[ ! -e "${EROOT}/var/lib/bitcoind" || -h "${EROOT}/var/lib/bitcoind" ]] ; then - efmt ewarn <<-EOF - Your bitcoind data directory is located at ${EPREFIX}/var/lib/bitcoin/.bitcoin, - a deprecated location. To perform an automated migration to - ${EPREFIX}/var/lib/bitcoind, first shut down any running bitcoind instances - that may be using the deprecated path, and then run: - - # emerge --config ${CATEGORY}/${PN} - EOF - insinto /var/lib/bitcoin - mv -- "${ED}/var/lib/bitcoin"{d,/.bitcoin} || die - dosym -r {/etc/,/var/lib/bitcoin/.}bitcoin/bitcoin.conf - dosym -r /var/lib/bitcoin{/.bitcoin,d} - fi - fi - - if use kde && [[ -d "${EROOT}/usr/share/kde4" ]] ; then - dosym -r /usr/share/{kservices5,kde4/services}/bitcoin-qt.protocol - fi -} - -pkg_postinst() { - # we don't use xdg.eclass because it adds unconditional IDEPENDs - if use gui ; then - xdg_desktop_database_update - xdg_icon_cache_update - fi - - if use daemon && [[ -z "${REPLACING_VERSIONS}" ]] ; then - efmt -su elog <<-EOF - To have ${PN} automatically use Tor when it's running, be sure your \ - 'torrc' config file has 'ControlPort' and 'CookieAuthentication' set up \ - correctly, and: - - Using an init script: add the 'bitcoin' user to the 'tor' user group. - - Running bitcoind directly: add that user to the 'tor' user group. - EOF - fi - - if use cli && use daemon ; then - efmt -su elog <<-EOF - To use bitcoin-cli with the /etc/init.d/bitcoind service: - - Add your user(s) to the 'bitcoin' group. - - Symlink ~/.bitcoin to /var/lib/bitcoind. - EOF - fi -} - -pkg_postrm() { - if use gui ; then - xdg_desktop_database_update - xdg_icon_cache_update - fi -} - -pkg_config() { - if [[ -d "${EROOT}/var/lib/bitcoin/.bitcoin" && ! -h "${EROOT}/var/lib/bitcoin/.bitcoin" ]] && - [[ ! -e "${EROOT}/var/lib/bitcoind" || -h "${EROOT}/var/lib/bitcoind" ]] - then - in_use() { - : ${1:?} ; local each - if command -v fuser >/dev/null ; then - fuser "${@}" >/dev/null 2>&1 - elif command -v lsof >/dev/null ; then - for each ; do - lsof -- "${each}" && return - done >/dev/null 2>&1 - elif mountpoint -q /proc ; then - { find /proc/[0-9]*/{cwd,exe,fd} -type l -exec readlink -- {} + - awk '{ print $6 }' /proc/[0-9]*/maps - } 2>/dev/null | grep -Fqx -f <(printf '%s\n' "${@}" ; readlink -m -- "${@}") - else - return 13 - fi - } - ebegin "Checking that ${EPREFIX}/var/lib/bitcoin/.bitcoin is not in use" - in_use "${EROOT}/var/lib/bitcoin/.bitcoin"{,/.lock} - case $? in - 0) - eend 1 - efmt eerror <<-EOF - ${EPREFIX}/var/lib/bitcoin/.bitcoin is currently in use. Please stop any - running bitcoind instances that may be using this data directory, and then - retry this migration. - EOF - die "${EPREFIX}/var/lib/bitcoin/.bitcoin is in use" - ;; - 13) - eend 1 - if [[ "${BITCOIND_IS_NOT_RUNNING}" != 1 ]] ; then - efmt eerror <<-EOF - Found no way to check whether ${EPREFIX}/var/lib/bitcoin/.bitcoin is in use. - Do you have /proc mounted? To force the migration without checking, re-run - this command with BITCOIND_IS_NOT_RUNNING=1. - EOF - die "could not check whether ${EPREFIX}/var/lib/bitcoin/.bitcoin is in use" - fi - ;; - *) - eend 0 - ;; - esac - - # find all relative symlinks that point outside the data dir - local -A symlinks - cd -- "${EROOT}/var/lib/bitcoin/.bitcoin" || die - local each ; while read -r -d '' each ; do - local target=$(readlink -- "${each}") && [[ "${target}" == ../* ]] && - target=$(readlink -e -- "${each}") && [[ "${target}" != "${EROOT}/var/lib/bitcoin/.bitcoin/"* ]] && - symlinks["${each}"]="${target}" - done < <(find -type l -print0) - - einfo "Moving your ${EPREFIX}/var/lib/bitcoin/.bitcoin to ${EPREFIX}/var/lib/bitcoind." - rm -f -- "${EROOT}/var/lib/bitcoind" || die - mv --no-clobber --no-copy --no-target-directory -- "${EROOT}/var/lib/bitcoin"{/.bitcoin,d} || - die "Failed to move your ${EPREFIX}/var/lib/bitcoin/.bitcoin to ${EPREFIX}/var/lib/bitcoind." - - # fix up the relative symlinks - cd -- "${EROOT}/var/lib/bitcoind" || die - for each in "${!symlinks[@]}" ; do - ln -fnrs -- "${symlinks[${each}]}" "${each}" # keep going even if this fails - done - - einfo 'Creating a transitional symlink for your convenience.' - ln -fnrsv -- "${EROOT}/var/lib/bitcoin"{d,/.bitcoin} - einfo 'You may remove this link when you no longer need it.' - else - einfo 'Nothing to do.' - fi -} diff --git a/net-p2p/bitcoin-core/bitcoin-core-26.0-r1.ebuild b/net-p2p/bitcoin-core/bitcoin-core-26.0-r1.ebuild deleted file mode 100644 index c89c35852110..000000000000 --- a/net-p2p/bitcoin-core/bitcoin-core-26.0-r1.ebuild +++ /dev/null @@ -1,427 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..12} ) - -inherit autotools bash-completion-r1 check-reqs db-use desktop edo multiprocessing python-any-r1 systemd 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}.tar.gz -> ${P/-core}.tar.gz - https://github.com/bitcoin/bitcoin/commit/8acdf66540834b9f9cf28f16d389e8b6a48516d5.patch?full_index=1 -> ${PN}-miniupnpc-2.2.8-compat.patch -" -S="${WORKDIR}/${P/-core}" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" -# IUSE="+cli" doesn't work due to https://bugs.gentoo.org/831045#c3 -IUSE="+asm +berkdb +bitcoin-cli +daemon dbus examples +external-signer gui kde libs +man nat-pmp +qrcode +sqlite system-leveldb +system-libsecp256k1 systemtap test upnp zeromq" -RESTRICT="!test? ( test )" - -REQUIRED_USE=" - dbus? ( gui ) - kde? ( gui ) - qrcode? ( gui ) - system-leveldb? ( || ( daemon gui ) ) -" -# dev-libs/univalue is now bundled, as upstream dropped support for system copy -# and their version in the Bitcoin repo has deviated a fair bit from upstream. -# Upstream also seems very inactive. -RDEPEND=" - !dev-util/bitcoin-tx - >=dev-libs/boost-1.81.0:= - >=dev-libs/libevent-2.1.12:= - berkdb? ( >=sys-libs/db-4.8.30:$(db_ver_to_slot 4.8)=[cxx] ) - bitcoin-cli? ( !net-p2p/bitcoin-cli ) - daemon? ( - !net-p2p/bitcoind - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( - !net-p2p/bitcoin-qt - >=dev-qt/qtcore-5.15.10:5 - >=dev-qt/qtgui-5.15.10:5 - >=dev-qt/qtnetwork-5.15.10:5 - >=dev-qt/qtwidgets-5.15.10:5 - dbus? ( >=dev-qt/qtdbus-5.15.10:5 ) - ) - libs? ( !net-libs/libbitcoinconsensus ) - nat-pmp? ( >=net-libs/libnatpmp-20220705:= ) - qrcode? ( >=media-gfx/qrencode-4.1.1:= ) - sqlite? ( >=dev-db/sqlite-3.38.5:= ) - system-leveldb? ( virtual/bitcoin-leveldb ) - system-libsecp256k1? ( >=dev-libs/libsecp256k1-0.4.0:=[ellswift,extrakeys,recovery,schnorr] ) - upnp? ( >=net-libs/miniupnpc-2.2.2:= ) - zeromq? ( >=net-libs/zeromq-4.3.4:= ) -" -DEPEND=" - ${RDEPEND} - systemtap? ( >=dev-debug/systemtap-4.8 ) -" -BDEPEND=" - virtual/pkgconfig - daemon? ( - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( >=dev-qt/linguist-tools-5.15.10:5 ) - test? ( ${PYTHON_DEPS} ) -" -IDEPEND=" - gui? ( dev-util/desktop-file-utils ) -" - -DOCS=( - doc/bips.md - doc/bitcoin-conf.md - doc/descriptors.md - doc/files.md - doc/i2p.md - doc/JSON-RPC-interface.md - doc/multisig-tutorial.md - doc/p2p-bad-ports.md - doc/psbt.md - doc/reduce-memory.md - doc/reduce-traffic.md - doc/release-notes.md - doc/REST-interface.md - doc/tor.md -) - -PATCHES=( - "${DISTDIR}/${PN}-miniupnpc-2.2.8-compat.patch" - "${FILESDIR}/25.0-gcc15.patch" - "${FILESDIR}/26.0-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 bitcoin-cli && ! has_version "${CATEGORY}/${PN}[daemon,-bitcoin-cli]" ; then - efmt ewarn <<-EOF - You are enabling USE="daemon" but not USE="bitcoin-cli". This is a valid - configuration, but you will be unable to interact with your bitcoind node - via the command line using this installation. - EOF - fi - if ! use berkdb && ! use sqlite && - { { use daemon && ! has_version "${CATEGORY}/${PN}[daemon,-berkdb,-sqlite]" ; } || - { use gui && ! has_version "${CATEGORY}/${PN}[gui,-berkdb,-sqlite]" ; } ; } - then - efmt ewarn <<-EOF - You are enabling neither USE="berkdb" nor USE="sqlite". This is a valid - configuration, but your Bitcoin node will be unable to open any wallets. - EOF - fi - - # test/functional/feature_pruning.py requires 4 GB disk space - # test/functional/wallet_pruning.py requires 1.3 GB disk space - use test && CHECKREQS_DISK_BUILD="6G" check-reqs_pkg_pretend -} - -pkg_setup() { - if use test ; then - CHECKREQS_DISK_BUILD="6G" check-reqs_pkg_setup - python-any-r1_pkg_setup - fi -} - -src_prepare() { - default - ! use system-leveldb || rm -r src/leveldb || die - if use system-libsecp256k1 ; then - rm -r src/secp256k1 || die - sed -e '/^DIST_SUBDIRS *=/s/\bsecp256k1\b//' -i src/Makefile.am || die - else - pushd src/secp256k1 >/dev/null || die - AT_NOELIBTOOLIZE=yes eautoreconf - popd >/dev/null || die - fi - eautoreconf - - # we say --disable-util-util, so we can't test bitcoin-util - sed -ne '/^ {/{h;:0;n;H;/^ }/!b0;g;\|"exec": *"\./bitcoin-util"|d};p' \ - -i test/util/data/bitcoin-util-test.json || die - - sed -e 's/^\(complete -F _bitcoind\b\).*$/\1'"$(usev daemon ' bitcoind')$(usev gui ' bitcoin-qt')/" \ - -i contrib/completions/bash/bitcoind.bash || die -} - -src_configure() { - local wallet ; if use berkdb || use sqlite ; then wallet=enable ; else wallet=disable ; fi - local myeconfargs=( - --disable-static - --${wallet}-wallet - $(use_with sqlite) - $(use_with berkdb bdb) - $(use_enable systemtap usdt) - $(use_with upnp miniupnpc) - $(use_with nat-pmp natpmp) - $(use_enable test tests) - --disable-bench - --disable-fuzz{,-binary} - $(use_with qrcode qrencode) - --disable-ccache - $(use_enable asm) - $(use_enable zeromq zmq) - $(use_enable man) - $(use_enable external-signer) - --with-utils - $(use_enable {bitcoin,util}-cli) - --enable-util-tx - --${wallet}-util-wallet - --disable-util-util - $(use_with libs) - $(use_with daemon) - $(use_with gui gui qt5) - $(use_with dbus qtdbus) - $(use_with system-leveldb) - $(use_with system-libsecp256k1) - ) - econf "${myeconfargs[@]}" -} - -src_compile() { - default - - if use daemon && ! tc-is-cross-compiler ; then - TOPDIR="${S}" 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() { - emake check - - use daemon && edo "${PYTHON}" test/functional/test_runner.py \ - --ansi --extended --jobs="$(get_makeopts_jobs)" --timeout-factor="${TIMEOUT_FACTOR:-15}" -} - -src_install() { - use external-signer && DOCS+=( doc/external-signer.md ) - use berkdb || use sqlite && DOCS+=( doc/managing-wallets.md ) - use libs && DOCS+=( doc/shared-libraries.md ) - use systemtap && DOCS+=( doc/tracing.md ) - use zeromq && DOCS+=( doc/zmq.md ) - - if use daemon ; then - # https://bugs.gentoo.org/757102 - DOCS+=( share/rpcauth/rpcauth.py ) - docompress -x "/usr/share/doc/${PF}/rpcauth.py" - fi - - default - - find "${ED}" -type f -name '*.la' -delete || die - ! use test || rm -f -- "${ED}"/usr/bin/test_bitcoin{,-qt} || die - - newbashcomp contrib/completions/bash/bitcoin-tx.bash bitcoin-tx - use bitcoin-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" - - if use kde ; then - insinto /usr/share/kservices5 - doins "${FILESDIR}/bitcoin-qt.protocol" - fi - fi - - if use examples ; then - docinto examples - dodoc -r contrib/{linearize,qos} - use zeromq && dodoc -r contrib/zmq - fi -} - -pkg_preinst() { - if use daemon && [[ -d "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then - if [[ -h "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then - dosym -r /var/lib/bitcoin{d,/.bitcoin} - elif [[ ! -e "${EROOT}/var/lib/bitcoind" || -h "${EROOT}/var/lib/bitcoind" ]] ; then - efmt ewarn <<-EOF - Your bitcoind data directory is located at ${EPREFIX}/var/lib/bitcoin/.bitcoin, - a deprecated location. To perform an automated migration to - ${EPREFIX}/var/lib/bitcoind, first shut down any running bitcoind instances - that may be using the deprecated path, and then run: - - # emerge --config ${CATEGORY}/${PN} - EOF - insinto /var/lib/bitcoin - mv -- "${ED}/var/lib/bitcoin"{d,/.bitcoin} || die - dosym -r {/etc/,/var/lib/bitcoin/.}bitcoin/bitcoin.conf - dosym -r /var/lib/bitcoin{/.bitcoin,d} - fi - fi - - if use kde && [[ -d "${EROOT}/usr/share/kde4" ]] ; then - dosym -r /usr/share/{kservices5,kde4/services}/bitcoin-qt.protocol - fi -} - -pkg_postinst() { - # we don't use xdg.eclass because it adds unconditional IDEPENDs - if use gui ; then - xdg_desktop_database_update - xdg_icon_cache_update - fi - - if use daemon && [[ -z "${REPLACING_VERSIONS}" ]] ; then - efmt -su elog <<-EOF - To have ${PN} automatically use Tor when it's running, be sure your \ - 'torrc' config file has 'ControlPort' and 'CookieAuthentication' set up \ - correctly, and: - - Using an init script: add the 'bitcoin' user to the 'tor' user group. - - Running bitcoind directly: add that user to the 'tor' user group. - EOF - fi - - if use bitcoin-cli && use daemon ; then - efmt -su elog <<-EOF - To use bitcoin-cli with the /etc/init.d/bitcoind service: - - Add your user(s) to the 'bitcoin' group. - - Symlink ~/.bitcoin to /var/lib/bitcoind. - EOF - fi - - 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-26.1.ebuild b/net-p2p/bitcoin-core/bitcoin-core-26.1.ebuild deleted file mode 100644 index f134e690a97a..000000000000 --- a/net-p2p/bitcoin-core/bitcoin-core-26.1.ebuild +++ /dev/null @@ -1,428 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..12} ) - -inherit autotools bash-completion-r1 check-reqs db-use desktop edo multiprocessing python-any-r1 systemd 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/8acdf66540834b9f9cf28f16d389e8b6a48516d5.patch?full_index=1 -> ${PN}-miniupnpc-2.2.8-compat.patch -" -S="${WORKDIR}/${PN/-core}-${PV/_rc/rc}" - -LICENSE="MIT" -SLOT="0" -if [[ "${PV}" != *_rc* ]] ; then - KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" -fi -IUSE="+asm +berkdb +cli +daemon dbus examples +external-signer gui kde libs +man nat-pmp +qrcode +sqlite system-leveldb +system-libsecp256k1 systemtap test upnp zeromq" -RESTRICT="!test? ( test )" - -REQUIRED_USE=" - dbus? ( gui ) - kde? ( gui ) - qrcode? ( gui ) - system-leveldb? ( || ( daemon gui ) ) -" -# dev-libs/univalue is now bundled, as upstream dropped support for system copy -# and their version in the Bitcoin repo has deviated a fair bit from upstream. -# Upstream also seems very inactive. -RDEPEND=" - !dev-util/bitcoin-tx - >=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] ) - cli? ( !net-p2p/bitcoin-cli ) - daemon? ( - !net-p2p/bitcoind - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( - !net-p2p/bitcoin-qt - >=dev-qt/qtcore-5.15.10:5 - >=dev-qt/qtgui-5.15.10:5 - >=dev-qt/qtnetwork-5.15.10:5 - >=dev-qt/qtwidgets-5.15.10:5 - dbus? ( >=dev-qt/qtdbus-5.15.10:5 ) - ) - libs? ( !net-libs/libbitcoinconsensus ) - nat-pmp? ( >=net-libs/libnatpmp-20220705:= ) - qrcode? ( >=media-gfx/qrencode-4.1.1:= ) - sqlite? ( >=dev-db/sqlite-3.38.5:= ) - system-leveldb? ( virtual/bitcoin-leveldb ) - system-libsecp256k1? ( >=dev-libs/libsecp256k1-0.4.0:=[ellswift,extrakeys,recovery,schnorr] ) - upnp? ( >=net-libs/miniupnpc-2.2.2:= ) - zeromq? ( >=net-libs/zeromq-4.3.4:= ) -" -DEPEND=" - ${RDEPEND} - systemtap? ( >=dev-debug/systemtap-4.8 ) -" -BDEPEND=" - virtual/pkgconfig - daemon? ( - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( >=dev-qt/linguist-tools-5.15.10:5 ) - test? ( ${PYTHON_DEPS} ) -" -IDEPEND=" - gui? ( dev-util/desktop-file-utils ) -" - -DOCS=( - doc/bips.md - doc/bitcoin-conf.md - doc/descriptors.md - doc/files.md - doc/i2p.md - doc/JSON-RPC-interface.md - doc/multisig-tutorial.md - doc/p2p-bad-ports.md - doc/psbt.md - doc/reduce-memory.md - doc/reduce-traffic.md - doc/release-notes.md - doc/REST-interface.md - doc/tor.md -) - -PATCHES=( - "${DISTDIR}/${PN}-miniupnpc-2.2.8-compat.patch" - "${FILESDIR}/25.0-gcc15.patch" - "${FILESDIR}/26.0-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() { - default - ! use system-leveldb || rm -r src/leveldb || die - if use system-libsecp256k1 ; then - rm -r src/secp256k1 || die - sed -e '/^DIST_SUBDIRS *=/s/\bsecp256k1\b//' -i src/Makefile.am || die - else - pushd src/secp256k1 >/dev/null || die - AT_NOELIBTOOLIZE=yes eautoreconf - popd >/dev/null || die - fi - eautoreconf - - # we say --disable-util-util, so we can't test bitcoin-util - sed -ne '/^ {/{h;:0;n;H;/^ }/!b0;g;\|"exec": *"\./bitcoin-util"|d};p' \ - -i test/util/data/bitcoin-util-test.json || die - - sed -e 's/^\(complete -F _bitcoind\b\).*$/\1'"$(usev daemon ' bitcoind')$(usev gui ' bitcoin-qt')/" \ - -i contrib/completions/bash/bitcoind.bash || die -} - -src_configure() { - local wallet ; if use berkdb || use sqlite ; then wallet=enable ; else wallet=disable ; fi - local myeconfargs=( - --disable-static - --${wallet}-wallet - $(use_with sqlite) - $(use_with berkdb bdb) - $(use_enable systemtap usdt) - $(use_with upnp miniupnpc) - $(use_with nat-pmp natpmp) - $(use_enable test tests) - --disable-bench - --disable-fuzz{,-binary} - $(use_with qrcode qrencode) - --disable-ccache - $(use_enable asm) - $(use_enable zeromq zmq) - $(use_enable man) - $(use_enable external-signer) - --with-utils - $(use_enable {,util-}cli) - --enable-util-tx - --${wallet}-util-wallet - --disable-util-util - $(use_with libs) - $(use_with daemon) - $(use_with gui gui qt5) - $(use_with dbus qtdbus) - $(use_with system-leveldb) - $(use_with system-libsecp256k1) - ) - econf "${myeconfargs[@]}" -} - -src_compile() { - default - - if use daemon && ! tc-is-cross-compiler ; then - TOPDIR="${S}" 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() { - emake check - - use daemon && edo "${PYTHON}" test/functional/test_runner.py \ - --ansi --extended --jobs="$(get_makeopts_jobs)" --timeout-factor="${TIMEOUT_FACTOR:-15}" -} - -src_install() { - use external-signer && DOCS+=( doc/external-signer.md ) - use berkdb || use sqlite && DOCS+=( doc/managing-wallets.md ) - use libs && DOCS+=( doc/shared-libraries.md ) - use systemtap && DOCS+=( doc/tracing.md ) - use zeromq && DOCS+=( doc/zmq.md ) - - if use daemon ; then - # https://bugs.gentoo.org/757102 - DOCS+=( share/rpcauth/rpcauth.py ) - docompress -x "/usr/share/doc/${PF}/rpcauth.py" - fi - - default - - find "${ED}" -type f -name '*.la' -delete || die - ! use test || rm -f -- "${ED}"/usr/bin/test_bitcoin{,-qt} || die - - newbashcomp contrib/completions/bash/bitcoin-tx.bash 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" - - if use kde ; then - insinto /usr/share/kservices5 - doins "${FILESDIR}/bitcoin-qt.protocol" - fi - fi - - if use examples ; then - docinto examples - dodoc -r contrib/{linearize,qos} - use zeromq && dodoc -r contrib/zmq - fi -} - -pkg_preinst() { - if use daemon && [[ -d "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then - if [[ -h "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then - dosym -r /var/lib/bitcoin{d,/.bitcoin} - elif [[ ! -e "${EROOT}/var/lib/bitcoind" || -h "${EROOT}/var/lib/bitcoind" ]] ; then - efmt ewarn <<-EOF - Your bitcoind data directory is located at ${EPREFIX}/var/lib/bitcoin/.bitcoin, - a deprecated location. To perform an automated migration to - ${EPREFIX}/var/lib/bitcoind, first shut down any running bitcoind instances - that may be using the deprecated path, and then run: - - # emerge --config ${CATEGORY}/${PN} - EOF - insinto /var/lib/bitcoin - mv -- "${ED}/var/lib/bitcoin"{d,/.bitcoin} || die - dosym -r {/etc/,/var/lib/bitcoin/.}bitcoin/bitcoin.conf - dosym -r /var/lib/bitcoin{/.bitcoin,d} - fi - fi - - if use kde && [[ -d "${EROOT}/usr/share/kde4" ]] ; then - dosym -r /usr/share/{kservices5,kde4/services}/bitcoin-qt.protocol - fi -} - -pkg_postinst() { - # we don't use xdg.eclass because it adds unconditional IDEPENDs - if use gui ; then - xdg_desktop_database_update - xdg_icon_cache_update - fi - - if use daemon && [[ -z "${REPLACING_VERSIONS}" ]] ; then - efmt -su elog <<-EOF - To have ${PN} automatically use Tor when it's running, be sure your \ - 'torrc' config file has 'ControlPort' and 'CookieAuthentication' set up \ - correctly, and: - - Using an init script: add the 'bitcoin' user to the 'tor' user group. - - Running bitcoind directly: add that user to the 'tor' user group. - EOF - fi - - if use 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-26.2.ebuild b/net-p2p/bitcoin-core/bitcoin-core-26.2.ebuild deleted file mode 100644 index 96303f672e91..000000000000 --- a/net-p2p/bitcoin-core/bitcoin-core-26.2.ebuild +++ /dev/null @@ -1,426 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..12} ) - -inherit autotools bash-completion-r1 check-reqs db-use desktop edo multiprocessing python-any-r1 systemd 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 ~amd64-linux ~x86-linux" -fi -IUSE="+asm +berkdb +cli +daemon dbus examples +external-signer gui kde libs +man nat-pmp +qrcode +sqlite system-leveldb +system-libsecp256k1 systemtap test upnp zeromq" -RESTRICT="!test? ( test )" - -REQUIRED_USE=" - dbus? ( gui ) - kde? ( gui ) - qrcode? ( gui ) - system-leveldb? ( || ( daemon gui ) ) -" -# dev-libs/univalue is now bundled, as upstream dropped support for system copy -# and their version in the Bitcoin repo has deviated a fair bit from upstream. -# Upstream also seems very inactive. -RDEPEND=" - !dev-util/bitcoin-tx - >=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] ) - cli? ( !net-p2p/bitcoin-cli ) - daemon? ( - !net-p2p/bitcoind - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( - !net-p2p/bitcoin-qt - >=dev-qt/qtcore-5.15.10:5 - >=dev-qt/qtgui-5.15.10:5 - >=dev-qt/qtnetwork-5.15.10:5 - >=dev-qt/qtwidgets-5.15.10:5 - dbus? ( >=dev-qt/qtdbus-5.15.10:5 ) - ) - libs? ( !net-libs/libbitcoinconsensus ) - nat-pmp? ( >=net-libs/libnatpmp-20220705:= ) - qrcode? ( >=media-gfx/qrencode-4.1.1:= ) - sqlite? ( >=dev-db/sqlite-3.38.5:= ) - system-leveldb? ( virtual/bitcoin-leveldb ) - system-libsecp256k1? ( >=dev-libs/libsecp256k1-0.4.0:=[ellswift,extrakeys,recovery,schnorr] ) - upnp? ( >=net-libs/miniupnpc-2.2.2:= ) - zeromq? ( >=net-libs/zeromq-4.3.4:= ) -" -DEPEND=" - ${RDEPEND} - systemtap? ( >=dev-debug/systemtap-4.8 ) -" -BDEPEND=" - virtual/pkgconfig - daemon? ( - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( >=dev-qt/linguist-tools-5.15.10:5 ) - test? ( ${PYTHON_DEPS} ) -" -IDEPEND=" - gui? ( dev-util/desktop-file-utils ) -" - -DOCS=( - doc/bips.md - doc/bitcoin-conf.md - doc/descriptors.md - doc/files.md - doc/i2p.md - doc/JSON-RPC-interface.md - doc/multisig-tutorial.md - doc/p2p-bad-ports.md - doc/psbt.md - doc/reduce-memory.md - doc/reduce-traffic.md - doc/release-notes.md - doc/REST-interface.md - doc/tor.md -) - -PATCHES=( - "${FILESDIR}/25.0-gcc15.patch" - "${FILESDIR}/26.0-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() { - default - ! use system-leveldb || rm -r src/leveldb || die - if use system-libsecp256k1 ; then - rm -r src/secp256k1 || die - sed -e '/^DIST_SUBDIRS *=/s/\bsecp256k1\b//' -i src/Makefile.am || die - else - pushd src/secp256k1 >/dev/null || die - AT_NOELIBTOOLIZE=yes eautoreconf - popd >/dev/null || die - fi - eautoreconf - - # we say --disable-util-util, so we can't test bitcoin-util - sed -ne '/^ {/{h;:0;n;H;/^ }/!b0;g;\|"exec": *"\./bitcoin-util"|d};p' \ - -i test/util/data/bitcoin-util-test.json || die - - sed -e 's/^\(complete -F _bitcoind\b\).*$/\1'"$(usev daemon ' bitcoind')$(usev gui ' bitcoin-qt')/" \ - -i contrib/completions/bash/bitcoind.bash || die -} - -src_configure() { - local wallet ; if use berkdb || use sqlite ; then wallet=enable ; else wallet=disable ; fi - local myeconfargs=( - --disable-static - --${wallet}-wallet - $(use_with sqlite) - $(use_with berkdb bdb) - $(use_enable systemtap usdt) - $(use_with upnp miniupnpc) - $(use_with nat-pmp natpmp) - $(use_enable test tests) - --disable-bench - --disable-fuzz{,-binary} - $(use_with qrcode qrencode) - --disable-ccache - $(use_enable asm) - $(use_enable zeromq zmq) - $(use_enable man) - $(use_enable external-signer) - --with-utils - $(use_enable {,util-}cli) - --enable-util-tx - --${wallet}-util-wallet - --disable-util-util - $(use_with libs) - $(use_with daemon) - $(use_with gui gui qt5) - $(use_with dbus qtdbus) - $(use_with system-leveldb) - $(use_with system-libsecp256k1) - ) - econf "${myeconfargs[@]}" -} - -src_compile() { - default - - if use daemon && ! tc-is-cross-compiler ; then - TOPDIR="${S}" 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() { - emake check - - use daemon && edo "${PYTHON}" test/functional/test_runner.py \ - --ansi --extended --jobs="$(get_makeopts_jobs)" --timeout-factor="${TIMEOUT_FACTOR:-15}" -} - -src_install() { - use external-signer && DOCS+=( doc/external-signer.md ) - use berkdb || use sqlite && DOCS+=( doc/managing-wallets.md ) - use libs && DOCS+=( doc/shared-libraries.md ) - use systemtap && DOCS+=( doc/tracing.md ) - use zeromq && DOCS+=( doc/zmq.md ) - - if use daemon ; then - # https://bugs.gentoo.org/757102 - DOCS+=( share/rpcauth/rpcauth.py ) - docompress -x "/usr/share/doc/${PF}/rpcauth.py" - fi - - default - - find "${ED}" -type f -name '*.la' -delete || die - ! use test || rm -f -- "${ED}"/usr/bin/test_bitcoin{,-qt} || die - - newbashcomp contrib/completions/bash/bitcoin-tx.bash 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" - - if use kde ; then - insinto /usr/share/kservices5 - doins "${FILESDIR}/bitcoin-qt.protocol" - fi - fi - - if use examples ; then - docinto examples - dodoc -r contrib/{linearize,qos} - use zeromq && dodoc -r contrib/zmq - fi -} - -pkg_preinst() { - if use daemon && [[ -d "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then - if [[ -h "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then - dosym -r /var/lib/bitcoin{d,/.bitcoin} - elif [[ ! -e "${EROOT}/var/lib/bitcoind" || -h "${EROOT}/var/lib/bitcoind" ]] ; then - efmt ewarn <<-EOF - Your bitcoind data directory is located at ${EPREFIX}/var/lib/bitcoin/.bitcoin, - a deprecated location. To perform an automated migration to - ${EPREFIX}/var/lib/bitcoind, first shut down any running bitcoind instances - that may be using the deprecated path, and then run: - - # emerge --config ${CATEGORY}/${PN} - EOF - insinto /var/lib/bitcoin - mv -- "${ED}/var/lib/bitcoin"{d,/.bitcoin} || die - dosym -r {/etc/,/var/lib/bitcoin/.}bitcoin/bitcoin.conf - dosym -r /var/lib/bitcoin{/.bitcoin,d} - fi - fi - - if use kde && [[ -d "${EROOT}/usr/share/kde4" ]] ; then - dosym -r /usr/share/{kservices5,kde4/services}/bitcoin-qt.protocol - fi -} - -pkg_postinst() { - # we don't use xdg.eclass because it adds unconditional IDEPENDs - if use gui ; then - xdg_desktop_database_update - xdg_icon_cache_update - fi - - if use daemon && [[ -z "${REPLACING_VERSIONS}" ]] ; then - efmt -su elog <<-EOF - To have ${PN} automatically use Tor when it's running, be sure your \ - 'torrc' config file has 'ControlPort' and 'CookieAuthentication' set up \ - correctly, and: - - Using an init script: add the 'bitcoin' user to the 'tor' user group. - - Running bitcoind directly: add that user to the 'tor' user group. - EOF - fi - - if use 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-27.0.ebuild b/net-p2p/bitcoin-core/bitcoin-core-27.0.ebuild deleted file mode 100644 index d29c9e015a1c..000000000000 --- a/net-p2p/bitcoin-core/bitcoin-core-27.0.ebuild +++ /dev/null @@ -1,429 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..12} ) - -inherit autotools bash-completion-r1 check-reqs db-use desktop edo multiprocessing python-any-r1 systemd 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/8acdf66540834b9f9cf28f16d389e8b6a48516d5.patch?full_index=1 -> ${PN}-miniupnpc-2.2.8-compat.patch -" -S="${WORKDIR}/${PN/-core}-${PV/_rc/rc}" - -LICENSE="MIT" -SLOT="0" -if [[ "${PV}" != *_rc* ]] ; then - KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" -fi -IUSE="+asm +berkdb +cli +daemon dbus examples +external-signer gui kde libs +man nat-pmp +qrcode +sqlite system-leveldb +system-libsecp256k1 systemtap test upnp zeromq" -RESTRICT="!test? ( test )" - -REQUIRED_USE=" - dbus? ( gui ) - kde? ( gui ) - qrcode? ( gui ) - system-leveldb? ( || ( daemon gui ) ) -" -# dev-libs/univalue is now bundled, as upstream dropped support for system copy -# and their version in the Bitcoin repo has deviated a fair bit from upstream. -# Upstream also seems very inactive. -RDEPEND=" - !dev-util/bitcoin-tx - >=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] ) - cli? ( !net-p2p/bitcoin-cli ) - daemon? ( - !net-p2p/bitcoind - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( - !net-p2p/bitcoin-qt - >=dev-qt/qtcore-5.15.11:5 - >=dev-qt/qtgui-5.15.11:5 - >=dev-qt/qtnetwork-5.15.11:5 - >=dev-qt/qtwidgets-5.15.11:5 - dbus? ( >=dev-qt/qtdbus-5.15.11:5 ) - ) - libs? ( !net-libs/libbitcoinconsensus ) - nat-pmp? ( >=net-libs/libnatpmp-20220705:= ) - qrcode? ( >=media-gfx/qrencode-4.1.1:= ) - sqlite? ( >=dev-db/sqlite-3.38.5:= ) - system-leveldb? ( virtual/bitcoin-leveldb ) - system-libsecp256k1? ( >=dev-libs/libsecp256k1-0.4.0:=[ellswift,extrakeys,recovery,schnorr] ) - upnp? ( >=net-libs/miniupnpc-2.2.2:= ) - zeromq? ( >=net-libs/zeromq-4.3.4:= ) -" -DEPEND=" - ${RDEPEND} - systemtap? ( >=dev-debug/systemtap-4.8 ) -" -BDEPEND=" - virtual/pkgconfig - daemon? ( - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( >=dev-qt/linguist-tools-5.15.11:5 ) - test? ( ${PYTHON_DEPS} ) -" -IDEPEND=" - gui? ( dev-util/desktop-file-utils ) -" - -DOCS=( - doc/bips.md - doc/bitcoin-conf.md - doc/descriptors.md - doc/files.md - doc/i2p.md - doc/JSON-RPC-interface.md - doc/multisig-tutorial.md - doc/p2p-bad-ports.md - doc/psbt.md - doc/reduce-memory.md - doc/reduce-traffic.md - doc/release-notes.md - doc/REST-interface.md - doc/tor.md -) - -PATCHES=( - "${DISTDIR}/${PN}-miniupnpc-2.2.8-compat.patch" - "${FILESDIR}/25.0-gcc15.patch" - "${FILESDIR}/27.0-gcc15.patch" - "${FILESDIR}/27.0-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() { - default - ! use system-leveldb || rm -r src/leveldb || die - if use system-libsecp256k1 ; then - rm -r src/secp256k1 || die - sed -e '/^DIST_SUBDIRS *=/s/\bsecp256k1\b//' -i src/Makefile.am || die - else - pushd src/secp256k1 >/dev/null || die - AT_NOELIBTOOLIZE=yes eautoreconf - popd >/dev/null || die - fi - eautoreconf - - # we say --disable-util-util, so we can't test bitcoin-util - sed -ne '/^ {/{h;:0;n;H;/^ }/!b0;g;\|"exec": *"\./bitcoin-util"|d};p' \ - -i test/util/data/bitcoin-util-test.json || die - - sed -e 's/^\(complete -F _bitcoind\b\).*$/\1'"$(usev daemon ' bitcoind')$(usev gui ' bitcoin-qt')/" \ - -i contrib/completions/bash/bitcoind.bash || die -} - -src_configure() { - local wallet ; if use berkdb || use sqlite ; then wallet=enable ; else wallet=disable ; fi - local myeconfargs=( - --disable-static - --${wallet}-wallet - $(use_with sqlite) - $(use_with berkdb bdb) - $(use_enable systemtap usdt) - $(use_with upnp miniupnpc) - $(use_with nat-pmp natpmp) - $(use_enable test tests) - --disable-bench - --disable-fuzz{,-binary} - $(use_with qrcode qrencode) - --disable-ccache - $(use_enable asm) - $(use_enable zeromq zmq) - $(use_enable man) - $(use_enable external-signer) - --with-utils - $(use_enable {,util-}cli) - --enable-util-tx - --${wallet}-util-wallet - --disable-util-util - $(use_with libs) - $(use_with daemon) - $(use_with gui gui qt5) - $(use_with dbus qtdbus) - $(use_with system-leveldb) - $(use_with system-libsecp256k1) - ) - econf "${myeconfargs[@]}" -} - -src_compile() { - default - - if use daemon && ! tc-is-cross-compiler ; then - TOPDIR="${S}" 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() { - emake check - - use daemon && edo "${PYTHON}" test/functional/test_runner.py \ - --ansi --extended --jobs="$(get_makeopts_jobs)" --timeout-factor="${TIMEOUT_FACTOR:-15}" -} - -src_install() { - use external-signer && DOCS+=( doc/external-signer.md ) - use berkdb || use sqlite && DOCS+=( doc/managing-wallets.md ) - use libs && DOCS+=( doc/shared-libraries.md ) - use systemtap && DOCS+=( doc/tracing.md ) - use zeromq && DOCS+=( doc/zmq.md ) - - if use daemon ; then - # https://bugs.gentoo.org/757102 - DOCS+=( share/rpcauth/rpcauth.py ) - docompress -x "/usr/share/doc/${PF}/rpcauth.py" - fi - - default - - find "${ED}" -type f -name '*.la' -delete || die - ! use test || rm -f -- "${ED}"/usr/bin/test_bitcoin{,-qt} || die - - newbashcomp contrib/completions/bash/bitcoin-tx.bash 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" - - if use kde ; then - insinto /usr/share/kservices5 - doins "${FILESDIR}/bitcoin-qt.protocol" - fi - fi - - if use examples ; then - docinto examples - dodoc -r contrib/{linearize,qos} - use zeromq && dodoc -r contrib/zmq - fi -} - -pkg_preinst() { - if use daemon && [[ -d "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then - if [[ -h "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then - dosym -r /var/lib/bitcoin{d,/.bitcoin} - elif [[ ! -e "${EROOT}/var/lib/bitcoind" || -h "${EROOT}/var/lib/bitcoind" ]] ; then - efmt ewarn <<-EOF - Your bitcoind data directory is located at ${EPREFIX}/var/lib/bitcoin/.bitcoin, - a deprecated location. To perform an automated migration to - ${EPREFIX}/var/lib/bitcoind, first shut down any running bitcoind instances - that may be using the deprecated path, and then run: - - # emerge --config ${CATEGORY}/${PN} - EOF - insinto /var/lib/bitcoin - mv -- "${ED}/var/lib/bitcoin"{d,/.bitcoin} || die - dosym -r {/etc/,/var/lib/bitcoin/.}bitcoin/bitcoin.conf - dosym -r /var/lib/bitcoin{/.bitcoin,d} - fi - fi - - if use kde && [[ -d "${EROOT}/usr/share/kde4" ]] ; then - dosym -r /usr/share/{kservices5,kde4/services}/bitcoin-qt.protocol - fi -} - -pkg_postinst() { - # we don't use xdg.eclass because it adds unconditional IDEPENDs - if use gui ; then - xdg_desktop_database_update - xdg_icon_cache_update - fi - - if use daemon && [[ -z "${REPLACING_VERSIONS}" ]] ; then - efmt -su elog <<-EOF - To have ${PN} automatically use Tor when it's running, be sure your \ - 'torrc' config file has 'ControlPort' and 'CookieAuthentication' set up \ - correctly, and: - - Using an init script: add the 'bitcoin' user to the 'tor' user group. - - Running bitcoind directly: add that user to the 'tor' user group. - EOF - fi - - if use 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-27.1.ebuild b/net-p2p/bitcoin-core/bitcoin-core-27.1.ebuild deleted file mode 100644 index 9e477e6cc769..000000000000 --- a/net-p2p/bitcoin-core/bitcoin-core-27.1.ebuild +++ /dev/null @@ -1,429 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..13} ) - -inherit autotools bash-completion-r1 check-reqs 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/8acdf66540834b9f9cf28f16d389e8b6a48516d5.patch?full_index=1 -> ${PN}-miniupnpc-2.2.8-compat.patch -" -S="${WORKDIR}/${PN/-core}-${PV/_rc/rc}" - -LICENSE="MIT" -SLOT="0" -if [[ "${PV}" != *_rc* ]] ; then - KEYWORDS="amd64 arm arm64 ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux" -fi -IUSE="+asm +berkdb +cli +daemon dbus examples +external-signer gui kde libs +man nat-pmp +qrcode +sqlite system-leveldb +system-libsecp256k1 systemtap test upnp zeromq" -RESTRICT="!test? ( test )" - -REQUIRED_USE=" - dbus? ( gui ) - kde? ( gui ) - qrcode? ( gui ) - system-leveldb? ( || ( daemon gui ) ) -" -# dev-libs/univalue is now bundled, as upstream dropped support for system copy -# and their version in the Bitcoin repo has deviated a fair bit from upstream. -# Upstream also seems very inactive. -RDEPEND=" - !dev-util/bitcoin-tx - >=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] ) - cli? ( !net-p2p/bitcoin-cli ) - daemon? ( - !net-p2p/bitcoind - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( - !net-p2p/bitcoin-qt - >=dev-qt/qtcore-5.15.11:5 - >=dev-qt/qtgui-5.15.11:5 - >=dev-qt/qtnetwork-5.15.11:5 - >=dev-qt/qtwidgets-5.15.11:5 - dbus? ( >=dev-qt/qtdbus-5.15.11:5 ) - ) - libs? ( !net-libs/libbitcoinconsensus ) - nat-pmp? ( >=net-libs/libnatpmp-20220705:= ) - qrcode? ( >=media-gfx/qrencode-4.1.1:= ) - sqlite? ( >=dev-db/sqlite-3.38.5:= ) - system-leveldb? ( virtual/bitcoin-leveldb ) - system-libsecp256k1? ( >=dev-libs/libsecp256k1-0.4.0:=[ellswift,extrakeys,recovery,schnorr] ) - upnp? ( >=net-libs/miniupnpc-2.2.2:= ) - zeromq? ( >=net-libs/zeromq-4.3.4:= ) -" -DEPEND=" - ${RDEPEND} - systemtap? ( >=dev-debug/systemtap-4.8 ) -" -BDEPEND=" - virtual/pkgconfig - daemon? ( - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( >=dev-qt/linguist-tools-5.15.11:5 ) - test? ( ${PYTHON_DEPS} ) -" -IDEPEND=" - gui? ( dev-util/desktop-file-utils ) -" - -DOCS=( - doc/bips.md - doc/bitcoin-conf.md - doc/descriptors.md - doc/files.md - doc/i2p.md - doc/JSON-RPC-interface.md - doc/multisig-tutorial.md - doc/p2p-bad-ports.md - doc/psbt.md - doc/reduce-memory.md - doc/reduce-traffic.md - doc/release-notes.md - doc/REST-interface.md - doc/tor.md -) - -PATCHES=( - "${DISTDIR}/${PN}-miniupnpc-2.2.8-compat.patch" - "${FILESDIR}/25.0-gcc15.patch" - "${FILESDIR}/27.0-gcc15.patch" - "${FILESDIR}/27.0-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() { - default - ! use system-leveldb || rm -r src/leveldb || die - if use system-libsecp256k1 ; then - rm -r src/secp256k1 || die - sed -e '/^DIST_SUBDIRS *=/s/\bsecp256k1\b//' -i src/Makefile.am || die - else - pushd src/secp256k1 >/dev/null || die - AT_NOELIBTOOLIZE=yes eautoreconf - popd >/dev/null || die - fi - eautoreconf - - # we say --disable-util-util, so we can't test bitcoin-util - sed -ne '/^ {/{h;:0;n;H;/^ }/!b0;g;\|"exec": *"\./bitcoin-util"|d};p' \ - -i test/util/data/bitcoin-util-test.json || die - - sed -e 's/^\(complete -F _bitcoind\b\).*$/\1'"$(usev daemon ' bitcoind')$(usev gui ' bitcoin-qt')/" \ - -i contrib/completions/bash/bitcoind.bash || die -} - -src_configure() { - local wallet ; if use berkdb || use sqlite ; then wallet=enable ; else wallet=disable ; fi - local myeconfargs=( - --disable-static - --${wallet}-wallet - $(use_with sqlite) - $(use_with berkdb bdb) - $(use_enable systemtap usdt) - $(use_with upnp miniupnpc) - $(use_with nat-pmp natpmp) - $(use_enable test tests) - --disable-bench - --disable-fuzz{,-binary} - $(use_with qrcode qrencode) - --disable-ccache - $(use_enable asm) - $(use_enable zeromq zmq) - $(use_enable man) - $(use_enable external-signer) - --with-utils - $(use_enable {,util-}cli) - --enable-util-tx - --${wallet}-util-wallet - --disable-util-util - $(use_with libs) - $(use_with daemon) - $(use_with gui gui qt5) - $(use_with dbus qtdbus) - $(use_with system-leveldb) - $(use_with system-libsecp256k1) - ) - econf "${myeconfargs[@]}" -} - -src_compile() { - default - - if use daemon && ! tc-is-cross-compiler ; then - TOPDIR="${S}" 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() { - emake check - - use daemon && edo "${PYTHON}" test/functional/test_runner.py \ - --ansi --extended --jobs="$(get_makeopts_jobs)" --timeout-factor="${TIMEOUT_FACTOR:-15}" -} - -src_install() { - use external-signer && DOCS+=( doc/external-signer.md ) - use berkdb || use sqlite && DOCS+=( doc/managing-wallets.md ) - use libs && DOCS+=( doc/shared-libraries.md ) - use systemtap && DOCS+=( doc/tracing.md ) - use zeromq && DOCS+=( doc/zmq.md ) - - if use daemon ; then - # https://bugs.gentoo.org/757102 - DOCS+=( share/rpcauth/rpcauth.py ) - docompress -x "/usr/share/doc/${PF}/rpcauth.py" - fi - - default - - find "${ED}" -type f -name '*.la' -delete || die - ! use test || rm -f -- "${ED}"/usr/bin/test_bitcoin{,-qt} || die - - newbashcomp contrib/completions/bash/bitcoin-tx.bash 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" - - if use kde ; then - insinto /usr/share/kservices5 - doins "${FILESDIR}/bitcoin-qt.protocol" - fi - fi - - if use examples ; then - docinto examples - dodoc -r contrib/{linearize,qos} - use zeromq && dodoc -r contrib/zmq - fi -} - -pkg_preinst() { - if use daemon && [[ -d "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then - if [[ -h "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then - dosym -r /var/lib/bitcoin{d,/.bitcoin} - elif [[ ! -e "${EROOT}/var/lib/bitcoind" || -h "${EROOT}/var/lib/bitcoind" ]] ; then - efmt ewarn <<-EOF - Your bitcoind data directory is located at ${EPREFIX}/var/lib/bitcoin/.bitcoin, - a deprecated location. To perform an automated migration to - ${EPREFIX}/var/lib/bitcoind, first shut down any running bitcoind instances - that may be using the deprecated path, and then run: - - # emerge --config ${CATEGORY}/${PN} - EOF - insinto /var/lib/bitcoin - mv -- "${ED}/var/lib/bitcoin"{d,/.bitcoin} || die - dosym -r {/etc/,/var/lib/bitcoin/.}bitcoin/bitcoin.conf - dosym -r /var/lib/bitcoin{/.bitcoin,d} - fi - fi - - if use kde && [[ -d "${EROOT}/usr/share/kde4" ]] ; then - dosym -r /usr/share/{kservices5,kde4/services}/bitcoin-qt.protocol - fi -} - -pkg_postinst() { - # we don't use xdg.eclass because it adds unconditional IDEPENDs - if use gui ; then - xdg_desktop_database_update - xdg_icon_cache_update - fi - - if use daemon && [[ -z "${REPLACING_VERSIONS}" ]] ; then - efmt -su elog <<-EOF - To have ${PN} automatically use Tor when it's running, be sure your \ - 'torrc' config file has 'ControlPort' and 'CookieAuthentication' set up \ - correctly, and: - - Using an init script: add the 'bitcoin' user to the 'tor' user group. - - Running bitcoind directly: add that user to the 'tor' user group. - EOF - fi - - if use 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-27.2.ebuild b/net-p2p/bitcoin-core/bitcoin-core-27.2.ebuild deleted file mode 100644 index aa44cbc4f311..000000000000 --- a/net-p2p/bitcoin-core/bitcoin-core-27.2.ebuild +++ /dev/null @@ -1,428 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..13} ) - -inherit autotools bash-completion-r1 check-reqs 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 -" -S="${WORKDIR}/${PN/-core}-${PV/_rc/rc}" - -LICENSE="MIT" -SLOT="0" -if [[ "${PV}" != *_rc* ]] ; then - KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" -fi -IUSE="+asm +berkdb +cli +daemon dbus examples +external-signer gui kde libs +man nat-pmp +qrcode +sqlite system-leveldb +system-libsecp256k1 systemtap test test-full upnp zeromq" -RESTRICT="!test? ( test )" - -REQUIRED_USE=" - dbus? ( gui ) - kde? ( gui ) - qrcode? ( gui ) - system-leveldb? ( || ( daemon 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. -RDEPEND=" - !dev-util/bitcoin-tx - >=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] ) - cli? ( !net-p2p/bitcoin-cli ) - daemon? ( - !net-p2p/bitcoind - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( - !net-p2p/bitcoin-qt - >=dev-qt/qtcore-5.15.11:5 - >=dev-qt/qtgui-5.15.11:5 - >=dev-qt/qtnetwork-5.15.11:5 - >=dev-qt/qtwidgets-5.15.11:5 - dbus? ( >=dev-qt/qtdbus-5.15.11:5 ) - ) - libs? ( !net-libs/libbitcoinconsensus ) - nat-pmp? ( >=net-libs/libnatpmp-20220705:= ) - qrcode? ( >=media-gfx/qrencode-4.1.1:= ) - sqlite? ( >=dev-db/sqlite-3.38.5:= ) - system-leveldb? ( virtual/bitcoin-leveldb ) - system-libsecp256k1? ( >=dev-libs/libsecp256k1-0.4.0:=[ellswift,extrakeys,recovery,schnorr] ) - upnp? ( >=net-libs/miniupnpc-2.2.2:= ) - zeromq? ( >=net-libs/zeromq-4.3.4:= ) -" -DEPEND=" - ${RDEPEND} - systemtap? ( >=dev-debug/systemtap-4.8 ) -" -BDEPEND=" - virtual/pkgconfig - daemon? ( - acct-group/bitcoin - acct-user/bitcoin - ) - gui? ( >=dev-qt/linguist-tools-5.15.11:5 ) - test? ( ${PYTHON_DEPS} ) -" -IDEPEND=" - gui? ( dev-util/desktop-file-utils ) -" - -DOCS=( - doc/bips.md - doc/bitcoin-conf.md - doc/descriptors.md - doc/files.md - doc/i2p.md - doc/JSON-RPC-interface.md - doc/multisig-tutorial.md - doc/p2p-bad-ports.md - doc/psbt.md - doc/reduce-memory.md - doc/reduce-traffic.md - doc/release-notes.md - doc/REST-interface.md - doc/tor.md -) - -PATCHES=( - "${FILESDIR}/27.0-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() { - default - ! use system-leveldb || rm -r src/leveldb || die - if use system-libsecp256k1 ; then - rm -r src/secp256k1 || die - sed -e '/^DIST_SUBDIRS *=/s/\bsecp256k1\b//' -i src/Makefile.am || die - else - pushd src/secp256k1 >/dev/null || die - AT_NOELIBTOOLIZE=yes eautoreconf - popd >/dev/null || die - fi - eautoreconf - - # we say --disable-util-util, so we can't test bitcoin-util - sed -ne '/^ {/{h;:0;n;H;/^ }/!b0;g;\|"exec": *"\./bitcoin-util"|d};p' \ - -i test/util/data/bitcoin-util-test.json || die - - sed -e 's/^\(complete -F _bitcoind\b\).*$/\1'"$(usev daemon ' bitcoind')$(usev gui ' bitcoin-qt')/" \ - -i contrib/completions/bash/bitcoind.bash || die -} - -src_configure() { - local wallet ; if use berkdb || use sqlite ; then wallet=enable ; else wallet=disable ; fi - local myeconfargs=( - --disable-static - --${wallet}-wallet - $(use_with sqlite) - $(use_with berkdb bdb) - $(use_enable systemtap usdt) - $(use_with upnp miniupnpc) - $(use_with nat-pmp natpmp) - $(use_enable test tests) - --disable-bench - --disable-fuzz{,-binary} - $(use_with qrcode qrencode) - --disable-ccache - $(use_enable asm) - $(use_enable zeromq zmq) - $(use_enable man) - $(use_enable external-signer) - --with-utils - $(use_enable {,util-}cli) - --enable-util-tx - --${wallet}-util-wallet - --disable-util-util - $(use_with libs) - $(use_with daemon) - $(use_with gui gui qt5) - $(use_with dbus qtdbus) - $(use_with system-leveldb) - $(use_with system-libsecp256k1) - ) - econf "${myeconfargs[@]}" -} - -src_compile() { - default - - if use daemon && ! tc-is-cross-compiler ; then - TOPDIR="${S}" 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() { - emake check - - use daemon && edo "${PYTHON}" test/functional/test_runner.py \ - --ansi $(usev test-full --extended) --jobs="$(get_makeopts_jobs)" --timeout-factor="${TIMEOUT_FACTOR:-15}" -} - -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 libs && DOCS+=( doc/shared-libraries.md ) - use systemtap && DOCS+=( doc/tracing.md ) - use zeromq && DOCS+=( doc/zmq.md ) - - if use daemon ; then - # https://bugs.gentoo.org/757102 - DOCS+=( share/rpcauth/rpcauth.py ) - docompress -x "/usr/share/doc/${PF}/rpcauth.py" - fi - - default - - find "${ED}" -type f -name '*.la' -delete || die - ! use test || rm -f -- "${ED}"/usr/bin/test_bitcoin{,-qt} || die - - newbashcomp contrib/completions/bash/bitcoin-tx.bash 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" - - if use kde ; then - insinto /usr/share/kservices5 - doins "${FILESDIR}/bitcoin-qt.protocol" - fi - fi - - if use examples ; then - docinto examples - dodoc -r contrib/{linearize,qos} - use zeromq && dodoc -r contrib/zmq - fi -} - -pkg_preinst() { - if use daemon && [[ -d "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then - if [[ -h "${EROOT}/var/lib/bitcoin/.bitcoin" ]] ; then - dosym -r /var/lib/bitcoin{d,/.bitcoin} - elif [[ ! -e "${EROOT}/var/lib/bitcoind" || -h "${EROOT}/var/lib/bitcoind" ]] ; then - efmt ewarn <<-EOF - Your bitcoind data directory is located at ${EPREFIX}/var/lib/bitcoin/.bitcoin, - a deprecated location. To perform an automated migration to - ${EPREFIX}/var/lib/bitcoind, first shut down any running bitcoind instances - that may be using the deprecated path, and then run: - - # emerge --config ${CATEGORY}/${PN} - EOF - insinto /var/lib/bitcoin - mv -- "${ED}/var/lib/bitcoin"{d,/.bitcoin} || die - dosym -r {/etc/,/var/lib/bitcoin/.}bitcoin/bitcoin.conf - dosym -r /var/lib/bitcoin{/.bitcoin,d} - fi - fi - - if use kde && [[ -d "${EROOT}/usr/share/kde4" ]] ; then - dosym -r /usr/share/{kservices5,kde4/services}/bitcoin-qt.protocol - fi -} - -pkg_postinst() { - # we don't use xdg.eclass because it adds unconditional IDEPENDs - if use gui ; then - xdg_desktop_database_update - xdg_icon_cache_update - fi - - if use daemon && [[ -z "${REPLACING_VERSIONS}" ]] ; then - efmt -su elog <<-EOF - To have ${PN} automatically use Tor when it's running, be sure your \ - 'torrc' config file has 'ControlPort' and 'CookieAuthentication' set up \ - correctly, and: - - Using an init script: add the 'bitcoin' user to the 'tor' user group. - - Running bitcoind directly: add that user to the 'tor' user group. - EOF - fi - - if use 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/files/25.0-gcc15.patch b/net-p2p/bitcoin-core/files/25.0-gcc15.patch deleted file mode 100644 index f63b23a8a3e3..000000000000 --- a/net-p2p/bitcoin-core/files/25.0-gcc15.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 74eebed6491d38d9c076bebc99d073cdd129003a Mon Sep 17 00:00:00 2001 -From: Matt Whitlock <bitcoin@mattwhitlock.name> -Date: Wed, 7 Aug 2024 22:04:40 -0400 -Subject: [PATCH] add missing #include <cstdint> for GCC 15 - ---- - src/chainparamsbase.h | 1 + - src/node/interface_ui.h | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h -index d593cff722..09751b12b9 100644 ---- a/src/chainparamsbase.h -+++ b/src/chainparamsbase.h -@@ -5,6 +5,7 @@ - #ifndef BITCOIN_CHAINPARAMSBASE_H - #define BITCOIN_CHAINPARAMSBASE_H - -+#include <cstdint> - #include <memory> - #include <string> - -diff --git a/src/node/interface_ui.h b/src/node/interface_ui.h -index 22c241cb78..f0c804b7cf 100644 ---- a/src/node/interface_ui.h -+++ b/src/node/interface_ui.h -@@ -6,6 +6,7 @@ - #ifndef BITCOIN_NODE_INTERFACE_UI_H - #define BITCOIN_NODE_INTERFACE_UI_H - -+#include <cstdint> - #include <functional> - #include <memory> - #include <string> --- -2.45.2 - diff --git a/net-p2p/bitcoin-core/files/25.0-syslibs.patch b/net-p2p/bitcoin-core/files/25.0-syslibs.patch deleted file mode 100644 index ec548f08b98c..000000000000 --- a/net-p2p/bitcoin-core/files/25.0-syslibs.patch +++ /dev/null @@ -1,276 +0,0 @@ -From 7dea5ad88e709689e3a40f1de239e238749f9e55 Mon Sep 17 00:00:00 2001 -From: Matt Whitlock <bitcoin@mattwhitlock.name> -Date: Sun, 17 Sep 2023 10:29:27 -0400 -Subject: [PATCH] support linking against system-installed leveldb and - libsecp256k1 - -- Abort if runtime leveldb != compiled-against leveldb. - -Originally based on 22.0-fix_build_without_leveldb.patch. ---- - configure.ac | 71 +++++++++++++++++++++++++++++++++++++-- - src/Makefile.am | 13 ++++++- - src/Makefile.test.include | 2 ++ - src/dbwrapper.cpp | 27 ++++++++++++++- - src/dbwrapper.h | 8 +++++ - src/kernel/checks.cpp | 7 ++++ - 6 files changed, 124 insertions(+), 4 deletions(-) - -diff --git a/configure.ac b/configure.ac -index c6dc5a6875..3507a81b7a 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1358,6 +1358,22 @@ 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]) -+AS_IF([test x$system_libsecp256k1 != xno],[ -+ PKG_CHECK_MODULES([libsecp256k1],[libsecp256k1],,[true]) -+],[ -+ libsecp256k1_CFLAGS='-I$(srcdir)/secp256k1/include' -+ libsecp256k1_LIBS='secp256k1/libsecp256k1.la' -+]) -+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 -@@ -1415,6 +1431,55 @@ if test "$build_bitcoind$bitcoin_enable_qt$use_bench$use_tests" = "nononono"; th - use_zmq=no - fi - -+dnl Check for leveldb, only if explicitly requested -+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]) -+AC_ARG_VAR([leveldb_CFLAGS],[C compiler flags for system-leveldb]) -+AC_ARG_VAR([leveldb_LIBS],[linker flags for system-leveldb]) -+AS_IF([test x$system_leveldb != xno],[ -+ TEMP_CPPFLAGS="$CPPFLAGS" -+ TEMP_LIBS="$LIBS" -+ CPPFLAGS="$leveldb_CFLAGS" -+ LIBS="$leveldb_LIBS" -+ AC_SEARCH_LIBS([leveldb_open],[leveldb],[leveldb_LIBS="$LIBS"], -+ [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_ERROR([LevelDB headers not found; using --with-system-leveldb is not supported anyway])]) -+ -+ AC_MSG_CHECKING([for library containing leveldb::NewMemEnv]) -+ 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 -+ LIBS="$searchlib $leveldb_LIBS" -+ AC_LINK_IFELSE([AC_LANG_PROGRAM([ -+ #include <leveldb/env.h> -+ #include <leveldb/helpers/memenv.h> -+ ],[ -+ leveldb::Env *myenv = leveldb::NewMemEnv(leveldb::Env::Default()); -+ delete myenv; -+ ]) -+ ],[ -+ AC_MSG_RESULT([$searchlib]) -+ break -+ ]) -+ done -+ leveldb_LIBS="$LIBS" -+ LIBS="$TEMP_LIBS" -+ CPPFLAGS="$TEMP_CPPFLAGS" -+],[ -+ AC_DEFINE([EMBEDDED_LEVELDB],[1],[Define to use the bundled LevelDB sources]) -+]) -+AM_CONDITIONAL([EMBEDDED_LEVELDB],[test x$system_leveldb = xno]) -+AC_SUBST(leveldb_CFLAGS) -+AC_SUBST(leveldb_LIBS) -+ - dnl Check for libminiupnpc (optional) - if test "$use_upnp" != "no"; then - TEMP_CPPFLAGS="$CPPFLAGS" -@@ -1989,8 +2054,10 @@ CPPFLAGS_TEMP="$CPPFLAGS" - unset CPPFLAGS - CPPFLAGS="$CPPFLAGS_TEMP" - --ac_configure_args="${ac_configure_args} --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --disable-module-ecdh" --AC_CONFIG_SUBDIRS([src/secp256k1]) -+AM_COND_IF([EMBEDDED_LIBSECP256K1],[ -+ ac_configure_args="${ac_configure_args} --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --disable-module-ecdh" -+ AC_CONFIG_SUBDIRS([src/secp256k1]) -+]) - - AC_OUTPUT - -diff --git a/src/Makefile.am b/src/Makefile.am -index 1d7004ac86..2fb8d3e2eb 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -24,7 +24,7 @@ check_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 -@@ -33,7 +33,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 -@@ -68,8 +72,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: -@@ -1104,8 +1110,13 @@ endif - - include Makefile.minisketch.include - -+if EMBEDDED_LEVELDB - include Makefile.crc32c.include - include Makefile.leveldb.include -+else -+LEVELDB_CPPFLAGS = $(leveldb_CFLAGS) -+LIBLEVELDB = $(leveldb_LIBS) -+endif - - include Makefile.test_util.include - include Makefile.test_fuzz.include -diff --git a/src/Makefile.test.include b/src/Makefile.test.include -index 15d5a17cec..9a7397f20f 100644 ---- a/src/Makefile.test.include -+++ b/src/Makefile.test.include -@@ -384,7 +384,9 @@ if ENABLE_BENCH - $(BENCH_BINARY) -sanity-check -priority-level=high - 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 -diff --git a/src/dbwrapper.cpp b/src/dbwrapper.cpp -index 2aade14ef4..279037ef01 100644 ---- a/src/dbwrapper.cpp -+++ b/src/dbwrapper.cpp -@@ -20,13 +20,38 @@ - #include <leveldb/db.h> - #include <leveldb/env.h> - #include <leveldb/filter_policy.h> --#include <leveldb/helpers/memenv/memenv.h> -+#if EMBEDDED_LEVELDB -+# include <leveldb/helpers/memenv/memenv.h> -+#else -+# include <leveldb/helpers/memenv.h> -+#endif - #include <leveldb/iterator.h> - #include <leveldb/options.h> - #include <leveldb/status.h> - #include <memory> - #include <optional> - -+#if !EMBEDDED_LEVELDB -+#include <node/interface_ui.h> -+#include <util/translation.h> -+#include <leveldb/c.h> -+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; -+} -+#endif -+ - class CBitcoinLevelDBLogger : public leveldb::Logger { - public: - // This code is adapted from posix_logger.h, which is why it is using vsprintf. -diff --git a/src/dbwrapper.h b/src/dbwrapper.h -index 35782edca6..0e306d7d9c 100644 ---- a/src/dbwrapper.h -+++ b/src/dbwrapper.h -@@ -5,6 +5,10 @@ - #ifndef BITCOIN_DBWRAPPER_H - #define BITCOIN_DBWRAPPER_H - -+#if defined(HAVE_CONFIG_H) -+#include <config/bitcoin-config.h> -+#endif -+ - #include <clientversion.h> - #include <logging.h> - #include <serialize.h> -@@ -54,6 +58,10 @@ struct DBParams { - DBOptions options{}; - }; - -+#if !EMBEDDED_LEVELDB -+bool dbwrapper_SanityCheck(); -+#endif -+ - class dbwrapper_error : public std::runtime_error - { - public: -diff --git a/src/kernel/checks.cpp b/src/kernel/checks.cpp -index 4c303c172c..a8867c3aa5 100644 ---- a/src/kernel/checks.cpp -+++ b/src/kernel/checks.cpp -@@ -4,6 +4,7 @@ - - #include <kernel/checks.h> - -+#include <dbwrapper.h> - #include <key.h> - #include <random.h> - #include <util/time.h> -@@ -15,6 +16,12 @@ namespace kernel { - - std::optional<bilingual_str> SanityChecks(const Context&) - { -+#if !EMBEDDED_LEVELDB -+ if (!dbwrapper_SanityCheck()) { -+ return Untranslated("Database sanity check failure. Aborting."); -+ } -+#endif -+ - if (!ECC_InitSanityCheck()) { - return Untranslated("Elliptic curve cryptography sanity check failure. Aborting."); - } --- -2.42.0 - diff --git a/net-p2p/bitcoin-core/files/26.0-syslibs.patch b/net-p2p/bitcoin-core/files/26.0-syslibs.patch deleted file mode 100644 index 614fc5c0ce44..000000000000 --- a/net-p2p/bitcoin-core/files/26.0-syslibs.patch +++ /dev/null @@ -1,296 +0,0 @@ -From 0297368af75f834622bd8d7052168cf25aaad42f Mon Sep 17 00:00:00 2001 -From: Matt Whitlock <bitcoin@mattwhitlock.name> -Date: Sun, 17 Sep 2023 10:29:27 -0400 -Subject: [PATCH] support linking against system-installed leveldb and - libsecp256k1 - -- Abort if runtime leveldb != compiled-against leveldb. - -Originally based on 22.0-fix_build_without_leveldb.patch. ---- - configure.ac | 90 ++++++++++++++++++++++++++++++++++++++- - src/Makefile.am | 13 +++++- - src/Makefile.test.include | 2 + - src/dbwrapper.cpp | 27 +++++++++++- - src/dbwrapper.h | 8 ++++ - src/kernel/checks.cpp | 7 +++ - 6 files changed, 143 insertions(+), 4 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 01636ab872..8ff1b04930 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1364,6 +1364,41 @@ 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[=PKG]]], -+ [build using system-installed libsecp256k1 instead of bundled, passing PKG (default: libsecp256k1) to pkg-config (default is no; DANGEROUS; NOT SUPPORTED)])], -+ [AS_IF([test "x$withval" = xyes], [with_system_libsecp256k1=libsecp256k1])], -+ [with_system_libsecp256k1=no]) -+AM_CONDITIONAL([EMBEDDED_LIBSECP256K1],[test "x$with_system_libsecp256k1" = xno]) -+AM_COND_IF([EMBEDDED_LIBSECP256K1], [ -+ libsecp256k1_CFLAGS='-I$(srcdir)/secp256k1/include' -+ libsecp256k1_LIBS='secp256k1/libsecp256k1.la' -+], [ -+ saved_CPPFLAGS=$CPPFLAGS -+ saved_LIBS=$LIBS -+ PKG_CHECK_MODULES([libsecp256k1], [$with_system_libsecp256k1]) -+ CPPFLAGS="$libsecp256k1_CFLAGS $CPPFLAGS" -+ LIBS="$libsecp256k1_LIBS $LIBS" -+ missing_modules= -+ AC_DEFUN([CHECK_MODULE], [ -+ AC_CHECK_HEADER([secp256k1_$1.h], -+ [AC_CHECK_FUNCS([$2], [], [missing_modules="${missing_modules} $1"])], -+ [missing_modules="${missing_modules} $1"]) -+ ]) -+ CHECK_MODULE([ellswift], [secp256k1_ellswift_encode]) -+ CHECK_MODULE([extrakeys], [secp256k1_xonly_pubkey_parse]) -+ CHECK_MODULE([recovery], [secp256k1_ecdsa_recover]) -+ CHECK_MODULE([schnorrsig], [secp256k1_schnorrsig_verify]) -+ AS_IF([test -n "${missing_modules}"], [ -+ AC_MSG_ERROR([system-installed libsecp256k1 does not support these required modules:${missing_modules}]) -+ ]) -+ CPPFLAGS=$saved_CPPFLAGS -+ LIBS=$saved_LIBS -+]) -+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 -@@ -1423,6 +1458,55 @@ if test "$build_bitcoind$bitcoin_enable_qt$use_bench$use_tests" = "nononono"; th - use_zmq=no - fi - -+dnl Check for leveldb, only if explicitly requested -+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]) -+AC_ARG_VAR([leveldb_CFLAGS],[C compiler flags for system-leveldb]) -+AC_ARG_VAR([leveldb_LIBS],[linker flags for system-leveldb]) -+AS_IF([test x$system_leveldb != xno],[ -+ TEMP_CPPFLAGS="$CPPFLAGS" -+ TEMP_LIBS="$LIBS" -+ CPPFLAGS="$leveldb_CFLAGS" -+ LIBS="$leveldb_LIBS" -+ AC_SEARCH_LIBS([leveldb_open],[leveldb],[leveldb_LIBS="$LIBS"], -+ [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_ERROR([LevelDB headers not found; using --with-system-leveldb is not supported anyway])]) -+ -+ AC_MSG_CHECKING([for library containing leveldb::NewMemEnv]) -+ 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 -+ LIBS="$searchlib $leveldb_LIBS" -+ AC_LINK_IFELSE([AC_LANG_PROGRAM([ -+ #include <leveldb/env.h> -+ #include <leveldb/helpers/memenv.h> -+ ],[ -+ leveldb::Env *myenv = leveldb::NewMemEnv(leveldb::Env::Default()); -+ delete myenv; -+ ]) -+ ],[ -+ AC_MSG_RESULT([$searchlib]) -+ break -+ ]) -+ done -+ leveldb_LIBS="$LIBS" -+ LIBS="$TEMP_LIBS" -+ CPPFLAGS="$TEMP_CPPFLAGS" -+],[ -+ AC_DEFINE([EMBEDDED_LEVELDB],[1],[Define to use the bundled LevelDB sources]) -+]) -+AM_CONDITIONAL([EMBEDDED_LEVELDB],[test x$system_leveldb = xno]) -+AC_SUBST(leveldb_CFLAGS) -+AC_SUBST(leveldb_LIBS) -+ - dnl Check for libminiupnpc (optional) - if test "$use_upnp" != "no"; then - TEMP_CPPFLAGS="$CPPFLAGS" -@@ -1959,8 +2043,10 @@ CPPFLAGS_TEMP="$CPPFLAGS" - unset CPPFLAGS - CPPFLAGS="$CPPFLAGS_TEMP" - --ac_configure_args="${ac_configure_args} --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --disable-module-ecdh" --AC_CONFIG_SUBDIRS([src/secp256k1]) -+AM_COND_IF([EMBEDDED_LIBSECP256K1],[ -+ ac_configure_args="${ac_configure_args} --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --disable-module-ecdh" -+ AC_CONFIG_SUBDIRS([src/secp256k1]) -+]) - - AC_OUTPUT - -diff --git a/src/Makefile.am b/src/Makefile.am -index 8905c0ad1c..8869bf4cff 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -24,7 +24,7 @@ check_PROGRAMS = - TESTS = - BENCHMARKS = - --BITCOIN_INCLUDES=-I$(builddir) -I$(srcdir)/$(MINISKETCH_INCLUDE_DIR_INT) -I$(srcdir)/secp256k1/include -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT) -+BITCOIN_INCLUDES=-I$(builddir) -I$(srcdir)/$(MINISKETCH_INCLUDE_DIR_INT) $(libsecp256k1_CFLAGS) -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT) - - LIBBITCOIN_NODE=libbitcoin_node.a - LIBBITCOIN_COMMON=libbitcoin_common.a -@@ -33,7 +33,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 -@@ -68,8 +72,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: -@@ -1129,8 +1135,13 @@ endif - - include Makefile.minisketch.include - -+if EMBEDDED_LEVELDB - include Makefile.crc32c.include - include Makefile.leveldb.include -+else -+LEVELDB_CPPFLAGS = $(leveldb_CFLAGS) -+LIBLEVELDB = $(leveldb_LIBS) -+endif - - include Makefile.test_util.include - include Makefile.test_fuzz.include -diff --git a/src/Makefile.test.include b/src/Makefile.test.include -index b610dabd07..cf79094fb9 100644 ---- a/src/Makefile.test.include -+++ b/src/Makefile.test.include -@@ -392,7 +392,9 @@ if ENABLE_BENCH - $(BENCH_BINARY) -sanity-check -priority-level=high - 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 -diff --git a/src/dbwrapper.cpp b/src/dbwrapper.cpp -index 775496e21b..1304b2a2b3 100644 ---- a/src/dbwrapper.cpp -+++ b/src/dbwrapper.cpp -@@ -22,7 +22,11 @@ - #include <leveldb/db.h> - #include <leveldb/env.h> - #include <leveldb/filter_policy.h> --#include <leveldb/helpers/memenv/memenv.h> -+#if EMBEDDED_LEVELDB -+# include <leveldb/helpers/memenv/memenv.h> -+#else -+# include <leveldb/helpers/memenv.h> -+#endif - #include <leveldb/iterator.h> - #include <leveldb/options.h> - #include <leveldb/slice.h> -@@ -51,6 +55,27 @@ static void HandleError(const leveldb::Status& status) - throw dbwrapper_error(errmsg); - } - -+#if !EMBEDDED_LEVELDB -+#include <node/interface_ui.h> -+#include <util/translation.h> -+#include <leveldb/c.h> -+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; -+} -+#endif -+ - class CBitcoinLevelDBLogger : public leveldb::Logger { - public: - // This code is adapted from posix_logger.h, which is why it is using vsprintf. -diff --git a/src/dbwrapper.h b/src/dbwrapper.h -index 63c2f99d2a..406d03f1ea 100644 ---- a/src/dbwrapper.h -+++ b/src/dbwrapper.h -@@ -5,6 +5,10 @@ - #ifndef BITCOIN_DBWRAPPER_H - #define BITCOIN_DBWRAPPER_H - -+#if defined(HAVE_CONFIG_H) -+#include <config/bitcoin-config.h> -+#endif -+ - #include <attributes.h> - #include <serialize.h> - #include <span.h> -@@ -46,6 +50,10 @@ struct DBParams { - DBOptions options{}; - }; - -+#if !EMBEDDED_LEVELDB -+bool dbwrapper_SanityCheck(); -+#endif -+ - class dbwrapper_error : public std::runtime_error - { - public: -diff --git a/src/kernel/checks.cpp b/src/kernel/checks.cpp -index bf8a2ec74c..640deb2415 100644 ---- a/src/kernel/checks.cpp -+++ b/src/kernel/checks.cpp -@@ -4,6 +4,7 @@ - - #include <kernel/checks.h> - -+#include <dbwrapper.h> - #include <key.h> - #include <random.h> - #include <util/time.h> -@@ -15,6 +16,12 @@ namespace kernel { - - util::Result<void> SanityChecks(const Context&) - { -+#if !EMBEDDED_LEVELDB -+ if (!dbwrapper_SanityCheck()) { -+ return util::Error{Untranslated("Database sanity check failure. Aborting.")}; -+ } -+#endif -+ - if (!ECC_InitSanityCheck()) { - return util::Error{Untranslated("Elliptic curve cryptography sanity check failure. Aborting.")}; - } --- -2.43.0 - diff --git a/net-p2p/bitcoin-core/files/27.0-gcc15.patch b/net-p2p/bitcoin-core/files/27.0-gcc15.patch deleted file mode 100644 index ab6c3df388fa..000000000000 --- a/net-p2p/bitcoin-core/files/27.0-gcc15.patch +++ /dev/null @@ -1,61 +0,0 @@ -From e866aecd9b5697aee1291bc4daf48d09824804d4 Mon Sep 17 00:00:00 2001 -From: Matt Whitlock <bitcoin@mattwhitlock.name> -Date: Wed, 7 Aug 2024 21:14:28 -0400 -Subject: [PATCH] policy/feerate.h: avoid constraint self-dependency - -In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/format:48, - from /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/chrono_io.h:39, - from /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/chrono:3362, - from ./util/time.h:9, - from ./primitives/block.h:12, - from ./blockencodings.h:8, - from blockencodings.cpp:5: -/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/type_traits: In substitution of 'template<class _Up> requires !(is_same_v<std::optional<_Tp>, typename std::remove_cvref<_It2>::type>) && (is_constructible_v<_Tp, const _Up&>) && (__construct_from_contained_value<_Up, typename std::remove_cv< <template-parameter-1-1> >::type>) constexpr std::optional<CFeeRate>::optional(const std::optional<_Tp>&) [with _Up = CFeeRate]': -/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/type_traits:1140:25: required by substitution of 'template<class _Tp, class ... _Args> using std::__is_constructible_impl = std::__bool_constant<__is_constructible(_Tp, _Args ...)> [with _Tp = CFeeRate; _Args = {std::optional<CFeeRate>&}]' - 1140 | = __bool_constant<__is_constructible(_Tp, _Args...)>; - | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/type_traits:1145:12: required from 'struct std::is_constructible<CFeeRate, std::optional<CFeeRate>&>' - 1145 | struct is_constructible - | ^~~~~~~~~~~~~~~~ -/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/type_traits:178:35: required by substitution of 'template<class ... _Bn> std::__detail::__first_t<std::integral_constant<bool, false>, typename std::enable_if<(!(bool)(_Bn::value)), void>::type ...> std::__detail::__or_fn(int) [with _Bn = {std::is_constructible<CFeeRate, std::optional<CFeeRate>&>, std::is_convertible<std::optional<CFeeRate>&, CFeeRate>, std::is_constructible<CFeeRate, std::optional<CFeeRate> >, std::is_convertible<std::optional<CFeeRate>, CFeeRate>, std::is_constructible<CFeeRate, const std::optional<CFeeRate>&>, std::is_convertible<const std::optional<CFeeRate>&, CFeeRate>, std::is_constructible<CFeeRate, const std::optional<CFeeRate> >, std::is_convertible<const std::optional<CFeeRate>, CFeeRate>}]' - 178 | __enable_if_t<!bool(_Bn::value)>...>; - | ^~~~~ -/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/type_traits:196:41: required from 'struct std::__or_<std::is_constructible<CFeeRate, std::optional<CFeeRate>&>, std::is_convertible<std::optional<CFeeRate>&, CFeeRate>, std::is_constructible<CFeeRate, std::optional<CFeeRate> >, std::is_convertible<std::optional<CFeeRate>, CFeeRate>, std::is_constructible<CFeeRate, const std::optional<CFeeRate>&>, std::is_convertible<const std::optional<CFeeRate>&, CFeeRate>, std::is_constructible<CFeeRate, const std::optional<CFeeRate> >, std::is_convertible<const std::optional<CFeeRate>, CFeeRate> >' - 196 | : decltype(__detail::__or_fn<_Bn...>(0)) - | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~ -/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/optional:824:45: required from 'constexpr const bool std::optional<CFeeRate>::__construct_from_contained_value<CFeeRate, CFeeRate>' - 824 | = !__converts_from_optional<_Tp, _From>::value; - | ^~~~~ -/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/optional:884:7: required by substitution of 'template<class _Up> requires !(is_same_v<std::optional<_Tp>, typename std::remove_cvref<_It2>::type>) && (is_constructible_v<_Tp, const _Up&>) && (__construct_from_contained_value<_Up, typename std::remove_cv< <template-parameter-1-1> >::type>) constexpr std::optional<CFeeRate>::optional(const std::optional<_Tp>&) [with _Up = CFeeRate]' - 884 | && __construct_from_contained_value<_Up> - | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -./validation.h:164:41: required from here - 164 | return MempoolAcceptResult(state); - | ^ -/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/optional:886:2: required by the constraints of 'template<class _Tp> template<class _Up> requires !(is_same_v<std::optional<_Tp>, typename std::remove_cvref<_It2>::type>) && (is_constructible_v<_Tp, const _Up&>) && (__construct_from_contained_value<_Up, typename std::remove_cv< <template-parameter-1-1> >::type>) constexpr std::optional<_Tp>::optional(const std::optional<_From>&)' -/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/optional:884:14: error: satisfaction of atomic constraint '__construct_from_contained_value<_Up, typename std::remove_cv< <template-parameter-1-1> >::type> [with _Tp = _Tp; _Up = _Up]' depends on itself - 884 | && __construct_from_contained_value<_Up> - | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ---- - src/policy/feerate.h | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/src/policy/feerate.h b/src/policy/feerate.h -index 2e50172914..63ddf6827d 100644 ---- a/src/policy/feerate.h -+++ b/src/policy/feerate.h -@@ -38,10 +38,8 @@ private: - public: - /** Fee rate of 0 satoshis per kvB */ - CFeeRate() : nSatoshisPerK(0) { } -- template<typename I> -+ template<std::integral I> - explicit CFeeRate(const I _nSatoshisPerK): nSatoshisPerK(_nSatoshisPerK) { -- // We've previously had bugs creep in from silent double->int conversion... -- static_assert(std::is_integral<I>::value, "CFeeRate should be used without floats"); - } - - /** --- -2.45.2 - diff --git a/net-p2p/bitcoin-core/files/27.0-syslibs.patch b/net-p2p/bitcoin-core/files/27.0-syslibs.patch deleted file mode 100644 index 984e9b5181fb..000000000000 --- a/net-p2p/bitcoin-core/files/27.0-syslibs.patch +++ /dev/null @@ -1,296 +0,0 @@ -From d7d37c944809f8f957e7ad043b540feb4f25503c Mon Sep 17 00:00:00 2001 -From: Matt Whitlock <bitcoin@mattwhitlock.name> -Date: Sun, 17 Sep 2023 10:29:27 -0400 -Subject: [PATCH] support linking against system-installed leveldb and - libsecp256k1 - -- Abort if runtime leveldb != compiled-against leveldb. - -Originally based on 22.0-fix_build_without_leveldb.patch. ---- - configure.ac | 90 ++++++++++++++++++++++++++++++++++++++- - src/Makefile.am | 13 +++++- - src/Makefile.test.include | 2 + - src/dbwrapper.cpp | 27 +++++++++++- - src/dbwrapper.h | 8 ++++ - src/kernel/checks.cpp | 7 +++ - 6 files changed, 143 insertions(+), 4 deletions(-) - -diff --git a/configure.ac b/configure.ac -index d39006be33..ee7b092131 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1291,6 +1291,41 @@ if test "$enable_fuzz_binary" = "yes"; then - ]])]) - fi - -+dnl Check for libsecp256k1, only if explicitly requested -+AC_ARG_WITH([system-libsecp256k1], -+ [AS_HELP_STRING([[--with-system-libsecp256k1[=PKG]]], -+ [build using system-installed libsecp256k1 instead of bundled, passing PKG (default: libsecp256k1) to pkg-config (default is no; DANGEROUS; NOT SUPPORTED)])], -+ [AS_IF([test "x$withval" = xyes], [with_system_libsecp256k1=libsecp256k1])], -+ [with_system_libsecp256k1=no]) -+AM_CONDITIONAL([EMBEDDED_LIBSECP256K1],[test "x$with_system_libsecp256k1" = xno]) -+AM_COND_IF([EMBEDDED_LIBSECP256K1], [ -+ libsecp256k1_CFLAGS='-I$(srcdir)/secp256k1/include' -+ libsecp256k1_LIBS='secp256k1/libsecp256k1.la' -+], [ -+ saved_CPPFLAGS=$CPPFLAGS -+ saved_LIBS=$LIBS -+ PKG_CHECK_MODULES([libsecp256k1], [$with_system_libsecp256k1]) -+ CPPFLAGS="$libsecp256k1_CFLAGS $CPPFLAGS" -+ LIBS="$libsecp256k1_LIBS $LIBS" -+ missing_modules= -+ AC_DEFUN([CHECK_MODULE], [ -+ AC_CHECK_HEADER([secp256k1_$1.h], -+ [AC_CHECK_FUNCS([$2], [], [missing_modules="${missing_modules} $1"])], -+ [missing_modules="${missing_modules} $1"]) -+ ]) -+ CHECK_MODULE([ellswift], [secp256k1_ellswift_encode]) -+ CHECK_MODULE([extrakeys], [secp256k1_xonly_pubkey_parse]) -+ CHECK_MODULE([recovery], [secp256k1_ecdsa_recover]) -+ CHECK_MODULE([schnorrsig], [secp256k1_schnorrsig_verify]) -+ AS_IF([test -n "${missing_modules}"], [ -+ AC_MSG_ERROR([system-installed libsecp256k1 does not support these required modules:${missing_modules}]) -+ ]) -+ CPPFLAGS=$saved_CPPFLAGS -+ LIBS=$saved_LIBS -+]) -+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 -@@ -1350,6 +1385,55 @@ if test "$build_bitcoind$bitcoin_enable_qt$use_bench$use_tests" = "nononono"; th - use_zmq=no - fi - -+dnl Check for leveldb, only if explicitly requested -+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]) -+AC_ARG_VAR([leveldb_CFLAGS],[C compiler flags for system-leveldb]) -+AC_ARG_VAR([leveldb_LIBS],[linker flags for system-leveldb]) -+AS_IF([test x$system_leveldb != xno],[ -+ TEMP_CPPFLAGS="$CPPFLAGS" -+ TEMP_LIBS="$LIBS" -+ CPPFLAGS="$leveldb_CFLAGS" -+ LIBS="$leveldb_LIBS" -+ AC_SEARCH_LIBS([leveldb_open],[leveldb],[leveldb_LIBS="$LIBS"], -+ [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_ERROR([LevelDB headers not found; using --with-system-leveldb is not supported anyway])]) -+ -+ AC_MSG_CHECKING([for library containing leveldb::NewMemEnv]) -+ 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 -+ LIBS="$searchlib $leveldb_LIBS" -+ AC_LINK_IFELSE([AC_LANG_PROGRAM([ -+ #include <leveldb/env.h> -+ #include <leveldb/helpers/memenv.h> -+ ],[ -+ leveldb::Env *myenv = leveldb::NewMemEnv(leveldb::Env::Default()); -+ delete myenv; -+ ]) -+ ],[ -+ AC_MSG_RESULT([$searchlib]) -+ break -+ ]) -+ done -+ leveldb_LIBS="$LIBS" -+ LIBS="$TEMP_LIBS" -+ CPPFLAGS="$TEMP_CPPFLAGS" -+],[ -+ AC_DEFINE([EMBEDDED_LEVELDB],[1],[Define to use the bundled LevelDB sources]) -+]) -+AM_CONDITIONAL([EMBEDDED_LEVELDB],[test x$system_leveldb = xno]) -+AC_SUBST(leveldb_CFLAGS) -+AC_SUBST(leveldb_LIBS) -+ - dnl Check for libminiupnpc (optional) - if test "$use_upnp" != "no"; then - TEMP_CPPFLAGS="$CPPFLAGS" -@@ -1897,8 +1981,10 @@ CPPFLAGS="$CPPFLAGS_TEMP" - if test -n "$use_sanitizers"; then - export SECP_CFLAGS="$SECP_CFLAGS $SANITIZER_CFLAGS" - fi --ac_configure_args="${ac_configure_args} --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --disable-module-ecdh" --AC_CONFIG_SUBDIRS([src/secp256k1]) -+AM_COND_IF([EMBEDDED_LIBSECP256K1],[ -+ ac_configure_args="${ac_configure_args} --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --disable-module-ecdh" -+ AC_CONFIG_SUBDIRS([src/secp256k1]) -+]) - - AC_OUTPUT - -diff --git a/src/Makefile.am b/src/Makefile.am -index b5d5c4652a..91dec582e2 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -24,7 +24,7 @@ check_PROGRAMS = - TESTS = - BENCHMARKS = - --BITCOIN_INCLUDES=-I$(builddir) -I$(srcdir)/$(MINISKETCH_INCLUDE_DIR_INT) -I$(srcdir)/secp256k1/include -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT) -+BITCOIN_INCLUDES=-I$(builddir) -I$(srcdir)/$(MINISKETCH_INCLUDE_DIR_INT) $(libsecp256k1_CFLAGS) -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT) - - LIBBITCOIN_NODE=libbitcoin_node.a - LIBBITCOIN_COMMON=libbitcoin_common.a -@@ -33,7 +33,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 -@@ -68,8 +72,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: -@@ -1132,8 +1138,13 @@ endif - - include Makefile.minisketch.include - -+if EMBEDDED_LEVELDB - include Makefile.crc32c.include - include Makefile.leveldb.include -+else -+LEVELDB_CPPFLAGS = $(leveldb_CFLAGS) -+LIBLEVELDB = $(leveldb_LIBS) -+endif - - include Makefile.test_util.include - include Makefile.test_fuzz.include -diff --git a/src/Makefile.test.include b/src/Makefile.test.include -index 9f9bdbbd0c..3585e16bbe 100644 ---- a/src/Makefile.test.include -+++ b/src/Makefile.test.include -@@ -435,7 +435,9 @@ if ENABLE_BENCH - $(BENCH_BINARY) -sanity-check -priority-level=high - 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 -diff --git a/src/dbwrapper.cpp b/src/dbwrapper.cpp -index 775496e21b..1304b2a2b3 100644 ---- a/src/dbwrapper.cpp -+++ b/src/dbwrapper.cpp -@@ -22,7 +22,11 @@ - #include <leveldb/db.h> - #include <leveldb/env.h> - #include <leveldb/filter_policy.h> --#include <leveldb/helpers/memenv/memenv.h> -+#if EMBEDDED_LEVELDB -+# include <leveldb/helpers/memenv/memenv.h> -+#else -+# include <leveldb/helpers/memenv.h> -+#endif - #include <leveldb/iterator.h> - #include <leveldb/options.h> - #include <leveldb/slice.h> -@@ -51,6 +55,27 @@ static void HandleError(const leveldb::Status& status) - throw dbwrapper_error(errmsg); - } - -+#if !EMBEDDED_LEVELDB -+#include <node/interface_ui.h> -+#include <util/translation.h> -+#include <leveldb/c.h> -+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; -+} -+#endif -+ - class CBitcoinLevelDBLogger : public leveldb::Logger { - public: - // This code is adapted from posix_logger.h, which is why it is using vsprintf. -diff --git a/src/dbwrapper.h b/src/dbwrapper.h -index 63c2f99d2a..406d03f1ea 100644 ---- a/src/dbwrapper.h -+++ b/src/dbwrapper.h -@@ -5,6 +5,10 @@ - #ifndef BITCOIN_DBWRAPPER_H - #define BITCOIN_DBWRAPPER_H - -+#if defined(HAVE_CONFIG_H) -+#include <config/bitcoin-config.h> -+#endif -+ - #include <attributes.h> - #include <serialize.h> - #include <span.h> -@@ -46,6 +50,10 @@ struct DBParams { - DBOptions options{}; - }; - -+#if !EMBEDDED_LEVELDB -+bool dbwrapper_SanityCheck(); -+#endif -+ - class dbwrapper_error : public std::runtime_error - { - public: -diff --git a/src/kernel/checks.cpp b/src/kernel/checks.cpp -index bf8a2ec74c..640deb2415 100644 ---- a/src/kernel/checks.cpp -+++ b/src/kernel/checks.cpp -@@ -4,6 +4,7 @@ - - #include <kernel/checks.h> - -+#include <dbwrapper.h> - #include <key.h> - #include <random.h> - #include <util/time.h> -@@ -15,6 +16,12 @@ namespace kernel { - - util::Result<void> SanityChecks(const Context&) - { -+#if !EMBEDDED_LEVELDB -+ if (!dbwrapper_SanityCheck()) { -+ return util::Error{Untranslated("Database sanity check failure. Aborting.")}; -+ } -+#endif -+ - if (!ECC_InitSanityCheck()) { - return util::Error{Untranslated("Elliptic curve cryptography sanity check failure. Aborting.")}; - } --- -2.44.0 - diff --git a/net-p2p/bitcoin-core/files/init.patch b/net-p2p/bitcoin-core/files/init.patch deleted file mode 100644 index 7b78217fe8a7..000000000000 --- a/net-p2p/bitcoin-core/files/init.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- a/contrib/init/bitcoind.openrcconf -+++ b/contrib/init/bitcoind.openrcconf -@@ -4,14 +4,17 @@ - #BITCOIND_CONFIGFILE="/etc/bitcoin/bitcoin.conf" - - # What directory to write pidfile to? (created and owned by $BITCOIND_USER) --#BITCOIND_PIDDIR="/var/run/bitcoind" -+#BITCOIND_PIDDIR="/run/bitcoind" - - # What filename to give the pidfile --#BITCOIND_PIDFILE="${BITCOIND_PIDDIR}/bitcoind.pid" -+#BITCOIND_PIDFILE="${BITCOIND_PIDDIR}/${SVCNAME}.pid" - - # Where to write bitcoind data (be mindful that the blockchain is large) - #BITCOIND_DATADIR="/var/lib/bitcoind" - -+# Where to write the debug.log file -+#BITCOIND_LOGDIR="/var/log/bitcoind" -+ - # User and group to own bitcoind process - #BITCOIND_USER="bitcoin" - #BITCOIND_GROUP="bitcoin" ---- a/contrib/init/bitcoind.service -+++ b/contrib/init/bitcoind.service -@@ -21,6 +21,7 @@ Wants=network-online.target - ExecStart=/usr/bin/bitcoind -daemonwait \ - -pid=/run/bitcoind/bitcoind.pid \ - -conf=/etc/bitcoin/bitcoin.conf \ -+ -debuglogfile=/var/log/bitcoind/debug.log \ - -datadir=/var/lib/bitcoind - - # Make sure the config directory is readable by the service user -@@ -51,6 +52,10 @@ RuntimeDirectoryMode=0710 - ConfigurationDirectory=bitcoin - ConfigurationDirectoryMode=0710 - -+# /var/log/bitcoind -+LogsDirectory=bitcoind -+LogsDirectoryMode=0755 -+ - # /var/lib/bitcoind - StateDirectory=bitcoind - StateDirectoryMode=0710 diff --git a/net-p2p/bitcoin-core/metadata.xml b/net-p2p/bitcoin-core/metadata.xml index 57e1f807773b..832f9a736013 100644 --- a/net-p2p/bitcoin-core/metadata.xml +++ b/net-p2p/bitcoin-core/metadata.xml @@ -11,12 +11,10 @@ </maintainer> <use> <flag name="berkdb">Support legacy wallets in Berkeley DB format</flag> - <flag name="bitcoin-cli">Build and install bitcoin-cli command line interface</flag> <flag name="cli">Build and install bitcoin-cli command line interface</flag> <flag name="daemon">Build and install bitcoind daemon</flag> <flag name="external-signer">Include support for external wallet signer programs</flag> <flag name="gui">Build and install Bitcoin-Qt GUI</flag> - <flag name="libs">Build and install libbitcoinconsensus</flag> <flag name="nat-pmp">Enable NAT-PMP port forwarding</flag> <flag name="qrcode">Enable generation of QR Codes for receiving payments</flag> <flag name="sqlite">Support descriptor wallets in SQLite format</flag> |