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