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