summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-02-28 10:38:58 +0000
committerRoy Marples <uberlord@gentoo.org>2006-02-28 10:38:58 +0000
commit57efd4335780d8b7010cf7b4004d1d6970bfa4c3 (patch)
treeeed9e83f0f85f0fc2a80763a63cf1058415d7c33 /net-misc
parentremoved package: bug #121738 (diff)
downloadgentoo-2-57efd4335780d8b7010cf7b4004d1d6970bfa4c3.tar.gz
gentoo-2-57efd4335780d8b7010cf7b4004d1d6970bfa4c3.tar.bz2
gentoo-2-57efd4335780d8b7010cf7b4004d1d6970bfa4c3.zip
Version bump.
3.0.4_beta3 has had the init script and config renamed to dhcpd. The config file has also changed slightly and the new init script can now be fully multiplexed as a result. You *have* to remove the old dhcp init script. (Portage version: 2.1_pre5-r1)
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/dhcp/ChangeLog12
-rw-r--r--net-misc/dhcp/Manifest22
-rw-r--r--net-misc/dhcp/dhcp-3.0.4_beta3.ebuild186
-rw-r--r--net-misc/dhcp/files/dhcpd.conf29
-rw-r--r--net-misc/dhcp/files/dhcpd.init71
-rw-r--r--net-misc/dhcp/files/digest-dhcp-3.0.4_beta33
6 files changed, 312 insertions, 11 deletions
diff --git a/net-misc/dhcp/ChangeLog b/net-misc/dhcp/ChangeLog
index f304ec77fa05..31057eb24938 100644
--- a/net-misc/dhcp/ChangeLog
+++ b/net-misc/dhcp/ChangeLog
@@ -1,6 +1,16 @@
# 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.81 2006/02/24 12:36:44 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.82 2006/02/28 10:38:58 uberlord Exp $
+
+*dhcp-3.0.4_beta3 (28 Feb 2006)
+
+ 28 Feb 2006; Roy Marples <uberlord@gentoo.org> +files/dhcpd.conf,
+ +files/dhcpd.init, +dhcp-3.0.4_beta3.ebuild:
+ Version bump.
+ 3.0.4_beta3 has had the init script and config renamed to dhcpd.
+ The config file has also changed slightly and the new init script can now be
+ fully multiplexed as a result.
+ You *have* to remove the old dhcp init script.
*dhcp-3.0.4_beta2-r2 (24 Feb 2006)
*dhcp-3.0.3-r5 (24 Feb 2006)
diff --git a/net-misc/dhcp/Manifest b/net-misc/dhcp/Manifest
index 73b4ada1c6b5..580cc578068d 100644
--- a/net-misc/dhcp/Manifest
+++ b/net-misc/dhcp/Manifest
@@ -1,6 +1,3 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
MD5 66bd579eae8ab56c79db70b64687ae75 ChangeLog 13733
RMD160 f219105b9d902d72b3ebecfc25723c113f43bf74 ChangeLog 13733
SHA256 03123e3a302fc5920c86ee201cdccac3dc4aa4d400e6aa45ac1b7893ec194151 ChangeLog 13733
@@ -13,6 +10,9 @@ SHA256 ef661a44c1c3c6b82dbf7527b55ee8bd0e1ce4339e701addb5eea5e228b7fb5f dhcp-3.0
MD5 7915c80b308528c55e43b82110fb3a71 dhcp-3.0.4_beta2-r2.ebuild 5381
RMD160 89d101ba94f54736839da5be3036298a40171fb3 dhcp-3.0.4_beta2-r2.ebuild 5381
SHA256 59d379657cdaa22f5e66ccfdb8b85c11953780bb6f10f82cf2e525cd6e76e71d dhcp-3.0.4_beta2-r2.ebuild 5381
+MD5 4f6bdc8db310066cc92e126492d9eb4c dhcp-3.0.4_beta3.ebuild 5639
+RMD160 7c2c1733ec50e7d7765efe688e7f9480fc3ef64c dhcp-3.0.4_beta3.ebuild 5639
+SHA256 49e408107f4af52c88bd1ca953b2396afae0eb52ece12907e7eb53e29abb67e2 dhcp-3.0.4_beta3.ebuild 5639
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
@@ -46,6 +46,12 @@ SHA256 dad532fc00d98edce2da5c1fcce16db42a0084eefc6da00599a7fcfb8faac0f0 files/dh
MD5 a68019721576cb5e96df2d55130c9e9e files/dhcp.init 1530
RMD160 3a26ae62f15a8a3a3c92c68f8afe8bd4d61e9ec2 files/dhcp.init 1530
SHA256 fb142b26646c3b0ffb95001e437658da1caaf82e263b341c3e75a61cb2a6cf57 files/dhcp.init 1530
+MD5 431ad519efb9e00ce6218a3c0962185d files/dhcpd.conf 1093
+RMD160 31e99b1fcc2759c3f86863f549d8ddd974b06d30 files/dhcpd.conf 1093
+SHA256 0f0c2a46bd649cdd4214c2503b6d2b7318a61ac129d6060011232390afdd31b1 files/dhcpd.conf 1093
+MD5 235dafe19f2d95509d3885be5b1bc493 files/dhcpd.init 2091
+RMD160 1332d498fae3fff65c58c647ecfb1e2001742a36 files/dhcpd.init 2091
+SHA256 b44684b4c69ad1bace6c07c587e75cb2ff5a3d706308d8222658acfe5fa92c7e files/dhcpd.init 2091
MD5 7d49ecbe9f433f8c00d1fafe087abb9b files/dhcrelay.conf 408
RMD160 943d64b87699f4c0aa498a425b692fc84af882ea files/dhcrelay.conf 408
SHA256 78cf04d4e32f937bfc658a11492811a0570499481ffc12f2ffb78dc69ca9fad4 files/dhcrelay.conf 408
@@ -61,13 +67,9 @@ SHA256 cbcca1aed82577796a5287973fc78c3d4f5011a7279852b5fdf3e3e368067f14 files/di
MD5 f57c85892cf988656b213b419bf69c55 files/digest-dhcp-3.0.4_beta2-r2 238
RMD160 962392441afe513bad3b200d84203d46b14b8be5 files/digest-dhcp-3.0.4_beta2-r2 238
SHA256 6c5131c539857b1b0105c0b878f70fffe0c4553d484f47cb12b95b5c316c952a files/digest-dhcp-3.0.4_beta2-r2 238
+MD5 b83cbac7552369e722a4c59768363c0d files/digest-dhcp-3.0.4_beta3 238
+RMD160 921c4ec44dad932cdb35ac3659b42581a551fcfd files/digest-dhcp-3.0.4_beta3 238
+SHA256 8cf36e2e9d5c1d147a8635fd156ba84d5ce0d4bad70f85e73b9aafee89c71382 files/digest-dhcp-3.0.4_beta3 238
MD5 436163172942ee1a0bcfb47534a71cce metadata.xml 330
RMD160 216100112bb6a0ffcd8f7779fb876e4a726913fe metadata.xml 330
SHA256 456ab9c26235fa4c1eda6b53b163e901869d5f64ba442b30db1fe86c57fe56af metadata.xml 330
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.2.1 (GNU/Linux)
-
-iD8DBQFEA8kH2+ySkm8kpY0RAh+6AJ9Mk4g0QjG8lUIrBk2O/+uBDEkdNgCgmxsP
-sXM5aFmbzENEYSAHzI+mlc0=
-=gMIC
------END PGP SIGNATURE-----
diff --git a/net-misc/dhcp/dhcp-3.0.4_beta3.ebuild b/net-misc/dhcp/dhcp-3.0.4_beta3.ebuild
new file mode 100644
index 000000000000..807faab5b41a
--- /dev/null
+++ b/net-misc/dhcp/dhcp-3.0.4_beta3.ebuild
@@ -0,0 +1,186 @@
+# 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_beta3.ebuild,v 1.1 2006/02/28 10:38:58 uberlord Exp $
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+MY_PV="${PV//_beta/b}"
+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 ~sparc ~x86"
+IUSE="static selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-dhcp )"
+DEPEND="${RDEPEND}
+ >=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, fixed #63868
+ epatch "${FILESDIR}/${PN}-3.0.3-dhclient-ntp.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"
+
+ # 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
+
+ # Tart up the scripts for Gentoo baselayout
+ local comment="# This script is not called by Gentoo net scripts\n"
+ comment="${comment}# and is inluded purely for reference.\n"
+ comment="${comment}# We do however call /etc/dhcp/dhclient-exit-hooks\n"
+ sed -i -e '1 a '"${comment}" \
+ -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
+ client/scripts/*
+
+ # Remove these options from the sample config as they conflict
+ # with baselayout network scripts
+ sed -i -e "/\(script\|host-name\|domain-name\) / d" client/dhclient.conf
+
+ # 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
+ 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
+
+ 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/dhcpd.conf b/net-misc/dhcp/files/dhcpd.conf
new file mode 100644
index 000000000000..7debb2690c39
--- /dev/null
+++ b/net-misc/dhcp/files/dhcpd.conf
@@ -0,0 +1,29 @@
+# /etc/conf.d/dhcpd: config file for /etc/init.d/dhcpd
+
+# If you require more than one instance of dhcpd you can create symbolic
+# links to dhcpd service like so
+# cd /etc/init.d
+# ln -s dhcpd dhcpd.foo
+# cd ../conf.d
+# cp dhcpd dhcpd.foo
+# Now you can edit dhcpd.foo and specify a different configuration file.
+# You'll also need to specify a pidfile in that dhcpd.conf file.
+# See the pid-file-name option in the dhcpd.conf man page for details.
+
+# If you wish to run dhcpd in a chroot, uncomment the following line
+# DHCPD_CHROOT="/chroot/dhcp"
+
+# Then run emerge dhcpd --config
+# All file paths below are relative to the chroot.
+# You can specify a different chroot directory but MAKE SURE it's empty.
+
+# Specify a configuration file - the default is /etc/dhcp/dhcpd.conf
+# DHCPD_CONF="/etc/dhcp/dhcpd.conf"
+
+# Configure which interface or interfaces to for dhcpd to listen on.
+# List all interfaces space separated. If this is not specified then
+# we listen on all interfaces.
+# DHCPD_IFACE=""
+
+# Insert any other dhcpd options - see the man page for a full list.
+# DHCPD_OPTS=""
diff --git a/net-misc/dhcp/files/dhcpd.init b/net-misc/dhcp/files/dhcpd.init
new file mode 100644
index 000000000000..aed1d1e14177
--- /dev/null
+++ b/net-misc/dhcp/files/dhcpd.init
@@ -0,0 +1,71 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcpd.init,v 1.1 2006/02/28 10:38:58 uberlord Exp $
+
+DHCPD_CONF="/etc/dhcp/dhcpd.conf"
+
+# Work out our cffile if it's on our DHCPD_OPTS
+if [[ " ${DHCPD_OPTS} " == *" -cf "* ]]; then
+ DHCPD_CONF=" ${DHCPD_OPTS} "
+ DHCPD_CONF="${DHCPD_CONF##* -cf }"
+ DHCPD_CONF="${DHCPD_CONF%% *}"
+
+ # Now we have the cffile, we can remove it from our options
+ DHCPD_OPTS="${DHCPD_OPTS//-cf/}"
+ DHCPD_OPTS="${DHCPD_OPTS//${DHCPD_CONF}/}"
+fi
+
+depend() {
+ need net
+ use logger dns
+}
+
+get_var() {
+ sed -n 's/^[[:blank:]]\?'"$1"' "*\([^#";]\+\).*/\1/p' \
+ "${DHCPD_CHROOT}/${DHCPD_CONF}"
+}
+
+start() {
+ if [[ ! -f "${DHCPD_CHROOT}/${DHCPD_CONF}" ]] ; then
+ eerror "${DHCPD_CHROOT}/${DHCPD_CONF} does not exist"
+ return 1
+ fi
+
+ local leasefile="$(get_var lease-file-name)"
+ leasefile="${DHCPD_CHROOT}/${leasefile:-/var/lib/dhcp/dhcpd.leases}"
+ if [[ ! -f ${leasefile} ]] ; then
+ ebegin "Creating ${leasefile}"
+ touch "${leasefile}"
+ chown dhcp:dhcp "${leasefile}"
+ eend $? || return 1
+ fi
+
+ # Setup LD_PRELOAD so name resolution works in our chroot.
+ if [[ -n ${DHCPD_CHROOT} ]] ; then
+ LD_PRELOAD="${LD_PRELOAD} /usr/lib/libresolv.so"
+ export LD_PRELOAD="${LD_PRELOAD} /usr/lib/libnss_dns.so"
+ fi
+
+ local pidfile="$(get_var pid-file-name)"
+ pidfile="${pidfile:-/var/run/dhcp/dhcpd.pid}"
+
+ ebegin "Starting ${DHCPD_CHROOT:+chrooted }${myservice}"
+ start-stop-daemon --start --exec /usr/sbin/dhcpd \
+ --pidfile "${DHCPD_CHROOT}/${pidfile}" \
+ -- ${DHCPD_OPTS} -q -pf "${pidfile}" -cf "${DHCPD_CONF}" \
+ -user dhcp -group dhcp \
+ ${DHCPD_CHROOT:+-chroot} ${DHCPD_CHROOT} ${DHCPD_IFACE}
+ eend $? \
+ && save_options chroot "${DHCPD_CHROOT}" \
+ && save_options pidfile "${pidfile}"
+}
+
+stop() {
+ local chrooted=""
+ [[ -n $(get_options chroot) ]] && chrooted="chrooted "
+ ebegin "Stopping ${chrooted}${myservice}"
+ start-stop-daemon --stop --exec /usr/sbin/dhcpd \
+ --pidfile "$(get_options pidfile)"
+ eend $?
+}
diff --git a/net-misc/dhcp/files/digest-dhcp-3.0.4_beta3 b/net-misc/dhcp/files/digest-dhcp-3.0.4_beta3
new file mode 100644
index 000000000000..f896f9d1f882
--- /dev/null
+++ b/net-misc/dhcp/files/digest-dhcp-3.0.4_beta3
@@ -0,0 +1,3 @@
+MD5 560bd40eae9577eeacbdf2751651f4af dhcp-3.0.4b3.tar.gz 881727
+RMD160 2a696a2d83f89731481a94a0e569650ef069651e dhcp-3.0.4b3.tar.gz 881727
+SHA256 2e0b79b6dfbb2b686ccef0d48340865de7e4fea09286b097911639a922d289bc dhcp-3.0.4b3.tar.gz 881727