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: Wed, 29 Aug 2018 16:00:57
Message-Id: 1535558434.952d646a054017bc467408e3e0697cc34f50dff9.swegener@gentoo
1 commit: 952d646a054017bc467408e3e0697cc34f50dff9
2 Author: Sven Wegener <swegener <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 29 16:00:07 2018 +0000
4 Commit: Sven Wegener <swegener <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 29 16:00:34 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=952d646a
7
8 net-dns/pdns: Version bump
9
10 Package-Manager: Portage-2.3.40, Repoman-2.3.9
11
12 net-dns/pdns/Manifest | 1 +
13 net-dns/pdns/pdns-4.1.4.ebuild | 155 +++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 156 insertions(+)
15
16 diff --git a/net-dns/pdns/Manifest b/net-dns/pdns/Manifest
17 index 371482ffee5..de63e0135d7 100644
18 --- a/net-dns/pdns/Manifest
19 +++ b/net-dns/pdns/Manifest
20 @@ -3,3 +3,4 @@ DIST pdns-4.1.0.tar.bz2 1116905 BLAKE2B 91ec0f0cfa70966ff71dfb6302ed01355120ca14
21 DIST pdns-4.1.1.tar.bz2 1113659 BLAKE2B 916dd6ad815a867580d36668e70ec62991ccd45abafdcaa282a2d3edf7ea1b1ae4fc8add8f6b1ce5c8a8d76fc5bf6a6fa458202b7623842afabf7da593333585 SHA512 23e62ec39007e39a289945457e9b950cbeabf8581f477397341dfbd3592b7ccdede8f4c9ce653a47add07784d1a23116f9013c755eb11af1df383b49a8ca341d
22 DIST pdns-4.1.2.tar.bz2 1117225 BLAKE2B 6a4ffc7ea6ccf4dcde63f78c203efe4c17d3769785173211f4d98b9a1891d3d747b95f686c41c6197f28931302eb8389d4fe899409a98d5d83f71fbd15c36d78 SHA512 3fe9f5d8d87bfc77e98915d9019000b6bc0b91ed7ed363ba00a64321cc534290e23627f18a6ba87797a954f7c82b777f746f4f45eb70efb30fa2aa1a80c67a68
23 DIST pdns-4.1.3.tar.bz2 1114829 BLAKE2B d379dafc438402df57674686073469aabaa442b174cd6e217d80878a64d103f753cae6b96be32efd841f3ae46cb333b4136b0a33e332f420e83553815f4024e0 SHA512 a5201cf48911188db0c70cb44a27b9a6cebc16f6b740abdadd283dd53feedeed9cfa16ab833b8230f24790f349a0f2ebcca653ca502bb9b2c75d08bd7c60140c
24 +DIST pdns-4.1.4.tar.bz2 1089376 BLAKE2B bdf1736c547927579af7557f695bfd63c4f0ea270ce8d90ddbad186d24bc8c7851254b99ee44d418d0b8c92be0b9d61f10f11f7a491baa8e00e0197b511b1a1e SHA512 ae5cd89d039635beddcb9709d0f6b06321a923343900f88e536aac2feb1e08d41b466b6addb2399f50b20d7ac19fcf4c48d47d0d9219367b37b260c40863ad93
25
26 diff --git a/net-dns/pdns/pdns-4.1.4.ebuild b/net-dns/pdns/pdns-4.1.4.ebuild
27 new file mode 100644
28 index 00000000000..bfe5185aaf7
29 --- /dev/null
30 +++ b/net-dns/pdns/pdns-4.1.4.ebuild
31 @@ -0,0 +1,155 @@
32 +# Copyright 1999-2018 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 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 + botan? ( dev-libs/botan:2= )
61 + lua? (
62 + !luajit? ( dev-lang/lua:= )
63 + luajit? ( dev-lang/luajit:= )
64 + )
65 + mysql? ( virtual/mysql )
66 + postgres? ( dev-db/postgresql:= )
67 + ldap? ( >=net-nds/openldap-2.0.27-r4 app-crypt/mit-krb5 )
68 + sqlite? ( dev-db/sqlite:3 )
69 + opendbx? ( dev-db/opendbx )
70 + geoip? ( >=dev-cpp/yaml-cpp-0.5.1:= dev-libs/geoip )
71 + sodium? ( dev-libs/libsodium:= )
72 + tinydns? ( >=dev-db/tinycdb-0.77 )
73 + protobuf? ( dev-libs/protobuf )"
74 +DEPEND="${RDEPEND}
75 + virtual/pkgconfig
76 + doc? ( app-doc/doxygen )"
77 +
78 +S="${WORKDIR}"/${P/_/-}
79 +
80 +src_configure() {
81 + local dynmodules="pipe bind" # the default backends, always enabled
82 +
83 + #use db2 && dynmodules+=" db2"
84 + use ldap && dynmodules+=" ldap"
85 + use lua && dynmodules+=" lua"
86 + use mydns && dynmodules+=" mydns"
87 + use mysql && dynmodules+=" gmysql"
88 + use opendbx && dynmodules+=" opendbx"
89 + #use oracle && dynmodules+=" goracle oracle"
90 + use postgres && dynmodules+=" gpgsql"
91 + use remote && dynmodules+=" remote"
92 + use sqlite && dynmodules+=" gsqlite3"
93 + use tinydns && dynmodules+=" tinydns"
94 + use geoip && dynmodules+=" geoip"
95 + #use xdb && dynmodules+=" xdb"
96 +
97 + econf \
98 + --disable-static \
99 + --sysconfdir=/etc/powerdns \
100 + --libdir=/usr/$(get_libdir)/powerdns \
101 + --with-modules= \
102 + --with-dynmodules="${dynmodules}" \
103 + --with-mysql-lib=/usr/$(get_libdir) \
104 + $(use_enable botan) \
105 + $(use_enable debug verbose-logging) \
106 + $(use_enable test unit-tests) \
107 + $(use_enable tools) \
108 + $(use_enable systemd) \
109 + $(use_enable sodium libsodium) \
110 + $(usex lua "$(use_with !luajit lua) $(use_with luajit)" \
111 + '--without-lua --without-luajit') \
112 + $(use_with protobuf) \
113 + ${myconf}
114 +}
115 +
116 +src_compile() {
117 + default
118 + use doc && emake -C codedocs codedocs
119 +}
120 +
121 +src_install() {
122 + default
123 +
124 + mv "${D}"/etc/powerdns/pdns.conf{-dist,}
125 +
126 + fperms 0700 /etc/powerdns
127 + fperms 0600 /etc/powerdns/pdns.conf
128 +
129 + # set defaults: setuid=pdns, setgid=pdns
130 + sed -i \
131 + -e 's/^# set\([ug]\)id=$/set\1id=pdns/g' \
132 + "${D}"/etc/powerdns/pdns.conf
133 +
134 + newinitd "${FILESDIR}"/pdns-r1 pdns
135 +
136 + keepdir /var/empty
137 +
138 + use doc && dohtml -r codedocs/html/.
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 + prune_libtool_files --all
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 + version_compare ${old} 3.2
174 + [[ $? -eq 1 ]] || continue
175 +
176 + ewarn "To fix a security bug (bug #458018) had the following"
177 + ewarn "files/directories the world-readable bit removed (if set):"
178 + ewarn " ${EPREFIX}/etc/powerdns"
179 + ewarn " ${EPREFIX}/etc/powerdns/pdns.conf"
180 + ewarn "Check if this is correct for your setup"
181 + ewarn "This is a one-time change and will not happen on subsequent updates."
182 + chmod o-rwx "${EPREFIX}"/etc/powerdns/{,pdns.conf}
183 +
184 + break
185 + done
186 +}