public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-arch/libarchive/, app-arch/libarchive/files/
@ 2017-06-29 23:39 Patrick McLean
  0 siblings, 0 replies; 13+ messages in thread
From: Patrick McLean @ 2017-06-29 23:39 UTC (permalink / raw
  To: gentoo-commits

commit:     e2cfff62965a2d82ceb0e34eaf1d5cb65548af3c
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 29 23:39:01 2017 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Thu Jun 29 23:39:01 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2cfff62

app-arch/libarchive: Add patch to build with libressl

Gentoo-Bug: 614460
Package-Manager: Portage-2.3.6, Repoman-2.3.2

 .../files/libarchive-3.3.1-libressl.patch          | 22 ++++++++++++++++++++++
 app-arch/libarchive/libarchive-3.3.1.ebuild        |  4 ++++
 2 files changed, 26 insertions(+)

diff --git a/app-arch/libarchive/files/libarchive-3.3.1-libressl.patch b/app-arch/libarchive/files/libarchive-3.3.1-libressl.patch
new file mode 100644
index 00000000000..8078bc09210
--- /dev/null
+++ b/app-arch/libarchive/files/libarchive-3.3.1-libressl.patch
@@ -0,0 +1,22 @@
+--- a/libarchive/archive_openssl_evp_private.h
++++ b/libarchive/archive_openssl_evp_private.h
+@@ -28,7 +28,7 @@
+ #include <openssl/evp.h>
+ #include <openssl/opensslv.h>
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ #include <stdlib.h> /* malloc, free */
+ #include <string.h> /* memset */
+ static inline EVP_MD_CTX *EVP_MD_CTX_new(void)
+--- a/libarchive/archive_openssl_hmac_private.h
++++ b/libarchive/archive_openssl_hmac_private.h
+@@ -28,7 +28,7 @@
+ #include <openssl/hmac.h>
+ #include <openssl/opensslv.h>
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ #include <stdlib.h> /* malloc, free */
+ #include <string.h> /* memset */
+ static inline HMAC_CTX *HMAC_CTX_new(void)

diff --git a/app-arch/libarchive/libarchive-3.3.1.ebuild b/app-arch/libarchive/libarchive-3.3.1.ebuild
index 48ed2be6dd9..a7a6d960e76 100644
--- a/app-arch/libarchive/libarchive-3.3.1.ebuild
+++ b/app-arch/libarchive/libarchive-3.3.1.ebuild
@@ -35,6 +35,10 @@ DEPEND="${RDEPEND}
 		e2fsprogs? ( sys-fs/e2fsprogs )
 	)"
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.3.1-libressl.patch
+)
+
 src_prepare() {
 	default
 	elibtoolize  # is required for Solaris sol2_ld linker fix


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-arch/libarchive/, app-arch/libarchive/files/
@ 2024-07-29 20:00 Fabian Groffen
  0 siblings, 0 replies; 13+ messages in thread
From: Fabian Groffen @ 2024-07-29 20:00 UTC (permalink / raw
  To: gentoo-commits

commit:     7a5e420e408012a569f8170b8138c318abcebda7
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 29 19:59:39 2024 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Jul 29 19:59:39 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a5e420e

app-arch/libarchive-3.7.4: add patch from upstream for INT_MAX usage

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 .../files/libarchive-3.7.4-INT_MAX.patch           | 26 ++++++++++++++++++++++
 app-arch/libarchive/libarchive-3.7.4.ebuild        |  2 ++
 2 files changed, 28 insertions(+)

diff --git a/app-arch/libarchive/files/libarchive-3.7.4-INT_MAX.patch b/app-arch/libarchive/files/libarchive-3.7.4-INT_MAX.patch
new file mode 100644
index 000000000000..150216b3344d
--- /dev/null
+++ b/app-arch/libarchive/files/libarchive-3.7.4-INT_MAX.patch
@@ -0,0 +1,26 @@
+From 6ff1cd1e487ddf545337b88da3f1f5ca69a2f958 Mon Sep 17 00:00:00 2001
+From: Tim Kientzle <kientzle@acm.org>
+Date: Mon, 6 May 2024 20:46:26 -0700
+Subject: [PATCH] Define INT_MAX via `#include <limits.h>` (#2170)
+
+#2110 added usages of INT_MAX here without adding the necessary header.
+
+Resolves #2162
+---
+ tar/bsdtar.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/tar/bsdtar.c b/tar/bsdtar.c
+index 42baab286..f0e71afd1 100644
+--- a/tar/bsdtar.c
++++ b/tar/bsdtar.c
+@@ -43,6 +43,9 @@
+ #ifdef HAVE_LANGINFO_H
+ #include <langinfo.h>
+ #endif
++#ifdef HAVE_LIMITS_H
++#include <limits.h>
++#endif
+ #ifdef HAVE_LOCALE_H
+ #include <locale.h>
+ #endif

diff --git a/app-arch/libarchive/libarchive-3.7.4.ebuild b/app-arch/libarchive/libarchive-3.7.4.ebuild
index 7c609d3a3f58..695219f457cd 100644
--- a/app-arch/libarchive/libarchive-3.7.4.ebuild
+++ b/app-arch/libarchive/libarchive-3.7.4.ebuild
@@ -74,6 +74,8 @@ PATCHES=(
 	# https://github.com/libarchive/libarchive/issues/2069
 	# (we can simply update the command since we don't support old lrzip)
 	"${FILESDIR}/${PN}-3.7.2-lrzip.patch"
+	# https://github.com/libarchive/libarchive/commit/6ff1cd1e487ddf545337b88da3f1f5ca69a2f958
+	"${FILESDIR}/${PN}-3.7.4-INT_MAX.patch"
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-arch/libarchive/, app-arch/libarchive/files/
@ 2024-03-31 15:36 Michał Górny
  0 siblings, 0 replies; 13+ messages in thread
From: Michał Górny @ 2024-03-31 15:36 UTC (permalink / raw
  To: gentoo-commits

commit:     43c399629fb022b7519d70194cb6c0364809764d
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 31 15:20:09 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Mar 31 15:20:09 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43c39962

app-arch/libarchive: Backport tar error handling fix

Closes: https://bugs.gentoo.org/928146
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../files/libarchive-3.7.2-safe-fprintf.patch      | 27 ++++++++++++++++++++++
 ...-3.7.2-r2.ebuild => libarchive-3.7.2-r3.ebuild} |  2 ++
 2 files changed, 29 insertions(+)

diff --git a/app-arch/libarchive/files/libarchive-3.7.2-safe-fprintf.patch b/app-arch/libarchive/files/libarchive-3.7.2-safe-fprintf.patch
new file mode 100644
index 000000000000..6a351ba37fea
--- /dev/null
+++ b/app-arch/libarchive/files/libarchive-3.7.2-safe-fprintf.patch
@@ -0,0 +1,27 @@
+From 6110e9c82d8ba830c3440f36b990483ceaaea52c Mon Sep 17 00:00:00 2001
+From: Ed Maste <emaste@freebsd.org>
+Date: Fri, 29 Mar 2024 18:02:06 -0400
+Subject: [PATCH] tar: make error reporting more robust and use correct errno
+ (#2101)
+
+As discussed in #1609.
+---
+ tar/read.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/tar/read.c b/tar/read.c
+index af3d3f423..a7f14a07b 100644
+--- a/tar/read.c
++++ b/tar/read.c
+@@ -371,8 +371,9 @@ read_archive(struct bsdtar *bsdtar, char mode, struct archive *writer)
+ 			if (r != ARCHIVE_OK) {
+ 				if (!bsdtar->verbose)
+ 					safe_fprintf(stderr, "%s", archive_entry_pathname(entry));
+-				fprintf(stderr, ": %s: ", archive_error_string(a));
+-				fprintf(stderr, "%s", strerror(errno));
++				safe_fprintf(stderr, ": %s: %s",
++				    archive_error_string(a),
++				    strerror(archive_errno(a)));
+ 				if (!bsdtar->verbose)
+ 					fprintf(stderr, "\n");
+ 				bsdtar->return_value = 1;

diff --git a/app-arch/libarchive/libarchive-3.7.2-r2.ebuild b/app-arch/libarchive/libarchive-3.7.2-r3.ebuild
similarity index 98%
rename from app-arch/libarchive/libarchive-3.7.2-r2.ebuild
rename to app-arch/libarchive/libarchive-3.7.2-r3.ebuild
index 0e17daa7457c..5387e642a60c 100644
--- a/app-arch/libarchive/libarchive-3.7.2-r2.ebuild
+++ b/app-arch/libarchive/libarchive-3.7.2-r3.ebuild
@@ -76,6 +76,8 @@ PATCHES=(
 	# https://github.com/libarchive/libarchive/issues/2069
 	# (we can simply update the command since we don't support old lrzip)
 	"${FILESDIR}/${P}-lrzip.patch"
+	# https://github.com/libarchive/libarchive/pull/2101
+	"${FILESDIR}/${P}-safe-fprintf.patch"
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-arch/libarchive/, app-arch/libarchive/files/
@ 2024-02-16 13:53 Michał Górny
  0 siblings, 0 replies; 13+ messages in thread
From: Michał Górny @ 2024-02-16 13:53 UTC (permalink / raw
  To: gentoo-commits

commit:     83dff44ce0428a0a1009300d7c1058d2750188a2
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 16 13:52:07 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Feb 16 13:52:59 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83dff44c

app-arch/libarchive: Fix >=app-arch/lrzip-0.650 support

Closes: https://bugs.gentoo.org/924409
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../libarchive/files/libarchive-3.7.2-lrzip.patch  | 26 ++++++++++++++++++++++
 ...ive-3.7.2.ebuild => libarchive-3.7.2-r1.ebuild} |  3 +++
 2 files changed, 29 insertions(+)

diff --git a/app-arch/libarchive/files/libarchive-3.7.2-lrzip.patch b/app-arch/libarchive/files/libarchive-3.7.2-lrzip.patch
new file mode 100644
index 000000000000..f05b46c1a340
--- /dev/null
+++ b/app-arch/libarchive/files/libarchive-3.7.2-lrzip.patch
@@ -0,0 +1,26 @@
+diff --git a/libarchive/archive_read_support_filter_lrzip.c b/libarchive/archive_read_support_filter_lrzip.c
+index a562d538..f3ec40c4 100644
+--- a/libarchive/archive_read_support_filter_lrzip.c
++++ b/libarchive/archive_read_support_filter_lrzip.c
+@@ -109,7 +109,7 @@ lrzip_bidder_init(struct archive_read_filter *self)
+ {
+ 	int r;
+ 
+-	r = __archive_read_program(self, "lrzip -d -q");
++	r = __archive_read_program(self, "lrzip -d -Q");
+ 	/* Note: We set the format here even if __archive_read_program()
+ 	 * above fails.  We do, after all, know what the format is
+ 	 * even if we weren't able to read it. */
+diff --git a/libarchive/archive_write_add_filter_lrzip.c b/libarchive/archive_write_add_filter_lrzip.c
+index fe974c93..8fe498dd 100644
+--- a/libarchive/archive_write_add_filter_lrzip.c
++++ b/libarchive/archive_write_add_filter_lrzip.c
+@@ -133,7 +133,7 @@ archive_write_lrzip_open(struct archive_write_filter *f)
+ 	int r;
+ 
+ 	archive_string_init(&as);
+-	archive_strcpy(&as, "lrzip -q");
++	archive_strcpy(&as, "lrzip -Q");
+ 
+ 	/* Specify compression type. */
+ 	switch (data->compression) {

diff --git a/app-arch/libarchive/libarchive-3.7.2.ebuild b/app-arch/libarchive/libarchive-3.7.2-r1.ebuild
similarity index 96%
rename from app-arch/libarchive/libarchive-3.7.2.ebuild
rename to app-arch/libarchive/libarchive-3.7.2-r1.ebuild
index 3d5b9c43c1f6..cc98e64978ce 100644
--- a/app-arch/libarchive/libarchive-3.7.2.ebuild
+++ b/app-arch/libarchive/libarchive-3.7.2-r1.ebuild
@@ -67,6 +67,9 @@ QA_CONFIG_IMPL_DECL_SKIP=(
 PATCHES=(
 	# https://github.com/libarchive/libarchive/issues/1968
 	"${FILESDIR}/${P}-32bit-test.patch"
+	# https://github.com/libarchive/libarchive/issues/2069
+	# (we can simply update the command since we don't support old lrzip)
+	"${FILESDIR}/${P}-lrzip.patch"
 )
 
 multilib_src_configure() {


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-arch/libarchive/, app-arch/libarchive/files/
@ 2023-04-08 18:45 Michał Górny
  0 siblings, 0 replies; 13+ messages in thread
From: Michał Górny @ 2023-04-08 18:45 UTC (permalink / raw
  To: gentoo-commits

commit:     627770d73219a3e28d806b1bf9996f65a3c60c87
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  8 18:42:56 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Apr  8 18:45:16 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=627770d7

app-arch/libarchive: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 app-arch/libarchive/Manifest                       |   2 -
 .../files/libarchive-3.6.1-CVE-2022-36227.patch    |  35 ------
 .../files/libarchive-3.6.1-glibc-2.36.patch        |  39 ------
 app-arch/libarchive/libarchive-3.6.1-r1.ebuild     | 140 ---------------------
 4 files changed, 216 deletions(-)

diff --git a/app-arch/libarchive/Manifest b/app-arch/libarchive/Manifest
index 53eb2e77adcc..4b98fc749905 100644
--- a/app-arch/libarchive/Manifest
+++ b/app-arch/libarchive/Manifest
@@ -1,4 +1,2 @@
-DIST libarchive-3.6.1.tar.xz 5241148 BLAKE2B e7b79e97545dabeac164069e87adbd2081d3bd75c22f80b3797c6e487a477b3f6347b6fc14c76668eb69f2f2e5dcdd5a33a694e0a292ce426b8d0d93435218cf SHA512 2e5a72edc468080c0e8f29e07d9c33826ffb246fa040ec42399bedeecf698b7555f69ffd15057ad79c0f50cd4926d43174599d99632b1b99ec6cd159c43a70b8
-DIST libarchive-3.6.1.tar.xz.asc 833 BLAKE2B 8a1ca13491f3b29b322ab281a80eaef9ca2cca680e18a0ed5ff626e8808b6c9a5eb4cdd6eaf00fb771f361d84d7785c103a9a0665d812f1f27ac66f5d1a2e1da SHA512 0411a9bdc9bb058b289b5cc102a220216420bf01ea213e771a16246ed48e670f3426e8555bac27262b686b40b7b2239907c4eef2bf43d812d73a69ccb2a5b00c
 DIST libarchive-3.6.2.tar.xz 5213196 BLAKE2B 355b5d402e352dee802513485ce7e047af58d6de5b9bf6a49f3fd8d7b94117007598820ac979585c0da79747e8b63b70ab151131182368a11f97a047cf9029d4 SHA512 a12bb6839e13a0be1099f42c650fc90fbfe62d32ce38bcbb4794206d29b2c782ae1115124d0e5f6b9716514213af32b05e4a42eb196447674a5f9a2a32bee043
 DIST libarchive-3.6.2.tar.xz.asc 659 BLAKE2B a4b0035ab2bda4129cdf0c99266cd1e5f4772d90de6e348c75958bc803f369d6abea85d9730c6c9a216466b35697faad8d265fb2c285545887eafde27d828887 SHA512 403e5f7dec14d8b1cc01fad5a249e7b7618a7b45bcb3361ea80d67d76b591b12ce97f2c88b23d5486505dd3b34c1f1643e02235a3e5fc5150ee5735946092efe

diff --git a/app-arch/libarchive/files/libarchive-3.6.1-CVE-2022-36227.patch b/app-arch/libarchive/files/libarchive-3.6.1-CVE-2022-36227.patch
deleted file mode 100644
index da71a196b875..000000000000
--- a/app-arch/libarchive/files/libarchive-3.6.1-CVE-2022-36227.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From bff38efe8c110469c5080d387bec62a6ca15b1a5 Mon Sep 17 00:00:00 2001
-From: obiwac <obiwac@gmail.com>
-Date: Fri, 22 Jul 2022 22:41:10 +0200
-Subject: [PATCH] libarchive: Handle a `calloc` returning NULL (fixes #1754)
-
----
- libarchive/archive_write.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/libarchive/archive_write.c b/libarchive/archive_write.c
-index 66592e826..27626b541 100644
---- a/libarchive/archive_write.c
-+++ b/libarchive/archive_write.c
-@@ -201,6 +201,10 @@ __archive_write_allocate_filter(struct archive *_a)
- 	struct archive_write_filter *f;
- 
- 	f = calloc(1, sizeof(*f));
-+
-+	if (f == NULL)
-+		return (NULL);
-+
- 	f->archive = _a;
- 	f->state = ARCHIVE_WRITE_FILTER_STATE_NEW;
- 	if (a->filter_first == NULL)
-@@ -548,6 +552,10 @@ archive_write_open2(struct archive *_a, void *client_data,
- 	a->client_data = client_data;
- 
- 	client_filter = __archive_write_allocate_filter(_a);
-+
-+	if (client_filter == NULL)
-+		return (ARCHIVE_FATAL);
-+
- 	client_filter->open = archive_write_client_open;
- 	client_filter->write = archive_write_client_write;
- 	client_filter->close = archive_write_client_close;

diff --git a/app-arch/libarchive/files/libarchive-3.6.1-glibc-2.36.patch b/app-arch/libarchive/files/libarchive-3.6.1-glibc-2.36.patch
deleted file mode 100644
index e45d891e2a17..000000000000
--- a/app-arch/libarchive/files/libarchive-3.6.1-glibc-2.36.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-https://github.com/libarchive/libarchive/pull/1761
-https://bugs.gentoo.org/863227
-
-From a2f68263a1da5ad227bcb9cd8fa91b93c8b6c99f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 25 Jul 2022 10:56:53 -0700
-Subject: [PATCH] libarchive: Do not include sys/mount.h when linux/fs.h is
- present
-
-These headers are in conflict and only one is needed by
-archive_read_disk_posix.c therefore include linux/fs.h if it exists
-otherwise include sys/mount.h
-
-It also helps compiling with glibc 2.36
-where sys/mount.h conflicts with linux/mount.h see [1]
-
-[1] https://sourceware.org/glibc/wiki/Release/2.36
---- a/libarchive/archive_read_disk_posix.c
-+++ b/libarchive/archive_read_disk_posix.c
-@@ -34,9 +34,6 @@ __FBSDID("$FreeBSD$");
- #ifdef HAVE_SYS_PARAM_H
- #include <sys/param.h>
- #endif
--#ifdef HAVE_SYS_MOUNT_H
--#include <sys/mount.h>
--#endif
- #ifdef HAVE_SYS_STAT_H
- #include <sys/stat.h>
- #endif
-@@ -54,6 +51,8 @@ __FBSDID("$FreeBSD$");
- #endif
- #ifdef HAVE_LINUX_FS_H
- #include <linux/fs.h>
-+#elif HAVE_SYS_MOUNT_H
-+#include <sys/mount.h>
- #endif
- /*
-  * Some Linux distributions have both linux/ext2_fs.h and ext2fs/ext2_fs.h.
-

diff --git a/app-arch/libarchive/libarchive-3.6.1-r1.ebuild b/app-arch/libarchive/libarchive-3.6.1-r1.ebuild
deleted file mode 100644
index 38a8df5f833c..000000000000
--- a/app-arch/libarchive/libarchive-3.6.1-r1.ebuild
+++ /dev/null
@@ -1,140 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools multilib-minimal toolchain-funcs verify-sig
-
-DESCRIPTION="Multi-format archive and compression library"
-HOMEPAGE="https://www.libarchive.org/"
-SRC_URI="
-	https://www.libarchive.de/downloads/${P}.tar.xz
-	verify-sig? ( https://www.libarchive.de/downloads/${P}.tar.xz.asc )
-"
-
-LICENSE="BSD BSD-2 BSD-4 public-domain"
-SLOT="0/13"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="acl blake2 +bzip2 +e2fsprogs expat +iconv lz4 +lzma lzo nettle static-libs xattr zstd"
-VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/libarchive.org.asc
-
-RDEPEND="
-	sys-libs/zlib[${MULTILIB_USEDEP}]
-	acl? ( virtual/acl[${MULTILIB_USEDEP}] )
-	blake2? ( app-crypt/libb2[${MULTILIB_USEDEP}] )
-	bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
-	expat? ( dev-libs/expat[${MULTILIB_USEDEP}] )
-	!expat? ( dev-libs/libxml2[${MULTILIB_USEDEP}] )
-	iconv? ( virtual/libiconv[${MULTILIB_USEDEP}] )
-	kernel_linux? (
-		xattr? ( sys-apps/attr[${MULTILIB_USEDEP}] )
-	)
-	dev-libs/openssl:0=[${MULTILIB_USEDEP}]
-	lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
-	lzma? ( >=app-arch/xz-utils-5.2.5-r1[${MULTILIB_USEDEP}] )
-	lzo? ( >=dev-libs/lzo-2[${MULTILIB_USEDEP}] )
-	nettle? ( dev-libs/nettle:0=[${MULTILIB_USEDEP}] )
-	zstd? ( app-arch/zstd[${MULTILIB_USEDEP}] )
-"
-DEPEND="${RDEPEND}
-	kernel_linux? (
-		virtual/os-headers
-		e2fsprogs? ( sys-fs/e2fsprogs[${MULTILIB_USEDEP}] )
-	)
-"
-BDEPEND="
-	verify-sig? ( <sec-keys/openpgp-keys-libarchive-20221209 )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-glibc-2.36.patch
-	# https://github.com/libarchive/libarchive/pull/1759
-	"${FILESDIR}"/${P}-CVE-2022-36227.patch
-)
-
-src_prepare() {
-	# regenerate configure script to fix implicit includes
-	# https://bugs.gentoo.org/898360
-	eautoconf
-	default
-}
-
-multilib_src_configure() {
-	export ac_cv_header_ext2fs_ext2_fs_h=$(usex e2fsprogs) #354923
-
-	local myconf=(
-		$(use_enable acl)
-		$(use_enable static-libs static)
-		$(use_enable xattr)
-		$(use_with blake2 libb2)
-		$(use_with bzip2 bz2lib)
-		$(use_with expat)
-		$(use_with !expat xml2)
-		$(use_with iconv)
-		$(use_with lz4)
-		$(use_with lzma)
-		$(use_with lzo lzo2)
-		$(use_with nettle)
-		--with-zlib
-		$(use_with zstd)
-
-		# Windows-specific
-		--without-cng
-	)
-	if multilib_is_native_abi ; then
-		myconf+=(
-			--enable-bsdcat="$(tc-is-static-only && echo static || echo shared)"
-			--enable-bsdcpio="$(tc-is-static-only && echo static || echo shared)"
-			--enable-bsdtar="$(tc-is-static-only && echo static || echo shared)"
-		)
-	else
-		myconf+=(
-			--disable-bsdcat
-			--disable-bsdcpio
-			--disable-bsdtar
-		)
-	fi
-
-	ECONF_SOURCE="${S}" econf "${myconf[@]}"
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi ; then
-		emake
-	else
-		emake libarchive.la
-	fi
-}
-
-src_test() {
-	mkdir -p "${T}"/bin || die
-	# tests fail when lbzip2[symlink] is used in place of ref bunzip2
-	ln -s "${BROOT}/bin/bunzip2" "${T}"/bin || die
-	local -x PATH=${T}/bin:${PATH}
-	multilib-minimal_src_test
-}
-
-multilib_src_test() {
-	# sandbox is breaking long symlink behavior
-	local -x SANDBOX_ON=0
-	local -x LD_PRELOAD=
-	# some locales trigger different output that breaks tests
-	local -x LC_ALL=C
-	emake check
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi ; then
-		emake DESTDIR="${D}" install
-	else
-		local install_targets=(
-			install-includeHEADERS
-			install-libLTLIBRARIES
-			install-pkgconfigDATA
-		)
-		emake DESTDIR="${D}" "${install_targets[@]}"
-	fi
-
-	# Libs.private: should be used from libarchive.pc instead
-	find "${ED}" -type f -name "*.la" -delete || die
-}


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-arch/libarchive/, app-arch/libarchive/files/
@ 2022-02-11 13:36 Michał Górny
  0 siblings, 0 replies; 13+ messages in thread
From: Michał Górny @ 2022-02-11 13:36 UTC (permalink / raw
  To: gentoo-commits

commit:     b8ef4a036d2d37878be8184e12b54b2a91ac880c
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 11 13:36:01 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Feb 11 13:36:01 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b8ef4a03

app-arch/libarchive: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 app-arch/libarchive/Manifest                       |   1 -
 .../files/libarchive-3.5.0-darwin-strnlen.patch    |  27 -----
 app-arch/libarchive/libarchive-3.5.2.ebuild        | 126 ---------------------
 3 files changed, 154 deletions(-)

diff --git a/app-arch/libarchive/Manifest b/app-arch/libarchive/Manifest
index 15c829ae4469..e108d5b3b85b 100644
--- a/app-arch/libarchive/Manifest
+++ b/app-arch/libarchive/Manifest
@@ -1,3 +1,2 @@
-DIST libarchive-3.5.2.tar.gz 7054934 BLAKE2B 1fc6ee0166573658dc5e0f170113c07ecdaa76b287cbf68bdee63ccd198dad615b3f2803a3fc1aed303cd1f7f32033e6d8e782ef6a8a991562cdc2a375894c9e SHA512 2003ec9b24086373451bd7317bdab86d81627f087c14a6f7df1a92e131a216749f9aa352504c3d04dc82b62078b59aeea5aad5543b7e6c1c21fcafa2955d3762
 DIST libarchive-3.5.3.tar.gz 7038767 BLAKE2B a9f8b44c42efadb29cba2597c201bf9064d69632db92dad07df3f1bc9667257d8578c2ae7fae65ffc53e075466e3d326e4fe77d18d3f06656a4a255324a81fba SHA512 889879e869f7391e3b85b5e3c2bbad3c1a5e50ec7b62c0be8f2817e2dfa8410e6eb409a3c4dce2675b9e7134bae3f129475e331bc3d15d637b91412c7eb026a2
 DIST libarchive-3.6.0.tar.gz 8570393 BLAKE2B 57a8e1681485a489dc9d3823cc8c9b0d68e7d84510a3eff0b6adc268825bb9aa6179d8a810b249c3f72e3674e1df6e5ba2ed0043196458bedc3c1d880c5d4a0b SHA512 700579c5dd15b61333cc4dbf01ebfbd26d6e8c20d5cbe6525683634418fec5c87a5a1e28a81cc59ad7c94218682e406aa3b55d81036bd9fa31d83d989c6d764c

diff --git a/app-arch/libarchive/files/libarchive-3.5.0-darwin-strnlen.patch b/app-arch/libarchive/files/libarchive-3.5.0-darwin-strnlen.patch
deleted file mode 100644
index 8f540e4aa07b..000000000000
--- a/app-arch/libarchive/files/libarchive-3.5.0-darwin-strnlen.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-https://github.com/macports/macports-ports/blob/master/archivers/libarchive/files/patch-libarchive-3.5-strnlen.diff
-
-next release should have a fix for this
-
---- a/libarchive/archive_read_support_format_mtree.c
-+++ b/libarchive/archive_read_support_format_mtree.c
-@@ -65,6 +65,20 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_format_mtree.c 2011
- #define O_CLOEXEC	0
- #endif
- 
-+#ifdef __APPLE__
-+#if  __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070
-+static size_t strnlen(const char *s, size_t maxlen) {
-+  size_t l = 0;
-+  while (l < maxlen && *s) {
-+    l++;
-+    s++;
-+  }
-+  return l;
-+}
-+#endif
-+#endif
-+
-+
- #define	MTREE_HAS_DEVICE	0x0001
- #define	MTREE_HAS_FFLAGS	0x0002
- #define	MTREE_HAS_GID		0x0004

diff --git a/app-arch/libarchive/libarchive-3.5.2.ebuild b/app-arch/libarchive/libarchive-3.5.2.ebuild
deleted file mode 100644
index 7d264e642f3f..000000000000
--- a/app-arch/libarchive/libarchive-3.5.2.ebuild
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit libtool multilib-minimal toolchain-funcs
-
-DESCRIPTION="Multi-format archive and compression library"
-HOMEPAGE="https://www.libarchive.org/"
-SRC_URI="https://www.libarchive.org/downloads/${P}.tar.gz"
-
-LICENSE="BSD BSD-2 BSD-4 public-domain"
-SLOT="0/13"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="acl blake2 +bzip2 +e2fsprogs expat +iconv lz4 +lzma lzo nettle static-libs xattr +zlib zstd"
-
-RDEPEND="
-	acl? ( virtual/acl[${MULTILIB_USEDEP}] )
-	blake2? ( app-crypt/libb2[${MULTILIB_USEDEP}] )
-	bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
-	expat? ( dev-libs/expat[${MULTILIB_USEDEP}] )
-	!expat? ( dev-libs/libxml2[${MULTILIB_USEDEP}] )
-	iconv? ( virtual/libiconv[${MULTILIB_USEDEP}] )
-	kernel_linux? (
-		xattr? ( sys-apps/attr[${MULTILIB_USEDEP}] )
-	)
-	dev-libs/openssl:0=[${MULTILIB_USEDEP}]
-	lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
-	lzma? ( >=app-arch/xz-utils-5.2.5-r1[${MULTILIB_USEDEP}] )
-	lzo? ( >=dev-libs/lzo-2[${MULTILIB_USEDEP}] )
-	nettle? ( dev-libs/nettle:0=[${MULTILIB_USEDEP}] )
-	zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )
-	zstd? ( app-arch/zstd[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
-	kernel_linux? (
-		virtual/os-headers
-		e2fsprogs? ( sys-fs/e2fsprogs )
-	)"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.5.0-darwin-strnlen.patch  # drop on next release
-)
-
-src_prepare() {
-	default
-	elibtoolize  # is required for Solaris sol2_ld linker fix
-}
-
-multilib_src_configure() {
-	export ac_cv_header_ext2fs_ext2_fs_h=$(usex e2fsprogs) #354923
-
-	local myconf=(
-		$(use_enable acl)
-		$(use_enable static-libs static)
-		$(use_enable xattr)
-		$(use_with blake2 libb2)
-		$(use_with bzip2 bz2lib)
-		$(use_with expat)
-		$(use_with !expat xml2)
-		$(use_with iconv)
-		$(use_with lz4)
-		$(use_with lzma)
-		$(use_with lzo lzo2)
-		$(use_with nettle)
-		$(use_with zlib)
-		$(use_with zstd)
-
-		# Windows-specific
-		--without-cng
-	)
-	if multilib_is_native_abi ; then
-		myconf+=(
-			--enable-bsdcat=$(tc-is-static-only && echo static || echo shared)
-			--enable-bsdcpio=$(tc-is-static-only && echo static || echo shared)
-			--enable-bsdtar=$(tc-is-static-only && echo static || echo shared)
-		)
-	else
-		myconf+=(
-			--disable-bsdcat
-			--disable-bsdcpio
-			--disable-bsdtar
-		)
-	fi
-
-	ECONF_SOURCE="${S}" econf "${myconf[@]}"
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi ; then
-		emake
-	else
-		emake libarchive.la
-	fi
-}
-
-src_test() {
-	mkdir -p "${T}"/bin || die
-	# tests fail when lbzip2[symlink] is used in place of ref bunzip2
-	ln -s "${BROOT}/bin/bunzip2" "${T}"/bin || die
-	local -x PATH=${T}/bin:${PATH}
-	multilib-minimal_src_test
-}
-
-multilib_src_test() {
-	# sandbox is breaking long symlink behavior
-	local -x SANDBOX_ON=0
-	local -x LD_PRELOAD=
-	# some locales trigger different output that breaks tests
-	local -x LC_ALL=C
-	emake check
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi ; then
-		emake DESTDIR="${D}" install
-	else
-		local install_targets=(
-			install-includeHEADERS
-			install-libLTLIBRARIES
-			install-pkgconfigDATA
-		)
-		emake DESTDIR="${D}" "${install_targets[@]}"
-	fi
-
-	# Libs.private: should be used from libarchive.pc instead
-	find "${ED}" -type f -name "*.la" -delete || die
-}


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-arch/libarchive/, app-arch/libarchive/files/
@ 2021-04-30 23:27 Sam James
  0 siblings, 0 replies; 13+ messages in thread
From: Sam James @ 2021-04-30 23:27 UTC (permalink / raw
  To: gentoo-commits

commit:     2ae8978f4d5c5116173e06e166aad3ef37b296d2
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 30 11:34:48 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Apr 30 23:27:16 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ae8978f

app-arch/libarchive: drop obsolete LibreSSL patch

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-arch/libarchive/files/libarchive-3.3.3-libressl.patch | 12 ------------
 app-arch/libarchive/libarchive-3.5.1.ebuild               |  1 -
 2 files changed, 13 deletions(-)

diff --git a/app-arch/libarchive/files/libarchive-3.3.3-libressl.patch b/app-arch/libarchive/files/libarchive-3.3.3-libressl.patch
deleted file mode 100644
index 4d7c0ec7cf3..00000000000
--- a/app-arch/libarchive/files/libarchive-3.3.3-libressl.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/libarchive/archive_openssl_evp_private.h
-+++ b/libarchive/archive_openssl_evp_private.h
-@@ -28,7 +28,8 @@
- #include <openssl/evp.h>
- #include <openssl/opensslv.h>
-
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
-+(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
- #include <stdlib.h> /* malloc, free */
- #include <string.h> /* memset */
- static inline EVP_MD_CTX *EVP_MD_CTX_new(void)

diff --git a/app-arch/libarchive/libarchive-3.5.1.ebuild b/app-arch/libarchive/libarchive-3.5.1.ebuild
index 55c89c4ef51..1319a7f8b96 100644
--- a/app-arch/libarchive/libarchive-3.5.1.ebuild
+++ b/app-arch/libarchive/libarchive-3.5.1.ebuild
@@ -37,7 +37,6 @@ DEPEND="${RDEPEND}
 	)"
 
 PATCHES=(
-	"${FILESDIR}"/${PN}-3.3.3-libressl.patch
 	"${FILESDIR}"/${PN}-3.5.0-darwin-strnlen.patch  # drop on next release
 )
 


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-arch/libarchive/, app-arch/libarchive/files/
@ 2020-12-18 18:16 Fabian Groffen
  0 siblings, 0 replies; 13+ messages in thread
From: Fabian Groffen @ 2020-12-18 18:16 UTC (permalink / raw
  To: gentoo-commits

commit:     3e712656018c3fa11f523aec26ebea7b32161e98
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 18 18:15:58 2020 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Dec 18 18:16:23 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e712656

app-arch/libarchive-3.5.0: fix for ppc-macos

Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 .../files/libarchive-3.5.0-darwin-strnlen.patch    | 27 ++++++++++++++++++++++
 app-arch/libarchive/libarchive-3.5.0.ebuild        |  1 +
 2 files changed, 28 insertions(+)

diff --git a/app-arch/libarchive/files/libarchive-3.5.0-darwin-strnlen.patch b/app-arch/libarchive/files/libarchive-3.5.0-darwin-strnlen.patch
new file mode 100644
index 00000000000..8f540e4aa07
--- /dev/null
+++ b/app-arch/libarchive/files/libarchive-3.5.0-darwin-strnlen.patch
@@ -0,0 +1,27 @@
+https://github.com/macports/macports-ports/blob/master/archivers/libarchive/files/patch-libarchive-3.5-strnlen.diff
+
+next release should have a fix for this
+
+--- a/libarchive/archive_read_support_format_mtree.c
++++ b/libarchive/archive_read_support_format_mtree.c
+@@ -65,6 +65,20 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_format_mtree.c 2011
+ #define O_CLOEXEC	0
+ #endif
+ 
++#ifdef __APPLE__
++#if  __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070
++static size_t strnlen(const char *s, size_t maxlen) {
++  size_t l = 0;
++  while (l < maxlen && *s) {
++    l++;
++    s++;
++  }
++  return l;
++}
++#endif
++#endif
++
++
+ #define	MTREE_HAS_DEVICE	0x0001
+ #define	MTREE_HAS_FFLAGS	0x0002
+ #define	MTREE_HAS_GID		0x0004

diff --git a/app-arch/libarchive/libarchive-3.5.0.ebuild b/app-arch/libarchive/libarchive-3.5.0.ebuild
index dde837017a8..d59eb05c046 100644
--- a/app-arch/libarchive/libarchive-3.5.0.ebuild
+++ b/app-arch/libarchive/libarchive-3.5.0.ebuild
@@ -39,6 +39,7 @@ DEPEND="${RDEPEND}
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-3.3.3-libressl.patch
+	"${FILESDIR}"/${PN}-3.5.0-darwin-strnlen.patch  # drop on next release
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-arch/libarchive/, app-arch/libarchive/files/
@ 2019-09-02  7:07 Lars Wendler
  0 siblings, 0 replies; 13+ messages in thread
From: Lars Wendler @ 2019-09-02  7:07 UTC (permalink / raw
  To: gentoo-commits

commit:     2724e477dbeef81ed5f8ad995e738c776379485c
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Sep  2 07:07:21 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Sep  2 07:07:21 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2724e477

app-arch/libarchive: Fixed build with USE="-zlib"

Thanks-to: Albert W. Hopkins <marduk <AT> letterboxes.org>
Thanks-to: Stephan Hartmann <stha09 <AT> googlemail.com>
Closes: https://bugs.gentoo.org/693202
Package-Manager: Portage-2.3.75, Repoman-2.3.17
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 .../libarchive-3.4.0-without_zlib_build_fix.patch  | 160 +++++++++++++++++++++
 app-arch/libarchive/libarchive-3.4.0.ebuild        |   1 +
 2 files changed, 161 insertions(+)

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
new file mode 100644
index 00000000000..e0a3167390f
--- /dev/null
+++ b/app-arch/libarchive/files/libarchive-3.4.0-without_zlib_build_fix.patch
@@ -0,0 +1,160 @@
+From 64333cef68d7bcc67bef6ecf177fbeaa549b9139 Mon Sep 17 00:00:00 2001
+From: Martin Matuska <martin@matuska.org>
+Date: Sat, 29 Jun 2019 00:20:58 +0200
+Subject: [PATCH] Unbreak compilation without zlib
+
+Fixes #1214
+---
+ libarchive/archive_read_support_filter_gzip.c | 54 ++++++++++++-------
+ libarchive/test/test_read_format_raw.c        |  4 ++
+ 2 files changed, 39 insertions(+), 19 deletions(-)
+
+diff --git a/libarchive/archive_read_support_filter_gzip.c b/libarchive/archive_read_support_filter_gzip.c
+index 458b6f729..9fa9e2b0d 100644
+--- a/libarchive/archive_read_support_filter_gzip.c
++++ b/libarchive/archive_read_support_filter_gzip.c
+@@ -131,12 +131,20 @@ archive_read_support_filter_gzip(struct archive *_a)
+  */
+ static ssize_t
+ peek_at_header(struct archive_read_filter *filter, int *pbits,
+-	       struct private_data *state)
++#ifdef HAVE_ZLIB_H
++	       struct private_data *state
++#else
++	       void *state
++#endif
++	      )
+ {
+ 	const unsigned char *p;
+ 	ssize_t avail, len;
+ 	int bits = 0;
+ 	int header_flags;
++#ifndef HAVE_ZLIB_H
++	(void)state; /* UNUSED */
++#endif
+ 
+ 	/* Start by looking at the first ten bytes of the header, which
+ 	 * is all fixed layout. */
+@@ -153,8 +161,10 @@ peek_at_header(struct archive_read_filter *filter, int *pbits,
+ 	bits += 3;
+ 	header_flags = p[3];
+ 	/* Bytes 4-7 are mod time in little endian. */
++#ifdef HAVE_ZLIB_H
+ 	if (state)
+ 		state->mtime = archive_le32dec(p + 4);
++#endif
+ 	/* Byte 8 is deflate flags. */
+ 	/* XXXX TODO: return deflate flags back to consume_header for use
+ 	   in initializing the decompressor. */
+@@ -171,7 +181,9 @@ peek_at_header(struct archive_read_filter *filter, int *pbits,
+ 
+ 	/* Null-terminated optional filename. */
+ 	if (header_flags & 8) {
++#ifdef HAVE_ZLIB_H
+ 		ssize_t file_start = len;
++#endif
+ 		do {
+ 			++len;
+ 			if (avail < len)
+@@ -181,11 +193,13 @@ peek_at_header(struct archive_read_filter *filter, int *pbits,
+ 				return (0);
+ 		} while (p[len - 1] != 0);
+ 
++#ifdef HAVE_ZLIB_H
+ 		if (state) {
+ 			/* Reset the name in case of repeat header reads. */
+ 			free(state->name);
+ 			state->name = strdup((const char *)&p[file_start]);
+ 		}
++#endif
+ 	}
+ 
+ 	/* Null-terminated optional comment. */
+@@ -236,24 +250,6 @@ gzip_bidder_bid(struct archive_read_filter_bidder *self,
+ 	return (0);
+ }
+ 
+-static int
+-gzip_read_header(struct archive_read_filter *self, struct archive_entry *entry)
+-{
+-	struct private_data *state;
+-
+-	state = (struct private_data *)self->data;
+-
+-	/* A mtime of 0 is considered invalid/missing. */
+-	if (state->mtime != 0)
+-		archive_entry_set_mtime(entry, state->mtime, 0);
+-
+-	/* If the name is available, extract it. */
+-	if (state->name)
+-		archive_entry_set_pathname(entry, state->name);
+-
+-	return (ARCHIVE_OK);
+-}
+-
+ #ifndef HAVE_ZLIB_H
+ 
+ /*
+@@ -277,6 +273,24 @@ gzip_bidder_init(struct archive_read_filter *self)
+ 
+ #else
+ 
++static int
++gzip_read_header(struct archive_read_filter *self, struct archive_entry *entry)
++{
++	struct private_data *state;
++
++	state = (struct private_data *)self->data;
++
++	/* A mtime of 0 is considered invalid/missing. */
++	if (state->mtime != 0)
++		archive_entry_set_mtime(entry, state->mtime, 0);
++
++	/* If the name is available, extract it. */
++	if (state->name)
++		archive_entry_set_pathname(entry, state->name);
++
++	return (ARCHIVE_OK);
++}
++
+ /*
+  * Initialize the filter object.
+  */
+@@ -306,7 +320,9 @@ gzip_bidder_init(struct archive_read_filter *self)
+ 	self->read = gzip_filter_read;
+ 	self->skip = NULL; /* not supported */
+ 	self->close = gzip_filter_close;
++#ifdef HAVE_ZLIB_H
+ 	self->read_header = gzip_read_header;
++#endif
+ 
+ 	state->in_stream = 0; /* We're not actually within a stream yet. */
+ 
+diff --git a/libarchive/test/test_read_format_raw.c b/libarchive/test/test_read_format_raw.c
+index 0dac8bfba..3961723b4 100644
+--- a/libarchive/test/test_read_format_raw.c
++++ b/libarchive/test/test_read_format_raw.c
+@@ -36,7 +36,9 @@ DEFINE_TEST(test_read_format_raw)
+ 	const char *reffile1 = "test_read_format_raw.data";
+ 	const char *reffile2 = "test_read_format_raw.data.Z";
+ 	const char *reffile3 = "test_read_format_raw.bufr";
++#ifdef HAVE_ZLIB_H
+ 	const char *reffile4 = "test_read_format_raw.data.gz";
++#endif
+ 
+ 	/* First, try pulling data out of an uninterpretable file. */
+ 	extract_reference_file(reffile1);
+@@ -119,6 +121,7 @@ DEFINE_TEST(test_read_format_raw)
+ 	assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
+ 	assertEqualInt(ARCHIVE_OK, archive_read_free(a));
+ 
++#ifdef HAVE_ZLIB_H
+ 	/* Fourth, try with gzip which has metadata. */
+ 	extract_reference_file(reffile4);
+ 	assert((a = archive_read_new()) != NULL);
+@@ -144,4 +147,5 @@ DEFINE_TEST(test_read_format_raw)
+ 	assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
+ 	assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
+ 	assertEqualInt(ARCHIVE_OK, archive_read_free(a));
++#endif
+ }

diff --git a/app-arch/libarchive/libarchive-3.4.0.ebuild b/app-arch/libarchive/libarchive-3.4.0.ebuild
index 6780bc9cabe..47f77c61efd 100644
--- a/app-arch/libarchive/libarchive-3.4.0.ebuild
+++ b/app-arch/libarchive/libarchive-3.4.0.ebuild
@@ -38,6 +38,7 @@ DEPEND="${RDEPEND}
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-3.3.3-libressl.patch
+	"${FILESDIR}"/${P}-without_zlib_build_fix.patch #693202
 )
 
 # Various test problems, starting with the fact that sandbox


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-arch/libarchive/, app-arch/libarchive/files/
@ 2018-04-19 15:24 Aaron Bauman
  0 siblings, 0 replies; 13+ messages in thread
From: Aaron Bauman @ 2018-04-19 15:24 UTC (permalink / raw
  To: gentoo-commits

commit:     79fe43f8318e385f889bc12bb18f38c69ef5f201
Author:     Aaron Bauman <bman <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 19 15:24:25 2018 +0000
Commit:     Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Thu Apr 19 15:24:41 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79fe43f8

app-arch/libarchive: compatibility patch for LibreSSL

This patch is slightly modified from app-arch/libarchive-3.3.1 due to
minor upstream modifications.

Package-Manager: Portage-2.3.31, Repoman-2.3.9

 .../files/libarchive-3.3.2-libressl.patch          | 25 ++++++++++++++++++++++
 app-arch/libarchive/libarchive-3.3.2.ebuild        |  4 ++++
 2 files changed, 29 insertions(+)

diff --git a/app-arch/libarchive/files/libarchive-3.3.2-libressl.patch b/app-arch/libarchive/files/libarchive-3.3.2-libressl.patch
new file mode 100644
index 00000000000..e053a539fae
--- /dev/null
+++ b/app-arch/libarchive/files/libarchive-3.3.2-libressl.patch
@@ -0,0 +1,25 @@
+--- a/libarchive/archive_openssl_evp_private.h       2017-01-29 05:06:27.000000000 +0000
++++ b/libarchive/archive_openssl_evp_private.h   2018-04-19 04:00:14.061922747 +0000
+@@ -28,7 +28,8 @@
+ #include <openssl/evp.h>
+ #include <openssl/opensslv.h>
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
++(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ #include <stdlib.h> /* malloc, free */
+ #include <string.h> /* memset */
+ static inline EVP_MD_CTX *EVP_MD_CTX_new(void)
+
+--- a/libarchive/archive_openssl_hmac_private.h	2017-01-29 05:06:27.000000000 +0000
++++ b/libarchive/archive_openssl_hmac_private.h	2018-04-19 04:02:18.309167446 +0000
+@@ -28,7 +28,8 @@
+ #include <openssl/hmac.h>
+ #include <openssl/opensslv.h>
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
++(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ #include <stdlib.h> /* malloc, free */
+ #include <string.h> /* memset */
+ static inline HMAC_CTX *HMAC_CTX_new(void)

diff --git a/app-arch/libarchive/libarchive-3.3.2.ebuild b/app-arch/libarchive/libarchive-3.3.2.ebuild
index f68b736c946..d82a2179cc3 100644
--- a/app-arch/libarchive/libarchive-3.3.2.ebuild
+++ b/app-arch/libarchive/libarchive-3.3.2.ebuild
@@ -35,6 +35,10 @@ DEPEND="${RDEPEND}
 		e2fsprogs? ( sys-fs/e2fsprogs )
 	)"
 
+PATCHES=(
+    "${FILESDIR}"/${PN}-3.3.2-libressl.patch
+)
+
 # Various test problems, starting with the fact that sandbox
 # explodes on long paths. https://bugs.gentoo.org/598806
 RESTRICT="test"


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-arch/libarchive/, app-arch/libarchive/files/
@ 2018-01-02 13:12 Michał Górny
  0 siblings, 0 replies; 13+ messages in thread
From: Michał Górny @ 2018-01-02 13:12 UTC (permalink / raw
  To: gentoo-commits

commit:     cae6e3b2949cd42743ab916a3e64d45aadd1a983
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  2 13:11:57 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jan  2 13:12:52 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cae6e3b2

app-arch/libarchive: Clean old up

 app-arch/libarchive/Manifest                   |   1 -
 app-arch/libarchive/files/CVE-2017-5601.patch  |  24 -----
 app-arch/libarchive/libarchive-3.2.2-r1.ebuild | 124 -------------------------
 3 files changed, 149 deletions(-)

diff --git a/app-arch/libarchive/Manifest b/app-arch/libarchive/Manifest
index 950a2d7f2cf..1570763e6a1 100644
--- a/app-arch/libarchive/Manifest
+++ b/app-arch/libarchive/Manifest
@@ -1,3 +1,2 @@
-DIST libarchive-3.2.2.tar.gz 5458241 BLAKE2B 99a3f01e780a3cac1142645887f31fc4d68c9a60a3539c259745274ea612373b41a7e93d95c27739c87c6050a0304ff069a0f1435fdbf0a13d47935209547c20 SHA512 a67920c37d49cf9478032d77fc4fa21827cebb96e9b83d9ecb8466328834052e4ab3d3a9bc4e2edf405d6cb14ffd648c9fa100b578257f6e5842c99bbea558a7
 DIST libarchive-3.3.1.tar.gz 6219943 BLAKE2B fc951a613098060d55c000436ccdc6997126be2e1eeb41f348ca20c1ae3e54936ae053404fdd3211de90a2a223b29f5a80c580a937878a37265401d55655fff1 SHA512 90702b393b6f0943f42438e277b257af45eee4fa82420431f6a4f5f48bb846f2a72c8ff084dc3ee9c87bdf8b57f4d8dddf7814870fe2604fe86c55d8d744c164
 DIST libarchive-3.3.2.tar.gz 6236562 BLAKE2B da26474b4fd8111561c1e5ac12a6333a8ba8a23cce9e9cdce7b50647ab8dbae08609ea1bffbab60da74c6555ebf0815c456fe69c72129eb6071fb845141d0beb SHA512 1e538cd7d492f54b11c16c56f12c1632ba14302a3737ec0db786272aec0c8020f1e27616a7654d57e26737e5ed9bfc9a62f1fdda61a95c39eb726aa7c2f673e4

diff --git a/app-arch/libarchive/files/CVE-2017-5601.patch b/app-arch/libarchive/files/CVE-2017-5601.patch
deleted file mode 100644
index 4ba85ff9072..00000000000
--- a/app-arch/libarchive/files/CVE-2017-5601.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 98dcbbf0bf4854bf987557e55e55fff7abbf3ea9 Mon Sep 17 00:00:00 2001
-From: Martin Matuska <martin@matuska.org>
-Date: Thu, 19 Jan 2017 22:00:18 +0100
-Subject: [PATCH] Fail with negative lha->compsize in lha_read_file_header_1()
- Fixes a heap buffer overflow reported in Secunia SA74169
-
----
- libarchive/archive_read_support_format_lha.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/libarchive/archive_read_support_format_lha.c b/libarchive/archive_read_support_format_lha.c
-index 52a5531..d77a7c2 100644
---- a/libarchive/archive_read_support_format_lha.c
-+++ b/libarchive/archive_read_support_format_lha.c
-@@ -924,6 +924,9 @@ lha_read_file_header_1(struct archive_read *a, struct lha *lha)
- 	/* Get a real compressed file size. */
- 	lha->compsize -= extdsize - 2;
- 
-+	if (lha->compsize < 0)
-+		goto invalid;	/* Invalid compressed file size */
-+
- 	if (sum_calculated != headersum) {
- 		archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- 		    "LHa header sum error");

diff --git a/app-arch/libarchive/libarchive-3.2.2-r1.ebuild b/app-arch/libarchive/libarchive-3.2.2-r1.ebuild
deleted file mode 100644
index 34485b16533..00000000000
--- a/app-arch/libarchive/libarchive-3.2.2-r1.ebuild
+++ /dev/null
@@ -1,124 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit eutils libtool multilib-minimal toolchain-funcs
-
-DESCRIPTION="BSD tar command"
-HOMEPAGE="http://www.libarchive.org/"
-SRC_URI="http://www.libarchive.org/downloads/${P}.tar.gz"
-
-LICENSE="BSD BSD-2 BSD-4 public-domain"
-SLOT="0/13"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="acl +bzip2 +e2fsprogs expat +iconv kernel_linux libressl lz4 +lzma lzo nettle static-libs +threads xattr +zlib"
-
-RDEPEND="
-	acl? ( virtual/acl[${MULTILIB_USEDEP}] )
-	bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
-	expat? ( dev-libs/expat[${MULTILIB_USEDEP}] )
-	!expat? ( dev-libs/libxml2[${MULTILIB_USEDEP}] )
-	iconv? ( virtual/libiconv[${MULTILIB_USEDEP}] )
-	kernel_linux? (
-		xattr? ( sys-apps/attr[${MULTILIB_USEDEP}] )
-	)
-	!libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
-	libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
-	lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
-	lzma? ( app-arch/xz-utils[threads=,${MULTILIB_USEDEP}] )
-	lzo? ( >=dev-libs/lzo-2[${MULTILIB_USEDEP}] )
-	nettle? ( dev-libs/nettle:0=[${MULTILIB_USEDEP}] )
-	zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
-	kernel_linux? (
-		virtual/os-headers
-		e2fsprogs? ( sys-fs/e2fsprogs )
-	)"
-
-PATCHES=(
-	"${FILESDIR}"/CVE-2017-5601.patch
-)
-
-src_prepare() {
-	default
-	elibtoolize  # is required for Solaris sol2_ld linker fix
-}
-
-multilib_src_configure() {
-	export ac_cv_header_ext2fs_ext2_fs_h=$(usex e2fsprogs) #354923
-
-	local myconf=()
-	myconf=(
-		$(use_enable acl)
-		$(use_enable static-libs static)
-		$(use_enable xattr)
-		$(use_with bzip2 bz2lib)
-		$(use_with expat)
-		$(use_with !expat xml2)
-		$(use_with iconv)
-		$(use_with lz4)
-		$(use_with lzma)
-		$(use_with lzo lzo2)
-		$(use_with nettle)
-		$(use_with zlib)
-	)
-	if multilib_is_native_abi ; then myconf+=(
-		--enable-bsdcat=$(tc-is-static-only && echo static || echo shared)
-		--enable-bsdcpio=$(tc-is-static-only && echo static || echo shared)
-		--enable-bsdtar=$(tc-is-static-only && echo static || echo shared)
-	); else myconf+=(
-		--disable-bsdcat
-		--disable-bsdcpio
-		--disable-bsdtar
-	); fi
-
-	# We disable lzmadec because we support the newer liblzma from xz-utils
-	# and not liblzmadec with this version.
-	myconf+=(
-		--without-lzmadec
-	)
-
-	ECONF_SOURCE="${S}" econf "${myconf[@]}"
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi ; then
-		emake
-	else
-		emake libarchive.la
-	fi
-}
-
-multilib_src_test() {
-	# Replace the default src_test so that it builds tests in parallel
-	multilib_is_native_abi && emake check
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi ; then
-		emake DESTDIR="${D}" install
-
-		# Create symlinks for FreeBSD
-		if ! use prefix && [[ ${CHOST} == *-freebsd* ]]; then
-			# Exclude cat for the time being #589876
-			for bin in cpio tar; do
-				dosym bsd${bin} /usr/bin/${bin}
-				echo '.so bsd${bin}.1' > "${T}"/${bin}.1
-				doman "${T}"/${bin}.1
-			done
-		fi
-	else
-		emake DESTDIR="${D}" \
-			install-includeHEADERS \
-			install-libLTLIBRARIES \
-			install-pkgconfigDATA
-	fi
-
-	# Libs.private: should be used from libarchive.pc instead
-	prune_libtool_files
-}
-
-multilib_src_install_all() {
-	cd "${S}" || die
-	einstalldocs
-}


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-arch/libarchive/, app-arch/libarchive/files/
@ 2016-07-26 17:56 NP Hardass
  0 siblings, 0 replies; 13+ messages in thread
From: NP Hardass @ 2016-07-26 17:56 UTC (permalink / raw
  To: gentoo-commits

commit:     e7190087b79b1685765ab683bf3ad23edb229950
Author:     NP-Hardass <NP-Hardass <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 26 17:47:44 2016 +0000
Commit:     NP Hardass <np-hardass <AT> gentoo <DOT> org>
CommitDate: Tue Jul 26 17:56:29 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7190087

app-arch/libarchive: Add explicit dep on xz threads=, backport detecction

Package-Manager: portage-2.2.28

 ...ibarchive-3.2.1-xz-utils-thread-detection.patch |  27 +++++
 app-arch/libarchive/libarchive-3.2.1-r4.ebuild     | 126 +++++++++++++++++++++
 2 files changed, 153 insertions(+)

diff --git a/app-arch/libarchive/files/libarchive-3.2.1-xz-utils-thread-detection.patch b/app-arch/libarchive/files/libarchive-3.2.1-xz-utils-thread-detection.patch
new file mode 100644
index 0000000..dda2359
--- /dev/null
+++ b/app-arch/libarchive/files/libarchive-3.2.1-xz-utils-thread-detection.patch
@@ -0,0 +1,27 @@
+From 7c3148ec0a2fed4834c6f9869ff7d2da77ba804c Mon Sep 17 00:00:00 2001
+From: Joerg Sonnenberger <joerg@bec.de>
+Date: Wed, 22 Jun 2016 23:03:43 +0200
+Subject: [PATCH] Ignore the MT encoder in XZ 5.2 prerelease versions.
+
+---
+ configure.ac | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 64775fa..4f7f432 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -374,8 +374,11 @@ if test "x$with_lzma" != "xno"; then
+   AC_CACHE_CHECK(
+     [whether we have multithread support in lzma],
+     ac_cv_lzma_has_mt,
+-    [AC_COMPILE_IFELSE([
+-      AC_LANG_PROGRAM([[#include <lzma.h>]],
++    [AC_LINK_IFELSE([
++      AC_LANG_PROGRAM([[#include <lzma.h>]
++                       [#if LZMA_VERSION < 50020000]
++                       [#error unsupported]
++                       [#endif]],
+                       [[lzma_stream_encoder_mt(0, 0);]])],
+       [ac_cv_lzma_has_mt=yes], [ac_cv_lzma_has_mt=no])])
+   if test "x$ac_cv_lzma_has_mt" != xno; then

diff --git a/app-arch/libarchive/libarchive-3.2.1-r4.ebuild b/app-arch/libarchive/libarchive-3.2.1-r4.ebuild
new file mode 100644
index 0000000..0ef480c
--- /dev/null
+++ b/app-arch/libarchive/libarchive-3.2.1-r4.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+inherit autotools eutils multilib-minimal toolchain-funcs
+
+DESCRIPTION="BSD tar command"
+HOMEPAGE="http://www.libarchive.org/"
+SRC_URI="http://www.libarchive.org/downloads/${P}.tar.gz"
+
+LICENSE="BSD BSD-2 BSD-4 public-domain"
+SLOT="0/13"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="acl +bzip2 +e2fsprogs expat +iconv kernel_linux libressl lz4 +lzma lzo nettle static-libs +threads xattr +zlib"
+
+RDEPEND="
+	acl? ( virtual/acl[${MULTILIB_USEDEP}] )
+	bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
+	expat? ( dev-libs/expat[${MULTILIB_USEDEP}] )
+	!expat? ( dev-libs/libxml2[${MULTILIB_USEDEP}] )
+	iconv? ( virtual/libiconv[${MULTILIB_USEDEP}] )
+	kernel_linux? (
+		xattr? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+	)
+	!libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+	libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+	lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
+	lzma? ( app-arch/xz-utils[threads=,${MULTILIB_USEDEP}] )
+	lzo? ( >=dev-libs/lzo-2[${MULTILIB_USEDEP}] )
+	nettle? ( dev-libs/nettle:0=[${MULTILIB_USEDEP}] )
+	zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+	kernel_linux? (
+		virtual/os-headers
+		e2fsprogs? ( sys-fs/e2fsprogs )
+	)"
+
+PATCHES=(
+	"${FILESDIR}/${P}-fix-tests-gnu99.patch"
+	"${FILESDIR}/${P}-osx-fix-acl.patch" #587890
+	"${FILESDIR}/${P}-xz-utils-thread-detection.patch" #589654
+)
+
+src_prepare() {
+	default
+	eautoreconf # elibtoolize is required for Solaris sol2_ld linker fix
+}
+
+multilib_src_configure() {
+	export ac_cv_header_ext2fs_ext2_fs_h=$(usex e2fsprogs) #354923
+
+	local myconf=()
+	myconf=(
+		$(use_enable acl)
+		$(use_enable static-libs static)
+		$(use_enable xattr)
+		$(use_with bzip2 bz2lib)
+		$(use_with expat)
+		$(use_with !expat xml2)
+		$(use_with iconv)
+		$(use_with lz4)
+		$(use_with lzma)
+		$(use_with lzo lzo2)
+		$(use_with nettle)
+		$(use_with zlib)
+	)
+	if multilib_is_native_abi ; then myconf+=(
+		--enable-bsdcat=$(tc-is-static-only && echo static || echo shared)
+		--enable-bsdcpio=$(tc-is-static-only && echo static || echo shared)
+		--enable-bsdtar=$(tc-is-static-only && echo static || echo shared)
+	); else myconf+=(
+		--disable-bsdcat
+		--disable-bsdcpio
+		--disable-bsdtar
+	); fi
+
+	# We disable lzmadec because we support the newer liblzma from xz-utils
+	# and not liblzmadec with this version.
+	myconf+=(
+		--without-lzmadec
+	)
+
+	ECONF_SOURCE="${S}" econf "${myconf[@]}"
+}
+
+multilib_src_compile() {
+	if multilib_is_native_abi ; then
+		emake
+	else
+		emake libarchive.la
+	fi
+}
+
+multilib_src_test() {
+	# Replace the default src_test so that it builds tests in parallel
+	multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi ; then
+		emake DESTDIR="${D}" install
+
+		# Create symlinks for FreeBSD
+		if ! use prefix && [[ ${CHOST} == *-freebsd* ]]; then
+			for bin in cat cpio tar; do
+				dosym bsd${bin} /usr/bin/${bin}
+				echo '.so bsd${bin}.1' > "${T}"/${bin}.1
+				doman "${T}"/${bin}.1
+			done
+		fi
+	else
+		emake DESTDIR="${D}" \
+			install-includeHEADERS \
+			install-libLTLIBRARIES \
+			install-pkgconfigDATA
+	fi
+
+	# Libs.private: should be used from libarchive.pc instead
+	prune_libtool_files
+}
+
+multilib_src_install_all() {
+	cd "${S}" || die
+	einstalldocs
+}


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-arch/libarchive/, app-arch/libarchive/files/
@ 2016-05-11  4:02 NP Hardass
  0 siblings, 0 replies; 13+ messages in thread
From: NP Hardass @ 2016-05-11  4:02 UTC (permalink / raw
  To: gentoo-commits

commit:     0001631411acdce8a01050c8ff0295825cca626c
Author:     NP-Hardass <NP-Hardass <AT> gentoo <DOT> org>
AuthorDate: Wed May 11 03:55:55 2016 +0000
Commit:     NP Hardass <np-hardass <AT> gentoo <DOT> org>
CommitDate: Wed May 11 04:02:32 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00016314

app-arch/libarchive: Revbump to 3.1.2-r5, resolves #582526

Package-Manager: portage-2.2.26

 .../files/libarchive-3.1.2-CVE-2016-1541.patch     |  67 +++++++++++
 app-arch/libarchive/libarchive-3.1.2-r5.ebuild     | 122 +++++++++++++++++++++
 2 files changed, 189 insertions(+)

diff --git a/app-arch/libarchive/files/libarchive-3.1.2-CVE-2016-1541.patch b/app-arch/libarchive/files/libarchive-3.1.2-CVE-2016-1541.patch
new file mode 100644
index 0000000..63c6a74
--- /dev/null
+++ b/app-arch/libarchive/files/libarchive-3.1.2-CVE-2016-1541.patch
@@ -0,0 +1,67 @@
+From d0331e8e5b05b475f20b1f3101fe1ad772d7e7e7 Mon Sep 17 00:00:00 2001
+From: Tim Kientzle <kientzle@acm.org>
+Date: Sun, 24 Apr 2016 17:13:45 -0700
+Subject: [PATCH] Issue #656:  Fix CVE-2016-1541, VU#862384
+
+When reading OS X metadata entries in Zip archives that were stored
+without compression, libarchive would use the uncompressed entry size
+to allocate a buffer but would use the compressed entry size to limit
+the amount of data copied into that buffer.  Since the compressed
+and uncompressed sizes are provided by data in the archive itself,
+an attacker could manipulate these values to write data beyond
+the end of the allocated buffer.
+
+This fix provides three new checks to guard against such
+manipulation and to make libarchive generally more robust when
+handling this type of entry:
+ 1. If an OS X metadata entry is stored without compression,
+    abort the entire archive if the compressed and uncompressed
+    data sizes do not match.
+ 2. When sanity-checking the size of an OS X metadata entry,
+    abort this entry if either the compressed or uncompressed
+    size is larger than 4MB.
+ 3. When copying data into the allocated buffer, check the copy
+    size against both the compressed entry size and uncompressed
+    entry size.
+---
+ libarchive/archive_read_support_format_zip.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/libarchive/archive_read_support_format_zip.c b/libarchive/archive_read_support_format_zip.c
+index 0f8262c..0a0be96 100644
+--- a/libarchive/archive_read_support_format_zip.c
++++ b/libarchive/archive_read_support_format_zip.c
+@@ -2778,6 +2778,11 @@ zip_read_mac_metadata(struct archive_read *a, struct archive_entry *entry,
+ 
+ 	switch(rsrc->compression) {
+ 	case 0:  /* No compression. */
++		if (rsrc->uncompressed_size != rsrc->compressed_size) {
++			archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
++			    "Malformed OS X metadata entry: inconsistent size");
++			return (ARCHIVE_FATAL);
++		}
+ #ifdef HAVE_ZLIB_H
+ 	case 8: /* Deflate compression. */
+ #endif
+@@ -2798,6 +2803,12 @@ zip_read_mac_metadata(struct archive_read *a, struct archive_entry *entry,
+ 		    (intmax_t)rsrc->uncompressed_size);
+ 		return (ARCHIVE_WARN);
+ 	}
++	if (rsrc->compressed_size > (4 * 1024 * 1024)) {
++		archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
++		    "Mac metadata is too large: %jd > 4M bytes",
++		    (intmax_t)rsrc->compressed_size);
++		return (ARCHIVE_WARN);
++	}
+ 
+ 	metadata = malloc((size_t)rsrc->uncompressed_size);
+ 	if (metadata == NULL) {
+@@ -2836,6 +2847,8 @@ zip_read_mac_metadata(struct archive_read *a, struct archive_entry *entry,
+ 			bytes_avail = remaining_bytes;
+ 		switch(rsrc->compression) {
+ 		case 0:  /* No compression. */
++			if ((size_t)bytes_avail > metadata_bytes)
++				bytes_avail = metadata_bytes;
+ 			memcpy(mp, p, bytes_avail);
+ 			bytes_used = (size_t)bytes_avail;
+ 			metadata_bytes -= bytes_used;

diff --git a/app-arch/libarchive/libarchive-3.1.2-r5.ebuild b/app-arch/libarchive/libarchive-3.1.2-r5.ebuild
new file mode 100644
index 0000000..f968413
--- /dev/null
+++ b/app-arch/libarchive/libarchive-3.1.2-r5.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils multilib-minimal toolchain-funcs
+
+DESCRIPTION="BSD tar command"
+HOMEPAGE="http://www.libarchive.org/"
+SRC_URI="http://www.libarchive.org/downloads/${P}.tar.gz"
+
+LICENSE="BSD BSD-2 BSD-4 public-domain"
+SLOT="0/13"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="acl +bzip2 +e2fsprogs expat +iconv kernel_linux libressl +lzma lzo nettle static-libs xattr +zlib"
+
+RDEPEND="
+	!libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+	libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+	acl? ( virtual/acl[${MULTILIB_USEDEP}] )
+	bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
+	expat? ( dev-libs/expat[${MULTILIB_USEDEP}] )
+	!expat? ( dev-libs/libxml2[${MULTILIB_USEDEP}] )
+	iconv? ( virtual/libiconv[${MULTILIB_USEDEP}] )
+	kernel_linux? (
+		xattr? ( sys-apps/attr[${MULTILIB_USEDEP}] )
+		)
+	lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] )
+	lzo? ( >=dev-libs/lzo-2[${MULTILIB_USEDEP}] )
+	nettle? ( dev-libs/nettle:0=[${MULTILIB_USEDEP}] )
+	zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+	kernel_linux? (
+		virtual/os-headers
+		e2fsprogs? ( sys-fs/e2fsprogs )
+		)"
+
+DOCS=( NEWS README )
+
+src_prepare() {
+	epatch "${FILESDIR}"/${P}-CVE-2013-0211.patch
+	epatch "${FILESDIR}"/${P}-outofsource.patch
+	epatch "${FILESDIR}"/${P}-CVE-2016-1541.patch
+	eautoreconf
+}
+
+multilib_src_configure() {
+	export ac_cv_header_ext2fs_ext2_fs_h=$(usex e2fsprogs) #354923
+
+	local myconf=()
+	myconf=(
+		$(use_enable static-libs static)
+		$(use_enable xattr)
+		$(use_enable acl)
+		$(use_with zlib)
+		$(use_with bzip2 bz2lib)
+		$(use_with iconv)
+		$(use_with lzma)
+		$(use_with lzo lzo2)
+		$(use_with nettle)
+		$(use_with !expat xml2)
+		$(use_with expat)
+	)
+	if multilib_is_native_abi ; then myconf+=(
+		--enable-bsdtar=$(tc-is-static-only && echo static || echo shared)
+		--enable-bsdcpio=$(tc-is-static-only && echo static || echo shared)
+	); else myconf+=(
+		--disable-bsdtar
+		--disable-bsdcpio
+	); fi
+
+	# We disable lzmadec because we support the newer liblzma from xz-utils
+	# and not liblzmadec with this version.
+	myconf+=(
+		--without-lzmadec
+	)
+
+	ECONF_SOURCE="${S}" econf "${myconf[@]}"
+}
+
+multilib_src_compile() {
+	if multilib_is_native_abi ; then
+		emake
+	else
+		emake libarchive.la
+	fi
+}
+
+multilib_src_test() {
+	# Replace the default src_test so that it builds tests in parallel
+	multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi ; then
+		emake DESTDIR="${D}" install
+
+		# Libs.private: should be used from libarchive.pc instead
+		prune_libtool_files
+
+		# Create tar symlink for FreeBSD
+		if ! use prefix && [[ ${CHOST} == *-freebsd* ]]; then
+			dosym bsdtar /usr/bin/tar
+			echo '.so bsdtar.1' > "${T}"/tar.1
+			doman "${T}"/tar.1
+			# We may wish to switch to symlink bsdcpio to cpio too one day
+		fi
+	else
+		emake DESTDIR="${D}" \
+			install-includeHEADERS \
+			install-libLTLIBRARIES \
+			install-pkgconfigDATA
+
+		# Libs.private: should be used from libarchive.pc instead
+		prune_libtool_files
+	fi
+}
+
+multilib_src_install_all() {
+	cd "${S}" || die
+	dodoc "${DOCS[@]}"
+}


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-07-29 20:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-29 23:39 [gentoo-commits] repo/gentoo:master commit in: app-arch/libarchive/, app-arch/libarchive/files/ Patrick McLean
  -- strict thread matches above, loose matches on Subject: below --
2024-07-29 20:00 Fabian Groffen
2024-03-31 15:36 Michał Górny
2024-02-16 13:53 Michał Górny
2023-04-08 18:45 Michał Górny
2022-02-11 13:36 Michał Górny
2021-04-30 23:27 Sam James
2020-12-18 18:16 Fabian Groffen
2019-09-02  7:07 Lars Wendler
2018-04-19 15:24 Aaron Bauman
2018-01-02 13:12 Michał Górny
2016-07-26 17:56 NP Hardass
2016-05-11  4:02 NP Hardass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox