From 765f3085dff7aa91611f52edd6c6b9f97f9f552f Mon Sep 17 00:00:00 2001 From: "Anthony G. Basile" Date: Sat, 17 Mar 2012 23:23:20 +0000 Subject: Added src_test() to current stable and added next rc Package-Manager: portage-2.1.10.44/cvs/Linux x86_64 --- net-p2p/bitcoind/ChangeLog | 10 +- net-p2p/bitcoind/Manifest | 12 +- net-p2p/bitcoind/bitcoind-0.5.3-r1.ebuild | 105 +++++++++++++++++ net-p2p/bitcoind/bitcoind-0.6.0_rc4.ebuild | 104 +++++++++++++++++ net-p2p/bitcoind/files/9999-eligius_sendfee.patch | 131 ++++++++++++++++++++++ 5 files changed, 357 insertions(+), 5 deletions(-) create mode 100644 net-p2p/bitcoind/bitcoind-0.5.3-r1.ebuild create mode 100644 net-p2p/bitcoind/bitcoind-0.6.0_rc4.ebuild create mode 100644 net-p2p/bitcoind/files/9999-eligius_sendfee.patch (limited to 'net-p2p') diff --git a/net-p2p/bitcoind/ChangeLog b/net-p2p/bitcoind/ChangeLog index aa654e51a202..05d974e13fcf 100644 --- a/net-p2p/bitcoind/ChangeLog +++ b/net-p2p/bitcoind/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-p2p/bitcoind # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/ChangeLog,v 1.15 2012/03/16 12:33:19 blueness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/ChangeLog,v 1.16 2012/03/17 23:23:19 blueness Exp $ + +*bitcoind-0.6.0_rc4 (17 Mar 2012) +*bitcoind-0.5.3-r1 (17 Mar 2012) + + 17 Mar 2012; Anthony G. Basile + +files/9999-eligius_sendfee.patch, +bitcoind-0.5.3-r1.ebuild, + +bitcoind-0.6.0_rc4.ebuild: + Added src_test() to current stable and added next rc. 16 Mar 2012; Anthony G. Basile bitcoind-0.5.3.ebuild, +files/bitcoind-remove-debug.patch: diff --git a/net-p2p/bitcoind/Manifest b/net-p2p/bitcoind/Manifest index fb01e6bf8fc7..557b84b85395 100644 --- a/net-p2p/bitcoind/Manifest +++ b/net-p2p/bitcoind/Manifest @@ -2,6 +2,7 @@ Hash: SHA256 AUX 0.4.2-Makefile.gentoo 1845 RMD160 d08abd86b0c17d7b4ba20552fe04146c025fa0d4 SHA1 13017e850bd8e94864bc665a33bc7b959f92f3d5 SHA256 7ab3bf195862802f527c2016b126f7fba7d63a8b3e2048634011cdfa761cb750 +AUX 9999-eligius_sendfee.patch 5073 RMD160 7af7540a05243c7e267734c5f5b20bebaba4b1ec SHA1 dfd777fc408e2d670533188900885702be6e9baa SHA256 fbaa91d15db631ae9af2cadbf4b0937ac786b1b061692e05fbb47db1abf6f305 AUX bitcoin.conf 80 RMD160 d55c1ac48956c33cf4bf231f21ea81a7b1adc244 SHA1 12406dc38cd00a8160cb4246b7a167f4319c6715 SHA256 541ae10cc2246b620de3e7efa97eee59efacf83d28ea5f1297a121d0708226d2 AUX bitcoin.confd 238 RMD160 1f84716f3ac81da9b06b925913550acfe542f4b5 SHA1 138fefcfa996f62bd9113633bd8505df002f545c SHA256 72300b41d57325de5a5f2ddea449d5f414f278549fb665d60746707ee5de2549 AUX bitcoin.initd 2481 RMD160 ea5398f2775eea17ab9a337650eef30e7912244d SHA1 356a3a0509c465bcc0ce67cfcc22aca745346e4e SHA256 5dace582c4bf05d893166794ce620ca13b794b695376030f7d319bb22a0c956a @@ -12,16 +13,19 @@ DIST bitcoin-v0.4.4.tgz 904085 RMD160 3a00be1af20cad9c35740f47a7dd53f6ffb1b906 S DIST bitcoin-v0.5.0.4.tgz 902417 RMD160 774637dc953041913b114745436f66993b3736cc SHA1 daabee6998c8d2608bd7f0555891192738ad15be SHA256 48d3c98ba3d778438658528947089c46c12ef2d891b9d0412a1899b95f232331 DIST bitcoin-v0.5.1.tgz 1007787 RMD160 107944a2f37cc0f873248ef8f2c23a602dfc2dd7 SHA1 27189303b71c6e9c5140c39659ea1f5280e8b4f0 SHA256 e33279066298e0a29e1dcca566d0a0bbcd89ef6e02d43bdbbeaf046f5faf66fe DIST bitcoin-v0.5.3.tgz 1012843 RMD160 92875b0073ada3771c79960c1a7aac3df511a49d SHA1 ac181eb976780f8af2ea5a3df2d9709accaa283f SHA256 0f39305d3da134a04c2509569f0c65dbe889aff9c91aef2deb3cfaa386094c0c +DIST bitcoin-v0.6.0_rc4.tgz 1237013 RMD160 503e7e26b53f92fb9b7a9373e4505bbdf3aeaa4b SHA1 0503afe1cc81d41dda9f7988d42d7f01127dbd9a SHA256 a0a013fa97743b8d0dc9234e726d02f6bd06a0e9a2ece42bdee23de281a11cdc EBUILD bitcoind-0.4.4.ebuild 2347 RMD160 8c126373311a196e68b1c2b80068e9da12bde183 SHA1 6ff8a6ed9f0416c738d60b5f1077bd213463031e SHA256 7352589cb4538095e8884147cd295bbeac5bc7ec55e16745feaff410ee4294cd EBUILD bitcoind-0.5.0.4.ebuild 2436 RMD160 52c31988f51891ac2b67f2af90b1e5e14e60b701 SHA1 6e4bb7644478720be46849580bc4553b0b45ea07 SHA256 445128072efe87f35d60bb6f7700720d0dac9a5851cf6e3a5a0afb807f9648af EBUILD bitcoind-0.5.1.ebuild 2415 RMD160 8a50bc0e1eebdb6f1636e04a0cc4d31273a9b69b SHA1 f845cef0735ff9e8b35097c0ad53132b21c5b027 SHA256 1220178545e3f66acce24976686588056e1e568edc549e0e3a978f26fa8de1c3 +EBUILD bitcoind-0.5.3-r1.ebuild 2669 RMD160 2194183e7534c83e9f056774131d1aa04aab5f83 SHA1 003ef5f33043f6f1b23fd6cd5840074de9bf6008 SHA256 34a3f1f34efbbad683415381e9b810744699718cbd81d6e6be873925afd6bb24 EBUILD bitcoind-0.5.3.ebuild 2540 RMD160 d189020a3f2b43a30a501366cc7f446e669db6f8 SHA1 3fcf619b14621f58d54b2da7e2c361358c12af83 SHA256 f6e732e13df2cb203069ab83ad84326d5218493aac0d14a7ac361478eab5c8cb -MISC ChangeLog 4106 RMD160 9b5322320a29e536a45298c0a13ec4734aab85b5 SHA1 98f46bef92e5d15d5ef14d622712d0f2d0063a47 SHA256 b828db0a7103b8a9f05ecd5645c2caed50590d81ecc94f05d7c573bb6ffb2885 +EBUILD bitcoind-0.6.0_rc4.ebuild 2570 RMD160 3723c26488a5ac45afdf8c633c061bead90348a8 SHA1 928e3878d1f4743a7cde707c918c0cb1a01047da SHA256 a9f77e3fdc38541326560867931d7b6b64557245c68920e301f4388f96d66ad7 +MISC ChangeLog 4380 RMD160 12b19a1644af8801627389e7412b3527ddea6aa2 SHA1 a6395c4d89ab195dde039b97ca917ca143895c40 SHA256 bbf999df9f6d2d3838629b69380c72ab173fbfd8540e53105356f4a50103cf2e MISC metadata.xml 489 RMD160 1bc142d56b8eba454c8b78611dc4a7949e365c4c SHA1 ef5280c637b35e90450c0dfc1b7729b32dac35de SHA256 8625c76579833480ab4a641f5a3723b4d624f23b0c46845637107e216d1560e8 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) -iEYEAREIAAYFAk9jMwYACgkQl5yvQNBFVTXEOQCePfubsfiWmEMvmtBXACLqXj3+ -RkwAoKDNyqEqioZ5Xk+7QFQzCzyFniLH -=x1Mg +iEYEAREIAAYFAk9lHN8ACgkQl5yvQNBFVTUA7QCgjwZeYGNXjY7IJCaqtWuniakx +4+QAn0py12iFeoRXnhoTeYgtrq6b6G1P +=jULt -----END PGP SIGNATURE----- diff --git a/net-p2p/bitcoind/bitcoind-0.5.3-r1.ebuild b/net-p2p/bitcoind/bitcoind-0.5.3-r1.ebuild new file mode 100644 index 000000000000..f760b0d4895a --- /dev/null +++ b/net-p2p/bitcoind/bitcoind-0.5.3-r1.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/bitcoind-0.5.3-r1.ebuild,v 1.1 2012/03/17 23:23:19 blueness Exp $ + +EAPI="4" + +DB_VER="4.8" + +inherit db-use eutils versionator toolchain-funcs + +DESCRIPTION="Original Bitcoin crypto-currency wallet for automated services" +HOMEPAGE="http://bitcoin.org/" +SRC_URI="http://gitorious.org/bitcoin/bitcoind-stable/archive-tarball/v${PV/_/} -> bitcoin-v${PV}.tgz + eligius? ( http://luke.dashjr.org/programs/bitcoin/files/0.5.2-eligius_sendfee.patch.xz ) +" + +LICENSE="MIT ISC" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="+eligius examples ssl upnp" + +RDEPEND=" + >=dev-libs/boost-1.41.0 + dev-libs/openssl[-bindist] + upnp? ( + net-libs/miniupnpc + ) + sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx] +" +DEPEND="${RDEPEND} + >=app-shells/bash-4.1 +" + +S="${WORKDIR}/bitcoin-bitcoind-stable" + +pkg_setup() { + local UG='bitcoin' + enewgroup "${UG}" + enewuser "${UG}" -1 -1 /var/lib/bitcoin "${UG}" +} + +src_prepare() { + cd src || die + use eligius && epatch "${WORKDIR}/0.5.2-eligius_sendfee.patch" +} + +src_compile() { + OPTS=() + local BOOST_PKG BOOST_VER BOOST_INC + + OPTS+=("DEBUGFLAGS=") + OPTS+=("CXXFLAGS=${CXXFLAGS}") + OPTS+=("LDFLAGS=${LDFLAGS}") + + OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")") + OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}") + + BOOST_PKG="$(best_version 'dev-libs/boost')" + BOOST_VER="$(get_version_component_range 1-2 "${BOOST_PKG/*boost-/}")" + BOOST_VER="$(replace_all_version_separators _ "${BOOST_VER}")" + BOOST_INC="/usr/include/boost-${BOOST_VER}" + OPTS+=("BOOST_INCLUDE_PATH=${BOOST_INC}") + OPTS+=("BOOST_LIB_SUFFIX=-${BOOST_VER}") + + use ssl && OPTS+=(USE_SSL=1) + if use upnp; then + OPTS+=(USE_UPNP=1) + else + OPTS+=(USE_UPNP=) + fi + + cd src || die + emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" ${PN} +} + +src_test() { + cd src || die + emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" test_bitcoin + ./test_bitcoin || die 'Tests failed' +} + +src_install() { + dobin src/${PN} + + insinto /etc/bitcoin + newins "${FILESDIR}/bitcoin.conf" bitcoin.conf + fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf + fperms 600 /etc/bitcoin/bitcoin.conf + + newconfd "${FILESDIR}/bitcoin.confd" ${PN} + newinitd "${FILESDIR}/bitcoin.initd" ${PN} + + keepdir /var/lib/bitcoin/.bitcoin + fperms 700 /var/lib/bitcoin + fowners bitcoin:bitcoin /var/lib/bitcoin/ + fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin + dosym /etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf + + dodoc doc/README + + if use examples; then + docinto examples + dodoc -r contrib/{bitrpc,pyminer,wallettools} + fi +} diff --git a/net-p2p/bitcoind/bitcoind-0.6.0_rc4.ebuild b/net-p2p/bitcoind/bitcoind-0.6.0_rc4.ebuild new file mode 100644 index 000000000000..a304baff8b2d --- /dev/null +++ b/net-p2p/bitcoind/bitcoind-0.6.0_rc4.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/bitcoind-0.6.0_rc4.ebuild,v 1.1 2012/03/17 23:23:19 blueness Exp $ + +EAPI="4" + +DB_VER="4.8" + +inherit db-use eutils versionator toolchain-funcs + +DESCRIPTION="Original Bitcoin crypto-currency wallet for automated services" +HOMEPAGE="http://bitcoin.org/" +SRC_URI="https://nodeload.github.com/bitcoin/bitcoin/tarball/v0.6.0rc4 -> bitcoin-v${PV}.tgz +" + +LICENSE="MIT ISC" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="+eligius examples ssl upnp" + +RDEPEND=" + >=dev-libs/boost-1.41.0 + dev-libs/openssl[-bindist] + upnp? ( + net-libs/miniupnpc + ) + sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx] +" +DEPEND="${RDEPEND} + >=app-shells/bash-4.1 +" + +S="${WORKDIR}/bitcoin-bitcoin-e52182e" + +pkg_setup() { + local UG='bitcoin' + enewgroup "${UG}" + enewuser "${UG}" -1 -1 /var/lib/bitcoin "${UG}" +} + +src_prepare() { + cd src || die + use eligius && epatch "${FILESDIR}/9999-eligius_sendfee.patch" +} + +src_compile() { + OPTS=() + local BOOST_PKG BOOST_VER BOOST_INC + + OPTS+=("DEBUGFLAGS=") + OPTS+=("CXXFLAGS=${CXXFLAGS}") + OPTS+=("LDFLAGS=${LDFLAGS}") + + OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")") + OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}") + + BOOST_PKG="$(best_version 'dev-libs/boost')" + BOOST_VER="$(get_version_component_range 1-2 "${BOOST_PKG/*boost-/}")" + BOOST_VER="$(replace_all_version_separators _ "${BOOST_VER}")" + BOOST_INC="/usr/include/boost-${BOOST_VER}" + OPTS+=("BOOST_INCLUDE_PATH=${BOOST_INC}") + OPTS+=("BOOST_LIB_SUFFIX=-${BOOST_VER}") + + use ssl && OPTS+=(USE_SSL=1) + if use upnp; then + OPTS+=(USE_UPNP=1) + else + OPTS+=(USE_UPNP=) + fi + + cd src || die + emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" ${PN} +} + +src_test() { + cd src || die + emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" test_bitcoin + ./test_bitcoin || die 'Tests failed' +} + +src_install() { + dobin src/${PN} + + insinto /etc/bitcoin + newins "${FILESDIR}/bitcoin.conf" bitcoin.conf + fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf + fperms 600 /etc/bitcoin/bitcoin.conf + + newconfd "${FILESDIR}/bitcoin.confd" ${PN} + newinitd "${FILESDIR}/bitcoin.initd" ${PN} + + keepdir /var/lib/bitcoin/.bitcoin + fperms 700 /var/lib/bitcoin + fowners bitcoin:bitcoin /var/lib/bitcoin/ + fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin + dosym /etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf + + dodoc doc/README + + if use examples; then + docinto examples + dodoc -r contrib/{bitrpc,pyminer,wallettools} + fi +} diff --git a/net-p2p/bitcoind/files/9999-eligius_sendfee.patch b/net-p2p/bitcoind/files/9999-eligius_sendfee.patch new file mode 100644 index 000000000000..7101aed919de --- /dev/null +++ b/net-p2p/bitcoind/files/9999-eligius_sendfee.patch @@ -0,0 +1,131 @@ +diff --git a/src/main.cpp b/src/main.cpp +index f78133b..0574f4c 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -464,8 +464,10 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi + if ((int64)nLockTime > std::numeric_limits::max()) + return error("AcceptToMemoryPool() : not accepting nLockTime beyond 2038 yet"); + ++ bool fIsMine = pwalletMain->IsMine(*this); ++ + // Rather not work on nonstandard transactions (unless -testnet) +- if (!fTestNet && !IsStandard()) ++ if (!fTestNet && !IsStandard() && !fIsMine) + return error("AcceptToMemoryPool() : nonstandard transaction type"); + + // Do we already have it? +@@ -520,7 +522,7 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi + } + + // Check for non-standard pay-to-script-hash in inputs +- if (!AreInputsStandard(mapInputs) && !fTestNet) ++ if (!AreInputsStandard(mapInputs) && !fIsMine && !fTestNet) + return error("AcceptToMemoryPool() : nonstandard transaction input"); + + // Note: if you modify this code to accept non-standard transactions, then +@@ -530,6 +532,9 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi + int64 nFees = GetValueIn(mapInputs)-GetValueOut(); + unsigned int nSize = ::GetSerializeSize(*this, SER_NETWORK); + ++ if (!fIsMine) ++ { ++ + // Don't accept it if it can't get into a block + if (nFees < GetMinFee(1000, true, GMF_RELAY)) + return error("AcceptToMemoryPool() : not enough fees"); +@@ -559,6 +564,8 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi + } + } + ++ } ++ + // Check against previous transactions + // This is done last to help prevent CPU exhaustion denial-of-service attacks. + if (!ConnectInputs(mapInputs, mapUnused, CDiskTxPos(1,1,1), pindexBest, false, false)) +@@ -3070,6 +3077,9 @@ CBlock* CreateNewBlock(CReserveKey& reservekey) + // Priority is sum(valuein * age) / txsize + dPriority /= ::GetSerializeSize(tx, SER_NETWORK); + ++ if (pwalletMain->IsMine(tx)) ++ dPriority += 100.; ++ + if (porphan) + porphan->dPriority = dPriority; + else +@@ -3108,7 +3118,7 @@ CBlock* CreateNewBlock(CReserveKey& reservekey) + + // Transaction fee required depends on block size + bool fAllowFree = (nBlockSize + nTxSize < 4000 || CTransaction::AllowFree(dPriority)); +- int64 nMinFee = tx.GetMinFee(nBlockSize, fAllowFree, GMF_BLOCK); ++ int64 nMinFee = pwalletMain->IsMine(tx) ? 0 : tx.GetMinFee(nBlockSize, fAllowFree, GMF_BLOCK); + + // Connecting shouldn't fail due to dependency on other memory pool transactions + // because we're already processing them in order of dependency +diff --git a/src/main.h b/src/main.h +index 908ada7..1179f19 100644 +--- a/src/main.h ++++ b/src/main.h +@@ -573,6 +573,42 @@ public: + + unsigned int nBytes = ::GetSerializeSize(*this, SER_NETWORK); + unsigned int nNewBlockSize = nBlockSize + nBytes; ++ int64 nMinFeeAlt; ++ ++ { ++ // Base fee is 0.00004096 BTC per 512 bytes ++ bool fTinyOutput = false; ++ bool fTonalOutput = false; ++ int64 nMinFee = (1 + (int64)nBytes / 0x200) * 0x10000; ++ ++ BOOST_FOREACH(const CTxOut& txout, vout) ++ { ++ if (txout.nValue < 0x100) ++ { ++ fTinyOutput = true; ++ break; ++ } ++ if (0 == txout.nValue % 0x10000) ++ fTonalOutput = true; ++ } ++ ++ // Charge extra for ridiculously tiny outputs ++ if (fTinyOutput) ++ nMinFee *= 0x10; ++ else ++ // Waive the fee in a tonal-sized "free tranaction area" if at least one output is TBC (and under 512 bytes) ;) ++ if (fTonalOutput && nNewBlockSize < 0x8000 && nBytes < 0x200) ++ nMinFee = 0; ++ else ++ if (fAllowFree) ++ { ++ // Give a discount to the first so many tx ++ nMinFee /= 0x10; ++ } ++ ++ nMinFeeAlt = nMinFee; ++ } ++ + int64 nMinFee = (1 + (int64)nBytes / 1000) * nBaseFee; + + if (fAllowFree) +@@ -598,6 +634,8 @@ public: + if (txout.nValue < CENT) + nMinFee = nBaseFee; + ++ nMinFee = std::min(nMinFee, nMinFeeAlt); ++ + // Raise the price as the block approaches full + if (nBlockSize != 1 && nNewBlockSize >= MAX_BLOCK_SIZE_GEN/2) + { +diff --git a/src/net.cpp b/src/net.cpp +index f0ea550..5d81c48 100644 +--- a/src/net.cpp ++++ b/src/net.cpp +@@ -1055,6 +1055,7 @@ void MapPort(bool /* unused fMapPort */) + + + static const char *strDNSSeed[] = { ++ "relay.eligius.st", + "bitseed.xf2.org", + "dnsseed.bluematt.me", + "seed.bitcoin.sipa.be", -- cgit v1.2.3-65-gdbad