1 |
williamh 15/02/07 17:43:26 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: dhcp-4.3.1-r1.ebuild |
5 |
Log: |
6 |
rev bump to make sure ~ gets the init script fixes |
7 |
|
8 |
(Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key 0x30C46538) |
9 |
|
10 |
Revision Changes Path |
11 |
1.262 net-misc/dhcp/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/dhcp/ChangeLog?rev=1.262&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/dhcp/ChangeLog?rev=1.262&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/dhcp/ChangeLog?r1=1.261&r2=1.262 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v |
20 |
retrieving revision 1.261 |
21 |
retrieving revision 1.262 |
22 |
diff -u -r1.261 -r1.262 |
23 |
--- ChangeLog 7 Feb 2015 07:51:39 -0000 1.261 |
24 |
+++ ChangeLog 7 Feb 2015 17:43:26 -0000 1.262 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for net-misc/dhcp |
27 |
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.261 2015/02/07 07:51:39 polynomial-c Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.262 2015/02/07 17:43:26 williamh Exp $ |
30 |
+ |
31 |
+*dhcp-4.3.1-r1 (07 Feb 2015) |
32 |
+ |
33 |
+ 07 Feb 2015; William Hubbs <williamh@g.o> +dhcp-4.3.1-r1.ebuild: |
34 |
+ rev bump to make sure ~ gets the init script fixes |
35 |
|
36 |
07 Feb 2015; Lars Wendler <polynomial-c@g.o> files/dhcpd.init5: |
37 |
Re-added the possibility to depend on slapd in the init script. |
38 |
|
39 |
|
40 |
|
41 |
1.1 net-misc/dhcp/dhcp-4.3.1-r1.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/dhcp/dhcp-4.3.1-r1.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/dhcp/dhcp-4.3.1-r1.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: dhcp-4.3.1-r1.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2015 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.3.1-r1.ebuild,v 1.1 2015/02/07 17:43:26 williamh Exp $ |
51 |
|
52 |
EAPI="4" |
53 |
|
54 |
inherit eutils systemd toolchain-funcs user |
55 |
|
56 |
MY_PV="${PV//_alpha/a}" |
57 |
MY_PV="${MY_PV//_beta/b}" |
58 |
MY_PV="${MY_PV//_rc/rc}" |
59 |
MY_PV="${MY_PV//_p/-P}" |
60 |
MY_P="${PN}-${MY_PV}" |
61 |
DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server" |
62 |
HOMEPAGE="http://www.isc.org/products/DHCP" |
63 |
SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz |
64 |
ftp://ftp.isc.org/isc/dhcp/${MY_PV}/${MY_P}.tar.gz" |
65 |
|
66 |
LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script |
67 |
SLOT="0" |
68 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
69 |
IUSE="+client ipv6 kernel_linux ldap selinux +server ssl vim-syntax" |
70 |
|
71 |
DEPEND=" |
72 |
client? ( |
73 |
kernel_linux? ( |
74 |
ipv6? ( sys-apps/iproute2 ) |
75 |
sys-apps/net-tools |
76 |
) |
77 |
) |
78 |
ldap? ( |
79 |
net-nds/openldap |
80 |
ssl? ( dev-libs/openssl ) |
81 |
)" |
82 |
RDEPEND="${DEPEND} |
83 |
selinux? ( sec-policy/selinux-dhcp ) |
84 |
vim-syntax? ( app-vim/dhcpd-syntax )" |
85 |
|
86 |
S="${WORKDIR}/${MY_P}" |
87 |
|
88 |
src_unpack() { |
89 |
unpack ${A} |
90 |
# handle local bind hell |
91 |
cd "${S}"/bind |
92 |
unpack ./bind.tar.gz |
93 |
} |
94 |
|
95 |
src_prepare() { |
96 |
# Gentoo patches - these will probably never be accepted upstream |
97 |
# Fix some permission issues |
98 |
epatch "${FILESDIR}"/${PN}-3.0-fix-perms.patch |
99 |
# Enable dhclient to equery NTP servers |
100 |
epatch "${FILESDIR}"/${PN}-4.0-dhclient-ntp.patch |
101 |
epatch "${FILESDIR}"/${PN}-4.3.1-dhclient-resolvconf.patch |
102 |
# Stop downing the interface on Linux as that breaks link daemons |
103 |
# such as wpa_supplicant and netplug |
104 |
epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-no-down.patch |
105 |
# Enable dhclient to get extra configuration from stdin |
106 |
epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-stdin-conf.patch |
107 |
epatch "${FILESDIR}"/${PN}-4.2.2-nogateway.patch #265531 |
108 |
epatch "${FILESDIR}"/${PN}-4.2.4-quieter-ping.patch #296921 |
109 |
epatch "${FILESDIR}"/${PN}-4.2.4-always-accept-4.patch #437108 |
110 |
epatch "${FILESDIR}"/${PN}-4.2.5-iproute2-path.patch #480636 |
111 |
epatch "${FILESDIR}"/${PN}-4.2.5-bindtodevice-inet6.patch #471142 |
112 |
|
113 |
# Brand the version with Gentoo |
114 |
sed -i \ |
115 |
-e "/VERSION=/s:'$: Gentoo-${PR}':" \ |
116 |
configure || die |
117 |
|
118 |
# Change the hook script locations of the scripts |
119 |
sed -i \ |
120 |
-e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ |
121 |
-e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ |
122 |
client/scripts/* || die |
123 |
|
124 |
# No need for the linux script to force bash #158540 |
125 |
sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die |
126 |
|
127 |
# Quiet the freebsd logger a little |
128 |
sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die |
129 |
|
130 |
# Remove these options from the sample config |
131 |
sed -i -r \ |
132 |
-e "/(script|host-name|domain-name) /d" \ |
133 |
client/dhclient.conf.example || die |
134 |
|
135 |
if use client && ! use server ; then |
136 |
sed -i -r \ |
137 |
-e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \ |
138 |
Makefile.in || die |
139 |
elif ! use client && use server ; then |
140 |
sed -i -r \ |
141 |
-e '/^SUBDIRS/s:\<client\>::' \ |
142 |
Makefile.in || die |
143 |
fi |
144 |
|
145 |
# Only install different man pages if we don't have en |
146 |
if [[ " ${LINGUAS} " != *" en "* ]]; then |
147 |
# Install Japanese man pages |
148 |
if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then |
149 |
einfo "Installing Japanese documention" |
150 |
cp doc/ja_JP.eucJP/dhclient* client |
151 |
cp doc/ja_JP.eucJP/dhcp* common |
152 |
fi |
153 |
fi |
154 |
# Now remove the non-english docs so there are no errors later |
155 |
rm -rf doc/ja_JP.eucJP |
156 |
|
157 |
# make the bind build work |
158 |
binddir=${S}/bind |
159 |
cd "${binddir}" || die |
160 |
cat <<-EOF > bindvar.tmp |
161 |
binddir=${binddir} |
162 |
GMAKE=${MAKE:-gmake} |
163 |
EOF |
164 |
epatch "${FILESDIR}"/${PN}-4.2.2-bind-disable.patch |
165 |
cd bind-*/ |
166 |
epatch "${FILESDIR}"/${PN}-4.2.2-bind-parallel-build.patch #380717 |
167 |
epatch "${FILESDIR}"/${PN}-4.2.2-bind-build-flags.patch |
168 |
} |
169 |
|
170 |
src_configure() { |
171 |
# bind defaults to stupid `/usr/bin/ar` |
172 |
tc-export AR BUILD_CC |
173 |
export ac_cv_path_AR=${AR} |
174 |
|
175 |
# this is tested for by the bind build system, and can cause trouble |
176 |
# when cross-building; since dhcp itself doesn't make use of libcap, |
177 |
# simply disable it. |
178 |
export ac_cv_lib_cap_cap_set_proc=no |
179 |
|
180 |
# Use FHS sane paths ... some of these have configure options, |
181 |
# but not all, so just do it all here. |
182 |
local e="/etc/dhcp" r="/var/run/dhcp" l="/var/lib/dhcp" |
183 |
cat <<-EOF >> includes/site.h |
184 |
#define _PATH_DHCPD_CONF "${e}/dhcpd.conf" |
185 |
#define _PATH_DHCLIENT_CONF "${e}/dhclient.conf" |
186 |
#define _PATH_DHCPD_DB "${l}/dhcpd.leases" |
187 |
#define _PATH_DHCPD6_DB "${l}/dhcpd6.leases" |
188 |
#define _PATH_DHCLIENT_DB "${l}/dhclient.leases" |
189 |
#define _PATH_DHCLIENT6_DB "${l}/dhclient6.leases" |
190 |
#define _PATH_DHCPD_PID "${r}/dhcpd.pid" |
191 |
#define _PATH_DHCPD6_PID "${r}/dhcpd6.pid" |
192 |
#define _PATH_DHCLIENT_PID "${r}/dhcpclient.pid" |
193 |
#define _PATH_DHCLIENT6_PID "${r}/dhcpclient6.pid" |
194 |
#define _PATH_DHCRELAY_PID "${r}/dhcrelay.pid" |
195 |
#define _PATH_DHCRELAY6_PID "${r}/dhcrelay6.pid" |
196 |
EOF |
197 |
|
198 |
econf \ |
199 |
--enable-paranoia \ |
200 |
--enable-early-chroot \ |
201 |
--sysconfdir=${e} \ |
202 |
$(use_enable ipv6 dhcpv6) \ |
203 |
$(use_with ldap) \ |
204 |
$(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto) |
205 |
|
206 |
# configure local bind cruft. symtable option requires |
207 |
# perl and we don't want to require that #383837. |
208 |
cd bind/bind-*/ || die |
209 |
eval econf \ |
210 |
$(sed -n '/ [.].configure /{s:^[^-]*::;s:>.*::;p}' ../Makefile) \ |
211 |
--disable-symtable \ |
212 |
--without-make-clean |
213 |
} |
214 |
|
215 |
src_compile() { |
216 |
# build local bind cruft first |
217 |
emake -C bind/bind-*/lib/export install |
218 |
# then build standard dhcp code |
219 |
emake AR="$(tc-getAR)" |
220 |
} |
221 |
|
222 |
src_install() { |
223 |
default |
224 |
|
225 |
dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters} |
226 |
dohtml doc/References.html |
227 |
|
228 |
if [[ -e client/dhclient ]] ; then |
229 |
# move the client to / |
230 |
dodir /sbin |
231 |
mv "${D}"/usr/sbin/dhclient "${D}"/sbin/ || die |
232 |
|
233 |
exeinto /sbin |
234 |
if use kernel_linux ; then |
235 |
newexe "${S}"/client/scripts/linux dhclient-script |
236 |
else |
237 |
newexe "${S}"/client/scripts/freebsd dhclient-script |
238 |
fi |
239 |
fi |
240 |
|
241 |
if [[ -e server/dhcpd ]] ; then |
242 |
if use ldap ; then |
243 |
insinto /etc/openldap/schema |
244 |
doins contrib/ldap/dhcp.* |
245 |
dosbin contrib/ldap/dhcpd-conf-to-ldap |
246 |
fi |
247 |
|
248 |
newinitd "${FILESDIR}"/dhcpd.init5 dhcpd |
249 |
newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd |
250 |
newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay |
251 |
newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay |
252 |
newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay6 |
253 |
newconfd "${FILESDIR}"/dhcrelay6.conf dhcrelay6 |
254 |
|
255 |
systemd_newtmpfilesd "${FILESDIR}"/dhcpd.tmpfiles dhcpd.conf |
256 |
systemd_dounit "${FILESDIR}"/dhcpd4.service |
257 |
systemd_dounit "${FILESDIR}"/dhcpd6.service |
258 |
systemd_dounit "${FILESDIR}"/dhcrelay4.service |
259 |
systemd_dounit "${FILESDIR}"/dhcrelay6.service |
260 |
systemd_install_serviced "${FILESDIR}"/dhcrelay4.service.conf |
261 |
systemd_install_serviced "${FILESDIR}"/dhcrelay6.service.conf |
262 |
|
263 |
sed -i "s:#@slapd@:$(usex ldap slapd ''):" "${ED}"/etc/init.d/* || die #442560 |
264 |
fi |
265 |
|
266 |
# the default config files aren't terribly useful #384087 |
267 |
local f |
268 |
for f in "${ED}"/etc/dhcp/*.conf.example ; do |
269 |
mv "${f}" "${f%.example}" || die |
270 |
done |
271 |
sed -i '/^[^#]/s:^:#:' "${ED}"/etc/dhcp/*.conf || die |
272 |
} |
273 |
|
274 |
pkg_preinst() { |
275 |
enewgroup dhcp |
276 |
enewuser dhcp -1 -1 /var/lib/dhcp dhcp |
277 |
|
278 |
# Keep the user files over the sample ones. The |
279 |
# hashing is to ignore the crappy defaults #384087. |
280 |
local f h |
281 |
for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do |
282 |
h=${f#*:} |
283 |
f="/etc/dhcp/${f%:*}.conf" |
284 |
if [ -e "${EROOT}"${f} ] ; then |
285 |
case $(md5sum "${EROOT}"${f}) in |
286 |
${h}*) ;; |
287 |
*) cp -p "${EROOT}"${f} "${ED}"${f};; |
288 |
esac |
289 |
fi |
290 |
done |
291 |
} |
292 |
|
293 |
pkg_postinst() { |
294 |
if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then |
295 |
ewarn |
296 |
ewarn "WARNING: The dhcp init script has been renamed to dhcpd" |
297 |
ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and" |
298 |
ewarn "and dhcp should be removed from the default runlevel" |
299 |
ewarn |
300 |
fi |
301 |
} |