summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kalika <max@gentoo.org>2004-01-15 01:04:57 +0000
committerMax Kalika <max@gentoo.org>2004-01-15 01:04:57 +0000
commite6b14e59536e01eb803f8a7c92df1d0b25c775cd (patch)
tree312a7cd8faaff53e75eeae897f9561cbef05663b /net-misc/dhcp
parentadded ~hppa (diff)
downloadgentoo-2-e6b14e59536e01eb803f8a7c92df1d0b25c775cd.tar.gz
gentoo-2-e6b14e59536e01eb803f8a7c92df1d0b25c775cd.tar.bz2
gentoo-2-e6b14e59536e01eb803f8a7c92df1d0b25c775cd.zip
Readd the ebuild and chown patch to address bugs #27079 and #36869. Add dhcrelay startup script. Contributed by Martin Jackson on bug #33895. Set KEYWORDS ~arch.
Diffstat (limited to 'net-misc/dhcp')
-rw-r--r--net-misc/dhcp/ChangeLog9
-rw-r--r--net-misc/dhcp/Manifest21
-rw-r--r--net-misc/dhcp/dhcp-3.0_p2-r2.ebuild4
-rw-r--r--net-misc/dhcp/dhcp-3.0_p2-r3.ebuild131
-rw-r--r--net-misc/dhcp/dhcp-3.0_p2.ebuild4
-rw-r--r--net-misc/dhcp/files/dhcp-3.0pl2-fix-perms.patch15
-rw-r--r--net-misc/dhcp/files/dhcp.conf4
-rw-r--r--net-misc/dhcp/files/dhcp.rc64
-rw-r--r--net-misc/dhcp/files/dhcrelay.conf13
-rw-r--r--net-misc/dhcp/files/dhcrelay.rc625
-rw-r--r--net-misc/dhcp/files/digest-dhcp-3.0_p2-r32
11 files changed, 215 insertions, 17 deletions
diff --git a/net-misc/dhcp/ChangeLog b/net-misc/dhcp/ChangeLog
index b533c3aa2b32..c16e02499983 100644
--- a/net-misc/dhcp/ChangeLog
+++ b/net-misc/dhcp/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-misc/dhcp
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.30 2004/01/05 18:35:47 weeve Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.31 2004/01/15 01:04:44 max Exp $
+
+ 14 Jan 2004; Max Kalika <max@gentoo.org> dhcp-3.0_p2-r3.ebuild,
+ files/dhcp.conf, files/dhcp.rc6, files/dhcrelay.conf, files/dhcrelay.rc6:
+ Add dhcrelay startup script. Contributed by Martin Jackson on bug #33895.
+
+ 14 Jan 2004; Max Kalika <max@gentoo.org> dhcp-3.0_p2-r3.ebuild:
+ Readd the ebuild and chown patch to address bugs #27079 and #36869.
05 Jan 2004; Jason Wever <weeve@gentoo.org> dhcp-3.0_p2-r2.ebuild:
Marked stable on sparc.
diff --git a/net-misc/dhcp/Manifest b/net-misc/dhcp/Manifest
index a4dbfc8ba1af..089efce2445c 100644
--- a/net-misc/dhcp/Manifest
+++ b/net-misc/dhcp/Manifest
@@ -1,12 +1,17 @@
-MD5 ddb6fe58f66c0c76a8243dce4a716fba ChangeLog 4947
-MD5 d6e23f9f223748414658b0cb49aa0d23 dhcp-3.0_p2-r2.ebuild 3842
-MD5 c165af1e7e63275ca6f5974e2d3048a3 dhcp-3.0_p2.ebuild 2747
+MD5 ce05257958cfae0bfbde0a232b1dfa17 dhcp-3.0_p2-r3.ebuild 3982
+MD5 fc1ebdd22fe7c72c34248dd1f190c926 ChangeLog 5301
MD5 9384ae7ba3e9f56b8027ea92f607042d metadata.xml 215
-MD5 ff4bf18624d479599da15878fdef65fe files/conf.dhcpd 401
+MD5 ffd9effc7435762698d37e09ad8fff16 dhcp-3.0_p2-r2.ebuild 3841
+MD5 2688d353bf0ff8abf3789129a4a2b2b2 dhcp-3.0_p2.ebuild 2744
+MD5 8d98ca755a443b878d397120f7088f7d files/dhcp.conf 648
MD5 498a3eb0e9deaf705f17fff3834f5b90 files/dhclient.c-3.0-dw-cli-fix.patch 734
-MD5 28ebabb4ad513afb04314634ecd9db25 files/dhcp-3.0pl2-user-option-fix.patch 1519
-MD5 d7e3f8bde622ba42000c912424673e65 files/dhcp.conf 648
-MD5 8b7a8958b7326f7c9cb501a324528462 files/dhcp.rc6 1105
-MD5 be72fa691b23c9e82cc4567a1a035cfc files/dhcp.rc7 811
+MD5 96acf4633ae7ce268cd5a01b460ecfdd files/dhcrelay.rc6 619
+MD5 ff4bf18624d479599da15878fdef65fe files/conf.dhcpd 401
MD5 d6ae01f5dcc87b11d4d96a34e7cc52a3 files/digest-dhcp-3.0_p2 63
MD5 a941fa952582373e42b07b61bd66a168 files/digest-dhcp-3.0_p2-r2 129
+MD5 a941fa952582373e42b07b61bd66a168 files/digest-dhcp-3.0_p2-r3 129
+MD5 52c69c00f7dcab328fa39f954fadc766 files/dhcrelay.conf 519
+MD5 1433b0173611528a665e975820bfa52d files/dhcp.rc6 1105
+MD5 be72fa691b23c9e82cc4567a1a035cfc files/dhcp.rc7 811
+MD5 28ebabb4ad513afb04314634ecd9db25 files/dhcp-3.0pl2-user-option-fix.patch 1519
+MD5 d909d81a4d4ea39ddfc9898d33488c73 files/dhcp-3.0pl2-fix-perms.patch 485
diff --git a/net-misc/dhcp/dhcp-3.0_p2-r2.ebuild b/net-misc/dhcp/dhcp-3.0_p2-r2.ebuild
index c537dc84b6d7..07da1d7cc993 100644
--- a/net-misc/dhcp/dhcp-3.0_p2-r2.ebuild
+++ b/net-misc/dhcp/dhcp-3.0_p2-r2.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0_p2-r2.ebuild,v 1.9 2004/01/05 18:35:47 weeve Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0_p2-r2.ebuild,v 1.10 2004/01/15 01:04:44 max Exp $
inherit eutils flag-o-matic
diff --git a/net-misc/dhcp/dhcp-3.0_p2-r3.ebuild b/net-misc/dhcp/dhcp-3.0_p2-r3.ebuild
new file mode 100644
index 000000000000..038f278649bf
--- /dev/null
+++ b/net-misc/dhcp/dhcp-3.0_p2-r3.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0_p2-r3.ebuild,v 1.3 2004/01/15 01:04:44 max Exp $
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="ISC Dynamic Host Configuration Protocol."
+HOMEPAGE="http://www.isc.org/products/DHCP"
+SRC_URI="ftp://ftp.isc.org/isc/dhcp/${P/_p/pl}.tar.gz
+ http://www.episec.com/people/edelkind/patches/dhcp/dhcp-3.0+paranoia.patch"
+
+LICENSE="isc-dhcp"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~ppc64 ~sparc ~mips hppa"
+IUSE="static"
+
+DEPEND="virtual/glibc
+ >=sys-apps/sed-4"
+
+S="${WORKDIR}/${P/_p/pl}"
+
+src_unpack() {
+ unpack ${A} && cd "${S}"
+ epatch "${FILESDIR}/dhcp-3.0pl2-user-option-fix.patch"
+ epatch "${FILESDIR}/dhclient.c-3.0-dw-cli-fix.patch"
+ epatch "${DISTDIR}/dhcp-3.0+paranoia.patch"
+ epatch "${FILESDIR}/dhcp-3.0pl2-fix-perms.patch"
+}
+
+src_compile() {
+ # 01/Mar/2003: Fix for bug #11960 by Jason Wever <weeve@gentoo.org>
+ if [ "${ARCH}" = "sparc" ] ; then
+ filter-flags "-O3"
+ filter-flags "-O2"
+ filter-flags "-O"
+ fi
+
+ use static && append-flags -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 = gcc
+ LIBDIR = /usr/lib
+ INCDIR = /usr/include
+ ETC = /etc/dhcp
+ VARDB = /var/lib/dhcp
+ VARRUN = /var/run/dhcp
+ ADMMANDIR = /usr/share/man/man8
+ FFMANDIR = /usr/share/man/man5
+ LIBMANDIR = /usr/share/man/man3
+ USRMANDIR = /usr/share/man/man1
+ END
+
+ ./configure --with-nsupdate \
+ --copts "-DPARANOIA -DEARLY_CHROOT ${CFLAGS}" || die "configure failed"
+
+ emake || die "compile problem"
+}
+
+src_install() {
+ enewgroup dhcp
+ enewuser dhcp -1 /bin/false /var/lib/dhcp dhcp
+
+ einstall DESTDIR="${D}"
+
+ insinto /etc/dhcp
+ newins server/dhcpd.conf dhcpd.conf.sample
+ newins client/dhclient.conf dhclient.conf.sample
+ dosed "s:/etc/dhclient-script:/etc/dhcp/dhclient-script:" \
+ /etc/dhcp/dhclient.conf.sample
+ mv "${D}/sbin/dhclient-script" "${D}/etc/dhcp/dhclient-script.sample"
+
+ dodoc ANONCVS CHANGES COPYRIGHT README RELNOTES doc/*
+ newdoc client/dhclient.conf dhclient.conf.sample
+ newdoc client/scripts/linux dhclient-script.sample
+ newdoc server/dhcpd.conf dhcpd.conf.sample
+
+ exeinto /etc/init.d
+ newexe "${FILESDIR}/dhcp.rc6" dhcp
+ newexe "${FILESDIR}/dhcrelay.rc6" dhcrelay
+ insinto /etc/conf.d
+ newins "${FILESDIR}/dhcp.conf" dhcp
+ newins "${FILESDIR}/dhcrelay.conf" dhcrelay
+
+ keepdir /var/{lib,run}/dhcp
+}
+
+pkg_postinst() {
+ chown dhcp:dhcp "${ROOT}/var/lib/dhcp" "${ROOT}/var/run/dhcp"
+
+ einfo "You can edit /etc/conf.d/dhcp to customize dhcp settings"
+ einfo
+ einfo "The DHCP ebuild now includes chroot support."
+ einfo "If you like to run dhcpd in chroot AND this is a new install OR"
+ einfo "your dhcpd doesn't already run in chroot, simply run:"
+ einfo " ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config"
+ einfo "Before running the above command you might want to change the chroot"
+ einfo "dir in /etc/conf.d/dhcp, otherwise /chroot/dhcp will be used."
+ echo
+}
+
+pkg_config() {
+ CHROOT=`sed -n 's/^[[:blank:]]\?CHROOT="\([^"]\+\)"/\1/p' /etc/conf.d/dhcp 2>/dev/null`
+
+ if [ ! -d "${CHROOT:=/chroot/dhcp}" ] ; then
+ ebegin "Setting up the chroot directory"
+ mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run}
+ cp -R /etc/dhcp "${CHROOT}/etc/"
+ cp -R /var/lib/dhcp "${CHROOT}/var/lib"
+ chown -R dhcp:dhcp "${CHROOT}/var/lib" "${CHROOT}/var/run"
+ eend
+
+ if [ "`grep '^#[[:blank:]]\?CHROOT' /etc/conf.d/dhcp`" ] ; then
+ sed -e '/^#[[:blank:]]\?CHROOT/s/^#[[:blank:]]\?//' -i /etc/conf.d/dhcp
+ fi
+
+ einfo "To enable logging from the DHCP server, configure your"
+ einfo "logger (`best_version virtual/logger`) to listen on ${CHROOT}/dev/log"
+ else
+ eerror
+ eerror "${CHROOT} already exists. Quitting."
+ eerror
+ fi
+}
diff --git a/net-misc/dhcp/dhcp-3.0_p2.ebuild b/net-misc/dhcp/dhcp-3.0_p2.ebuild
index e738a10cc047..ee831f150254 100644
--- a/net-misc/dhcp/dhcp-3.0_p2.ebuild
+++ b/net-misc/dhcp/dhcp-3.0_p2.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0_p2.ebuild,v 1.6 2003/08/14 20:31:29 tester Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0_p2.ebuild,v 1.7 2004/01/15 01:04:44 max Exp $
#This should be fairly consistant now, unless we have any _pre releases...
MYP="${P/_p/pl}"
diff --git a/net-misc/dhcp/files/dhcp-3.0pl2-fix-perms.patch b/net-misc/dhcp/files/dhcp-3.0pl2-fix-perms.patch
new file mode 100644
index 000000000000..13debb20ed0e
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-3.0pl2-fix-perms.patch
@@ -0,0 +1,15 @@
+--- server/dhcpd.c 2003-11-05 14:08:09.000000000 -0800
++++ server/dhcpd.c 2003-11-05 14:15:32.000000000 -0800
+@@ -602,6 +602,12 @@
+ if (lftest)
+ exit (0);
+
++#if defined (PARANOIA)
++ /* Set proper permissions... */
++ if (lchown (path_dhcpd_db, set_uid, set_gid))
++ log_fatal ("lchown(%s, %d, %d): %m", path_dhcpd_db, (int) set_uid, (int) set_gid);
++#endif /* PARANOIA */
++
+ /* Discover all the network interfaces and initialize them. */
+ discover_interfaces (DISCOVER_SERVER);
+
diff --git a/net-misc/dhcp/files/dhcp.conf b/net-misc/dhcp/files/dhcp.conf
index e93a8ef8a956..9e294ba23172 100644
--- a/net-misc/dhcp/files/dhcp.conf
+++ b/net-misc/dhcp/files/dhcp.conf
@@ -1,6 +1,6 @@
-# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcp.conf,v 1.2 2003/11/10 06:23:49 max Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcp.conf,v 1.3 2004/01/15 01:04:51 max Exp $
# Configure which interface or interfaces to for dhcp to listen on
# list all interfaces space separated.
diff --git a/net-misc/dhcp/files/dhcp.rc6 b/net-misc/dhcp/files/dhcp.rc6
index 334330c0ff85..7723d7163216 100644
--- a/net-misc/dhcp/files/dhcp.rc6
+++ b/net-misc/dhcp/files/dhcp.rc6
@@ -1,7 +1,7 @@
#!/sbin/runscript
-# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcp.rc6,v 1.8 2003/11/10 06:23:49 max Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcp.rc6,v 1.9 2004/01/15 01:04:51 max Exp $
depend() {
need net
diff --git a/net-misc/dhcp/files/dhcrelay.conf b/net-misc/dhcp/files/dhcrelay.conf
new file mode 100644
index 000000000000..38c2d860d3cc
--- /dev/null
+++ b/net-misc/dhcp/files/dhcrelay.conf
@@ -0,0 +1,13 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcrelay.conf,v 1.1 2004/01/15 01:04:51 max Exp $
+
+# Configure which interface or interfaces to for dhcp to listen on
+# list all interfaces space separated.
+IFACE="eth0"
+
+# Insert any other options needed. See dhcrelay(8) for details.
+DHCRELAY_OPTS=""
+
+# Space separated list of IPs to forward BOOTP/DHCP packets to.
+DHCRELAY_SERVERS=""
diff --git a/net-misc/dhcp/files/dhcrelay.rc6 b/net-misc/dhcp/files/dhcrelay.rc6
new file mode 100644
index 000000000000..76e129c29c99
--- /dev/null
+++ b/net-misc/dhcp/files/dhcrelay.rc6
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcrelay.rc6,v 1.1 2004/01/15 01:04:51 max Exp $
+
+depend() {
+ need net
+ use logger
+}
+
+start() {
+ ebegin "Starting dhcrelay"
+ start-stop-daemon --start --quiet \
+ --pidfile /var/run/dhcrelay.pid \
+ --exec /usr/sbin/dhcrelay \
+ -- -q -i ${IFACE} ${DHCRELAY_OPTS} \
+ ${DHCRELAY_SERVERS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping dhcrelay"
+ start-stop-daemon --stop --quiet --pidfile /var/run/dhcrelay.pid
+ eend $?
+}
diff --git a/net-misc/dhcp/files/digest-dhcp-3.0_p2-r3 b/net-misc/dhcp/files/digest-dhcp-3.0_p2-r3
new file mode 100644
index 000000000000..5c34b82115a3
--- /dev/null
+++ b/net-misc/dhcp/files/digest-dhcp-3.0_p2-r3
@@ -0,0 +1,2 @@
+MD5 2cb5db7a0c23deaef4724b5fc3f9a869 dhcp-3.0pl2.tar.gz 865196
+MD5 66becf9870e0293bbd35d1fba770751a dhcp-3.0+paranoia.patch 5366