net-misc/dhcp: add ldap patch for 3.1.2

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/mds@1332 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one 2009-07-07 20:17:02 +00:00
parent 1372cf2b83
commit 7e514c60c0
7 changed files with 474 additions and 9 deletions

View File

@ -2,6 +2,12 @@
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 # 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 $ # $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.154 2009/05/29 23:30:28 vapier Exp $
07 Jul 2009; Mario Fetka <mario.fetka@gmail.com>
+files/dhcp-3.1.0a1-dhclient-resolvconf.patch, dhcp-3.1.2.ebuild,
+files/dhcp-3.1.2.ebuild.patch, dhcp-4.0.1.ebuild,
+files/dhcp-4.0.1.ebuild.patch:
add ldap patch for 3.1.2
*dhcp-3.1.2 (07 Jul 2009) *dhcp-3.1.2 (07 Jul 2009)
07 Jul 2009; Mario Fetka <mario.fetka@gmail.com> 07 Jul 2009; Mario Fetka <mario.fetka@gmail.com>

View File

@ -12,6 +12,8 @@ AUX dhcp-3.0.3-libdst.patch 322 RMD160 5216c754a912cfcfc65683afcf44dbe1a7871212
AUX dhcp-3.0.3-no_isc_blurb.patch 3002 RMD160 d70f89e1763bfeb23ce8f09399426983df01f7c8 SHA1 99a9fe69988226d29ccc6c2dc745ffab9b66817c SHA256 09c451cd9667fc8effcecd640f4cbe8629d41f6abacf9d1f2f923aab1f6e0bbb AUX dhcp-3.0.3-no_isc_blurb.patch 3002 RMD160 d70f89e1763bfeb23ce8f09399426983df01f7c8 SHA1 99a9fe69988226d29ccc6c2dc745ffab9b66817c SHA256 09c451cd9667fc8effcecd640f4cbe8629d41f6abacf9d1f2f923aab1f6e0bbb
AUX dhcp-3.0.4-dhclient-stdin-conf.patch 2176 RMD160 fae08899f6b57da3ec7ab0068e288bbdf2fbf2ae SHA1 c10c35dcf4a94f45f4bc98147a70e9dcf3f01dd5 SHA256 80141fe71e52774f1c7b1a02f2cbd49bc646f19753ceefc1c3605104df0cae5f AUX dhcp-3.0.4-dhclient-stdin-conf.patch 2176 RMD160 fae08899f6b57da3ec7ab0068e288bbdf2fbf2ae SHA1 c10c35dcf4a94f45f4bc98147a70e9dcf3f01dd5 SHA256 80141fe71e52774f1c7b1a02f2cbd49bc646f19753ceefc1c3605104df0cae5f
AUX dhcp-3.0.5-bpf-nofallback.patch 1473 RMD160 1a5ece77cb481416935b0d2eea53e85dc4c4ee93 SHA1 d4cad638075a98606e07c633551c8a1d2f78f2e7 SHA256 b215c5ff4a282b475f28168250c05bbbc85e7c37e7af92616571d499b8c14da6 AUX dhcp-3.0.5-bpf-nofallback.patch 1473 RMD160 1a5ece77cb481416935b0d2eea53e85dc4c4ee93 SHA1 d4cad638075a98606e07c633551c8a1d2f78f2e7 SHA256 b215c5ff4a282b475f28168250c05bbbc85e7c37e7af92616571d499b8c14da6
AUX dhcp-3.1.0a1-dhclient-resolvconf.patch 10316 RMD160 183bedd1660bf5a5f9dc7d002199e76aec12341c SHA1 1e0332ea31cfdbe92f3053405587f08117de8f8b SHA256 112b2ed44aab92592eb3810c61ada7f30d9d01fe43b647667326972a37b412a1
AUX dhcp-3.1.2.ebuild.patch 3160 RMD160 60a08fa901e2341eac6a164cab67ea78b6b36dfc SHA1 5fc4c5840e1713010f6d39005583280c37e7d195 SHA256 7963a82c14eef6f423eae9cd24bbce0797cf8fbf5b278f8704288b203fdb8a14
AUX dhcp-4.0-dhclient-metric.patch 8100 RMD160 cd599d5523be30809024b8e0f81cd84e4d932317 SHA1 ba9ff19cc5274b0e3e8408eba4725e0546413954 SHA256 a1c5589ac1c57ba7fe66336646f4286ebd7112f05abf5ae59b69ff26e7409afc AUX dhcp-4.0-dhclient-metric.patch 8100 RMD160 cd599d5523be30809024b8e0f81cd84e4d932317 SHA1 ba9ff19cc5274b0e3e8408eba4725e0546413954 SHA256 a1c5589ac1c57ba7fe66336646f4286ebd7112f05abf5ae59b69ff26e7409afc
AUX dhcp-4.0-dhclient-ntp.patch 7966 RMD160 d6dd1c3363f06712a82231eae1eb559f5a45bbb5 SHA1 3c1b373c6649c1ccb44f205fbee116c134514f4e SHA256 e93bda7f2baae9163f96ab0408bfbe885caa96a8698f9e566b8a9dc04de9359b AUX dhcp-4.0-dhclient-ntp.patch 7966 RMD160 d6dd1c3363f06712a82231eae1eb559f5a45bbb5 SHA1 3c1b373c6649c1ccb44f205fbee116c134514f4e SHA256 e93bda7f2baae9163f96ab0408bfbe885caa96a8698f9e566b8a9dc04de9359b
AUX dhcp-4.0-dhclient-resolvconf.patch 14516 RMD160 0a53cbb795c4d4989f5632b6314b69be5bd94611 SHA1 e1db8ecca4de1c45fcec7e93fb13d186931d74f6 SHA256 1cdbb9ed297426b2d44063ffb8642c9c5cdf54dc2f9c3c8f59100f4ab2c40986 AUX dhcp-4.0-dhclient-resolvconf.patch 14516 RMD160 0a53cbb795c4d4989f5632b6314b69be5bd94611 SHA1 e1db8ecca4de1c45fcec7e93fb13d186931d74f6 SHA256 1cdbb9ed297426b2d44063ffb8642c9c5cdf54dc2f9c3c8f59100f4ab2c40986
@ -20,14 +22,16 @@ AUX dhcp-4.0-linux-ipv6-header.patch 817 RMD160 cd395ba33c6e729862af7a3c869d412e
AUX dhcp-4.0-no_isc_blurb.patch 2748 RMD160 f29d8705fab63320c18c6319dd5703a51acc1687 SHA1 d8af8f4567e4bdbfac5d8e5455dede87a188ad40 SHA256 603e9a6f28264e35513f40f987d10e4fdce6d5e4f8d48aa46f83b8687d57dff0 AUX dhcp-4.0-no_isc_blurb.patch 2748 RMD160 f29d8705fab63320c18c6319dd5703a51acc1687 SHA1 d8af8f4567e4bdbfac5d8e5455dede87a188ad40 SHA256 603e9a6f28264e35513f40f987d10e4fdce6d5e4f8d48aa46f83b8687d57dff0
AUX dhcp-4.0-paranoia.patch 4996 RMD160 2f8339e3d8af9164c91cc5a3bab7605ecd728295 SHA1 94db8a07b82b69d0a05645b08ef5d0ec0b99bd19 SHA256 14d328d400cdc1b4d7d6329d9c8e997b2c5e76e8f21330e267a75d6240799058 AUX dhcp-4.0-paranoia.patch 4996 RMD160 2f8339e3d8af9164c91cc5a3bab7605ecd728295 SHA1 94db8a07b82b69d0a05645b08ef5d0ec0b99bd19 SHA256 14d328d400cdc1b4d7d6329d9c8e997b2c5e76e8f21330e267a75d6240799058
AUX dhcp-4.0.1-dhclient-stdin-conf.patch 2965 RMD160 2c3dd3994f0a7f15f3fe51972dd04a2e6055613a SHA1 f4a9d51126ea489f75fcf29053ab432b68e5055d SHA256 0b25bc74ae258656dd1f0e6f4ffd6b4ef8b4ad56956624c0b6070941a180e57c AUX dhcp-4.0.1-dhclient-stdin-conf.patch 2965 RMD160 2c3dd3994f0a7f15f3fe51972dd04a2e6055613a SHA1 f4a9d51126ea489f75fcf29053ab432b68e5055d SHA256 0b25bc74ae258656dd1f0e6f4ffd6b4ef8b4ad56956624c0b6070941a180e57c
AUX dhcp-4.0.1.ebuild.patch 2610 RMD160 4e6352ffb84cf3f4c139d7dc7e0925a2270a098d SHA1 518a332ce18a5016c6bb7b5317e40ae24abf1acf SHA256 9742bba6f54ae34a8a7cc737ab2376734f7f922bc7b839f3ee263ae11752d73a
AUX dhcpd.conf 1092 RMD160 936bb112c7cdf8e669b695599252d1f6626be2f3 SHA1 cbabbcea73a0cbc9692462683b983c96d6f18b0c SHA256 b86d27e0560689057b01a352474582fceb3a398eaf3b17f901378ec56284c4d5 AUX dhcpd.conf 1092 RMD160 936bb112c7cdf8e669b695599252d1f6626be2f3 SHA1 cbabbcea73a0cbc9692462683b983c96d6f18b0c SHA256 b86d27e0560689057b01a352474582fceb3a398eaf3b17f901378ec56284c4d5
AUX dhcpd.init 1989 RMD160 7f6b6858020100e47efa5d6a0809b2959e551249 SHA1 2c611adc6425fd095740aa56d09d8aafb4fea58a SHA256 916bfeb81dcb3423fd4239270ac2dce2e6dc105b28a06e03b352f6bf6b30ed1e AUX dhcpd.init 1989 RMD160 7f6b6858020100e47efa5d6a0809b2959e551249 SHA1 2c611adc6425fd095740aa56d09d8aafb4fea58a SHA256 916bfeb81dcb3423fd4239270ac2dce2e6dc105b28a06e03b352f6bf6b30ed1e
AUX dhcrelay.conf 421 RMD160 456edbc9bcc8d3a44db5bb6dbf0c3003c3e7419c SHA1 78ecdb000382893fb49d0052ced063955b0ad9cf SHA256 409b895ed489e75c1a08f72961b45d641b93fd9357f528abc78b1fd036b7f730 AUX dhcrelay.conf 421 RMD160 456edbc9bcc8d3a44db5bb6dbf0c3003c3e7419c SHA1 78ecdb000382893fb49d0052ced063955b0ad9cf SHA256 409b895ed489e75c1a08f72961b45d641b93fd9357f528abc78b1fd036b7f730
AUX dhcrelay.init 736 RMD160 04566b87bd6dbb8bb754b26409ca30b878ef3ca3 SHA1 72742b308314b2e1476b27e94212fbf4d179adc4 SHA256 cfdaff3a723be3935d06c14e171d4008f2ad3329bd05ac2e49c19bc0e14bc59c AUX dhcrelay.init 736 RMD160 04566b87bd6dbb8bb754b26409ca30b878ef3ca3 SHA1 72742b308314b2e1476b27e94212fbf4d179adc4 SHA256 cfdaff3a723be3935d06c14e171d4008f2ad3329bd05ac2e49c19bc0e14bc59c
DIST dhcp-3.1.2.tar.gz 799626 RMD160 026ac48b176ec273397fafa8a834a21fd6331681 SHA1 a60cccec2402a35025ddaafc8ac896595188560e SHA256 80daba1e4ac220a0945778aa3c1c9eb7860c4426645660bebb8ed35a3231a2fb DIST dhcp-3.1.2.tar.gz 799626 RMD160 026ac48b176ec273397fafa8a834a21fd6331681 SHA1 a60cccec2402a35025ddaafc8ac896595188560e SHA256 80daba1e4ac220a0945778aa3c1c9eb7860c4426645660bebb8ed35a3231a2fb
DIST dhcp-4.0.1.tar.gz 1050570 RMD160 a9764a76d105778362fe4b58e77783331ee3448a SHA1 7d813740ab4a64e474f1c01b1395617987532ed1 SHA256 965d09a7759250eff7d6d06d37425ea085c14edb5b405f8357ef5ec72ded28ef DIST dhcp-4.0.1.tar.gz 1050570 RMD160 a9764a76d105778362fe4b58e77783331ee3448a SHA1 7d813740ab4a64e474f1c01b1395617987532ed1 SHA256 965d09a7759250eff7d6d06d37425ea085c14edb5b405f8357ef5ec72ded28ef
DIST ldap-for-dhcp-3.1.2-1.tar.gz 41453 RMD160 d6b7401fa9d60937a2d0cb8c225c39016cc02a65 SHA1 39087b2102f901b19c8bf1373db2b47bd5b2d630 SHA256 540cfdfe081114d4cbc092e4532a506f2234d890fde9007c9c23017709298096
DIST ldap-for-dhcp-4.0.1-1.tar.gz 39164 RMD160 451edcf646e56cfbaec18303e9ad6f36e36f1e38 SHA1 19a4b7e5a33d298ec6948554623fdf96016f681f SHA256 0a2bc6d28f6c9f7b081ff1f832e8411d846a17e96b0493459f4ec9ab87a2ed36 DIST ldap-for-dhcp-4.0.1-1.tar.gz 39164 RMD160 451edcf646e56cfbaec18303e9ad6f36e36f1e38 SHA1 19a4b7e5a33d298ec6948554623fdf96016f681f SHA256 0a2bc6d28f6c9f7b081ff1f832e8411d846a17e96b0493459f4ec9ab87a2ed36
EBUILD dhcp-3.1.2.ebuild 7431 RMD160 ca3c7fb4df1e1963fd27d55fc98f6bec58ff7f96 SHA1 15a47aed16897223c8f71f46b4e99c4fcce188de SHA256 9742d2213eb1a07dcdb327288a5963cbc94e555a346b18a9f5f6766bdfd05810 EBUILD dhcp-3.1.2.ebuild 8448 RMD160 75b66c12dee99d1daaaa875613081922fa1c7ccf SHA1 ec4c7236c25d2b32c0f974e80c9b56b3077fee9f SHA256 eeadbb97103849797708e46cf93be7994b76f33dfaa79d4ed0207b63f5100af1
EBUILD dhcp-4.0.1.ebuild 7530 RMD160 4c35e387614c3f29caf3beabf9c9a0918bef5bc1 SHA1 2a969dab197ec446b350af5bbe1c4dba09efe806 SHA256 6a99c7d4604c0df7d0d034903a96296a70f5a3b3582ea79a3402526137650a8f EBUILD dhcp-4.0.1.ebuild 7531 RMD160 2d142ce9650c1f423d88a602b0a82760d41ff1ea SHA1 73041547bfbbc983998e718226db1ea30d0bd488 SHA256 7947f4c7a2d533c22be45d392701257c358aa436d2de6c1aefea554a9881f60d
MISC ChangeLog 27273 RMD160 8377f2d70df0d413227658d5cca9c197cf5a345e SHA1 354c9cc8d07341e3ae3a9b3f1a38ffca625b9ec2 SHA256 9b7c91000bf3abbc2211873ca4f79c40d4a1dffafe80c443bfd6288ed68451ea MISC ChangeLog 27507 RMD160 ac1d6f149ad867d31cd62b916cfbaa5e80f36e9b SHA1 2523dead0f78ca02fac3033b0edb28d65fd79801 SHA256 6d8ec0b22c79efd39758804784be73208928f154da1979f21e1426b1730672f9
MISC metadata.xml 358 RMD160 97ecd4b6ee0a24352a71a66d5ad4fd82481156b4 SHA1 d80da2cf7c6892cdad6b681fda29e46472d68871 SHA256 8665f24cdfcc09576b595f8bd257333ff5f9ea7ee0ca2925ba6fb74d90e12415 MISC metadata.xml 358 RMD160 97ecd4b6ee0a24352a71a66d5ad4fd82481156b4 SHA1 d80da2cf7c6892cdad6b681fda29e46472d68871 SHA256 8665f24cdfcc09576b595f8bd257333ff5f9ea7ee0ca2925ba6fb74d90e12415

