diff options
author | Stuart Shelton <stuart@shelton.me> | 2014-03-18 01:26:19 +0000 |
---|---|---|
committer | Stuart Shelton <stuart@shelton.me> | 2014-03-18 01:26:19 +0000 |
commit | 90d6f7eb62e42589d0ba666e66eed2103da4d2f9 (patch) | |
tree | e57d17659cf41c54719f6d920e30b4cad67a5784 | |
parent | Update net-dns/bind-tools (diff) | |
parent | Add net-p2p/bitcoind-0.8.6-r1 (diff) | |
download | srcshelton-90d6f7eb62e42589d0ba666e66eed2103da4d2f9.tar.gz srcshelton-90d6f7eb62e42589d0ba666e66eed2103da4d2f9.tar.bz2 srcshelton-90d6f7eb62e42589d0ba666e66eed2103da4d2f9.zip |
Update app-admin/monit, net-misc/dhcpcd, net-p2p/bitcoind
23 files changed, 1214 insertions, 0 deletions
@@ -89,9 +89,11 @@ Various [Gentoo Linux](http://www.gentoo.org/) ebuilds, to provide out-of-tree p * net-analyzer/rrdtool * net-analyzer/wireshark * net-firewall/conntrack-tools +* net-misc/dhcpcd * net-misc/memcached * net-misc/minidlna * net-misc/openntpd +* net-p2p/bitcoind * sys-apps/kmod * sys-apps/lm_sensors * sys-libs/pam @@ -100,6 +102,8 @@ Various [Gentoo Linux](http://www.gentoo.org/) ebuilds, to provide out-of-tree p # Fixes for MIPS n32 and x86_64 x32 ABIs +* app-admin/monit + * Add required `--with-ssl-lib-dir` option * dev-db/libdbi-drivers * Add required `--with-dbi-libdir` option * dev-lang/ruby diff --git a/app-admin/monit/Manifest b/app-admin/monit/Manifest new file mode 100644 index 00000000..3963296d --- /dev/null +++ b/app-admin/monit/Manifest @@ -0,0 +1,5 @@ +AUX monit-5.6-libdir.patch 1653 SHA256 13b6775377bd8b60d2f95ac641188f77f6c94ce4ba2a76304c833cf242f5074b SHA512 bf1c9634eeeb0c0a07e6dc6ea87e348106e5e22ba964d4e1fd5d243ff742cd8bfec942c2d0866ca08cb3ea37a2ce891d56759fd007bf5b1f7611f9779b48a52b WHIRLPOOL a3ce84217007dce0cccb7ec7f818af08afd53497cd44074498c5e8b406c7393ac252c91a7b6886a2072e5a9c296b343e63796fb887c42d48276a76b024efa5ee +AUX monit.initd-5.0 628 SHA256 0318d35e6c74c80123e3de15627cb305da3f0c528508d17dd45d566cc9a21429 SHA512 eb7a41e18456a39b97cc3e105fd9d9ab0c6cee42282faadcc718fe5463d11ad74e6873ab924eb54b13ea6a1e10e4ac3767be6d5e24ced25ae9de8919df8ad805 WHIRLPOOL f9eecbea2936e538591aa77d2b70b8bfe33807af7bbbbc8a4606900efa12096edc52147f9557aaea19b2624b12b83bf3179661e0f9d1ae08a0a97407d95d9fe7 +AUX monit.initd-5.0-r1 905 SHA256 78c013bb1258895a262c670a730e1319ea0f1140bbc3ca2f8dfc85ec02f923a1 SHA512 20fb54b251fd97e8014a35940a8cab1ca0de4c1ec3bcc05d2a9091585187759c1ce77cd5f872dde01fa91118d61e9ed3ec0650d09d7e767e78b42c68c1d35b64 WHIRLPOOL 6b282be931992b0ad9568c32de148370fd65d7078d26c526d89bd0f7860669edaa16be62ef528410adf62e00718cddb8e18415cbef44c66487ad59a9e9377cd6 +DIST monit-5.6.tar.gz 1263370 SHA256 38e09bd8b39abc59e6b9a9bb7a78f7eac2b02a92f4de1f3a6dc24e84dfedae0d SHA512 36933b6560860eac39421a56726c8748e2ce0f16ee51149828e6ffcb77edf3ce73394c2b58e208f6614712e7c6e0e114bc92e911794503b89793b225199193b8 WHIRLPOOL 9aba45ad39d9e47c964250ad6ef56ff81b1015c2c7878fa16d7e0484592a799e3574b8cbf1d137d02b09f02ecee8b2f3df81633ce1630f1e8add665bbdbe2a1b +EBUILD monit-5.6.ebuild 1275 SHA256 ed4979fb7fd1a281039f49092c08c15c6ca993601c04b5f6d5be13235743500f SHA512 4c174def0d592dbdc0dc5f839c50bfc5752af52cf909547bedb9efef97d0fa9c12889151af8194774828f4edbd61fece7e9c79bdf45ad7557b7dae24fc41939c WHIRLPOOL 76c00768a6f9a72efa830845e975a92385c6351852f855ccdbcd9090938efac85423e83875fb053ff82eb084cac3312df5f67cbdbcce1ecb9004621d504b80f7 diff --git a/app-admin/monit/files/monit-5.6-libdir.patch b/app-admin/monit/files/monit-5.6-libdir.patch new file mode 100644 index 00000000..c4ac2a75 --- /dev/null +++ b/app-admin/monit/files/monit-5.6-libdir.patch @@ -0,0 +1,29 @@ +--- monit-5.6/configure.ac.dist 2014-03-12 00:36:12.590403996 +0000 ++++ monit-5.6/configure.ac 2014-03-12 00:37:58.224025072 +0000 +@@ -771,10 +771,26 @@ + $maindir/lib/openssl \ + $maindir/lib/ssl \ + $maindir/ssl/lib \ ++ $maindir/lib/32 \ ++ $maindir/lib/32/openssl \ ++ $maindir/lib/32/ssl \ ++ $maindir/ssl/lib/32 \ ++ $maindir/lib/x32 \ ++ $maindir/lib/x32/openssl \ ++ $maindir/lib/x32/ssl \ ++ $maindir/ssl/lib/x32 \ + $maindir/lib/64 \ + $maindir/lib/64/openssl \ + $maindir/lib/64/ssl \ + $maindir/ssl/lib/64 \ ++ $maindir/lib32 \ ++ $maindir/lib32/openssl \ ++ $maindir/lib32/ssl \ ++ $maindir/ssl/lib32 \ ++ $maindir/libx32 \ ++ $maindir/libx32/openssl \ ++ $maindir/libx32/ssl \ ++ $maindir/ssl/libx32 \ + $maindir/lib64 \ + $maindir/lib64/openssl \ + $maindir/lib64/ssl \ diff --git a/app-admin/monit/files/monit.initd-5.0 b/app-admin/monit/files/monit.initd-5.0 new file mode 100644 index 00000000..aad734b6 --- /dev/null +++ b/app-admin/monit/files/monit.initd-5.0 @@ -0,0 +1,28 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/app-admin/monit/files/monit.initd-5.0,v 1.2 2011/12/31 16:28:50 idl0r Exp $ + +extra_started_commands="reload" + +depend() { + use net +} + +start() { + ebegin "Starting monit" + start-stop-daemon --start --quiet --exec /usr/bin/monit >/dev/null 2>&1 + eend $? +} + +stop() { + ebegin "Stopping monit" + start-stop-daemon --stop --quiet --exec /usr/bin/monit + eend $? +} + +reload() { + ebegin "Reloading monit" + /usr/bin/monit -c /etc/monitrc reload >/dev/null 2>&1 + eend $? +} diff --git a/app-admin/monit/files/monit.initd-5.0-r1 b/app-admin/monit/files/monit.initd-5.0-r1 new file mode 100644 index 00000000..4163c988 --- /dev/null +++ b/app-admin/monit/files/monit.initd-5.0-r1 @@ -0,0 +1,39 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/app-admin/monit/files/monit.initd-5.0-r1,v 1.2 2011/12/31 16:28:50 idl0r Exp $ + +extra_commands="configtest" +extra_started_commands="reload" + +depend() { + use net +} + +configtest() { + /usr/bin/monit -t 1>/dev/null 2>&1 + ret=$? + if [ $ret -ne 0 ]; then + eerror "${SVCNAME} has detected an error in your setup:" + /usr/bin/monit -t + fi + return $ret +} + +start() { + ebegin "Starting monit" + start-stop-daemon --start --quiet --exec /usr/bin/monit >/dev/null 2>&1 + eend $? +} + +stop() { + ebegin "Stopping monit" + start-stop-daemon --stop --quiet --exec /usr/bin/monit + eend $? +} + +reload() { + ebegin "Reloading monit" + /usr/bin/monit -c /etc/monitrc reload >/dev/null 2>&1 + eend $? +} diff --git a/app-admin/monit/monit-5.6.ebuild b/app-admin/monit/monit-5.6.ebuild new file mode 100644 index 00000000..0d1d0e7c --- /dev/null +++ b/app-admin/monit/monit-5.6.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/monit/monit-5.6.ebuild,v 1.1 2013/09/09 04:18:44 patrick Exp $ + +EAPI="2" + +DESCRIPTION="a utility for monitoring and managing daemons or similar programs running on a Unix system." +HOMEPAGE="http://mmonit.com/monit/" +SRC_URI="http://mmonit.com/monit/dist/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux" +IUSE="pam ssl" + +RDEPEND="ssl? ( dev-libs/openssl )" +DEPEND="${RDEPEND} + sys-devel/flex + sys-devel/bison + pam? ( virtual/pam )" + +src_prepare() { + sed -i -e '/^INSTALL_PROG/s/-s//' Makefile.in || die "sed failed in Makefile.in" +} + +src_configure() { + econf \ + $(use_with ssl) \ + $(use_with ssl ssl-lib-dir $(get_libdir)) \ + $(use_with pam) \ + || die "econf failed" +} + +src_compile() { + emake || die "emake failed" +} + +src_install() { + make DESTDIR="${D}" install || die "make install failed" + + dodoc README* + dohtml -r doc/* + + insinto /etc; insopts -m600; doins monitrc || die "doins monitrc failed" + newinitd "${FILESDIR}"/monit.initd-5.0-r1 monit || die "newinitd failed" +} + +pkg_postinst() { + elog "Sample configurations are available at:" + elog "http://mmonit.com/monit/documentation/" +} diff --git a/net-misc/dhcpcd/Manifest b/net-misc/dhcpcd/Manifest new file mode 100644 index 00000000..50ee1c8d --- /dev/null +++ b/net-misc/dhcpcd/Manifest @@ -0,0 +1,10 @@ +AUX dhcpcd-6.2.0-dynamic-init.patch 6433 SHA256 a69c8ff5d7992956dff34d92fdb590af4c03843723dbd9acf4bbf18255e08310 SHA512 95f59e2c398acc3b2d623a72c32151e433dc3e7d2608d4586731d9840bf44e234f20097a9694eab5891dcf33965a0e86a4920ca43eadb49c5dadefb88caaf91e WHIRLPOOL e9da6c410d89d3c177bc57c500f0c0e560b69a6e48b40c4248ba60e46ec3b0ad4c20bcc2f5a0c19bdce3bd7b29c0f3002549bda454748ffea6879b2df370c166 +AUX dhcpcd-6.2.0-no_ipv6_fix.patch 1269 SHA256 cd26e5d587a833d9826a86b2eae832c3ad371ce695b933ba8e03bdc1debf411d SHA512 90763d8a0d63949f53166609a702176217fce32a27125ef7f5c095d571d1a6a65fca5434e6ceded258773d80867a90609bc5af67727d7b06086c3a6b4ad8f632 WHIRLPOOL 9b3328e6db8304794ec2aeaec3cd883ed2cde975cda606ac2d3e03b3455a7fad495f88297f1cccea2a821972df2ee33bc88c2d3d57235d0cada2b443c1ba643f +AUX dhcpcd-6.3.1-fix-udev.patch 1103 SHA256 66db7109a4dfa9a1fbae9e10cf2137f1fe756727e5d4c394ca8da2ab971f39a9 SHA512 b96fdb6a271a22d06f807a304a9b77afe2ec7abe8eb2651c49efc36bd9c3c742ea4ae89679381e162a8ba4d6e58a28650446675d838954f4b33d29853eb1d72f WHIRLPOOL aa262a11648c7beaf915807d1a8bfa99ace96a32659fa08cdc6dc73d8ee78d58894218541d99b883f53eaf2bc0cfbe3faeda350aa3a8430ac8a78f3d6f6c864b +AUX dhcpcd.initd 327 SHA256 72b42c9939fda3fb56666813513029ed36194c1708bddce06bcb3e131e547492 SHA512 0a188b67f0641a480ac6d3cf6a634dddc4b72b1b9b47df33b05fba5d802693dd88e0cece0bfe9b641009c03022c620595b1ce35cd53d5024ee87f4c81e9acf63 WHIRLPOOL b97b0cd52b52561e6726d5decd094a02dd046107b0647833f00635e3fc126ab9679b2a7f883f4d880c1221cdbd91b0b52efaaccfdfa44a5048cb28d47d022351 +AUX dhcpcd.service 183 SHA256 06aaf350b11b1cea6ced9e2b5c69011e1daf6eb0ac9b2a9f2c9f81a9be31f463 SHA512 9d4c99e984906fc80fca7f7dd436d2f12dfebec870e19cbc3c03c14b394ed81c664403c0ca3f3e3138572c54d1278c1a43d5495f963b442b1bbef229248b1dd4 WHIRLPOOL 1176c2d763f55a65a97a973bdfa907dfaa2e9b88e93013d749c1a492e06382a7f42fa23eb2bfe86f6eaabea6c65c34db138b6bf600e6c522336ec2d07f7d7044 +DIST dhcpcd-6.2.0.tar.bz2 121614 SHA256 16ef25e8b6b15dcc0e53ff97a131b09828723dffb12a885f0da91b275296b362 SHA512 bf9394aa23c1b2978ac4b3bad1c7774798e99b6d6b147f57b94b5c1fba7edf80ac769cb8cab7f66203ebc0e93f81d7a05a44dc52f08344b68e8141bbbf1c33a9 WHIRLPOOL bff258cd8a0d2eea14bbc8bac792d4ad69e36d72ffced448f6d6081750ec52d99cb3f1f0aaf1bca42135c2969b2c7defaafa7d0ce875b96db9bbf1277f6bd982 +DIST dhcpcd-6.3.1.tar.bz2 137500 SHA256 dc198a729644cd077d2ac94d616185c6f17eb404f549a5d1d00c30c604aca09e SHA512 d32336fae2d5ab9bf856fc9ecde924c4cd693fce2933359278ca61fed2e0af3e77bfaa479a02ce5d649a07d5dc386e34b7ab5d5fcd6d49776535f89e3f9668ac WHIRLPOOL 82ebbb4ce02ffb76d6b10290e8b099dc462cc5214b1badf812f4dfc356a3f8aee34035688429098429b3bf44d10fb3af83cadecc9555e72228a7924c25bf62b1 +EBUILD dhcpcd-6.2.0-r1.ebuild 2899 SHA256 e586f234d93f643ec8203b6f1e79d6454869998f9a7c07ab18e9b128ce46c628 SHA512 578a05707a38a2b1f76261e01228fd21fc2bd0caa9a05654121f68ea913a65fa274195059be70f60b48645f4d2bdd779ffb3ae2d1c2a8500d7f26afec17899a4 WHIRLPOOL 9aee7188a370173478ee38efa3e5851897eeac3d870e8cd72291e464b27b29e3bf547f111afc0d52bac077fe3156a77c800022640c63e38bd75843c883af4ab4 +EBUILD dhcpcd-6.3.1-r1.ebuild 2845 SHA256 4c80515bd3ec80341b015f79624630ea5dc1618b19769fc77f5e715e3deba0ad SHA512 04c3c81d9363312f1d1d74c11280b3310c41c1618b484793356d44dad23cefa46de97bedbbd5ff9d4c0c9cf517c430422e73c721f3936f043c95c668d78f42bf WHIRLPOOL 2855f6f1b86ccdd5fc794e2f8f96d2862eaff37debd07387724cf52a993e805c40ef17b8a057b3aabb2d6a50596036ea230614d5971b142dc959d0ec97d68322 +EBUILD dhcpcd-9999.ebuild 2798 SHA256 a7781940250b91b1a586470de36e94e0bf8e12a654c9684eaeca85e9a9105526 SHA512 9b6f6974368629760ffabc0b165b2a99472fdb50ef34ef5390c6e8dab9370bb0806052077d9e2a55b9c23c36fa1787be9620a5bd2d92d342580b22dda5ae459a WHIRLPOOL 5135e4ece04bbc2dc79ee2ce2a511a599102487cadb019e2c1fc03823c7a6370ca60ffafd1dc27576105a4c8009044b1de35bcdef1e8592ec713603b56268312 diff --git a/net-misc/dhcpcd/dhcpcd-6.2.0-r1.ebuild b/net-misc/dhcpcd/dhcpcd-6.2.0-r1.ebuild new file mode 100644 index 00000000..47a96e19 --- /dev/null +++ b/net-misc/dhcpcd/dhcpcd-6.2.0-r1.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcpcd/dhcpcd-6.2.0-r1.ebuild,v 1.7 2014/02/02 11:01:00 ago Exp $ + +EAPI=5 + +if [[ ${PV} == "9999" ]]; then + EGIT_REPO_URI="git://roy.marples.name/${PN}.git" + inherit git-r3 +else + MY_P="${P/_alpha/-alpha}" + MY_P="${MY_P/_beta/-beta}" + MY_P="${MY_P/_rc/-rc}" + SRC_URI="http://roy.marples.name/downloads/${PN}/${MY_P}.tar.bz2" + KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ~ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" + S="${WORKDIR}/${MY_P}" +fi + +inherit eutils systemd + +DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client" +HOMEPAGE="http://roy.marples.name/projects/dhcpcd/" +LICENSE="BSD-2" +SLOT="0" +IUSE="elibc_glibc ipv6 systemd +udev" + +COMMON_DEPEND="udev? ( virtual/udev )" +DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND}" + +src_prepare() +{ + epatch "${FILESDIR}/${P}-dynamic-init.patch" #496870 + epatch "${FILESDIR}/${P}-no_ipv6_fix.patch" #497098 + epatch_user +} + +src_configure() +{ + local dev hooks + use udev || dev="--without-dev --without-udev" + hooks="--with-hook=ntp.conf" + use elibc_glibc && hooks="${hooks} --with-hook=yp.conf" + econf \ + --prefix="${EPREFIX}" \ + --libexecdir="${EPREFIX}/lib/dhcpcd" \ + --dbdir="${EPREFIX}/var/lib/dhcpcd" \ + --localstatedir="${EPREFIX}/var" \ + $(use_enable ipv6) \ + ${dev} \ + ${hooks} +} + +src_install() +{ + default + newinitd "${FILESDIR}"/${PN}.initd ${PN} + use systemd && systemd_dounit "${FILESDIR}"/${PN}.service +} + +pkg_postinst() +{ + # Upgrade the duid file to the new format if needed + local old_duid="${ROOT}"/var/lib/dhcpcd/dhcpcd.duid + local new_duid="${ROOT}"/etc/dhcpcd.duid + if [ -e "${old_duid}" ] && ! grep -q '..:..:..:..:..:..' "${old_duid}"; then + sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_duid}" + fi + + # Move the duid to /etc, a more sensible location + if [ -e "${old_duid}" -a ! -e "${new_duid}" ]; then + cp -p "${old_duid}" "${new_duid}" + fi + + elog + elog "dhcpcd has zeroconf support active by default." + elog "This means it will always obtain an IP address even if no" + elog "DHCP server can be contacted, which will break any existing" + elog "failover support you may have configured in your net configuration." + elog "This behaviour can be controlled with the noipv4ll configuration" + elog "file option or the -L command line switch." + elog "See the dhcpcd and dhcpcd.conf man pages for more details." + + elog + elog "Dhcpcd has duid enabled by default, and this may cause issues" + elog "with some dhcp servers. For more information, see" + elog "https://bugs.gentoo.org/show_bug.cgi?id=477356" + + if ! has_version net-dns/bind-tools; then + elog + elog "If you activate the lookup-hostname hook to look up your hostname" + elog "using the dns, you need to install net-dns/bind-tools." + fi +} diff --git a/net-misc/dhcpcd/dhcpcd-6.3.1-r1.ebuild b/net-misc/dhcpcd/dhcpcd-6.3.1-r1.ebuild new file mode 100644 index 00000000..c298039a --- /dev/null +++ b/net-misc/dhcpcd/dhcpcd-6.3.1-r1.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcpcd/dhcpcd-6.3.1-r1.ebuild,v 1.1 2014/03/09 19:37:27 williamh Exp $ + +EAPI=5 + +if [[ ${PV} == "9999" ]]; then + EGIT_REPO_URI="git://roy.marples.name/${PN}.git" + inherit git-r3 +else + MY_P="${P/_alpha/-alpha}" + MY_P="${MY_P/_beta/-beta}" + MY_P="${MY_P/_rc/-rc}" + SRC_URI="http://roy.marples.name/downloads/${PN}/${MY_P}.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" + S="${WORKDIR}/${MY_P}" +fi + +inherit eutils systemd + +DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client" +HOMEPAGE="http://roy.marples.name/projects/dhcpcd/" +LICENSE="BSD-2" +SLOT="0" +IUSE="elibc_glibc ipv6 systemd +udev" + +COMMON_DEPEND="udev? ( virtual/udev )" +DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND}" + +src_prepare() +{ + epatch "${FILESDIR}"/${P}-fix-udev.patch + epatch_user +} + +src_configure() +{ + local dev hooks + use udev || dev="--without-dev --without-udev" + hooks="--with-hook=ntp.conf" + use elibc_glibc && hooks="${hooks} --with-hook=yp.conf" + econf \ + --prefix="${EPREFIX}" \ + --libexecdir="${EPREFIX}/lib/dhcpcd" \ + --dbdir="${EPREFIX}/var/lib/dhcpcd" \ + --localstatedir="${EPREFIX}/var" \ + $(use_enable ipv6) \ + ${dev} \ + ${hooks} +} + +src_install() +{ + default + newinitd "${FILESDIR}"/${PN}.initd ${PN} + use systemd && systemd_dounit "${FILESDIR}"/${PN}.service +} + +pkg_postinst() +{ + # Upgrade the duid file to the new format if needed + local old_duid="${ROOT}"/var/lib/dhcpcd/dhcpcd.duid + local new_duid="${ROOT}"/etc/dhcpcd.duid + if [ -e "${old_duid}" ] && ! grep -q '..:..:..:..:..:..' "${old_duid}"; then + sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_duid}" + fi + + # Move the duid to /etc, a more sensible location + if [ -e "${old_duid}" -a ! -e "${new_duid}" ]; then + cp -p "${old_duid}" "${new_duid}" + fi + + elog + elog "dhcpcd has zeroconf support active by default." + elog "This means it will always obtain an IP address even if no" + elog "DHCP server can be contacted, which will break any existing" + elog "failover support you may have configured in your net configuration." + elog "This behaviour can be controlled with the noipv4ll configuration" + elog "file option or the -L command line switch." + elog "See the dhcpcd and dhcpcd.conf man pages for more details." + + elog + elog "Dhcpcd has duid enabled by default, and this may cause issues" + elog "with some dhcp servers. For more information, see" + elog "https://bugs.gentoo.org/show_bug.cgi?id=477356" + + if ! has_version net-dns/bind-tools; then + elog + elog "If you activate the lookup-hostname hook to look up your hostname" + elog "using the dns, you need to install net-dns/bind-tools." + fi +} diff --git a/net-misc/dhcpcd/dhcpcd-9999.ebuild b/net-misc/dhcpcd/dhcpcd-9999.ebuild new file mode 100644 index 00000000..6a811267 --- /dev/null +++ b/net-misc/dhcpcd/dhcpcd-9999.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcpcd/dhcpcd-9999.ebuild,v 1.11 2014/01/18 10:25:23 vapier Exp $ + +EAPI=5 + +if [[ ${PV} == "9999" ]]; then + EGIT_REPO_URI="git://roy.marples.name/${PN}.git" + inherit git-r3 +else + MY_P="${P/_alpha/-alpha}" + MY_P="${MY_P/_beta/-beta}" + MY_P="${MY_P/_rc/-rc}" + SRC_URI="http://roy.marples.name/downloads/${PN}/${MY_P}.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" + S="${WORKDIR}/${MY_P}" +fi + +inherit eutils systemd + +DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client" +HOMEPAGE="http://roy.marples.name/projects/dhcpcd/" +LICENSE="BSD-2" +SLOT="0" +IUSE="elibc_glibc ipv6 systemd +udev" + +COMMON_DEPEND="udev? ( virtual/udev )" +DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND}" + +src_prepare() +{ + epatch_user +} + +src_configure() +{ + local dev hooks + use udev || dev="--without-dev --without-udev" + hooks="--with-hook=ntp.conf" + use elibc_glibc && hooks="${hooks} --with-hook=yp.conf" + econf \ + --prefix="${EPREFIX}" \ + --libexecdir="${EPREFIX}/lib/dhcpcd" \ + --dbdir="${EPREFIX}/var/lib/dhcpcd" \ + --localstatedir="${EPREFIX}/var" \ + $(use_enable ipv6) \ + ${dev} \ + ${hooks} +} + +src_install() +{ + default + newinitd "${FILESDIR}"/${PN}.initd ${PN} + use systemd && systemd_dounit "${FILESDIR}"/${PN}.service +} + +pkg_postinst() +{ + # Upgrade the duid file to the new format if needed + local old_duid="${ROOT}"/var/lib/dhcpcd/dhcpcd.duid + local new_duid="${ROOT}"/etc/dhcpcd.duid + if [ -e "${old_duid}" ] && ! grep -q '..:..:..:..:..:..' "${old_duid}"; then + sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_duid}" + fi + + # Move the duid to /etc, a more sensible location + if [ -e "${old_duid}" -a ! -e "${new_duid}" ]; then + cp -p "${old_duid}" "${new_duid}" + fi + + elog + elog "dhcpcd has zeroconf support active by default." + elog "This means it will always obtain an IP address even if no" + elog "DHCP server can be contacted, which will break any existing" + elog "failover support you may have configured in your net configuration." + elog "This behaviour can be controlled with the noipv4ll configuration" + elog "file option or the -L command line switch." + elog "See the dhcpcd and dhcpcd.conf man pages for more details." + + elog + elog "Dhcpcd has duid enabled by default, and this may cause issues" + elog "with some dhcp servers. For more information, see" + elog "https://bugs.gentoo.org/show_bug.cgi?id=477356" + + if ! has_version net-dns/bind-tools; then + elog + elog "If you activate the lookup-hostname hook to look up your hostname" + elog "using the dns, you need to install net-dns/bind-tools." + fi +} diff --git a/net-misc/dhcpcd/files/dhcpcd-6.2.0-dynamic-init.patch b/net-misc/dhcpcd/files/dhcpcd-6.2.0-dynamic-init.patch new file mode 100644 index 00000000..21138e2c --- /dev/null +++ b/net-misc/dhcpcd/files/dhcpcd-6.2.0-dynamic-init.patch @@ -0,0 +1,242 @@ +Index: configure +================================================================== +--- configure ++++ configure +@@ -681,94 +681,27 @@ + echo "SRCS+= dev.c" >>$CONFIG_MK + echo "CPPFLAGS+= -DPLUGIN_DEV" >>$CONFIG_MK + echo "MKDIRS+= dev" >>$CONFIG_MK + fi + +-if [ -z "$SERVICECMD" ]; then +- printf "Checking for OpenRC ... " +- if [ -x /sbin/rc-service ]; then +- SERVICEEXISTS="/sbin/rc-service -e \$1" +- SERVICECMD="/sbin/rc-service \$1 -- -D \$2" +- echo "yes" +- else +- echo "no" +- fi +-fi +-if [ -z "$SERVICECMD" ]; then +- printf "Checking for invoke-rc.d ... " +- if [ -x /usr/sbin/invoke-rc.d ]; then +- SERVICEEXISTS="/usr/sbin/invoke-rc.d --query --quiet \$1 start >/dev/null 2>&1 || [ \$? = 104 ]" +- SERVICECMD="/usr/sbin/invoke-rc.d \$1 \$2" +- echo "yes" +- else +- echo "no" +- fi +-fi +-if [ -z "$SERVICECMD" ]; then +- printf "Checking for service ... " +- if [ -x /sbin/service ]; then +- SERVICEEXISTS="/sbin/service \$1 >/dev/null 2>&1" +- SERVICECMD="/sbin/service \$1 \$2" +- echo "yes" +- else +- echo "no" +- fi +-fi +-if [ -z "$SERVICECMD" ]; then +- printf "Checking for Slackware ... " +- if [ -e /etc/slackware-version -a -d /etc/rc.d ]; then +- SERVICEEXISTS="[ -x /etc/rc.d/rc.\$1 ]" +- SERVICECMD="/etc/rc.d/rc.\$1 \$2" +- SERVICESTATUS="/etc/rc.d/rc.\$1 status 1>/dev/null 2>&1" +- echo "yes" +- else +- echo "no" +- fi +-fi +-if [ -z "$SERVICECMD" ]; then +- for x in /etc/init.d/rc.d /etc/rc.d /etc/init.d; do +- printf "Checking for $x ... " +- if [ -d $x ]; then +- SERVICEEXISTS="[ -x $x/\$1 ]" +- SERVICECMD="$x/\$1 \$2" +- echo "yes" +- break +- else +- echo "no" +- fi +- done +-fi +-if [ -e /etc/arch-release ]; then +- echo "Overriding service status check for Arch Linux" +- SERVICESTATUS="[ -e /var/run/daemons/\$1 ]" +-fi +- +-if [ -z "$SERVICEEXISTS" -o -z "$SERVICECMD" ]; then +- echo "$0: WARNING: No means of interacting with system services detected!" +- SERVICEEXISTS="return 1" +- SERVICECMD="return 1" +-fi +-if [ -z "$SERVICESTATUS" ]; then +- SERVICESTATUS="service_command \$1 status >/dev/null 2>&1" +-fi + # Transform for a make file + SERVICEEXISTS=$(echo "$SERVICEEXISTS" | $SED \ + -e 's:\\:\\\\:g' \ + -e 's:\&:\\\&:g' \ +- -e 's:\$:\$\$:g' \ ++ -e 's:\$:\\\\\$\$:g' \ + ) + echo "SERVICEEXISTS= $SERVICEEXISTS" >>config.mk + SERVICECMD=$(echo "$SERVICECMD" | $SED \ + -e 's:\\:\\\\:g' \ + -e 's:\&:\\\&:g' \ +- -e 's:\$:\$\$:g' \ ++ -e 's:\$:\\\\\$\$:g' \ + ) + echo "SERVICECMD= $SERVICECMD" >>config.mk + SERVICESTATUS=$(echo "$SERVICESTATUS" | $SED \ + -e 's:\\:\\\\:g' \ + -e 's:\&:\\\&:g' \ +- -e 's:\$:\$\$:g' \ ++ -e 's:\$:\\\\\$\$:g' \ + ) + echo "SERVICESTATUS= $SERVICESTATUS" >>config.mk + + HOOKS= + if ! $HOOKSET; then + +Index: dhcpcd-run-hooks.in +================================================================== +--- dhcpcd-run-hooks.in ++++ dhcpcd-run-hooks.in +@@ -16,10 +16,11 @@ + signature_base="# Generated by dhcpcd" + signature="$signature_base $from $ifname" + signature_base_end="# End of dhcpcd" + signature_end="$signature_base_end $from $ifname" + state_dir=@RUNDIR@/dhcpcd ++_detected_init=false + + : ${if_up:=false} + : ${if_down:=false} + + # Ensure that all arguments are unique +@@ -190,36 +191,118 @@ + case "$@" in + *[![:alnum:]#%+-_:\.,@~\\/\[\]=\ ]*) return 1;; + esac + return 0 + } ++ ++# With the advent of alternative init systems, it's possible to have ++# more than one installed. So we need to try and guess what one we're ++# using unless overriden by configure. ++detect_init() ++{ ++ _service_exists="@SERVICEEXISTS@" ++ _service_cmd="@SERVICECMD@" ++ _service_status="@SERVICESTATUS@" ++ ++ [ -n "$_service_cmd" ] && return 0 ++ ++ if ${_detected_init}; then ++ [ -n "$_service_cmd" ] ++ return $? ++ fi ++ ++ # Detect the running init system. ++ # As systemd and OpenRC can be installed on top of legacy init ++ # systems we try to detect them first. ++ _service_status= ++ if [ -x /bin/systemctl -a -S /var/run/systemd/private ]; then ++ _service_exists="/bin/systemctl --quiet is-enabled \$1.service" ++ _service_status="/bin/systemctl --quiet is-active \$1.service" ++ _service_cmd="/bin/systemctl \$2 \$1.service" ++ elif [ -x /usr/bin/systemctl -a -S /var/run/systemd/private ]; then ++ _service_exists="/usr/bin/systemctl --quiet is-enabled \$1.service" ++ _service_status="/usr/bin/systemctl --quiet is-active \$1.service" ++ _service_cmd="/usr/bin/systemctl \$2 \$1.service" ++ elif [ -x /sbin/rc-service -a \ ++ -s /libexec/rc/init.d/softlevel -o -s /var/run/openrc/softlevel ] ++ then ++ _service_exists="/sbin/rc-service -e \$1" ++ _service_cmd="/sbin/rc-service \$1 -- -D \$2" ++ elif [ -x /usr/sbin/invoke-rc.d ]; then ++ _service_exists="/usr/sbin/invoke-rc.d --query --quiet \$1 start >/dev/null 2>&1 || [ \$? = 104 ]" ++ _service_cmd="/usr/sbin/invoke-rc.d \$1 \$2" ++ elif [ -x /sbin/service ]; then ++ _service_exists="/sbin/service \$1 >/dev/null 2>&1" ++ _service_cmd="/sbin/service \$1 \$2" ++ elif [ -e /etc/slackware-version -a -d /etc/rc.d ]; then ++ _service_exists="[ -x /etc/rc.d/rc.\$1 ]" ++ _service_cmd="/etc/rc.d/rc.\$1 \$2" ++ _service_status="/etc/rc.d/rc.\$1 status 1>/dev/null 2>&1" ++ else ++ for x in /etc/init.d/rc.d /etc/rc.d /etc/init.d; do ++ if [ -d $x ]; then ++ _service_exists="[ -x $x/\$1 ]" ++ _service_cmd="$x/\$1 \$2" ++ break ++ fi ++ done ++ if [ -e /etc/arch-release ]; then ++ _service_status="[ -e /var/run/daemons/\$1 ]" ++ fi ++ fi ++ ++ _detected_init=true ++ if [ -z "$_service_cmd" ]; then ++ syslog err "could not detect a useable init system" ++ return 1 ++ fi ++ return 0 ++} + + # Check a system service exists + service_exists() + { +- @SERVICEEXISTS@ ++ ++ if [ -z "$_service_exists" ]; then ++ detect_init || return 1 ++ fi ++ eval $_service_exists + } + + # Send a command to a system service + service_cmd() + { +- @SERVICECMD@ ++ ++ if [ -z "$_service_cmd" ]; then ++ detect_init || return 1 ++ fi ++ eval $_service_cmd + } + + # Send a command to a system service if it is running + service_status() + { +- @SERVICESTATUS@ ++ ++ if [ -z "$_service_cmd" ]; then ++ detect_init || return 1 ++ fi ++ if [ -n "$_service_status" ]; then ++ eval $_service_status ++ else ++ service_command $1 status >/dev/null 2>&1 ++ fi + } + + # Handy macros for our hooks + service_command() + { ++ + service_exists $1 && service_cmd $1 $2 + } + service_condcommand() + { ++ + service_exists $1 && service_status $1 && service_cmd $1 $2 + } + + # We source each script into this one so that scripts run earlier can + # remove variables from the environment so later scripts don't see them. + diff --git a/net-misc/dhcpcd/files/dhcpcd-6.2.0-no_ipv6_fix.patch b/net-misc/dhcpcd/files/dhcpcd-6.2.0-no_ipv6_fix.patch new file mode 100644 index 00000000..e6a6d337 --- /dev/null +++ b/net-misc/dhcpcd/files/dhcpcd-6.2.0-no_ipv6_fix.patch @@ -0,0 +1,57 @@ +Index: dhcp-common.c +================================================================== +--- dhcp-common.c ++++ dhcp-common.c +@@ -349,14 +349,20 @@ + else + /* If we don't know the size, assume it's valid */ + return dl; + return (dl < sz ? 0 : sz); + } ++ ++#ifdef INET6 ++#define PO_IFNAME ++#else ++#define PO_IFNAME __unused ++#endif + + ssize_t + print_option(char *s, ssize_t len, int type, int dl, const uint8_t *data, +- const char *ifname) ++ PO_IFNAME const char *ifname) + { + const uint8_t *e, *t; + uint16_t u16; + int16_t s16; + uint32_t u32; + +Index: if-options.c +================================================================== +--- if-options.c ++++ if-options.c +@@ -1550,10 +1550,11 @@ + char *buf; + const char **e; + size_t buflen, ol; + #endif + #if !defined(INET) || !defined(INET6) ++ size_t i; + struct dhcp_opt *opt; + #endif + + /* Seed our default options */ + ifo = calloc(1, sizeof(*ifo)); +@@ -1667,11 +1668,11 @@ + #ifdef INET6 + dhcp6_opts = ifo->dhcp6_override; + dhcp6_opts_len = ifo->dhcp6_override_len; + #else + for (i = 0, opt = ifo->dhcp6_override; +- i < ifo->dhcp_override6_len; ++ i < ifo->dhcp6_override_len; + i++, opt++) + free_dhcp_opt_embenc(opt); + free(ifo->dhcp6_override); + #endif + ifo->dhcp6_override = NULL; + diff --git a/net-misc/dhcpcd/files/dhcpcd-6.3.1-fix-udev.patch b/net-misc/dhcpcd/files/dhcpcd-6.3.1-fix-udev.patch new file mode 100644 index 00000000..606ab11c --- /dev/null +++ b/net-misc/dhcpcd/files/dhcpcd-6.3.1-fix-udev.patch @@ -0,0 +1,45 @@ +Index: dev/udev.c +================================================================== +--- dev/udev.c ++++ dev/udev.c +@@ -42,11 +42,11 @@ + + static const char udev_name[]="udev"; + static struct udev *udev; + static struct udev_monitor *monitor; + +-static const struct dev_dhcpcd *dhcpcd; ++static struct dev_dhcpcd dhcpcd; + + static int + udev_listening(void) + { + +@@ -90,13 +90,13 @@ + + /* udev filter documentation says "usually" so double check */ + if (strcmp(subsystem, "net") == 0) { + syslog(LOG_DEBUG, "%s: libudev: %s", ifname, action); + if (strcmp(action, "add") == 0 || strcmp(action, "move") == 0) +- dhcpcd->handle_interface(ctx, 1, ifname); ++ dhcpcd.handle_interface(ctx, 1, ifname); + else if (strcmp(action, "remove") == 0) +- dhcpcd->handle_interface(ctx, -1, ifname); ++ dhcpcd.handle_interface(ctx, -1, ifname); + } + + udev_device_unref(device); + return 1; + } +@@ -171,9 +171,9 @@ + dev->listening = udev_listening; + dev->handle_device = udev_handle_device; + dev->stop = udev_stop; + dev->start = udev_start; + +- dhcpcd = dev_dhcpcd; ++ dhcpcd = *dev_dhcpcd; + + return 0; + } + diff --git a/net-misc/dhcpcd/files/dhcpcd.initd b/net-misc/dhcpcd/files/dhcpcd.initd new file mode 100644 index 00000000..d88b0610 --- /dev/null +++ b/net-misc/dhcpcd/files/dhcpcd.initd @@ -0,0 +1,17 @@ +#!/sbin/runscript +# Copyright 2007-2008 Roy Marples <roy@marples.name> +# All rights reserved. Released under the 2-clause BSD license. + +command=/sbin/dhcpcd +pidfile=/var/run/dhcpcd.pid +command_args=-q +name="DHCP Client Daemon" + +depend() +{ + provide net + need localmount + use logger network + after bootmisc modules + before dns +} diff --git a/net-misc/dhcpcd/files/dhcpcd.service b/net-misc/dhcpcd/files/dhcpcd.service new file mode 100644 index 00000000..2ac9adca --- /dev/null +++ b/net-misc/dhcpcd/files/dhcpcd.service @@ -0,0 +1,10 @@ +[Unit] +Description=Lightweight DHCP client daemon +Wants=network.target +Before=network.target + +[Service] +ExecStart=/sbin/dhcpcd -q --nobackground + +[Install] +WantedBy=multi-user.target diff --git a/net-p2p/bitcoind/Manifest b/net-p2p/bitcoind/Manifest new file mode 100644 index 00000000..4a5fa21d --- /dev/null +++ b/net-p2p/bitcoind/Manifest @@ -0,0 +1,8 @@ +AUX 0.8.2-sys_leveldb.patch 6726 SHA256 11322fc7715b9b552075babf60c8261e0343e5ec834188013fb7d77cacf3b4d9 SHA512 e371b6da685c916c5941cfc094d01237f18502597e778b35e1c31cbf93cda1118a97272b56605f7c6da1f2873190415974ebdb4e7ce08a5d04e94dac675a4112 WHIRLPOOL 8579c73d18281b3910c260ef0708842380f8c5001982c94ea51e6b8f99111b11959ffb04fc7812e0c90ba8a919071b13e975ed95ec207017e34bef5844f65068 +AUX bitcoin.conf 80 SHA256 541ae10cc2246b620de3e7efa97eee59efacf83d28ea5f1297a121d0708226d2 SHA512 43bef890505a1fac88887bb39e9fdd4ec673ae8838a40279b33711e970551f5a75ac25171c41f8c83de2c953b157f7a3f57171e868fd9f626007d9909331a19f WHIRLPOOL 728e38b62da2c7c3a1149ac511b92d156f7b3c51dacfadd7ce74d9e6f915a6547c4cc8d34159243f50eee333c63b35949b311ea5a7f48a6c3bf17a5d4d47c123 +AUX bitcoin.confd 238 SHA256 72300b41d57325de5a5f2ddea449d5f414f278549fb665d60746707ee5de2549 SHA512 2b010d8c773a76868a11626ba0552f122cd51293cb39e06b7ed7e17be47f9e3790cc090f8311b32d441d3ff1eb4db266a4b2cd08693f7edbe2dde178254838d1 WHIRLPOOL f51d97b828b4b096d1ca924cb7256f648b94ae098a4f10dcfbac7d6045cf84da0c203b1e2d5569f3b304ba193501c9b9239c5ee1a1c11fbdb62bb9909c384358 +AUX bitcoin.initd-r1 938 SHA256 990eca502e34d43b27dc99ce81c1e89e8c3e2c2e92e5da7862a8eb7acf08cb66 SHA512 7c27ad2ed438dfbf7a03067806781ac04a3867997707374546e60dab24833a3943d90f8e790c3fe9fed3a81c4208d6c60dbc7939e8dedf8425bff2848013057d WHIRLPOOL f3acdfb5a2667088371f32eb419ffeb3e60014bbd725c6e28820514aad9bd958d242e6404521a1b89ff9c5d054c535676063b638c8e50dca0e259008598217f4 +AUX bitcoind.logrotate 110 SHA256 9b469c67e7af914199d699ac76279f194010f154be91f8136eddeeddf623a475 SHA512 b0e0634fc33979695fc0f37057f76b264ff3eb2655a8828d505a38621a5bba9fd4eafe47b012e5cb3863d607146b5a2d1a995787ed55cb6d5e6147ab795e1949 WHIRLPOOL 5ebd73178d3228b9477b5eae51ee783857d3a88a765c6802923f2a1d682c00cd4cefbf39e1f2d5192704ff2c72e8b91a38755cece6e139371ea2e75cab461e32 +AUX bitcoind.service 869 SHA256 c24332570f8ac155847372a4f9019a47a2e3c8c15435584dac4153b8eb300bc7 SHA512 d0e23b98bc9109e7e4d8a6459f73d1f9a06a3da71593613e22c5d0f31a8ad7473242b07690c6f22f35358ed869ffa7160d0daa65937462442bfc9028794321ea WHIRLPOOL 7992f776ac36277ce83898920ed5a8abc6b031f1d88214150c362c6f5befc869eb9901bd346da74da9fb56bda500fe9d3d9ff8dd46f1b3f257691cb106754a93 +DIST bitcoin-v0.8.6.tgz 3194026 SHA256 26fd485823ee15a823ca51a5ac7ed8664079ef15356a030e74a01f1a7a157170 SHA512 88e1d5dece485beaa95571016f41239db616323508038ea59d0fa3608639c03af06c0d782df3bf5a67d45d25c976bc07b977504ca6390e147e3b8605f3d3ce86 WHIRLPOOL 86a5118dda3f68226d30794bc1b363a75479fd55648146e4347017416d730c23ef4168553a5e70d95466157bf89055def81647790fe414d6182c1baf3e397344 +EBUILD bitcoind-0.8.6-r1.ebuild 2942 SHA256 0779f0dd683c57a5496e20d646d4a21004d6fee023c8765011df02fe8f29cca3 SHA512 c26d39263c237999a124b39df3f740eaa108b6d65c6dd13267fc0ba447502107e0aadbcb4d4f4829e3e425b50a524945734f3afab5dbb227aa2254806b29b028 WHIRLPOOL f825f1cb6b9d48ad32df5a829514833041670aa9e172eaac3dbd377f2bc938cbdb2c753536d41ce05076eba856611cc54da72d8f084ce7adcf557bfca9b6bb01 diff --git a/net-p2p/bitcoind/bitcoind-0.8.6-r1.ebuild b/net-p2p/bitcoind/bitcoind-0.8.6-r1.ebuild new file mode 100644 index 00000000..eca1c1df --- /dev/null +++ b/net-p2p/bitcoind/bitcoind-0.8.6-r1.ebuild @@ -0,0 +1,121 @@ +# Copyright 2010-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/bitcoind-0.8.6-r1.ebuild,v 1.1 2014/02/21 14:22:42 blueness Exp $ + +EAPI="4" + +DB_VER="4.8" + +inherit bash-completion-r1 db-use eutils versionator systemd toolchain-funcs user + +MyPV="${PV/_/}" +MyPN="bitcoin" +MyP="${MyPN}-${MyPV}" + +DESCRIPTION="Original Bitcoin crypto-currency wallet for automated services" +HOMEPAGE="http://bitcoin.org/" +SRC_URI="https://github.com/${MyPN}/${MyPN}/archive/v${MyPV}.tar.gz -> ${MyPN}-v${PV}.tgz" + +LICENSE="MIT ISC GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="bash-completion examples ipv6 logrotate systemd upnp" + +RDEPEND=" + >=dev-libs/boost-1.41.0[threads(+)] + dev-libs/openssl:0[-bindist] + logrotate? ( + app-admin/logrotate + ) + upnp? ( + net-libs/miniupnpc + ) + sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx] + <=dev-libs/leveldb-1.12.0[-snappy] +" +DEPEND="${RDEPEND} + >=app-shells/bash-4.1 + sys-apps/sed +" + +S="${WORKDIR}/${MyP}" + +pkg_setup() { + local UG='bitcoin' + enewgroup "${UG}" + enewuser "${UG}" -1 -1 /var/lib/bitcoin "${UG}" +} + +src_prepare() { + epatch "${FILESDIR}/0.8.2-sys_leveldb.patch" + rm -r src/leveldb + + if has_version '>=dev-libs/boost-1.52'; then + sed -i 's/\(-l db_cxx\)/-l boost_chrono$(BOOST_LIB_SUFFIX) \1/' src/makefile.unix + fi +} + +src_compile() { + OPTS=() + + OPTS+=("DEBUGFLAGS=") + OPTS+=("CXXFLAGS=${CXXFLAGS}") + OPTS+=("LDFLAGS=${LDFLAGS}") + + OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")") + OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}") + + if use upnp; then + OPTS+=(USE_UPNP=1) + else + OPTS+=(USE_UPNP=) + fi + use ipv6 || OPTS+=("USE_IPV6=-") + + OPTS+=("USE_SYSTEM_LEVELDB=1") + + 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-r1" ${PN} + use systemd && systemd_dounit "${FILESDIR}/bitcoind.service" + + keepdir /var/lib/bitcoin/.bitcoin + fperms 700 /var/lib/bitcoin + fowners bitcoin:bitcoin /var/lib/bitcoin/ + fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin + dosym /etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf + + dodoc doc/README.md doc/release-notes.md + doman contrib/debian/manpages/{bitcoind.1,bitcoin.conf.5} + + if use bash-completion; then + newbashcomp contrib/${PN}.bash-completion ${PN} + fi + + if use examples; then + docinto examples + dodoc -r contrib/{bitrpc,pyminer,spendfrom,tidy_datadir.sh,wallettools} + fi + + if use logrotate; then + insinto /etc/logrotate.d + newins "${FILESDIR}/bitcoind.logrotate" bitcoind + fi +} diff --git a/net-p2p/bitcoind/files/0.8.2-sys_leveldb.patch b/net-p2p/bitcoind/files/0.8.2-sys_leveldb.patch new file mode 100644 index 00000000..2b9ab1a6 --- /dev/null +++ b/net-p2p/bitcoind/files/0.8.2-sys_leveldb.patch @@ -0,0 +1,185 @@ +diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro +index cf80986..520b5df 100644 +--- a/bitcoin-qt.pro ++++ b/bitcoin-qt.pro +@@ -4,7 +4,7 @@ macx:TARGET = "Bitcoin-Qt" + VERSION = 0.8.0 + INCLUDEPATH += src src/json src/qt + QT += network +-DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE ++DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE LEVELDB_WITHOUT_MEMENV + CONFIG += no_include_pwd + CONFIG += thread + +@@ -98,25 +98,29 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) { + QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets + } + ++contains(USE_SYSTEM_LEVELDB, 1) { ++ LIBS += -lleveldb ++} else { + INCLUDEPATH += src/leveldb/include src/leveldb/helpers +-LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a ++LIBS += $$PWD/src/leveldb/libleveldb.a + !win32 { + # we use QMAKE_CXXFLAGS_RELEASE even without RELEASE=1 because we use RELEASE to indicate linking preferences not -O preferences +- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a ++ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a + } else { + # make an educated guess about what the ranlib command is called + isEmpty(QMAKE_RANLIB) { + QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib) + } + LIBS += -lshlwapi +- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a ++ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a + } + genleveldb.target = $$PWD/src/leveldb/libleveldb.a + genleveldb.depends = FORCE + PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a + QMAKE_EXTRA_TARGETS += genleveldb ++} + # Gross ugly hack that depends on qmake internals, unfortunately there is no other way to do it. +-QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean ++QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb && $(MAKE) clean || true + + # regenerate src/build.h + !win32|contains(USE_BUILD_INFO, 1) { +diff --git a/src/leveldb.cpp b/src/leveldb.cpp +index b41764f..30c524d 100644 +--- a/src/leveldb.cpp ++++ b/src/leveldb.cpp +@@ -8,7 +8,9 @@ + #include <leveldb/env.h> + #include <leveldb/cache.h> + #include <leveldb/filter_policy.h> +-#include <memenv/memenv.h> ++#ifndef LEVELDB_WITHOUT_MEMENV ++#include <memenv.h> ++#endif + + #include <boost/filesystem.hpp> + +@@ -42,8 +44,12 @@ CLevelDB::CLevelDB(const boost::filesystem::path &path, size_t nCacheSize, bool + options = GetOptions(nCacheSize); + options.create_if_missing = true; + if (fMemory) { ++#ifndef LEVELDB_WITHOUT_MEMENV + penv = leveldb::NewMemEnv(leveldb::Env::Default()); + options.env = penv; ++#else ++ throw std::runtime_error("CLevelDB(): compiled without memenv support"); ++#endif + } else { + if (fWipe) { + printf("Wiping LevelDB in %s\n", path.string().c_str()); +diff --git a/src/makefile.unix b/src/makefile.unix +index 081edaf..27f2199 100644 +--- a/src/makefile.unix ++++ b/src/makefile.unix +@@ -104,8 +104,7 @@ xCXXFLAGS=-O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-para + # adds some defaults in front. Unfortunately, LDFLAGS=... $(LDFLAGS) does not work. + xLDFLAGS=$(LDHARDENING) $(LDFLAGS) + +-OBJS= \ +- leveldb/libleveldb.a \ ++BASEOBJS := \ + obj/alert.o \ + obj/version.o \ + obj/checkpoints.o \ +@@ -114,7 +113,6 @@ OBJS= \ + obj/crypter.o \ + obj/key.o \ + obj/db.o \ +- obj/init.o \ + obj/keystore.o \ + obj/main.o \ + obj/net.o \ +@@ -134,24 +132,43 @@ OBJS= \ + obj/hash.o \ + obj/bloom.o \ + obj/noui.o \ +- obj/leveldb.o \ + obj/txdb.o + ++OBJS := \ ++ obj/leveldb.o \ ++ obj/init.o \ ++ $(BASEOBJS) ++ ++TESTOBJS := \ ++ obj-test/leveldb.o \ ++ $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) \ ++ $(BASEOBJS) ++ + + all: bitcoind + + test check: test_bitcoin FORCE + ./test_bitcoin + ++ifdef USE_SYSTEM_LEVELDB ++ LIBS += -lleveldb ++ TESTLIBS += -lmemenv ++else + # + # LevelDB support + # + MAKEOVERRIDES = +-LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a ++LIBS += $(CURDIR)/leveldb/libleveldb.a ++TESTLIBS += $(CURDIR)/leveldb/libmemenv.a + DEFS += $(addprefix -I,$(CURDIR)/leveldb/include) +-DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers) ++DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers/memenv) + leveldb/libleveldb.a: +- @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a libmemenv.a && cd .. ++ @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a && cd .. ++leveldb/libmemenv.a: ++ @echo "Building LevelDB memenv ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libmemenv.a && cd .. ++OBJS += leveldb/libleveldb.a ++TESTOBJS += leveldb/libmemenv.a ++endif + + # auto-generated dependencies: + -include obj/*.P +@@ -162,26 +179,28 @@ obj/build.h: FORCE + version.cpp: obj/build.h + DEFS += -DHAVE_BUILD_INFO + +-obj/%.o: %.cpp +- $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< ++P_TO_D = \ + @cp $(@:%.o=%.d) $(@:%.o=%.P); \ +- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ ++ sed -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ + -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ + rm -f $(@:%.o=%.d) + +-bitcoind: $(OBJS:obj/%=obj/%) +- $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS) ++obj/%.o: %.cpp ++ $(CXX) -c $(xCXXFLAGS) -DLEVELDB_WITHOUT_MEMENV -MMD -MF $(@:%.o=%.d) -o $@ $< ++ $(P_TO_D) + +-TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) ++bitcoind: $(OBJS) ++ $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS) + + obj-test/%.o: test/%.cpp + $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< +- @cp $(@:%.o=%.d) $(@:%.o=%.P); \ +- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ +- -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ +- rm -f $(@:%.o=%.d) ++ $(P_TO_D) ++ ++obj-test/leveldb.o: leveldb.cpp ++ $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< ++ $(P_TO_D) + +-test_bitcoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%)) ++test_bitcoin: $(TESTOBJS) + $(LINK) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ $(TESTLIBS) $(xLDFLAGS) $(LIBS) + + clean: diff --git a/net-p2p/bitcoind/files/bitcoin.conf b/net-p2p/bitcoind/files/bitcoin.conf new file mode 100644 index 00000000..c6a55f3d --- /dev/null +++ b/net-p2p/bitcoind/files/bitcoin.conf @@ -0,0 +1,8 @@ +# http://www.bitcoin.org/smf/index.php?topic=644.0 +#rpcuser= +#rpcpassword= + + + + + diff --git a/net-p2p/bitcoind/files/bitcoin.confd b/net-p2p/bitcoind/files/bitcoin.confd new file mode 100644 index 00000000..7c0868c3 --- /dev/null +++ b/net-p2p/bitcoind/files/bitcoin.confd @@ -0,0 +1,10 @@ +# Config file for /etc/init.d/bitcoin + +# owner of bitcoind process (don't change, must be existing) +BITCOIN_USER="bitcoin" + +# See http://www.bitcoin.org/smf/index.php?topic=1063 +BITCOIN_OPTS="${BITCOIN_OPTS}" + +# nice level +NICELEVEL="19" diff --git a/net-p2p/bitcoind/files/bitcoin.initd-r1 b/net-p2p/bitcoind/files/bitcoin.initd-r1 new file mode 100644 index 00000000..57dc6d46 --- /dev/null +++ b/net-p2p/bitcoind/files/bitcoin.initd-r1 @@ -0,0 +1,29 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-p2p/bitcoind/files/bitcoin.initd-r1,v 1.1 2014/02/21 14:22:42 blueness Exp $ + +vardir="/var/lib/bitcoin" +conffile="${vardir}/.bitcoin/bitcoin.conf" +bitcoind_user="${BITCOIN_USER:-nobody:nobody}" + +description="Bitcoin crypto-currency wallet for automated services" +pidfile="/var/run/${SVCNAME}.pid" +command="/usr/bin/bitcoind" +command_args="${BITCOIN_OPTS}" +command_background="true" +start_stop_daemon_args="-u ${bitcoind_user} -e HOME=${vardir} -N ${NICELEVEL:-0} -w 2000" + +depend() { + need net +} + +start_pre() { + checkpath -f -o ${bitcoind_user} -m 0400 ${conffile} || return 1 + + if ! grep -q '^rpcpassword=' "${conffile}"; then + eerror "Please edit `readlink -f ${conffile}`" + eerror "There must be at least a line assigning rpcpassword=something-secure" + return 1 + fi +} diff --git a/net-p2p/bitcoind/files/bitcoind.logrotate b/net-p2p/bitcoind/files/bitcoind.logrotate new file mode 100644 index 00000000..36d8dc2b --- /dev/null +++ b/net-p2p/bitcoind/files/bitcoind.logrotate @@ -0,0 +1,7 @@ +/var/lib/bitcoin/.bitcoin/debug.log { + weekly + sharedscripts + postrotate + killall -HUP bitcoind + endscript +} diff --git a/net-p2p/bitcoind/files/bitcoind.service b/net-p2p/bitcoind/files/bitcoind.service new file mode 100644 index 00000000..97747009 --- /dev/null +++ b/net-p2p/bitcoind/files/bitcoind.service @@ -0,0 +1,30 @@ +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, the +# best way is to create file +# "/etc/systemd/system/bitcoind.service.d/*.conf" +# containing your changes + +# For example, if you want to change some daemon and/or unit options, +# create a file named +# "/etc/systemd/system/bitcoind.service.d/myopts.conf" +# containing: +# [Service] +# Environment="BITCOIN_OPTS=-debug -logtimestamps" +# Nice=10 +# This will override the setting appearing below. + +# Note that almost all daemon options could be specified in +# /etc/bitcoin/bitcoin.conf + +[Unit] +Description=Bitcoin Daemon +After=network.target + +[Service] +User=bitcoin +Environment=BITCOIN_OPTS= +ExecStart=/usr/bin/bitcoind -daemon=0 $BITCOIN_OPTS +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target |