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() {

Reply via email to