1 |
commit: 00af9fcef41cf49803b03d88204893a26acaa978 |
2 |
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 14 20:34:46 2018 +0000 |
4 |
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 14 20:48:41 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00af9fce |
7 |
|
8 |
net-dns/unbound: added version 1.8.1 |
9 |
|
10 |
Package-Manager: Portage-2.3.49, Repoman-2.3.10 |
11 |
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org> |
12 |
|
13 |
net-dns/unbound/Manifest | 1 + |
14 |
net-dns/unbound/unbound-1.8.1.ebuild | 181 +++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 182 insertions(+) |
16 |
|
17 |
diff --git a/net-dns/unbound/Manifest b/net-dns/unbound/Manifest |
18 |
index b614941c742..08a17417686 100644 |
19 |
--- a/net-dns/unbound/Manifest |
20 |
+++ b/net-dns/unbound/Manifest |
21 |
@@ -9,3 +9,4 @@ DIST unbound-1.7.0.tar.gz 5538228 BLAKE2B a825e2cbef74b3a78f9802056d6f0992f77e0d |
22 |
DIST unbound-1.7.1.tar.gz 5565938 BLAKE2B 423dde8a13ea3539d86eade96507e6cdb4ac816393e99f58b4e0dc74a79c31bae57c87924ef737a567cc338d02d672f6c059c86d2f28a634f06e5f9a339f4260 SHA512 99a68abf1f60f6ea80cf2973906df44da9c577d8cac969824af1ce9ca385a2e84dd684937480da87cb73c7dc41ad5c00b0013ec74103eadb8fd7dc6f98a89255 |
23 |
DIST unbound-1.7.3.tar.gz 5570604 BLAKE2B 93a4e7cc0e13b3da1057ce4e4518ab2363f03bff7c820095ed30b5fccd2f4245cfade6bf68a424a090967053c7fd727f33352c9e8004bb05d907a878d69c2517 SHA512 34b2e93660e519b2eccefef26a6c7ac09fa3312384cc3bc449ff2b10743bd86bfeb36ec19d35eb913f8d0a3d91ad7923260a66fc799f28b0a2cc06741d80f27a |
24 |
DIST unbound-1.8.0.tar.gz 5609213 BLAKE2B 41e464df60e03d502f13758e75f9143658b2a496c4fad69804d9d404e23a8d4b5480cc09048197f8593e37feffdffaea33b18a06d864d0d35e986169b49f42e4 SHA512 6c46f5b86b5bd98a7b549b660173d487e59e65385cebd7bc29429b4fee69f2b490651a409c57b072b9b604fa98e289fa82eeecfea8779900038c25b28a6bd064 |
25 |
+DIST unbound-1.8.1.tar.gz 5610191 BLAKE2B 15118f5940b4362dd515f8b335c8a39fc5ef1d3fbf0c20efbf0097342fabb4890eae0527f8b00ace181a425b413882db962b63d329f664cf12649d4d6ec8e5ea SHA512 1872a980e06258d28d2bc7f69a4c56fc07e03e4c9856161e89abc28527fff5812a47ea9927fd362bca690e3a87b95046ac96c8beeccaeb8596458f140c33b217 |
26 |
|
27 |
diff --git a/net-dns/unbound/unbound-1.8.1.ebuild b/net-dns/unbound/unbound-1.8.1.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..2073aa739be |
30 |
--- /dev/null |
31 |
+++ b/net-dns/unbound/unbound-1.8.1.ebuild |
32 |
@@ -0,0 +1,181 @@ |
33 |
+# Copyright 1999-2018 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI="7" |
37 |
+PYTHON_COMPAT=( python2_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 |
+} |