summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2013-09-28 11:50:46 +0000
committerMike Frysinger <vapier@gentoo.org>2013-09-28 11:50:46 +0000
commitdf1409e65b971157507244346f4863f6d2976927 (patch)
treef0c9862b62a61db4c854a9e755748bbf5144e260 /net-misc
parentAdd unit file (#485442 by Peter Volkov) (diff)
downloadhistorical-df1409e65b971157507244346f4863f6d2976927.tar.gz
historical-df1409e65b971157507244346f4863f6d2976927.tar.bz2
historical-df1409e65b971157507244346f4863f6d2976927.zip
Import patch from Fedora for IPv6 interface binding #471142 by Jaak Ristioja. Fix path to iproute2 ip program #480636 by cyberbat.
Package-Manager: portage-2.2.0/cvs/Linux x86_64 Manifest-Sign-Key: 0xFB7C4156
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/dhcp/ChangeLog10
-rw-r--r--net-misc/dhcp/Manifest35
-rw-r--r--net-misc/dhcp/dhcp-4.2.5_p1-r1.ebuild247
-rw-r--r--net-misc/dhcp/files/dhcp-4.2.5-bindtodevice-inet6.patch19
-rw-r--r--net-misc/dhcp/files/dhcp-4.2.5-iproute2-path.patch15
5 files changed, 309 insertions, 17 deletions
diff --git a/net-misc/dhcp/ChangeLog b/net-misc/dhcp/ChangeLog
index 8cb61cdc7c76..041806b27611 100644
--- a/net-misc/dhcp/ChangeLog
+++ b/net-misc/dhcp/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-misc/dhcp
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.243 2013/04/14 11:44:39 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.244 2013/09/28 11:50:41 vapier Exp $
+
+*dhcp-4.2.5_p1-r1 (28 Sep 2013)
+
+ 28 Sep 2013; Mike Frysinger <vapier@gentoo.org> +dhcp-4.2.5_p1-r1.ebuild,
+ +files/dhcp-4.2.5-bindtodevice-inet6.patch,
+ +files/dhcp-4.2.5-iproute2-path.patch:
+ Import patch from Fedora for IPv6 interface binding #471142 by Jaak Ristioja.
+ Fix path to iproute2 ip program #480636 by cyberbat.
14 Apr 2013; Agostino Sarubbo <ago@gentoo.org> dhcp-4.2.5_p1.ebuild:
Stable for sh, wrt bug #463848
diff --git a/net-misc/dhcp/Manifest b/net-misc/dhcp/Manifest
index 666de6a438c9..90325f5e40b3 100644
--- a/net-misc/dhcp/Manifest
+++ b/net-misc/dhcp/Manifest
@@ -1,5 +1,5 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA512
+Hash: SHA256
AUX dhcp-3.0-fix-perms.patch 485 SHA256 a805a60b36e148886887aebb797e80f642386b3e55ef4a0b5132f96a2877e018 SHA512 6d3ae697faf576bac801d9c302187ed7c8691eb991e0f9866e528ef7fb72592ba239b7519124919c44e4fff6108e4f13d83c1c0bb35d022f7a702b1fb06a6333 WHIRLPOOL af9a21870c2b1785573ea29f82dcb6b5629b9d6f0de94fa49e60576645d721debc8c6d01a29c4a6daeff91abe9674c5d07a8bca8b960893b51f85a0a43bfd56e
AUX dhcp-3.0-paranoia.patch 5366 SHA256 a8db9eb98397a9c1b3a0de07fc107c39dc4f6a4a331d404fc6fcc4a8dbc7aeae SHA512 7583ce88621c5f3c5f150129a4a3c82a20a237adeb689fb7067f23fc8a78ab89305741605284d9de0d5fb91d329c5fbd08361405845d5b34adf41a9b26261690 WHIRLPOOL 24afb961c2500bccdda097faac12a24215e0f0473310195552f69a789875f3ac61cbb904b69caa2109f2cd76a77ca96840baf375cc260db65b0e15dbedeaee9e
@@ -31,6 +31,8 @@ AUX dhcp-4.2.2-dhclient-stdin-conf.patch 3017 SHA256 701da4d022490bf9e1cfd946c75
AUX dhcp-4.2.2-nogateway.patch 1671 SHA256 3fed5823812c134e1819c8ac10c5fc718df86f4013ffc7505efbbe692319480e SHA512 fefbb402020dfdc3eff75da50bfaed0f30c5b90facd4b4ca25ac38d62f14bb85b18028261b32ac3f4654afc8e6915fcdd6f5e580444f2efe882f6f75ea10be0c WHIRLPOOL 91d38301aaecc4a2199ffd0be19d5c2b36531446524aeb65e743adb82220d20b18f53f3e740b5286bdf578f8fd35b2511f52747406b914d1c4d2841d1677e1bd
AUX dhcp-4.2.4-always-accept-4.patch 907 SHA256 2a876b92ff385e97955279eab8d7658b9a323cdf16c4a162ba649166cae10194 SHA512 682583d3a68b9609b16ba5029fb14a068c5e4ba1134b91e3c5c91f8cfa0d97d68e7b0fec2aa3d4e224bef9e97765971ca423e54f853a74ff6a2e24715ce17a2c WHIRLPOOL 27516c02bcece28eac935f2a6fbfbf64e3b31b75206151ec618daa906b21a40b62497cefe2e793c1ae74b0b4ee5decde363c9908a632bb38513e14cbb64347e5
AUX dhcp-4.2.4-quieter-ping.patch 2771 SHA256 8acf6266190a76f13c942da5c0a52c38421259f3fd63426134ad245e65081db0 SHA512 1a17a7ca52aa2a56e483e5f70e9878d7472f8eb3982b4f04c6cb3c32f839fa3972f79f632f99f47196a7e7b9fd8826392b94daaa074691d26636b793fcd40e73 WHIRLPOOL aa0b2bc3f3c539eaa6de27f9ce98525c5342af9a257cf36b8889b40455b3264f7b824a615146539ab012bcf4e5a55a7f1992cfc6222ce77976709c1a88dc907b
+AUX dhcp-4.2.5-bindtodevice-inet6.patch 826 SHA256 482dea1517e3d7a22c0469908c41c0595455b654968e24a31e2053af8b11aa30 SHA512 74d9d30b4803d10a63843d474dda92f019e4b7b9d7a9f4e32a49a1c261c1bb7238cd13f9b91c2bf8cf7f3ce5a5c665ef1d32998b06ca1439b30785d33827fe67 WHIRLPOOL 78b09180b95a4629c383d4347dd6ae55c83987f3c8946eb71a7643a442d59bfb63b3decbdc3fa3bc4e608c6d8ab59c3904eb027e97dcdbba169ca51ff0ced6c2
+AUX dhcp-4.2.5-iproute2-path.patch 340 SHA256 ef7b3268b052903d7d198f992a07ba95b43d0c454f3e83f321fa19423fb8c841 SHA512 08308b0142719bde1037260cb95370e64e0b9fcccd6df39153c62353511b8102c49bb785e6de660be7319f53302b35c18d61b2416b778c02bdd41b39c969a3a5 WHIRLPOOL bee8e2eeba7be8f99eadfc91102e304ac98fa94d80661c5ca04a08b14bde240343341d5ccc932c93a13c43dc6a407cc7dc06823c1de42680166445b24bff0f90
AUX dhcpd.conf 1092 SHA256 b86d27e0560689057b01a352474582fceb3a398eaf3b17f901378ec56284c4d5 SHA512 21467475571e914b60084a20eacba794806631c84c33e5977db0c5f3b572752c2518c807daac107ec9cbfe4d4ef0cdf54e9797d7ab064e7386b586b00619e035 WHIRLPOOL 0c9a81b3b19f6b91687db7a7ede9107afc0e50fe1ee9d86e848fa444d0da9c55798b545cb8215ec1149d48163a944d6f86969430570b26012f0a19413cff278a
AUX dhcpd.conf2 1068 SHA256 e8a413e9102948b336f60041fc3cade33125faf56d8319ee65d9f3c63199a8e7 SHA512 7b7a77b7826b475a4113ebeee54501ce417cc56e85754301a82a185d88b4713d198f615a366e63e0e2b0aef988c8137dcd1e18c4036d993378257079da17693d WHIRLPOOL eef0331ee019b561de2f3e46860d2c470f6de05be9104f46316d61b09bad9687d916af94eb4b399612bfd05340cda5f68f87886200801de485bd3665cc0886b9
AUX dhcpd.init2 2421 SHA256 fef93e5a7264780044a977ade27e9cc70de824063791bcd07d3db81c11c16df5 SHA512 ab7f9c310ad7d6342aa996ae4a94f71e7df71ecaea569cec721637f75ba1a26681769181ef6f2eef1b11cb6bbf5827ab7503ba6012a689d82ac1b96eb918c444 WHIRLPOOL bfc0a4e31521c8b527c5c47ee449d2f2c9e84c4316fa869ba019fb31c9cc9db884d65d016a537c53874556fdc95165039705943dae32b30a8853900685cbfc2e
@@ -63,23 +65,24 @@ EBUILD dhcp-4.2.3_p2.ebuild 7279 SHA256 32b79214efbdd025131bcb913b8f6f29019302c4
EBUILD dhcp-4.2.4_p1.ebuild 7270 SHA256 09c756290d19db83c1ac1037979ae905967cc723ffe5679ddf674546297039aa SHA512 c25f0ad2b86bc3d799710c1ed5841c18eaed4486a0b36823d953d85c49443d123ac7fa5780eb5e4e30dca5bca98abc76ce398a27c2965994590a74a252471a6c WHIRLPOOL 8a4b8dc138b89f4fe1e35a7eba2b795ccf5a320f7fec040b2aa8dde1399d32f40bf183c341fbd6a65d48d772059edaf647e518de9ac946fc549d0c8b6f8d3651
EBUILD dhcp-4.2.4_p2-r1.ebuild 7415 SHA256 3533a94061c37ac5f21c02d8943572cb691b054517130ce52d1967c20becc0af SHA512 db4cbfacf7d88720864155b2b16fbae4ffb17337e766d7f48c652f306abe5b764c64f8e710ce92147fc1159e3fb8c9dec9e88da0e43786afb890c5b5a333e0b3 WHIRLPOOL d86ea549f600024ed5058b03e9a2ee6e21c58079e6fb28d9c26d0b8829a6e1eb41eae1c896f6af1f84954c078c9b95c31c3f96af5cfc120395bb3b5ef61d8549
EBUILD dhcp-4.2.4_p2.ebuild 7358 SHA256 05e0483f295935a621837b9800c21991f6f5cf487619ca877f92818ff56270d9 SHA512 811192c12c8fae7db21c951f83daae3af1943556e68575ed9270a5b2bd3d38d6ac4ef010127153bcfa933e33575e7c22caeb1c602c5da123ea36bc1f5e5bebd8 WHIRLPOOL b22485dfc8982f86b1512cf44c7e00a40b41b182c8fabcd247b0a8712fd6a13b949449e5ce9eceb211d8db16e8fb075eccdfb34d9b32e3bfc8ce070381cec4c7
+EBUILD dhcp-4.2.5_p1-r1.ebuild 7589 SHA256 9550000131ba6a3e6fc2e0ad3b4c0beb701a99c6bf4dd2349292be4933e8b8d6 SHA512 02351cbf71804929361a6c5f07a57fa0314620d831a0e387d094c39b8dd5996d2476f433f8be8b37b8c9e3b5d956df2310b2917b92f5fb8d6a47ac774735c3e0 WHIRLPOOL 247b0d5a4c5f4f7793661eaffe3c1f3a81cfc338fe5db67229b8b84688588fbdb85485283e791e41f8a5470d4142d5ad920f13aeffb5b38c41acf93a4ebb1a0e
EBUILD dhcp-4.2.5_p1.ebuild 7406 SHA256 ddebaf5551445f5e630d6c5223350e1827132b5921b93cef16de7e6b0dde2bdc SHA512 b4e7e6544f46b6711529c7d6dd42f326a1406bae7295fe7d3c74fdeaca62622c448180b7a1400cb3c12f19aae43df4c2bc82fa585daeb20719caf90fae43bb1c WHIRLPOOL 72aba0888b3b3f6ae76684cd3e52240f5c612c205a667fb764ad38dcb08f3925a2572e3dcb49534c5d0002706523aa41f4c0522eadd1fd46faeb73af3b7237cd
-MISC ChangeLog 40129 SHA256 de0c0c2316a60ee2dfa39da2883b3576fa2e2d4b63257b1321d9cdebbfd08343 SHA512 9dd08bf93368bbe4019e5386626b4806fac41f3475dd6e3d96d3fca37464cd71237985262a373f08b6ac984d662d0a1daebad3803c3397dc9966bcbd81925741 WHIRLPOOL 85252c2aa1451c2b5fc25088b275baa9e0a62838bce1a0256ef8c801cb8808b4e67f8cb7655134df4beca6883fd5ae4e285e89a842a5eb901faf254254373b49
+MISC ChangeLog 40464 SHA256 b6a7967c017563321b64277f6bc436f6f526312ab6a9653984d95950a39e9914 SHA512 5f229e8e367eb752a6550be86a420c606f3c89a78cf29af6b3adba8f89b7d00883e0ab1b434662038d6a43a0a3ae93013d16903b363a39a5eff5d08ca3e92ec7 WHIRLPOOL 2b9b9606c2238b17093bbd9a2e3035d08a11c200973ed181e9a6a955cb173d5cfc798dbd5afc2f0a9178d0f04acdeb79fbabfc7b5ae19f271e557271267860b9
MISC metadata.xml 500 SHA256 e9e4edcf7671391ee2f2af0917a75fc07883f1401aaa22b72dd0133bef81601c SHA512 52b56888b04bd8533e00930fddeccac3f1e6a4e6172b57489f52300dcf60191784fec25e94916dbc9ff007c1493fd8144ec30458b4de3589d31d6f2ddafa78b2 WHIRLPOOL 9631e8fe91b7874d03b4f91ab8ac3064a9c259433a7f27214580ea6643c3784f1988559e9c0336fd3508def32ea0ec7be74be20e8ff7d62f0d47b45b478e8714
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.19 (GNU/Linux)
+Version: GnuPG v2.0.20 (GNU/Linux)
-iQIcBAEBCgAGBQJRapYPAAoJELp701BxlEWfRv0P/2XNH5pXzchj6lIAkcmlMug8
-CZUllOG273G3BEKTnJR1vSOhBeMnpzWL2vBQYbuOy0sJRFOMI0jrrpkc+jEpCwfc
-YR43mZ/tLp+HwoH3zbLsNSEAz9E532Zhy09qCfGAvT3n3AiwC2JDh80E242S4Gz8
-0RYNtaQ+JZgFbOE/wLfxh+UDwSEwNTnkTt4y306mTNNC73L79TShQOgvNX0ANE/O
-kyCYpX7zCg/kUn6g8kF01tRACND0qCtGvHm17k7r0cNfUiSOisOjzzBXmjjHduiu
-VoQDumxncF2DdwhaH5a6smG7+whr/oq798nQ2CRhKBTFKAnHE72hyV9Xht94SBYq
-V3NYpCLvvtlc7k2rq/6iDcUS3qr7kNrANVxkmSPgmKuak8jHNnTO65Nab8DnF2Z0
-8FiR2KuhnZJc9RtFlMrWUO4JDpyBhRlTcfQAhWtcGIEUKG4qYRXFFgw2BPLNGAh7
-1i9q1x1l0oy7MC+EoEG1ruQglHPOHWPEZDiHrR9q7BuPW1vvKEAwZLukTsxewk0E
-smL6ra1bRZR2VYouFeojb6r+I7ffRCMAIPa5tlN5pnn4akT6a1COCFEZzXTch4jj
-mQYF44kRVi59suKxU9T966l84kgefAa5a0+w9Gs7cYur0a8H5hXQX/P6nQocT1bI
-Vf4O3g9MWByPjtKAHCNk
-=toi7
+iQIcBAEBCAAGBQJSRsKUAAoJELEHsLL7fEFWgv8P/0M3YLDwKwbn2aqKGGopLj4M
+HPvzLaTk7PDVPW3I+7oQZg1/5A6Bzz+jT1PDGDtxq9UPO0bmbPxRJz78a9rKiU50
+2s4DPoLHW+aLjxK/+uuZomihMErQes+TWJ76DV7fcJlMKEZ5dseuW5H7LhHLGZxq
+idog8xz+5JfoqIpdS/E8bmcWiYslLOEHRFPUwb3L0oVNaoDgrQnL/8mMbTdpaOOa
+Yn7Es3ikNFEtEd2uc9ZnmiTLI2lvaCZyW4QpdsQRUUGRnMTivV9/Op+UfUCFvoQq
+8XlFElun9823hEz+kaLyLLsao625Q8bD9ykoLUp/ssHkZPYkVGW5unsZ3dWiEHjw
+Nbz+Rczzx9oEaPx8ywvNF4ug92R7Ynrbzg8xexNHlW3LLWbqBIREAiyPHqwC40Yj
+7YP+bwj80lf+WqNab04IIkWeuMEvN5ptV9Ar/P9bJyS6CfwkkXP933xZUuHog6y8
+IqMBAjCPdVqDdz3SsazKk8X/WgA6UXhgW34oqONvXXPBU5RrXt7PHDL+MgIegbxN
+wFgPNHkfGHIXXanufE1B0icGfIRmYq3U0tLbG25TNXgHVVl+xNvWmUPvg/2tQz7G
+ZS79B6NyZsN2RR/qlszXjwzbHrML4LcZeJvqAJArn0ApN9JPNSp3mW+NXisTDmQJ
+M6a2aK0vC6ybvLT8NbXC
+=NRGv
-----END PGP SIGNATURE-----
diff --git a/net-misc/dhcp/dhcp-4.2.5_p1-r1.ebuild b/net-misc/dhcp/dhcp-4.2.5_p1-r1.ebuild
new file mode 100644
index 000000000000..a4b8fef80531
--- /dev/null
+++ b/net-misc/dhcp/dhcp-4.2.5_p1-r1.ebuild
@@ -0,0 +1,247 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.2.5_p1-r1.ebuild,v 1.1 2013/09/28 11:50:41 vapier Exp $
+
+EAPI="4"
+
+inherit eutils toolchain-funcs user
+
+MY_PV="${PV//_alpha/a}"
+MY_PV="${MY_PV//_beta/b}"
+MY_PV="${MY_PV//_rc/rc}"
+MY_PV="${MY_PV//_p/-P}"
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server"
+HOMEPAGE="http://www.isc.org/products/DHCP"
+SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz
+ ftp://ftp.isc.org/isc/dhcp/${MY_PV}/${MY_P}.tar.gz"
+
+LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="+client ipv6 kernel_linux ldap selinux +server ssl vim-syntax"
+
+DEPEND="selinux? ( sec-policy/selinux-dhcp )
+ client? (
+ kernel_linux? (
+ ipv6? ( sys-apps/iproute2 )
+ sys-apps/net-tools
+ )
+ )
+ ldap? (
+ net-nds/openldap
+ ssl? ( dev-libs/openssl )
+ )"
+RDEPEND="${DEPEND}
+ vim-syntax? ( app-vim/dhcpd-syntax )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ # handle local bind hell
+ cd "${S}"/bind
+ unpack ./bind.tar.gz
+}
+
+src_prepare() {
+ # Gentoo patches - these will probably never be accepted upstream
+ # Fix some permission issues
+ epatch "${FILESDIR}"/${PN}-3.0-fix-perms.patch
+ # Enable dhclient to equery NTP servers
+ epatch "${FILESDIR}"/${PN}-4.0-dhclient-ntp.patch
+ # resolvconf support in dhclient-script
+ epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-resolvconf.patch
+ # Stop downing the interface on Linux as that breaks link daemons
+ # such as wpa_supplicant and netplug
+ epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-no-down.patch
+ epatch "${FILESDIR}"/${PN}-4.2.0-errwarn-message.patch
+ # Enable dhclient to get extra configuration from stdin
+ epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-stdin-conf.patch
+ epatch "${FILESDIR}"/${PN}-4.2.2-nogateway.patch #265531
+ epatch "${FILESDIR}"/${PN}-4.2.4-quieter-ping.patch #296921
+ epatch "${FILESDIR}"/${PN}-4.2.4-always-accept-4.patch #437108
+ epatch "${FILESDIR}"/${PN}-4.2.5-iproute2-path.patch #480636
+ epatch "${FILESDIR}"/${PN}-4.2.5-bindtodevice-inet6.patch #471142
+
+ # Brand the version with Gentoo
+ sed -i \
+ -e "/VERSION=/s:'$: Gentoo-${PR}':" \
+ configure || die
+
+ # Change the hook script locations of the scripts
+ sed -i \
+ -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
+ -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \
+ client/scripts/* || die
+
+ # No need for the linux script to force bash #158540
+ sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die
+
+ # Quiet the freebsd logger a little
+ sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die
+
+ # Remove these options from the sample config
+ sed -i -r \
+ -e "/(script|host-name|domain-name) /d" \
+ client/dhclient.conf.example || die
+
+ if use client && ! use server ; then
+ sed -i -r \
+ -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \
+ Makefile.in || die
+ elif ! use client && use server ; then
+ sed -i -r \
+ -e '/^SUBDIRS/s:\<client\>::' \
+ Makefile.in || die
+ fi
+
+ # Only install different man pages if we don't have en
+ if [[ " ${LINGUAS} " != *" en "* ]]; then
+ # Install Japanese man pages
+ if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then
+ einfo "Installing Japanese documention"
+ cp doc/ja_JP.eucJP/dhclient* client
+ cp doc/ja_JP.eucJP/dhcp* common
+ fi
+ fi
+ # Now remove the non-english docs so there are no errors later
+ rm -rf doc/ja_JP.eucJP
+
+ # make the bind build work
+ binddir=${S}/bind
+ cd "${binddir}" || die
+ cat <<-EOF > bindvar.tmp
+ binddir=${binddir}
+ GMAKE=${MAKE:-gmake}
+ EOF
+ epatch "${FILESDIR}"/${PN}-4.2.2-bind-disable.patch
+ cd bind-*/
+ epatch "${FILESDIR}"/${PN}-4.2.2-bind-parallel-build.patch #380717
+ epatch "${FILESDIR}"/${PN}-4.2.2-bind-build-flags.patch
+}
+
+src_configure() {
+ # bind defaults to stupid `/usr/bin/ar`
+ tc-export AR BUILD_CC
+ export ac_cv_path_AR=${AR}
+
+ # this is tested for by the bind build system, and can cause trouble
+ # when cross-building; since dhcp itself doesn't make use of libcap,
+ # simply disable it.
+ export ac_cv_lib_cap_cap_set_proc=no
+
+ # Use FHS sane paths ... some of these have configure options,
+ # but not all, so just do it all here.
+ local e="/etc/dhcp" r="/var/run/dhcp" l="/var/lib/dhcp"
+ cat <<-EOF >> includes/site.h
+ #define _PATH_DHCPD_CONF "${e}/dhcpd.conf"
+ #define _PATH_DHCLIENT_CONF "${e}/dhclient.conf"
+ #define _PATH_DHCPD_DB "${l}/dhcpd.leases"
+ #define _PATH_DHCPD6_DB "${l}/dhcpd6.leases"
+ #define _PATH_DHCLIENT_DB "${l}/dhclient.leases"
+ #define _PATH_DHCLIENT6_DB "${l}/dhclient6.leases"
+ #define _PATH_DHCPD_PID "${r}/dhcpd.pid"
+ #define _PATH_DHCPD6_PID "${r}/dhcpd6.pid"
+ #define _PATH_DHCLIENT_PID "${r}/dhcpclient.pid"
+ #define _PATH_DHCLIENT6_PID "${r}/dhcpclient6.pid"
+ #define _PATH_DHCRELAY_PID "${r}/dhcrelay.pid"
+ #define _PATH_DHCRELAY6_PID "${r}/dhcrelay6.pid"
+ EOF
+
+ econf \
+ --enable-paranoia \
+ --enable-early-chroot \
+ --sysconfdir=${e} \
+ $(use_enable ipv6 dhcpv6) \
+ $(use_with ldap) \
+ $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto)
+
+ # configure local bind cruft. symtable option requires
+ # perl and we don't want to require that #383837.
+ cd bind/bind-*/ || die
+ eval econf \
+ $(sed -n '/ [.].configure /{s:^[^-]*::;s:>.*::;p}' ../Makefile) \
+ --disable-symtable \
+ --without-make-clean
+}
+
+src_compile() {
+ # build local bind cruft first
+ emake -C bind/bind-*/lib/export install
+ # then build standard dhcp code
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ default
+
+ dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters}
+ dohtml doc/References.html
+
+ if [[ -e client/dhclient ]] ; then
+ # move the client to /
+ dodir /sbin
+ mv "${D}"/usr/sbin/dhclient "${D}"/sbin/ || die
+
+ exeinto /sbin
+ if use kernel_linux ; then
+ newexe "${S}"/client/scripts/linux dhclient-script
+ else
+ newexe "${S}"/client/scripts/freebsd dhclient-script
+ fi
+ fi
+
+ if [[ -e server/dhcpd ]] ; then
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins contrib/ldap/dhcp.*
+ dosbin contrib/ldap/dhcpd-conf-to-ldap
+ fi
+
+ newinitd "${FILESDIR}"/dhcpd.init5 dhcpd
+ newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd
+ newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay
+ newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
+ newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay6
+ newconfd "${FILESDIR}"/dhcrelay6.conf dhcrelay6
+
+ sed -i "s:#@slapd@:$(usex ldap slapd ''):" "${ED}"/etc/init.d/* || die #442560
+ fi
+
+ # the default config files aren't terribly useful #384087
+ local f
+ for f in "${ED}"/etc/dhcp/*.conf.example ; do
+ mv "${f}" "${f%.example}" || die
+ done
+ sed -i '/^[^#]/s:^:#:' "${ED}"/etc/dhcp/*.conf || die
+}
+
+pkg_preinst() {
+ enewgroup dhcp
+ enewuser dhcp -1 -1 /var/lib/dhcp dhcp
+
+ # Keep the user files over the sample ones. The
+ # hashing is to ignore the crappy defaults #384087.
+ local f h
+ for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do
+ h=${f#*:}
+ f="/etc/dhcp/${f%:*}.conf"
+ if [ -e "${EROOT}"${f} ] ; then
+ case $(md5sum "${EROOT}"${f}) in
+ ${h}*) ;;
+ *) cp -p "${EROOT}"${f} "${ED}"${f};;
+ esac
+ fi
+ done
+}
+
+pkg_postinst() {
+ if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then
+ ewarn
+ ewarn "WARNING: The dhcp init script has been renamed to dhcpd"
+ ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and"
+ ewarn "and dhcp should be removed from the default runlevel"
+ ewarn
+ fi
+}
diff --git a/net-misc/dhcp/files/dhcp-4.2.5-bindtodevice-inet6.patch b/net-misc/dhcp/files/dhcp-4.2.5-bindtodevice-inet6.patch
new file mode 100644
index 000000000000..77254c32e2b0
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-4.2.5-bindtodevice-inet6.patch
@@ -0,0 +1,19 @@
+https://bugs.gentoo.org/471142
+
+snipped from fedora
+
+# dhclient -6: bind socket to interface (#1001742)
+# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #34784])
+
+diff -up dhcp-4.2.5/common/socket.c.bindtodevice_inet6 dhcp-4.2.5/common/socket.c
+--- dhcp-4.2.5/common/socket.c.bindtodevice_inet6 2013-09-17 16:47:05.000000000 +0200
++++ dhcp-4.2.5/common/socket.c 2013-09-17 16:48:18.975997842 +0200
+@@ -245,7 +245,7 @@ if_register_socket(struct interface_info
+
+ #if defined(SO_BINDTODEVICE)
+ /* Bind this socket to this interface. */
+- if ((local_family != AF_INET6) && (info->ifp != NULL) &&
++ if (((do_multicast == 0)||(*do_multicast == 0)) && (info->ifp != NULL) &&
+ setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE,
+ (char *)(info -> ifp), sizeof(*(info -> ifp))) < 0) {
+ log_fatal("setsockopt: SO_BINDTODEVICE: %m");
diff --git a/net-misc/dhcp/files/dhcp-4.2.5-iproute2-path.patch b/net-misc/dhcp/files/dhcp-4.2.5-iproute2-path.patch
new file mode 100644
index 000000000000..f97f38dc9bff
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-4.2.5-iproute2-path.patch
@@ -0,0 +1,15 @@
+find `ip` via $PATH and not hardcoded path
+
+https://bugs.gentoo.org/480636
+
+--- a/client/scripts/linux
++++ b/client/scripts/linux
+@@ -23,7 +23,7 @@
+ # of the $1 in its args.
+
+ # 'ip' just looks too weird. /sbin/ip looks less weird.
+-ip=/sbin/ip
++ip=ip
+
+ make_resolv_conf() {
+ if [ x"$PEER_DNS" != x ] && [ x$"PEER_DNS" != xyes ]; then