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, 27 Nov 2017 18:21:56
Message-Id: 1511806858.6efc2fac85d581b4e287fddaf953bdfc9f22aeec.swegener@gentoo
1 commit: 6efc2fac85d581b4e287fddaf953bdfc9f22aeec
2 Author: Sven Wegener <swegener <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 27 17:32:53 2017 +0000
4 Commit: Sven Wegener <swegener <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 27 18:20:58 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6efc2fac
7
8 net-dns/pdns: Version bump
9
10 Package-Manager: Portage-2.3.14, Repoman-2.3.6
11 Signed-off-by: Sven Wegener <swegener <AT> gentoo.org>
12
13 net-dns/pdns/Manifest | 1 +
14 net-dns/pdns/pdns-4.0.5.ebuild | 153 +++++++++++++++++++++++++++++++++++++++++
15 2 files changed, 154 insertions(+)
16
17 diff --git a/net-dns/pdns/Manifest b/net-dns/pdns/Manifest
18 index ef4e8b7dced..4c737523b83 100644
19 --- a/net-dns/pdns/Manifest
20 +++ b/net-dns/pdns/Manifest
21 @@ -1,2 +1,3 @@
22 DIST pdns-4.0.4.tar.bz2 1320327 BLAKE2B 5c11a0245408f8448b41ed4229718e6f7244e0c8f36b60b07c280f82c7dea0065cce93c3814b3a396666be8d3b012ad4eb646cf55f531d22ce325190e0fd6e22 SHA512 4ef4705cd990b03976775167c7c37850d45907e198549feda5f5701172e008e3f1f74a35a9bebdb24b63dec15ff63cb2cc9dfc8f92e4e1012e0539c5a88b845b
23 +DIST pdns-4.0.5.tar.bz2 1323468 BLAKE2B 7e10cc98177bfa4f81888e2598ab4f0ce83ee45e6349372c065940424a74015302da879536dea8346fe7b86f35c0524a5449489bdf71d1a091b7c6a82fac4b6f SHA512 4b0fa932c1d9caf35b988916447aa21c64ebe2a58bdd84417cf09321a21b264cf1057206dc6993a45a3b591eb1dfa49463710c06b6bdfaf6fb17ae6dec6086d9
24 DIST pdns-4.1.0-rc3.tar.bz2 1112366 BLAKE2B 8ac9d351ffee81a859b68bc66e989ce4c91804ab134ada3e090aed982df31191f5bfc83f7174873ab34b2a1b6be21f2c938874d94ea0e166b060453b746eec13 SHA512 19485bf95a68cbe2ac4cc826b44c3a8670f66cedc2ab426c589a3f67d96f70bd6dd297bd95301c29cda10ff9a7e429fa702bdc7368ce08862140d7097013ea7f
25
26 diff --git a/net-dns/pdns/pdns-4.0.5.ebuild b/net-dns/pdns/pdns-4.0.5.ebuild
27 new file mode 100644
28 index 00000000000..9bcc747e688
29 --- /dev/null
30 +++ b/net-dns/pdns/pdns-4.0.5.ebuild
31 @@ -0,0 +1,153 @@
32 +# Copyright 1999-2017 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI="6"
36 +
37 +inherit eutils multilib user toolchain-funcs versionator
38 +
39 +DESCRIPTION="The PowerDNS Daemon"
40 +HOMEPAGE="https://www.powerdns.com/"
41 +SRC_URI="https://downloads.powerdns.com/releases/${P/_/-}.tar.bz2"
42 +
43 +LICENSE="GPL-2"
44 +SLOT="0"
45 +KEYWORDS="~amd64 ~x86"
46 +
47 +# other possible flags:
48 +# db2: we lack the dep
49 +# oracle: dito (need Oracle Client Libraries)
50 +# xdb: (almost) dead, surely not supported
51 +
52 +IUSE="botan debug doc geoip ldap libressl lua luajit mydns mysql opendbx postgres protobuf remote sqlite systemd tools tinydns test"
53 +
54 +REQUIRED_USE="mydns? ( mysql ) ?? ( lua luajit )"
55 +
56 +RDEPEND="
57 + libressl? ( dev-libs/libressl:= )
58 + !libressl? ( dev-libs/openssl:= )
59 + >=dev-libs/boost-1.35:=
60 + botan? ( dev-libs/botan:2= )
61 + lua? ( dev-lang/lua:= )
62 + luajit? ( dev-lang/luajit:= )
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 + protobuf? ( dev-libs/protobuf )"
71 +DEPEND="${RDEPEND}
72 + virtual/pkgconfig
73 + doc? ( app-doc/doxygen )"
74 +
75 +S="${WORKDIR}"/${P/_/-}
76 +
77 +src_configure() {
78 + local dynmodules="pipe bind" # the default backends, always enabled
79 +
80 + #use db2 && dynmodules+=" db2"
81 + use ldap && dynmodules+=" ldap"
82 + use lua && dynmodules+=" lua"
83 + use mydns && dynmodules+=" mydns"
84 + use mysql && dynmodules+=" gmysql"
85 + use opendbx && dynmodules+=" opendbx"
86 + #use oracle && dynmodules+=" goracle oracle"
87 + use postgres && dynmodules+=" gpgsql"
88 + use remote && dynmodules+=" remote"
89 + use sqlite && dynmodules+=" gsqlite3"
90 + use tinydns && dynmodules+=" tinydns"
91 + use geoip && dynmodules+=" geoip"
92 + #use xdb && dynmodules+=" xdb"
93 +
94 + econf \
95 + --disable-static \
96 + --sysconfdir=/etc/powerdns \
97 + --libdir=/usr/$(get_libdir)/powerdns \
98 + --with-modules= \
99 + --with-dynmodules="${dynmodules}" \
100 + --with-pgsql-includes=/usr/include \
101 + --with-pgsql-lib=/usr/$(get_libdir) \
102 + --with-mysql-lib=/usr/$(get_libdir) \
103 + $(use_enable botan) \
104 + $(use_enable debug verbose-logging) \
105 + $(use_enable test unit-tests) \
106 + $(use_enable tools) \
107 + $(use_enable systemd) \
108 + $(use_with lua) \
109 + $(use_with luajit) \
110 + $(use_with protobuf) \
111 + ${myconf}
112 +}
113 +
114 +src_compile() {
115 + default
116 + use doc && emake -C codedocs codedocs
117 +}
118 +
119 +src_install() {
120 + default
121 +
122 + mv "${D}"/etc/powerdns/pdns.conf{-dist,}
123 +
124 + fperms 0700 /etc/powerdns
125 + fperms 0600 /etc/powerdns/pdns.conf
126 +
127 + # set defaults: setuid=pdns, setgid=pdns
128 + sed -i \
129 + -e 's/^# set\([ug]\)id=$/set\1id=pdns/g' \
130 + "${D}"/etc/powerdns/pdns.conf
131 +
132 + newinitd "${FILESDIR}"/pdns-r1 pdns
133 +
134 + keepdir /var/empty
135 +
136 + use doc && dohtml -r codedocs/html/.
137 +
138 + # Install development headers
139 + insinto /usr/include/pdns
140 + doins pdns/*.hh
141 + insinto /usr/include/pdns/backends/gsql
142 + doins pdns/backends/gsql/*.hh
143 +
144 + if use ldap ; then
145 + insinto /etc/openldap/schema
146 + doins "${FILESDIR}"/dnsdomain2.schema
147 + fi
148 +
149 + prune_libtool_files --all
150 +}
151 +
152 +pkg_preinst() {
153 + enewgroup pdns
154 + enewuser pdns -1 -1 /var/empty pdns
155 +}
156 +
157 +pkg_postinst() {
158 + elog "PowerDNS provides multiple instances support. You can create more instances"
159 + elog "by symlinking the pdns init script to another name."
160 + elog
161 + elog "The name must be in the format pdns.<suffix> and PowerDNS will use the"
162 + elog "/etc/powerdns/pdns-<suffix>.conf configuration file instead of the default."
163 +
164 + if use ldap ; then
165 + ewarn "The official LDAP backend module is only compile-tested by upstream."
166 + ewarn "Try net-dns/pdns-ldap-backend if you have problems with it."
167 + fi
168 +
169 + local old
170 + for old in ${REPLACING_VERSIONS}; do
171 + version_compare ${old} 3.2
172 + [[ $? -eq 1 ]] || continue
173 +
174 + ewarn "To fix a security bug (bug #458018) had the following"
175 + ewarn "files/directories the world-readable bit removed (if set):"
176 + ewarn " ${EPREFIX}/etc/powerdns"
177 + ewarn " ${EPREFIX}/etc/powerdns/pdns.conf"
178 + ewarn "Check if this is correct for your setup"
179 + ewarn "This is a one-time change and will not happen on subsequent updates."
180 + chmod o-rwx "${EPREFIX}"/etc/powerdns/{,pdns.conf}
181 +
182 + break
183 + done
184 +}