summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeemant Kulleen <seemant@gentoo.org>2005-05-16 14:23:14 +0000
committerSeemant Kulleen <seemant@gentoo.org>2005-05-16 14:23:14 +0000
commit0258e2e66b020e02a0f5d84a184c4bb2b54c0abb (patch)
treee2afb44e7ec2ce132d25e1ee4fbf72ce4339963d /net-misc/dhcp
parentversion bump! (diff)
downloadgentoo-2-0258e2e66b020e02a0f5d84a184c4bb2b54c0abb.tar.gz
gentoo-2-0258e2e66b020e02a0f5d84a184c4bb2b54c0abb.tar.bz2
gentoo-2-0258e2e66b020e02a0f5d84a184c4bb2b54c0abb.zip
Version bump thanks to: Bjarke Istrup Pedersen <Bjarke.ip@tekpunkt.dk> in bug #88630. Additionally, moved the patches to a tarball on the mirrors. Configs will probably follow
(Portage version: 2.0.51.21-r1)
Diffstat (limited to 'net-misc/dhcp')
-rw-r--r--net-misc/dhcp/ChangeLog14
-rw-r--r--net-misc/dhcp/Manifest18
-rw-r--r--net-misc/dhcp/dhcp-3.0.1-r1.ebuild22
-rw-r--r--net-misc/dhcp/dhcp-3.0.1.ebuild21
-rw-r--r--net-misc/dhcp/dhcp-3.0.2.ebuild141
-rw-r--r--net-misc/dhcp/files/dhcp-3.0+paranoia.patch207
-rw-r--r--net-misc/dhcp/files/dhcp-3.0.1-fix-invalid-attribute.patch15
-rw-r--r--net-misc/dhcp/files/dhcp-3.0pl2-fix-perms.patch15
-rw-r--r--net-misc/dhcp/files/digest-dhcp-3.0.11
-rw-r--r--net-misc/dhcp/files/digest-dhcp-3.0.1-r11
-rw-r--r--net-misc/dhcp/files/digest-dhcp-3.0.22
11 files changed, 194 insertions, 263 deletions
diff --git a/net-misc/dhcp/ChangeLog b/net-misc/dhcp/ChangeLog
index cfcd789e9522..d87fe673c845 100644
--- a/net-misc/dhcp/ChangeLog
+++ b/net-misc/dhcp/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for net-misc/dhcp
-# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.49 2004/12/29 03:35:06 ciaranm Exp $
+# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.50 2005/05/16 14:23:14 seemant Exp $
+
+*dhcp-3.0.2 (16 May 2005)
+
+ 16 May 2005; Seemant Kulleen <seemant@gentoo.org>
+ -files/dhcp-3.0.1-fix-invalid-attribute.patch,
+ -files/dhcp-3.0+paranoia.patch, -files/dhcp-3.0pl2-fix-perms.patch,
+ dhcp-3.0.1.ebuild, dhcp-3.0.1-r1.ebuild, +dhcp-3.0.2.ebuild:
+ Version bump thanks to: Bjarke Istrup Pedersen <Bjarke.ip@tekpunkt.dk> in
+ bug #88630. Additionally, moved the patches to a tarball on the mirrors.
+ Configs will probably follow
29 Dec 2004; Ciaran McCreesh <ciaranm@gentoo.org> :
Change encoding to UTF-8 for GLEP 31 compliance
diff --git a/net-misc/dhcp/Manifest b/net-misc/dhcp/Manifest
index 4b63f989fba2..825c8f3adbdd 100644
--- a/net-misc/dhcp/Manifest
+++ b/net-misc/dhcp/Manifest
@@ -1,13 +1,15 @@
-MD5 7d50e4a39640d74b9a0bedf1c5b57705 dhcp-3.0.1.ebuild 3986
MD5 ba84e3544d6e99b15d3e93376d9b93d4 ChangeLog 8279
-MD5 5c70d7e7d70c93d7216fa62875c7339c dhcp-3.0.1-r1.ebuild 4024
MD5 9384ae7ba3e9f56b8027ea92f607042d metadata.xml 215
-MD5 8a19dd005c33231e02c03659f0c658df files/dhcrelay.rc6 626
-MD5 81b9256728a5daab31f0513ab55e8354 files/dhcp.rc6 1092
-MD5 d909d81a4d4ea39ddfc9898d33488c73 files/dhcp-3.0pl2-fix-perms.patch 485
-MD5 7f1859e6517a23f87c8e83c68a15a537 files/digest-dhcp-3.0.1 62
+MD5 fbdf8356191fce478a05d6b3358ac475 dhcp-3.0.1.ebuild 4048
+MD5 32a9fa2bdb9494a6459126ecaa551a68 dhcp-3.0.1-r1.ebuild 4080
+MD5 1748f7e9c082ae9dcfcc931b8f8031de dhcp-3.0.2.ebuild 4088
+MD5 66becf9870e0293bbd35d1fba770751a files/dhcp-3.0+paranoia.patch 5366
MD5 ca45269300d74a3a8750e0e64e8d92ea files/dhcp-3.0.1-fix-invalid-attribute.patch 583
+MD5 d909d81a4d4ea39ddfc9898d33488c73 files/dhcp-3.0pl2-fix-perms.patch 485
MD5 5cde0a8fdf363490c4212726dfd06a38 files/dhcp.conf 769
-MD5 66becf9870e0293bbd35d1fba770751a files/dhcp-3.0+paranoia.patch 5366
+MD5 81b9256728a5daab31f0513ab55e8354 files/dhcp.rc6 1092
MD5 6c69efa2b41915ec59e53bb065ac3d0c files/dhcrelay.conf 502
-MD5 7f1859e6517a23f87c8e83c68a15a537 files/digest-dhcp-3.0.1-r1 62
+MD5 8a19dd005c33231e02c03659f0c658df files/dhcrelay.rc6 626
+MD5 323228061719fcac86be97a1a25d23b6 files/digest-dhcp-3.0.1 128
+MD5 323228061719fcac86be97a1a25d23b6 files/digest-dhcp-3.0.1-r1 128
+MD5 b060506f226297b90435f270b7345496 files/digest-dhcp-3.0.2 128
diff --git a/net-misc/dhcp/dhcp-3.0.1-r1.ebuild b/net-misc/dhcp/dhcp-3.0.1-r1.ebuild
index 31a4ad018d0f..c7828a35c474 100644
--- a/net-misc/dhcp/dhcp-3.0.1-r1.ebuild
+++ b/net-misc/dhcp/dhcp-3.0.1-r1.ebuild
@@ -1,30 +1,36 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0.1-r1.ebuild,v 1.1 2004/12/20 18:54:23 max Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0.1-r1.ebuild,v 1.2 2005/05/16 14:23:14 seemant Exp $
inherit eutils flag-o-matic toolchain-funcs
+PATCHVER=1
+
DESCRIPTION="ISC Dynamic Host Configuration Protocol"
HOMEPAGE="http://www.isc.org/products/DHCP"
-SRC_URI="ftp://ftp.isc.org/isc/dhcp/${P}.tar.gz"
+SRC_URI="ftp://ftp.isc.org/isc/dhcp/${P}.tar.gz
+ mirror://gentoo/${PN}-3-gentoo-${PATCHVER}.tar.bz2
+ http://dev.gentoo.org/~seemant/distfiles/${PN}-3-gentoo-${PATCHVER}.tar.bz2"
LICENSE="isc-dhcp"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc x86"
IUSE="static selinux"
RDEPEND="virtual/libc
selinux? ( sec-policy/selinux-dhcp )"
+
DEPEND="${RDEPEND}
>=sys-apps/sed-4"
+
PROVIDE="virtual/dhcpc"
+PATCHDIR=${WORKDIR}/patch
+
src_unpack() {
unpack ${A} && cd "${S}"
-
- epatch "${FILESDIR}/dhcp-3.0+paranoia.patch"
- epatch "${FILESDIR}/dhcp-3.0pl2-fix-perms.patch"
- epatch "${FILESDIR}/dhcp-3.0.1-fix-invalid-attribute.patch"
+
+ EPATCH_SUFFIX="patch" epatch ${PATCHDIR}
has noman ${FEATURES} && sed -i 's:nroff:echo:' */Makefile.dist
}
diff --git a/net-misc/dhcp/dhcp-3.0.1.ebuild b/net-misc/dhcp/dhcp-3.0.1.ebuild
index b891034b12b0..ef8bc6d64879 100644
--- a/net-misc/dhcp/dhcp-3.0.1.ebuild
+++ b/net-misc/dhcp/dhcp-3.0.1.ebuild
@@ -1,12 +1,16 @@
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0.1.ebuild,v 1.10 2004/11/10 07:24:38 lv Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0.1.ebuild,v 1.11 2005/05/16 14:23:14 seemant Exp $
inherit eutils flag-o-matic toolchain-funcs
+PATCHVER=1
+
DESCRIPTION="ISC Dynamic Host Configuration Protocol"
HOMEPAGE="http://www.isc.org/products/DHCP"
-SRC_URI="ftp://ftp.isc.org/isc/dhcp/${P}.tar.gz"
+SRC_URI="ftp://ftp.isc.org/isc/dhcp/${P}.tar.gz
+ mirror://gentoo/${PN}-3-gentoo-${PATCHVER}.tar.bz2
+ http://dev.gentoo.org/~seemant/distfiles/${PN}-3-gentoo-${PATCHVER}.tar.bz2"
LICENSE="isc-dhcp"
SLOT="0"
@@ -15,16 +19,17 @@ IUSE="static selinux"
RDEPEND="virtual/libc
selinux? ( sec-policy/selinux-dhcp )"
+
DEPEND="${RDEPEND}
>=sys-apps/sed-4"
+
PROVIDE="virtual/dhcpc"
+PATCHDIR=${WORKDIR}/patch
+
src_unpack() {
- unpack ${A}
- cd ${S}
- epatch ${FILESDIR}/dhcp-3.0+paranoia.patch
- epatch ${FILESDIR}/dhcp-3.0pl2-fix-perms.patch
- epatch ${FILESDIR}/dhcp-3.0.1-fix-invalid-attribute.patch
+ unpack ${A} ; cd ${S}
+ EPATCH_SUFFIX="patch" epatch ${PATCHDIR}
has noman ${FEATURES} && sed -i 's:nroff:echo:' */Makefile.dist
}
diff --git a/net-misc/dhcp/dhcp-3.0.2.ebuild b/net-misc/dhcp/dhcp-3.0.2.ebuild
new file mode 100644
index 000000000000..2c19c44cf0a2
--- /dev/null
+++ b/net-misc/dhcp/dhcp-3.0.2.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0.2.ebuild,v 1.1 2005/05/16 14:23:14 seemant Exp $
+
+inherit eutils flag-o-matic toolchain-funcs
+
+PATCHVER=1
+
+DESCRIPTION="ISC Dynamic Host Configuration Protocol"
+HOMEPAGE="http://www.isc.org/products/DHCP"
+SRC_URI="ftp://ftp.isc.org/isc/dhcp/${P}.tar.gz
+ mirror://gentoo/${PN}-3-gentoo-${PATCHVER}.tar.bz2
+ http://dev.gentoo.org/~seemant/distfiles/${PN}-3-gentoo-${PATCHVER}.tar.bz2"
+
+LICENSE="isc-dhcp"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static selinux"
+
+RDEPEND="virtual/libc
+ selinux? ( sec-policy/selinux-dhcp )"
+
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4"
+
+PROVIDE="virtual/dhcpc"
+
+PATCHDIR=${WORKDIR}/patch
+
+src_unpack() {
+ unpack ${A} && cd "${S}"
+
+ export EPATCH_SUFFIX="patch"
+ epatch ${PATCHDIR}
+
+ has noman ${FEATURES} && sed -i 's:nroff:echo:' */Makefile.dist
+}
+
+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/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 \
+ --copts "-DPARANOIA -DEARLY_CHROOT ${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
+ 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 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_preinst() {
+ enewgroup dhcp
+ enewuser dhcp -1 /bin/false /var/lib/dhcp 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/dhcp}
+ cp -R /etc/{localtime,dhcp} "${CHROOT}/etc/"
+ cp -R /var/lib/dhcp "${CHROOT}/var/lib"
+ chown -R dhcp:dhcp "${CHROOT}/var/lib" "${CHROOT}/var/run/dhcp"
+ 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/files/dhcp-3.0+paranoia.patch b/net-misc/dhcp/files/dhcp-3.0+paranoia.patch
deleted file mode 100644
index 886f5cb5ffe3..000000000000
--- a/net-misc/dhcp/files/dhcp-3.0+paranoia.patch
+++ /dev/null
@@ -1,207 +0,0 @@
-
-paranoia (non-root/chroot) patch for ISC dhcp 3.0
-file to patch: dhcp-3.0/server/dhcpd.c
-
-update from paranoia patch for ISC dhcp 2.0
-
-Adds 3 options:
-
- -user <user>
- -group <group>
- -chroot <chroot_dir>
-
-Notes:
- -DPARANOIA must be passed as an argument to the --copts option
- of configure. Otherwise, the paranoia code will not be compiled
- in. Example: ./configure --copts -DPARANOIA
-
- The chroot() call has been delayed in order to allow /dev/log to
- be reopened after the configuration file has been read. This is
- beneficial for systems on which /dev/log is a unix domain socket.
- The main side effect is that dhcpd.conf should be placed in /etc,
- instead of <chroot_dir>/etc.
-
- If dhcpd is to be run on a sysV-style architecture (or, more
- generally, if /dev/log is a character device), one may opt to
- create the <chroot_dir>/dev/log character device and add
- -DEARLY_CHROOT to the --copts option of configure (in addition to
- -DPARANOIA). This will perform the chroot() call at the earliest
- convenience (before reading the configuration file).
-
- If the -user option is used, the lease and pid file directories
- should be writable to the server process after it drops
- privileges.
-
-
-ari edelkind (12/10/2001)
-last modified 12/10/2001
-
-
---- dhcp-3.0/server/dhcpd.c Thu Jun 21 22:12:58 2001
-+++ dhcp-3.0+paranoia/server/dhcpd.c Wed Oct 17 08:23:00 2001
-@@ -56,6 +56,16 @@
- #include "version.h"
- #include <omapip/omapip_p.h>
-
-+#if defined (PARANOIA)
-+# include <sys/types.h>
-+# include <unistd.h>
-+# include <pwd.h>
-+/* get around the ISC declaration of group */
-+# define group real_group
-+# include <grp.h>
-+# undef group
-+#endif /* PARANOIA */
-+
- static void usage PROTO ((void));
-
- TIME cur_time;
-@@ -204,6 +214,22 @@
- omapi_object_dereference (&listener, MDL);
- }
-
-+#if defined (PARANOIA)
-+/* to be used in one of two possible scenarios */
-+static void setup_chroot (char *chroot_dir) {
-+ if (geteuid())
-+ log_fatal ("you must be root to use chroot");
-+
-+ if (chroot(chroot_dir)) {
-+ log_fatal ("chroot(\"%s\"): %m", chroot_dir);
-+ }
-+ if (chdir ("/")) {
-+ /* probably permission denied */
-+ log_fatal ("chdir(\"/\"): %m");
-+ }
-+}
-+#endif /* PARANOIA */
-+
- int main (argc, argv, envp)
- int argc;
- char **argv, **envp;
-@@ -236,6 +262,14 @@
- char *traceinfile = (char *)0;
- char *traceoutfile = (char *)0;
- #endif
-+#if defined (PARANOIA)
-+ char *set_user = 0;
-+ char *set_group = 0;
-+ char *set_chroot = 0;
-+
-+ uid_t set_uid = 0;
-+ gid_t set_gid = 0;
-+#endif /* PARANOIA */
-
- /* Make sure we have stdin, stdout and stderr. */
- status = open ("/dev/null", O_RDWR);
-@@ -298,6 +332,20 @@
- if (++i == argc)
- usage ();
- server = argv [i];
-+#if defined (PARANOIA)
-+ } else if (!strcmp (argv [i], "-user")) {
-+ if (++i == argc)
-+ usage ();
-+ set_user = argv [i];
-+ } else if (!strcmp (argv [i], "-group")) {
-+ if (++i == argc)
-+ usage ();
-+ set_group = argv [i];
-+ } else if (!strcmp (argv [i], "-chroot")) {
-+ if (++i == argc)
-+ usage ();
-+ set_chroot = argv [i];
-+#endif /* PARANOIA */
- } else if (!strcmp (argv [i], "-cf")) {
- if (++i == argc)
- usage ();
-@@ -397,6 +445,44 @@
- trace_seed_stop, MDL);
- #endif
-
-+#if defined (PARANOIA)
-+ /* get user and group info if those options were given */
-+ if (set_user) {
-+ struct passwd *tmp_pwd;
-+
-+ if (geteuid())
-+ log_fatal ("you must be root to set user");
-+
-+ if (!(tmp_pwd = getpwnam(set_user)))
-+ log_fatal ("no such user: %s", set_user);
-+
-+ set_uid = tmp_pwd->pw_uid;
-+
-+ /* use the user's group as the default gid */
-+ if (!set_group)
-+ set_gid = tmp_pwd->pw_gid;
-+ }
-+
-+ if (set_group) {
-+/* get around the ISC declaration of group */
-+#define group real_group
-+ struct group *tmp_grp;
-+
-+ if (geteuid())
-+ log_fatal ("you must be root to set group");
-+
-+ if (!(tmp_grp = getgrnam(set_group)))
-+ log_fatal ("no such group: %s", set_group);
-+
-+ set_gid = tmp_grp->gr_gid;
-+#undef group
-+ }
-+
-+# if defined (EARLY_CHROOT)
-+ if (set_chroot) setup_chroot (set_chroot);
-+# endif /* EARLY_CHROOT */
-+#endif /* PARANOIA */
-+
- /* Default to the DHCP/BOOTP port. */
- if (!local_port)
- {
-@@ -500,6 +586,10 @@
-
- postconf_initialization (quiet);
-
-+#if defined (PARANOIA) && !defined (EARLY_CHROOT)
-+ if (set_chroot) setup_chroot (set_chroot);
-+#endif /* PARANOIA && !EARLY_CHROOT */
-+
- /* test option should cause an early exit */
- if (cftest && !lftest)
- exit(0);
-@@ -543,6 +633,22 @@
- exit (0);
- }
-
-+#if defined (PARANOIA)
-+ /* change uid to the specified one */
-+
-+ if (set_gid) {
-+ if (setgroups (0, (void *)0))
-+ log_fatal ("setgroups: %m");
-+ if (setgid (set_gid))
-+ log_fatal ("setgid(%d): %m", (int) set_gid);
-+ }
-+
-+ if (set_uid) {
-+ if (setuid (set_uid))
-+ log_fatal ("setuid(%d): %m", (int) set_uid);
-+ }
-+#endif /* PARANOIA */
-+
- /* Read previous pid file. */
- if ((i = open (path_dhcpd_pid, O_RDONLY)) >= 0) {
- status = read (i, pbuf, (sizeof pbuf) - 1);
-@@ -888,6 +994,10 @@
-
- log_fatal ("Usage: dhcpd [-p <UDP port #>] [-d] [-f]%s%s%s%s",
- "\n [-cf config-file] [-lf lease-file]",
-+#if defined (PARANOIA)
-+ /* meld into the following string */
-+ "\n [-user user] [-group group] [-chroot dir]"
-+#endif /* PARANOIA */
- #if defined (TRACING)
- "\n [-tf trace-output-file]",
- "\n [-play trace-input-file]",
diff --git a/net-misc/dhcp/files/dhcp-3.0.1-fix-invalid-attribute.patch b/net-misc/dhcp/files/dhcp-3.0.1-fix-invalid-attribute.patch
deleted file mode 100644
index 20efa532620a..000000000000
--- a/net-misc/dhcp/files/dhcp-3.0.1-fix-invalid-attribute.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- includes/dhcpd.h.old 2004-11-10 02:18:44.201012888 -0500
-+++ includes/dhcpd.h 2004-11-10 02:19:11.411876208 -0500
-@@ -306,9 +306,9 @@
- # define EPHEMERAL_FLAGS (MS_NULL_TERMINATION | \
- UNICAST_BROADCAST_HACK)
-
-- binding_state_t __attribute__ ((mode (__byte__))) binding_state;
-- binding_state_t __attribute__ ((mode (__byte__))) next_binding_state;
-- binding_state_t __attribute__ ((mode (__byte__))) desired_binding_state;
-+ binding_state_t binding_state;
-+ binding_state_t next_binding_state;
-+ binding_state_t desired_binding_state;
-
- struct lease_state *state;
-
diff --git a/net-misc/dhcp/files/dhcp-3.0pl2-fix-perms.patch b/net-misc/dhcp/files/dhcp-3.0pl2-fix-perms.patch
deleted file mode 100644
index 13debb20ed0e..000000000000
--- a/net-misc/dhcp/files/dhcp-3.0pl2-fix-perms.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- 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/digest-dhcp-3.0.1 b/net-misc/dhcp/files/digest-dhcp-3.0.1
index 161149e2312c..bc4ece56e94c 100644
--- a/net-misc/dhcp/files/digest-dhcp-3.0.1
+++ b/net-misc/dhcp/files/digest-dhcp-3.0.1
@@ -1 +1,2 @@
MD5 44f72d16a12acc3fbe09703157aa42d2 dhcp-3.0.1.tar.gz 848296
+MD5 d5f2610cff1207633770035b126aea8f dhcp-3-gentoo-1.tar.bz2 2825
diff --git a/net-misc/dhcp/files/digest-dhcp-3.0.1-r1 b/net-misc/dhcp/files/digest-dhcp-3.0.1-r1
index 161149e2312c..bc4ece56e94c 100644
--- a/net-misc/dhcp/files/digest-dhcp-3.0.1-r1
+++ b/net-misc/dhcp/files/digest-dhcp-3.0.1-r1
@@ -1 +1,2 @@
MD5 44f72d16a12acc3fbe09703157aa42d2 dhcp-3.0.1.tar.gz 848296
+MD5 d5f2610cff1207633770035b126aea8f dhcp-3-gentoo-1.tar.bz2 2825
diff --git a/net-misc/dhcp/files/digest-dhcp-3.0.2 b/net-misc/dhcp/files/digest-dhcp-3.0.2
new file mode 100644
index 000000000000..bde8daecd235
--- /dev/null
+++ b/net-misc/dhcp/files/digest-dhcp-3.0.2
@@ -0,0 +1,2 @@
+MD5 04800a111521e7442749b2ce883f962b dhcp-3.0.2.tar.gz 853313
+MD5 d5f2610cff1207633770035b126aea8f dhcp-3-gentoo-1.tar.bz2 2825