summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-04-21 15:17:07 +0000
committerRoy Marples <uberlord@gentoo.org>2006-04-21 15:17:07 +0000
commit0b2a9c1b8435c8843241cfa389470ce5d82c6525 (patch)
tree9186650c88d987faf1fbc2f1ac87448e397bf1fb /net-misc/dhcp
parentMask dhcp-3.0.4_rc for testing (diff)
downloadgentoo-2-0b2a9c1b8435c8843241cfa389470ce5d82c6525.tar.gz
gentoo-2-0b2a9c1b8435c8843241cfa389470ce5d82c6525.tar.bz2
gentoo-2-0b2a9c1b8435c8843241cfa389470ce5d82c6525.zip
New patches for dbus and eXtended option environment support which should allow us to be used by NetworkManager.
(Portage version: 2.1_pre7-r5)
Diffstat (limited to 'net-misc/dhcp')
-rw-r--r--net-misc/dhcp/ChangeLog11
-rw-r--r--net-misc/dhcp/Manifest24
-rw-r--r--net-misc/dhcp/dhcp-3.0.3-r7.ebuild215
-rw-r--r--net-misc/dhcp/dhcp-3.0.4_rc1.ebuild213
-rw-r--r--net-misc/dhcp/files/dhcp-3.0.3-dhclient-dbus.patch84
-rw-r--r--net-misc/dhcp/files/dhcp-3.0.3-x-option.patch216
-rw-r--r--net-misc/dhcp/files/digest-dhcp-3.0.3-r73
-rw-r--r--net-misc/dhcp/files/digest-dhcp-3.0.4_rc13
8 files changed, 765 insertions, 4 deletions
diff --git a/net-misc/dhcp/ChangeLog b/net-misc/dhcp/ChangeLog
index 2509210b755b..a63ec5d04a67 100644
--- a/net-misc/dhcp/ChangeLog
+++ b/net-misc/dhcp/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for net-misc/dhcp
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.90 2006/04/20 22:08:03 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.91 2006/04/21 15:17:07 uberlord Exp $
+
+*dhcp-3.0.4_rc1 (21 Apr 2006)
+*dhcp-3.0.3-r7 (21 Apr 2006)
+
+ 21 Apr 2006; Roy Marples <uberlord@gentoo.org>
+ +files/dhcp-3.0.3-dhclient-dbus.patch, +files/dhcp-3.0.3-x-option.patch,
+ +dhcp-3.0.3-r7.ebuild, +dhcp-3.0.4_rc1.ebuild:
+ New patches for dbus and eXtended option environment support
+ which should allow us to be used by NetworkManager.
20 Apr 2006; Roy Marples <uberlord@gentoo.org>
files/dhcp-3.0.3-dhclient-hostname.patch,
diff --git a/net-misc/dhcp/Manifest b/net-misc/dhcp/Manifest
index c201095e8cb3..7d83aefe2620 100644
--- a/net-misc/dhcp/Manifest
+++ b/net-misc/dhcp/Manifest
@@ -1,15 +1,21 @@
-MD5 2498f24cc1c4678bf192dc2d08a62e75 ChangeLog 16282
-RMD160 65cf85428339b7adbd37338fc728d2833ba64632 ChangeLog 16282
-SHA256 1c7831306c354ee4ab7b269916ecfe14213b68ea13fdcb72c55bb4e954c794d2 ChangeLog 16282
+MD5 e24e72c8db454c9e941704f1c6461078 ChangeLog 16633
+RMD160 2a1a531edae5d80097d2f193c0d2a7734167ffbd ChangeLog 16633
+SHA256 3e906f3c338e4cb95fa389f1b522b9005c05b7707df59e645c03c99eaf03140a ChangeLog 16633
MD5 b268712b328548de32d5db06619787a8 dhcp-3.0.3-r4.ebuild 4062
RMD160 310de76cfa0feff02e9620ed113e5c2647b3b8c8 dhcp-3.0.3-r4.ebuild 4062
SHA256 a2083988469dbf8795387c94da9cff44b8f2dadf89048b32f261954dae3a434a dhcp-3.0.3-r4.ebuild 4062
MD5 9d0e1b459b027a16a130966bbb959e5a dhcp-3.0.3-r6.ebuild 6378
RMD160 eea04c33c30061334ef7651ae47a8111b10ca01a dhcp-3.0.3-r6.ebuild 6378
SHA256 064ea2bdf913b4a9cc642b21303316339c9e1cff2db6c845d0d9c28f424b750c dhcp-3.0.3-r6.ebuild 6378
+MD5 c82460f8085d2c5eb9a44d2acf8304b7 dhcp-3.0.3-r7.ebuild 6692
+RMD160 4e3f1570cc0ff906044a858fd22bfb72c9f6ac7d dhcp-3.0.3-r7.ebuild 6692
+SHA256 3e1061a36a88ec0ebc231693b234aad0e9c302d1d2155f7f0197846e537a5400 dhcp-3.0.3-r7.ebuild 6692
MD5 14dc4ed66fafb3d56bf73a42ce627361 dhcp-3.0.4_beta3-r1.ebuild 6317
RMD160 7c71fbe06970a64464825ef41ca47d20cdb43983 dhcp-3.0.4_beta3-r1.ebuild 6317
SHA256 359115657d8ec5fa651fe37128b114e94853e031e2b32998348d14cc719b88b7 dhcp-3.0.4_beta3-r1.ebuild 6317
+MD5 18ca1ddbee8b401169bd128c369042c9 dhcp-3.0.4_rc1.ebuild 6631
+RMD160 d11c9f075f5576e1af573b0cd780d2fd3a967b95 dhcp-3.0.4_rc1.ebuild 6631
+SHA256 f77d5c8b9a2ae7f9ac7e766f40c2122b3099f86fa6a7b0afa6d6e2f82c7d62e5 dhcp-3.0.4_rc1.ebuild 6631
MD5 d909d81a4d4ea39ddfc9898d33488c73 files/dhcp-3.0-fix-perms.patch 485
RMD160 3857270dffed5feee95609aeb37d0c9ef8844945 files/dhcp-3.0-fix-perms.patch 485
SHA256 a805a60b36e148886887aebb797e80f642386b3e55ef4a0b5132f96a2877e018 files/dhcp-3.0-fix-perms.patch 485
@@ -19,6 +25,9 @@ SHA256 a8db9eb98397a9c1b3a0de07fc107c39dc4f6a4a331d404fc6fcc4a8dbc7aeae files/dh
MD5 d0f61288e81ce020573f3f6965af8489 files/dhcp-3.0.2-gmake.patch 1872
RMD160 d2d41c0a7e002103d68605d2492bfe716bb2889e files/dhcp-3.0.2-gmake.patch 1872
SHA256 b2bbfc1d1f5b4d03ff3f53b3974ec32731e5f626de8f8d127328591e4c721215 files/dhcp-3.0.2-gmake.patch 1872
+MD5 eef265cca1745a6efdfc8d4d1ca2c453 files/dhcp-3.0.3-dhclient-dbus.patch 2774
+RMD160 250582d89894a58a297786c4a6884b54219c4b6f files/dhcp-3.0.3-dhclient-dbus.patch 2774
+SHA256 d70292c5b61648ba5970ab436429ced33e807bd6f68ba06dcd2b9d4073b02ea4 files/dhcp-3.0.3-dhclient-dbus.patch 2774
MD5 79cefb676f3abc197b30c120c09e46b0 files/dhcp-3.0.3-dhclient-hostname.patch 437
RMD160 5a1bd6bec0edf591eab4557f2e0f23539c673548 files/dhcp-3.0.3-dhclient-hostname.patch 437
SHA256 bdb152ff929f561a93983d647efd027a0193d2a12678076b3203d73bff966383 files/dhcp-3.0.3-dhclient-hostname.patch 437
@@ -49,6 +58,9 @@ SHA256 09c451cd9667fc8effcecd640f4cbe8629d41f6abacf9d1f2f923aab1f6e0bbb files/dh
MD5 ce6d18eef914ac8a39b0cb1bc4d63de2 files/dhcp-3.0.3-tr.patch 377
RMD160 fe81fefb55796b4e06fa73ec180026dceef5599d files/dhcp-3.0.3-tr.patch 377
SHA256 05f81ad7c0e8cd2d2f3e81c0cd1aecc0f2a2787672037eca87e66a814150f5c8 files/dhcp-3.0.3-tr.patch 377
+MD5 1145d8fd3020b1997955cd84b9730702 files/dhcp-3.0.3-x-option.patch 6478
+RMD160 a0fa5b3c7caf2d303a76c3d6fc135783cfa2bbc6 files/dhcp-3.0.3-x-option.patch 6478
+SHA256 6628629a95ee7e711f9dbce6b7d527b15f98eaf7592a1d0855d7bf65961bc3f7 files/dhcp-3.0.3-x-option.patch 6478
MD5 f47ef574359340021a78f5c2f67e4954 files/dhcp-3.0.4_beta2-dhclient-stdin-conf.patch 2176
RMD160 fae08899f6b57da3ec7ab0068e288bbdf2fbf2ae files/dhcp-3.0.4_beta2-dhclient-stdin-conf.patch 2176
SHA256 80141fe71e52774f1c7b1a02f2cbd49bc646f19753ceefc1c3605104df0cae5f files/dhcp-3.0.4_beta2-dhclient-stdin-conf.patch 2176
@@ -76,9 +88,15 @@ SHA256 cbcca1aed82577796a5287973fc78c3d4f5011a7279852b5fdf3e3e368067f14 files/di
MD5 414325430622f5011079cd7fd5517485 files/digest-dhcp-3.0.3-r6 232
RMD160 a8cec86f840528ab049182c2d0f0768d7eaa03dc files/digest-dhcp-3.0.3-r6 232
SHA256 cbcca1aed82577796a5287973fc78c3d4f5011a7279852b5fdf3e3e368067f14 files/digest-dhcp-3.0.3-r6 232
+MD5 414325430622f5011079cd7fd5517485 files/digest-dhcp-3.0.3-r7 232
+RMD160 a8cec86f840528ab049182c2d0f0768d7eaa03dc files/digest-dhcp-3.0.3-r7 232
+SHA256 cbcca1aed82577796a5287973fc78c3d4f5011a7279852b5fdf3e3e368067f14 files/digest-dhcp-3.0.3-r7 232
MD5 b83cbac7552369e722a4c59768363c0d files/digest-dhcp-3.0.4_beta3-r1 238
RMD160 921c4ec44dad932cdb35ac3659b42581a551fcfd files/digest-dhcp-3.0.4_beta3-r1 238
SHA256 8cf36e2e9d5c1d147a8635fd156ba84d5ce0d4bad70f85e73b9aafee89c71382 files/digest-dhcp-3.0.4_beta3-r1 238
+MD5 d679d04bf6d53febbb1c4d9ed7bc9edb files/digest-dhcp-3.0.4_rc1 241
+RMD160 1420b88537a970e4343be00b49880c5cb1d6c580 files/digest-dhcp-3.0.4_rc1 241
+SHA256 3f94a39e2c49b5dd1c530fa50bbc5c010eec072332562c0df47b856bec2cc251 files/digest-dhcp-3.0.4_rc1 241
MD5 436163172942ee1a0bcfb47534a71cce metadata.xml 330
RMD160 216100112bb6a0ffcd8f7779fb876e4a726913fe metadata.xml 330
SHA256 456ab9c26235fa4c1eda6b53b163e901869d5f64ba442b30db1fe86c57fe56af metadata.xml 330
diff --git a/net-misc/dhcp/dhcp-3.0.3-r7.ebuild b/net-misc/dhcp/dhcp-3.0.3-r7.ebuild
new file mode 100644
index 000000000000..09149687df6a
--- /dev/null
+++ b/net-misc/dhcp/dhcp-3.0.3-r7.ebuild
@@ -0,0 +1,215 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0.3-r7.ebuild,v 1.1 2006/04/21 15:17:07 uberlord Exp $
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+MY_PV="${PV//_beta/b}"
+MY_PV="${MY_PV//_rc/rc}"
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="ISC Dynamic Host Configuration Protocol"
+HOMEPAGE="http://www.isc.org/products/DHCP"
+SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz"
+
+LICENSE="isc-dhcp"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="static selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-dhcp )
+ kernel_linux? ( sys-apps/net-tools )"
+DEPEND="selinux? ( sec-policy/selinux-dhcp )
+ >=sys-apps/sed-4"
+
+PROVIDE="virtual/dhcpc"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Gentoo patches - these will probably never be accepted upstream
+ # Enable chroot support
+ epatch "${FILESDIR}/${PN}-3.0-paranoia.patch"
+ # Fix some permission issues
+ epatch "${FILESDIR}/${PN}-3.0-fix-perms.patch"
+ # Enable dhclient to equery NTP servers
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-ntp.patch"
+ # resolvconf support in dhclient-script
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-resolvconf.patch"
+ # Fix setting hostnames on Linux
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-hostname.patch"
+ # Allow mtu settings
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-mtu.patch"
+ # Allow dhclient to use IF_METRIC to set route metrics
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-metric.patch"
+ # Stop downing the interface on Linux as that breaks link dameons
+ # such as wpa_supplicant and netplug
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-no-down.patch"
+ # Quiet the isc blurb
+ epatch "${FILESDIR}/${PN}-3.0.3-no_isc_blurb.patch"
+ # Enable dhclient to get extra configuration from stdin
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-stdin-conf.patch"
+
+ # General fixes which will probably be accepted upstream eventually
+ # Fix token ring compiling, #102473
+ epatch "${FILESDIR}/${P}-tr.patch"
+ # Install libdst, #75544
+ epatch "${FILESDIR}/${PN}-3.0.3-libdst.patch"
+ # Fix building on Gentoo/FreeBSD
+ epatch "${FILESDIR}/${PN}-3.0.2-gmake.patch"
+
+ # NetworkManager support patches
+ # If they fail to apply to future versions they will be dropped
+ # Enable eXtended options
+ epatch "${FILESDIR}/${PN}-3.0.3-x-option.patch"
+ # Add dbus support to dhclient
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-dbus.patch"
+
+ # Brand the version with Gentoo
+ # include revision if >0
+ local newver="${MY_PV}-Gentoo"
+ [[ ${PR} != "r0" ]] && newver="${newver}-${PR}"
+ sed -i -e '/^#define DHCP_VERSION[ \t]\+/ s/'"${MY_PV}/${newver}/g" \
+ includes/version.h
+
+ # 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/*
+
+ # Remove these options from the sample config
+ sed -i -e "/\(script\|host-name\|domain-name\) / d" client/dhclient.conf
+
+ # Build sed man pages as we don't ever support BSD 4.4 and older, #130251.
+ local x=
+ for x in Makefile.dist $(ls */Makefile.dist) ; do
+ sed -i -e 's/$(CATMANPAGES)/$(SEDMANPAGES)/g' "${x}"
+ done
+
+ # 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
+ [[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP
+}
+
+src_compile() {
+ # 01/Mar/2003: Fix for bug #11960 by Jason Wever <weeve@gentoo.org>
+ [[ ${ARCH} == "sparc" ]] && filter-flags -O3 -O2 -O
+
+ use static && append-ldflags -static
+
+ cat <<-END >> includes/site.h
+ #define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
+ #define _PATH_DHCPD_PID "/var/run/dhcp/dhcpd.pid"
+ #define _PATH_DHCPD_DB "/var/lib/dhcp/dhcpd.leases"
+ #define _PATH_DHCLIENT_DB "/var/lib/dhcp/dhclient.leases"
+ #define DHCPD_LOG_FACILITY LOG_LOCAL1
+ END
+
+ cat <<-END > site.conf
+ CC = $(tc-getCC)
+ LFLAGS = ${LDFLAGS}
+ LIBDIR = /usr/$(get_libdir)
+ INCDIR = /usr/include
+ ETC = /etc/dhcp
+ VARDB = /var/lib/dhcp
+ VARRUN = /var/run/dhcp
+ ADMMANDIR = /usr/share/man/man8
+ ADMMANEXT = .8
+ FFMANDIR = /usr/share/man/man5
+ FFMANEXT = .5
+ LIBMANDIR = /usr/share/man/man3
+ LIBMANEXT = .3
+ USRMANDIR = /usr/share/man/man1
+ USRMANEXT = .1
+ MANCAT = man
+ END
+
+ ./configure --copts "-DPARANOIA -DEARLY_CHROOT -DEXTENDED_NEW_OPTION_INFO \
+ ${CFLAGS}" || die "configure failed"
+
+ emake || die "compile problem"
+}
+
+src_install() {
+ make install DESTDIR="${D}" || die
+
+ insinto /etc/dhcp
+ newins server/dhcpd.conf dhcpd.conf.sample
+ newins client/dhclient.conf dhclient.conf.sample
+
+ dodoc README RELNOTES doc/*
+ newdoc client/dhclient.conf dhclient.conf.sample
+ newdoc client/scripts/linux dhclient-script.sample
+ newdoc server/dhcpd.conf dhcpd.conf.sample
+
+ newinitd "${FILESDIR}/dhcpd.init" dhcpd
+ newinitd "${FILESDIR}/dhcrelay.init" dhcrelay
+ insinto /etc/conf.d
+ newins "${FILESDIR}/dhcpd.conf" dhcpd
+ newins "${FILESDIR}/dhcrelay.conf" dhcrelay
+
+ keepdir /var/{lib,run}/dhcp
+}
+
+pkg_preinst() {
+ enewgroup dhcp
+ enewuser dhcp -1 -1 /var/lib/dhcp dhcp
+}
+
+pkg_postinst() {
+ chown dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp
+
+ 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
+
+ einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings."
+ einfo
+ einfo "If you would like to run dhcpd in a chroot, simply configure the"
+ einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:"
+ einfo " emerge --config =${PF}"
+}
+
+pkg_config() {
+ local CHROOT="$(
+ sed -n 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \
+ /etc/conf.d/dhcpd
+ )"
+
+ if [[ -z ${CHROOT} ]]; then
+ eerror "CHROOT not defined in /etc/conf.d/dhcpd"
+ return 1
+ fi
+
+ if [[ -d ${CHROOT} ]] ; then
+ ewarn "${CHROOT} already exists - aborting"
+ return 0
+ fi
+
+ ebegin "Setting up the chroot directory"
+ mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp}
+ cp /etc/{localtime,resolv.conf} "${CHROOT}/etc"
+ cp -R /etc/dhcp "${CHROOT}/etc/"
+ cp -R /var/lib/dhcp "${CHROOT}/var/lib"
+ chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp
+ eend
+
+ local logger="$(best_version virtual/logger)"
+ einfo "To enable logging from the dhcpd server, configure your"
+ einfo "logger (${logger}) to listen on ${CHROOT}/dev/log"
+}
diff --git a/net-misc/dhcp/dhcp-3.0.4_rc1.ebuild b/net-misc/dhcp/dhcp-3.0.4_rc1.ebuild
new file mode 100644
index 000000000000..7d959cc797f0
--- /dev/null
+++ b/net-misc/dhcp/dhcp-3.0.4_rc1.ebuild
@@ -0,0 +1,213 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0.4_rc1.ebuild,v 1.1 2006/04/21 15:17:07 uberlord Exp $
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+MY_PV="${PV//_beta/b}"
+MY_PV="${MY_PV//_rc/rc}"
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="ISC Dynamic Host Configuration Protocol"
+HOMEPAGE="http://www.isc.org/products/DHCP"
+SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz"
+
+LICENSE="isc-dhcp"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="static selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-dhcp )
+ kernel_linux? ( sys-apps/net-tools )"
+DEPEND="selinux? ( sec-policy/selinux-dhcp )
+ >=sys-apps/sed-4"
+
+PROVIDE="virtual/dhcpc"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Gentoo patches - these will probably never be accepted upstream
+ # Enable chroot support
+ epatch "${FILESDIR}/${PN}-3.0-paranoia.patch"
+ # Fix some permission issues
+ epatch "${FILESDIR}/${PN}-3.0-fix-perms.patch"
+ # Enable dhclient to equery NTP servers
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-ntp.patch"
+ # resolvconf support in dhclient-script
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-resolvconf.patch"
+ # Fix setting hostnames on Linux
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-hostname.patch"
+ # Allow mtu settings
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-mtu.patch"
+ # Allow dhclient to use IF_METRIC to set route metrics
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-metric.patch"
+ # Stop downing the interface on Linux as that breaks link dameons
+ # such as wpa_supplicant and netplug
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-no-down.patch"
+ # Quiet the isc blurb
+ epatch "${FILESDIR}/${PN}-3.0.3-no_isc_blurb.patch"
+ # Enable dhclient to get extra configuration from stdin
+ epatch "${FILESDIR}/${PN}-3.0.4_beta2-dhclient-stdin-conf.patch"
+
+ # General fixes which will probably be accepted upstream eventually
+ # Install libdst, #75544
+ epatch "${FILESDIR}/${PN}-3.0.3-libdst.patch"
+ # Fix building on Gentoo/FreeBSD
+ epatch "${FILESDIR}/${PN}-3.0.2-gmake.patch"
+
+ # NetworkManager support patches
+ # If they fail to apply to future versions they will be dropped
+ # Enable eXtended options
+ epatch "${FILESDIR}/${PN}-3.0.3-x-option.patch"
+ # Add dbus support to dhclient
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-dbus.patch"
+
+ # Brand the version with Gentoo
+ # include revision if >0
+ local newver="${MY_PV}-Gentoo"
+ [[ ${PR} != "r0" ]] && newver="${newver}-${PR}"
+ sed -i -e '/^#define DHCP_VERSION[ \t]\+/ s/'"${MY_PV}/${newver}/g" \
+ includes/version.h
+
+ # 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/*
+
+ # Remove these options from the sample config
+ sed -i -e "/\(script\|host-name\|domain-name\) / d" client/dhclient.conf
+
+ # Build sed man pages as we don't ever support BSD 4.4 and older, #130251.
+ local x=
+ for x in Makefile.dist $(ls */Makefile.dist) ; do
+ sed -i -e 's/$(CATMANPAGES)/$(SEDMANPAGES)/g' "${x}"
+ done
+
+ # 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
+ [[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP
+}
+
+src_compile() {
+ # 01/Mar/2003: Fix for bug #11960 by Jason Wever <weeve@gentoo.org>
+ [[ ${ARCH} == "sparc" ]] && filter-flags -O3 -O2 -O
+
+ use static && append-ldflags -static
+
+ cat <<-END >> includes/site.h
+ #define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
+ #define _PATH_DHCPD_PID "/var/run/dhcp/dhcpd.pid"
+ #define _PATH_DHCPD_DB "/var/lib/dhcp/dhcpd.leases"
+ #define _PATH_DHCLIENT_DB "/var/lib/dhcp/dhclient.leases"
+ #define DHCPD_LOG_FACILITY LOG_LOCAL1
+ END
+
+ cat <<-END > site.conf
+ CC = $(tc-getCC)
+ LFLAGS = ${LDFLAGS}
+ LIBDIR = /usr/$(get_libdir)
+ INCDIR = /usr/include
+ ETC = /etc/dhcp
+ VARDB = /var/lib/dhcp
+ VARRUN = /var/run/dhcp
+ ADMMANDIR = /usr/share/man/man8
+ ADMMANEXT = .8
+ FFMANDIR = /usr/share/man/man5
+ FFMANEXT = .5
+ LIBMANDIR = /usr/share/man/man3
+ LIBMANEXT = .3
+ USRMANDIR = /usr/share/man/man1
+ USRMANEXT = .1
+ MANCAT = man
+ END
+
+ ./configure --copts "-DPARANOIA -DEARLY_CHROOT -DEXTENDED_NEW_OPTION_INFO \
+ ${CFLAGS}" || die "configure failed"
+
+ emake || die "compile problem"
+}
+
+src_install() {
+ make install DESTDIR="${D}" || die
+
+ insinto /etc/dhcp
+ newins server/dhcpd.conf dhcpd.conf.sample
+ newins client/dhclient.conf dhclient.conf.sample
+
+ dodoc README RELNOTES doc/*
+ newdoc client/dhclient.conf dhclient.conf.sample
+ newdoc client/scripts/linux dhclient-script.sample
+ newdoc server/dhcpd.conf dhcpd.conf.sample
+
+ newinitd "${FILESDIR}/dhcpd.init" dhcpd
+ newinitd "${FILESDIR}/dhcrelay.init" dhcrelay
+ insinto /etc/conf.d
+ newins "${FILESDIR}/dhcpd.conf" dhcpd
+ newins "${FILESDIR}/dhcrelay.conf" dhcrelay
+
+ keepdir /var/{lib,run}/dhcp
+}
+
+pkg_preinst() {
+ enewgroup dhcp
+ enewuser dhcp -1 -1 /var/lib/dhcp dhcp
+}
+
+pkg_postinst() {
+ chown dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp
+
+ 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
+
+ einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings."
+ einfo
+ einfo "If you would like to run dhcpd in a chroot, simply configure the"
+ einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:"
+ einfo " emerge --config =${PF}"
+}
+
+pkg_config() {
+ local CHROOT="$(
+ sed -n 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \
+ /etc/conf.d/dhcpd
+ )"
+
+ if [[ -z ${CHROOT} ]]; then
+ eerror "CHROOT not defined in /etc/conf.d/dhcpd"
+ return 1
+ fi
+
+ if [[ -d ${CHROOT} ]] ; then
+ ewarn "${CHROOT} already exists - aborting"
+ return 0
+ fi
+
+ ebegin "Setting up the chroot directory"
+ mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp}
+ cp /etc/{localtime,resolv.conf} "${CHROOT}/etc"
+ cp -R /etc/dhcp "${CHROOT}/etc/"
+ cp -R /var/lib/dhcp "${CHROOT}/var/lib"
+ chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp
+ eend
+
+ local logger="$(best_version virtual/logger)"
+ einfo "To enable logging from the dhcpd server, configure your"
+ einfo "logger (${logger}) to listen on ${CHROOT}/dev/log"
+}
diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-dbus.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-dbus.patch
new file mode 100644
index 000000000000..579d72f48443
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-dbus.patch
@@ -0,0 +1,84 @@
+--- client/scripts/bsdos
++++ client/scripts/bsdos
+@@ -47,6 +47,11 @@
+ . /etc/dhcp/dhclient-exit-hooks
+ fi
+ # probably should do something with exit status of the local script
++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++ dbus-send --system --dest=com.redhat.dhcp \
++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++ fi
+ exit $exit_status
+ }
+
+--- client/scripts/freebsd
++++ client/scripts/freebsd
+@@ -57,6 +57,11 @@
+ . /etc/dhcp/dhclient-exit-hooks
+ fi
+ # probably should do something with exit status of the local script
++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++ dbus-send --system --dest=com.redhat.dhcp \
++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++ fi
+ exit $exit_status
+ }
+
+--- client/scripts/linux
++++ client/scripts/linux
+@@ -69,6 +69,11 @@
+ . /etc/dhcp/dhclient-exit-hooks
+ fi
+ # probably should do something with exit status of the local script
++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++ dbus-send --system --dest=com.redhat.dhcp \
++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++ fi
+ exit $exit_status
+ }
+
+--- client/scripts/netbsd
++++ client/scripts/netbsd
+@@ -47,6 +47,11 @@
+ . /etc/dhcp/dhclient-exit-hooks
+ fi
+ # probably should do something with exit status of the local script
++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++ dbus-send --system --dest=com.redhat.dhcp \
++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++ fi
+ exit $exit_status
+ }
+
+--- client/scripts/openbsd
++++ client/scripts/openbsd
+@@ -47,6 +47,11 @@
+ . /etc/dhcp/dhclient-exit-hooks
+ fi
+ # probably should do something with exit status of the local script
++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++ dbus-send --system --dest=com.redhat.dhcp \
++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++ fi
+ exit $exit_status
+ }
+
+--- client/scripts/solaris
++++ client/scripts/solaris
+@@ -47,6 +47,11 @@
+ . /etc/dhcp/dhclient-exit-hooks
+ fi
+ # probably should do something with exit status of the local script
++ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++ dbus-send --system --dest=com.redhat.dhcp \
++ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++ fi
+ exit $exit_status
+ }
+
diff --git a/net-misc/dhcp/files/dhcp-3.0.3-x-option.patch b/net-misc/dhcp/files/dhcp-3.0.3-x-option.patch
new file mode 100644
index 000000000000..5f5c1a88aa1b
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-3.0.3-x-option.patch
@@ -0,0 +1,216 @@
+--- dhcp-3.0.2/common/parse.c.extended_option_environment 2005-04-05 17:49:36.513062562 -0400
++++ dhcp-3.0.2/common/parse.c 2005-04-05 17:49:36.580052656 -0400
+@@ -1270,6 +1270,10 @@
+ option_hash_add (option -> universe -> hash,
+ (const char *)option -> name,
+ 0, option, MDL);
++#ifdef EXTENDED_NEW_OPTION_INFO
++ if ( new_option_info_tree != 0L )
++ add_new_option_info( option );
++#endif
+ return 1;
+ }
+
+--- dhcp-3.0.2/common/tables.c.extended_option_environment 2004-09-01 13:06:35.000000000 -0400
++++ dhcp-3.0.2/common/tables.c 2005-04-05 18:04:23.915838623 -0400
+@@ -1238,3 +1238,40 @@
+ fqdn_universe.name, 0,
+ &fqdn_universe, MDL);
+ }
++
++#ifdef EXTENDED_NEW_OPTION_INFO
++#include <search.h>
++
++void *new_option_info_tree = 0L;
++
++static int new_option_info_comparator( const void* p1, const void *p2 )
++{
++ uint32_t ocode1 = (((const struct option*)p1)->universe->index << 8)
++ |(((const struct option*)p1)->code),
++ ocode2 = (((const struct option*)p2)->universe->index << 8)
++ |(((const struct option*)p2)->code);
++ return( (ocode1 == ocode2)
++ ? 0
++ :( ( ocode1 > ocode2 )
++ ? 1
++ : -1
++ )
++ );
++}
++
++void *add_new_option_info( struct option *option )
++{
++ if ( option->universe->index >= fqdn_universe.index )
++ return 0L;
++ if ( new_option_info_tree == GENERATE_NEW_OPTION_INFO )
++ new_option_info_tree = (void*)0L;
++ return tsearch( option, &(new_option_info_tree), new_option_info_comparator );
++}
++
++void *lookup_new_option_info( struct option *option )
++{
++ if ( new_option_info_tree == GENERATE_NEW_OPTION_INFO )
++ return 0L;
++ return tfind( option, &(new_option_info_tree), new_option_info_comparator );
++}
++#endif
+--- dhcp-3.0.2/includes/dhcpd.h.extended_option_environment 2004-11-24 12:39:16.000000000 -0500
++++ dhcp-3.0.2/includes/dhcpd.h 2005-04-05 17:49:36.613047777 -0400
+@@ -1800,6 +1800,13 @@
+ void initialize_common_option_spaces PROTO ((void));
+ struct universe *config_universe;
+
++#ifdef EXTENDED_NEW_OPTION_INFO
++#define GENERATE_NEW_OPTION_INFO ((void*)1)
++extern void *new_option_info_tree;
++extern void *add_new_option_info( struct option*);
++extern void *lookup_new_option_info( struct option *);
++#endif
++
+ /* stables.c */
+ #if defined (FAILOVER_PROTOCOL)
+ extern failover_option_t null_failover_option;
+--- dhcp-3.0.2/client/dhclient.c.extended_option_environment 2005-04-05 17:49:36.566054726 -0400
++++ dhcp-3.0.2/client/dhclient.c 2005-04-05 17:49:36.617047185 -0400
+@@ -74,7 +74,9 @@
+ int onetry=0;
+ int quiet=0;
+ int nowait=0;
+-
++#ifdef EXTENDED_NEW_OPTION_INFO
++int extended_option_environment = 0;
++#endif
+ static void usage PROTO ((void));
+
+ void do_release(struct client_state *);
+@@ -204,6 +206,11 @@
+ } else if (!strcmp (argv [i], "--version")) {
+ log_info ("isc-dhclient-%s", DHCP_VERSION);
+ exit (0);
++#ifdef EXTENDED_NEW_OPTION_INFO
++ } else if (!strcmp (argv [i], "-x")) {
++ extended_option_environment = 1;
++ new_option_info_tree = GENERATE_NEW_OPTION_INFO;
++#endif
+ } else if (argv [i][0] == '-') {
+ usage ();
+ } else {
+@@ -572,7 +579,11 @@
+ log_info (arr);
+ log_info (url);
+
++#ifdef EXTENDED_NEW_OPTION_INFO
++ log_error ("Usage: dhclient [-1dqr] [-nwx] [-p <port>] %s",
++#else
+ log_error ("Usage: dhclient [-1dqr] [-nw] [-p <port>] %s",
++#endif
+ "[-s server]");
+ log_error (" [-cf config-file] [-lf lease-file]%s",
+ "[-pf pid-file] [-e VAR=val]");
+@@ -2529,8 +2540,28 @@
+ struct envadd_state {
+ struct client_state *client;
+ const char *prefix;
++ struct universe *universe;
+ };
+
++#ifdef EXTENDED_NEW_OPTION_INFO
++static
++void build_universe_info_envvar
++( struct option_cache *oc,
++ struct packet *p, struct lease *l,
++ struct client_state *client,
++ struct option_state *in_o,
++ struct option_state *cf_o,
++ struct binding_scope **scope,
++ struct universe *u, void *es
++)
++{
++ char info_name[512], info_data[512];
++ snprintf(info_name, 512, "%s._universe_.", oc->option->universe->name);
++ snprintf(info_data, 512, "%u:%s", oc->option->code,oc->option->format);
++ client_envadd( client, info_name, oc->option->name, info_data );
++}
++#endif
++
+ void client_option_envadd (struct option_cache *oc,
+ struct packet *packet, struct lease *lease,
+ struct client_state *client_state,
+@@ -2547,6 +2578,31 @@
+ in_options, cfg_options, scope, oc, MDL)) {
+ if (data.len) {
+ char name [256];
++#ifdef EXTENDED_NEW_OPTION_INFO
++ if ( extended_option_environment )
++ {
++ if( ( oc->option->universe != &dhcp_universe )
++ &&( oc->option->universe->index > fqdn_universe.index )
++ &&( es->universe != oc->option->universe )
++ )
++ {
++ es->universe = oc->option->universe;
++ (*(es->universe->foreach))
++ ( (struct packet *)0, (struct lease *)0,
++ client_state,
++ in_options, cfg_options,
++ scope, es->universe, es,
++ build_universe_info_envvar
++ );
++ }else
++ if ( lookup_new_option_info(oc->option) != 0L )
++ build_universe_info_envvar
++ ( oc, packet, lease, client_state,
++ in_options, cfg_options, scope,
++ oc->option->universe, es
++ );
++ }
++#endif
+ if (dhcp_option_ev_name (name, sizeof name,
+ oc -> option)) {
+ client_envadd (es -> client, es -> prefix,
+@@ -2575,6 +2631,7 @@
+
+ es.client = client;
+ es.prefix = prefix;
++ es.universe = 0L;
+
+ client_envadd (client,
+ prefix, "ip_address", "%s", piaddr (lease -> address));
+@@ -2788,7 +2845,14 @@
+ s = option -> name;
+ if (j + 1 == buflen)
+ return 0;
++#ifdef EXTENDED_NEW_OPTION_INFO
++ if ( ! extended_option_environment )
++ buf [j++] = '_';
++ else
++ buf [j++] = '.';
++#else
+ buf [j++] = '_';
++#endif
+ }
+ ++i;
+ } while (i != 2);
+--- dhcp-3.0.2/client/dhclient.8.extended_option_environment 2004-09-29 19:01:46.000000000 -0400
++++ dhcp-3.0.2/client/dhclient.8 2005-04-05 17:49:36.619046889 -0400
+@@ -78,6 +78,9 @@
+ .B -w
+ ]
+ [
++.B -x
++]
++[
+ .I if0
+ [
+ .I ...ifN
+@@ -252,6 +255,10 @@
+ supplying the
+ .B -nw
+ flag.
++.PP
++The -x argument enables eXtended option information to be created in the
++-s dhclient-script environment, which would allow applications running
++in that environment to handle options they do not know about in advance.
+ .SH CONFIGURATION
+ The syntax of the dhclient.conf(5) file is discussed separately.
+ .SH OMAPI
diff --git a/net-misc/dhcp/files/digest-dhcp-3.0.3-r7 b/net-misc/dhcp/files/digest-dhcp-3.0.3-r7
new file mode 100644
index 000000000000..bfdf4cb56303
--- /dev/null
+++ b/net-misc/dhcp/files/digest-dhcp-3.0.3-r7
@@ -0,0 +1,3 @@
+MD5 f91416a0b8ed3fd0601688cf0b7df58f dhcp-3.0.3.tar.gz 870240
+RMD160 bcbd1f8b49f17809a3473103a7b5e096c45855d7 dhcp-3.0.3.tar.gz 870240
+SHA256 c96bcd884dde06c22a709cfb9e84f7e32f6577dcd52aa7f12186aa22b5e63afe dhcp-3.0.3.tar.gz 870240
diff --git a/net-misc/dhcp/files/digest-dhcp-3.0.4_rc1 b/net-misc/dhcp/files/digest-dhcp-3.0.4_rc1
new file mode 100644
index 000000000000..adfc694531b1
--- /dev/null
+++ b/net-misc/dhcp/files/digest-dhcp-3.0.4_rc1
@@ -0,0 +1,3 @@
+MD5 c9fc24218f3d16d59c4e1bc5f42ea3b7 dhcp-3.0.4rc1.tar.gz 882072
+RMD160 1d8c4ee31aa74c84201e009aab2bfe2851c8f785 dhcp-3.0.4rc1.tar.gz 882072
+SHA256 e2fbdefa2dc15e398cc33e96ffaae4eafebd6596d2cda36fea6fcaed190df070 dhcp-3.0.4rc1.tar.gz 882072