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: Sun, 11 Oct 2015 19:57:08
Message-Id: 1444593385.0a6c9076768524880ef4bbc0b741104d6dae1cdf.swegener@gentoo
1 commit: 0a6c9076768524880ef4bbc0b741104d6dae1cdf
2 Author: Sven Wegener <swegener <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 11 19:50:11 2015 +0000
4 Commit: Sven Wegener <swegener <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 11 19:56:25 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a6c9076
7
8 net-dns/pdns: Version bump (bug #559440, CVE-2015-5230)
9
10 net-dns/pdns/Manifest | 1 +
11 net-dns/pdns/pdns-3.4.6.ebuild | 177 +++++++++++++++++++++++++++++++++++++++++
12 2 files changed, 178 insertions(+)
13
14 diff --git a/net-dns/pdns/Manifest b/net-dns/pdns/Manifest
15 index dc729f4..5b7de2d 100644
16 --- a/net-dns/pdns/Manifest
17 +++ b/net-dns/pdns/Manifest
18 @@ -6,3 +6,4 @@ DIST pdns-3.4.1.tar.bz2 1237002 SHA256 13e32a31759e7fd341b98c89fe551723a5c6a7683
19 DIST pdns-3.4.2.tar.bz2 1331062 SHA256 a6ab05459a0118cb921092deee06362722c45fa69ed0166ebc3696d526014b5b SHA512 e04e0d0a9d6a10f6104a1b4e399e1b84b66aaa5561696281f85898f900bcbcbd41e49a110cddffc12e1f5043d60663ce679af91e4b76f8e1823528a5f38098ed WHIRLPOOL 84d8cd1ec0604e2dd7cb80ef8c7b0379569576e0a48541fcfa0eaaf31fc1d976129bf4d4cb0fb055940236bdcc8a791d56f78d68a94dd9a2e563f5faaeb7eb73
20 DIST pdns-3.4.4.tar.bz2 1336624 SHA256 ec49f5a0b55b69ba057bf9ce28ab81e5258fc60c8d4954d9100fe3bb3efd09c8 SHA512 c4567c5e09c3396af99263cbe370ffd8409a90e2583d968d7fa4760d0867ecb1696904e9ba8f6551d815b11b20b5862d789edfb599b9c5571110d3b785f2e08a WHIRLPOOL 4e744dd75a712a9928fda2d09339e7cc922ba63e8ebb11fee88d08d8e5046730d4ea23417bcc4251dc91edb3ec7aefaa480f832fc8167cc50c685435faee4256
21 DIST pdns-3.4.5.tar.bz2 1337222 SHA256 f3e1441532b0af05a6b5efe5346f02d0c55f252fbed62d5b4f2e4a80997c507d SHA512 cdf6496a832cff05519a02714aaab4b689541b01a83fe2415d360f8653db4e51a00b90ea86103dd535b22881420337b32ab8a33bb0d405df590cbed322b0827c WHIRLPOOL ee3287e2ac0c3d82e60daed2021b081fbb1e78a63847e98bfddef5fab5ce5ef43d6fea8ba5583a5f70ecc104b77814a7911b77b754492169c72bdbbec5ccb377
22 +DIST pdns-3.4.6.tar.bz2 1336760 SHA256 80a6a43cabd14db844bce84482ba56d03d46ebfbf96c88689fb3e2185ac286d8 SHA512 6ab4bef0482041d511ce0ea15e92cd12b0b331d3199c01463fa9150d04aca428c7b90fe25e53251f76a8809331cf32830240961dbf887e6b7c4e0a7fe07c8089 WHIRLPOOL a9541dce672e36b6f05f3a6c2b740f308af3c4b4ee3f96a5940f7ee5f2d9e017a9832604d29069e24f07925dd346f9f99a770779bccf35d14e7803fe34df8d46
23
24 diff --git a/net-dns/pdns/pdns-3.4.6.ebuild b/net-dns/pdns/pdns-3.4.6.ebuild
25 new file mode 100644
26 index 0000000..77d6d55
27 --- /dev/null
28 +++ b/net-dns/pdns/pdns-3.4.6.ebuild
29 @@ -0,0 +1,177 @@
30 +# Copyright 1999-2015 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +# $Id$
33 +
34 +EAPI=5
35 +
36 +inherit eutils multilib systemd user toolchain-funcs versionator
37 +
38 +DESCRIPTION="The PowerDNS Daemon"
39 +HOMEPAGE="http://www.powerdns.com/"
40 +SRC_URI="http://downloads.powerdns.com/releases/${P}.tar.bz2"
41 +
42 +LICENSE="GPL-2"
43 +SLOT="0"
44 +KEYWORDS="~amd64 ~x86"
45 +
46 +# other possible flags:
47 +# db2: we lack the dep
48 +# oracle: dito (need Oracle Client Libraries)
49 +# xdb: (almost) dead, surely not supported
50 +
51 +IUSE="botan cryptopp debug doc geoip ldap lua mydns mysql opendbx postgres remote sqlite static tools tinydns test"
52 +
53 +REQUIRED_USE="mydns? ( mysql )"
54 +
55 +RDEPEND="!static? (
56 + net-libs/polarssl
57 + >=dev-libs/boost-1.34:=
58 + botan? ( =dev-libs/botan-1.10* )
59 + cryptopp? ( dev-libs/crypto++ )
60 + lua? ( dev-lang/lua:= )
61 + mysql? ( virtual/mysql )
62 + postgres? ( dev-db/postgresql:= )
63 + ldap? ( >=net-nds/openldap-2.0.27-r4 )
64 + sqlite? ( dev-db/sqlite:3 )
65 + opendbx? ( dev-db/opendbx )
66 + geoip? ( >=dev-cpp/yaml-cpp-0.5.1 dev-libs/geoip )
67 + tinydns? ( >=dev-db/tinycdb-0.77 )
68 + )"
69 +DEPEND="${RDEPEND}
70 + virtual/pkgconfig
71 + static? (
72 + >=net-libs/polarssl-1.3.0[static-libs(+)]
73 + >=dev-libs/boost-1.34[static-libs(+)]
74 + botan? ( =dev-libs/botan-1.10*[static-libs(+)] )
75 + cryptopp? ( dev-libs/crypto++[static-libs(+)] )
76 + lua? ( dev-lang/lua:=[static-libs(+)] )
77 + mysql? ( virtual/mysql[static-libs(+)] )
78 + postgres? ( dev-db/postgresql[static-libs(+)] )
79 + ldap? ( >=net-nds/openldap-2.0.27-r4[static-libs(+)] )
80 + sqlite? ( dev-db/sqlite:3[static-libs(+)] )
81 + opendbx? ( dev-db/opendbx[static-libs(+)] )
82 + geoip? ( >=dev-cpp/yaml-cpp-0.5.1 dev-libs/geoip[static-libs(+)] )
83 + tinydns? ( >=dev-db/tinycdb-0.77 )
84 + )
85 + doc? ( app-doc/doxygen )"
86 +
87 +src_configure() {
88 + local dynmodules="pipe geo bind" # the default backends, always enabled
89 + local modules=""
90 +
91 + #use db2 && dynmodules+=" db2"
92 + use ldap && dynmodules+=" ldap"
93 + use lua && dynmodules+=" lua"
94 + use mydns && dynmodules+=" mydns"
95 + use mysql && dynmodules+=" gmysql"
96 + use opendbx && dynmodules+=" opendbx"
97 + #use oracle && dynmodules+=" goracle oracle"
98 + use postgres && dynmodules+=" gpgsql"
99 + use remote && dynmodules+=" remote"
100 + use sqlite && dynmodules+=" gsqlite3"
101 + use tinydns && dynmodules+=" tinydns"
102 + use geoip && dynmodules+=" geoip"
103 + #use xdb && dynmodules+=" xdb"
104 +
105 + if use static ; then
106 + modules="${dynmodules}"
107 + dynmodules=""
108 + fi
109 +
110 + use botan && myconf+=" --enable-botan1.10"
111 + use cryptopp && myconf+=" --enable-cryptopp"
112 + use debug && myconf+=" --enable-verbose-logging"
113 +
114 + CRYPTOPP_CFLAGS=" " \
115 + CRYPTOPP_LIBS="-lcrypto++" \
116 + econf \
117 + --with-system-polarssl \
118 + --disable-static \
119 + --sysconfdir=/etc/powerdns \
120 + --libdir=/usr/$(get_libdir)/powerdns \
121 + --with-modules="${modules}" \
122 + --with-dynmodules="${dynmodules}" \
123 + --with-pgsql-includes=/usr/include \
124 + --with-pgsql-lib=/usr/$(get_libdir) \
125 + --with-mysql-lib=/usr/$(get_libdir) \
126 + $(use_enable test unit-tests) \
127 + $(use_with lua) \
128 + $(use_enable static static-binaries) \
129 + $(use_enable tools) \
130 + ${myconf}
131 +}
132 +
133 +src_compile() {
134 + default
135 + use doc && emake -C codedocs codedocs
136 +}
137 +
138 +src_install () {
139 + default
140 +
141 + mv "${D}"/etc/powerdns/pdns.conf{-dist,}
142 +
143 + fperms 0700 /etc/powerdns
144 + fperms 0600 /etc/powerdns/pdns.conf
145 +
146 + # set defaults: setuid=pdns, setgid=pdns
147 + sed -i \
148 + -e 's/^# set\([ug]\)id=$/set\1id=pdns/g' \
149 + "${D}"/etc/powerdns/pdns.conf
150 +
151 + doinitd "${FILESDIR}"/pdns
152 + systemd_newunit contrib/systemd-pdns.service pdns.service
153 +
154 + keepdir /var/empty
155 +
156 + use doc && dohtml -r codedocs/html/.
157 +
158 + # Install development headers
159 + insinto /usr/include/pdns
160 + doins pdns/*.hh
161 + insinto /usr/include/pdns/backends/gsql
162 + doins pdns/backends/gsql/*.hh
163 +
164 + if use ldap ; then
165 + insinto /etc/openldap/schema
166 + doins "${FILESDIR}"/dnsdomain2.schema
167 + fi
168 +
169 + prune_libtool_files --all
170 +}
171 +
172 +pkg_preinst() {
173 + enewgroup pdns
174 + enewuser pdns -1 -1 /var/empty pdns
175 +}
176 +
177 +pkg_postinst() {
178 + elog "PowerDNS provides multiple instances support. You can create more instances"
179 + elog "by symlinking the pdns init script to another name."
180 + elog
181 + elog "The name must be in the format pdns.<suffix> and PowerDNS will use the"
182 + elog "/etc/powerdns/pdns-<suffix>.conf configuration file instead of the default."
183 +
184 + if use ldap ; then
185 + ewarn "The official LDAP backend module is only compile-tested by upstream."
186 + ewarn "Try net-dns/pdns-ldap-backend if you have problems with it."
187 + fi
188 +
189 + local fix_perms=0
190 +
191 + for rv in ${REPLACING_VERSIONS} ; do
192 + version_compare ${rv} 3.2
193 + [[ $? -eq 1 ]] && fix_perms=1
194 + done
195 +
196 + if [[ $fix_perms -eq 1 ]] ; then
197 + ewarn "To fix a security bug (bug #458018) had the following"
198 + ewarn "files/directories the world-readable bit removed (if set):"
199 + ewarn " ${EPREFIX}/etc/pdns"
200 + ewarn " ${EPREFIX}/etc/pdns/pdns.conf"
201 + ewarn "Check if this is correct for your setup"
202 + ewarn "This is a one-time change and will not happen on subsequent updates."
203 + chmod o-rwx "${EPREFIX}"/etc/pdns/{,pdns.conf}
204 + fi
205 +
206 +}