summaryrefslogtreecommitdiff
path: root/kde-apps/ark
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-10-15 22:00:32 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-10-15 22:00:32 +0100
commit4fe36de7142d972c061813e413f66ed4bcfc38d0 (patch)
treef95577c134cc26bf3d7223b38b8c76311d57fc12 /kde-apps/ark
parent2e4d96d87e04d8b2164f764dee727cd9057cf88d (diff)
gentoo auto-resync : 15:10:2023 - 22:00:32
Diffstat (limited to 'kde-apps/ark')
-rw-r--r--kde-apps/ark/Manifest5
-rw-r--r--kde-apps/ark/ark-23.08.2-r1.ebuild93
-rw-r--r--kde-apps/ark/files/ark-23.08.2-dont-hardcode-bzip2-mimetype-in-tests.patch44
-rw-r--r--kde-apps/ark/files/ark-23.08.2-explicitly-support-application-vnd-efi-iso-mime.patch36
-rw-r--r--kde-apps/ark/files/ark-23.08.2-fix-checks-using-old-ISO-mimetype.patch36
-rw-r--r--kde-apps/ark/files/ark-23.08.2-fix-support-for-bzip2-format.patch121
6 files changed, 335 insertions, 0 deletions
diff --git a/kde-apps/ark/Manifest b/kde-apps/ark/Manifest
index 27c65379a268..065835d0fd78 100644
--- a/kde-apps/ark/Manifest
+++ b/kde-apps/ark/Manifest
@@ -1,5 +1,10 @@
+AUX ark-23.08.2-dont-hardcode-bzip2-mimetype-in-tests.patch 2896 BLAKE2B 433280d31823c7947ef2bb3d3b4c30625c06fffaaff60f67a4254238d06c3b44a66cc410a2cef643e34d6c143f7a057065594d00fc4179539c096c14f85ebb1e SHA512 83795037f0f92815db2ebe21ea66e62b6dcd618f90159b680f6f33d89915e79a82dd531d566adfc0e70b5ac6de7fa74ed418ee1ac6bb0a1a892c0a8c4c3db138
+AUX ark-23.08.2-explicitly-support-application-vnd-efi-iso-mime.patch 1984 BLAKE2B 58af35554629fdfaf723b14ba43c5ee6b2429db5ae58607472f2dca3856e59b10d7b2cf386d9ce1dbfc187139eb1f1a7e553230863bf99c8a39cc5c22e4d255a SHA512 9c7e543f4730c48f647a8101943d740b8e0bb2af470518e412e50b2eedd20f4b04d14d2c831ebb0e4a11cd509dc8ed1e88ffd653b99350356370356c4836fcaf
+AUX ark-23.08.2-fix-checks-using-old-ISO-mimetype.patch 2134 BLAKE2B 9d8436a3f98a9a53a3e67d47b4d4e39b126d07b79f6dc605783cebee628a0a1510fad1269e821a49470cb9b511bbe0bd07b678fb0d918f21e00d25e61f97bfd9 SHA512 762746d585cfbe3958cc7bfae7b63d00ae04142a6f5c1e827e1a569c72ce63f87dc068d9cb3ec8debd6ea7a7c6513b91315cbb8c47b53e174695970faba1e9d4
+AUX ark-23.08.2-fix-support-for-bzip2-format.patch 6855 BLAKE2B 3567ca66266fa129ff2b143392d4cb599519eb04160905841e31c2bdc878f3b13729537a7a26b568d686b770be07eb9974f9e511701107cb2a3486958491f750 SHA512 3225f03594b6b3f55700840b48c80520b65156c3109ce6f1711f748d952ff4ebe570b6c500f21182f6196d3c527a3986b4c9ed555756ce99e627f41f0323dac5
DIST ark-23.04.3.tar.xz 3010636 BLAKE2B 93600fb21940839bafd25aabfb1ff346088b0bef7c49e1d73cc6b3e17d073dfca924caa747d2c0f3c70ccd63569aebc3d8a6d137c7503c9a17a1af1ab833b4b9 SHA512 6ca740fef459232cf7ff19d76b2ddcb080b8c9b34a0c718dae0875253417a6f3f8f9c4a7bd2bc5002ae06bb41eef7f958a40f0d54896680e82879ef0f1cbed10
DIST ark-23.08.2.tar.xz 3017536 BLAKE2B 0f9cd45103aa43398d62e66dfbb85214f7c7792c1dae502dae8f9f92900a6f91d0b3573258c84ec8ebfec39d7a81f3404b3c617cfc0dc026d8c0f9d41cd782aa SHA512 5dae45c587129b8c72a3334103a36f4c822aadbece463df704b84ff57cd9cc8dd49e1e7ac20193b4b2c8537b134081110dee66b6791c1efd5365c80587dec288
EBUILD ark-23.04.3.ebuild 2223 BLAKE2B 3797f1f46413e76a87dec15865a9476695027ec7bdc92eb5f970e9bff868513e1a995604ec4548b481cf76ba27e158428786d9a6e566b688dc19cddcba164707 SHA512 ff19c86b0b7d26a0d4f6789ba8cb4b057b8fcc26b427f77f8046649a9b6483d3a6284c43eccc104e3497a63e1483c915721785151add91a5132b8c2aef165712
+EBUILD ark-23.08.2-r1.ebuild 2673 BLAKE2B 954ec46fcc71d6e08341546190351cb269a6efbb13cade312b6a59130c6a882dce9d0c0b1421fa0c8ea7a50d2ef518b146cc41d3681969ecb731b8306773feb3 SHA512 5e036c8ad09059332dae7ae0b6317a101aa7c30ed72a73b7a21a357eb7eebb6bf32a6f8312abc303d0bb5101224c8f386184d1594c7ed4843a8990bde6085dbe
EBUILD ark-23.08.2.ebuild 2228 BLAKE2B 9bdcd879570318f57ba5004fd3ce68a2e5622917aac90df704811108d458f06306764ee68f07a06f6a0b6c255ee188c5c3469ff07ce862a18edf41a54cc66039 SHA512 250d0d92cf1fabe80941ccca6967e5461ac0771cc99e69e5daaf50e7d65295cb674178ceb9043eca9dda54a9131fad4a454163573cbbac3c5db6d4bcfb6e7543
MISC metadata.xml 468 BLAKE2B f4b2d609976bfc8a7bb4004286273c2384c7a5f9c45d6de44936d9f21dd4428d968c54cfb4d8cfe81e56bb935ed36c481b4c79a0e0a0b946b7e8ce78f794a123 SHA512 415c92c65d6d56b801c71db9153684635c8eeb0d571f1782127d8e7ab06a2b360cc016bc8ac110b7b9fcb53c587a177a5a7f69198b65fd152767a107aac1cd89
diff --git a/kde-apps/ark/ark-23.08.2-r1.ebuild b/kde-apps/ark/ark-23.08.2-r1.ebuild
new file mode 100644
index 000000000000..d4ee2c6a5a57
--- /dev/null
+++ b/kde-apps/ark/ark-23.08.2-r1.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_HANDBOOK="forceoptional"
+ECM_TEST="optional"
+KFMIN=5.106.0
+QTMIN=5.15.9
+inherit ecm gear.kde.org optfeature
+
+DESCRIPTION="File archiver by KDE"
+HOMEPAGE="https://apps.kde.org/ark/"
+
+LICENSE="GPL-2" # TODO: CHECK
+SLOT="5"
+KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="zip"
+
+RDEPEND="
+ >=app-arch/libarchive-3.5.3:=[bzip2,lzma]
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=kde-frameworks/kcompletion-${KFMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kcrash-${KFMIN}:5
+ >=kde-frameworks/kdbusaddons-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kio-${KFMIN}:5
+ >=kde-frameworks/kjobwidgets-${KFMIN}:5
+ >=kde-frameworks/kparts-${KFMIN}:5
+ >=kde-frameworks/kpty-${KFMIN}:5
+ >=kde-frameworks/kservice-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5
+ >=kde-frameworks/kxmlgui-${KFMIN}:5
+ sys-libs/zlib
+ zip? ( >=dev-libs/libzip-1.6.0:= )
+"
+DEPEND="${RDEPEND}
+ >=dev-qt/qtconcurrent-${QTMIN}:5
+ >=kde-frameworks/kiconthemes-${KFMIN}:5
+ test? ( >=dev-libs/libzip-1.6.0:= )
+"
+# app-arch/rar is binary only
+BDEPEND="
+ sys-devel/gettext
+ elibc_glibc? ( test? ( amd64? ( app-arch/rar ) x86? ( app-arch/rar ) ) )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-23.08.2-explicitly-support-application-vnd-efi-iso-mime.patch
+ "${FILESDIR}"/${PN}-23.08.2-fix-support-for-bzip2-format.patch
+ "${FILESDIR}"/${PN}-23.08.2-dont-hardcode-bzip2-mimetype-in-tests.patch
+ "${FILESDIR}"/${PN}-23.08.2-fix-checks-using-old-ISO-mimetype.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake_use_find_package zip LibZip)
+ )
+
+ ecm_src_configure
+}
+
+src_test() {
+ local CMAKE_SKIP_TESTS=(
+ # bug 822177: kerfuffle-addtoarchivetest: may segfault or hang indefinitely
+ kerfuffle-addtoarchivetest
+ # bug 827840: plugins-clirartest: continuously broken with translations installed
+ plugins-clirartest
+
+ # kerfuffle-extracttest, kerfuffle-mimetypetest: broken with x11-misc/shared-mime-info-2.3
+ kerfuffle-extracttest
+ kerfuffle-mimetypetest
+ )
+
+ ecm_src_test
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ optfeature "rar archive creation/extraction" "app-arch/rar"
+ optfeature "rar archive extraction only" "app-arch/unar" "app-arch/unrar"
+ optfeature "7-Zip archive support" "app-arch/p7zip"
+ optfeature "lrz archive support" "app-arch/lrzip"
+ optfeature "Markdown support in text previews" "kde-misc/markdownpart:${SLOT}"
+ fi
+ ecm_pkg_postinst
+}
diff --git a/kde-apps/ark/files/ark-23.08.2-dont-hardcode-bzip2-mimetype-in-tests.patch b/kde-apps/ark/files/ark-23.08.2-dont-hardcode-bzip2-mimetype-in-tests.patch
new file mode 100644
index 000000000000..fad87b4114ef
--- /dev/null
+++ b/kde-apps/ark/files/ark-23.08.2-dont-hardcode-bzip2-mimetype-in-tests.patch
@@ -0,0 +1,44 @@
+https://invent.kde.org/utilities/ark/-/commit/785640b090b51e0067dbfc6c7944a478429204a2
+
+From 785640b090b51e0067dbfc6c7944a478429204a2 Mon Sep 17 00:00:00 2001
+From: Elvis Angelaccio <elvis.angelaccio@kde.org>
+Date: Sat, 14 Oct 2023 17:34:10 +0200
+Subject: [PATCH] Don't hardcode bzip2 mimetype in tests
+
+Just take the name from QMimeDatabase, since it changes depending on
+whether we are using a shared-mime-info >= 2.3
+--- a/autotests/kerfuffle/adddialogtest.cpp
++++ b/autotests/kerfuffle/adddialogtest.cpp
+@@ -37,7 +37,7 @@ void AddDialogTest::testBasicWidgets_data()
+
+ QTest::newRow("tar") << QStringLiteral("application/x-tar") << false << -1 << -1;
+ QTest::newRow("targzip") << QStringLiteral("application/x-compressed-tar") << true << 3 << 7;
+- QTest::newRow("tarbzip") << QStringLiteral("application/x-bzip-compressed-tar") << true << 3 << 7;
++ QTest::newRow("tarbzip") << QMimeDatabase().mimeTypeForFile(QStringLiteral("dummy.tar.bz2"), QMimeDatabase::MatchExtension).name() << true << 3 << 7;
+ QTest::newRow("tarZ") << QStringLiteral("application/x-tarz") << false << -1 << -1;
+ QTest::newRow("tarxz") << QStringLiteral("application/x-xz-compressed-tar") << true << 3 << 7;
+ QTest::newRow("tarlzma") << QStringLiteral("application/x-lzma-compressed-tar") << true << 3 << 7;
+--- a/autotests/kerfuffle/createdialogtest.cpp
++++ b/autotests/kerfuffle/createdialogtest.cpp
+@@ -38,7 +38,7 @@ void CreateDialogTest::testBasicWidgets_data()
+
+ QTest::newRow("tar") << QStringLiteral("application/x-tar");
+ QTest::newRow("targzip") << QStringLiteral("application/x-compressed-tar");
+- QTest::newRow("tarbzip") << QStringLiteral("application/x-bzip-compressed-tar");
++ QTest::newRow("tarbzip") << QMimeDatabase().mimeTypeForFile(QStringLiteral("dummy.tar.bz2"), QMimeDatabase::MatchExtension).name();
+ QTest::newRow("tarZ") << QStringLiteral("application/x-tarz");
+ QTest::newRow("tarxz") << QStringLiteral("application/x-xz-compressed-tar");
+ QTest::newRow("tarlzma") << QStringLiteral("application/x-lzma-compressed-tar");
+--- a/autotests/kerfuffle/mimetypetest.cpp
++++ b/autotests/kerfuffle/mimetypetest.cpp
+@@ -30,7 +30,7 @@ void MimeTypeTest::testMimeTypeDetection_data()
+ QTest::addColumn<QString>("expectedMimeType");
+
+ const QString compressedGzipTarMime = QStringLiteral("application/x-compressed-tar");
+- const QString compressedBzip2TarMime = QStringLiteral("application/x-bzip-compressed-tar");
++ const QString compressedBzip2TarMime = QMimeDatabase().mimeTypeForFile(QStringLiteral("dummy.tar.bz2"), QMimeDatabase::MatchExtension).name();
+ const QString compressedXzTarMime = QStringLiteral("application/x-xz-compressed-tar");
+ const QString compressedLzmaTarMime = QStringLiteral("application/x-lzma-compressed-tar");
+ const QString compressedZTarMime = QStringLiteral("application/x-tarz");
+--
+GitLab
diff --git a/kde-apps/ark/files/ark-23.08.2-explicitly-support-application-vnd-efi-iso-mime.patch b/kde-apps/ark/files/ark-23.08.2-explicitly-support-application-vnd-efi-iso-mime.patch
new file mode 100644
index 000000000000..21181a51dbd8
--- /dev/null
+++ b/kde-apps/ark/files/ark-23.08.2-explicitly-support-application-vnd-efi-iso-mime.patch
@@ -0,0 +1,36 @@
+https://invent.kde.org/utilities/ark/-/commit/62d94c62f2fd2052be91dfe565e35a6d43c7d381
+
+From 62d94c62f2fd2052be91dfe565e35a6d43c7d381 Mon Sep 17 00:00:00 2001
+From: Elvis Angelaccio <elvis.angelaccio@kde.org>
+Date: Sat, 14 Oct 2023 15:21:53 +0200
+Subject: [PATCH] Explicitly support new application/vnd.efi.iso mimetype
+
+It has been introduced by the new shared-mime-info 2.3 release. The old
+application/x-cd-image is kept as alias (so ark could still open ISO
+files just fine), but it broke our mimetype unit test.
+
+While at it, we explicitly add the new entry to the list of supported
+mimetypes.
+--- a/autotests/kerfuffle/mimetypetest.cpp
++++ b/autotests/kerfuffle/mimetypetest.cpp
+@@ -38,7 +38,7 @@ void MimeTypeTest::testMimeTypeDetection_data()
+ const QString compressedLzopTarMime = QStringLiteral("application/x-tzo");
+ const QString compressedLrzipTarMime = QStringLiteral("application/x-lrzip-compressed-tar");
+ const QString compressedLz4TarMime = QStringLiteral("application/x-lz4-compressed-tar");
+- const QString isoMimeType = QStringLiteral("application/x-cd-image");
++ const QString isoMimeType = QMimeDatabase().mimeTypeForFile(QStringLiteral("dummy.iso"), QMimeDatabase::MatchExtension).name();
+ const QString debMimeType = QMimeDatabase().mimeTypeForFile(QStringLiteral("dummy.deb"), QMimeDatabase::MatchExtension).name();
+ const QString xarMimeType = QStringLiteral("application/x-xar");
+ const QString appImageMimeType = QStringLiteral("application/x-iso9660-appimage");
+--- a/plugins/libarchive/kerfuffle_libarchive_readonly.json.cmake
++++ b/plugins/libarchive/kerfuffle_libarchive_readonly.json.cmake
+@@ -71,6 +71,7 @@
+ "application/x-lzop",
+ "application/x-source-rpm",
+ "application/vnd.debian.binary-package",
++ "application/vnd.efi.iso",
+ "application/vnd.ms-cab-compressed",
+ "application/x-xar",
+ "application/x-iso9660-appimage",
+--
+GitLab
diff --git a/kde-apps/ark/files/ark-23.08.2-fix-checks-using-old-ISO-mimetype.patch b/kde-apps/ark/files/ark-23.08.2-fix-checks-using-old-ISO-mimetype.patch
new file mode 100644
index 000000000000..134eb2f8a6a3
--- /dev/null
+++ b/kde-apps/ark/files/ark-23.08.2-fix-checks-using-old-ISO-mimetype.patch
@@ -0,0 +1,36 @@
+https://invent.kde.org/utilities/ark/-/commit/dac14f552fb147bf4c9f759611cdb3b544a500b9
+
+From dac14f552fb147bf4c9f759611cdb3b544a500b9 Mon Sep 17 00:00:00 2001
+From: Elvis Angelaccio <elvis.angelaccio@kde.org>
+Date: Sat, 14 Oct 2023 18:58:22 +0200
+Subject: [PATCH] Fix checks using old ISO mimetype
+
+The inherits() method doesn't work with mimetype aliases, and since shared-mime-info 2.3
+application/x-cd-image is an alias of application/vnd.efi.img
+--- a/kerfuffle/mimetypes.cpp
++++ b/kerfuffle/mimetypes.cpp
+@@ -104,7 +104,8 @@ QMimeType determineMimeType(const QString& filename, MimePreference mp)
+ }
+
+ // #354344: ISO files are currently wrongly detected-by-content.
+- if (mimeFromExtension.inherits(QStringLiteral("application/x-cd-image"))) {
++ // TODO: drop application/x-cd-image once all distributions ship shared-mime-info >= 2.3
++ if (mimeFromExtension.inherits(QStringLiteral("application/vnd.efi.img")) || mimeFromExtension.inherits(QStringLiteral("application/x-cd-image"))) {
+ return mimeFromExtension;
+ }
+
+--- a/part/part.cpp
++++ b/part/part.cpp
+@@ -926,7 +926,9 @@ void Part::slotCompleted()
+ qCWarning(ARK) << "No entry listed by the plugin";
+ displayMsgWidget(KMessageWidget::Warning, xi18nc("@info", "The archive is empty or Ark could not open its content."));
+ } else if (m_model->rowCount() == 1 &&
+- m_model->archive()->mimeType().inherits(QStringLiteral("application/x-cd-image")) &&
++ // TODO: drop application/x-cd-image once all distributions ship shared-mime-info >= 2.3
++ (m_model->archive()->mimeType().inherits(QStringLiteral("application/x-cd-image")) ||
++ m_model->archive()->mimeType().inherits(QStringLiteral("application/vnd.efi.img"))) &&
+ m_model->entryForIndex(m_model->index(0, 0))->fullPath() == QLatin1String("README.TXT")) {
+ qCWarning(ARK) << "Detected ISO image with UDF filesystem";
+ displayMsgWidget(KMessageWidget::Warning, xi18nc("@info", "Ark does not currently support ISO files with UDF filesystem."));
+--
+GitLab
diff --git a/kde-apps/ark/files/ark-23.08.2-fix-support-for-bzip2-format.patch b/kde-apps/ark/files/ark-23.08.2-fix-support-for-bzip2-format.patch
new file mode 100644
index 000000000000..6909f2eee3ca
--- /dev/null
+++ b/kde-apps/ark/files/ark-23.08.2-fix-support-for-bzip2-format.patch
@@ -0,0 +1,121 @@
+https://invent.kde.org/utilities/ark/-/commit/9bcbcb056c43abef88540c54f25bc6c1a78c7c0e
+
+From 9bcbcb056c43abef88540c54f25bc6c1a78c7c0e Mon Sep 17 00:00:00 2001
+From: Elvis Angelaccio <elvis.angelaccio@kde.org>
+Date: Sat, 14 Oct 2023 17:07:16 +0200
+Subject: [PATCH] Fix support for bzip2 format with shared-mime-info 2.3
+
+shared-mime-info 2.3 explicitly separated the mimetypes for bzip2 archives
+from the mimetypes for the (old and deprecated) bzip archives.
+
+libarchive doesn't support the old bzip format, however we can't just
+drop it from ark since we still need it on systems that use an old
+shared-mime-info package.
+
+So for now we drop it only when we are sure that we are using a
+shared-mime-info >= 2.3
+--- a/kerfuffle/mimetypes.cpp
++++ b/kerfuffle/mimetypes.cpp
+@@ -76,6 +76,8 @@ QMimeType determineMimeType(const QString& filename, MimePreference mp)
+ mimeFromContent == db.mimeTypeForName(QStringLiteral("application/gzip"))) ||
+ (mimeFromExtension.inherits(QStringLiteral("application/x-bzip-compressed-tar")) &&
+ mimeFromContent == db.mimeTypeForName(QStringLiteral("application/x-bzip"))) ||
++ (mimeFromExtension.inherits(QStringLiteral("application/x-bzip2-compressed-tar")) &&
++ mimeFromContent == db.mimeTypeForName(QStringLiteral("application/x-bzip2"))) ||
+ (mimeFromExtension.inherits(QStringLiteral("application/x-xz-compressed-tar")) &&
+ mimeFromContent == db.mimeTypeForName(QStringLiteral("application/x-xz"))) ||
+ (mimeFromExtension.inherits(QStringLiteral("application/x-tarz")) &&
+--- a/kerfuffle/pluginmanager.cpp
++++ b/kerfuffle/pluginmanager.cpp
+@@ -165,6 +165,18 @@ QStringList PluginManager::supportedWriteMimeTypes(MimeSortingMode mode) const
+ supported.remove(QStringLiteral("application/x-tzo"));
+ }
+
++ // shared-mime-info 2.3 explicitly separated application/x-bzip2-compressed-tar from application/x-bzip-compressed-tar
++ // since bzip2 is not compatible with the old (and deprecated) bzip format.
++ // See https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/239
++ // With shared-mime-info 2.3 (or newer) we can't have both mimetypes at the same time, since libarchive does not support
++ // the old deprecated bzip format. Also we can't know which version of shared-mime-info the system is actually using.
++ // For these reasons, just take the mimetype from QMimeDatabase to keep the compatibility with any shared-mime-info version.
++ if (supported.contains(QLatin1String("application/x-bzip-compressed-tar")) && supported.contains(QLatin1String("application/x-bzip2-compressed-tar"))) {
++ supported.remove(QLatin1String("application/x-bzip-compressed-tar"));
++ supported.remove(QLatin1String("application/x-bzip2-compressed-tar"));
++ supported.insert(QMimeDatabase().mimeTypeForFile(QStringLiteral("dummy.tar.bz2"), QMimeDatabase::MatchExtension).name());
++ }
++
+ if (mode == SortByComment) {
+ return sortByComment(supported);
+ }
+--- a/plugins/libarchive/CMakeLists.txt
++++ b/plugins/libarchive/CMakeLists.txt
+@@ -4,7 +4,7 @@ include_directories(${LibArchive_INCLUDE_DIRS})
+
+ # NOTE: These are the mimetypes for "single-file" archives. They must be defined in the JSON metadata together with the "normal" mimetypes.
+ # However they need to be duplicated here because we need to pass them as C++ define to the plugin (see LIBARCHIVE_RAW_MIMETYPES define below).
+-set(SUPPORTED_LIBARCHIVE_RAW_MIMETYPES "application/x-compress;application/gzip;application/x-bzip;application/zlib;application/zstd;application/x-lzma;application/x-xz;application/x-lz4;application/x-lzip;application/x-lrzip;application/x-lzop;")
++set(SUPPORTED_LIBARCHIVE_RAW_MIMETYPES "application/x-compress;application/gzip;application/x-bzip;application/x-bzip2;application/zlib;application/zstd;application/x-lzma;application/x-xz;application/x-lz4;application/x-lzip;application/x-lrzip;application/x-lzop;")
+
+ set(INSTALLED_LIBARCHIVE_PLUGINS "")
+
+--- a/plugins/libarchive/kerfuffle_libarchive.json.cmake
++++ b/plugins/libarchive/kerfuffle_libarchive.json.cmake
+@@ -53,6 +53,7 @@
+ "application/x-tar",
+ "application/x-compressed-tar",
+ "application/x-bzip-compressed-tar",
++ "application/x-bzip2-compressed-tar",
+ "application/x-tarz",
+ "application/x-xz-compressed-tar",
+ "application/x-lzma-compressed-tar",
+@@ -119,6 +120,11 @@
+ "CompressionLevelMax": 9,
+ "CompressionLevelMin": 1
+ },
++ "application/x-bzip2-compressed-tar": {
++ "CompressionLevelDefault": 9,
++ "CompressionLevelMax": 9,
++ "CompressionLevelMin": 1
++ },
+ "application/x-compressed-tar": {
+ "CompressionLevelDefault": 6,
+ "CompressionLevelMax": 9,
+--- a/plugins/libarchive/kerfuffle_libarchive_readonly.json.cmake
++++ b/plugins/libarchive/kerfuffle_libarchive_readonly.json.cmake
+@@ -61,6 +61,7 @@
+ "application/x-compress",
+ "application/gzip",
+ "application/x-bzip",
++ "application/x-bzip2",
+ "application/x-lzma",
+ "application/x-xz",
+ "application/zlib",
+--- a/plugins/libarchive/libarchiveplugin.cpp
++++ b/plugins/libarchive/libarchiveplugin.cpp
+@@ -13,6 +13,7 @@
+
+ #include <KLocalizedString>
+
++#include <QMimeDatabase>
+ #include <QThread>
+ #include <QFileInfo>
+ #include <QDir>
+@@ -34,6 +35,17 @@ LibarchivePlugin::LibarchivePlugin(QObject *parent, const QVariantList &args)
+
+ #ifdef LIBARCHIVE_RAW_MIMETYPES
+ m_rawMimetypes = QStringLiteral(LIBARCHIVE_RAW_MIMETYPES).split(QLatin1Char(':'), Qt::SkipEmptyParts);
++ // shared-mime-info 2.3 explicitly separated application/x-bzip2 from application/x-bzip
++ // since bzip2 is not compatible with the old (and deprecated) bzip format.
++ // See https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/239
++ // With shared-mime-info 2.3 (or newer) we can't have both mimetypes at the same time, since libarchive does not support
++ // the old deprecated bzip format. Also we can't know which version of shared-mime-info the system is actually using.
++ // For these reasons, just take the mimetype from QMimeDatabase to keep the compatibility with any shared-mime-info version.
++ if (m_rawMimetypes.contains(QLatin1String("application/x-bzip")) && m_rawMimetypes.contains(QLatin1String("application/x-bzip2"))) {
++ m_rawMimetypes.removeAll(QLatin1String("application/x-bzip"));
++ m_rawMimetypes.removeAll(QLatin1String("application/x-bzip2"));
++ m_rawMimetypes.append(QMimeDatabase().mimeTypeForFile(QStringLiteral("dummy.bz2"), QMimeDatabase::MatchExtension).name());
++ }
+ qCDebug(ARK) << "# available raw mimetypes:" << m_rawMimetypes.count();
+ #endif
+ }
+--
+GitLab