svn commit: r495197 - in head/archivers/ark: . files
Raphael Kubo da Costa
rakuco at FreeBSD.org
Sat Mar 9 19:23:06 UTC 2019
Author: rakuco
Date: Sat Mar 9 19:23:05 2019
New Revision: 495197
URL: https://svnweb.freebsd.org/changeset/ports/495197
Log:
Backport patch to fix creation of .tar archives when ZTD support is enabled.
As the patch says, when ZSTD support is present creating a regular .tar archive
will end up creating a zstd file instead. In my tests, this prevented
adding/remove entries from the archive at all.
MFH: 2019Q1
Added:
head/archivers/ark/files/patch-git_a3bcf9bec (contents, props changed)
Modified:
head/archivers/ark/Makefile
Modified: head/archivers/ark/Makefile
==============================================================================
--- head/archivers/ark/Makefile Sat Mar 9 19:16:34 2019 (r495196)
+++ head/archivers/ark/Makefile Sat Mar 9 19:23:05 2019 (r495197)
@@ -2,7 +2,7 @@
PORTNAME= ark
DISTVERSION= ${KDE_APPLICATIONS_VERSION}
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= archivers kde kde-applications
MAINTAINER= kde at FreeBSD.org
Added: head/archivers/ark/files/patch-git_a3bcf9bec
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/archivers/ark/files/patch-git_a3bcf9bec Sat Mar 9 19:23:05 2019 (r495197)
@@ -0,0 +1,26 @@
+commit a3bcf9becddd5725725089add15fbae39c79757e
+Author: Elvis Angelaccio <elvis.angelaccio at kde.org>
+Date: Sat Mar 9 13:05:35 2019 +0100
+
+ Fix creation of tar archives
+
+ Usage of QString::compare() breaks the creation of tar archives, because
+ `zst` is "bigger" than `tar` which means ark would use the `zstd` filter
+ even when creating a simple tar archive.
+
+ BUG: 405136
+ FIXED-IN: 19.03.80
+
+diff --git a/plugins/libarchive/readwritelibarchiveplugin.cpp b/plugins/libarchive/readwritelibarchiveplugin.cpp
+index 38f62881..e83d0087 100644
+--- plugins/libarchive/readwritelibarchiveplugin.cpp
++++ plugins/libarchive/readwritelibarchiveplugin.cpp
+@@ -352,7 +352,7 @@ bool ReadWriteLibarchivePlugin::initializeNewFileWriterFilters(const Compression
+ qCDebug(ARK) << "Detected lz4 compression for new file";
+ ret = archive_write_add_filter_lz4(m_archiveWriter.data());
+ #ifdef HAVE_ZSTD_SUPPORT
+- } else if (filename().rightRef(3).compare(QLatin1String("zst"), Qt::CaseInsensitive)) {
++ } else if (filename().right(3).toUpper() == QLatin1String("ZST")) {
+ qCDebug(ARK) << "Detected zstd compression for new file";
+ ret = archive_write_add_filter_zstd(m_archiveWriter.data());
+ #endif
More information about the svn-ports-all
mailing list