Compare commits

...

No commits in common. 'epel9' and 'i9e' have entirely different histories.
epel9 ... i9e

7
.gitignore vendored

@ -1,6 +1 @@
/p7zip_9.13_src_all-norar.tar.bz2 SOURCES/p7zip_16.02_src_all-norar.tar.bz2
/p7zip_9.20.1_src_all-norar.tar.bz2
/p7zip_15.09_src_all-norar.tar.bz2
/p7zip_15.14_src_all-norar.tar.bz2
/p7zip_15.14.1_src_all-norar.tar.bz2
/p7zip_16.02_src_all-norar.tar.bz2

@ -0,0 +1 @@
49e714dd6b309b0a21664dbe841aa827c8cadf6d SOURCES/p7zip_16.02_src_all-norar.tar.bz2

@ -0,0 +1,104 @@
From 0bb3986583a1daff2466c318473191d6cbd63adb Mon Sep 17 00:00:00 2001
From: Sergey Cherevko <s.cherevko@msvsphere-os.ru>
Date: Fri, 19 Jan 2024 16:35:06 +0300
Subject: [PATCH] Using libnatspec to correctly decode non-ASCII filenames
zipped on Windows.
---
CPP/7zip/Archive/Zip/ZipItem.cpp | 44 +++++++-------------------------
makefile.linux_amd64_asm | 2 +-
makefile.machine | 2 +-
3 files changed, 11 insertions(+), 37 deletions(-)
diff --git a/CPP/7zip/Archive/Zip/ZipItem.cpp b/CPP/7zip/Archive/Zip/ZipItem.cpp
index 12bc8ad..16a4dbe 100644
--- a/CPP/7zip/Archive/Zip/ZipItem.cpp
+++ b/CPP/7zip/Archive/Zip/ZipItem.cpp
@@ -1,5 +1,5 @@
// Archive/ZipItem.cpp
-
+#include <natspec.h>
#include "StdAfx.h"
#include "../../../../C/CpuArch.h"
@@ -208,43 +208,17 @@ void CItem::GetUnicodeString(UString &res, const AString &s, bool isComment, boo
bool isUtf8 = IsUtf8();
bool ignore_Utf8_Errors = true;
- if (!isUtf8)
- {
- {
- const unsigned id = isComment ?
- NFileHeader::NExtraID::kIzUnicodeComment:
- NFileHeader::NExtraID::kIzUnicodeName;
- const CObjectVector<CExtraSubBlock> &subBlocks = GetMainExtra().SubBlocks;
-
- FOR_VECTOR (i, subBlocks)
- {
- const CExtraSubBlock &sb = subBlocks[i];
- if (sb.ID == id)
- {
- AString utf;
- if (sb.ExtractIzUnicode(CrcCalc(s, s.Len()), utf))
- if (ConvertUTF8ToUnicode(utf, res))
- return;
- break;
- }
- }
- }
-
- if (useSpecifiedCodePage)
- isUtf8 = (codePage == CP_UTF8);
- #ifdef _WIN32
- else if (GetHostOS() == NFileHeader::NHostOS::kUnix)
- {
- /* Some ZIP archives in Unix use UTF-8 encoding without Utf8 flag in header.
- We try to get name as UTF-8.
- Do we need to do it in POSIX version also? */
- isUtf8 = true;
- ignore_Utf8_Errors = false;
- }
- #endif
+ if (!isUtf8) {
+ const char *oem_charset = natspec_get_charset_by_locale(NATSPEC_DOSCS, "");
+ char *p = natspec_convert(s.Ptr(), NULL, oem_charset, 0);
+ AString utf = p;
+ free(p);
+ if (ConvertUTF8ToUnicode(utf, res))
+ return;
}
+
if (isUtf8)
if (ConvertUTF8ToUnicode(s, res) || ignore_Utf8_Errors)
return;
diff --git a/makefile.linux_amd64_asm b/makefile.linux_amd64_asm
index 075c6a8..3de8ccf 100644
--- a/makefile.linux_amd64_asm
+++ b/makefile.linux_amd64_asm
@@ -19,7 +19,7 @@ ASM=yasm -f elf -m amd64 -Dx64
PRE_COMPILED_HEADER=StdAfx.h.gch
-LOCAL_LIBS=-lpthread
+LOCAL_LIBS=-lpthread -lnatspec
LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl
CPU=x64
diff --git a/makefile.machine b/makefile.machine
index 9e34c34..054edde 100644
--- a/makefile.machine
+++ b/makefile.machine
@@ -15,7 +15,7 @@ CC=gcc
CC_SHARED=-fPIC
LINK_SHARED=-fPIC -shared
-LOCAL_LIBS=-lpthread
+LOCAL_LIBS=-lpthread -lnatspec
LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl
OBJ_CRC32=$(OBJ_CRC32_C)
--
2.39.3

@ -7,10 +7,9 @@
Summary: Very high compression ratio file archiver Summary: Very high compression ratio file archiver
Name: p7zip Name: p7zip
Version: 16.02 Version: 16.02
Release: 31%{?dist} Release: 21%{?dist}.inferit
# Files under C/Compress/Lzma/ are dual LGPL or CPL # Files under C/Compress/Lzma/ are dual LGPL or CPL
# Automatically converted from old format: LGPLv2 and (LGPLv2+ or CPL) - review is highly recommended. License: LGPLv2 and (LGPLv2+ or CPL)
License: LicenseRef-Callaway-LGPLv2 AND (LicenseRef-Callaway-LGPLv2+ OR CPL-1.0)
URL: http://p7zip.sourceforge.net/ URL: http://p7zip.sourceforge.net/
# RAR sources removed since their license is incompatible with the LGPL # RAR sources removed since their license is incompatible with the LGPL
#Source: http://downloads.sf.net/p7zip/p7zip_%%{version}_src_all.tar.bz2 #Source: http://downloads.sf.net/p7zip/p7zip_%%{version}_src_all.tar.bz2
@ -32,17 +31,21 @@ Patch11: 14-Fix-g++-warning.patch
Patch12: gcc10-conversion.patch Patch12: gcc10-conversion.patch
Patch13: 0001-fix-data-null-pointer.patch Patch13: 0001-fix-data-null-pointer.patch
Patch14: 0001-fix-out-of-mem.patch Patch14: 0001-fix-out-of-mem.patch
#MSVSphere
# Issue with hiding the password from the process history Patch100: 0001-Using-libnatspec-to-correctly-decode-non-ASCII.patch
# reported to upstream https://sourceforge.net/p/p7zip/patches/38/
Patch15: p7zip-015-hide-passwd.patch
BuildRequires: make BuildRequires: make
BuildRequires: gcc
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: cmake BuildRequires: cmake
BuildRequires: libnatspec-devel
%if %{with gui} %if %{with gui}
# for 7zG GUI # for 7zG GUI
%if 0%{?rhel} && 0%{?rhel} <= 7
BuildRequires: wxGTK-devel BuildRequires: wxGTK-devel
%else
BuildRequires: wxGTK3-devel
%endif
BuildRequires: kde-filesystem BuildRequires: kde-filesystem
%endif %endif
%ifarch %{ix86} %ifarch %{ix86}
@ -128,10 +131,10 @@ mv %{buildroot}%{_docdir}/p7zip/DOC/* %{buildroot}%{_docdir}/p7zip
rmdir %{buildroot}%{_docdir}/p7zip/DOC/ rmdir %{buildroot}%{_docdir}/p7zip/DOC/
%if %{with gui} %if %{with gui}
mkdir -p %{buildroot}%{_datadir}/kservices5/ mkdir -p %{buildroot}%{_kde4_datadir}/kde4/services/ServiceMenus/
# remove a duplicated of p7zip_compress.desktop # remove a duplicated of p7zip_compress.desktop
rm GUI/kde4/p7zip_compress2.desktop rm GUI/kde4/p7zip_compress2.desktop
cp GUI/kde4/*.desktop %{buildroot}%{_datadir}/kservices5/ cp GUI/kde4/*.desktop %{buildroot}%{_kde4_datadir}/kde4/services/ServiceMenus/
#fix non-executable-in-bin #fix non-executable-in-bin
chmod +x %{buildroot}%{_bindir}/p7zipForFilemanager chmod +x %{buildroot}%{_bindir}/p7zipForFilemanager
%endif %endif
@ -171,7 +174,7 @@ make test
%{_bindir}/p7zipForFilemanager %{_bindir}/p7zipForFilemanager
%{_libexecdir}/p7zip/7zG %{_libexecdir}/p7zip/7zG
%{_libexecdir}/p7zip/Lang %{_libexecdir}/p7zip/Lang
%{_datadir}/kservices5/*.desktop %{_kde4_datadir}/kde4/services/ServiceMenus/*.desktop
%endif %endif
%files doc %files doc
@ -180,36 +183,12 @@ make test
%changelog %changelog
* Fri Oct 04 2024 Sérgio Basto <sergio@serjux.com> - 16.02-31 * Fri Jan 19 2024 Sergey Cherevko <s.cherevko@msvsphere-os.ru> - 16.02-21.inferit
- Fix wrapper to hide password from process history - Using libnatspec to correctly decode non-ASCII filenames zipped on Windows.
- Rebuilt for MSVSphere 9.3
* Wed Sep 04 2024 Miroslav Suchý <msuchy@redhat.com> - 16.02-30
- convert license to SPDX
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 16.02-29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 16.02-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
- Fix the build by moving desktop files from kde4/services/ServiceMenus/ to kservices5
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 16.02-27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 16.02-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 16.02-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Aug 04 2022 Scott Talbert <swt@techie.net> - 16.02-24
- Rebuild with wxWidgets 3.2
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 16.02-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 16.02-22 * Tue Jul 25 2023 Arkady L. Shane <ashejn@msvsphere.ru> - 16.02-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - Rebuilt for MSVSphere 9.2
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 16.02-21 * Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 16.02-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

@ -1,12 +0,0 @@
diff -ru p7zip_16.02.old/install.sh p7zip_16.02.new/install.sh
--- p7zip_16.02.old/install.sh 2015-10-05 10:39:00.000000000 +0200
+++ p7zip_16.02.new/install.sh 2024-10-02 18:47:30.746978319 +0200
@@ -10,7 +10,7 @@
chmod 755 "${DEST_DIR}${DEST_SHARE}/${prg}"
strip "${DEST_DIR}${DEST_SHARE}/${prg}"
echo "#! /bin/sh" > "${DEST_DIR}${DEST_BIN}/${prg}"
- echo "\"${DEST_SHARE}/${prg}\" \"\$@\"" >> "${DEST_DIR}${DEST_BIN}/${prg}"
+ echo "exec \"${DEST_SHARE}/${prg}\" \"\$@\"" >> "${DEST_DIR}${DEST_BIN}/${prg}"
chmod 755 "${DEST_DIR}${DEST_BIN}/${prg}"
fi
}

@ -1 +0,0 @@
7202a0bd2aa2935576c13314783d5e1d p7zip_16.02_src_all-norar.tar.bz2
Loading…
Cancel
Save