1 |
chainsaw 09/03/30 13:13:28 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: dhcp-4.0.1.ebuild |
5 |
Removed: dhcp-4.0.0.ebuild |
6 |
Log: |
7 |
Version bump to 4.0.1, stdin config support for dhclient has been rediffed due to upstream changes. Still masked, deleting old ebuild. |
8 |
(Portage version: 2.1.6.11/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.153 net-misc/dhcp/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/dhcp/ChangeLog?rev=1.153&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/dhcp/ChangeLog?rev=1.153&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/dhcp/ChangeLog?r1=1.152&r2=1.153 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v |
20 |
retrieving revision 1.152 |
21 |
retrieving revision 1.153 |
22 |
diff -u -r1.152 -r1.153 |
23 |
--- ChangeLog 26 Oct 2008 03:45:20 -0000 1.152 |
24 |
+++ ChangeLog 30 Mar 2009 13:13:28 -0000 1.153 |
25 |
@@ -1,6 +1,14 @@ |
26 |
# ChangeLog for net-misc/dhcp |
27 |
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.152 2008/10/26 03:45:20 vapier Exp $ |
29 |
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 |
30 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.153 2009/03/30 13:13:28 chainsaw Exp $ |
31 |
+ |
32 |
+*dhcp-4.0.1 (30 Mar 2009) |
33 |
+ |
34 |
+ 30 Mar 2009; <chainsaw@g.o> |
35 |
+ +files/dhcp-4.0.1-dhclient-stdin-conf.patch, -dhcp-4.0.0.ebuild, |
36 |
+ +dhcp-4.0.1.ebuild: |
37 |
+ Version bump to 4.0.1, stdin config support for dhclient has been rediffed |
38 |
+ due to upstream changes. Still masked, deleting old ebuild. |
39 |
|
40 |
26 Oct 2008; Mike Frysinger <vapier@g.o> dhcp-4.0.0.ebuild: |
41 |
Pull in app-vim/dhcpd-syntax with USE=vim-syntax #240192 by Dan Wallis. |
42 |
|
43 |
|
44 |
|
45 |
1.1 net-misc/dhcp/dhcp-4.0.1.ebuild |
46 |
|
47 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/dhcp/dhcp-4.0.1.ebuild?rev=1.1&view=markup |
48 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/dhcp/dhcp-4.0.1.ebuild?rev=1.1&content-type=text/plain |
49 |
|
50 |
Index: dhcp-4.0.1.ebuild |
51 |
=================================================================== |
52 |
# Copyright 1999-2009 Gentoo Foundation |
53 |
# Distributed under the terms of the GNU General Public License v2 |
54 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.0.1.ebuild,v 1.1 2009/03/30 13:13:28 chainsaw Exp $ |
55 |
|
56 |
inherit eutils flag-o-matic autotools |
57 |
|
58 |
MY_PV="${PV//_alpha/a}" |
59 |
MY_PV="${MY_PV//_beta/b}" |
60 |
MY_PV="${MY_PV//_rc/rc}" |
61 |
MY_P="${PN}-${MY_PV}" |
62 |
DESCRIPTION="ISC Dynamic Host Configuration Protocol" |
63 |
HOMEPAGE="http://www.isc.org/products/DHCP" |
64 |
SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz" |
65 |
|
66 |
LICENSE="isc-dhcp" |
67 |
SLOT="0" |
68 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" |
69 |
IUSE="doc ipv6 selinux kernel_linux vim-syntax" |
70 |
|
71 |
DEPEND="selinux? ( sec-policy/selinux-dhcp ) |
72 |
kernel_linux? ( sys-apps/net-tools ) |
73 |
vim-syntax? ( app-vim/dhcpd-syntax )" |
74 |
|
75 |
PROVIDE="virtual/dhcpc" |
76 |
|
77 |
S="${WORKDIR}/${MY_P}" |
78 |
|
79 |
src_unpack() { |
80 |
unpack ${A} |
81 |
cd "${S}" |
82 |
|
83 |
# Gentoo patches - these will probably never be accepted upstream |
84 |
# Enable chroot support |
85 |
epatch "${FILESDIR}/${PN}"-4.0-paranoia.patch |
86 |
# Fix some permission issues |
87 |
epatch "${FILESDIR}/${PN}"-3.0-fix-perms.patch |
88 |
# Enable dhclient to equery NTP servers |
89 |
epatch "${FILESDIR}/${PN}"-4.0-dhclient-ntp.patch |
90 |
# resolvconf support in dhclient-script |
91 |
epatch "${FILESDIR}/${PN}"-4.0-dhclient-resolvconf.patch |
92 |
# Fix setting hostnames on Linux |
93 |
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-hostname.patch |
94 |
# Allow mtu settings |
95 |
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-mtu.patch |
96 |
# Allow dhclient to use IF_METRIC to set route metrics |
97 |
epatch "${FILESDIR}/${PN}"-4.0-dhclient-metric.patch |
98 |
# Stop downing the interface on Linux as that breaks link daemons |
99 |
# such as wpa_supplicant and netplug |
100 |
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-no-down.patch |
101 |
# Quiet the isc blurb |
102 |
epatch "${FILESDIR}/${PN}"-4.0-no_isc_blurb.patch |
103 |
# Enable dhclient to get extra configuration from stdin |
104 |
epatch "${FILESDIR}/${PN}"-4.0.1-dhclient-stdin-conf.patch |
105 |
# Disable fallback interfaces when using BPF |
106 |
# This allows more than one dhclient instance on the BSD's |
107 |
epatch "${FILESDIR}/${PN}"-3.0.5-bpf-nofallback.patch |
108 |
# This allows the software to actually compile on linux |
109 |
epatch "${FILESDIR}/${PN}"-4.0-linux-ipv6-header.patch |
110 |
# Consistent style for the if statements, also resolves |
111 |
# unary operator expected warnings (new style is wrong). |
112 |
epatch "${FILESDIR}/${PN}"-4.0-dhclient-script-correct-operators.patch |
113 |
|
114 |
# NetworkManager support patches |
115 |
# If they fail to apply to future versions they will be dropped |
116 |
# Add dbus support to dhclient |
117 |
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch |
118 |
|
119 |
# Brand the version with Gentoo |
120 |
# include revision if >0 |
121 |
local newver="Gentoo" |
122 |
[[ ${PR} != "r0" ]] && newver="${newver}-${PR}" |
123 |
|
124 |
sed -i "/AC_INIT/s/\(\[[0-9]\+\.[0-9]\+\.[0-9]\+\)/\1-${newver}/" \ |
125 |
configure.ac || die |
126 |
|
127 |
# Change the hook script locations of the scripts |
128 |
sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ |
129 |
-e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ |
130 |
client/scripts/* || die |
131 |
|
132 |
# No need for the linux script to force bash, #158540. |
133 |
sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die |
134 |
|
135 |
# Quiet the freebsd logger a little |
136 |
sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die |
137 |
|
138 |
# Remove these options from the sample config |
139 |
sed -i -e "/\(script\|host-name\|domain-name\) / d" \ |
140 |
client/dhclient.conf || die |
141 |
|
142 |
# Only install different man pages if we don't have en |
143 |
if [[ " ${LINGUAS} " != *" en "* ]]; then |
144 |
# Install Japanese man pages |
145 |
if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then |
146 |
einfo "Installing Japanese documention" |
147 |
cp doc/ja_JP.eucJP/dhclient* client |
148 |
cp doc/ja_JP.eucJP/dhcp* common |
149 |
fi |
150 |
fi |
151 |
|
152 |
# Now remove the non-english docs so there are no errors later |
153 |
[[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP |
154 |
|
155 |
eautoreconf |
156 |
} |
157 |
|
158 |
src_compile() { |
159 |
econf \ |
160 |
--enable-paranoia \ |
161 |
--sysconfdir /etc/dhcp \ |
162 |
--with-cli-pid-file=/var/run/dhcp/dhclient.pid \ |
163 |
--with-cli-lease-file=/var/lib/dhcp/dhclient.leases \ |
164 |
--with-srv-pid-file=/var/run/dhcp/dhcpd.pid \ |
165 |
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \ |
166 |
--with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \ |
167 |
$(use_enable ipv6 dhcpv6) \ |
168 |
|| die |
169 |
|
170 |
emake || die "compile problem" |
171 |
} |
172 |
|
173 |
src_install() { |
174 |
for installdir in includes tests common minires dst omapip client dhcpctl relay server; do |
175 |
cd "${S}/${installdir}" |
176 |
if [ "${installdir}" == client ]; then |
177 |
make install DESTDIR="${D}" exec_prefix="" || die |
178 |
else |
179 |
make install DESTDIR="${D}" exec_prefix="/usr" || die |
180 |
fi |
181 |
done |
182 |
|
183 |
cd "${S}" |
184 |
|
185 |
exeinto /sbin |
186 |
if use kernel_linux; then |
187 |
newexe "${S}"/client/scripts/linux dhclient-script |
188 |
else |
189 |
newexe "${S}"/client/scripts/freebsd dhclient-script |
190 |
fi |
191 |
|
192 |
use doc && dodoc README RELNOTES doc/* |
193 |
|
194 |
insinto /etc/dhcp |
195 |
newins client/dhclient.conf dhclient.conf.sample |
196 |
keepdir /var/{lib,run}/dhcp |
197 |
|
198 |
# Install our server files |
199 |
insinto /etc/dhcp |
200 |
newins server/dhcpd.conf dhcpd.conf.sample |
201 |
newinitd "${FILESDIR}"/dhcpd.init dhcpd |
202 |
newinitd "${FILESDIR}"/dhcrelay.init dhcrelay |
203 |
newconfd "${FILESDIR}"/dhcpd.conf dhcpd |
204 |
newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay |
205 |
|
206 |
# We never want portage to own this file |
207 |
rm -f "${D}"/var/lib/dhcp/dhcpd.leases |
208 |
} |
209 |
|
210 |
pkg_preinst() { |
211 |
enewgroup dhcp |
212 |
enewuser dhcp -1 -1 /var/lib/dhcp dhcp |
213 |
} |
214 |
|
215 |
pkg_postinst() { |
216 |
chown dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp |
217 |
|
218 |
if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then |
219 |
ewarn |
220 |
ewarn "WARNING: The dhcp init script has been renamed to dhcpd" |
221 |
ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and" |
222 |
ewarn "and dhcp should be removed from the default runlevel" |
223 |
ewarn |
224 |
fi |
225 |
|
226 |
einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings." |
227 |
einfo |
228 |
einfo "If you would like to run dhcpd in a chroot, simply configure the" |
229 |
einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:" |
230 |
einfo " emerge --config =${PF}" |
231 |
} |
232 |
|
233 |
pkg_config() { |
234 |
local CHROOT="$( |
235 |
sed -n -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \ |
236 |
"${ROOT}"/etc/conf.d/dhcpd |
237 |
)" |
238 |
|
239 |
if [[ -z ${CHROOT} ]]; then |
240 |
eerror "CHROOT not defined in /etc/conf.d/dhcpd" |
241 |
return 1 |
242 |
fi |
243 |
|
244 |
CHROOT="${ROOT}/${CHROOT}" |
245 |
|
246 |
if [[ -d ${CHROOT} ]] ; then |
247 |
ewarn "${CHROOT} already exists - aborting" |
248 |
return 0 |
249 |
fi |
250 |
|
251 |
ebegin "Setting up the chroot directory" |
252 |
mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp} |
253 |
cp /etc/{localtime,resolv.conf} "${CHROOT}"/etc |
254 |
cp -R /etc/dhcp "${CHROOT}"/etc |
255 |
cp -R /var/lib/dhcp "${CHROOT}"/var/lib |
256 |
ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib |
257 |
chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp |
258 |
eend 0 |
259 |
|
260 |
local logger="$(best_version virtual/logger)" |
261 |
einfo "To enable logging from the dhcpd server, configure your" |
262 |
einfo "logger (${logger}) to listen on ${CHROOT}/dev/log" |
263 |
} |