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