Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/unbound/, net-dns/unbound/files/
Date: Fri, 14 Sep 2018 22:13:55
Message-Id: 1536962617.d28117231da59bbe0b9cc759d28b88dc06ee1684.whissi@gentoo
1 commit: d28117231da59bbe0b9cc759d28b88dc06ee1684
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 14 15:17:39 2018 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 14 22:03:37 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2811723
7
8 net-dns/unbound: bump EAPI to EAPI=7
9
10 Package-Manager: Portage-2.3.49, Repoman-2.3.10
11
12 .../files/unbound-1.5.7-trust-anchor-file.patch | 6 +++
13 ...nbound-1.7.3.ebuild => unbound-1.7.3-r1.ebuild} | 52 +++++++++++++---------
14 ...nbound-1.8.0.ebuild => unbound-1.8.0-r1.ebuild} | 52 +++++++++++++---------
15 3 files changed, 70 insertions(+), 40 deletions(-)
16
17 diff --git a/net-dns/unbound/files/unbound-1.5.7-trust-anchor-file.patch b/net-dns/unbound/files/unbound-1.5.7-trust-anchor-file.patch
18 index c4c0ffa3d6d..85879db3cf2 100644
19 --- a/net-dns/unbound/files/unbound-1.5.7-trust-anchor-file.patch
20 +++ b/net-dns/unbound/files/unbound-1.5.7-trust-anchor-file.patch
21 @@ -1,3 +1,9 @@
22 +To avoid below error messages like
23 +
24 + [23109:0] error: Could not open autotrust file for writing, /etc/dnssec/root-anchors.txt: Permission denied
25 +
26 +set 'trust-anchor-file' to same value in 'auto-trust-anchor-file'.
27 +
28 diff -ur unbound-1.5.7.orig/doc/example.conf.in unbound-1.5.7/doc/example.conf.in
29 --- unbound-1.5.7.orig/doc/example.conf.in 2015-12-10 08:59:18.000000000 +0100
30 +++ unbound-1.5.7/doc/example.conf.in 2016-01-05 04:08:01.666760015 +0100
31
32 diff --git a/net-dns/unbound/unbound-1.7.3.ebuild b/net-dns/unbound/unbound-1.7.3-r1.ebuild
33 similarity index 76%
34 rename from net-dns/unbound/unbound-1.7.3.ebuild
35 rename to net-dns/unbound/unbound-1.7.3-r1.ebuild
36 index 9edf230ed88..6e815d9ab60 100644
37 --- a/net-dns/unbound/unbound-1.7.3.ebuild
38 +++ b/net-dns/unbound/unbound-1.7.3-r1.ebuild
39 @@ -1,10 +1,10 @@
40 # Copyright 1999-2018 Gentoo Foundation
41 # Distributed under the terms of the GNU General Public License v2
42
43 -EAPI=5
44 +EAPI="7"
45 PYTHON_COMPAT=( python2_7 )
46
47 -inherit eutils flag-o-matic multilib-minimal python-single-r1 systemd user
48 +inherit autotools flag-o-matic multilib-minimal python-single-r1 systemd user
49
50 MY_P=${PN}-${PV/_/}
51 DESCRIPTION="A validating, recursive and caching DNS resolver"
52 @@ -36,6 +36,8 @@ CDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
53 )
54 python? ( ${PYTHON_DEPS} )"
55
56 +BDEPEND="virtual/pkgconfig"
57 +
58 DEPEND="${CDEPEND}
59 python? ( dev-lang/swig )
60 test? (
61 @@ -43,16 +45,20 @@ DEPEND="${CDEPEND}
62 dev-util/splint
63 app-text/wdiff
64 )
65 - systemd? ( sys-apps/systemd )
66 - virtual/pkgconfig"
67 + systemd? ( sys-apps/systemd )"
68
69 RDEPEND="${CDEPEND}
70 + net-dns/dnssec-root
71 selinux? ( sec-policy/selinux-bind )"
72
73 # bug #347415
74 RDEPEND="${RDEPEND}
75 net-dns/dnssec-root"
76
77 +PATCHES=(
78 + "${FILESDIR}"/${PN}-1.5.7-trust-anchor-file.patch
79 +)
80 +
81 S=${WORKDIR}/${MY_P}
82
83 pkg_setup() {
84 @@ -68,11 +74,9 @@ pkg_setup() {
85 }
86
87 src_prepare() {
88 - # To avoid below error messages, set 'trust-anchor-file' to same value in
89 - # 'auto-trust-anchor-file'.
90 - # [23109:0] error: Could not open autotrust file for writing,
91 - # /etc/dnssec/root-anchors.txt: Permission denied
92 - epatch "${FILESDIR}"/${PN}-1.5.7-trust-anchor-file.patch
93 + default
94 +
95 + eautoreconf
96
97 # required for the python part
98 multilib_copy_sources
99 @@ -97,11 +101,11 @@ multilib_src_configure() {
100 $(use_with threads pthreads) \
101 --disable-flto \
102 --disable-rpath \
103 - --with-libevent="${EPREFIX}"/usr \
104 - --with-pidfile="${EPREFIX}"/var/run/unbound.pid \
105 - --with-rootkey-file="${EPREFIX}"/etc/dnssec/root-anchors.txt \
106 - --with-ssl="${EPREFIX}"/usr \
107 - --with-libexpat="${EPREFIX}"/usr
108 + --with-libevent="${EPREFIX%/}"/usr \
109 + --with-pidfile="${EPREFIX%/}"/var/run/unbound.pid \
110 + --with-rootkey-file="${EPREFIX%/}"/etc/dnssec/root-anchors.txt \
111 + --with-ssl="${EPREFIX%/}"/usr \
112 + --with-libexpat="${EPREFIX%/}"/usr
113
114 # http://unbound.nlnetlabs.nl/pipermail/unbound-users/2011-April/001801.html
115 # $(use_enable debug lock-checks) \
116 @@ -111,7 +115,6 @@ multilib_src_configure() {
117 }
118
119 multilib_src_install_all() {
120 - prune_libtool_files --modules
121 use python && python_optimize
122
123 newinitd "${FILESDIR}"/unbound.initd unbound
124 @@ -136,20 +139,29 @@ multilib_src_install_all() {
125 # create space for auto-trust-anchor-file...
126 keepdir /etc/unbound/var
127 # ... and point example config to it
128 - sed -i '/# auto-trust-anchor-file:/s,/etc/dnssec/root-anchors.txt,/etc/unbound/var/root-anchors.txt,' "${ED}/etc/unbound/unbound.conf"
129 + sed -i \
130 + -e '/# auto-trust-anchor-file:/s,/etc/dnssec/root-anchors.txt,/etc/unbound/var/root-anchors.txt,' \
131 + "${ED%/}/etc/unbound/unbound.conf" || \
132 + die
133 +
134 + find "${ED}" -name '*.la' -delete || die
135 + if ! use static-libs ; then
136 + find "${ED}" -name "*.a" -delete || die
137 + fi
138 }
139
140 pkg_postinst() {
141 # make var/ writable by unbound
142 - if [[ -d "${ROOT}/etc/unbound/var" ]]; then
143 - chown --no-dereference --from=root unbound: "${ROOT}/etc/unbound/var"
144 + if [[ -d "${EROOT%/}/etc/unbound/var" ]]; then
145 + chown --no-dereference --from=root unbound: "${EROOT%/}/etc/unbound/var"
146 fi
147 +
148 einfo ""
149 einfo "If you want unbound to automatically update the root-anchor file for DNSSEC validation"
150 - einfo "set 'auto-trust-anchor-file: /etc/unbound/var/root-anchors.txt' in /etc/unbound/unbound.conf"
151 + einfo "set 'auto-trust-anchor-file: ${EROOT%/}/etc/unbound/var/root-anchors.txt' in ${EROOT%/}/etc/unbound/unbound.conf"
152 einfo "and run"
153 einfo ""
154 - einfo " su -s /bin/sh -c '/usr/sbin/unbound-anchor -a /etc/unbound/var/root-anchors.txt' unbound"
155 + einfo " su -s /bin/sh -c '${EROOT%/}/usr/sbin/unbound-anchor -a ${EROOT%/}/etc/unbound/var/root-anchors.txt' unbound"
156 einfo ""
157 einfo "as root to create it initially before starting unbound for the first time after enabling this."
158 einfo ""
159
160 diff --git a/net-dns/unbound/unbound-1.8.0.ebuild b/net-dns/unbound/unbound-1.8.0-r1.ebuild
161 similarity index 77%
162 rename from net-dns/unbound/unbound-1.8.0.ebuild
163 rename to net-dns/unbound/unbound-1.8.0-r1.ebuild
164 index 3f81f97d29d..ff0faa9ad65 100644
165 --- a/net-dns/unbound/unbound-1.8.0.ebuild
166 +++ b/net-dns/unbound/unbound-1.8.0-r1.ebuild
167 @@ -1,10 +1,10 @@
168 # Copyright 1999-2018 Gentoo Foundation
169 # Distributed under the terms of the GNU General Public License v2
170
171 -EAPI=5
172 +EAPI="7"
173 PYTHON_COMPAT=( python2_7 )
174
175 -inherit eutils flag-o-matic multilib-minimal python-single-r1 systemd user
176 +inherit autotools flag-o-matic multilib-minimal python-single-r1 systemd user
177
178 MY_P=${PN}-${PV/_/}
179 DESCRIPTION="A validating, recursive and caching DNS resolver"
180 @@ -36,6 +36,8 @@ CDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
181 )
182 python? ( ${PYTHON_DEPS} )"
183
184 +BDEPEND="virtual/pkgconfig"
185 +
186 DEPEND="${CDEPEND}
187 python? ( dev-lang/swig )
188 test? (
189 @@ -43,16 +45,20 @@ DEPEND="${CDEPEND}
190 dev-util/splint
191 app-text/wdiff
192 )
193 - systemd? ( sys-apps/systemd )
194 - virtual/pkgconfig"
195 + systemd? ( sys-apps/systemd )"
196
197 RDEPEND="${CDEPEND}
198 + net-dns/dnssec-root
199 selinux? ( sec-policy/selinux-bind )"
200
201 # bug #347415
202 RDEPEND="${RDEPEND}
203 net-dns/dnssec-root"
204
205 +PATCHES=(
206 + "${FILESDIR}"/${PN}-1.5.7-trust-anchor-file.patch
207 +)
208 +
209 S=${WORKDIR}/${MY_P}
210
211 pkg_setup() {
212 @@ -68,11 +74,9 @@ pkg_setup() {
213 }
214
215 src_prepare() {
216 - # To avoid below error messages, set 'trust-anchor-file' to same value in
217 - # 'auto-trust-anchor-file'.
218 - # [23109:0] error: Could not open autotrust file for writing,
219 - # /etc/dnssec/root-anchors.txt: Permission denied
220 - epatch "${FILESDIR}"/${PN}-1.5.7-trust-anchor-file.patch
221 + default
222 +
223 + eautoreconf
224
225 # required for the python part
226 multilib_copy_sources
227 @@ -102,11 +106,11 @@ multilib_src_configure() {
228 --enable-subnet \
229 --enable-tfo-client \
230 --enable-tfo-server \
231 - --with-libevent="${EPREFIX}"/usr \
232 - --with-pidfile="${EPREFIX}"/var/run/unbound.pid \
233 - --with-rootkey-file="${EPREFIX}"/etc/dnssec/root-anchors.txt \
234 - --with-ssl="${EPREFIX}"/usr \
235 - --with-libexpat="${EPREFIX}"/usr
236 + --with-libevent="${EPREFIX%/}"/usr \
237 + --with-pidfile="${EPREFIX%/}"/var/run/unbound.pid \
238 + --with-rootkey-file="${EPREFIX%/}"/etc/dnssec/root-anchors.txt \
239 + --with-ssl="${EPREFIX%/}"/usr \
240 + --with-libexpat="${EPREFIX%/}"/usr
241
242 # http://unbound.nlnetlabs.nl/pipermail/unbound-users/2011-April/001801.html
243 # $(use_enable debug lock-checks) \
244 @@ -116,7 +120,6 @@ multilib_src_configure() {
245 }
246
247 multilib_src_install_all() {
248 - prune_libtool_files --modules
249 use python && python_optimize
250
251 newinitd "${FILESDIR}"/unbound.initd unbound
252 @@ -141,20 +144,29 @@ multilib_src_install_all() {
253 # create space for auto-trust-anchor-file...
254 keepdir /etc/unbound/var
255 # ... and point example config to it
256 - sed -i '/# auto-trust-anchor-file:/s,/etc/dnssec/root-anchors.txt,/etc/unbound/var/root-anchors.txt,' "${ED}/etc/unbound/unbound.conf"
257 + sed -i \
258 + -e '/# auto-trust-anchor-file:/s,/etc/dnssec/root-anchors.txt,/etc/unbound/var/root-anchors.txt,' \
259 + "${ED%/}/etc/unbound/unbound.conf" || \
260 + die
261 +
262 + find "${ED}" -name '*.la' -delete || die
263 + if ! use static-libs ; then
264 + find "${ED}" -name "*.a" -delete || die
265 + fi
266 }
267
268 pkg_postinst() {
269 # make var/ writable by unbound
270 - if [[ -d "${ROOT}/etc/unbound/var" ]]; then
271 - chown --no-dereference --from=root unbound: "${ROOT}/etc/unbound/var"
272 + if [[ -d "${EROOT%/}/etc/unbound/var" ]]; then
273 + chown --no-dereference --from=root unbound: "${EROOT%/}/etc/unbound/var"
274 fi
275 +
276 einfo ""
277 einfo "If you want unbound to automatically update the root-anchor file for DNSSEC validation"
278 - einfo "set 'auto-trust-anchor-file: /etc/unbound/var/root-anchors.txt' in /etc/unbound/unbound.conf"
279 + einfo "set 'auto-trust-anchor-file: ${EROOT%/}/etc/unbound/var/root-anchors.txt' in ${EROOT%/}/etc/unbound/unbound.conf"
280 einfo "and run"
281 einfo ""
282 - einfo " su -s /bin/sh -c '/usr/sbin/unbound-anchor -a /etc/unbound/var/root-anchors.txt' unbound"
283 + einfo " su -s /bin/sh -c '${EROOT%/}/usr/sbin/unbound-anchor -a ${EROOT%/}/etc/unbound/var/root-anchors.txt' unbound"
284 einfo ""
285 einfo "as root to create it initially before starting unbound for the first time after enabling this."
286 einfo ""