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, 03 Nov 2015 19:39:40
Message-Id: 1446579558.e81b88537a64aa6078e3ce3d22395338c24db6a1.swegener@gentoo
1 commit: e81b88537a64aa6078e3ce3d22395338c24db6a1
2 Author: Sven Wegener <swegener <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 3 19:38:54 2015 +0000
4 Commit: Sven Wegener <swegener <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 3 19:39:18 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e81b8853
7
8 net-dns/pdns: Version bump
9
10 Signed-off-by: Sven Wegener <swegener <AT> gentoo.org>
11
12 net-dns/pdns/Manifest | 1 +
13 net-dns/pdns/pdns-3.4.7.ebuild | 177 +++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 178 insertions(+)
15
16 diff --git a/net-dns/pdns/Manifest b/net-dns/pdns/Manifest
17 index 5b7de2d..9a6fc25 100644
18 --- a/net-dns/pdns/Manifest
19 +++ b/net-dns/pdns/Manifest
20 @@ -7,3 +7,4 @@ DIST pdns-3.4.2.tar.bz2 1331062 SHA256 a6ab05459a0118cb921092deee06362722c45fa69
21 DIST pdns-3.4.4.tar.bz2 1336624 SHA256 ec49f5a0b55b69ba057bf9ce28ab81e5258fc60c8d4954d9100fe3bb3efd09c8 SHA512 c4567c5e09c3396af99263cbe370ffd8409a90e2583d968d7fa4760d0867ecb1696904e9ba8f6551d815b11b20b5862d789edfb599b9c5571110d3b785f2e08a WHIRLPOOL 4e744dd75a712a9928fda2d09339e7cc922ba63e8ebb11fee88d08d8e5046730d4ea23417bcc4251dc91edb3ec7aefaa480f832fc8167cc50c685435faee4256
22 DIST pdns-3.4.5.tar.bz2 1337222 SHA256 f3e1441532b0af05a6b5efe5346f02d0c55f252fbed62d5b4f2e4a80997c507d SHA512 cdf6496a832cff05519a02714aaab4b689541b01a83fe2415d360f8653db4e51a00b90ea86103dd535b22881420337b32ab8a33bb0d405df590cbed322b0827c WHIRLPOOL ee3287e2ac0c3d82e60daed2021b081fbb1e78a63847e98bfddef5fab5ce5ef43d6fea8ba5583a5f70ecc104b77814a7911b77b754492169c72bdbbec5ccb377
23 DIST pdns-3.4.6.tar.bz2 1336760 SHA256 80a6a43cabd14db844bce84482ba56d03d46ebfbf96c88689fb3e2185ac286d8 SHA512 6ab4bef0482041d511ce0ea15e92cd12b0b331d3199c01463fa9150d04aca428c7b90fe25e53251f76a8809331cf32830240961dbf887e6b7c4e0a7fe07c8089 WHIRLPOOL a9541dce672e36b6f05f3a6c2b740f308af3c4b4ee3f96a5940f7ee5f2d9e017a9832604d29069e24f07925dd346f9f99a770779bccf35d14e7803fe34df8d46
24 +DIST pdns-3.4.7.tar.bz2 1345379 SHA256 e17eca86c5e702b54b62b1edebc4741d8e0db748050a7214c778302039f28c4b SHA512 d9dd8e7d37ae6d46783d9608beba2905838d1af8c597906bfe1134e2b787cfc529514f412eebb8838df5ceb1a7366c10057fd1d93b73924d0f6d2cec6ba72e13 WHIRLPOOL 7897ff06e1f43cada00aa25ef38e987377fe7a14a3634d5aa0484630d00d3e2269fe4caf36960c75dd825d47657ddf37692efa5a49eaf280b0832a301f27fd24
25
26 diff --git a/net-dns/pdns/pdns-3.4.7.ebuild b/net-dns/pdns/pdns-3.4.7.ebuild
27 new file mode 100644
28 index 0000000..77d6d55
29 --- /dev/null
30 +++ b/net-dns/pdns/pdns-3.4.7.ebuild
31 @@ -0,0 +1,177 @@
32 +# Copyright 1999-2015 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 +}