From ed66170e44819b420c20875f885ce252018ac6f8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 15:40:08 +0000 Subject: [PATCH 1/4] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 7d0d042366ab0dcbb158c0e6c24dae6396b7603e Mon Sep 17 00:00:00 2001 From: Sandro Date: Fri, 15 Aug 2025 10:26:53 +0200 Subject: [PATCH 2/4] Amend patch so library will always be found This ensures the librarary is always searched for in `/usr/libexec/7zip` even when `7z` is called using the full path. - Close RHBZ#2373874 --- 7zip-find-so-in-libexec.diff | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/7zip-find-so-in-libexec.diff b/7zip-find-so-in-libexec.diff index 1213bc5..f63e141 100644 --- a/7zip-find-so-in-libexec.diff +++ b/7zip-find-so-in-libexec.diff @@ -1,10 +1,14 @@ +diff --git a/CPP/7zip/UI/Common/ArchiveCommandLine.cpp b/CPP/7zip/UI/Common/ArchiveCommandLine.cpp +index 7fe18fb..4b79e2d 100644 --- a/CPP/7zip/UI/Common/ArchiveCommandLine.cpp +++ b/CPP/7zip/UI/Common/ArchiveCommandLine.cpp -@@ -1751,7 +1751,7 @@ FString GetModuleDirPrefix() +@@ -1780,8 +1780,8 @@ FString GetModuleDirPrefix() + FString s; s = fas2fs(g_ModuleDirPrefix); - if (s.IsEmpty()) +- if (s.IsEmpty()) - s = FTEXT(".") FSTRING_PATH_SEPARATOR; ++ if (s.IsEmpty() || s.IsPrefixedBy("/usr/bin")) + s = FTEXT("/usr/libexec/7zip") FSTRING_PATH_SEPARATOR; return s; /* From a36dfa5ae64c59c7746601986f159caa4630e256 Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Wed, 26 Nov 2025 15:48:28 +0000 Subject: [PATCH 3/4] Update to 25.01 - 25.00+ fixes CVE-2025-11001; Resolves: rhbz#2416011 - Backport Debian patch to disable echo-ing password; Resolves: rhbz#2412315 Signed-off-by: Michel Lind --- .gitignore | 1 + 7z-dont-echo-password.diff | 75 ++++++++++++++++++++++++++++++++++++++ 7zip.spec | 3 +- sources | 2 +- 4 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 7z-dont-echo-password.diff diff --git a/.gitignore b/.gitignore index d94f561..33e4a32 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /7zip-24.09.tar.zst +/7zip-25.01.tar.zst diff --git a/7z-dont-echo-password.diff b/7z-dont-echo-password.diff new file mode 100644 index 0000000..c08f764 --- /dev/null +++ b/7z-dont-echo-password.diff @@ -0,0 +1,75 @@ +From ece9df515b12f9bde2e8150f402db3f394d03db3 Mon Sep 17 00:00:00 2001 +From: Wes <5124946+wesinator@users.noreply.github.com> +Date: Tue, 4 Jun 2024 10:18:45 -0400 +Subject: [PATCH] Disable local echo display with input passwords in linux + +https://salsa.debian.org/debian/7zip/-/commit/7b5e9a72d4579b875906134943fb9590cf165d73 + +close #10 +--- + CPP/7zip/UI/Console/UserInputUtils.cpp | 35 ++++++++++++++++++++++++-- + 1 file changed, 33 insertions(+), 2 deletions(-) + +diff --git a/CPP/7zip/UI/Console/UserInputUtils.cpp b/CPP/7zip/UI/Console/UserInputUtils.cpp +index 2adf9dfed..eb44fa00a 100644 +--- a/CPP/7zip/UI/Console/UserInputUtils.cpp ++++ b/CPP/7zip/UI/Console/UserInputUtils.cpp +@@ -57,9 +57,18 @@ NUserAnswerMode::EEnum ScanUserYesNoAllQuit(CStdOutStream *outStream) + #ifdef _WIN32 + #ifndef UNDER_CE + #define MY_DISABLE_ECHO ++#define MY_DISABLE_ECHO_WIN32 + #endif + #endif + ++#ifdef unix ++#include ++#include ++#include ++#define MY_DISABLE_ECHO ++#define MY_DISABLE_ECHO_UNIX ++#endif ++ + static bool GetPassword(CStdOutStream *outStream, UString &psw) + { + if (outStream) +@@ -72,7 +81,7 @@ static bool GetPassword(CStdOutStream *outStream, UString &psw) + outStream->Flush(); + } + +- #ifdef MY_DISABLE_ECHO ++ #ifdef MY_DISABLE_ECHO_WIN32 + + const HANDLE console = GetStdHandle(STD_INPUT_HANDLE); + +@@ -90,7 +99,29 @@ static bool GetPassword(CStdOutStream *outStream, UString &psw) + const bool res = g_StdIn.ScanUStringUntilNewLine(psw); + if (wasChanged) + SetConsoleMode(console, mode); +- ++ ++ #elif defined(MY_DISABLE_ECHO_UNIX) ++ ++ int ifd = fileno(stdin); ++ bool wasChanged = false; ++ struct termios old_mode = {}; ++ struct termios new_mode = {}; ++ ++ if (tcgetattr(ifd, &old_mode) == 0) { ++ new_mode = old_mode; ++ new_mode.c_lflag &= ~ECHO; ++ ++ wasChanged = true; ++ ++ tcsetattr(ifd, TCSAFLUSH, &new_mode); ++ } ++ ++ bool res = g_StdIn.ScanUStringUntilNewLine(psw); ++ ++ if (wasChanged) { ++ tcsetattr(ifd, TCSAFLUSH, &old_mode); ++ } ++ + #else + + const bool res = g_StdIn.ScanUStringUntilNewLine(psw); diff --git a/7zip.spec b/7zip.spec index f873aeb..59ca9bc 100644 --- a/7zip.spec +++ b/7zip.spec @@ -3,7 +3,7 @@ %global obs_ver 16.03 Name: 7zip -Version: 24.09 +Version: 25.01 Release: %autorelease Summary: A file archiver @@ -22,6 +22,7 @@ URL: https://7-zip.org # Source: https://github.com/ip7z/7zip/archive/%%{version}/%%{name}-%%{version}.tar.gz Source: %{name}-%{version}.tar.zst Source: strip-rar-support.sh +Patch: https://github.com/ip7z/7zip/pull/33.patch#/7z-dont-echo-password.diff # patch where 7z.so is loaded from so we don't need to do shenanigans like having the 7z binary # there and invoking via a wrapper Patch: 7zip-find-so-in-libexec.diff diff --git a/sources b/sources index cf5f764..a341e08 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (7zip-24.09.tar.zst) = 47e8f709209c4333bf2707a4b4953128a84669fce75fed3fc2d4d7b3b29db758481115f1d640d1becab200fcb6a83b84fd5fb448f7ac01ff9d99cc37674a2323 +SHA512 (7zip-25.01.tar.zst) = 3bd5ddddcfb120e83c101a42e41b1e3a37837bb2c117d1563199cb70524b1426e6dfcec761d956c40a931153587ecd3500d2f3a0f917323859ad5da86946013e From 51f2e00a64d96ae7a79610c1173d873b05b7d07d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 16 Jan 2026 02:26:27 +0000 Subject: [PATCH 4/4] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild