1 |
commit: cc9d625b6931b268fb3d5cbaa259856fceecb582 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 21 23:08:50 2020 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 21 23:08:50 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc9d625b |
7 |
|
8 |
net-dns/unbound: security cleanup |
9 |
|
10 |
Bug: https://bugs.gentoo.org/723984 |
11 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
12 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
13 |
|
14 |
net-dns/unbound/Manifest | 1 - |
15 |
net-dns/unbound/unbound-1.10.0.ebuild | 183 ---------------------------------- |
16 |
2 files changed, 184 deletions(-) |
17 |
|
18 |
diff --git a/net-dns/unbound/Manifest b/net-dns/unbound/Manifest |
19 |
index df666b422a7..bdc8e09b1b1 100644 |
20 |
--- a/net-dns/unbound/Manifest |
21 |
+++ b/net-dns/unbound/Manifest |
22 |
@@ -1,2 +1 @@ |
23 |
-DIST unbound-1.10.0.tar.gz 5727902 BLAKE2B 64285aa60a11afa84f7fd30c2727de2831a0e418186f7665a3529a2fa2150f8d616838bcdad23aa69e4e761ad0764ead47aee1cddbcf82101a64cf5974c29700 SHA512 a64514990f5d614d749045a11f5ce9bb33cf856cc31895b4db3503f2b05a98f1ca57945b17dd7ec5befbd0c356fc42a717d3e2bae3d3510a0507d0445b1f6d59 |
24 |
DIST unbound-1.10.1.tar.gz 5729334 BLAKE2B 7ca4f23c12a551bc6e5d6ec32f19ca0f54526b9a4c868ced8f31cfd31dec23f8240b78f0c00d2cc6f9aa21f6c1b98697c85ef3ebd804a838a5a082893fe98094 SHA512 d07f3ac0e751c17a3ff7d99518c22529cf6856861218564a2ca073422905525cb9ddaf76c9600187946fadb7324343bcd85c34ff06bd322e0ea621a2d258bb85 |
25 |
|
26 |
diff --git a/net-dns/unbound/unbound-1.10.0.ebuild b/net-dns/unbound/unbound-1.10.0.ebuild |
27 |
deleted file mode 100644 |
28 |
index 704a3c26245..00000000000 |
29 |
--- a/net-dns/unbound/unbound-1.10.0.ebuild |
30 |
+++ /dev/null |
31 |
@@ -1,183 +0,0 @@ |
32 |
-# Copyright 1999-2020 Gentoo Authors |
33 |
-# Distributed under the terms of the GNU General Public License v2 |
34 |
- |
35 |
-EAPI="7" |
36 |
-PYTHON_COMPAT=( python3_{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 ~arm64 ~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 |
-RESTRICT="!test? ( test )" |
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-event-api \ |
141 |
- --enable-ipsecmod \ |
142 |
- --enable-tfo-client \ |
143 |
- --enable-tfo-server \ |
144 |
- --with-libevent="${EPREFIX}"/usr \ |
145 |
- $(multilib_native_usex redis --with-libhiredis="${EPREFIX}/usr" --without-libhiredis) \ |
146 |
- --with-pidfile="${EPREFIX}"/run/unbound.pid \ |
147 |
- --with-rootkey-file="${EPREFIX}"/etc/dnssec/root-anchors.txt \ |
148 |
- --with-ssl="${EPREFIX}"/usr \ |
149 |
- --with-libexpat="${EPREFIX}"/usr |
150 |
- |
151 |
- # http://unbound.nlnetlabs.nl/pipermail/unbound-users/2011-April/001801.html |
152 |
- # $(use_enable debug lock-checks) \ |
153 |
- # $(use_enable debug alloc-checks) \ |
154 |
- # $(use_enable debug alloc-lite) \ |
155 |
- # $(use_enable debug alloc-nonregional) \ |
156 |
-} |
157 |
- |
158 |
-multilib_src_install_all() { |
159 |
- use python && python_optimize |
160 |
- |
161 |
- newinitd "${FILESDIR}"/unbound-r1.initd unbound |
162 |
- newconfd "${FILESDIR}"/unbound-r1.confd unbound |
163 |
- |
164 |
- systemd_dounit "${FILESDIR}"/unbound.service |
165 |
- systemd_dounit "${FILESDIR}"/unbound.socket |
166 |
- systemd_newunit "${FILESDIR}"/unbound_at.service "unbound@.service" |
167 |
- systemd_dounit "${FILESDIR}"/unbound-anchor.service |
168 |
- |
169 |
- dodoc doc/{README,CREDITS,TODO,Changelog,FEATURES} |
170 |
- |
171 |
- # bug #315519 |
172 |
- dodoc contrib/unbound_munin_ |
173 |
- |
174 |
- docinto selinux |
175 |
- dodoc contrib/selinux/* |
176 |
- |
177 |
- exeinto /usr/share/${PN} |
178 |
- doexe contrib/update-anchor.sh |
179 |
- |
180 |
- # create space for auto-trust-anchor-file... |
181 |
- keepdir /etc/unbound/var |
182 |
- # ... and point example config to it |
183 |
- sed -i \ |
184 |
- -e '/# auto-trust-anchor-file:/s,/etc/dnssec/root-anchors.txt,/etc/unbound/var/root-anchors.txt,' \ |
185 |
- "${ED}/etc/unbound/unbound.conf" || \ |
186 |
- die |
187 |
- |
188 |
- # Used to store cache data |
189 |
- keepdir /var/lib/${PN} |
190 |
- fowners root:unbound /var/lib/${PN} |
191 |
- fperms 0750 /var/lib/${PN} |
192 |
- |
193 |
- find "${ED}" -name '*.la' -delete || die |
194 |
- if ! use static-libs ; then |
195 |
- find "${ED}" -name "*.a" -delete || die |
196 |
- fi |
197 |
-} |
198 |
- |
199 |
-pkg_postinst() { |
200 |
- # make var/ writable by unbound |
201 |
- if [[ -d "${EROOT}/etc/unbound/var" ]]; then |
202 |
- chown --no-dereference --from=root unbound: "${EROOT}/etc/unbound/var" |
203 |
- fi |
204 |
- |
205 |
- einfo "" |
206 |
- einfo "If you want unbound to automatically update the root-anchor file for DNSSEC validation" |
207 |
- einfo "set 'auto-trust-anchor-file: ${EROOT}/etc/unbound/var/root-anchors.txt' in ${EROOT}/etc/unbound/unbound.conf" |
208 |
- einfo "and run" |
209 |
- einfo "" |
210 |
- einfo " su -s /bin/sh -c '${EROOT}/usr/sbin/unbound-anchor -a ${EROOT}/etc/unbound/var/root-anchors.txt' unbound" |
211 |
- einfo "" |
212 |
- einfo "as root to create it initially before starting unbound for the first time after enabling this." |
213 |
- einfo "" |
214 |
-} |