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: Thu, 30 May 2019 10:45:20
Message-Id: 1559213073.26dc7801d12782819f6cd09b50a135cfc69741a4.swegener@gentoo
1 commit: 26dc7801d12782819f6cd09b50a135cfc69741a4
2 Author: Sven Wegener <swegener <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 30 10:43:43 2019 +0000
4 Commit: Sven Wegener <swegener <AT> gentoo <DOT> org>
5 CommitDate: Thu May 30 10:44:33 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26dc7801
7
8 net-dns/pdns: Version bump
9
10 Signed-off-by: Sven Wegener <swegener <AT> gentoo.org>
11 Package-Manager: Portage-2.3.66, Repoman-2.3.11
12
13 net-dns/pdns/Manifest | 1 +
14 net-dns/pdns/pdns-4.2.0_rc1.ebuild | 154 +++++++++++++++++++++++++++++++++++++
15 2 files changed, 155 insertions(+)
16
17 diff --git a/net-dns/pdns/Manifest b/net-dns/pdns/Manifest
18 index e76d5ea532f..89eb0e5fec6 100644
19 --- a/net-dns/pdns/Manifest
20 +++ b/net-dns/pdns/Manifest
21 @@ -1,2 +1,3 @@
22 DIST pdns-4.1.7.tar.bz2 1116191 BLAKE2B 8c214bff6d1af8354dc0b22c2bed233ec92e217fcfda456f69a665eb615500452f2bea7abfbab506f93abc35d0466a26594734a242e5cfef2b62e789252274d1 SHA512 dc9c693ac2eaf11ddce220e7fedc40f6ae3f9d7a55352643b30db2aad0b2d543ad04a14199a06355275aba2d9dd7873087715a16157b0ff2f7335f1a4a4b96a2
23 DIST pdns-4.1.8.tar.bz2 1116996 BLAKE2B df32e1e239f65a37570b1f3f6b7fd2384ea9ea4d60ecf6dc520441e7f004c9e17c1cb35358e1cd9b5080c85b6366354ae4b3e5eaeda20af18c6e411bb119bbc1 SHA512 1113745cdaa8fba591c176721893fb478e976861beee0cb6c0240e5afa6b68c9afae286579036b2ed77fffe76ca1e6f103cda915f8b7b875bcdc1253931ad935
24 +DIST pdns-4.2.0-rc1.tar.bz2 1221177 BLAKE2B fa911805bfe9c04ffe6b508e1deec716e9149a6cfe10b771bb8bb214c4b4db72a9d4990eb21145e13422388c48563e2951c6e7d210a59dc2d3569cac6a3232b8 SHA512 bd769a2e0159b44d5699b0166d20afe49d9c48aa04c170405099a897417a12887a4dfb54bf9c100498be37a519c91e08a96039b23bdbc1cf33499ea63841c1ba
25
26 diff --git a/net-dns/pdns/pdns-4.2.0_rc1.ebuild b/net-dns/pdns/pdns-4.2.0_rc1.ebuild
27 new file mode 100644
28 index 00000000000..9bffaee2710
29 --- /dev/null
30 +++ b/net-dns/pdns/pdns-4.2.0_rc1.ebuild
31 @@ -0,0 +1,154 @@
32 +# Copyright 1999-2019 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI="7"
36 +
37 +inherit multilib user
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="debug doc geoip ldap libressl lua luajit mydns mysql opendbx postgres protobuf remote sodium sqlite systemd tools tinydns test"
53 +
54 +REQUIRED_USE="mydns? ( mysql )"
55 +
56 +RDEPEND="
57 + libressl? ( dev-libs/libressl:= )
58 + !libressl? ( dev-libs/openssl:= )
59 + >=dev-libs/boost-1.35:=
60 + lua? (
61 + !luajit? ( dev-lang/lua:= )
62 + luajit? ( dev-lang/luajit:= )
63 + )
64 + mysql? ( dev-db/mysql-connector-c )
65 + postgres? ( dev-db/postgresql:= )
66 + ldap? ( >=net-nds/openldap-2.0.27-r4 app-crypt/mit-krb5 )
67 + sqlite? ( dev-db/sqlite:3 )
68 + opendbx? ( dev-db/opendbx )
69 + geoip? ( >=dev-cpp/yaml-cpp-0.5.1:= dev-libs/geoip )
70 + sodium? ( dev-libs/libsodium:= )
71 + tinydns? ( >=dev-db/tinycdb-0.77 )
72 + protobuf? ( dev-libs/protobuf )"
73 +DEPEND="${RDEPEND}"
74 +BDEPEND="virtual/pkgconfig
75 + doc? ( app-doc/doxygen )"
76 +
77 +S="${WORKDIR}"/${P/_/-}
78 +
79 +src_configure() {
80 + local dynmodules="pipe bind" # the default backends, always enabled
81 +
82 + #use db2 && dynmodules+=" db2"
83 + use ldap && dynmodules+=" ldap"
84 + use lua && dynmodules+=" lua"
85 + use mydns && dynmodules+=" mydns"
86 + use mysql && dynmodules+=" gmysql"
87 + use opendbx && dynmodules+=" opendbx"
88 + #use oracle && dynmodules+=" goracle oracle"
89 + use postgres && dynmodules+=" gpgsql"
90 + use remote && dynmodules+=" remote"
91 + use sqlite && dynmodules+=" gsqlite3"
92 + use tinydns && dynmodules+=" tinydns"
93 + use geoip && dynmodules+=" geoip"
94 + #use xdb && dynmodules+=" xdb"
95 +
96 + econf \
97 + --disable-static \
98 + --sysconfdir=/etc/powerdns \
99 + --libdir=/usr/$(get_libdir)/powerdns \
100 + --with-modules= \
101 + --with-dynmodules="${dynmodules}" \
102 + --with-mysql-lib=/usr/$(get_libdir) \
103 + $(use_enable debug verbose-logging) \
104 + $(use_enable test unit-tests) \
105 + $(use_enable tools) \
106 + $(use_enable systemd) \
107 + $(use_with sodium libsodium) \
108 + $(use_with lua lua $(usex luajit luajit lua)) \
109 + $(use_with protobuf) \
110 + ${myconf}
111 +}
112 +
113 +src_compile() {
114 + default
115 + use doc && emake -C codedocs codedocs
116 +}
117 +
118 +src_install() {
119 + default
120 +
121 + mv "${D}"/etc/powerdns/pdns.conf{-dist,}
122 +
123 + fperms 0700 /etc/powerdns
124 + fperms 0600 /etc/powerdns/pdns.conf
125 +
126 + # set defaults: setuid=pdns, setgid=pdns
127 + sed -i \
128 + -e 's/^# set\([ug]\)id=$/set\1id=pdns/g' \
129 + "${D}"/etc/powerdns/pdns.conf
130 +
131 + newinitd "${FILESDIR}"/pdns-r1 pdns
132 +
133 + keepdir /var/empty
134 +
135 + if use doc; then
136 + docinto html
137 + dodoc -r codedocs/html/.
138 + fi
139 +
140 + # Install development headers
141 + insinto /usr/include/pdns
142 + doins pdns/*.hh
143 + insinto /usr/include/pdns/backends/gsql
144 + doins pdns/backends/gsql/*.hh
145 +
146 + if use ldap ; then
147 + insinto /etc/openldap/schema
148 + doins "${FILESDIR}"/dnsdomain2.schema
149 + fi
150 +
151 + find "${D}" -name '*.la' -delete || die
152 +}
153 +
154 +pkg_preinst() {
155 + enewgroup pdns
156 + enewuser pdns -1 -1 /var/empty pdns
157 +}
158 +
159 +pkg_postinst() {
160 + elog "PowerDNS provides multiple instances support. You can create more instances"
161 + elog "by symlinking the pdns init script to another name."
162 + elog
163 + elog "The name must be in the format pdns.<suffix> and PowerDNS will use the"
164 + elog "/etc/powerdns/pdns-<suffix>.conf configuration file instead of the default."
165 +
166 + if use ldap ; then
167 + ewarn "The official LDAP backend module is only compile-tested by upstream."
168 + ewarn "Try net-dns/pdns-ldap-backend if you have problems with it."
169 + fi
170 +
171 + local old
172 + for old in ${REPLACING_VERSIONS}; do
173 + ver_test ${old} -lt 3.2 || continue
174 +
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 +}