# # spec file for package 7zip # # Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define stripped_version 2408 Name: 7zip Version: 24.08 Release: 1%{?dist} Summary: 7-Zip file archiver # CPP/7zip/Compress/LzfseDecoder.cpp is under the BSD-3-Clause # C/Sha1.c and C/Sha256.c are in the public domain License: BSD-3-Clause AND LGPL-2.1-or-later AND SUSE-Public-Domain Group: Productivity/Archiving/Compression URL: https://www.7-zip.org/ Source: https://www.7-zip.org/a/7z%{stripped_version}-src.tar.xz Patch0: fix-compatib-with-p7zip.patch BuildRequires: dos2unix BuildRequires: gcc BuildRequires: gcc-c++ %ifarch x86_64 %ix86 %x86_64 BuildRequires: uasm %endif %if 0%{?rhel} == 7 BuildRequires: devtoolset-12-gcc-c++ %else BuildRequires: gcc-toolset-12-gcc-c++ BuildRequires: gcc-toolset-12-annobin-plugin-gcc %endif %description This package contains the 7zr command line utility for packing and unpacking archives in the 7z format. %prep tar xaf %{SOURCE0} %patch0 -p1 dos2unix DOC/*.txt # Remove executable perms from docs chmod -x DOC/*.txt # Remove -Werror to make build succeed sed -i 's/-Werror//' CPP/7zip/7zip_gcc.mak # Remove -Waddress-of-packed-member to make build succeed sed -i -e 's/-Waddress-of-packed-member//' -e 's/-Wcast-align=strict//' -e 's/-Wmissing-attributes//' C/warn_gcc.mak CPP/7zip/warn_gcc.mak # Inject CFLAGS & LDFLAGS sed -i 's|^ -fPIC| -fPIC %{optflags}|' CPP/7zip/7zip_gcc.mak # No debug rpm gets created (why?) so do strip #sed -i 's|LFLAGS_STRIP = -s|LFLAGS_STRIP =|' CPP/7zip/7zip_gcc.mak #sed -i 's|LFLAGS_ALL = -s|LFLAGS_ALL =|' CPP/7zip/7zip_gcc.mak sed -i 's|$(CXX) -o $(PROGPATH)|$(CXX) %{__global_ldflags} -o $(PROGPATH)|' CPP/7zip/7zip_gcc.mak %build %if 0%{?rhel} == 7 . /opt/rh/devtoolset-12/enable %else . /opt/rh/gcc-toolset-12/enable %endif cd CPP/7zip/Bundles/Alone7z %ifarch x86_64 %x86_64 %make_build -f ../../cmpl_gcc_x64.mak MY_ASM=uasm %else %ifarch %ix86 %make_build -f ../../cmpl_gcc_x86.mak MY_ASM=uasm %else %ifarch aarch64 %make_build -f ../../cmpl_gcc_arm64.mak MY_ASM=gcc %else %make_build -f ../../cmpl_gcc.mak %endif %endif %endif %install %ifarch x86_64 %x86_64 install -Dm 755 CPP/7zip/Bundles/Alone7z/b/g_x64/7zr %{buildroot}%{_bindir}/7zr %else %ifarch %ix86 install -Dm 755 CPP/7zip/Bundles/Alone7z/b/g_x86/7zr %{buildroot}%{_bindir}/7zr %else %ifarch aarch64 install -Dm 755 CPP/7zip/Bundles/Alone7z/b/g_arm64/7zr %{buildroot}%{_bindir}/7zr %else install -Dm 755 CPP/7zip/Bundles/Alone7z/b/g/7zr %{buildroot}%{_bindir}/7zr %endif %endif %endif %files %license DOC/copying.txt DOC/License.txt %doc DOC/readme.txt DOC/7zC.txt DOC/Methods.txt DOC/src-history.txt %{_bindir}/7zr %changelog * Tue Aug 13 2024 Michael Lampe - update to 24.08 * Thu Jun 20 2024 Michael Lampe - update to 24.07 * Mon May 27 2024 Michael Lampe - update to 24.06 * Sun May 19 2024 Michael Lampe - update to 24.05 * Thu Sep 28 2023 Michael Lampe - Build & package only 7zr * Tue Jul 18 2023 Linnaea Lavia - Enable ARM64 ASM introduced in 23.01 * Wed Jun 21 2023 Fabian Vogt - Update to version 23.01: * 7-Zip now can use new ARM64 filter for compression to 7z and xz archives. ARM64 filter can increase compression ratio for data containing executable files compiled for ARM64 (AArch64) architecture. * Default section size for BCJ2 filter was changed from 64 MiB to 240 MiB. It can increase compression ratio for executable files larger than 64 MiB. * UDF: support was improved. * cpio: support for hard links. * Some changes and optimizations in WIM creation code. * When new 7-Zip creates multivolume archive, 7-Zip keeps in open state only volumes that still can be changed. Previous versions kept all volumes in open state until the end of the archive creation. * 7-Zip now can reduce the number of simultaneously open files, when 7-Zip opens, extracts or creates multivolume archive. It allows to avoid the failures for cases with big number of volumes, bacause there is a limitation for number of open files allowed for a single program in Linux. * The bugs were fixed: * ZIP archives: if multithreaded zip compression was performed with more than one file to stdout stream (-so switch), 7-zip didn't write "data descriptor" for some files. * ext4 archives: 7-Zip couldn't correctly extract symbolic link to directory from ext4 archives. * HFS and APFS archives: 7-Zip incorrectly decoded uncompressed blocks (64 KiB) in compressed forks. * Some another bugs were fixed. - Refresh fix-compatib-with-p7zip.patch * Mon Dec 12 2022 Dirk Müller - build for x86_64 subarchs the same way like for baseline * Wed Nov 30 2022 Danilo Spinella - Enable ASM to increase performance in compression and decompression bsc#1202197 * Fri Jul 22 2022 Dirk Müller - update to 22.01: * UDF support was improved to UDF version 2.60. * HFS and APFS support was improved. * Sun Jul 3 2022 Matthias Eliasson - Update to version 22.00: * 7-Zip now can extract APFS (Apple File System) images that can be used in DMG files. * 7-Zip now can create TAR archives in POSIX (pax) tar format with the switches - ttar -mm=pax or -ttar -mm=posix * 7-Zip now can store additional file timestamps with high precision (1 ns in Linux) in tar/pax archives with the following switches: - ttar -mm=pax -mtp=3 -mtc -mta * New switches for Linux version for TAR archives: - snoi : store owner/group ids in archive or set owner/group ids from archive to extracted files. - snon : store owner/group names in archive * New -snz switch to propagate Zone.Identifier stream to extracted files (Windows). * New option "Propagate Zone.Id stream" in Tools/Options/7-Zip menu. * New "Options" window in "Add to archive" allows to select what metadata must be included to archive. Also it allows to select new option "Do not change source files last access time". * Some bugs were fixed. * Wed Jan 26 2022 Dario Faggioli - Fix an incompatibility with p7zip which was breaking some downstreams (e.g., GNOME's File-Roller). See bsc#1195041 * Add fix-compatib-with-p7zip.patch * Wed Jan 12 2022 Danilo Spinella - Replace p7zip with 7zip * Add p7zip and p7zip.1 * Mon Jan 3 2022 Danilo Spinella - Update to version 21.07: * The sorting order of files in archives was slightly changed to be more consistent for cases where the name of some directory is the same as the prefix part of the name of another directory or file. * TAR archives created by 7-Zip now are more consistent with archives created by GNU TAR program. - Remove unneeded pach remove-rar-handler.patch - Use the tarball in place of the 7zip archive as Source * Wed Dec 22 2021 Arjen de Korte - Extract source archive with bsdtar instead of p7zip - Fixup line breaks of documentation files * Tue Dec 21 2021 Arjen de Korte - update to version 21.06 * Bug in LZMA encoder in file LzmaEnc.c was fixed: - LzmaEnc_MemEncode(), LzmaEncode() and LzmaCompress() could work incorrectly, if size value for output buffer is smaller than size required for all compressed data. - LzmaEnc_Encode() could work incorrectly, if callback ISeqOutStream::Write() doesn't write all compressed data. - NCompress::NLzma::CEncoder::Code() could work incorrectly, if callback ISequentialOutStream::Write() returns error code. * Bug in versions 21.00-21.05 was fixed: 7-Zip didn't set attributes of directories during archive extracting. - update to version 21.04 * 7-Zip now reduces the number of working CPU threads for compression, if RAM size is not enough for compression with big LZMA2 dictionary. * 7-Zip now can create and check "file.sha256" and "file.sha1" text files that contain the list of file names and SHA-1 / SHA-256 checksums in format compatible with sha1sum/sha256sum programs. - update to version 21.03 * The maximum dictionary size for LZMA/LZMA2 compressing was increased to 4 GB (3840 MiB). * Minor speed optimizations in LZMA/LZMA2 compressing. * Tue Dec 21 2021 Jan Engelhardt - Remove more -W flags for the Leap 15.x build to succeed * Tue Jul 6 2021 danilo.spinella@suse.com - Create initial version - Add remove-rar-handler.patch