Version bump
authorRoy Marples <uberlord@gentoo.org>
Wed, 12 Oct 2005 16:53:02 +0000 (16:53 +0000)
committerRoy Marples <uberlord@gentoo.org>
Wed, 12 Oct 2005 16:53:02 +0000 (16:53 +0000)
  Includes fixes for #102473 (tr.c not compiling)
  and dhclient ntp support #63868
Package-Manager: portage-2.0.51.22-r3

net-misc/dhcp/ChangeLog
net-misc/dhcp/Manifest
net-misc/dhcp/dhcp-3.0.3.ebuild [new file with mode: 0644]
net-misc/dhcp/files/dhclient-ntp.patch [new file with mode: 0644]
net-misc/dhcp/files/dhcp-3.0.3-tr.patch [new file with mode: 0644]
net-misc/dhcp/files/digest-dhcp-3.0.3 [new file with mode: 0644]

index 6dbd8b242327f3b799fa7f304fdeb2e7b9417755..d7791f17a289733a7d523cb00e8cfae0da7332ee 100644 (file)
@@ -1,6 +1,14 @@
 # ChangeLog for net-misc/dhcp
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.57 2005/09/16 02:56:03 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.58 2005/10/12 16:53:02 uberlord Exp $
+
+*dhcp-3.0.3 (12 Oct 2005)
+
+  12 Oct 2005; Roy Marples <uberlord@gentoo.org> +files/dhcp-3.0.3-tr.patch,
+  +files/dhclient-ntp.patch, +dhcp-3.0.3.ebuild:
+  Version bump
+  Includes fixes for #102473 (tr.c not compiling)
+  and dhclient ntp support #63868
 
   15 Sep 2005; Aron Griffis <agriffis@gentoo.org> dhcp-3.0.1-r1.ebuild:
   Mark 3.0.1-r1 stable on alpha
index f22a41d47603224e59b6490b4ec6a3cc9dcf06d1..765288aafcc1c9fcccc233820f773dab40b8209b 100644 (file)
@@ -1,11 +1,15 @@
+MD5 71e122d4e37182a63828d1fcae80b2e0 dhcp-3.0.1-r1.ebuild 3993
 MD5 9384ae7ba3e9f56b8027ea92f607042d metadata.xml 215
-MD5 80cbbae2e41debbd3275561ccbe1da05 ChangeLog 9531
+MD5 b8e81fe9040b932b6c443a2ce048d881 ChangeLog 9784
+MD5 a01c944994028d0ae8f238d38f72b608 dhcp-3.0.3.ebuild 4403
 MD5 fd2864f5391129944f46c46c99fd1560 dhcp-3.0.2.ebuild 4135
-MD5 71e122d4e37182a63828d1fcae80b2e0 dhcp-3.0.1-r1.ebuild 3993
-MD5 5cde0a8fdf363490c4212726dfd06a38 files/dhcp.conf 769
-MD5 323228061719fcac86be97a1a25d23b6 files/digest-dhcp-3.0.1-r1 128
 MD5 6c69efa2b41915ec59e53bb065ac3d0c files/dhcrelay.conf 502
+MD5 fed4fe3fa59701ea010193e45aa907be files/digest-dhcp-3.0.3 128
+MD5 2421c68dfdeec65048f1a97cbee1f4ca files/dhclient-ntp.patch 168
 MD5 81b9256728a5daab31f0513ab55e8354 files/dhcp.rc6 1092
+MD5 ce6d18eef914ac8a39b0cb1bc4d63de2 files/dhcp-3.0.3-tr.patch 377
+MD5 5cde0a8fdf363490c4212726dfd06a38 files/dhcp.conf 769
+MD5 323228061719fcac86be97a1a25d23b6 files/digest-dhcp-3.0.1-r1 128
 MD5 b060506f226297b90435f270b7345496 files/digest-dhcp-3.0.2 128
 MD5 d0f61288e81ce020573f3f6965af8489 files/dhcp-3.0.2-gmake.patch 1872
 MD5 8a19dd005c33231e02c03659f0c658df files/dhcrelay.rc6 626
diff --git a/net-misc/dhcp/dhcp-3.0.3.ebuild b/net-misc/dhcp/dhcp-3.0.3.ebuild
new file mode 100644 (file)
index 0000000..0d878c7
--- /dev/null
@@ -0,0 +1,154 @@
+# 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.3.ebuild,v 1.1 2005/10/12 16:53:02 uberlord 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"
+
+
+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"
+       # 3.0.3 already has this patch
+       rm -f "${PATCHDIR}/003_all_dhcp-3.0.1-fix-invalid-attribute.patch"
+       epatch ${PATCHDIR}
+
+       has noman ${FEATURES} && sed -i 's:nroff:echo:' */Makefile.dist
+
+       # Enable dhclient to equery NTP servers, fixed #63868
+       epatch "${FILESDIR}/dhclient-ntp.patch"
+
+       # Fix token ring compiling
+       epatch "${FILESDIR}/${P}-tr.patch"
+
+       # FreeBSD doesn't like -Werror that is forced on
+       sed -i -e 's:-Werror::' Makefile.conf
+
+       epatch ${FILESDIR}/${PN}-3.0.2-gmake.patch
+}
+
+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 -1 /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/dhclient-ntp.patch b/net-misc/dhcp/files/dhclient-ntp.patch
new file mode 100644 (file)
index 0000000..2c989b7
--- /dev/null
@@ -0,0 +1,9 @@
+--- isc-dhcp/client/clparse.c
++++ isc-dhcp/client/clparse.c
+@@ -63,6 +63,7 @@
+       DHO_DOMAIN_NAME,
+       DHO_DOMAIN_NAME_SERVERS,
+       DHO_HOST_NAME,
++      DHO_NTP_SERVERS,
+       0
+ };
diff --git a/net-misc/dhcp/files/dhcp-3.0.3-tr.patch b/net-misc/dhcp/files/dhcp-3.0.3-tr.patch
new file mode 100644 (file)
index 0000000..2a2957b
--- /dev/null
@@ -0,0 +1,12 @@
+--- work.linux-2.2/common/tr.c 2005/08/14 11:34:24     1.1
++++ work.linux-2.2/common/tr.c 2005/08/14 11:35:16
+@@ -40,6 +40,9 @@ static char copyright[] =
+ #include "includes/netinet/if_ether.h"
+ #include "netinet/if_tr.h"
+ #include <sys/time.h>
++#ifdef __linux__
++#include <linux/types.h>
++#endif
+ 
+ /*
+  * token ring device handling subroutines.  These are required as token-ring
diff --git a/net-misc/dhcp/files/digest-dhcp-3.0.3 b/net-misc/dhcp/files/digest-dhcp-3.0.3
new file mode 100644 (file)
index 0000000..c0c8429
--- /dev/null
@@ -0,0 +1,2 @@
+MD5 f91416a0b8ed3fd0601688cf0b7df58f dhcp-3.0.3.tar.gz 870240
+MD5 d5f2610cff1207633770035b126aea8f dhcp-3-gentoo-1.tar.bz2 2825