net-misc/dhcp: Add 3.1 ESV version as 3.1.9999

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/mds@2319 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one 2010-08-26 06:50:33 +00:00
parent 7a2fa1c88c
commit d954874208
3 changed files with 270 additions and 1 deletions

View File

@ -2,6 +2,9 @@
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.154 2009/05/29 23:30:28 vapier Exp $
26 Aug 2010; Mario Fetka <mario.fetka@gmail.com> +dhcp-3.1.9999.ebuild:
Add 3.1 ESV version as 3.1.9999
24 Aug 2010; Mario Fetka <mario.fetka@gmail.com>
files/dhcp-4.0.1.ebuild.patch, +dhcp-4.2.0.ebuild,
+files/dhcp-4.2-bpf-nofallback.patch, +files/dhcp-4.2-no_isc_blurb.patch:

View File

@ -42,6 +42,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.2.tar.gz 799626 RMD160 026ac48b176ec273397fafa8a834a21fd6331681 SHA1 a60cccec2402a35025ddaafc8ac896595188560e SHA256 80daba1e4ac220a0945778aa3c1c9eb7860c4426645660bebb8ed35a3231a2fb
DIST dhcp-3.1.2p1.tar.gz 792355 RMD160 53434f8404c69e8e113cad030ec975cf13b467cc SHA1 730214fa6e70d187f1492aa3d4f1c2868ffcc8de SHA256 e0cb405e0fef0ecebec7aaed294032a06178ff28be87498596e6069ccda4341e
DIST dhcp-3.1.3.tar.gz 804097 RMD160 2337d1cc29e7be8ac973d8bfec633367dd37c12a SHA1 92fea5036c38a840f2f944b6cd1d90b18f950b7c SHA256 cb363247a897beaf5708c98d3a80dba8edd8f639d6bd1f4ada6c5a64ba51e2d4
@ -60,11 +61,12 @@ DIST ldap-for-dhcp-4.1.1-2.tar.gz 39004 RMD160 47b076c47bb586428cff13ce1a48dbd12
EBUILD dhcp-3.1.2.ebuild 8477 RMD160 03018b61ab215765261a44f115d6bd678b00c579 SHA1 0fe6abc1c193955a519dae3e356fae8a160f1a09 SHA256 a4a08a8dc062c731f2f7f226304adfb21bdf27be282f1d38492cc3c66662191d
EBUILD dhcp-3.1.2_p1.ebuild 8500 RMD160 11ffceb0a44d0d02d804f7e832039e800da577a8 SHA1 1c0aa891765494925c5cdf11ce809221e3a4d712 SHA256 7971285f0663e9b8929e819de5b3dabc112de5ed688e8c45db3288a92b9cf71e
EBUILD dhcp-3.1.3.ebuild 8196 RMD160 4edccb14aa7bcd1536f9bda343c24e10bcdd9a2f SHA1 ea93baf765ee56c77a398e4b868d7ed42f38819b SHA256 09d92a5ff9e670cd7f2ec8f00e7c5b43b6f94056f862ece2fbeb0cb322e1f2b6
EBUILD dhcp-3.1.9999.ebuild 8225 RMD160 e0220f9f1c3bba0de1f1c133b8cdf3bd52fc0106 SHA1 162857d353322b9333ccad0c03473964c5d5b846 SHA256 d9b5d5a96b5fcc8178da1e420fb2b5e4314e6d46bbc15446f5a4ac07e31530b1
EBUILD dhcp-4.0.1.ebuild 7529 RMD160 6f1a9652627d16cf31f5a709850370de07297f93 SHA1 f99f6dbabeb4e7d5de2b9182446749043533e2e9 SHA256 01741238ee7d80d8d9fc2b2309f7a7fc379c8c40a83d54a9837b7c68a5160cc7
EBUILD dhcp-4.0.2.ebuild 7071 RMD160 e458c6fafeeede68f7897181b2152489844fe843 SHA1 e561df613119c13fe3cae384b198b48228bfd8ed SHA256 ae08f2c2b91e998860b9585ceefb1f6260b86c0b71415a110d4f478a164ebf1f
EBUILD dhcp-4.1.0.ebuild 7488 RMD160 951457f2b70458c38d82c5013e8e6287ab0353fb SHA1 d96c3ebd090b6def031e79d8902b2c87e303167a SHA256 ec25fa7569f92d9dac230e85702427d37d51981d50033667ce36ccfe7be0620a
EBUILD dhcp-4.1.1.ebuild 7028 RMD160 e749ceb20ce4ec53319a5c0b2eb51fbd1a9f6da0 SHA1 f24922e252a1a9dad9972cbabd6aaf88308f4797 SHA256 d4ca9c44e344189290decb3da8375a834b496730f06d59545af19f95bd102e03
EBUILD dhcp-4.1.1_p1.ebuild 6969 RMD160 231066d0ebb33ea454f0874566234080073d5f72 SHA1 b90be96d283dbd983ea67efabbe545380a03fb7a SHA256 f115cdfdf85996d94cab0b30343a474f8a74fc3c31607798e246e42dc249cce6
EBUILD dhcp-4.2.0.ebuild 6446 RMD160 ef04d42aae30a41e75b020cce55c29ba7f9308b6 SHA1 d8fda6cb3428cec028d1d1b1f879cbbf97440d88 SHA256 d49b721691f80d55616404d2f47b069a5af04b86664d39a16dda983a03f273e9
MISC ChangeLog 30201 RMD160 7f1365209e08397def98e601ed38a5237d2005b6 SHA1 529d0b8b9455238a9059fc5f4ed67688760b283e SHA256 0a864564363ded3b16af377ca6c76bd88cb6b0ae4af8d4c3317d3bcae537aacd
MISC ChangeLog 30310 RMD160 926a295914b2831360aa0cbf411a7ed07b11e583 SHA1 7f5ccc89c8e220c882f73410d08f6c0cf8de49b0 SHA256 ab03f9c1ed1f784309ac2bff958128da2bc0a456c5f3d29c6958838355fc42fd
MISC metadata.xml 358 RMD160 97ecd4b6ee0a24352a71a66d5ad4fd82481156b4 SHA1 d80da2cf7c6892cdad6b681fda29e46472d68871 SHA256 8665f24cdfcc09576b595f8bd257333ff5f9ea7ee0ca2925ba6fb74d90e12415

