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/
Date: Tue, 09 Feb 2021 00:56:33
Message-Id: 1612832170.bbf5cc0a661cb80d47a7ef0a2854994674de0c26.swegener@gentoo
1 commit: bbf5cc0a661cb80d47a7ef0a2854994674de0c26
2 Author: Sven Wegener <swegener <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 9 00:54:03 2021 +0000
4 Commit: Sven Wegener <swegener <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 9 00:56:10 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbf5cc0a
7
8 net-dns/pdns: Version bump to 4.4.1
9
10 Package-Manager: Portage-3.0.13, Repoman-3.0.2
11 Signed-off-by: Sven Wegener <swegener <AT> gentoo.org>
12
13 net-dns/pdns/Manifest | 1 +
14 net-dns/pdns/pdns-4.4.1.ebuild | 170 +++++++++++++++++++++++++++++++++++++++++
15 2 files changed, 171 insertions(+)
16
17 diff --git a/net-dns/pdns/Manifest b/net-dns/pdns/Manifest
18 index d41a44702d5..ec35608a43c 100644
19 --- a/net-dns/pdns/Manifest
20 +++ b/net-dns/pdns/Manifest
21 @@ -1,2 +1,3 @@
22 DIST pdns-4.3.1.tar.bz2 1216876 BLAKE2B 0449835d104ec430329dc88087b489e29f1e1fa0c2a22af8715883a0a80d73f3a4848df207abbf986b946c640c4f1d35a1c8335f13f96a00915e4a40bcbecc9f SHA512 e61e23544f1e57c1ec3a85b4edbc3ff3e8e831410237afdc8896e9f34602774c1dc8bd02eb7440e765262fcc988f98e47b6f1b7945427b1f4a59dd6b84b9437e
23 DIST pdns-4.4.0.tar.bz2 1270854 BLAKE2B 2c855197d0b5f8fc141e4fa19268e68b9114353c7f89157023b9cd6b9559e788b55a9b0eeebea55d4ba0a206229d9c032f0c84c40ffd91c7277eb611a4bc966a SHA512 e7f35539915ee7945b537cfedae72e2b83c86b39c5e44a9268b8a086f44b30a33a64e0b65aad140ba02c349cedaa12820226578dea87c9b666dc75f8bd15c1f6
24 +DIST pdns-4.4.1.tar.bz2 1276990 BLAKE2B 9771cf3273ab7e8ab4607a91563bfe0dc3f4532b5420861d816eacd2798d66de3a1eb824c191264f9106ec47bd6003d99108b8df678190055948779b9b3b070f SHA512 a6f31972f77ded8ecfb523e8810dd90e5b7aa628746fee2a9a0daae2a7935800f111ce8617ffd71d5ce3881947d4ffc36c9cb37996a7bcc514536bb4abe1f79e
25
26 diff --git a/net-dns/pdns/pdns-4.4.1.ebuild b/net-dns/pdns/pdns-4.4.1.ebuild
27 new file mode 100644
28 index 00000000000..5e50badd229
29 --- /dev/null
30 +++ b/net-dns/pdns/pdns-4.4.1.ebuild
31 @@ -0,0 +1,170 @@
32 +# Copyright 1999-2021 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +LUA_COMPAT=( lua5-{1..4} luajit )
38 +
39 +inherit lua-single
40 +
41 +DESCRIPTION="The PowerDNS Daemon"
42 +HOMEPAGE="https://www.powerdns.com/"
43 +SRC_URI="https://downloads.powerdns.com/releases/${P/_/-}.tar.bz2"
44 +
45 +LICENSE="GPL-2"
46 +SLOT="0"
47 +KEYWORDS="~amd64 ~x86"
48 +
49 +# other possible flags:
50 +# db2: we lack the dep
51 +# oracle: dito (need Oracle Client Libraries)
52 +# xdb: (almost) dead, surely not supported
53 +
54 +IUSE="debug doc geoip ldap libressl lua-records mydns mysql postgres protobuf remote sodium sqlite systemd tools tinydns test"
55 +RESTRICT="!test? ( test )"
56 +
57 +REQUIRED_USE="${LUA_REQUIRED_USE}
58 + mydns? ( mysql )"
59 +
60 +DEPEND="${LUA_DEPS}
61 + libressl? ( dev-libs/libressl:= )
62 + !libressl? ( dev-libs/openssl:= )
63 + >=dev-libs/boost-1.35:=
64 + lua-records? ( >=net-misc/curl-7.21.3 )
65 + mysql? ( dev-db/mysql-connector-c:= )
66 + postgres? ( dev-db/postgresql:= )
67 + ldap? ( >=net-nds/openldap-2.0.27-r4 app-crypt/mit-krb5 )
68 + sqlite? ( dev-db/sqlite:3 )
69 + geoip? ( >=dev-cpp/yaml-cpp-0.5.1:= dev-libs/geoip )
70 + sodium? ( dev-libs/libsodium:= )
71 + tinydns? ( >=dev-db/tinycdb-0.77 )
72 + protobuf? ( dev-libs/protobuf )"
73 +RDEPEND="${DEPEND}
74 + acct-user/pdns
75 + acct-group/pdns"
76 +
77 +BDEPEND="virtual/pkgconfig
78 + doc? ( app-doc/doxygen )"
79 +
80 +S="${WORKDIR}"/${P/_/-}
81 +
82 +src_configure() {
83 + local dynmodules="pipe bind" # the default backends, always enabled
84 +
85 + #use db2 && dynmodules+=" db2"
86 + use ldap && dynmodules+=" ldap"
87 + use mydns && dynmodules+=" mydns"
88 + use mysql && dynmodules+=" gmysql"
89 + #use oracle && dynmodules+=" goracle oracle"
90 + use postgres && dynmodules+=" gpgsql"
91 + use remote && dynmodules+=" remote"
92 + use sqlite && dynmodules+=" gsqlite3"
93 + use tinydns && dynmodules+=" tinydns"
94 + use geoip && dynmodules+=" geoip"
95 + #use xdb && dynmodules+=" xdb"
96 +
97 + econf \
98 + --disable-static \
99 + --sysconfdir=/etc/powerdns \
100 + --libdir=/usr/$(get_libdir)/powerdns \
101 + --with-service-user=pdns \
102 + --with-service-group=pdns \
103 + --with-modules= \
104 + --with-dynmodules="${dynmodules}" \
105 + --with-mysql-lib=/usr/$(get_libdir) \
106 + --with-lua="${ELUA}" \
107 + $(use_enable debug verbose-logging) \
108 + $(use_enable lua-records) \
109 + $(use_enable test unit-tests) \
110 + $(use_enable tools) \
111 + $(use_enable systemd) \
112 + $(use_with sodium libsodium) \
113 + $(use_with protobuf) \
114 + ${myconf}
115 +}
116 +
117 +src_compile() {
118 + default
119 + use doc && emake -C codedocs codedocs
120 +}
121 +
122 +src_install() {
123 + default
124 +
125 + mv "${D}"/etc/powerdns/pdns.conf{-dist,}
126 +
127 + fperms 0700 /etc/powerdns
128 + fperms 0600 /etc/powerdns/pdns.conf
129 +
130 + # set defaults: setuid=pdns, setgid=pdns
131 + sed -i \
132 + -e 's/^# set\([ug]\)id=$/set\1id=pdns/g' \
133 + "${D}"/etc/powerdns/pdns.conf
134 +
135 + newinitd "${FILESDIR}"/pdns-r1 pdns
136 +
137 + keepdir /var/empty
138 +
139 + if use doc; then
140 + docinto html
141 + dodoc -r codedocs/html/.
142 + fi
143 +
144 + # Install development headers
145 + insinto /usr/include/pdns
146 + doins pdns/*.hh
147 + insinto /usr/include/pdns/backends/gsql
148 + doins pdns/backends/gsql/*.hh
149 +
150 + if use ldap ; then
151 + insinto /etc/openldap/schema
152 + doins "${FILESDIR}"/dnsdomain2.schema
153 + fi
154 +
155 + find "${D}" -name '*.la' -delete || die
156 +}
157 +
158 +pkg_postinst() {
159 + elog "PowerDNS provides multiple instances support. You can create more instances"
160 + elog "by symlinking the pdns init script to another name."
161 + elog
162 + elog "The name must be in the format pdns.<suffix> and PowerDNS will use the"
163 + elog "/etc/powerdns/pdns-<suffix>.conf configuration file instead of the default."
164 +
165 + if use ldap ; then
166 + echo
167 + ewarn "The official LDAP backend module is only compile-tested by upstream."
168 + ewarn "Try net-dns/pdns-ldap-backend if you have problems with it."
169 + fi
170 +
171 + local old
172 + for old in ${REPLACING_VERSIONS}; do
173 + ver_test ${old} -lt 3.2 || continue
174 +
175 + echo
176 + ewarn "To fix a security bug (bug #458018) had the following"
177 + ewarn "files/directories the world-readable bit removed (if set):"
178 + ewarn " ${EPREFIX}/etc/powerdns"
179 + ewarn " ${EPREFIX}/etc/powerdns/pdns.conf"
180 + ewarn "Check if this is correct for your setup"
181 + ewarn "This is a one-time change and will not happen on subsequent updates."
182 + chmod o-rwx "${EPREFIX}"/etc/powerdns/{,pdns.conf}
183 +
184 + break
185 + done
186 +
187 + if use postgres; then
188 + for old in ${REPLACING_VERSIONS}; do
189 + ver_test ${old} -lt 4.1.11-r1 || continue
190 +
191 + echo
192 + ewarn "PowerDNS 4.1.11 contains a security fix for the PostgreSQL backend."
193 + ewarn "This security fix needs to be applied manually to the database schema."
194 + ewarn "Please refer to the official security advisory for more information:"
195 + ewarn
196 + ewarn " https://doc.powerdns.com/authoritative/security-advisories/powerdns-advisory-2019-06.html"
197 +
198 + break
199 + done
200 + fi
201 +}