1 |
commit: ddd00a465915ad9ac6aaeabebf800bfb39d9b3ce |
2 |
Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com> |
3 |
AuthorDate: Thu Jan 28 19:19:00 2021 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 28 19:19:00 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddd00a46 |
7 |
|
8 |
net-dns/dnsmasq: REmove old (security bug #766126) |
9 |
|
10 |
Bug: https://bugs.gentoo.org/766126 |
11 |
Copyright: Sony Interactive Entertainment Inc. |
12 |
Package-Manager: Portage-3.0.14, Repoman-3.0.2 |
13 |
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> |
14 |
|
15 |
net-dns/dnsmasq/Manifest | 2 - |
16 |
net-dns/dnsmasq/dnsmasq-2.81.ebuild | 207 ------------------------------ |
17 |
net-dns/dnsmasq/dnsmasq-2.82-r100.ebuild | 210 ------------------------------- |
18 |
net-dns/dnsmasq/dnsmasq-2.82.ebuild | 205 ------------------------------ |
19 |
4 files changed, 624 deletions(-) |
20 |
|
21 |
diff --git a/net-dns/dnsmasq/Manifest b/net-dns/dnsmasq/Manifest |
22 |
index 5c828b66a97..8d32f2d0f7f 100644 |
23 |
--- a/net-dns/dnsmasq/Manifest |
24 |
+++ b/net-dns/dnsmasq/Manifest |
25 |
@@ -1,4 +1,2 @@ |
26 |
-DIST dnsmasq-2.81.tar.xz 510648 BLAKE2B 07861888df11f6e2e02d1b80f4e82a407b558ddb34e016f7bda5cb449ee870db000683264b2e36987ece16d50ab773f239bf12dd3468b9529ae4dccd77ecb8ee SHA512 85550c9782fef9b0710d0e233523ed1fe26e877a8bc53fcea3f7cf1fb17c3a79c46f284a99dab2bdaf6a107ea3f1a71cec476ab6d4e1b936da6591aaef42c88e |
27 |
-DIST dnsmasq-2.82.tar.xz 509904 BLAKE2B 4df3778b2ec6775a6147f66d53b8dd7068d97872c6e5d3a16716faeb0ca489331560c77d6fa9cc913af0d7e0320a6ef463c690bb9e3fdbd8c266ed273e5a5403 SHA512 faf36efdaa3abe84994e46aea018b0a324218d42814baac056ca635f6d03f1301e7b4d958f92b272a8e3a7ac358f3a4e2606129a217587b471aedb3ce23e903b |
28 |
DIST dnsmasq-2.83.tar.xz 513880 BLAKE2B 16220fd7eac03f3ba70b014ace3c9775a85b31cdbabd7680d88a87697453a54bfec4c553207477f416032e679dbdaf3ca6c8bb56b72ee423540e0bedf0621865 SHA512 1eaade775dc19658afe825407c10456ab954b82034644bb19af2594d737ceae17ff2cee7f1f917e8e8b2dadbfbcb83dd8b842c0693fcac71487a5fade1eb4b05 |
29 |
DIST dnsmasq-2.84.tar.xz 514216 BLAKE2B 2bca97c16bcf32e0126eb50dc14b82a1f37e1635ebd1dc205e9a92455640fcbb98c093be725768ba9ced84443e451775f8556a164c82967e09e1df4bf7fc901b SHA512 e84bdcdf3cf35f08e8492eb5aa89ee6543233bdb821d01f164783bd6d0913ec01c513e85e2109352c77e77142a1a94bedcd3361f37d7b2a9a5d35a02448e85c6 |
30 |
|
31 |
diff --git a/net-dns/dnsmasq/dnsmasq-2.81.ebuild b/net-dns/dnsmasq/dnsmasq-2.81.ebuild |
32 |
deleted file mode 100644 |
33 |
index 65d59e4c5c9..00000000000 |
34 |
--- a/net-dns/dnsmasq/dnsmasq-2.81.ebuild |
35 |
+++ /dev/null |
36 |
@@ -1,207 +0,0 @@ |
37 |
-# Copyright 1999-2020 Gentoo Authors |
38 |
-# Distributed under the terms of the GNU General Public License v2 |
39 |
- |
40 |
-EAPI=7 |
41 |
- |
42 |
-inherit toolchain-funcs flag-o-matic systemd |
43 |
- |
44 |
-DESCRIPTION="Small forwarding DNS server" |
45 |
-HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html" |
46 |
-SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz" |
47 |
- |
48 |
-LICENSE="|| ( GPL-2 GPL-3 )" |
49 |
-SLOT="0" |
50 |
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86" |
51 |
- |
52 |
-IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec +dumpfile id idn libidn2" |
53 |
-IUSE+=" +inotify ipv6 lua nls script selinux static tftp" |
54 |
- |
55 |
-DM_LINGUAS=(de es fi fr id it no pl pt_BR ro) |
56 |
- |
57 |
-BDEPEND=" |
58 |
- app-arch/xz-utils |
59 |
- virtual/pkgconfig |
60 |
- nls? ( sys-devel/gettext ) |
61 |
-" |
62 |
- |
63 |
-COMMON_DEPEND=" |
64 |
- acct-group/dnsmasq |
65 |
- acct-user/dnsmasq |
66 |
- dbus? ( sys-apps/dbus:= ) |
67 |
- idn? ( |
68 |
- !libidn2? ( net-dns/libidn:0= ) |
69 |
- libidn2? ( >=net-dns/libidn2-2.0:= ) |
70 |
- ) |
71 |
- lua? ( dev-lang/lua:0= ) |
72 |
- conntrack? ( net-libs/libnetfilter_conntrack:= ) |
73 |
- nls? ( sys-devel/gettext ) |
74 |
-" |
75 |
- |
76 |
-DEPEND="${COMMON_DEPEND} |
77 |
- dnssec? ( |
78 |
- dev-libs/nettle:=[gmp] |
79 |
- static? ( >=dev-libs/nettle-3.4[static-libs(+)] ) |
80 |
- ) |
81 |
-" |
82 |
- |
83 |
-RDEPEND="${COMMON_DEPEND} |
84 |
- dnssec? ( |
85 |
- !static? ( >=dev-libs/nettle-3.4:=[gmp] ) |
86 |
- ) |
87 |
- selinux? ( sec-policy/selinux-dnsmasq ) |
88 |
-" |
89 |
- |
90 |
-REQUIRED_USE=" |
91 |
- dhcp-tools? ( dhcp ) |
92 |
- lua? ( script ) |
93 |
- libidn2? ( idn )" |
94 |
- |
95 |
-use_have() { |
96 |
- local useflag no_only uword |
97 |
- if [[ ${1} == '-n' ]]; then |
98 |
- no_only=1 |
99 |
- shift |
100 |
- fi |
101 |
- useflag="${1}" |
102 |
- shift |
103 |
- |
104 |
- uword="${1:-${useflag}}" |
105 |
- shift |
106 |
- |
107 |
- while [[ ${uword} ]]; do |
108 |
- uword="${uword^^}" |
109 |
- |
110 |
- if ! use "${useflag}"; then |
111 |
- printf -- " -DNO_%s" "${uword}" |
112 |
- elif [[ -z "${no_only}" ]]; then |
113 |
- printf -- " -DHAVE_%s" "${uword}" |
114 |
- fi |
115 |
- uword="${1}" |
116 |
- shift |
117 |
- done |
118 |
-} |
119 |
- |
120 |
-pkg_pretend() { |
121 |
- if use static; then |
122 |
- einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked." |
123 |
- use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense;" \ |
124 |
- "in this case the static USE flag does nothing." |
125 |
- fi |
126 |
-} |
127 |
- |
128 |
-src_prepare() { |
129 |
- default |
130 |
- |
131 |
- sed -i -r 's:lua5.[0-9]+:lua:' Makefile || die |
132 |
- sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" \ |
133 |
- dnsmasq.conf.example || die |
134 |
-} |
135 |
- |
136 |
-src_configure() { |
137 |
- COPTS=( |
138 |
- "$(use_have -n auth-dns auth)" |
139 |
- "$(use_have conntrack)" |
140 |
- "$(use_have dbus)" |
141 |
- "$(use libidn2 || use_have idn)" |
142 |
- "$(use_have libidn2)" |
143 |
- "$(use_have -n inotify)" |
144 |
- "$(use_have -n dhcp dhcp dhcp6)" |
145 |
- "$(use_have -n ipv6 ipv6 dhcp6)" |
146 |
- "$(use_have -n id id)" |
147 |
- "$(use_have lua luascript)" |
148 |
- "$(use_have -n script)" |
149 |
- "$(use_have -n tftp)" |
150 |
- "$(use_have dnssec)" |
151 |
- "$(use_have static dnssec_static)" |
152 |
- "$(use_have -n dumpfile)" |
153 |
- ) |
154 |
-} |
155 |
- |
156 |
-src_compile() { |
157 |
- emake \ |
158 |
- PREFIX=/usr \ |
159 |
- MANDIR=/usr/share/man \ |
160 |
- CC="$(tc-getCC)" \ |
161 |
- PKG_CONFIG="$(tc-getPKG_CONFIG)" \ |
162 |
- CFLAGS="${CFLAGS}" \ |
163 |
- LDFLAGS="${LDFLAGS}" \ |
164 |
- COPTS="${COPTS[*]}" \ |
165 |
- CONFFILE="/etc/${PN}.conf" \ |
166 |
- all$(use nls && printf -- "-i18n\n") |
167 |
- |
168 |
- use dhcp-tools && emake -C contrib/lease-tools \ |
169 |
- PREFIX=/usr \ |
170 |
- MANDIR=/usr/share/man \ |
171 |
- CC="$(tc-getCC)" \ |
172 |
- PKG_CONFIG="$(tc-getPKG_CONFIG)" \ |
173 |
- CFLAGS="${CFLAGS}" \ |
174 |
- LDFLAGS="${LDFLAGS}" \ |
175 |
- all |
176 |
-} |
177 |
- |
178 |
-src_install() { |
179 |
- local lingua puid |
180 |
- emake \ |
181 |
- PREFIX=/usr \ |
182 |
- MANDIR=/usr/share/man \ |
183 |
- COPTS="${COPTS[*]}" \ |
184 |
- DESTDIR="${ED}" \ |
185 |
- install$(use nls && printf -- "-i18n\n") |
186 |
- |
187 |
- for lingua in "${DM_LINGUAS[@]}"; do |
188 |
- has ${lingua} ${LINGUAS-${lingua}} \ |
189 |
- || rm -rf "${ED}"/usr/share/locale/${lingua} |
190 |
- done |
191 |
- [[ -d "${D}"/usr/share/locale/ ]] && \ |
192 |
- rmdir --ignore-fail-on-non-empty "${ED}"/usr/share/locale/ |
193 |
- |
194 |
- dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example |
195 |
- dodoc -r logo |
196 |
- |
197 |
- docinto html/ |
198 |
- dodoc *.html |
199 |
- |
200 |
- newinitd "${FILESDIR}"/dnsmasq-init-r4 ${PN} |
201 |
- newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN} |
202 |
- |
203 |
- insinto /etc/logrotate.d |
204 |
- newins "${FILESDIR}"/dnsmasq.logrotate ${PN} |
205 |
- |
206 |
- insinto /etc |
207 |
- newins dnsmasq.conf.example dnsmasq.conf |
208 |
- |
209 |
- insinto /usr/share/dnsmasq |
210 |
- doins trust-anchors.conf |
211 |
- |
212 |
- if use dhcp; then |
213 |
- keepdir /var/lib/misc |
214 |
- newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r3 ${PN} |
215 |
- fi |
216 |
- if use dbus; then |
217 |
- insinto /etc/dbus-1/system.d |
218 |
- doins dbus/dnsmasq.conf |
219 |
- fi |
220 |
- |
221 |
- if use dhcp-tools; then |
222 |
- dosbin contrib/lease-tools/{dhcp_release,dhcp_lease_time} |
223 |
- doman contrib/lease-tools/{dhcp_release,dhcp_lease_time}.1 |
224 |
- if use ipv6; then |
225 |
- dosbin contrib/lease-tools/dhcp_release6 |
226 |
- doman contrib/lease-tools/dhcp_release6.1 |
227 |
- fi |
228 |
- fi |
229 |
- |
230 |
- systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service |
231 |
-} |
232 |
- |
233 |
-pkg_preinst() { |
234 |
- # temporary workaround to (hopefully) prevent leases file from being removed |
235 |
- [[ -f /var/lib/misc/dnsmasq.leases ]] && \ |
236 |
- cp /var/lib/misc/dnsmasq.leases "${T}" |
237 |
-} |
238 |
- |
239 |
-pkg_postinst() { |
240 |
- # temporary workaround to (hopefully) prevent leases file from being removed |
241 |
- [[ -f "${T}"/dnsmasq.leases ]] && \ |
242 |
- cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases |
243 |
-} |
244 |
|
245 |
diff --git a/net-dns/dnsmasq/dnsmasq-2.82-r100.ebuild b/net-dns/dnsmasq/dnsmasq-2.82-r100.ebuild |
246 |
deleted file mode 100644 |
247 |
index 281fb8d29b5..00000000000 |
248 |
--- a/net-dns/dnsmasq/dnsmasq-2.82-r100.ebuild |
249 |
+++ /dev/null |
250 |
@@ -1,210 +0,0 @@ |
251 |
-# Copyright 1999-2021 Gentoo Authors |
252 |
-# Distributed under the terms of the GNU General Public License v2 |
253 |
- |
254 |
-EAPI=7 |
255 |
- |
256 |
-LUA_COMPAT=( lua5-{1..4} luajit ) |
257 |
- |
258 |
-inherit toolchain-funcs flag-o-matic lua-single systemd |
259 |
- |
260 |
-DESCRIPTION="Small forwarding DNS server" |
261 |
-HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html" |
262 |
-SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz" |
263 |
- |
264 |
-LICENSE="|| ( GPL-2 GPL-3 )" |
265 |
-SLOT="0" |
266 |
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86" |
267 |
- |
268 |
-IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec +dumpfile id idn libidn2" |
269 |
-IUSE+=" +inotify ipv6 lua nls script selinux static tftp" |
270 |
- |
271 |
-DM_LINGUAS=(de es fi fr id it no pl pt_BR ro) |
272 |
- |
273 |
-BDEPEND=" |
274 |
- app-arch/xz-utils |
275 |
- virtual/pkgconfig |
276 |
- nls? ( sys-devel/gettext ) |
277 |
-" |
278 |
- |
279 |
-COMMON_DEPEND=" |
280 |
- acct-group/dnsmasq |
281 |
- acct-user/dnsmasq |
282 |
- dbus? ( sys-apps/dbus:= ) |
283 |
- idn? ( |
284 |
- !libidn2? ( net-dns/libidn:0= ) |
285 |
- libidn2? ( >=net-dns/libidn2-2.0:= ) |
286 |
- ) |
287 |
- lua? ( ${LUA_DEPS} ) |
288 |
- conntrack? ( net-libs/libnetfilter_conntrack:= ) |
289 |
- nls? ( sys-devel/gettext ) |
290 |
-" |
291 |
- |
292 |
-DEPEND="${COMMON_DEPEND} |
293 |
- dnssec? ( |
294 |
- dev-libs/nettle:=[gmp] |
295 |
- static? ( >=dev-libs/nettle-3.4[static-libs(+)] ) |
296 |
- ) |
297 |
-" |
298 |
- |
299 |
-RDEPEND="${COMMON_DEPEND} |
300 |
- dnssec? ( |
301 |
- !static? ( >=dev-libs/nettle-3.4:=[gmp] ) |
302 |
- ) |
303 |
- selinux? ( sec-policy/selinux-dnsmasq ) |
304 |
-" |
305 |
- |
306 |
-REQUIRED_USE=" |
307 |
- dhcp-tools? ( dhcp ) |
308 |
- lua? ( |
309 |
- script |
310 |
- ${LUA_REQUIRED_USE} |
311 |
- ) |
312 |
- libidn2? ( idn )" |
313 |
- |
314 |
-use_have() { |
315 |
- local no_only |
316 |
- if [[ ${1} == '-n' ]]; then |
317 |
- no_only=1 |
318 |
- shift |
319 |
- fi |
320 |
- local useflag="${1}" |
321 |
- shift |
322 |
- |
323 |
- local uword="${1:-${useflag}}" |
324 |
- shift |
325 |
- |
326 |
- while [[ ${uword} ]]; do |
327 |
- uword="${uword^^}" |
328 |
- |
329 |
- if ! use "${useflag}"; then |
330 |
- printf -- " -DNO_%s" "${uword}" |
331 |
- elif [[ -z "${no_only}" ]]; then |
332 |
- printf -- " -DHAVE_%s" "${uword}" |
333 |
- fi |
334 |
- uword="${1}" |
335 |
- shift |
336 |
- done |
337 |
-} |
338 |
- |
339 |
-pkg_pretend() { |
340 |
- if use static; then |
341 |
- einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked." |
342 |
- use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense;" \ |
343 |
- "in this case the static USE flag does nothing." |
344 |
- fi |
345 |
-} |
346 |
- |
347 |
-src_prepare() { |
348 |
- default |
349 |
- |
350 |
- sed -i -r 's:lua5.[0-9]+:lua:' Makefile || die |
351 |
- sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" \ |
352 |
- dnsmasq.conf.example || die |
353 |
-} |
354 |
- |
355 |
-src_configure() { |
356 |
- COPTS=( |
357 |
- $(use_have -n auth-dns auth) |
358 |
- $(use_have conntrack) |
359 |
- $(use_have dbus) |
360 |
- $(use libidn2 || use_have idn) |
361 |
- $(use_have libidn2) |
362 |
- $(use_have -n inotify) |
363 |
- $(use_have -n dhcp dhcp dhcp6) |
364 |
- $(use_have -n ipv6 ipv6 dhcp6) |
365 |
- $(use_have -n id id) |
366 |
- $(use_have lua luascript) |
367 |
- $(use_have -n script) |
368 |
- $(use_have -n tftp) |
369 |
- $(use_have dnssec) |
370 |
- $(use_have static dnssec_static) |
371 |
- $(use_have -n dumpfile) |
372 |
- ) |
373 |
-} |
374 |
- |
375 |
-src_compile() { |
376 |
- emake \ |
377 |
- PREFIX=/usr \ |
378 |
- MANDIR=/usr/share/man \ |
379 |
- CC="$(tc-getCC)" \ |
380 |
- PKG_CONFIG="$(tc-getPKG_CONFIG)" \ |
381 |
- CFLAGS="${CFLAGS}" \ |
382 |
- LDFLAGS="${LDFLAGS}" \ |
383 |
- COPTS="${COPTS[*]}" \ |
384 |
- CONFFILE="/etc/${PN}.conf" \ |
385 |
- all$(use nls && printf -- "-i18n\n") |
386 |
- |
387 |
- use dhcp-tools && emake -C contrib/lease-tools \ |
388 |
- PREFIX=/usr \ |
389 |
- MANDIR=/usr/share/man \ |
390 |
- CC="$(tc-getCC)" \ |
391 |
- PKG_CONFIG="$(tc-getPKG_CONFIG)" \ |
392 |
- CFLAGS="${CFLAGS}" \ |
393 |
- LDFLAGS="${LDFLAGS}" \ |
394 |
- all |
395 |
-} |
396 |
- |
397 |
-src_install() { |
398 |
- local lingua puid |
399 |
- emake \ |
400 |
- PREFIX=/usr \ |
401 |
- MANDIR=/usr/share/man \ |
402 |
- COPTS="${COPTS[*]}" \ |
403 |
- DESTDIR="${ED}" \ |
404 |
- install$(use nls && printf -- "-i18n\n") |
405 |
- |
406 |
- for lingua in "${DM_LINGUAS[@]}"; do |
407 |
- has ${lingua} ${LINGUAS-${lingua}} \ |
408 |
- || rm -rf "${ED}"/usr/share/locale/${lingua} |
409 |
- done |
410 |
- [[ -d "${D}"/usr/share/locale/ ]] && \ |
411 |
- rmdir --ignore-fail-on-non-empty "${ED}"/usr/share/locale/ |
412 |
- |
413 |
- dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example |
414 |
- dodoc -r logo |
415 |
- |
416 |
- docinto html/ |
417 |
- dodoc *.html |
418 |
- |
419 |
- newinitd "${FILESDIR}"/dnsmasq-init-r4 ${PN} |
420 |
- newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN} |
421 |
- |
422 |
- insinto /etc/logrotate.d |
423 |
- newins "${FILESDIR}"/dnsmasq.logrotate ${PN} |
424 |
- |
425 |
- insinto /etc |
426 |
- newins dnsmasq.conf.example dnsmasq.conf |
427 |
- |
428 |
- insinto /usr/share/dnsmasq |
429 |
- doins trust-anchors.conf |
430 |
- |
431 |
- if use dhcp; then |
432 |
- keepdir /var/lib/misc |
433 |
- newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r3 ${PN} |
434 |
- fi |
435 |
- if use dbus; then |
436 |
- insinto /etc/dbus-1/system.d |
437 |
- doins dbus/dnsmasq.conf |
438 |
- fi |
439 |
- |
440 |
- if use dhcp-tools; then |
441 |
- dosbin contrib/lease-tools/{dhcp_release,dhcp_lease_time} |
442 |
- doman contrib/lease-tools/{dhcp_release,dhcp_lease_time}.1 |
443 |
- if use ipv6; then |
444 |
- dosbin contrib/lease-tools/dhcp_release6 |
445 |
- doman contrib/lease-tools/dhcp_release6.1 |
446 |
- fi |
447 |
- fi |
448 |
- |
449 |
- systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service |
450 |
-} |
451 |
- |
452 |
-pkg_preinst() { |
453 |
- [[ -f /var/lib/misc/dnsmasq.leases ]] && \ |
454 |
- cp /var/lib/misc/dnsmasq.leases "${T}" |
455 |
-} |
456 |
- |
457 |
-pkg_postinst() { |
458 |
- [[ -f "${T}"/dnsmasq.leases ]] && \ |
459 |
- cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases |
460 |
-} |
461 |
|
462 |
diff --git a/net-dns/dnsmasq/dnsmasq-2.82.ebuild b/net-dns/dnsmasq/dnsmasq-2.82.ebuild |
463 |
deleted file mode 100644 |
464 |
index d361cafdfba..00000000000 |
465 |
--- a/net-dns/dnsmasq/dnsmasq-2.82.ebuild |
466 |
+++ /dev/null |
467 |
@@ -1,205 +0,0 @@ |
468 |
-# Copyright 1999-2020 Gentoo Authors |
469 |
-# Distributed under the terms of the GNU General Public License v2 |
470 |
- |
471 |
-EAPI=7 |
472 |
- |
473 |
-inherit toolchain-funcs flag-o-matic systemd |
474 |
- |
475 |
-DESCRIPTION="Small forwarding DNS server" |
476 |
-HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html" |
477 |
-SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz" |
478 |
- |
479 |
-LICENSE="|| ( GPL-2 GPL-3 )" |
480 |
-SLOT="0" |
481 |
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86" |
482 |
- |
483 |
-IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec +dumpfile id idn libidn2" |
484 |
-IUSE+=" +inotify ipv6 lua nls script selinux static tftp" |
485 |
- |
486 |
-DM_LINGUAS=(de es fi fr id it no pl pt_BR ro) |
487 |
- |
488 |
-BDEPEND=" |
489 |
- app-arch/xz-utils |
490 |
- virtual/pkgconfig |
491 |
- nls? ( sys-devel/gettext ) |
492 |
-" |
493 |
- |
494 |
-COMMON_DEPEND=" |
495 |
- acct-group/dnsmasq |
496 |
- acct-user/dnsmasq |
497 |
- dbus? ( sys-apps/dbus:= ) |
498 |
- idn? ( |
499 |
- !libidn2? ( net-dns/libidn:0= ) |
500 |
- libidn2? ( >=net-dns/libidn2-2.0:= ) |
501 |
- ) |
502 |
- lua? ( dev-lang/lua:0= ) |
503 |
- conntrack? ( net-libs/libnetfilter_conntrack:= ) |
504 |
- nls? ( sys-devel/gettext ) |
505 |
-" |
506 |
- |
507 |
-DEPEND="${COMMON_DEPEND} |
508 |
- dnssec? ( |
509 |
- dev-libs/nettle:=[gmp] |
510 |
- static? ( >=dev-libs/nettle-3.4[static-libs(+)] ) |
511 |
- ) |
512 |
-" |
513 |
- |
514 |
-RDEPEND="${COMMON_DEPEND} |
515 |
- dnssec? ( |
516 |
- !static? ( >=dev-libs/nettle-3.4:=[gmp] ) |
517 |
- ) |
518 |
- selinux? ( sec-policy/selinux-dnsmasq ) |
519 |
-" |
520 |
- |
521 |
-REQUIRED_USE=" |
522 |
- dhcp-tools? ( dhcp ) |
523 |
- lua? ( script ) |
524 |
- libidn2? ( idn )" |
525 |
- |
526 |
-use_have() { |
527 |
- local no_only |
528 |
- if [[ ${1} == '-n' ]]; then |
529 |
- no_only=1 |
530 |
- shift |
531 |
- fi |
532 |
- local useflag="${1}" |
533 |
- shift |
534 |
- |
535 |
- local uword="${1:-${useflag}}" |
536 |
- shift |
537 |
- |
538 |
- while [[ ${uword} ]]; do |
539 |
- uword="${uword^^}" |
540 |
- |
541 |
- if ! use "${useflag}"; then |
542 |
- printf -- " -DNO_%s" "${uword}" |
543 |
- elif [[ -z "${no_only}" ]]; then |
544 |
- printf -- " -DHAVE_%s" "${uword}" |
545 |
- fi |
546 |
- uword="${1}" |
547 |
- shift |
548 |
- done |
549 |
-} |
550 |
- |
551 |
-pkg_pretend() { |
552 |
- if use static; then |
553 |
- einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked." |
554 |
- use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense;" \ |
555 |
- "in this case the static USE flag does nothing." |
556 |
- fi |
557 |
-} |
558 |
- |
559 |
-src_prepare() { |
560 |
- default |
561 |
- |
562 |
- sed -i -r 's:lua5.[0-9]+:lua:' Makefile || die |
563 |
- sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" \ |
564 |
- dnsmasq.conf.example || die |
565 |
-} |
566 |
- |
567 |
-src_configure() { |
568 |
- COPTS=( |
569 |
- $(use_have -n auth-dns auth) |
570 |
- $(use_have conntrack) |
571 |
- $(use_have dbus) |
572 |
- $(use libidn2 || use_have idn) |
573 |
- $(use_have libidn2) |
574 |
- $(use_have -n inotify) |
575 |
- $(use_have -n dhcp dhcp dhcp6) |
576 |
- $(use_have -n ipv6 ipv6 dhcp6) |
577 |
- $(use_have -n id id) |
578 |
- $(use_have lua luascript) |
579 |
- $(use_have -n script) |
580 |
- $(use_have -n tftp) |
581 |
- $(use_have dnssec) |
582 |
- $(use_have static dnssec_static) |
583 |
- $(use_have -n dumpfile) |
584 |
- ) |
585 |
-} |
586 |
- |
587 |
-src_compile() { |
588 |
- emake \ |
589 |
- PREFIX=/usr \ |
590 |
- MANDIR=/usr/share/man \ |
591 |
- CC="$(tc-getCC)" \ |
592 |
- PKG_CONFIG="$(tc-getPKG_CONFIG)" \ |
593 |
- CFLAGS="${CFLAGS}" \ |
594 |
- LDFLAGS="${LDFLAGS}" \ |
595 |
- COPTS="${COPTS[*]}" \ |
596 |
- CONFFILE="/etc/${PN}.conf" \ |
597 |
- all$(use nls && printf -- "-i18n\n") |
598 |
- |
599 |
- use dhcp-tools && emake -C contrib/lease-tools \ |
600 |
- PREFIX=/usr \ |
601 |
- MANDIR=/usr/share/man \ |
602 |
- CC="$(tc-getCC)" \ |
603 |
- PKG_CONFIG="$(tc-getPKG_CONFIG)" \ |
604 |
- CFLAGS="${CFLAGS}" \ |
605 |
- LDFLAGS="${LDFLAGS}" \ |
606 |
- all |
607 |
-} |
608 |
- |
609 |
-src_install() { |
610 |
- local lingua puid |
611 |
- emake \ |
612 |
- PREFIX=/usr \ |
613 |
- MANDIR=/usr/share/man \ |
614 |
- COPTS="${COPTS[*]}" \ |
615 |
- DESTDIR="${ED}" \ |
616 |
- install$(use nls && printf -- "-i18n\n") |
617 |
- |
618 |
- for lingua in "${DM_LINGUAS[@]}"; do |
619 |
- has ${lingua} ${LINGUAS-${lingua}} \ |
620 |
- || rm -rf "${ED}"/usr/share/locale/${lingua} |
621 |
- done |
622 |
- [[ -d "${D}"/usr/share/locale/ ]] && \ |
623 |
- rmdir --ignore-fail-on-non-empty "${ED}"/usr/share/locale/ |
624 |
- |
625 |
- dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example |
626 |
- dodoc -r logo |
627 |
- |
628 |
- docinto html/ |
629 |
- dodoc *.html |
630 |
- |
631 |
- newinitd "${FILESDIR}"/dnsmasq-init-r4 ${PN} |
632 |
- newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN} |
633 |
- |
634 |
- insinto /etc/logrotate.d |
635 |
- newins "${FILESDIR}"/dnsmasq.logrotate ${PN} |
636 |
- |
637 |
- insinto /etc |
638 |
- newins dnsmasq.conf.example dnsmasq.conf |
639 |
- |
640 |
- insinto /usr/share/dnsmasq |
641 |
- doins trust-anchors.conf |
642 |
- |
643 |
- if use dhcp; then |
644 |
- keepdir /var/lib/misc |
645 |
- newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r3 ${PN} |
646 |
- fi |
647 |
- if use dbus; then |
648 |
- insinto /etc/dbus-1/system.d |
649 |
- doins dbus/dnsmasq.conf |
650 |
- fi |
651 |
- |
652 |
- if use dhcp-tools; then |
653 |
- dosbin contrib/lease-tools/{dhcp_release,dhcp_lease_time} |
654 |
- doman contrib/lease-tools/{dhcp_release,dhcp_lease_time}.1 |
655 |
- if use ipv6; then |
656 |
- dosbin contrib/lease-tools/dhcp_release6 |
657 |
- doman contrib/lease-tools/dhcp_release6.1 |
658 |
- fi |
659 |
- fi |
660 |
- |
661 |
- systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service |
662 |
-} |
663 |
- |
664 |
-pkg_preinst() { |
665 |
- [[ -f /var/lib/misc/dnsmasq.leases ]] && \ |
666 |
- cp /var/lib/misc/dnsmasq.leases "${T}" |
667 |
-} |
668 |
- |
669 |
-pkg_postinst() { |
670 |
- [[ -f "${T}"/dnsmasq.leases ]] && \ |
671 |
- cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases |
672 |
-} |