Gentoo Archives: gentoo-commits

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