From 2cf40b47d9ea2014da1000ab311394bd7785a5d6 Mon Sep 17 00:00:00 2001 From: joborun Date: Mon, 1 Apr 2024 03:29:23 +0300 Subject: [PATCH] upg libarchive --- libarchive/PKGBUILD | 21 +++++++-------- libarchive/PKGBUILD-arch | 13 ++++++--- ...tar-make-error-reporting-more-robust.patch | 27 +++++++++++++++++++ .../src/runit-service-scripts | 1 - 4 files changed, 47 insertions(+), 15 deletions(-) create mode 100644 libarchive/libarchive-tar-make-error-reporting-more-robust.patch delete mode 160000 runit-service-scripts/src/runit-service-scripts diff --git a/libarchive/PKGBUILD b/libarchive/PKGBUILD index 221c6e5..9446409 100644 --- a/libarchive/PKGBUILD +++ b/libarchive/PKGBUILD @@ -7,21 +7,19 @@ pkgname=libarchive pkgver=3.7.2 -pkgrel=01 +pkgrel=02 pkgdesc='Multi-format archive and compression library' url='https://libarchive.org/' depends=('acl' 'libacl.so' 'bzip2' 'expat' 'lz4' 'openssl' 'xz' 'zlib' 'zstd' 'libcrypto.so') provides=('libarchive.so') #options=('debug') -source=("https://github.com/${pkgname}/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.xz"{,.asc}) +source=("https://github.com/${pkgname}/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.xz"{,.asc} + libarchive-tar-make-error-reporting-more-robust.patch::https://github.com/libarchive/libarchive/commit/6110e9c82d8ba830c3440f36b990483ceaaea52c.patch) -#prepare() { -# cd "$pkgname-$pkgver" -# -# patch -Np1 < ../0001-libarchive-Handle-a-calloc-returning-NULL-fixes-1754.patch -# patch -Np1 < ../0002-Validate-entry_bytes_remaining-in-pax_attribute.patch -# patch -Np1 < ../0003-libarchive-Do-not-include-sys-mount.h-when-linux-fs..patch -#} +prepare() { + cd "${pkgname}-${pkgver}" + patch -Np1 < ../libarchive-tar-make-error-reporting-more-robust.patch +} build() { cd $pkgname-$pkgver @@ -57,7 +55,8 @@ validpgpkeys=(A5A45B12AD92D964B89EEE2DEC560C81CEC2276E # Martin Matuska sha256sums=(04357661e6717b6941682cde02ad741ae4819c67a260593dfb2431861b251acb # libarchive-3.7.2.tar.xz - 2c2b98622c2f3e59608118fae3e412c900100ec1bf9f825775930b3a8b4f5635) # libarchive-3.7.2.tar.xz.asc + 2c2b98622c2f3e59608118fae3e412c900100ec1bf9f825775930b3a8b4f5635 # libarchive-3.7.2.tar.xz.asc + b677eae8f6fd1a9c3c2184dfd26a0d2862e0182dd295a376af10d18431299a41) # libarchive-tar-make-error-reporting-more-robust.patch -## d46a5e77ba94d7aef18ccfaffbffb835c00195f205167e1333e931a420f84273 libarchive-3.7.2-01-x86_64.pkg.tar.lz +## bbfc83c45e2e7afdc5739aa3803fa347ff5232e9a91d6aa42e4f7c46a32f0c5f libarchive-3.7.2-02-x86_64.pkg.tar.lz diff --git a/libarchive/PKGBUILD-arch b/libarchive/PKGBUILD-arch index 9aaba7a..3b5095d 100644 --- a/libarchive/PKGBUILD-arch +++ b/libarchive/PKGBUILD-arch @@ -3,7 +3,7 @@ pkgname=libarchive pkgver=3.7.2 -pkgrel=1 +pkgrel=2 pkgdesc='Multi-format archive and compression library' arch=('x86_64') url='https://libarchive.org/' @@ -13,9 +13,16 @@ depends=('acl' 'libacl.so' 'bzip2' 'expat' 'lz4' 'openssl' 'libcrypto.so' 'xz' provides=('libarchive.so') validpgpkeys=('A5A45B12AD92D964B89EEE2DEC560C81CEC2276E' # Martin Matuska 'DB2C7CF1B4C265FAEF56E3FC5848A18B8F14184B') # Martin Matuska -source=("https://github.com/${pkgname}/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.xz"{,.asc}) +source=("https://github.com/${pkgname}/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.xz"{,.asc} + libarchive-tar-make-error-reporting-more-robust.patch::https://github.com/libarchive/libarchive/commit/6110e9c82d8ba830c3440f36b990483ceaaea52c.patch) sha256sums=('04357661e6717b6941682cde02ad741ae4819c67a260593dfb2431861b251acb' - 'SKIP') + 'SKIP' + 'b677eae8f6fd1a9c3c2184dfd26a0d2862e0182dd295a376af10d18431299a41') + +prepare() { + cd "${pkgname}-${pkgver}" + patch -Np1 < ../libarchive-tar-make-error-reporting-more-robust.patch +} build() { cd "${pkgname}-${pkgver}" diff --git a/libarchive/libarchive-tar-make-error-reporting-more-robust.patch b/libarchive/libarchive-tar-make-error-reporting-more-robust.patch new file mode 100644 index 0000000..6a351ba --- /dev/null +++ b/libarchive/libarchive-tar-make-error-reporting-more-robust.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/runit-service-scripts/src/runit-service-scripts b/runit-service-scripts/src/runit-service-scripts deleted file mode 160000 index 8391f86..0000000 --- a/runit-service-scripts/src/runit-service-scripts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8391f860112f09f2ed19750b42899e933d2e8ba3