1 |
commit: ad5074604df3d2301cfe10f6e7461b19b581fac6 |
2 |
Author: Sven Wegener <swegener <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 10 20:38:10 2020 +0000 |
4 |
Commit: Sven Wegener <swegener <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 10 20:39:33 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad507460 |
7 |
|
8 |
net-dns/pdns: Revision bump to switch to acct packages |
9 |
|
10 |
Package-Manager: Portage-2.3.89, Repoman-2.3.20 |
11 |
Signed-off-by: Sven Wegener <swegener <AT> gentoo.org> |
12 |
|
13 |
net-dns/pdns/pdns-4.2.1-r1.ebuild | 173 ++++++++++++++++++++++++++++++++++++++ |
14 |
1 file changed, 173 insertions(+) |
15 |
|
16 |
diff --git a/net-dns/pdns/pdns-4.2.1-r1.ebuild b/net-dns/pdns/pdns-4.2.1-r1.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..11a7e60ebb9 |
19 |
--- /dev/null |
20 |
+++ b/net-dns/pdns/pdns-4.2.1-r1.ebuild |
21 |
@@ -0,0 +1,173 @@ |
22 |
+# Copyright 1999-2020 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI="7" |
26 |
+ |
27 |
+inherit multilib |
28 |
+ |
29 |
+DESCRIPTION="The PowerDNS Daemon" |
30 |
+HOMEPAGE="https://www.powerdns.com/" |
31 |
+SRC_URI="https://downloads.powerdns.com/releases/${P/_/-}.tar.bz2" |
32 |
+ |
33 |
+LICENSE="GPL-2" |
34 |
+SLOT="0" |
35 |
+KEYWORDS="~amd64 ~x86" |
36 |
+ |
37 |
+# other possible flags: |
38 |
+# db2: we lack the dep |
39 |
+# oracle: dito (need Oracle Client Libraries) |
40 |
+# xdb: (almost) dead, surely not supported |
41 |
+ |
42 |
+IUSE="debug doc geoip ldap libressl lua luajit lua-records mydns mysql opendbx postgres protobuf remote sodium sqlite systemd tools tinydns test" |
43 |
+RESTRICT="!test? ( test )" |
44 |
+ |
45 |
+REQUIRED_USE="lua-records? ( lua ) mydns? ( mysql )" |
46 |
+ |
47 |
+RDEPEND=" |
48 |
+ libressl? ( dev-libs/libressl:= ) |
49 |
+ !libressl? ( dev-libs/openssl:= ) |
50 |
+ >=dev-libs/boost-1.35:= |
51 |
+ lua? ( |
52 |
+ !luajit? ( dev-lang/lua:= ) |
53 |
+ luajit? ( dev-lang/luajit:= ) |
54 |
+ ) |
55 |
+ lua-records? ( >=net-misc/curl-7.21.3 ) |
56 |
+ mysql? ( dev-db/mysql-connector-c:= ) |
57 |
+ postgres? ( dev-db/postgresql:= ) |
58 |
+ ldap? ( >=net-nds/openldap-2.0.27-r4 app-crypt/mit-krb5 ) |
59 |
+ sqlite? ( dev-db/sqlite:3 ) |
60 |
+ opendbx? ( dev-db/opendbx ) |
61 |
+ geoip? ( >=dev-cpp/yaml-cpp-0.5.1:= dev-libs/geoip ) |
62 |
+ sodium? ( dev-libs/libsodium:= ) |
63 |
+ tinydns? ( >=dev-db/tinycdb-0.77 ) |
64 |
+ protobuf? ( dev-libs/protobuf )" |
65 |
+DEPEND="${RDEPEND}" |
66 |
+RDEPEND="${RDEPEND} |
67 |
+ acct-user/pdns |
68 |
+ acct-group/pdns" |
69 |
+ |
70 |
+BDEPEND="virtual/pkgconfig |
71 |
+ doc? ( app-doc/doxygen )" |
72 |
+ |
73 |
+S="${WORKDIR}"/${P/_/-} |
74 |
+ |
75 |
+src_configure() { |
76 |
+ local dynmodules="pipe bind" # the default backends, always enabled |
77 |
+ |
78 |
+ #use db2 && dynmodules+=" db2" |
79 |
+ use ldap && dynmodules+=" ldap" |
80 |
+ use lua && dynmodules+=" lua" |
81 |
+ use mydns && dynmodules+=" mydns" |
82 |
+ use mysql && dynmodules+=" gmysql" |
83 |
+ use opendbx && dynmodules+=" opendbx" |
84 |
+ #use oracle && dynmodules+=" goracle oracle" |
85 |
+ use postgres && dynmodules+=" gpgsql" |
86 |
+ use remote && dynmodules+=" remote" |
87 |
+ use sqlite && dynmodules+=" gsqlite3" |
88 |
+ use tinydns && dynmodules+=" tinydns" |
89 |
+ use geoip && dynmodules+=" geoip" |
90 |
+ #use xdb && dynmodules+=" xdb" |
91 |
+ |
92 |
+ econf \ |
93 |
+ --disable-static \ |
94 |
+ --sysconfdir=/etc/powerdns \ |
95 |
+ --libdir=/usr/$(get_libdir)/powerdns \ |
96 |
+ --with-modules= \ |
97 |
+ --with-dynmodules="${dynmodules}" \ |
98 |
+ --with-mysql-lib=/usr/$(get_libdir) \ |
99 |
+ $(use_enable debug verbose-logging) \ |
100 |
+ $(use_enable lua-records) \ |
101 |
+ $(use_enable test unit-tests) \ |
102 |
+ $(use_enable tools) \ |
103 |
+ $(use_enable systemd) \ |
104 |
+ $(use_with sodium libsodium) \ |
105 |
+ $(use_with lua lua $(usex luajit luajit lua)) \ |
106 |
+ $(use_with protobuf) \ |
107 |
+ ${myconf} |
108 |
+} |
109 |
+ |
110 |
+src_compile() { |
111 |
+ default |
112 |
+ use doc && emake -C codedocs codedocs |
113 |
+} |
114 |
+ |
115 |
+src_install() { |
116 |
+ default |
117 |
+ |
118 |
+ mv "${D}"/etc/powerdns/pdns.conf{-dist,} |
119 |
+ |
120 |
+ fperms 0700 /etc/powerdns |
121 |
+ fperms 0600 /etc/powerdns/pdns.conf |
122 |
+ |
123 |
+ # set defaults: setuid=pdns, setgid=pdns |
124 |
+ sed -i \ |
125 |
+ -e 's/^# set\([ug]\)id=$/set\1id=pdns/g' \ |
126 |
+ "${D}"/etc/powerdns/pdns.conf |
127 |
+ |
128 |
+ newinitd "${FILESDIR}"/pdns-r1 pdns |
129 |
+ |
130 |
+ keepdir /var/empty |
131 |
+ |
132 |
+ if use doc; then |
133 |
+ docinto html |
134 |
+ dodoc -r codedocs/html/. |
135 |
+ fi |
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 |
+ find "${D}" -name '*.la' -delete || die |
149 |
+} |
150 |
+ |
151 |
+pkg_postinst() { |
152 |
+ elog "PowerDNS provides multiple instances support. You can create more instances" |
153 |
+ elog "by symlinking the pdns init script to another name." |
154 |
+ elog |
155 |
+ elog "The name must be in the format pdns.<suffix> and PowerDNS will use the" |
156 |
+ elog "/etc/powerdns/pdns-<suffix>.conf configuration file instead of the default." |
157 |
+ |
158 |
+ if use ldap ; then |
159 |
+ echo |
160 |
+ ewarn "The official LDAP backend module is only compile-tested by upstream." |
161 |
+ ewarn "Try net-dns/pdns-ldap-backend if you have problems with it." |
162 |
+ fi |
163 |
+ |
164 |
+ local old |
165 |
+ for old in ${REPLACING_VERSIONS}; do |
166 |
+ ver_test ${old} -lt 3.2 || continue |
167 |
+ |
168 |
+ echo |
169 |
+ ewarn "To fix a security bug (bug #458018) had the following" |
170 |
+ ewarn "files/directories the world-readable bit removed (if set):" |
171 |
+ ewarn " ${EPREFIX}/etc/powerdns" |
172 |
+ ewarn " ${EPREFIX}/etc/powerdns/pdns.conf" |
173 |
+ ewarn "Check if this is correct for your setup" |
174 |
+ ewarn "This is a one-time change and will not happen on subsequent updates." |
175 |
+ chmod o-rwx "${EPREFIX}"/etc/powerdns/{,pdns.conf} |
176 |
+ |
177 |
+ break |
178 |
+ done |
179 |
+ |
180 |
+ if use postgres; then |
181 |
+ for old in ${REPLACING_VERSIONS}; do |
182 |
+ ver_test ${old} -lt 4.1.11-r1 || continue |
183 |
+ |
184 |
+ echo |
185 |
+ ewarn "PowerDNS 4.1.11 contains a security fix for the PostgreSQL backend." |
186 |
+ ewarn "This security fix needs to be applied manually to the database schema." |
187 |
+ ewarn "Please refer to the official security advisory for more information:" |
188 |
+ ewarn |
189 |
+ ewarn " https://doc.powerdns.com/authoritative/security-advisories/powerdns-advisory-2019-06.html" |
190 |
+ |
191 |
+ break |
192 |
+ done |
193 |
+ fi |
194 |
+} |