1 |
commit: 82a79d1422d934985c96a7f22357d3cc81a9e76d |
2 |
Author: Sven Wegener <swegener <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jun 18 22:08:00 2020 +0000 |
4 |
Commit: Sven Wegener <swegener <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 26 19:20:26 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82a79d14 |
7 |
|
8 |
net-dns/pdns-recursor: Add support for dnstap USE flag |
9 |
|
10 |
Closes: https://bugs.gentoo.org/713786 |
11 |
Package-Manager: Portage-2.3.99, Repoman-2.3.23 |
12 |
Signed-off-by: Sven Wegener <swegener <AT> gentoo.org> |
13 |
|
14 |
net-dns/pdns-recursor/metadata.xml | 1 + |
15 |
.../pdns-recursor/pdns-recursor-4.3.1-r1.ebuild | 86 ++++++++++++++++++++++ |
16 |
2 files changed, 87 insertions(+) |
17 |
|
18 |
diff --git a/net-dns/pdns-recursor/metadata.xml b/net-dns/pdns-recursor/metadata.xml |
19 |
index bee2820e192..89c22c948dd 100644 |
20 |
--- a/net-dns/pdns-recursor/metadata.xml |
21 |
+++ b/net-dns/pdns-recursor/metadata.xml |
22 |
@@ -15,6 +15,7 @@ It also has built-in hooks for making graphs with rrdtool, providing insight int |
23 |
nameserver performance. |
24 |
</longdescription> |
25 |
<use> |
26 |
+ <flag name="dnstap">Enable support for dnstap</flag> |
27 |
<flag name="protobuf">Enable support for <pkg>dev-libs/protobuf</pkg>.</flag> |
28 |
<flag name="sodium">Use <pkg>dev-libs/libsodium</pkg> for cryptography</flag> |
29 |
</use> |
30 |
|
31 |
diff --git a/net-dns/pdns-recursor/pdns-recursor-4.3.1-r1.ebuild b/net-dns/pdns-recursor/pdns-recursor-4.3.1-r1.ebuild |
32 |
new file mode 100644 |
33 |
index 00000000000..c2393a2b27e |
34 |
--- /dev/null |
35 |
+++ b/net-dns/pdns-recursor/pdns-recursor-4.3.1-r1.ebuild |
36 |
@@ -0,0 +1,86 @@ |
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 flag-o-matic |
43 |
+ |
44 |
+DESCRIPTION="The PowerDNS Recursor" |
45 |
+HOMEPAGE="https://www.powerdns.com/" |
46 |
+SRC_URI="https://downloads.powerdns.com/releases/${P/_/-}.tar.bz2" |
47 |
+ |
48 |
+LICENSE="GPL-2" |
49 |
+SLOT="0" |
50 |
+KEYWORDS="~amd64 ~arm ~x86" |
51 |
+IUSE="debug dnstap libressl luajit protobuf snmp sodium systemd" |
52 |
+REQUIRED_USE="dnstap? ( protobuf )" |
53 |
+ |
54 |
+DEPEND="!luajit? ( >=dev-lang/lua-5.1:= ) |
55 |
+ luajit? ( dev-lang/luajit:= ) |
56 |
+ protobuf? ( |
57 |
+ dev-libs/protobuf |
58 |
+ >=dev-libs/boost-1.42:= |
59 |
+ ) |
60 |
+ dnstap? ( dev-libs/fstrm ) |
61 |
+ systemd? ( sys-apps/systemd:0= ) |
62 |
+ snmp? ( net-analyzer/net-snmp ) |
63 |
+ sodium? ( dev-libs/libsodium:= ) |
64 |
+ libressl? ( dev-libs/libressl:= ) |
65 |
+ !libressl? ( dev-libs/openssl:= ) |
66 |
+ >=dev-libs/boost-1.35:=" |
67 |
+RDEPEND="${DEPEND} |
68 |
+ !<net-dns/pdns-2.9.20-r1 |
69 |
+ acct-user/pdns |
70 |
+ acct-group/pdns" |
71 |
+BDEPEND="virtual/pkgconfig" |
72 |
+ |
73 |
+S="${WORKDIR}"/${P/_/-} |
74 |
+ |
75 |
+PATCHES=( |
76 |
+ "${FILESDIR}"/${P}-boost-1.73.0.patch |
77 |
+ "${FILESDIR}"/${P}-gcc-10.patch |
78 |
+) |
79 |
+ |
80 |
+pkg_setup() { |
81 |
+ filter-flags -ftree-vectorize |
82 |
+} |
83 |
+ |
84 |
+src_configure() { |
85 |
+ econf \ |
86 |
+ --sysconfdir=/etc/powerdns \ |
87 |
+ --with-lua=$(usex luajit luajit lua) \ |
88 |
+ $(use_enable debug verbose-logging) \ |
89 |
+ $(use_enable systemd) \ |
90 |
+ $(use_enable dnstap dnstap) \ |
91 |
+ $(use_with sodium libsodium) \ |
92 |
+ $(use_with protobuf) \ |
93 |
+ $(use_with snmp net-snmp) |
94 |
+} |
95 |
+ |
96 |
+src_install() { |
97 |
+ default |
98 |
+ |
99 |
+ mv "${D}"/etc/powerdns/recursor.conf{-dist,} |
100 |
+ |
101 |
+ # set defaults: setuid=nobody, setgid=nobody |
102 |
+ sed -i \ |
103 |
+ -e 's/^# set\([ug]\)id=$/set\1id=pdns/' \ |
104 |
+ -e 's/^# quiet=$/quiet=on/' \ |
105 |
+ -e 's/^# chroot=$/chroot=\/var\/lib\/powerdns/' \ |
106 |
+ "${D}"/etc/powerdns/recursor.conf |
107 |
+ |
108 |
+ newinitd "${FILESDIR}"/pdns-recursor-r2 pdns-recursor |
109 |
+} |
110 |
+ |
111 |
+pkg_postinst() { |
112 |
+ local old |
113 |
+ |
114 |
+ for old in ${REPLACING_VERSIONS}; do |
115 |
+ ver_test ${old} -lt 4.0.0-r1 || continue |
116 |
+ |
117 |
+ ewarn "Starting with 4.0.0-r1 the init script has been renamed from precursor" |
118 |
+ ewarn "to pdns-recursor, please update your runlevels accordingly." |
119 |
+ |
120 |
+ break |
121 |
+ done |
122 |
+} |