Gentoo Archives: gentoo-commits

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