From 4d3e26a52298d3b74b605b7dbc7777c27a04f234 Mon Sep 17 00:00:00 2001 From: Aaron Rainbolt Date: Fri, 23 Feb 2024 14:33:35 -0600 Subject: [PATCH] Sync with archive. --- debian/changelog | 6 +++ debian/patches/0001-Support-use-of-7zip.patch | 54 +++++++++++++++++++ debian/patches/series | 1 + debian/rules | 3 +- 4 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 debian/patches/0001-Support-use-of-7zip.patch create mode 100644 debian/patches/series diff --git a/debian/changelog b/debian/changelog index 4bbc4c9..b80b684 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +lxqt-archiver (0.9.0-0ubuntu2) noble; urgency=medium + + * Fix invalid argument use of 7z. (LP: #2052880) + + -- Sudip Mukherjee Sun, 11 Feb 2024 21:59:12 +0000 + lxqt-archiver (0.9.0-0ubuntu1) noble; urgency=medium * New upstream release. diff --git a/debian/patches/0001-Support-use-of-7zip.patch b/debian/patches/0001-Support-use-of-7zip.patch new file mode 100644 index 0000000..95e5146 --- /dev/null +++ b/debian/patches/0001-Support-use-of-7zip.patch @@ -0,0 +1,54 @@ +From ec90b9e40bb1e50faf9f4ce59e58261e888d4f7e Mon Sep 17 00:00:00 2001 +From: Sudip Mukherjee +Date: Sun, 11 Feb 2024 18:47:52 +0000 +Subject: [PATCH] Support use of 7zip + +Debian and Ubuntu are now using 7zip instead of p7zip. With 7zip the +archieve creation fails as it does not support '-l'. +This change will disable '-l' if anyone defines USE_7Z in the build flags. +Other builds who have not defined 'USE_7Z' are not affected. + +Signed-off-by: Sudip Mukherjee + +Origin: upstream, https://github.com/lxqt/lxqt-archiver/commit/ad850a5af053bbd5e6d4c73b0e699f4a76a1f9cb +Bug: https://github.com/lxqt/lxqt-archiver/issues/379 +Bug-Ubuntu: https://launchpad.net/bugs/2052880 +Last-Update: 2024-02-11 +--- + CMakeLists.txt | 4 ++++ + src/core/fr-command-7z.c | 3 +++ + 2 files changed, 7 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0680105..50532d1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,6 +8,10 @@ project(lxqt-archiver) + + option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF) + ++option(USE_7Z "Building with 7z" OFF) ++if(USE_7Z) ++ add_definitions(-DUSE_7Z) ++endif() + + set(GLIB_MINIMUM_VERSION "2.50.0") + set(LIBFMQT_MINIMUM_VERSION "1.4.0") +diff --git a/src/core/fr-command-7z.c b/src/core/fr-command-7z.c +index 504f1e2..887fbcd 100644 +--- a/src/core/fr-command-7z.c ++++ b/src/core/fr-command-7z.c +@@ -345,7 +345,10 @@ fr_command_7z_add (FrCommand *comm, + if (spd_support) fr_process_add_arg (comm->process, "-spd"); + fr_process_add_arg (comm->process, "-bd"); + fr_process_add_arg (comm->process, "-y"); ++#ifndef USE_7Z ++ /* Unlike p7zip, 7zip does not support '-l'. Define USE_7Z to disable '-l'. */ + fr_process_add_arg (comm->process, "-l"); ++#endif + add_password_arg (comm, comm->password, FALSE); + if ((comm->password != NULL) + && (*comm->password != 0) +-- +2.39.2 + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..ef23af4 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +0001-Support-use-of-7zip.patch diff --git a/debian/rules b/debian/rules index 3d9c294..132bc8a 100755 --- a/debian/rules +++ b/debian/rules @@ -13,4 +13,5 @@ override_dh_missing: override_dh_auto_configure: dh_auto_configure -- \ -DUPDATE_TRANSLATIONS=OFF \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DUSE_7Z=ON