View File

@ -4,21 +4,28 @@
inherit eutils flag-o-matic multilib toolchain-funcs inherit eutils flag-o-matic multilib toolchain-funcs
LDAP_PV="3.1.2-1"
MY_PV="${PV//_alpha/a}" MY_PV="${PV//_alpha/a}"
MY_PV="${MY_PV//_beta/b}" MY_PV="${MY_PV//_beta/b}"
MY_PV="${MY_PV//_rc/rc}" MY_PV="${MY_PV//_rc/rc}"
MY_P="${PN}-${MY_PV}" MY_P="${PN}-${MY_PV}"
MY_LDAP_PV="${LDAP_PV//-*/}"
DESCRIPTION="ISC Dynamic Host Configuration Protocol" DESCRIPTION="ISC Dynamic Host Configuration Protocol"
HOMEPAGE="http://www.isc.org/products/DHCP" HOMEPAGE="http://www.isc.org/products/DHCP"
SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz" SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz
http://dcantrel.fedorapeople.org/dhcp/ldap-patch/ldap-for-dhcp-${LDAP_PV}.tar.gz
http://ftp.mars.arge.at/pub/ldap-for-dhcp-${LDAP_PV}.tar.gz"
LICENSE="isc-dhcp" LICENSE="isc-dhcp"
SLOT="0" SLOT="0"
KEYWORDS="alpha amd64 arm hppa ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd" KEYWORDS="alpha amd64 arm hppa ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd"
IUSE="doc minimal static selinux kernel_linux" IUSE="doc minimal static selinux kernel_linux ldap ssl"
DEPEND="selinux? ( sec-policy/selinux-dhcp ) DEPEND="selinux? ( sec-policy/selinux-dhcp )
kernel_linux? ( sys-apps/net-tools )" kernel_linux? ( sys-apps/net-tools )
ldap? ( net-nds/openldap
ssl? ( dev-libs/openssl ) )"
PROVIDE="virtual/dhcpc" PROVIDE="virtual/dhcpc"
@ -65,6 +72,9 @@ src_unpack() {
# Add dbus support to dhclient # Add dbus support to dhclient
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch 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 # Brand the version with Gentoo
# include revision if >0 # include revision if >0
local newver="${MY_PV}-Gentoo" local newver="${MY_PV}-Gentoo"
@ -119,6 +129,8 @@ src_compile() {
#define _PATH_DHCLIENT_PID "/var/run/dhcp/dhclient.pid" #define _PATH_DHCLIENT_PID "/var/run/dhcp/dhclient.pid"
#define DHCPD_LOG_FACILITY LOG_LOCAL1 #define DHCPD_LOG_FACILITY LOG_LOCAL1
END END
use ldap && echo "#define LDAP_CONFIGURATION" >> includes/site.h
use ssl && echo "#define USE_SSL" >> includes/site.h
cat <<-END > site.conf cat <<-END > site.conf
CC = $(tc-getCC) CC = $(tc-getCC)
@ -138,6 +150,8 @@ src_compile() {
USRMANEXT = .1 USRMANEXT = .1
MANCAT = man MANCAT = man
END END
use ldap && echo "LDAPLIB = -lldap" >> site.conf
use ssl && echo "SSLLIB = -lcrypto -lssl" >> site.conf
./configure --copts "-DPARANOIA -DEARLY_CHROOT ${CFLAGS}" \ ./configure --copts "-DPARANOIA -DEARLY_CHROOT ${CFLAGS}" \
|| die "configure failed" || die "configure failed"
@ -152,7 +166,11 @@ src_compile() {
src_install() { src_install() {
make install DESTDIR="${D}" || die make install DESTDIR="${D}" || die
use doc && dodoc README RELNOTES doc/* if use doc; then
dodoc README RELNOTES doc/*
use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/README.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt
use ldap && newdoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/LICENSE LICENSE.ldap
fi
insinto /etc/dhcp insinto /etc/dhcp
newins client/dhclient.conf dhclient.conf.sample newins client/dhclient.conf dhclient.conf.sample
@ -167,6 +185,13 @@ src_install() {
newconfd "${FILESDIR}"/dhcpd.conf dhcpd newconfd "${FILESDIR}"/dhcpd.conf dhcpd
newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
# install ldap files
if use ldap; then
insinto /etc/openldap/schema
doins "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcp.schema
dosbin "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcpd-conf-to-ldap
fi
# We never want portage to own this file # We never want portage to own this file
rm -f "${D}"/var/lib/dhcp/dhcpd.leases rm -f "${D}"/var/lib/dhcp/dhcpd.leases
fi fi

View File

@ -25,8 +25,8 @@ IUSE="doc ipv6 selinux kernel_linux vim-syntax ldap ssl"
DEPEND="selinux? ( sec-policy/selinux-dhcp ) DEPEND="selinux? ( sec-policy/selinux-dhcp )
kernel_linux? ( sys-apps/net-tools ) kernel_linux? ( sys-apps/net-tools )
vim-syntax? ( app-vim/dhcpd-syntax ) vim-syntax? ( app-vim/dhcpd-syntax )
ldap? ( net-nds/openldap ) ldap? ( net-nds/openldap
ssl? ( dev-libs/openssl )" ssl? ( dev-libs/openssl ) )"
PROVIDE="virtual/dhcpc" PROVIDE="virtual/dhcpc"

View File

@ -0,0 +1,254 @@
diff -ur client.orig/scripts/bsdos client/scripts/bsdos
--- client.orig/scripts/bsdos 2006-09-07 18:53:10.476329752 +0100
+++ client/scripts/bsdos 2006-09-07 19:19:53.000000000 +0100
@@ -1,21 +1,22 @@
#!/bin/sh
make_resolv_conf() {
- if [ x"$new_domain_name_servers" != x ]; then
- cat /dev/null > /etc/resolv.conf.dhclient
- if [ "x$new_domain_search" != x ]; then
- echo search $new_domain_search >> /etc/resolv.conf.dhclient
- elif [ "x$new_domain_name" != x ]; then
- # Note that the DHCP 'Domain Name Option' is really just a domain
- # name, and that this practice of using the domain name option as
- # a search path is both nonstandard and deprecated.
- echo search $new_domain_name >> /etc/resolv.conf.dhclient
+ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; then
+ if [ "x$new_domain_name" != x ] || [ "x$new_domain_name_servers" != x ]; then
+ conf="# Generated by dhclient for interface $interface\n"
+ if [ "x$new_domain_name" != x ]; then
+ conf="${conf}search $new_domain_name\n"
+ fi
+ for nameserver in $new_domain_name_servers; do
+ conf="${conf}nameserver $nameserver\n"
+ done
+ if [ -x /sbin/resolvconf ]; then
+ printf "$conf" | resolvconf -a "$interface"
+ else
+ printf "$conf" > /etc/resolv.conf
+ chmod 644 /etc/resolv.conf
+ fi
fi
- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >> /etc/resolv.conf.dhclient
- done
-
- mv /etc/resolv.conf.dhclient /etc/resolv.conf
fi
# If we're making confs, may as well make an ntp.conf too
make_ntp_conf
diff -ur client.orig/scripts/freebsd client/scripts/freebsd
--- client.orig/scripts/freebsd 2006-09-07 18:53:10.476329752 +0100
+++ client/scripts/freebsd 2006-09-07 19:19:32.000000000 +0100
@@ -11,38 +11,20 @@
fi
make_resolv_conf() {
- if [ x"$new_domain_name_servers" != x ]; then
- ( cat /dev/null > /etc/resolv.conf.dhclient )
- exit_status=$?
- if [ $exit_status -ne 0 ]; then
- $LOGGER "Unable to create /etc/resolv.conf.dhclient: Error $exit_status"
- else
- if [ "x$new_domain_search" != x ]; then
- ( echo search $new_domain_search >> /etc/resolv.conf.dhclient )
- exit_status=$?
- elif [ "x$new_domain_name" != x ]; then
- # Note that the DHCP 'Domain Name Option' is really just a domain
- # name, and that this practice of using the domain name option as
- # a search path is both nonstandard and deprecated.
- ( echo search $new_domain_name >> /etc/resolv.conf.dhclient )
- exit_status=$?
+ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; then
+ if [ "x$new_domain_name" != x ] || [ "x$new_domain_name_servers" != x ]; then
+ conf="# Generated by dhclient for interface $interface\n"
+ if [ "x$new_domain_name" != x ]; then
+ conf="${conf}search $new_domain_name\n"
fi
for nameserver in $new_domain_name_servers; do
- if [ $exit_status -ne 0 ]; then
- break
- fi
- ( echo nameserver $nameserver >>/etc/resolv.conf.dhclient )
- exit_status=$?
+ conf="${conf}nameserver $nameserver\n"
done
-
- # If there were no errors, attempt to mv the new file into place.
- if [ $exit_status -eq 0 ]; then
- ( mv /etc/resolv.conf.dhclient /etc/resolv.conf )
- exit_status = $?
- fi
-
- if [ $exit_status -ne 0 ]; then
- $LOGGER "Error while writing new /etc/resolv.conf."
+ if [ -x /sbin/resolvconf ]; then
+ printf "$conf" | resolvconf -a "$interface"
+ else
+ printf "$conf" > /etc/resolv.conf
+ chmod 644 /etc/resolv.conf
fi
fi
fi
diff -ur client.orig/scripts/linux client/scripts/linux
--- client.orig/scripts/linux 2006-09-07 18:53:10.476329752 +0100
+++ client/scripts/linux 2006-09-07 19:18:57.000000000 +0100
@@ -23,22 +23,22 @@
# of the $1 in its args.
make_resolv_conf() {
- if [ x"$new_domain_name_servers" != x ]; then
- cat /dev/null > /etc/resolv.conf.dhclient
- chmod 644 /etc/resolv.conf.dhclient
- if [ x"$new_domain_search" != x ]; then
- echo search $new_domain_search >> /etc/resolv.conf.dhclient
- elif [ x"$new_domain_name" != x ]; then
- # Note that the DHCP 'Domain Name Option' is really just a domain
- # name, and that this practice of using the domain name option as
- # a search path is both nonstandard and deprecated.
- echo search $new_domain_name >> /etc/resolv.conf.dhclient
+ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; then
+ if [ "x$new_domain_name" != x ] || [ "x$new_domain_name_servers" != x ]; then
+ conf="# Generated by dhclient for interface $interface\n"
+ if [ "x$new_domain_name" != x ]; then
+ conf="${conf}search $new_domain_name\n"
+ fi
+ for nameserver in $new_domain_name_servers; do
+ conf="${conf}nameserver $nameserver\n"
+ done
+ if [ -x /sbin/resolvconf ]; then
+ printf "$conf" | resolvconf -a "$interface"
+ else
+ printf "$conf" > /etc/resolv.conf
+ chmod 644 /etc/resolv.conf
+ fi
fi
- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
- done
-
- mv /etc/resolv.conf.dhclient /etc/resolv.conf
fi
# If we're making confs, may as well make an ntp.conf too
make_ntp_conf
diff -ur client.orig/scripts/netbsd client/scripts/netbsd
--- client.orig/scripts/netbsd 2006-09-07 18:53:10.476329752 +0100
+++ client/scripts/netbsd 2006-09-07 19:20:10.000000000 +0100
@@ -1,21 +1,22 @@
#!/bin/sh
make_resolv_conf() {
- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
- cat /dev/null > /etc/resolv.conf.dhclient
- if [ "x$new_domain_search != x ]; then
- echo search $new_domain_search >> /etc/resolv.conf.dhclient
- elif [ "x$new_domain_name != x ]; then
- # Note that the DHCP 'Domain Name Option' is really just a domain
- # name, and that this practice of using the domain name option as
- # a search path is both nonstandard and deprecated.
- echo search $new_domain_name >> /etc/resolv.conf.dhclient
+ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; then
+ if [ "x$new_domain_name" != x ] || [ "x$new_domain_name_servers" != x ]; then
+ conf="# Generated by dhclient for interface $interface\n"
+ if [ "x$new_domain_name" != x ]; then
+ conf="${conf}search $new_domain_name\n"
+ fi
+ for nameserver in $new_domain_name_servers; do
+ conf="${conf}nameserver $nameserver\n"
+ done
+ if [ -x /sbin/resolvconf ]; then
+ printf "$conf" | resolvconf -a "$interface"
+ else
+ printf "$conf" > /etc/resolv.conf
+ chmod 644 /etc/resolv.conf
+ fi
fi
- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
- done
-
- mv /etc/resolv.conf.dhclient /etc/resolv.conf
fi
# If we're making confs, may as well make an ntp.conf too
make_ntp_conf
diff -ur client.orig/scripts/openbsd client/scripts/openbsd
--- client.orig/scripts/openbsd 2006-09-07 18:53:10.476329752 +0100
+++ client/scripts/openbsd 2006-09-07 19:20:38.000000000 +0100
@@ -1,21 +1,22 @@
#!/bin/sh
make_resolv_conf() {
- if x"$new_domain_name_servers" != x ]; then
- cat /dev/null > /etc/resolv.conf.dhclient
- if [ x"$new_domain_search" != x ]; then
- echo search $new_domain_search >> /etc/resolv.conf.dhclient
- elif [ x"$new_domain_name" != x ]; then
- # Note that the DHCP 'Domain Name Option' is really just a domain
- # name, and that this practice of using the domain name option as
- # a search path is both nonstandard and deprecated.
- echo search $new_domain_name >> /etc/resolv.conf.dhclient
+ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; then
+ if [ "x$new_domain_name" != x ] || [ "x$new_domain_name_servers" != x ]; then
+ conf="# Generated by dhclient for interface $interface\n"
+ if [ "x$new_domain_name" != x ]; then
+ conf="${conf}search $new_domain_name\n"
+ fi
+ for nameserver in $new_domain_name_servers; do
+ conf="${conf}nameserver $nameserver\n"
+ done
+ if [ -x /sbin/resolvconf ]; then
+ printf "$conf" | resolvconf -a "$interface"
+ else
+ printf "$conf" > /etc/resolv.conf
+ chmod 644 /etc/resolv.conf
+ fi
fi
- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
- done
-
- mv /etc/ersolv.conf.dhclient /etc/resolv.conf
fi
# If we're making confs, may as well make an ntp.conf too
make_ntp_conf
diff -ur client.orig/scripts/solaris client/scripts/solaris
--- client.orig/scripts/solaris 2006-09-07 18:53:10.476329752 +0100
+++ client/scripts/solaris 2006-09-07 19:21:12.000000000 +0100
@@ -1,21 +1,22 @@
#!/bin/sh
make_resolv_conf() {
- if [ x"$new_domain_name_servers" != x ]; then
- cat /dev/null > /etc/resolv.conf.dhclient
- if [ x"$new_domain_search" != x ]; then
- echo search $new_domain_search >> /etc/resolv.conf.dhclient
- elif [ x"$new_domain_name" != x ]; then
- # Note that the DHCP 'Domain Name Option' is really just a domain
- # name, and that this practice of using the domain name option as
- # a search path is both nonstandard and deprecated.
- echo search $new_domain_name >> /etc/resolv.conf.dhclient
+ if [ x$PEER_DNS = x ] || [ x$PEER_DNS = xyes ]; then
+ if [ "x$new_domain_name" != x ] || [ "x$new_domain_name_servers" != x ]; then
+ conf="# Generated by dhclient for interface $interface\n"
+ if [ "x$new_domain_name" != x ]; then
+ conf="${conf}search $new_domain_name\n"
+ fi
+ for nameserver in $new_domain_name_servers; do
+ conf="${conf}nameserver $nameserver\n"
+ done
+ if [ -x /sbin/resolvconf ]; then
+ printf "$conf" | resolvconf -a "$interface"
+ else
+ printf "$conf" > /etc/resolv.conf
+ chmod 644 /etc/resolv.conf
+ fi
fi
- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
- done
-
- mv /etc/resolv.conf.dhclient /etc/resolv.conf
fi
# If we're making confs, may as well make an ntp.conf too
make_ntp_conf

View File

@ -0,0 +1,93 @@
--- /usr/portage/net-misc/dhcp/dhcp-3.1.1.ebuild 2009-04-05 12:37:41.000000000 +0200
+++ dhcp-3.1.2.ebuild 2009-07-07 22:01:04.968912251 +0200
@@ -1,24 +1,31 @@
-# Copyright 1999-2008 Gentoo Foundation
+# 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-3.1.1.ebuild,v 1.9 2008/11/05 00:41:46 vapier Exp $
inherit eutils flag-o-matic multilib toolchain-funcs
+LDAP_PV="3.1.2-1"
+
MY_PV="${PV//_alpha/a}"
MY_PV="${MY_PV//_beta/b}"
MY_PV="${MY_PV//_rc/rc}"
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"
+SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz
+ http://dcantrel.fedorapeople.org/dhcp/ldap-patch/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 minimal static selinux kernel_linux"
+IUSE="doc minimal static selinux kernel_linux ldap ssl"
DEPEND="selinux? ( sec-policy/selinux-dhcp )
- kernel_linux? ( sys-apps/net-tools )"
+ kernel_linux? ( sys-apps/net-tools )
+ ldap? ( net-nds/openldap
+ ssl? ( dev-libs/openssl ) )"
PROVIDE="virtual/dhcpc"
@@ -65,6 +72,9 @@
# 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"
@@ -119,6 +129,8 @@
#define _PATH_DHCLIENT_PID "/var/run/dhcp/dhclient.pid"
#define DHCPD_LOG_FACILITY LOG_LOCAL1
END
+ use ldap && echo "#define LDAP_CONFIGURATION" >> includes/site.h
+ use ssl && echo "#define USE_SSL" >> includes/site.h
cat <<-END > site.conf
CC = $(tc-getCC)
@@ -138,6 +150,8 @@
USRMANEXT = .1
MANCAT = man
END
+ use ldap && echo "LDAPLIB = -lldap" >> site.conf
+ use ssl && echo "SSLLIB = -lcrypto -lssl" >> site.conf
./configure --copts "-DPARANOIA -DEARLY_CHROOT ${CFLAGS}" \
|| die "configure failed"
@@ -152,7 +166,11 @@
src_install() {
make install DESTDIR="${D}" || die
- use doc && dodoc README RELNOTES doc/*
+ if use doc; then
+ dodoc README RELNOTES doc/*
+ use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/README.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt
+ use ldap && newdoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/LICENSE LICENSE.ldap
+ fi
insinto /etc/dhcp
newins client/dhclient.conf dhclient.conf.sample
@@ -167,6 +185,13 @@
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.schema
+ 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

View File

@ -0,0 +1,83 @@
--- /usr/portage/net-misc/dhcp/dhcp-4.0.1.ebuild 2009-03-30 15:13:28.000000000 +0200
+++ dhcp-4.0.1.ebuild 2009-07-07 21:58:00.179625641 +0200
@@ -4,22 +4,29 @@
inherit eutils flag-o-matic autotools
+LDAP_PV="4.0.1-1"
+
MY_PV="${PV//_alpha/a}"
MY_PV="${MY_PV//_beta/b}"
MY_PV="${MY_PV//_rc/rc}"
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"
+SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz
+ http://dcantrel.fedorapeople.org/dhcp/ldap-patch/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"
+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 )"
+ vim-syntax? ( app-vim/dhcpd-syntax )
+ ldap? ( net-nds/openldap
+ ssl? ( dev-libs/openssl ) )"
PROVIDE="virtual/dhcpc"
@@ -65,6 +72,9 @@
# 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"
@@ -114,6 +124,8 @@
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
--with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \
$(use_enable ipv6 dhcpv6) \
+ $(use_with ldap) \
+ $(use_with ssl ldapcrypto) \
|| die
emake || die "compile problem"
@@ -138,8 +150,11 @@
newexe "${S}"/client/scripts/freebsd dhclient-script
fi
- use doc && dodoc README RELNOTES doc/*
-
+ if use doc; then
+ dodoc README RELNOTES doc/*
+ use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/README.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt
+ use ldap && newdoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/LICENSE LICENSE.ldap
+ fi
insinto /etc/dhcp
newins client/dhclient.conf dhclient.conf.sample
keepdir /var/{lib,run}/dhcp
@@ -152,6 +167,14 @@
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.schema
+ 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
}