summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2010-10-15 05:15:23 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2010-10-15 05:15:23 +0000
commit4afe1b5183f1398049b2d9c85ef3875634e1f86a (patch)
treee449a558fd4bda4df85ea0c424bace7b2e3ac934 /net-misc
parentBug #324671: Add dhcpd-3.1.3 (diff)
downloadhistorical-4afe1b5183f1398049b2d9c85ef3875634e1f86a.tar.gz
historical-4afe1b5183f1398049b2d9c85ef3875634e1f86a.tar.bz2
historical-4afe1b5183f1398049b2d9c85ef3875634e1f86a.zip
Upstream final 3.1 release: 3.1-ESV. In Gentoo as 3.1.3_p1 since we need it to come after 3.1.3.
Package-Manager: portage-2.2_rc92/cvs/Linux x86_64
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/dhcp/ChangeLog8
-rw-r--r--net-misc/dhcp/Manifest4
-rw-r--r--net-misc/dhcp/dhcp-3.1.3_p1.ebuild248
3 files changed, 258 insertions, 2 deletions
diff --git a/net-misc/dhcp/ChangeLog b/net-misc/dhcp/ChangeLog
index acb86731152f..080b3762fcee 100644
--- a/net-misc/dhcp/ChangeLog
+++ b/net-misc/dhcp/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-misc/dhcp
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.166 2010/10/15 05:09:43 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.167 2010/10/15 05:15:23 robbat2 Exp $
+
+*dhcp-3.1.3_p1 (15 Oct 2010)
+
+ 15 Oct 2010; Robin H. Johnson <robbat2@gentoo.org> +dhcp-3.1.3_p1.ebuild:
+ Upstream final 3.1 release: 3.1-ESV. In Gentoo as 3.1.3_p1 since we need
+ it to come after 3.1.3.
*dhcp-3.1.3 (15 Oct 2010)
diff --git a/net-misc/dhcp/Manifest b/net-misc/dhcp/Manifest
index 013095068433..d31fd2123066 100644
--- a/net-misc/dhcp/Manifest
+++ b/net-misc/dhcp/Manifest
@@ -36,6 +36,7 @@ AUX dhcpd.init 1989 RMD160 7f6b6858020100e47efa5d6a0809b2959e551249 SHA1 2c611ad
AUX dhcpd.init2 2421 RMD160 baa01ae97b227edba7653cd51735613be2dac652 SHA1 f2068ceb2d79d7992f46b31e6a6e3277a0167dce SHA256 fef93e5a7264780044a977ade27e9cc70de824063791bcd07d3db81c11c16df5
AUX dhcrelay.conf 421 RMD160 456edbc9bcc8d3a44db5bb6dbf0c3003c3e7419c SHA1 78ecdb000382893fb49d0052ced063955b0ad9cf SHA256 409b895ed489e75c1a08f72961b45d641b93fd9357f528abc78b1fd036b7f730
AUX dhcrelay.init 736 RMD160 04566b87bd6dbb8bb754b26409ca30b878ef3ca3 SHA1 72742b308314b2e1476b27e94212fbf4d179adc4 SHA256 cfdaff3a723be3935d06c14e171d4008f2ad3329bd05ac2e49c19bc0e14bc59c
+DIST dhcp-3.1-ESV.tar.gz 797454 RMD160 c6a8d943240dde72d47bb9bfbd740ff6e68ceee9 SHA1 e1cce81ead844fbdaf7ad99ba1146efa0b8b72c0 SHA256 e316b7dc34f05e38724273a473f823719281f229a71a80bc358f8e74687fd7d7
DIST dhcp-3.1.1.tar.gz 798228 RMD160 08ed15d26ca64928e1d3b07c631cbbfa9a3dc8cb SHA1 3f7e013cb62aed0f3af45bdd97424d8b63e9c280 SHA256 129024c7545e3e8d37e75cd5d534b50c53955592c4935189a57916e216355f6d
DIST dhcp-3.1.2.tar.gz 799626 RMD160 026ac48b176ec273397fafa8a834a21fd6331681 SHA1 a60cccec2402a35025ddaafc8ac896595188560e SHA256 80daba1e4ac220a0945778aa3c1c9eb7860c4426645660bebb8ed35a3231a2fb
DIST dhcp-3.1.2p1.tar.gz 792355 RMD160 53434f8404c69e8e113cad030ec975cf13b467cc SHA1 730214fa6e70d187f1492aa3d4f1c2868ffcc8de SHA256 e0cb405e0fef0ecebec7aaed294032a06178ff28be87498596e6069ccda4341e
@@ -47,7 +48,8 @@ EBUILD dhcp-3.1.1.ebuild 7430 RMD160 33dd30be2b4e210493421f4a50767f81ec7edb29 SH
EBUILD dhcp-3.1.2.ebuild 7470 RMD160 ce4c0c3c3122040ca19103c37981444a1429c160 SHA1 dca8a1670ffb298c32089ca58bfdc4019f3a357e SHA256 40e5f159eff7a142f64d2511d06536bd97e46170cf371d9ad2ebd9c74d61b02f
EBUILD dhcp-3.1.2_p1.ebuild 7606 RMD160 4a092fb0f8337065432ad475193633dca2b381e1 SHA1 e883fef011969302fad6ede0977cb6e1a8387dc7 SHA256 765bcec429ccff09c85b0e466da0673813ed4440cdf31c316698e798892dc37d
EBUILD dhcp-3.1.3.ebuild 7697 RMD160 e30124e79caf736ad90aa90d91e23d7a0c193041 SHA1 d80cc702b12b017a1e17b363c12c103700cdd128 SHA256 36b770e0d9d337567144df45393f049f67a57ecbb08dd9d1361b27a88ab6d5a0
+EBUILD dhcp-3.1.3_p1.ebuild 7772 RMD160 745ce5aa7dee055263c9518585c3c0b1bdfd54a8 SHA1 e19623ad15676759b79b50d103e72dd9ea3f6312 SHA256 9f82707e790928beef947dc872a10698d6ed60838a63d616c8cb0d97d2ade5cd
EBUILD dhcp-4.0.1.ebuild 6744 RMD160 dcd9eb3251fdeb283b9ef285cc63b7253dcf01c9 SHA1 c3f78ed12faf8924e43cb35cfc81f9096ede35f5 SHA256 68f9a416ba63c1403265c12a42d86b10e6d0aca3591e85d6beb419c082e433de
EBUILD dhcp-4.1.0.ebuild 6703 RMD160 095f3abdab681e9ad7fd6820e159d295eb0e4892 SHA1 ef553a729eb8cd8f66a1bdca6024b5edb5864393 SHA256 a70d305090bc716e807861e154363f4b478852ad7c7d5f1ef8d5f45fb4ffea4d
-MISC ChangeLog 28445 RMD160 d96ebf6bdc0d6d435a52f5265f9af1ad40b53ebf SHA1 f52c8fd2319e1ff769168e6d6869c0332dce6fa8 SHA256 f429cb42800d186e51a81a65a4a63f4e86fb3109177f7c85720b4f65f21dc8d4
+MISC ChangeLog 28653 RMD160 4048317c30c1970f54d40386b48cd76aa1d38005 SHA1 1c6129b4c6894692f96e05124ffe3a44de917050 SHA256 1224cc00c43658aae63d43bc32bad08f8f8880565bddb28de4101b961ee88c8a
MISC metadata.xml 358 RMD160 97ecd4b6ee0a24352a71a66d5ad4fd82481156b4 SHA1 d80da2cf7c6892cdad6b681fda29e46472d68871 SHA256 8665f24cdfcc09576b595f8bd257333ff5f9ea7ee0ca2925ba6fb74d90e12415
diff --git a/net-misc/dhcp/dhcp-3.1.3_p1.ebuild b/net-misc/dhcp/dhcp-3.1.3_p1.ebuild
new file mode 100644
index 000000000000..765047ee8668
--- /dev/null
+++ b/net-misc/dhcp/dhcp-3.1.3_p1.ebuild
@@ -0,0 +1,248 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.1.3_p1.ebuild,v 1.1 2010/10/15 05:15:23 robbat2 Exp $
+
+inherit eutils flag-o-matic multilib toolchain-funcs versionator
+
+#MY_PV="${PV//_alpha/a}"
+#MY_PV="${MY_PV//_beta/b}"
+#MY_PV="${MY_PV//_rc/rc}"
+#MY_PV="${MY_PV//_p/p}"
+MY_PV="$(get_version_component_range 1-2 "${PV}" )-ESV"
+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="as-is BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="doc minimal static selinux kernel_linux"
+
+DEPEND="selinux? ( sec-policy/selinux-dhcp )
+ kernel_linux? ( sys-apps/net-tools )"
+
+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
+ epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-ntp.patch
+ # resolvconf support in dhclient-script
+ epatch "${FILESDIR}/${PN}"-3.1.0a1-dhclient-resolvconf.patch
+ # Fix setting hostnames on Linux
+ # merged in 3.1.3
+ #epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-hostname.patch
+ # Allow mtu settings
+ # merged in 3.1.3
+ #epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-mtu.patch
+ # Allow dhclient to use IF_METRIC to set route metrics
+ # merged in 3.1.3
+ #epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-metric.patch
+ # Stop downing the interface on Linux as that breaks link dameons
+ # such as wpa_supplicant and netplug
+ epatch "${FILESDIR}/${PN}"-3.1.3-dhclient-no-down.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-dhclient-stdin-conf.patch
+ # Disable fallback interfaces when using BPF
+ # This allows more than one dhclient instance on the BSD's
+ epatch "${FILESDIR}/${PN}"-3.0.5-bpf-nofallback.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
+
+ # NetworkManager support patches
+ # If they fail to apply to future versions they will be dropped
+ # Add dbus support to dhclient
+ epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch
+
+ # Denial of service through mixed identifier/ethernet host definitions
+ # merged in 3.1.3
+ #epatch "${FILESDIR}/${P}"-CVE-2009-1892.patch
+
+ # Brand the version with Gentoo
+ # include revision if >0
+ local newver="${MY_PV}-Gentoo"
+ [[ ${PR} != "r0" ]] && newver="${newver}-${PR}"
+ sed -i '/^#define DHCP_VERSION[ \t]\+/ s/'"${MY_PV}/${newver}/g" \
+ includes/version.h || die
+
+ # Change the hook script locations of the scripts
+ sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
+ -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \
+ client/scripts/* || die
+
+ # No need for the linux script to force bash, #158540.
+ sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die
+
+ # Quiet the freebsd logger a little
+ sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die
+
+ # Remove these options from the sample config
+ sed -i -e "/\(script\|host-name\|domain-name\) / d" \
+ client/dhclient.conf || die
+
+ # Build sed man pages as we don't ever support BSD 4.4 and older, #130251.
+ local x=
+ for x in Makefile.dist $(ls */Makefile.dist) ; do
+ sed -i -e 's/$(CATMANPAGES)/$(SEDMANPAGES)/g' "${x}" || die
+ done
+
+ # 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() {
+ 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_CONF "/etc/dhcp/dhclient.conf"
+ #define _PATH_DHCLIENT_DB "/var/lib/dhcp/dhclient.leases"
+ #define _PATH_DHCLIENT_PID "/var/run/dhcp/dhclient.pid"
+ #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
+ ADMMANEXT = .8
+ FFMANDIR = /usr/share/man/man5
+ FFMANEXT = .5
+ LIBMANDIR = /usr/share/man/man3
+ LIBMANEXT = .3
+ USRMANDIR = /usr/share/man/man1
+ USRMANEXT = .1
+ MANCAT = man
+ END
+
+ ./configure --copts "-DPARANOIA -DEARLY_CHROOT ${CFLAGS}" \
+ || die "configure failed"
+
+ # Remove server support from the Makefile
+ # We still install some extra crud though
+ if use minimal ; then
+ sed -i -e 's/\(server\|relay\|dhcpctl\)/ /g' work.*/Makefile || die
+ fi
+ emake || die "compile problem"
+}
+
+src_install() {
+ make install DESTDIR="${D}" || die
+ use doc && dodoc README RELNOTES doc/*
+
+ insinto /etc/dhcp
+ newins client/dhclient.conf dhclient.conf.sample
+ keepdir /var/{lib,run}/dhcp
+ keepdir /var/lib/dhclient
+
+ # Install our server files
+ if ! use minimal ; then
+ insinto /etc/dhcp
+ newins server/dhcpd.conf dhcpd.conf.sample
+ newinitd "${FILESDIR}"/dhcpd.init2 dhcpd
+ newinitd "${FILESDIR}"/dhcrelay.init dhcrelay
+ newconfd "${FILESDIR}"/dhcpd.conf dhcpd
+ newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
+
+ # We never want portage to own this file
+ rm -f "${D}"/var/lib/dhcp/dhcpd.leases
+ fi
+}
+
+pkg_preinst() {
+ if ! use minimal ; then
+ enewgroup dhcp
+ enewuser dhcp -1 -1 /var/lib/dhcp dhcp
+ fi
+}
+
+pkg_postinst() {
+ use minimal && return
+
+ chown -R 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() {
+ if use minimal ; then
+ eerror "${PN} has not been compiled for server support"
+ eerror "emerge ${PN} without the minimal USE flag to use dhcp sever"
+ return 1
+ fi
+
+ local CHROOT="$(
+ sed -n -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \
+ "${ROOT}"/etc/conf.d/dhcpd
+ )"
+
+ if [[ -z ${CHROOT} ]]; then
+ eerror "CHROOT not defined in /etc/conf.d/dhcpd"
+ return 1
+ fi
+
+ CHROOT="${ROOT}/${CHROOT}"
+
+ 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
+ ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib
+ chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp
+ eend 0
+
+ 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"
+}