1 |
commit: 8b9c888890857e04acd24efb8339c634dfd99b92 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 10 16:04:16 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 10 16:05:28 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b9c8888 |
7 |
|
8 |
app-arch/libarchive: Remove vulnerable version |
9 |
|
10 |
Bug: https://bugs.gentoo.org/710358 |
11 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
12 |
|
13 |
app-arch/libarchive/Manifest | 1 - |
14 |
.../libarchive-3.4.0-without_zlib_build_fix.patch | 160 --------------------- |
15 |
app-arch/libarchive/libarchive-3.4.0.ebuild | 135 ----------------- |
16 |
3 files changed, 296 deletions(-) |
17 |
|
18 |
diff --git a/app-arch/libarchive/Manifest b/app-arch/libarchive/Manifest |
19 |
index b9aec85d512..dc4b48a9a98 100644 |
20 |
--- a/app-arch/libarchive/Manifest |
21 |
+++ b/app-arch/libarchive/Manifest |
22 |
@@ -1,2 +1 @@ |
23 |
-DIST libarchive-3.4.0.tar.gz 6908093 BLAKE2B 6da5798ceabb542d8b877b3d672f6e6431ed7340ec0160a5d8cef28591b516b55d426002379eddc632a478bfd2f034a358f8552f55c9f066fd7f5c31c218b462 SHA512 2f9e2a551a6bcab56fb1a030b5d656df7299a3d151465aa02f0420d344d2fada49dee4755b3abff9095f62519e14dc9af8afa1695ecc6d5fdb4f0b28e6ede852 |
24 |
DIST libarchive-3.4.2.tar.gz 6979481 BLAKE2B eea90e4751ae487cd1a9b0eecd16598d1b81ffff665ae97a160e3858c8ffe60b82003f081af644f3f32260d0e1d3f3077240125e8279bf8111a79d93c68ac25d SHA512 a8922e54f2e985889d205ee8a0594c1d30dad950438b602a5be6bb1b274a735ad20a48ed484efd458013a0810d26ee4ae76e3a6c820823243d24ea0593ed7021 |
25 |
|
26 |
diff --git a/app-arch/libarchive/files/libarchive-3.4.0-without_zlib_build_fix.patch b/app-arch/libarchive/files/libarchive-3.4.0-without_zlib_build_fix.patch |
27 |
deleted file mode 100644 |
28 |
index e0a3167390f..00000000000 |
29 |
--- a/app-arch/libarchive/files/libarchive-3.4.0-without_zlib_build_fix.patch |
30 |
+++ /dev/null |
31 |
@@ -1,160 +0,0 @@ |
32 |
-From 64333cef68d7bcc67bef6ecf177fbeaa549b9139 Mon Sep 17 00:00:00 2001 |
33 |
-From: Martin Matuska <martin@×××××××.org> |
34 |
-Date: Sat, 29 Jun 2019 00:20:58 +0200 |
35 |
-Subject: [PATCH] Unbreak compilation without zlib |
36 |
- |
37 |
-Fixes #1214 |
38 |
---- |
39 |
- libarchive/archive_read_support_filter_gzip.c | 54 ++++++++++++------- |
40 |
- libarchive/test/test_read_format_raw.c | 4 ++ |
41 |
- 2 files changed, 39 insertions(+), 19 deletions(-) |
42 |
- |
43 |
-diff --git a/libarchive/archive_read_support_filter_gzip.c b/libarchive/archive_read_support_filter_gzip.c |
44 |
-index 458b6f729..9fa9e2b0d 100644 |
45 |
---- a/libarchive/archive_read_support_filter_gzip.c |
46 |
-+++ b/libarchive/archive_read_support_filter_gzip.c |
47 |
-@@ -131,12 +131,20 @@ archive_read_support_filter_gzip(struct archive *_a) |
48 |
- */ |
49 |
- static ssize_t |
50 |
- peek_at_header(struct archive_read_filter *filter, int *pbits, |
51 |
-- struct private_data *state) |
52 |
-+#ifdef HAVE_ZLIB_H |
53 |
-+ struct private_data *state |
54 |
-+#else |
55 |
-+ void *state |
56 |
-+#endif |
57 |
-+ ) |
58 |
- { |
59 |
- const unsigned char *p; |
60 |
- ssize_t avail, len; |
61 |
- int bits = 0; |
62 |
- int header_flags; |
63 |
-+#ifndef HAVE_ZLIB_H |
64 |
-+ (void)state; /* UNUSED */ |
65 |
-+#endif |
66 |
- |
67 |
- /* Start by looking at the first ten bytes of the header, which |
68 |
- * is all fixed layout. */ |
69 |
-@@ -153,8 +161,10 @@ peek_at_header(struct archive_read_filter *filter, int *pbits, |
70 |
- bits += 3; |
71 |
- header_flags = p[3]; |
72 |
- /* Bytes 4-7 are mod time in little endian. */ |
73 |
-+#ifdef HAVE_ZLIB_H |
74 |
- if (state) |
75 |
- state->mtime = archive_le32dec(p + 4); |
76 |
-+#endif |
77 |
- /* Byte 8 is deflate flags. */ |
78 |
- /* XXXX TODO: return deflate flags back to consume_header for use |
79 |
- in initializing the decompressor. */ |
80 |
-@@ -171,7 +181,9 @@ peek_at_header(struct archive_read_filter *filter, int *pbits, |
81 |
- |
82 |
- /* Null-terminated optional filename. */ |
83 |
- if (header_flags & 8) { |
84 |
-+#ifdef HAVE_ZLIB_H |
85 |
- ssize_t file_start = len; |
86 |
-+#endif |
87 |
- do { |
88 |
- ++len; |
89 |
- if (avail < len) |
90 |
-@@ -181,11 +193,13 @@ peek_at_header(struct archive_read_filter *filter, int *pbits, |
91 |
- return (0); |
92 |
- } while (p[len - 1] != 0); |
93 |
- |
94 |
-+#ifdef HAVE_ZLIB_H |
95 |
- if (state) { |
96 |
- /* Reset the name in case of repeat header reads. */ |
97 |
- free(state->name); |
98 |
- state->name = strdup((const char *)&p[file_start]); |
99 |
- } |
100 |
-+#endif |
101 |
- } |
102 |
- |
103 |
- /* Null-terminated optional comment. */ |
104 |
-@@ -236,24 +250,6 @@ gzip_bidder_bid(struct archive_read_filter_bidder *self, |
105 |
- return (0); |
106 |
- } |
107 |
- |
108 |
--static int |
109 |
--gzip_read_header(struct archive_read_filter *self, struct archive_entry *entry) |
110 |
--{ |
111 |
-- struct private_data *state; |
112 |
-- |
113 |
-- state = (struct private_data *)self->data; |
114 |
-- |
115 |
-- /* A mtime of 0 is considered invalid/missing. */ |
116 |
-- if (state->mtime != 0) |
117 |
-- archive_entry_set_mtime(entry, state->mtime, 0); |
118 |
-- |
119 |
-- /* If the name is available, extract it. */ |
120 |
-- if (state->name) |
121 |
-- archive_entry_set_pathname(entry, state->name); |
122 |
-- |
123 |
-- return (ARCHIVE_OK); |
124 |
--} |
125 |
-- |
126 |
- #ifndef HAVE_ZLIB_H |
127 |
- |
128 |
- /* |
129 |
-@@ -277,6 +273,24 @@ gzip_bidder_init(struct archive_read_filter *self) |
130 |
- |
131 |
- #else |
132 |
- |
133 |
-+static int |
134 |
-+gzip_read_header(struct archive_read_filter *self, struct archive_entry *entry) |
135 |
-+{ |
136 |
-+ struct private_data *state; |
137 |
-+ |
138 |
-+ state = (struct private_data *)self->data; |
139 |
-+ |
140 |
-+ /* A mtime of 0 is considered invalid/missing. */ |
141 |
-+ if (state->mtime != 0) |
142 |
-+ archive_entry_set_mtime(entry, state->mtime, 0); |
143 |
-+ |
144 |
-+ /* If the name is available, extract it. */ |
145 |
-+ if (state->name) |
146 |
-+ archive_entry_set_pathname(entry, state->name); |
147 |
-+ |
148 |
-+ return (ARCHIVE_OK); |
149 |
-+} |
150 |
-+ |
151 |
- /* |
152 |
- * Initialize the filter object. |
153 |
- */ |
154 |
-@@ -306,7 +320,9 @@ gzip_bidder_init(struct archive_read_filter *self) |
155 |
- self->read = gzip_filter_read; |
156 |
- self->skip = NULL; /* not supported */ |
157 |
- self->close = gzip_filter_close; |
158 |
-+#ifdef HAVE_ZLIB_H |
159 |
- self->read_header = gzip_read_header; |
160 |
-+#endif |
161 |
- |
162 |
- state->in_stream = 0; /* We're not actually within a stream yet. */ |
163 |
- |
164 |
-diff --git a/libarchive/test/test_read_format_raw.c b/libarchive/test/test_read_format_raw.c |
165 |
-index 0dac8bfba..3961723b4 100644 |
166 |
---- a/libarchive/test/test_read_format_raw.c |
167 |
-+++ b/libarchive/test/test_read_format_raw.c |
168 |
-@@ -36,7 +36,9 @@ DEFINE_TEST(test_read_format_raw) |
169 |
- const char *reffile1 = "test_read_format_raw.data"; |
170 |
- const char *reffile2 = "test_read_format_raw.data.Z"; |
171 |
- const char *reffile3 = "test_read_format_raw.bufr"; |
172 |
-+#ifdef HAVE_ZLIB_H |
173 |
- const char *reffile4 = "test_read_format_raw.data.gz"; |
174 |
-+#endif |
175 |
- |
176 |
- /* First, try pulling data out of an uninterpretable file. */ |
177 |
- extract_reference_file(reffile1); |
178 |
-@@ -119,6 +121,7 @@ DEFINE_TEST(test_read_format_raw) |
179 |
- assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); |
180 |
- assertEqualInt(ARCHIVE_OK, archive_read_free(a)); |
181 |
- |
182 |
-+#ifdef HAVE_ZLIB_H |
183 |
- /* Fourth, try with gzip which has metadata. */ |
184 |
- extract_reference_file(reffile4); |
185 |
- assert((a = archive_read_new()) != NULL); |
186 |
-@@ -144,4 +147,5 @@ DEFINE_TEST(test_read_format_raw) |
187 |
- assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); |
188 |
- assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); |
189 |
- assertEqualInt(ARCHIVE_OK, archive_read_free(a)); |
190 |
-+#endif |
191 |
- } |
192 |
|
193 |
diff --git a/app-arch/libarchive/libarchive-3.4.0.ebuild b/app-arch/libarchive/libarchive-3.4.0.ebuild |
194 |
deleted file mode 100644 |
195 |
index 1c960f7b332..00000000000 |
196 |
--- a/app-arch/libarchive/libarchive-3.4.0.ebuild |
197 |
+++ /dev/null |
198 |
@@ -1,135 +0,0 @@ |
199 |
-# Copyright 1999-2019 Gentoo Authors |
200 |
-# Distributed under the terms of the GNU General Public License v2 |
201 |
- |
202 |
-EAPI=7 |
203 |
-inherit libtool multilib-minimal toolchain-funcs |
204 |
- |
205 |
-DESCRIPTION="Multi-format archive and compression library" |
206 |
-HOMEPAGE="https://www.libarchive.org/" |
207 |
-SRC_URI="https://www.libarchive.org/downloads/${P}.tar.gz" |
208 |
- |
209 |
-LICENSE="BSD BSD-2 BSD-4 public-domain" |
210 |
-SLOT="0/13" |
211 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
212 |
-IUSE="acl blake2 +bzip2 +e2fsprogs expat +iconv kernel_linux libressl lz4 +lzma lzo nettle static-libs +threads xattr +zlib zstd" |
213 |
- |
214 |
-RDEPEND=" |
215 |
- acl? ( virtual/acl[${MULTILIB_USEDEP}] ) |
216 |
- blake2? ( app-crypt/libb2[${MULTILIB_USEDEP}] ) |
217 |
- bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] ) |
218 |
- expat? ( dev-libs/expat[${MULTILIB_USEDEP}] ) |
219 |
- !expat? ( dev-libs/libxml2[${MULTILIB_USEDEP}] ) |
220 |
- iconv? ( virtual/libiconv[${MULTILIB_USEDEP}] ) |
221 |
- kernel_linux? ( |
222 |
- xattr? ( sys-apps/attr[${MULTILIB_USEDEP}] ) |
223 |
- ) |
224 |
- !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] ) |
225 |
- libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] ) |
226 |
- lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] ) |
227 |
- lzma? ( app-arch/xz-utils[threads=,${MULTILIB_USEDEP}] ) |
228 |
- lzo? ( >=dev-libs/lzo-2[${MULTILIB_USEDEP}] ) |
229 |
- nettle? ( dev-libs/nettle:0=[${MULTILIB_USEDEP}] ) |
230 |
- zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) |
231 |
- zstd? ( app-arch/zstd[${MULTILIB_USEDEP}] )" |
232 |
-DEPEND="${RDEPEND} |
233 |
- kernel_linux? ( |
234 |
- virtual/os-headers |
235 |
- e2fsprogs? ( sys-fs/e2fsprogs ) |
236 |
- )" |
237 |
- |
238 |
-PATCHES=( |
239 |
- "${FILESDIR}"/${PN}-3.3.3-libressl.patch |
240 |
- "${FILESDIR}"/${P}-without_zlib_build_fix.patch #693202 |
241 |
-) |
242 |
- |
243 |
-# Various test problems, starting with the fact that sandbox |
244 |
-# explodes on long paths. https://bugs.gentoo.org/598806 |
245 |
-RESTRICT="test" |
246 |
- |
247 |
-src_prepare() { |
248 |
- default |
249 |
- elibtoolize # is required for Solaris sol2_ld linker fix |
250 |
-} |
251 |
- |
252 |
-multilib_src_configure() { |
253 |
- export ac_cv_header_ext2fs_ext2_fs_h=$(usex e2fsprogs) #354923 |
254 |
- |
255 |
- local myconf=( |
256 |
- $(use_enable acl) |
257 |
- $(use_enable static-libs static) |
258 |
- $(use_enable xattr) |
259 |
- $(use_with blake2 libb2) |
260 |
- $(use_with bzip2 bz2lib) |
261 |
- $(use_with expat) |
262 |
- $(use_with !expat xml2) |
263 |
- $(use_with iconv) |
264 |
- $(use_with lz4) |
265 |
- $(use_with lzma) |
266 |
- $(use_with lzo lzo2) |
267 |
- $(use_with nettle) |
268 |
- $(use_with zlib) |
269 |
- $(use_with zstd) |
270 |
- |
271 |
- # Windows-specific |
272 |
- --without-cng |
273 |
- ) |
274 |
- if multilib_is_native_abi ; then |
275 |
- myconf+=( |
276 |
- --enable-bsdcat=$(tc-is-static-only && echo static || echo shared) |
277 |
- --enable-bsdcpio=$(tc-is-static-only && echo static || echo shared) |
278 |
- --enable-bsdtar=$(tc-is-static-only && echo static || echo shared) |
279 |
- ) |
280 |
- else |
281 |
- myconf+=( |
282 |
- --disable-bsdcat |
283 |
- --disable-bsdcpio |
284 |
- --disable-bsdtar |
285 |
- ) |
286 |
- fi |
287 |
- |
288 |
- ECONF_SOURCE="${S}" econf "${myconf[@]}" |
289 |
-} |
290 |
- |
291 |
-multilib_src_compile() { |
292 |
- if multilib_is_native_abi ; then |
293 |
- emake |
294 |
- else |
295 |
- emake libarchive.la |
296 |
- fi |
297 |
-} |
298 |
- |
299 |
-multilib_src_test() { |
300 |
- # Replace the default src_test so that it builds tests in parallel |
301 |
- multilib_is_native_abi && emake check |
302 |
-} |
303 |
- |
304 |
-multilib_src_install() { |
305 |
- if multilib_is_native_abi ; then |
306 |
- emake DESTDIR="${D}" install |
307 |
- |
308 |
- # Create symlinks for FreeBSD |
309 |
- if ! use prefix && [[ ${CHOST} == *-freebsd* ]]; then |
310 |
- # Exclude cat for the time being #589876 |
311 |
- for bin in cpio tar; do |
312 |
- dosym bsd${bin} /usr/bin/${bin} |
313 |
- echo '.so bsd${bin}.1' > "${T}"/${bin}.1 |
314 |
- doman "${T}"/${bin}.1 |
315 |
- done |
316 |
- fi |
317 |
- else |
318 |
- local install_targets=( |
319 |
- install-includeHEADERS |
320 |
- install-libLTLIBRARIES |
321 |
- install-pkgconfigDATA |
322 |
- ) |
323 |
- emake DESTDIR="${D}" "${install_targets[@]}" |
324 |
- fi |
325 |
- |
326 |
- # Libs.private: should be used from libarchive.pc instead |
327 |
- find "${ED}" -type f -name "*.la" -delete || die |
328 |
-} |
329 |
- |
330 |
-multilib_src_install_all() { |
331 |
- cd "${S}" || die |
332 |
- einstalldocs |
333 |
-} |