net-misc/dhcp: update ldap patch
git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/mds@1463 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
parent
ab30e16159
commit
c226405a65
@ -2,6 +2,11 @@
|
||||
# Copyright 1999-2009 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 $
|
||||
|
||||
*dhcp-4.1.0_p1-r1 (18 Aug 2009)
|
||||
|
||||
18 Aug 2009; Mario Fetka <mario.fetka@gmail.com> +dhcp-4.1.0_p1-r1.ebuild:
|
||||
update ldap patch
|
||||
|
||||
*dhcp-4.1.0_p1 (29 Jul 2009)
|
||||
*dhcp-4.0.1_p1 (29 Jul 2009)
|
||||
*dhcp-3.1.2_p1 (29 Jul 2009)
|
||||
|
@ -38,11 +38,13 @@ DIST dhcp-4.1.0p1.tar.gz 1073227 RMD160 ac8472946615e2a45a8e8a64474d437f328d5439
|
||||
DIST ldap-for-dhcp-3.1.2-2.tar.gz 39752 RMD160 96d2f469b1349485c0202012697222911b81abe8 SHA1 023d12eeb148ad493e252edbfd112d19c9d0cecd SHA256 afd30a30d72a17a4d8ae1a27c247711f03b30b5e270bdcf9f521695b55b28db7
|
||||
DIST ldap-for-dhcp-4.0.1-3.tar.gz 39117 RMD160 977ec08ec0213e1a53d0dd5b3b08a234172dbd22 SHA1 8bc692bb2017c1b5ff35d73c10e5a2e4ed44e559 SHA256 161f5cd479ba0789d139ef59d101244fa7c880c3d1c13cbbbbae978004a30a18
|
||||
DIST ldap-for-dhcp-4.1.0-4.tar.gz 39175 RMD160 a9e31099bb971bdba0e78b80130f539ccc5eed0b SHA1 1c37ebf531b6a0bc358edc6f3e31b57bfe88dd8e SHA256 1088f0c0b2c7d8cc543eb0d34e655690a6efaec7eca85df3e28c06a2c456780b
|
||||
DIST ldap-for-dhcp-4.1.0-5.tar.gz 39281 RMD160 bfcfd98542b4e3616f1008fda30495e853e91c09 SHA1 bc2dc8c0215d3abac346c05db0b6327d34d2132c SHA256 e99977de60b5fc03ef30b035ab15c90896296909cde1c76886c1361a714b90cc
|
||||
EBUILD dhcp-3.1.2.ebuild 8466 RMD160 3a49e7318d635a5ef940d2765832cfa133fe77d3 SHA1 9895117cd684d340ef9cdf8a7a924b77ffcfdb64 SHA256 5b2a6adc4c5ba199ba4bf57b2edf98b6788396c5c99587d0607cd4cccb28ca10
|
||||
EBUILD dhcp-3.1.2_p1.ebuild 8489 RMD160 659d3f81fb9c920d47e65f2870e02eba93577d69 SHA1 fdb52c4412a22a8abb3c622664c58c7282e6db31 SHA256 d4a86105aa84c816c70ee85491131270560073b5f79bbeae8dd15e657075a65b
|
||||
EBUILD dhcp-4.0.1.ebuild 7618 RMD160 004c49cda2fe8bc65f715748fe6b91d6ef27d9ef SHA1 5119917732b3c9be442085cc757914bb2b7b5f42 SHA256 d44301b743ecfa8edd846bc8ceba53571063c6293dcd188552bc912d4c627687
|
||||
EBUILD dhcp-4.0.1_p1.ebuild 7641 RMD160 5e18f9ce9e2ea046d5a4075add0451ee6db11337 SHA1 13200a619a95efaf423bb4b31525b78e63f94bdb SHA256 60c5367c063edf9bd2608faa4dd2ffc8b3e916dfeb2eac695d036303596d84be
|
||||
EBUILD dhcp-4.1.0.ebuild 7546 RMD160 866e84089e01e0af7e3c786eff03a610cf4f0e77 SHA1 747648419e1ba0ce3b9746ee7171209df09be541 SHA256 e253fae73db8f3ecd0530820b97442b5cfee6bc148a297aa36df5f93f8bc6a6d
|
||||
EBUILD dhcp-4.1.0_p1-r1.ebuild 7569 RMD160 6ce2efb66d30d13f46625bffb62a02a639cdd0db SHA1 f1556fa68a3522d356977f1b74cacbb5888bdf27 SHA256 218498789e9a098984313ee61cb6676568a73d7807b7029eadcc722e2c71b080
|
||||
EBUILD dhcp-4.1.0_p1.ebuild 7569 RMD160 a70df04a204179849393d09af0794be9864adfac SHA1 293974e0b82c0c49d5b7d2c79b29bf065a95018f SHA256 478d16d63f5bc01d42497666f2d8211dd3af65384353760a62798afaf099dc9d
|
||||
MISC ChangeLog 28845 RMD160 d04f2afbbbb55644f830f919863df544605c3bd2 SHA1 23b865ba3a11d6e8bc92dac628deb02cf2cab97c SHA256 e60797edd3d981ec9d030be705ca9f140a003ecf84f1f89a8738d64c9c1ee65f
|
||||
MISC ChangeLog 28976 RMD160 6679ac9b6a5883132076f21413283ffae2c74c60 SHA1 9cbe6ff43a616b9f1797627f2c1d40e283d85747 SHA256 19217a420c9db5e50ac547a42c338562d70a1ac67f1b7b3b6f7716f43e7a8b53
|
||||
MISC metadata.xml 358 RMD160 97ecd4b6ee0a24352a71a66d5ad4fd82481156b4 SHA1 d80da2cf7c6892cdad6b681fda29e46472d68871 SHA256 8665f24cdfcc09576b595f8bd257333ff5f9ea7ee0ca2925ba6fb74d90e12415
|
||||
|
239
net-misc/dhcp/dhcp-4.1.0_p1-r1.ebuild
Normal file
239
net-misc/dhcp/dhcp-4.1.0_p1-r1.ebuild
Normal file
@ -0,0 +1,239 @@
|
||||
# Copyright 1999-2009 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.0.1.ebuild,v 1.1 2009/03/30 13:13:28 chainsaw Exp $
|
||||
|
||||
inherit eutils flag-o-matic autotools
|
||||
|
||||
LDAP_PV="4.1.0-5"
|
||||
|
||||
MY_PV="${PV//_alpha/a}"
|
||||
MY_PV="${MY_PV//_beta/b}"
|
||||
MY_PV="${MY_PV//_rc/rc}"
|
||||
MY_PV="${MY_PV//_p/p}"
|
||||
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
|
||||
http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-${LDAP_PV}.tar.gz
|
||||
http://ftp.mars.arge.at/pub/ldap-for-dhcp-${LDAP_PV}.tar.gz"
|
||||
|
||||
LICENSE="isc-dhcp"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
|
||||
IUSE="doc ipv6 selinux kernel_linux vim-syntax ldap ssl"
|
||||
|
||||
DEPEND="selinux? ( sec-policy/selinux-dhcp )
|
||||
kernel_linux? ( sys-apps/net-tools )
|
||||
vim-syntax? ( app-vim/dhcpd-syntax )
|
||||
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
|
||||
# Fix some permission issues
|
||||
epatch "${FILESDIR}/${PN}"-3.0-fix-perms.patch
|
||||
# Enable dhclient to equery NTP servers
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-ntp.patch
|
||||
# resolvconf support in dhclient-script
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-resolvconf.patch
|
||||
# Fix setting hostnames on Linux
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-hostname.patch
|
||||
# Allow mtu settings
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-mtu.patch
|
||||
# Allow dhclient to use IF_METRIC to set route metrics
|
||||
epatch "${FILESDIR}/${PN}"-4.1-dhclient-metric.patch
|
||||
# Stop downing the interface on Linux as that breaks link daemons
|
||||
# such as wpa_supplicant and netplug
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-no-down.patch
|
||||
# Quiet the isc blurb
|
||||
epatch "${FILESDIR}/${PN}"-4.1-no_isc_blurb.patch
|
||||
# Enable dhclient to get extra configuration from stdin
|
||||
epatch "${FILESDIR}/${PN}"-4.0.1-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
|
||||
# This allows the software to actually compile on linux
|
||||
epatch "${FILESDIR}/${PN}"-4.0-linux-ipv6-header.patch
|
||||
# Consistent style for the if statements, also resolves
|
||||
# unary operator expected warnings (new style is wrong).
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-script-correct-operators.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="Gentoo"
|
||||
[[ ${PR} != "r0" ]] && newver="${newver}-${PR}"
|
||||
|
||||
sed -i "/AC_INIT/s/\(\[[0-9]\+\.[0-9]\+\.[0-9]\+\)/\1-${newver}/" \
|
||||
configure.ac || 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
|
||||
|
||||
# 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
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
myconf=""
|
||||
if use ldap; then
|
||||
myconf="${myconf} --with-ldap"
|
||||
use ssl && myconf="${myconf} --with-ldapcrypto"
|
||||
fi
|
||||
econf \
|
||||
--enable-paranoia \
|
||||
--sysconfdir /etc/dhcp \
|
||||
--with-cli-pid-file=/var/run/dhcp/dhclient.pid \
|
||||
--with-cli-lease-file=/var/lib/dhcp/dhclient.leases \
|
||||
--with-srv-pid-file=/var/run/dhcp/dhcpd.pid \
|
||||
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
|
||||
--with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \
|
||||
$(use_enable ipv6 dhcpv6) \
|
||||
${myconf} \
|
||||
|| die
|
||||
|
||||
emake || die "compile problem"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
for installdir in includes tests common minires dst omapip client dhcpctl relay server; do
|
||||
cd "${S}/${installdir}"
|
||||
if [ "${installdir}" == client ]; then
|
||||
make install DESTDIR="${D}" exec_prefix="" || die
|
||||
else
|
||||
make install DESTDIR="${D}" exec_prefix="/usr" || die
|
||||
fi
|
||||
done
|
||||
|
||||
cd "${S}"
|
||||
|
||||
exeinto /sbin
|
||||
if use kernel_linux; then
|
||||
newexe "${S}"/client/scripts/linux dhclient-script
|
||||
else
|
||||
newexe "${S}"/client/scripts/freebsd dhclient-script
|
||||
fi
|
||||
|
||||
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
|
||||
insinto /etc/dhcp
|
||||
newins server/dhcpd.conf dhcpd.conf.sample
|
||||
newinitd "${FILESDIR}"/dhcpd.init 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
|
||||
}
|
||||
|
||||
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 -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"
|
||||
}
|
Loading…
Reference in New Issue
Block a user