From 3b390919c5e127b855e3fa0b034c8d5ae9122d32 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 8 Apr 2024 07:11:01 +0000 Subject: [PATCH] app-arch/libarchive: Sync with Gentoo It's from Gentoo commit 43c399629fb022b7519d70194cb6c0364809764d. --- .../files/libarchive-3.7.2-safe-fprintf.patch | 27 +++++++++++++++++++ ...2-r2.ebuild => libarchive-3.7.2-r3.ebuild} | 11 +++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 sdk_container/src/third_party/portage-stable/app-arch/libarchive/files/libarchive-3.7.2-safe-fprintf.patch rename sdk_container/src/third_party/portage-stable/app-arch/libarchive/{libarchive-3.7.2-r2.ebuild => libarchive-3.7.2-r3.ebuild} (89%) diff --git a/sdk_container/src/third_party/portage-stable/app-arch/libarchive/files/libarchive-3.7.2-safe-fprintf.patch b/sdk_container/src/third_party/portage-stable/app-arch/libarchive/files/libarchive-3.7.2-safe-fprintf.patch new file mode 100644 index 0000000000..6a351ba37f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/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 +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/sdk_container/src/third_party/portage-stable/app-arch/libarchive/libarchive-3.7.2-r2.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/libarchive/libarchive-3.7.2-r3.ebuild similarity index 89% rename from sdk_container/src/third_party/portage-stable/app-arch/libarchive/libarchive-3.7.2-r2.ebuild rename to sdk_container/src/third_party/portage-stable/app-arch/libarchive/libarchive-3.7.2-r3.ebuild index 5ac9b253c2..5387e642a6 100644 --- a/sdk_container/src/third_party/portage-stable/app-arch/libarchive/libarchive-3.7.2-r2.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-arch/libarchive/libarchive-3.7.2-r3.ebuild @@ -16,7 +16,7 @@ SRC_URI=" 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 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 ~arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" IUSE=" acl blake2 +bzip2 +e2fsprogs expat +iconv lz4 +lzma lzo nettle static-libs test xattr zstd @@ -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() { @@ -138,6 +140,13 @@ 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 + # workaround lrzip broken on 32-bit arches with >= 10 threads + # https://bugs.gentoo.org/927766 + cat > "${T}"/bin/lrzip <<-EOF || die + #!/bin/sh + exec "$(type -P lrzip)" -p1 "\${@}" + EOF + chmod +x "${T}/bin/lrzip" || die local -x PATH=${T}/bin:${PATH} multilib-minimal_src_test }