View File

@ -0,0 +1,264 @@
# 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.2_p1.ebuild,v 1.9 2010/01/15 19:00:22 ulm Exp $
inherit eutils flag-o-matic multilib toolchain-funcs
LDAP_PV="3.1.3-1"
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="${MY_PV//.9999/-ESV}"
MY_P="${PN}-${MY_PV}"
MY_LDAP_PV="${LDAP_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
ldap? ( http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-${LDAP_PV}.tar.gz
http://ftp.disconnected-by-peer.at/pub/ldap-for-dhcp-${LDAP_PV}.tar.gz )"
LICENSE="as-is BSD"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd"
IUSE="doc minimal static selinux kernel_linux ldap ssl"
DEPEND="selinux? ( sec-policy/selinux-dhcp )
kernel_linux? ( sys-apps/net-tools )
ldap? ( net-nds/openldap
ssl? ( dev-libs/openssl ) )"
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
# 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-1.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
# Ldap patch for dhcp
epatch "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}/dhcp-${MY_LDAP_PV}"-ldap.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
if use ldap ; then
echo "#define LDAP_CONFIGURATION" >> includes/site.h
use ssl && echo "#define USE_SSL" >> includes/site.h
fi
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
if use ldap ; then
echo "LDAPLIB = -lldap" >> site.conf
use ssl && echo "SSLLIB = -lcrypto -lssl" >> site.conf
fi
./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
if use doc; then
dodoc README RELNOTES doc/*
use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/*.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt
fi
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
# install ldap files
if use ldap; then
insinto /etc/openldap/schema
doins "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcp.*
dosbin "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcpd-conf-to-ldap
fi
# 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"
}