Gentoo Archives: gentoo-commits

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