mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-25 07:31:01 +02:00
app-arch/libarchive: Sync with Gentoo
It's from Gentoo commit 43c399629fb022b7519d70194cb6c0364809764d.
This commit is contained in:
parent
f861c8cbb9
commit
3b390919c5
@ -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;
|
@ -16,7 +16,7 @@ SRC_URI="
|
|||||||
|
|
||||||
LICENSE="BSD BSD-2 BSD-4 public-domain"
|
LICENSE="BSD BSD-2 BSD-4 public-domain"
|
||||||
SLOT="0/13"
|
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="
|
IUSE="
|
||||||
acl blake2 +bzip2 +e2fsprogs expat +iconv lz4 +lzma lzo nettle
|
acl blake2 +bzip2 +e2fsprogs expat +iconv lz4 +lzma lzo nettle
|
||||||
static-libs test xattr zstd
|
static-libs test xattr zstd
|
||||||
@ -76,6 +76,8 @@ PATCHES=(
|
|||||||
# https://github.com/libarchive/libarchive/issues/2069
|
# https://github.com/libarchive/libarchive/issues/2069
|
||||||
# (we can simply update the command since we don't support old lrzip)
|
# (we can simply update the command since we don't support old lrzip)
|
||||||
"${FILESDIR}/${P}-lrzip.patch"
|
"${FILESDIR}/${P}-lrzip.patch"
|
||||||
|
# https://github.com/libarchive/libarchive/pull/2101
|
||||||
|
"${FILESDIR}/${P}-safe-fprintf.patch"
|
||||||
)
|
)
|
||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
@ -138,6 +140,13 @@ src_test() {
|
|||||||
mkdir -p "${T}"/bin || die
|
mkdir -p "${T}"/bin || die
|
||||||
# tests fail when lbzip2[symlink] is used in place of ref bunzip2
|
# tests fail when lbzip2[symlink] is used in place of ref bunzip2
|
||||||
ln -s "${BROOT}/bin/bunzip2" "${T}"/bin || die
|
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}
|
local -x PATH=${T}/bin:${PATH}
|
||||||
multilib-minimal_src_test
|
multilib-minimal_src_test
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user