summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-02-23 16:21:24 +0000
committerRoy Marples <uberlord@gentoo.org>2006-02-23 16:21:24 +0000
commit3e1e0527bcdd1c780d860a79388d610d40b686b4 (patch)
treecba7a1aab994502f731b9fb39924eddcac3f271e /net-misc
parentfix bug #82449 (diff)
downloadhistorical-3e1e0527bcdd1c780d860a79388d610d40b686b4.tar.gz
historical-3e1e0527bcdd1c780d860a79388d610d40b686b4.tar.bz2
historical-3e1e0527bcdd1c780d860a79388d610d40b686b4.zip
Bump for a new init script that fixes non chroots, #123813.
Package-Manager: portage-2.1_pre4-r1
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/dhcp/ChangeLog8
-rw-r--r--net-misc/dhcp/Manifest24
-rw-r--r--net-misc/dhcp/dhcp-3.0.3-r4.ebuild146
-rw-r--r--net-misc/dhcp/files/dhcp.init8
-rw-r--r--net-misc/dhcp/files/digest-dhcp-3.0.3-r43
5 files changed, 175 insertions, 14 deletions
diff --git a/net-misc/dhcp/ChangeLog b/net-misc/dhcp/ChangeLog
index 386394daa0c4..015f18a66223 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.79 2006/02/23 07:20:45 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.80 2006/02/23 16:21:23 uberlord Exp $
+
+*dhcp-3.0.3-r4 (23 Feb 2006)
+
+ 23 Feb 2006; Roy Marples <uberlord@gentoo.org> files/dhcp.init,
+ +dhcp-3.0.3-r4.ebuild:
+ Bump for a new init script that fixes non chroots, #123813.
*dhcp-3.0.3-r3 (23 Feb 2006)
diff --git a/net-misc/dhcp/Manifest b/net-misc/dhcp/Manifest
index 83c5ea1c88c6..4f4c8791ba0e 100644
--- a/net-misc/dhcp/Manifest
+++ b/net-misc/dhcp/Manifest
@@ -1,12 +1,15 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-MD5 2a79d02dd5446e8e8645357d3fdc69ab ChangeLog 13154
-RMD160 c93bc26c24a942ce6bbbae7874ae40cdd9e37106 ChangeLog 13154
-SHA256 6f10290a1422bebd0db8408716e0a405984d9f3a0a7fa0f234287878c4d23b18 ChangeLog 13154
+MD5 714ab0f4105f064572837ec0449cb14e ChangeLog 13338
+RMD160 06406acf9e9395481841e8c41876249f1581a6fc ChangeLog 13338
+SHA256 335962d11429367cc95fe7cae1d66154a87c74058aea097f8750861345246faa ChangeLog 13338
MD5 2c730f102a47cc864510e6b45a44b586 dhcp-3.0.3-r3.ebuild 4079
RMD160 d7f7bec731021e7bc538d46fa7bcef0f2425245a dhcp-3.0.3-r3.ebuild 4079
SHA256 42047556faea8ad3c1e53779a80096ad3a07577a6d0cf79b588b32a4fef3a1bd dhcp-3.0.3-r3.ebuild 4079
+MD5 aa97dcfc61d3a48b9a13b8c8a8ffecb2 dhcp-3.0.3-r4.ebuild 4079
+RMD160 37f736c35482d89b90cd861c2c532ad8b5d9798d dhcp-3.0.3-r4.ebuild 4079
+SHA256 75583cb8a1b1b04b413eb11c3770005c32b1364f789d9451c3f5c11ebfedf039 dhcp-3.0.3-r4.ebuild 4079
MD5 94560e49876791ae073ee7ae5b6e6ef5 dhcp-3.0.4_beta2-r1.ebuild 5302
RMD160 5a58aeee6b7d1faff518a4ed75ae572b751d20aa dhcp-3.0.4_beta2-r1.ebuild 5302
SHA256 c9c88313e7f58245f46850e2541c6ba618d334de0331485c97726dc25e18d3d6 dhcp-3.0.4_beta2-r1.ebuild 5302
@@ -34,9 +37,9 @@ SHA256 05f81ad7c0e8cd2d2f3e81c0cd1aecc0f2a2787672037eca87e66a814150f5c8 files/dh
MD5 0ab9c8e1c34a43a23d47d9649cd3ddcf files/dhcp.conf 792
RMD160 7c4ffbe4f47f4fad210c48eb4f92ee15cf651f72 files/dhcp.conf 792
SHA256 dad532fc00d98edce2da5c1fcce16db42a0084eefc6da00599a7fcfb8faac0f0 files/dhcp.conf 792
-MD5 9046fe7b55b9f48599de9d9d995b9386 files/dhcp.init 1529
-RMD160 bb44d9c3a5e7227f26a1902c213a5a580f3a1da1 files/dhcp.init 1529
-SHA256 ff559ccacfabacfff73e300b17fc5d851f999932b9fe667be09649934ad404cf files/dhcp.init 1529
+MD5 a68019721576cb5e96df2d55130c9e9e files/dhcp.init 1530
+RMD160 3a26ae62f15a8a3a3c92c68f8afe8bd4d61e9ec2 files/dhcp.init 1530
+SHA256 fb142b26646c3b0ffb95001e437658da1caaf82e263b341c3e75a61cb2a6cf57 files/dhcp.init 1530
MD5 7d49ecbe9f433f8c00d1fafe087abb9b files/dhcrelay.conf 408
RMD160 943d64b87699f4c0aa498a425b692fc84af882ea files/dhcrelay.conf 408
SHA256 78cf04d4e32f937bfc658a11492811a0570499481ffc12f2ffb78dc69ca9fad4 files/dhcrelay.conf 408
@@ -46,6 +49,9 @@ SHA256 0d16910b1197946165da7812acffecef8ee3b31cdf8f9a596ca6ecb19756fcee files/dh
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 414325430622f5011079cd7fd5517485 files/digest-dhcp-3.0.3-r4 232
+RMD160 a8cec86f840528ab049182c2d0f0768d7eaa03dc files/digest-dhcp-3.0.3-r4 232
+SHA256 cbcca1aed82577796a5287973fc78c3d4f5011a7279852b5fdf3e3e368067f14 files/digest-dhcp-3.0.3-r4 232
MD5 f57c85892cf988656b213b419bf69c55 files/digest-dhcp-3.0.4_beta2-r1 238
RMD160 962392441afe513bad3b200d84203d46b14b8be5 files/digest-dhcp-3.0.4_beta2-r1 238
SHA256 6c5131c539857b1b0105c0b878f70fffe0c4553d484f47cb12b95b5c316c952a files/digest-dhcp-3.0.4_beta2-r1 238
@@ -55,7 +61,7 @@ SHA256 456ab9c26235fa4c1eda6b53b163e901869d5f64ba442b30db1fe86c57fe56af metadata
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)
-iD8DBQFD/bLYEbVyYKaZ/NERAuyYAKCMQ5/4F9sCc1CwQx2hF7Y5quaRgwCfQ6xd
-QQDR7AsZU3OQMWq+RZU5Vhg=
-=+9HM
+iD8DBQFD/eEdEbVyYKaZ/NERAp4hAJ41y09GwukbBbiWmNWlsAtXNuqpVgCaA/QH
+u6rYDHVwKPzI/hakpBDM58w=
+=cy/w
-----END PGP SIGNATURE-----
diff --git a/net-misc/dhcp/dhcp-3.0.3-r4.ebuild b/net-misc/dhcp/dhcp-3.0.3-r4.ebuild
new file mode 100644
index 000000000000..46015bbce375
--- /dev/null
+++ b/net-misc/dhcp/dhcp-3.0.3-r4.ebuild
@@ -0,0 +1,146 @@
+# 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-r4.ebuild,v 1.1 2006/02/23 16:21:24 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}"
+
+ # 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"
+
+ # General fixes which will probably be accepted upstream eventually
+ # 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"
+
+ # 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 271556970b3d..cbbca9e29830 100644
--- a/net-misc/dhcp/files/dhcp.init
+++ b/net-misc/dhcp/files/dhcp.init
@@ -1,7 +1,7 @@
#!/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/dhcp.init,v 1.5 2006/02/23 11:13:03 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcp.init,v 1.6 2006/02/23 16:21:24 uberlord Exp $
depend() {
need net
@@ -32,20 +32,20 @@ start() {
[[ -n ${LD_PRELOAD} ]] && export LD_PRELOAD="${LD_PRELOAD}"
local pidfile="$(get_var pid-file-name)"
- pidfile="${pidfile:-/var/run/dhcp/dhcp.pid}"
+ pidfile="${pidfile:-/var/run/dhcp/dhcpd.pid}"
ebegin "Starting ${CHROOT:+chrooted }dhcpd"
start-stop-daemon --start --exec /usr/sbin/dhcpd \
--pidfile "${CHROOT}/${pidfile}" \
-- -q -pf "${pidfile}" \
-user dhcp -group dhcp ${DHCPD_OPTS} \
- ${CHROOT:+-chroot} "${CHROOT}" ${IFACE}
+ ${CHROOT:+-chroot} ${CHROOT} ${IFACE}
eend $? && save_options pidfile "${CHROOT}/${pidfile}"
}
stop() {
local pidfile="$(get_options pidfile)" chrooted=""
- [[ ${pidfile} != /var/run/dhcp/dhcp.pid ]] && chrooted="chrooted "
+ [[ ${pidfile} != //var/run/dhcp/dhcpd.pid ]] && chrooted="chrooted "
ebegin "Stopping ${chrooted}dhcpd"
start-stop-daemon --stop --exec /usr/sbin/dhcpd \
--pidfile "${pidfile}"
diff --git a/net-misc/dhcp/files/digest-dhcp-3.0.3-r4 b/net-misc/dhcp/files/digest-dhcp-3.0.3-r4
new file mode 100644
index 000000000000..bfdf4cb56303
--- /dev/null
+++ b/net-misc/dhcp/files/digest-dhcp-3.0.3-r4
@@ -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