Gentoo Archives: gentoo-commits

From: Marc Schiffbauer <mschiff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/unbound/
Date: Mon, 26 Feb 2018 01:07:46
Message-Id: 1519607253.354cb17ea56d3061812126b826e76a64e918d8a2.mschiff@gentoo
1 commit: 354cb17ea56d3061812126b826e76a64e918d8a2
2 Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 26 01:07:18 2018 +0000
4 Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 26 01:07:33 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=354cb17e
7
8 net-dns/unbound: add var/ dir for auto-trust-anchor by default
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 ...ound-1.6.8-r1.ebuild => unbound-1.6.8-r2.ebuild} | 21 +++++++++++++++++++++
13 1 file changed, 21 insertions(+)
14
15 diff --git a/net-dns/unbound/unbound-1.6.8-r1.ebuild b/net-dns/unbound/unbound-1.6.8-r2.ebuild
16 similarity index 81%
17 rename from net-dns/unbound/unbound-1.6.8-r1.ebuild
18 rename to net-dns/unbound/unbound-1.6.8-r2.ebuild
19 index 07379f933b5..8fda5205f20 100644
20 --- a/net-dns/unbound/unbound-1.6.8-r1.ebuild
21 +++ b/net-dns/unbound/unbound-1.6.8-r2.ebuild
22 @@ -132,4 +132,25 @@ multilib_src_install_all() {
23
24 exeinto /usr/share/${PN}
25 doexe contrib/update-anchor.sh
26 +
27 + # create space for auto-trust-anchor-file...
28 + keepdir /etc/unbound/var
29 + # ... and point example config to it
30 + sed -i '/# auto-trust-anchor-file:/s,/etc/dnssec/root-anchors.txt,/etc/unbound/var/root-anchors.txt,' "${ED}/etc/unbound/unbound.conf"
31 +}
32 +
33 +pkg_postinst() {
34 + # make var/ writable by unbound
35 + if [[ -d "${ROOT}/etc/unbound/var" ]]; then
36 + chown --no-dereference --from=root unbound: "${ROOT}/etc/unbound/var"
37 + fi
38 + einfo ""
39 + einfo "If you want unbound to automatically update the root-anchor file for DNSSEC validation"
40 + einfo "set 'auto-trust-anchor-file: /etc/unbound/var/root-anchors.txt' in /etc/unbound/unbound.conf"
41 + einfo "and run"
42 + einfo ""
43 + einfo " su -s /bin/sh -c '/usr/sbin/unbound-anchor -a /etc/unbound/var/root-anchors.txt' unbound"
44 + einfo ""
45 + einfo "as root to create it initially before starting unbound for the first time after enabling this."
46 + einfo ""
47 }