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/
Date: Sat, 09 Feb 2019 15:37:49
Message-Id: 1549726657.56d332563d4c87de924ab1671dca67d6ec2f25c6.whissi@gentoo
1 commit: 56d332563d4c87de924ab1671dca67d6ec2f25c6
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 9 15:37:12 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 9 15:37:37 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56d33256
7
8 net-dns/unbound: bump to v1.9.0
9
10 Package-Manager: Portage-2.3.59, Repoman-2.3.12
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 net-dns/unbound/Manifest | 1 +
14 net-dns/unbound/unbound-1.9.0.ebuild | 181 +++++++++++++++++++++++++++++++++++
15 2 files changed, 182 insertions(+)
16
17 diff --git a/net-dns/unbound/Manifest b/net-dns/unbound/Manifest
18 index 6c9cd54a62f..15037561d07 100644
19 --- a/net-dns/unbound/Manifest
20 +++ b/net-dns/unbound/Manifest
21 @@ -1,3 +1,4 @@
22 DIST unbound-1.8.0.tar.gz 5609213 BLAKE2B 41e464df60e03d502f13758e75f9143658b2a496c4fad69804d9d404e23a8d4b5480cc09048197f8593e37feffdffaea33b18a06d864d0d35e986169b49f42e4 SHA512 6c46f5b86b5bd98a7b549b660173d487e59e65385cebd7bc29429b4fee69f2b490651a409c57b072b9b604fa98e289fa82eeecfea8779900038c25b28a6bd064
23 DIST unbound-1.8.1.tar.gz 5610191 BLAKE2B 15118f5940b4362dd515f8b335c8a39fc5ef1d3fbf0c20efbf0097342fabb4890eae0527f8b00ace181a425b413882db962b63d329f664cf12649d4d6ec8e5ea SHA512 1872a980e06258d28d2bc7f69a4c56fc07e03e4c9856161e89abc28527fff5812a47ea9927fd362bca690e3a87b95046ac96c8beeccaeb8596458f140c33b217
24 DIST unbound-1.8.3.tar.gz 5629180 BLAKE2B f3fe17df04100291aac752565b3afa859200c222e4fb8c2ed2d9903f7a38ede9965444237c34f3257d29bf367b56fd2a2d48648e7145c91e2dbbd0b79242451d SHA512 545486ccce288a6ef1937d82653a43a11dbd3aec7b8d0036e7fd107e537cdfc935def9db9178c2eb418d6f4b0849a242a0be1dea966f3e9e0145aa7266e483ad
25 +DIST unbound-1.9.0.tar.gz 5662176 BLAKE2B dff42ca4155df1c364bcfeb37c0f9516e7f167cc59bebd1fcf264db6471ad99804323c59e485662e03ab095932f1ca3fe25693a9ba840e9c0ecad69cf31b1a2d SHA512 7dfa8e078507fc24a2d0938eea590389453bacfcac023f1a41af19350ea1f7b87d0c82d7eead121a11068921292a96865e177274ff27ed8b8868445f80f7baf6
26
27 diff --git a/net-dns/unbound/unbound-1.9.0.ebuild b/net-dns/unbound/unbound-1.9.0.ebuild
28 new file mode 100644
29 index 00000000000..c51b28fbac6
30 --- /dev/null
31 +++ b/net-dns/unbound/unbound-1.9.0.ebuild
32 @@ -0,0 +1,181 @@
33 +# Copyright 1999-2019 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI="7"
37 +PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} )
38 +
39 +inherit autotools flag-o-matic multilib-minimal python-single-r1 systemd user
40 +
41 +MY_P=${PN}-${PV/_/}
42 +DESCRIPTION="A validating, recursive and caching DNS resolver"
43 +HOMEPAGE="https://unbound.net/ https://nlnetlabs.nl/projects/unbound/about/"
44 +SRC_URI="https://nlnetlabs.nl/downloads/unbound/${MY_P}.tar.gz"
45 +
46 +LICENSE="BSD GPL-2"
47 +SLOT="0/8" # ABI version of libunbound.so
48 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86"
49 +IUSE="debug dnscrypt dnstap +ecdsa ecs gost libressl python redis selinux static-libs systemd test threads"
50 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
51 +
52 +# Note: expat is needed by executable only but the Makefile is custom
53 +# and doesn't make it possible to easily install the library without
54 +# the executables. MULTILIB_USEDEP may be dropped once build system
55 +# is fixed.
56 +
57 +CDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
58 + >=dev-libs/libevent-2.0.21:0=[${MULTILIB_USEDEP}]
59 + libressl? ( >=dev-libs/libressl-2.2.4:0[${MULTILIB_USEDEP}] )
60 + !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
61 + dnscrypt? ( dev-libs/libsodium[${MULTILIB_USEDEP}] )
62 + dnstap? (
63 + dev-libs/fstrm[${MULTILIB_USEDEP}]
64 + >=dev-libs/protobuf-c-1.0.2-r1[${MULTILIB_USEDEP}]
65 + )
66 + ecdsa? (
67 + !libressl? ( dev-libs/openssl:0[-bindist] )
68 + )
69 + python? ( ${PYTHON_DEPS} )
70 + redis? ( dev-libs/hiredis:= )"
71 +
72 +BDEPEND="virtual/pkgconfig"
73 +
74 +DEPEND="${CDEPEND}
75 + python? ( dev-lang/swig )
76 + test? (
77 + net-dns/ldns-utils[examples]
78 + dev-util/splint
79 + app-text/wdiff
80 + )
81 + systemd? ( sys-apps/systemd )"
82 +
83 +RDEPEND="${CDEPEND}
84 + net-dns/dnssec-root
85 + selinux? ( sec-policy/selinux-bind )"
86 +
87 +# bug #347415
88 +RDEPEND="${RDEPEND}
89 + net-dns/dnssec-root"
90 +
91 +PATCHES=(
92 + "${FILESDIR}"/${PN}-1.5.7-trust-anchor-file.patch
93 + "${FILESDIR}"/${PN}-1.6.3-pkg-config.patch
94 +)
95 +
96 +S=${WORKDIR}/${MY_P}
97 +
98 +pkg_setup() {
99 + enewgroup unbound
100 + enewuser unbound -1 -1 /etc/unbound unbound
101 + # improve security on existing installs (bug #641042)
102 + # as well as new installs where unbound homedir has just been created
103 + if [[ -d "${ROOT}/etc/unbound" ]]; then
104 + chown --no-dereference --from=unbound root "${ROOT}/etc/unbound"
105 + fi
106 +
107 + use python && python-single-r1_pkg_setup
108 +}
109 +
110 +src_prepare() {
111 + default
112 +
113 + eautoreconf
114 +
115 + # required for the python part
116 + multilib_copy_sources
117 +}
118 +
119 +src_configure() {
120 + [[ ${CHOST} == *-darwin* ]] || append-ldflags -Wl,-z,noexecstack
121 + multilib-minimal_src_configure
122 +}
123 +
124 +multilib_src_configure() {
125 + econf \
126 + $(use_enable debug) \
127 + $(use_enable gost) \
128 + $(use_enable dnscrypt) \
129 + $(use_enable dnstap) \
130 + $(use_enable ecdsa) \
131 + $(use_enable ecs subnet) \
132 + $(multilib_native_use_enable redis cachedb) \
133 + $(use_enable static-libs static) \
134 + $(use_enable systemd) \
135 + $(multilib_native_use_with python pythonmodule) \
136 + $(multilib_native_use_with python pyunbound) \
137 + $(use_with threads pthreads) \
138 + --disable-flto \
139 + --disable-rpath \
140 + --enable-ipsecmod \
141 + --enable-tfo-client \
142 + --enable-tfo-server \
143 + --with-libevent="${EPREFIX%/}"/usr \
144 + $(multilib_native_usex redis --with-libhiredis="${EPREFIX%/}/usr" --without-libhiredis) \
145 + --with-pidfile="${EPREFIX%/}"/run/unbound.pid \
146 + --with-rootkey-file="${EPREFIX%/}"/etc/dnssec/root-anchors.txt \
147 + --with-ssl="${EPREFIX%/}"/usr \
148 + --with-libexpat="${EPREFIX%/}"/usr
149 +
150 + # http://unbound.nlnetlabs.nl/pipermail/unbound-users/2011-April/001801.html
151 + # $(use_enable debug lock-checks) \
152 + # $(use_enable debug alloc-checks) \
153 + # $(use_enable debug alloc-lite) \
154 + # $(use_enable debug alloc-nonregional) \
155 +}
156 +
157 +multilib_src_install_all() {
158 + use python && python_optimize
159 +
160 + newinitd "${FILESDIR}"/unbound-r1.initd unbound
161 + newconfd "${FILESDIR}"/unbound-r1.confd unbound
162 +
163 + systemd_dounit "${FILESDIR}"/unbound.service
164 + systemd_dounit "${FILESDIR}"/unbound.socket
165 + systemd_newunit "${FILESDIR}"/unbound_at.service "unbound@.service"
166 + systemd_dounit "${FILESDIR}"/unbound-anchor.service
167 +
168 + dodoc doc/{README,CREDITS,TODO,Changelog,FEATURES}
169 +
170 + # bug #315519
171 + dodoc contrib/unbound_munin_
172 +
173 + docinto selinux
174 + dodoc contrib/selinux/*
175 +
176 + exeinto /usr/share/${PN}
177 + doexe contrib/update-anchor.sh
178 +
179 + # create space for auto-trust-anchor-file...
180 + keepdir /etc/unbound/var
181 + # ... and point example config to it
182 + sed -i \
183 + -e '/# auto-trust-anchor-file:/s,/etc/dnssec/root-anchors.txt,/etc/unbound/var/root-anchors.txt,' \
184 + "${ED%/}/etc/unbound/unbound.conf" || \
185 + die
186 +
187 + # Used to store cache data
188 + keepdir /var/lib/${PN}
189 + fowners root:unbound /var/lib/${PN}
190 + fperms 0750 /var/lib/${PN}
191 +
192 + find "${ED}" -name '*.la' -delete || die
193 + if ! use static-libs ; then
194 + find "${ED}" -name "*.a" -delete || die
195 + fi
196 +}
197 +
198 +pkg_postinst() {
199 + # make var/ writable by unbound
200 + if [[ -d "${EROOT%/}/etc/unbound/var" ]]; then
201 + chown --no-dereference --from=root unbound: "${EROOT%/}/etc/unbound/var"
202 + fi
203 +
204 + einfo ""
205 + einfo "If you want unbound to automatically update the root-anchor file for DNSSEC validation"
206 + einfo "set 'auto-trust-anchor-file: ${EROOT%/}/etc/unbound/var/root-anchors.txt' in ${EROOT%/}/etc/unbound/unbound.conf"
207 + einfo "and run"
208 + einfo ""
209 + einfo " su -s /bin/sh -c '${EROOT%/}/usr/sbin/unbound-anchor -a ${EROOT%/}/etc/unbound/var/root-anchors.txt' unbound"
210 + einfo ""
211 + einfo "as root to create it initially before starting unbound for the first time after enabling this."
212 + einfo ""
213 +}