summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-02-23 07:20:45 +0000
committerRoy Marples <uberlord@gentoo.org>2006-02-23 07:20:45 +0000
commit19a01ecf4067d4cd07a098895a2f5970fc91062b (patch)
treea791b02af3a2f7e07acaf761bcf0846815672f8e /net-misc
parent1.11.14-r3 to stable amd64,x86 (diff)
downloadgentoo-2-19a01ecf4067d4cd07a098895a2f5970fc91062b.tar.gz
gentoo-2-19a01ecf4067d4cd07a098895a2f5970fc91062b.tar.bz2
gentoo-2-19a01ecf4067d4cd07a098895a2f5970fc91062b.zip
Bump for new init script which fixes CHROOT handling, #122805.
(Portage version: 2.1_pre4-r1)
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/dhcp/ChangeLog8
-rw-r--r--net-misc/dhcp/Manifest28
-rw-r--r--net-misc/dhcp/dhcp-3.0.3-r3.ebuild144
-rw-r--r--net-misc/dhcp/files/dhcp.init26
-rw-r--r--net-misc/dhcp/files/digest-dhcp-3.0.3-r33
5 files changed, 180 insertions, 29 deletions
diff --git a/net-misc/dhcp/ChangeLog b/net-misc/dhcp/ChangeLog
index a3f4e233bdba..386394daa0c4 100644
--- a/net-misc/dhcp/ChangeLog
+++ b/net-misc/dhcp/ChangeLog
@@ -1,6 +1,12 @@
# 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.78 2006/02/18 11:59:19 blubb Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.79 2006/02/23 07:20:45 uberlord Exp $
+
+*dhcp-3.0.3-r3 (23 Feb 2006)
+
+ 23 Feb 2006; Roy Marples <uberlord@gentoo.org> files/dhcp.init,
+ +dhcp-3.0.3-r3.ebuild:
+ Bump for new init script which fixes CHROOT handling, #122805.
18 Feb 2006; Simon Stelling <blubb@gentoo.org> ChangeLog:
stable on amd64
diff --git a/net-misc/dhcp/Manifest b/net-misc/dhcp/Manifest
index 39a517866aa2..8fc4e6492791 100644
--- a/net-misc/dhcp/Manifest
+++ b/net-misc/dhcp/Manifest
@@ -1,12 +1,12 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 5c265346f336a879e90f92c4355a1f89 ChangeLog 12964
-RMD160 e6ae469cc9e06eb589dcfa33f420268e3d438610 ChangeLog 12964
-SHA256 cddbfbabadadd062034b207d4ace4d16436e75f8c63f95aa4733c8e8cf9764c4 ChangeLog 12964
+MD5 b943e7aee83e0b45d41b21ac634ff478 ChangeLog 13151
+RMD160 1feda5d83588fd39c49bddf6092612ebd689b285 ChangeLog 13151
+SHA256 1f290855b8de9ab0bfbd346e369b6404040107203c76616b32a962ff33684391 ChangeLog 13151
MD5 ebdb7174bde371325f0b29b95618ca1c dhcp-3.0.3-r2.ebuild 3921
RMD160 f4664d42727f58e351bd5621f1f7e6afb630c69d dhcp-3.0.3-r2.ebuild 3921
SHA256 72d16fd1ccf5cb0fcc78862c676d307be249cda2ec2c4eb314844988c3cb8de8 dhcp-3.0.3-r2.ebuild 3921
+MD5 ebdb7174bde371325f0b29b95618ca1c dhcp-3.0.3-r3.ebuild 3921
+RMD160 f4664d42727f58e351bd5621f1f7e6afb630c69d dhcp-3.0.3-r3.ebuild 3921
+SHA256 72d16fd1ccf5cb0fcc78862c676d307be249cda2ec2c4eb314844988c3cb8de8 dhcp-3.0.3-r3.ebuild 3921
MD5 1c4c0f658fedde16e4db202ca69111ea dhcp-3.0.4_beta2-r1.ebuild 5133
RMD160 d36ab1801e793bf396f5cef8f027413054bc90b0 dhcp-3.0.4_beta2-r1.ebuild 5133
SHA256 f9c931f333f3950461877069f4133270bb71ec7e38eead2be428c6b10d8fddf0 dhcp-3.0.4_beta2-r1.ebuild 5133
@@ -34,9 +34,9 @@ SHA256 05f81ad7c0e8cd2d2f3e81c0cd1aecc0f2a2787672037eca87e66a814150f5c8 files/dh
MD5 0ab9c8e1c34a43a23d47d9649cd3ddcf files/dhcp.conf 792
RMD160 7c4ffbe4f47f4fad210c48eb4f92ee15cf651f72 files/dhcp.conf 792
SHA256 dad532fc00d98edce2da5c1fcce16db42a0084eefc6da00599a7fcfb8faac0f0 files/dhcp.conf 792
-MD5 8dde07d126b5d50723a176ba1591ad66 files/dhcp.init 1411
-RMD160 1b23ed39456afabf035859213d34fc3d1d3f2db8 files/dhcp.init 1411
-SHA256 57e8dd84c36bd1b02d362e58f901ff19b0397378a290dc306eb57bf40807aa55 files/dhcp.init 1411
+MD5 b9757ec6cc827db4b20be514cdd1c47a files/dhcp.init 1527
+RMD160 249980f1f4c467608dd6cffe04e4df8f0a2b7910 files/dhcp.init 1527
+SHA256 84e5ce88dc6623d9f55b250386bbbae2764a2d1b001a1f68ac8775b5091c6e05 files/dhcp.init 1527
MD5 7d49ecbe9f433f8c00d1fafe087abb9b files/dhcrelay.conf 408
RMD160 943d64b87699f4c0aa498a425b692fc84af882ea files/dhcrelay.conf 408
SHA256 78cf04d4e32f937bfc658a11492811a0570499481ffc12f2ffb78dc69ca9fad4 files/dhcrelay.conf 408
@@ -46,16 +46,12 @@ SHA256 0d16910b1197946165da7812acffecef8ee3b31cdf8f9a596ca6ecb19756fcee files/dh
MD5 c6df78cb1777bebada64f9c629b9f8eb files/digest-dhcp-3.0.3-r2 62
RMD160 31f99ba53088ec97602f4b74f2bb0e3c96a543b3 files/digest-dhcp-3.0.3-r2 62
SHA256 d2e73249481e7821a1c4362f4e9cc744a59ff02070cfc9769d3d6e810685f12f files/digest-dhcp-3.0.3-r2 62
+MD5 414325430622f5011079cd7fd5517485 files/digest-dhcp-3.0.3-r3 232
+RMD160 a8cec86f840528ab049182c2d0f0768d7eaa03dc files/digest-dhcp-3.0.3-r3 232
+SHA256 cbcca1aed82577796a5287973fc78c3d4f5011a7279852b5fdf3e3e368067f14 files/digest-dhcp-3.0.3-r3 232
MD5 be9ba2d7afab9b446197c45fe60d02bc files/digest-dhcp-3.0.4_beta2-r1 64
RMD160 77a47e595819c31b49d0ab095d0967bf636d0db6 files/digest-dhcp-3.0.4_beta2-r1 64
SHA256 ae82dd2ded9110d42dbff452b350a0305872e6237b5506f07a8f0c188fcbe462 files/digest-dhcp-3.0.4_beta2-r1 64
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)
-
-iD8DBQFD/GNkEbVyYKaZ/NERAvLvAKCQ1JNvmjA5RdNv6Ak4eDZkIA8ckgCaAh5J
-+IUc/QRUQxB1tlpQGojHLnA=
-=MBJX
------END PGP SIGNATURE-----
diff --git a/net-misc/dhcp/dhcp-3.0.3-r3.ebuild b/net-misc/dhcp/dhcp-3.0.3-r3.ebuild
new file mode 100644
index 000000000000..6aaf9bd3393c
--- /dev/null
+++ b/net-misc/dhcp/dhcp-3.0.3-r3.ebuild
@@ -0,0 +1,144 @@
+# 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-r3.ebuild,v 1.1 2006/02/23 07:20:45 uberlord Exp $
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="ISC Dynamic Host Configuration Protocol"
+HOMEPAGE="http://www.isc.org/products/DHCP"
+SRC_URI="ftp://ftp.isc.org/isc/dhcp/${P}.tar.gz"
+
+LICENSE="isc-dhcp"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa mips ppc ppc64 s390 sh sparc x86"
+IUSE="static selinux"
+
+RDEPEND="virtual/libc
+ selinux? ( sec-policy/selinux-dhcp )"
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4"
+
+PROVIDE="virtual/dhcpc"
+
+src_unpack() {
+ unpack "${A}"
+ cd "${S}"
+
+ # Enable chroot
+ epatch "${FILESDIR}/${PN}-3.0-paranoia.patch"
+ # Fix some permission issues
+ epatch "${FILESDIR}/${PN}-3.0-fix-perms.patch"
+ # Fix token ring compiling, #102473
+ epatch "${FILESDIR}/${P}-tr.patch"
+ # Install libdst, #75544
+ epatch "${FILESDIR}/${P}-libdst.patch"
+ # Fix building on Gentoo/FreeBSD
+ epatch "${FILESDIR}/${PN}-3.0.2-gmake.patch"
+
+ # Enable dhclient to equery NTP servers, fixed #63868
+ epatch "${FILESDIR}/dhclient-ntp.patch"
+
+ # FreeBSD doesn't like -Werror that is forced on
+ sed -i -e 's:-Werror::' Makefile.conf
+}
+
+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}/dhcp.init" dhcp
+ newinitd "${FILESDIR}/dhcrelay.init" 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,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 would like to run dhcpd in a chroot, simply configure the"
+ einfo "CHROOT directory in /etc/conf.d/dhcp and then run:"
+ einfo " emerge --config =${PF}"
+ echo
+}
+
+pkg_config() {
+ CHROOT="$(
+ sed -n 's/^[[:blank:]]\?CHROOT="*\([^#"]\+\)"*/\1/p' \
+ /etc/conf.d/dhcp
+ )"
+
+ if [[ -z ${CHROOT} ]]; then
+ eerror "CHROOT not defined in /etc/conf.d/dhcp"
+ 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 DHCP server, configure your"
+ einfo "logger (${logger}) to listen on ${CHROOT}/dev/log"
+}
diff --git a/net-misc/dhcp/files/dhcp.init b/net-misc/dhcp/files/dhcp.init
index 0bae98099e47..abe9bb20307e 100644
--- a/net-misc/dhcp/files/dhcp.init
+++ b/net-misc/dhcp/files/dhcp.init
@@ -1,7 +1,7 @@
#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
+# 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/dhcp.init,v 1.3 2005/12/14 20:30:19 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcp.init,v 1.4 2006/02/23 07:20:45 uberlord Exp $
depend() {
need net
@@ -9,7 +9,7 @@ depend() {
}
get_var() {
- sed -n 's/^[[:blank:]]\?'"$1"' "*\([^#"]\+\)"*/\1/p' \
+ sed -n 's/^[[:blank:]]\?'"$1"' "*\([^#";]\+\).*/\1/p' \
"${CHROOT}/etc/dhcp/dhcpd.conf"
}
@@ -19,8 +19,8 @@ start() {
return 1
fi
- local leasefile=$(get_var lease-file-name)
- leasefile="${leasefile:-${CHROOT}/var/lib/dhcp/dhcpd.leases}"
+ local leasefile="$(get_var lease-file-name)"
+ leasefile="${CHROOT}/${leasefile:-/var/lib/dhcp/dhcpd.leases}"
if [[ ! -f ${leasefile} ]] ; then
ebegin "Creating ${leasefile}"
touch "${leasefile}"
@@ -35,17 +35,19 @@ start() {
pidfile="${pidfile:-/var/run/dhcp/dhcp.pid}"
ebegin "Starting ${CHROOT:+chrooted }dhcpd"
- eval start-stop-daemon --start --exec /usr/sbin/dhcpd \
- --pidfile "${CHROOT}${pidfile}" \
+ start-stop-daemon --start --exec /usr/sbin/dhcpd \
+ --pidfile "${CHROOT}/${pidfile}" \
-- -q -pf "${pidfile}" \
- -user dhcp -group dhcp "${DHCPD_OPTS}" \
- ${CHROOT:+-chroot "${CHROOT}"} "${IFACE}"
- eend $? && save_options pidfile "${CHROOT}${pidfile}"
+ -user dhcp -group dhcp ${DHCPD_OPTS} \
+ ${CHROOT:+-chroot} "${CHROOT}" ${IFACE}
+ eend $? && save_options pidfile "${CHROOT}/${pidfile}"
}
stop() {
- ebegin "Stopping dhcpd"
+ local pidfile="$(get_options pidfile)" chrooted=""
+ [[ ${pidfile} != /var/run/dhcp/dhcp.pid ]] && chrooted="chrooted "
+ ebegin "Stopping ${chrooted}dhcpd"
start-stop-daemon --stop --exec /usr/sbin/dhcpd \
- --pidfile "$(get_options pidfile)"
+ --pidfile "${pidfile}"
eend $?
}
diff --git a/net-misc/dhcp/files/digest-dhcp-3.0.3-r3 b/net-misc/dhcp/files/digest-dhcp-3.0.3-r3
new file mode 100644
index 000000000000..bfdf4cb56303
--- /dev/null
+++ b/net-misc/dhcp/files/digest-dhcp-3.0.3-r3
@@ -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