From 1ed50a6031af1861b65e7b5fa9cf54d05c835758 Mon Sep 17 00:00:00 2001 From: oreo639 Date: Fri, 29 Dec 2023 07:23:29 -0800 Subject: [PATCH] file-roller: fix for inconsistencies between p7zip and 7zip --- .../patches/fix-symlink-handling-7zip.patch | 24 +++++++++++++++++++ srcpkgs/file-roller/template | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/file-roller/patches/fix-symlink-handling-7zip.patch diff --git a/srcpkgs/file-roller/patches/fix-symlink-handling-7zip.patch b/srcpkgs/file-roller/patches/fix-symlink-handling-7zip.patch new file mode 100644 index 0000000000000..74f2b1b660aed --- /dev/null +++ b/srcpkgs/file-roller/patches/fix-symlink-handling-7zip.patch @@ -0,0 +1,24 @@ +Based on: https://gitlab.gnome.org/GNOME/file-roller/-/issues/148#note_1382009 + +file-roller assumes p7zip and assumes that 'follow_links' is disabled by default. +This is true in p7zip but not 7zip. 7zip does not have a -l flag, and instead provides, +the -snl and -snh flags for disabling 'follow_links'. + +This fixes compressing 7z files with 'follow_links' enabled and compressing files with +broken symlinks with 'follow_links' disabled. +--- a/src/fr-command-7z.c.orig ++++ b/src/fr-command-7z.c +@@ -325,8 +325,11 @@ fr_command_7z_add (FrCommand *command, + fr_process_add_arg (command->process, "-bd"); + fr_process_add_arg (command->process, "-bb1"); + fr_process_add_arg (command->process, "-y"); +- if (follow_links) +- fr_process_add_arg (command->process, "-l"); ++ if (! follow_links) ++ { ++ fr_process_add_arg (command->process, "-snh"); ++ fr_process_add_arg (command->process, "-snl"); ++ } + add_password_arg (command, archive->password, FALSE); + if ((archive->password != NULL) + && (*archive->password != 0) diff --git a/srcpkgs/file-roller/template b/srcpkgs/file-roller/template index 826a05a773a0a..75430bcb40702 100644 --- a/srcpkgs/file-roller/template +++ b/srcpkgs/file-roller/template @@ -1,7 +1,7 @@ # Template file for 'file-roller' pkgname=file-roller version=43.0 -revision=1 +revision=2 build_style=meson hostmakedepends="gettext glib-devel itstool pkg-config desktop-file-utils gtk-update-icon-cache"