Gentoo Archives: gentoo-commits

From: Sven Wegener <swegener@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/pdns-recursor/, net-dns/pdns-recursor/files/
Date: Mon, 04 Apr 2022 12:01:55
Message-Id: 1649073703.c370ac03c3cfa11c1a9899a50e0068d5d2b5d7ce.swegener@gentoo
1 commit: c370ac03c3cfa11c1a9899a50e0068d5d2b5d7ce
2 Author: Sven Wegener <swegener <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 4 12:01:20 2022 +0000
4 Commit: Sven Wegener <swegener <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 4 12:01:43 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c370ac03
7
8 net-dns/pdns-recursor: Version bump to.4.6.2
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Sven Wegener <swegener <AT> gentoo.org>
12
13 net-dns/pdns-recursor/Manifest | 1 +
14 .../files/pdns-recursor-4.6.2-parseACL.patch | 24 ++++++
15 net-dns/pdns-recursor/pdns-recursor-4.6.2.ebuild | 92 ++++++++++++++++++++++
16 3 files changed, 117 insertions(+)
17
18 diff --git a/net-dns/pdns-recursor/Manifest b/net-dns/pdns-recursor/Manifest
19 index 440508da8a66..9d82f3024287 100644
20 --- a/net-dns/pdns-recursor/Manifest
21 +++ b/net-dns/pdns-recursor/Manifest
22 @@ -1 +1,2 @@
23 DIST pdns-recursor-4.6.1.tar.bz2 1541000 BLAKE2B fede4f654cd9900780df8dcc39585e95d8b0536c6d14476fde6f33a2d307144f50fb7b51bf6e0c950dcaff74120a101effee0c92cf15c4acedfa94a2682b0c5c SHA512 b595dd382bb4bff5cd47bff854952c8ee40bedeafe4236f935c8eceeca7ac97e8668b884e1ec0ce490ce535fab10d161ffc53ca395c0bb02ffcf6005a692674b
24 +DIST pdns-recursor-4.6.2.tar.bz2 1552587 BLAKE2B 3e7fe59ebe9d776c012304fc1bf6ed723c1c15df0aaedcaa8ac538741e81c5b6ebac2528e763e1395a0ea383904e4a902319509580938caae85b3aef947cfc3d SHA512 20779a065720162f0a6223a4d92deeef7911892bb8aa1929f9c6a8a6ccd2f8756e7bd35c877dbf945bb7627a2a7d40626d02f0008c2e8a602b424d36c110fddc
25
26 diff --git a/net-dns/pdns-recursor/files/pdns-recursor-4.6.2-parseACL.patch b/net-dns/pdns-recursor/files/pdns-recursor-4.6.2-parseACL.patch
27 new file mode 100644
28 index 000000000000..ee58e055f09a
29 --- /dev/null
30 +++ b/net-dns/pdns-recursor/files/pdns-recursor-4.6.2-parseACL.patch
31 @@ -0,0 +1,24 @@
32 +--- a/pdns_recursor.cc
33 ++++ b/pdns_recursor.cc
34 +@@ -4775,8 +4775,6 @@ static std::shared_ptr<NetmaskGroup> parseACL(const std::string& aclFile, const
35 + result->addMask(line);
36 + }
37 + g_log<<Logger::Info<<"Done parsing "<<result->size()<<" "<<aclSetting<<" ranges from file '"<<::arg()[aclFile]<<"' - overriding '"<<aclSetting<<"' setting"<<endl;
38 +-
39 +- return result;
40 + }
41 + else if(!::arg()[aclSetting].empty()) {
42 + vector<string> ips;
43 +@@ -4790,11 +4788,9 @@ static std::shared_ptr<NetmaskGroup> parseACL(const std::string& aclFile, const
44 + g_log<<Logger::Info<<*i;
45 + }
46 + g_log<<Logger::Info<<endl;
47 +-
48 +- return result;
49 + }
50 +
51 +- return nullptr;
52 ++ return result;
53 + }
54 +
55 + void parseACLs()
56
57 diff --git a/net-dns/pdns-recursor/pdns-recursor-4.6.2.ebuild b/net-dns/pdns-recursor/pdns-recursor-4.6.2.ebuild
58 new file mode 100644
59 index 000000000000..fff451a76927
60 --- /dev/null
61 +++ b/net-dns/pdns-recursor/pdns-recursor-4.6.2.ebuild
62 @@ -0,0 +1,92 @@
63 +# Copyright 1999-2022 Gentoo Authors
64 +# Distributed under the terms of the GNU General Public License v2
65 +
66 +EAPI=7
67 +
68 +LUA_COMPAT=( lua5-{1..4} luajit )
69 +
70 +inherit flag-o-matic lua-single
71 +
72 +DESCRIPTION="The PowerDNS Recursor"
73 +HOMEPAGE="https://www.powerdns.com/"
74 +SRC_URI="https://downloads.powerdns.com/releases/${P/_/-}.tar.bz2"
75 +
76 +LICENSE="GPL-2"
77 +SLOT="0"
78 +KEYWORDS="~amd64 ~arm ~x86"
79 +IUSE="debug dnstap snmp sodium systemd test"
80 +REQUIRED_USE="${LUA_REQUIRED_USE}"
81 +RESTRICT="!test? ( test )"
82 +
83 +DEPEND="${LUA_DEPS}
84 + dnstap? ( dev-libs/fstrm )
85 + systemd? ( sys-apps/systemd:0= )
86 + snmp? ( net-analyzer/net-snmp )
87 + sodium? ( dev-libs/libsodium:= )
88 + elibc_glibc? (
89 + arm? ( >=sys-libs/glibc-2.34 )
90 + x86? ( >=sys-libs/glibc-2.34 )
91 + )
92 + dev-libs/openssl:=
93 + >=dev-libs/boost-1.35:=[context]"
94 +RDEPEND="${DEPEND}
95 + !<net-dns/pdns-2.9.20-r1
96 + acct-user/pdns
97 + acct-group/pdns"
98 +BDEPEND="virtual/pkgconfig"
99 +
100 +S="${WORKDIR}"/${P/_/-}
101 +
102 +PATCHES=(
103 + "${FILESDIR}"/${P}-parseACL.patch
104 +)
105 +
106 +pkg_setup() {
107 + lua-single_pkg_setup
108 + filter-flags -ftree-vectorize
109 + append-lfs-flags
110 + append-cppflags -D_TIME_BITS=64
111 +}
112 +
113 +src_configure() {
114 + econf \
115 + --sysconfdir=/etc/powerdns \
116 + --with-nod-cache-dir=/var/lib/powerdns \
117 + --with-service-user=pdns \
118 + --with-service-group=pdns \
119 + --with-lua="${ELUA}" \
120 + $(use_enable debug verbose-logging) \
121 + $(use_enable systemd) \
122 + $(use_enable dnstap dnstap) \
123 + $(use_enable test unit-tests) \
124 + $(use_with sodium libsodium) \
125 + $(use_with snmp net-snmp)
126 +}
127 +
128 +src_install() {
129 + default
130 +
131 + mv "${D}"/etc/powerdns/recursor.conf{-dist,}
132 +
133 + # set defaults: setuid=nobody, setgid=nobody
134 + sed -i \
135 + -e 's/^# set\([ug]\)id=$/set\1id=pdns/' \
136 + -e 's/^# quiet=$/quiet=on/' \
137 + -e 's/^# chroot=$/chroot=\/var\/lib\/powerdns/' \
138 + "${D}"/etc/powerdns/recursor.conf
139 +
140 + newinitd "${FILESDIR}"/pdns-recursor-r2 pdns-recursor
141 +}
142 +
143 +pkg_postinst() {
144 + local old
145 +
146 + for old in ${REPLACING_VERSIONS}; do
147 + ver_test ${old} -lt 4.0.0-r1 || continue
148 +
149 + ewarn "Starting with 4.0.0-r1 the init script has been renamed from precursor"
150 + ewarn "to pdns-recursor, please update your runlevels accordingly."
151 +
152 + break
153 + done
154 +}