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: Fri, 16 Feb 2018 17:22:57
Message-Id: 1518801770.2da207b6a6ab6f334f3d3def2ea6821694dda4e1.swegener@gentoo
1 commit: 2da207b6a6ab6f334f3d3def2ea6821694dda4e1
2 Author: Sven Wegener <swegener <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 16 17:22:27 2018 +0000
4 Commit: Sven Wegener <swegener <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 16 17:22:50 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2da207b6
7
8 net-dns/pdns: Version bump
9
10 Package-Manager: Portage-2.3.19, Repoman-2.3.6
11
12 net-dns/pdns/Manifest | 1 +
13 net-dns/pdns/pdns-4.1.1.ebuild | 153 +++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 154 insertions(+)
15
16 diff --git a/net-dns/pdns/Manifest b/net-dns/pdns/Manifest
17 index 59f3e99cdf8..020056c78f0 100644
18 --- a/net-dns/pdns/Manifest
19 +++ b/net-dns/pdns/Manifest
20 @@ -1,2 +1,3 @@
21 DIST pdns-4.0.5.tar.bz2 1323468 BLAKE2B 7e10cc98177bfa4f81888e2598ab4f0ce83ee45e6349372c065940424a74015302da879536dea8346fe7b86f35c0524a5449489bdf71d1a091b7c6a82fac4b6f SHA512 4b0fa932c1d9caf35b988916447aa21c64ebe2a58bdd84417cf09321a21b264cf1057206dc6993a45a3b591eb1dfa49463710c06b6bdfaf6fb17ae6dec6086d9
22 DIST pdns-4.1.0.tar.bz2 1116905 BLAKE2B 91ec0f0cfa70966ff71dfb6302ed01355120ca1429d3c610c4abfb1b964cff78a6332700991bc259387e9095be03d3850da41750e93bb3ffe3db0e23562d156c SHA512 4b2b42f4893f8aac3cf07a6c8a3c999cb728a5907a710f1a5c9c8d08377ecb63e202e5eececbefc069c8f1d97a29b2aa607da7cf2bcc6335a72222418e409e77
23 +DIST pdns-4.1.1.tar.bz2 1113659 BLAKE2B 916dd6ad815a867580d36668e70ec62991ccd45abafdcaa282a2d3edf7ea1b1ae4fc8add8f6b1ce5c8a8d76fc5bf6a6fa458202b7623842afabf7da593333585 SHA512 23e62ec39007e39a289945457e9b950cbeabf8581f477397341dfbd3592b7ccdede8f4c9ce653a47add07784d1a23116f9013c755eb11af1df383b49a8ca341d
24
25 diff --git a/net-dns/pdns/pdns-4.1.1.ebuild b/net-dns/pdns/pdns-4.1.1.ebuild
26 new file mode 100644
27 index 00000000000..7ec5508cb26
28 --- /dev/null
29 +++ b/net-dns/pdns/pdns-4.1.1.ebuild
30 @@ -0,0 +1,153 @@
31 +# Copyright 1999-2018 Gentoo Foundation
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI="6"
35 +
36 +inherit eutils multilib user toolchain-funcs versionator
37 +
38 +DESCRIPTION="The PowerDNS Daemon"
39 +HOMEPAGE="https://www.powerdns.com/"
40 +SRC_URI="https://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 debug doc geoip ldap libressl lua luajit mydns mysql opendbx postgres protobuf remote sodium sqlite systemd tools tinydns test"
52 +
53 +REQUIRED_USE="mydns? ( mysql ) ?? ( lua luajit )"
54 +
55 +RDEPEND="
56 + libressl? ( dev-libs/libressl:= )
57 + !libressl? ( dev-libs/openssl:= )
58 + >=dev-libs/boost-1.35:=
59 + botan? ( dev-libs/botan:2= )
60 + lua? ( dev-lang/lua:= )
61 + luajit? ( dev-lang/luajit:= )
62 + mysql? ( virtual/mysql )
63 + postgres? ( dev-db/postgresql:= )
64 + ldap? ( >=net-nds/openldap-2.0.27-r4 app-crypt/mit-krb5 )
65 + sqlite? ( dev-db/sqlite:3 )
66 + opendbx? ( dev-db/opendbx )
67 + geoip? ( >=dev-cpp/yaml-cpp-0.5.1 dev-libs/geoip )
68 + sodium? ( dev-libs/libsodium:= )
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-mysql-lib=/usr/$(get_libdir) \
101 + $(use_enable botan) \
102 + $(use_enable debug verbose-logging) \
103 + $(use_enable test unit-tests) \
104 + $(use_enable tools) \
105 + $(use_enable systemd) \
106 + $(use_enable sodium libsodium) \
107 + $(use_with lua) \
108 + $(use_with luajit) \
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 + use doc && dohtml -r codedocs/html/.
136 +
137 + # Install development headers
138 + insinto /usr/include/pdns
139 + doins pdns/*.hh
140 + insinto /usr/include/pdns/backends/gsql
141 + doins pdns/backends/gsql/*.hh
142 +
143 + if use ldap ; then
144 + insinto /etc/openldap/schema
145 + doins "${FILESDIR}"/dnsdomain2.schema
146 + fi
147 +
148 + prune_libtool_files --all
149 +}
150 +
151 +pkg_preinst() {
152 + enewgroup pdns
153 + enewuser pdns -1 -1 /var/empty pdns
154 +}
155 +
156 +pkg_postinst() {
157 + elog "PowerDNS provides multiple instances support. You can create more instances"
158 + elog "by symlinking the pdns init script to another name."
159 + elog
160 + elog "The name must be in the format pdns.<suffix> and PowerDNS will use the"
161 + elog "/etc/powerdns/pdns-<suffix>.conf configuration file instead of the default."
162 +
163 + if use ldap ; then
164 + ewarn "The official LDAP backend module is only compile-tested by upstream."
165 + ewarn "Try net-dns/pdns-ldap-backend if you have problems with it."
166 + fi
167 +
168 + local old
169 + for old in ${REPLACING_VERSIONS}; do
170 + version_compare ${old} 3.2
171 + [[ $? -eq 1 ]] || continue
172 +
173 + ewarn "To fix a security bug (bug #458018) had the following"
174 + ewarn "files/directories the world-readable bit removed (if set):"
175 + ewarn " ${EPREFIX}/etc/powerdns"
176 + ewarn " ${EPREFIX}/etc/powerdns/pdns.conf"
177 + ewarn "Check if this is correct for your setup"
178 + ewarn "This is a one-time change and will not happen on subsequent updates."
179 + chmod o-rwx "${EPREFIX}"/etc/powerdns/{,pdns.conf}
180 +
181 + break
182 + done
183 +}