-
Notifications
You must be signed in to change notification settings - Fork 716
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20254 from boegel/libarchive_patch_tar_error_repo…
…rting add patch to fix for libarchive to fix error reporting in tar
- Loading branch information
Showing
6 changed files
with
57 additions
and
5 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
easybuild/easyconfigs/l/libarchive/libarchive-3.6.0_fix-tar-error-reporting.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
see https://github.com/libarchive/libarchive/pull/2101 | ||
From e200fd8abfb4cf895a1cab4d89b67e6eefe83942 Mon Sep 17 00:00:00 2001 | ||
From: Ed Maste <emaste@FreeBSD.org> | ||
Date: Fri, 29 Mar 2024 16:38:11 -0400 | ||
Subject: [PATCH] tar: make error reporting more robust and use correct errno | ||
|
||
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters