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