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