diff --git a/.gitignore b/.gitignore index 0cbfd29..87fb080 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ /unar1.8_src.zip /unar1.8.1_src.zip /unar1.10.1_src.zip +/unar-1.10.7.tar.gz +/universal-detector-1.1.tar.gz +/unar-1.10.8.tar.gz diff --git a/sources b/sources index 684a0f0..c40707c 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -8fb16cf42ee2832d63ff378fd049e08c unar1.10.1_src.zip +SHA512 (unar-1.10.8.tar.gz) = 34c6c47806877763e022720ac3f6097c9c369481f2bb4a1c1c22e65e2c6250835c73bc3f73e71764810acec8950b05ae9f2dc29348ff192ef22968776fc7efe4 +SHA512 (universal-detector-1.1.tar.gz) = e514670b3d37b2472ed3e9cb0fdc3298a8479772264b7573411f104be554222bec2e01f73e1f35db95620fe785bee2dcf9ddc9c2b1f4ff6b522fa64d14d020f5 diff --git a/unar-int-conversion.patch b/unar-int-conversion.patch new file mode 100644 index 0000000..4ed3fac --- /dev/null +++ b/unar-int-conversion.patch @@ -0,0 +1,42 @@ +Without this change, GCC 14 will fail compilation with an error: + +XADRAR5Parser.m: In function ‘+[XADRAR5Parser recognizeFileWithHandle:firstBytes:name:]’: XADRAR5Parser.m:79:5: warning: ‘XADRAR5Parser’ may not respond to ‘+signatureLocationInData:’ + 79 | off_t signatureLocation = [self signatureLocationInData:data]; + | ^~~~~ +XADRAR5Parser.m:79:5: warning: (messages without a matching method signature will be assumed to return ‘id’ and accept ‘...’ as arguments) +XADRAR5Parser.m:79:31: error: initialization of ‘off_t’ {aka ‘long int’} from ‘id’ makes integer from pointer without a cast + 79 | off_t signatureLocation = [self signatureLocationInData:data]; + | ^ + +Submitted upstream: + +diff --git a/XADMaster-1.10.8/XADRAR5Parser.m b/XADMaster-1.10.8/XADRAR5Parser.m +index b89d841c959b4b9d..9f609d4cf05994c6 100644 +--- a/XADMaster-1.10.8/XADRAR5Parser.m ++++ b/XADMaster-1.10.8/XADRAR5Parser.m +@@ -74,12 +74,6 @@ static inline BOOL IsZeroHeaderBlock(RAR5HeaderBlock block) { return IsZeroBlock + return 8; + } + +-+(BOOL)recognizeFileWithHandle:(CSHandle *)handle firstBytes:(NSData *)data name:(NSString *)name +-{ +- off_t signatureLocation = [self signatureLocationInData:data]; +- return signatureLocation != RAR5SignatureNotFound; +-} +- + + (off_t)signatureLocationInData:(NSData *)data { + const uint8_t *bytes=[data bytes]; + int length=[data length]; +@@ -98,6 +92,12 @@ static inline BOOL IsZeroHeaderBlock(RAR5HeaderBlock block) { return IsZeroBlock + return RAR5SignatureNotFound; + } + +++(BOOL)recognizeFileWithHandle:(CSHandle *)handle firstBytes:(NSData *)data name:(NSString *)name ++{ ++ off_t signatureLocation = [self signatureLocationInData:data]; ++ return signatureLocation != RAR5SignatureNotFound; ++} ++ + +(NSArray *)volumesForHandle:(CSHandle *)handle firstBytes:(NSData *)data name:(NSString *)name + { + // Check if multipart diff --git a/unar.spec b/unar.spec index 8b1d2f2..c9daa40 100644 --- a/unar.spec +++ b/unar.spec @@ -1,16 +1,22 @@ +%global detectorver 1.1 + Name: unar -Version: 1.10.1 -Release: 11%{dist} +Version: 1.10.8 +Release: 17%{?dist} Summary: Multi-format extractor -License: LGPLv2+ -URL: http://unarchiver.c3.cx/commandline -Source0: http://unarchiver.c3.cx/downloads/unar%{version}_src.zip +# Automatically converted from old format: LGPLv2+ - review is highly recommended. +License: LicenseRef-Callaway-LGPLv2+ +URL: https://theunarchiver.com/command-line +Source0: https://github.com/MacPaw/XADMaster/archive/v%{version}/%{name}-%{version}.tar.gz +Source1: https://github.com/MacPaw/universal-detector/archive/%{detectorver}/universal-detector-%{detectorver}.tar.gz +Patch1: unar-int-conversion.patch BuildRequires: bzip2-devel BuildRequires: gcc-objc BuildRequires: gcc-c++ BuildRequires: gnustep-base-devel -BuildRequires: libicu-devel -BuildRequires: zlib-devel +BuildRequires: pkgconfig(icu-uc) +BuildRequires: pkgconfig(zlib) +BuildRequires: pkgconfig(wavpack) %description The command-line utilities lsar and unar are capable of listing and extracting @@ -20,32 +26,160 @@ replacement of unrar. %prep %setup -q -c -mv The\ Unarchiver/* . +tar -xf %{SOURCE1} +%patch -P1 -p1 +mv universal-detector-%{detectorver} UniversalDetector rm -fr __MACOSX The\ Unarchiver # recursively remove executable bit from every file, skipping directories find . -type f -print0 | xargs -0 chmod -x %build -export OBJCFLAGS="${RPM_OPT_FLAGS}" -make -C XADMaster -f Makefile.linux +# LTO is able to more thoroughly propagate constants and as a result +# exposes the constant 0 to a point where an Objective-C object with +# a catchable type must be used. Disable LTO until the package +# gets fixed +%define _lto_cflags %{nil} +export OBJCFLAGS="%{optflags}" +#export OBJCFLAGS=`gnustep-config --objc-flags` +make -C XADMaster-%{version} -f Makefile.linux \ +%if 0%{?rhel} >= 8 + OBJCC=gobjc +%endif %install +pushd XADMaster-%{version} install -d %{buildroot}%{_bindir} -install -pm755 XADMaster/unar XADMaster/lsar %{buildroot}%{_bindir} +install -pm755 unar lsar %{buildroot}%{_bindir} install -d %{buildroot}%{_mandir}/man1 install -pm644 Extra/*.1 %{buildroot}%{_mandir}/man1 install -d %{buildroot}%{_datadir}/bash-completion/completions install -pm644 Extra/lsar.bash_completion %{buildroot}%{_datadir}/bash-completion/completions/lsar install -pm644 Extra/unar.bash_completion %{buildroot}%{_datadir}/bash-completion/completions/unar +popd %files -%license License.txt +%license XADMaster-%{version}/LICENSE %{_bindir}/lsar %{_bindir}/unar %{_mandir}/man1/*.1* -%{_datadir}/bash-completion/ +%{_datadir}/bash-completion/completions/* %changelog +* Fri Jul 17 2026 Fedora Release Engineering - 1.10.8-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + +* Mon Jun 08 2026 František Zatloukal - 1.10.8-16 +- Rebuilt for icu 78.3 + +* Sat Jan 17 2026 Fedora Release Engineering - 1.10.8-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + +* Wed Aug 06 2025 František Zatloukal - 1.10.8-14 +- Rebuilt for icu 77.1 + +* Fri Jul 25 2025 Fedora Release Engineering - 1.10.8-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Wed Feb 26 2025 Adam Williamson - 1.10.8-12 +- Really rebuild for gnustep-base 1.31.0 + +* Sun Feb 23 2025 Antonio Trande - 1.10.8-11 +- Rebuild for gnustep-base 1.31.0 + +* Sun Jan 19 2025 Fedora Release Engineering - 1.10.8-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Sun Dec 08 2024 Pete Walter - 1.10.8-9 +- Rebuild for ICU 76 + +* Wed Sep 04 2024 Miroslav Suchý - 1.10.8-8 +- convert license to SPDX + +* Sat Jul 20 2024 Fedora Release Engineering - 1.10.8-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Sun Jun 16 2024 Antonio Trande - 1.10.8-6 +- Rebuild for gnustep-base 1.30.0 + +* Wed Jan 31 2024 Pete Walter - 1.10.8-5 +- Rebuild for ICU 74 + +* Sat Jan 27 2024 Fedora Release Engineering - 1.10.8-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Dec 22 2023 Florian Weimer - 1.10.8-3 +- Fix int-conversion error + +* Sun Nov 19 2023 Antonio Trande - 1.10.8-2 +- Rebuild for gnustep-base-1.29.0 + +* Thu Oct 12 2023 Fedora Release Monitoring - 1.10.8-1 +- Update to 1.10.8 (#2243653) + +* Sat Jul 22 2023 Fedora Release Engineering - 1.10.7-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jul 11 2023 František Zatloukal - 1.10.7-7 +- Rebuilt for ICU 73.2 + +* Sat Jan 21 2023 Fedora Release Engineering - 1.10.7-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Dec 31 2022 Pete Walter - 1.10.7-5 +- Rebuild for ICU 72 + +* Mon Aug 01 2022 Frantisek Zatloukal - 1.10.7-4 +- Rebuilt for ICU 71.1 + +* Sat Jul 23 2022 Fedora Release Engineering - 1.10.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Jan 22 2022 Fedora Release Engineering - 1.10.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Sun Oct 31 2021 Sérgio Basto - 1.10.7-1 +- Update unar to 1.10.7 (#2012015) + +* Tue Sep 28 2021 Robert Scheck - 1.10.1-24 +- Build using gobjc on EPEL 8 (#2008326) + +* Fri Jul 23 2021 Fedora Release Engineering - 1.10.1-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Thu May 20 2021 Pete Walter - 1.10.1-22 +- Rebuild for ICU 69 + +* Wed Jan 27 2021 Fedora Release Engineering - 1.10.1-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Aug 17 2020 Jeff Law - 1.10.1-20 +- Disable LTO + +* Sat Aug 01 2020 Fedora Release Engineering - 1.10.1-19 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 1.10.1-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon May 18 2020 Pete Walter - 1.10.1-17 +- Rebuild for ICU 67 + +* Sat Apr 18 2020 Sérgio Basto - 1.10.1-16 +- Rebuild for gnustep 1.27.0 + +* Fri Jan 31 2020 Fedora Release Engineering - 1.10.1-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Nov 01 2019 Pete Walter - 1.10.1-14 +- Rebuild for ICU 65 + +* Fri Sep 06 2019 Sérgio Basto - 1.10.1-13 +- Rebuild for new gnustep 1.26.0 + +* Sat Jul 27 2019 Fedora Release Engineering - 1.10.1-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sun Feb 03 2019 Fedora Release Engineering - 1.10.1-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild