2013-08-02 17:06:01 +02:00
|
|
|
#
|
|
|
|
# spec file for package unzip-rcc
|
|
|
|
#
|
2024-02-22 14:17:10 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2013-08-02 17:06:01 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2021-09-21 11:21:29 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2013-08-02 17:06:01 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2016-06-16 17:37:02 +02:00
|
|
|
%define _name unzip
|
|
|
|
%define fileversion 60
|
2013-08-02 17:06:01 +02:00
|
|
|
%bcond_without rcc
|
2016-06-16 17:37:02 +02:00
|
|
|
%if %{with rcc}
|
|
|
|
%define update_weight 20
|
|
|
|
%define _suffix rcc
|
|
|
|
BuildRequires: librcc-devel
|
|
|
|
Suggests: librcc0
|
|
|
|
Provides: %{_name} = %{version}
|
|
|
|
%else
|
|
|
|
%define update_weight 10
|
|
|
|
%define _suffix plain
|
|
|
|
%endif
|
2013-08-02 17:06:01 +02:00
|
|
|
# NOTE: unzip.spec is the major file, if you want to update unzip-rcc.spec
|
|
|
|
# call pre_checkin.sh after editing unzip.spec
|
|
|
|
Name: unzip-rcc
|
|
|
|
Version: 6.00
|
|
|
|
Release: 0
|
|
|
|
Summary: A program to unpack compressed files
|
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Productivity/Archiving/Compression
|
2021-09-21 11:21:29 +02:00
|
|
|
URL: http://www.info-zip.org/
|
2016-06-16 17:59:45 +02:00
|
|
|
Source: http://sourceforge.net/projects/infozip/files/UnZip%%206.x%%20%%28latest%%29/UnZip%%206.0/%{_name}%{fileversion}.tar.gz
|
2013-08-02 17:06:01 +02:00
|
|
|
Source1: pre_checkin.sh
|
|
|
|
Patch0: unzip.dif
|
|
|
|
Patch1: unzip-iso8859_2.patch
|
|
|
|
Patch3: unzip-optflags.patch
|
|
|
|
Patch4: unzip-5.52-filename_too_long.patch
|
|
|
|
Patch5: unzip-no_file_name_translation.patch
|
|
|
|
Patch8: unzip-open_missing_mode.patch
|
|
|
|
Patch10: unzip-5.52-use_librcc.patch
|
|
|
|
Patch11: unzip-no-build-date.patch
|
|
|
|
Patch12: unzip-dont_call_isprint.patch
|
2015-01-27 10:32:59 +01:00
|
|
|
Patch13: Fix-CVE-2014-8139-unzip.patch
|
2017-07-10 10:34:29 +02:00
|
|
|
# http://pkgs.fedoraproject.org/cgit/rpms/unzip.git/plain/unzip-6.0-cve-2014-8139.patch
|
2015-01-27 10:32:59 +01:00
|
|
|
Patch14: Fix-CVE-2014-8140-and-CVE-2014-8141.patch
|
2016-10-12 09:52:16 +02:00
|
|
|
Patch15: CVE-2015-7696.patch
|
|
|
|
Patch16: CVE-2015-7697.patch
|
2017-02-15 09:59:36 +01:00
|
|
|
Patch17: CVE-2016-9844.patch
|
|
|
|
Patch18: CVE-2014-9913.patch
|
2018-05-17 09:11:01 +02:00
|
|
|
Patch19: CVE-2018-1000035.patch
|
2018-06-27 16:20:07 +02:00
|
|
|
Patch20: Fix-CVE-2014-9636-unzip-buffer-overflow.patch
|
|
|
|
Patch21: unzip60-total_disks_zero.patch
|
2018-10-12 15:10:11 +02:00
|
|
|
Patch22: unzip60-cfactorstr_overflow.patch
|
2022-09-26 11:49:26 +02:00
|
|
|
Patch23: unzip-initialize-the-symlink-flag.patch
|
|
|
|
# PATCH-FIX-UPSTREAM danilo.spinella@suse.com CVE-2022-0530 bsc#1196177
|
|
|
|
Patch24: CVE-2022-0530.patch
|
|
|
|
# PATCH-FIX-UPSTREAM danilo.spinella@suse.com CVE-2022-0529 bsc#1196180
|
|
|
|
Patch25: CVE-2022-0529.patch
|
2016-06-16 17:37:02 +02:00
|
|
|
Requires(post): update-alternatives
|
2024-02-22 14:17:10 +01:00
|
|
|
Requires(postun): update-alternatives
|
2013-08-02 17:07:17 +02:00
|
|
|
Recommends: %{_name}-doc
|
2016-06-16 17:37:02 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2013-08-02 17:06:01 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
UnZip is an extraction utility for archives compressed in .zip format
|
|
|
|
(known as "zip files"). Although highly compatible both with PKWARE's
|
|
|
|
PKZIP(tm) and PKUNZIP utilities for MS-DOS and with Info-ZIP's own Zip
|
|
|
|
program, our primary objectives have been portability and non-MS-DOS
|
|
|
|
functionality. This version can also extract encrypted archives.
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
Summary: Documentation files for unzip
|
|
|
|
Group: Productivity/Archiving/Compression
|
2022-09-26 11:49:26 +02:00
|
|
|
BuildArch: noarch
|
2013-08-02 17:06:01 +02:00
|
|
|
|
|
|
|
%description doc
|
|
|
|
UnZip is an extraction utility for archives compressed in .zip format
|
|
|
|
(known as "zip files"). Although highly compatible both with PKWARE's
|
|
|
|
PKZIP(tm) and PKUNZIP utilities for MS-DOS and with Info-ZIP's own Zip
|
|
|
|
program, our primary objectives have been portability and non-MS-DOS
|
|
|
|
functionality. This version can also extract encrypted archives.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{_name}%{fileversion}
|
2024-02-21 14:28:41 +01:00
|
|
|
%patch -P 0
|
|
|
|
%patch -P 1
|
|
|
|
%patch -P 3
|
|
|
|
%patch -P 4
|
|
|
|
%patch -P 5
|
|
|
|
%patch -P 8
|
2013-08-02 17:06:01 +02:00
|
|
|
%if %{with rcc}
|
2024-02-21 14:28:41 +01:00
|
|
|
%patch -P 10
|
2013-08-02 17:06:01 +02:00
|
|
|
%endif
|
2024-02-21 14:28:41 +01:00
|
|
|
%patch -P 11
|
|
|
|
%patch -P 12
|
|
|
|
%patch -P 13 -p1
|
|
|
|
%patch -P 14 -p1
|
|
|
|
%patch -P 15 -p1
|
|
|
|
%patch -P 16 -p1
|
|
|
|
%patch -P 17 -p1
|
|
|
|
%patch -P 18 -p1
|
|
|
|
%patch -P 19 -p0
|
|
|
|
%patch -P 20 -p1
|
|
|
|
%patch -P 21 -p1
|
|
|
|
%patch -P 22 -p1
|
|
|
|
%patch -P 23 -p1
|
|
|
|
%patch -P 24 -p1
|
|
|
|
%patch -P 25 -p1
|
2013-08-02 17:06:01 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
export RPM_OPT_FLAGS="%{optflags} \
|
|
|
|
-D_GNU_SOURCE -DRCC_LAZY -DWILD_STOP_AT_DIR \
|
|
|
|
-DLARGE_FILE_SUPPORT -DUNICODE_SUPPORT \
|
|
|
|
-DUNICODE_WCHAR -DUTF8_MAYBE_NATIVE -DNO_LCHMOD \
|
2014-12-21 18:40:43 +01:00
|
|
|
-DDATE_FORMAT=DF_YMD -I. -fstack-protector -fno-strict-aliasing -fPIE"
|
2013-08-02 17:06:01 +02:00
|
|
|
|
2014-12-21 18:40:43 +01:00
|
|
|
make %{?_smp_mflags} -f unix/Makefile LF2="-ldl -pie" linux_noasm
|
2013-08-02 17:06:01 +02:00
|
|
|
|
|
|
|
%check
|
2016-06-16 17:37:02 +02:00
|
|
|
make %{?_smp_mflags} -f unix/Makefile check
|
2013-08-02 17:06:01 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
|
|
|
mkdir -p %{buildroot}{%{_bindir},%{_mandir}/man1}
|
|
|
|
for i in unzip funzip unzipsfx; do
|
|
|
|
install $i "%{buildroot}%{_bindir}/$i-"%{_suffix}
|
|
|
|
done
|
|
|
|
ln -s unzip %{buildroot}%{_bindir}/zipinfo
|
|
|
|
install unix/zipgrep "%{buildroot}%{_bindir}/zipgrep-"%{_suffix}
|
|
|
|
for i in unzip funzip unzipsfx zipgrep; do
|
|
|
|
touch %{buildroot}%{_sysconfdir}/alternatives/$i
|
2016-06-16 17:37:02 +02:00
|
|
|
ln -s %{_sysconfdir}/alternatives/$i %{buildroot}%{_bindir}/$i
|
2013-08-02 17:06:01 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
# do not have the docu in both packages
|
|
|
|
%if %{without rcc}
|
|
|
|
for i in man/*.1; do
|
|
|
|
install -m 644 $i %{buildroot}%{_mandir}/man1/
|
|
|
|
done
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%post
|
|
|
|
for bin in unzip funzip unzipsfx zipgrep; do
|
2016-06-16 17:37:02 +02:00
|
|
|
%{_sbindir}/update-alternatives --install %{_bindir}/$bin $bin "%{_bindir}/$bin-"%{_suffix} %{update_weight}
|
2013-08-02 17:06:01 +02:00
|
|
|
done
|
|
|
|
|
2018-05-17 09:11:01 +02:00
|
|
|
%postun
|
2013-08-02 17:06:01 +02:00
|
|
|
if [ "$1" = 0 ] ; then
|
|
|
|
for bin in unzip funzip unzipsfx zipgrep; do
|
2016-06-16 17:37:02 +02:00
|
|
|
%{_sbindir}/update-alternatives --remove $bin "%{_bindir}/$bin"-%{_suffix}
|
2013-08-02 17:06:01 +02:00
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2016-06-16 17:37:02 +02:00
|
|
|
%ghost %{_sysconfdir}/alternatives/unzip
|
2013-08-02 17:06:01 +02:00
|
|
|
%{_bindir}/unzip
|
|
|
|
%{_bindir}/unzip-%{_suffix}
|
2016-06-16 17:37:02 +02:00
|
|
|
%ghost %{_sysconfdir}/alternatives/funzip
|
2013-08-02 17:06:01 +02:00
|
|
|
%{_bindir}/funzip
|
|
|
|
%{_bindir}/funzip-%{_suffix}
|
2016-06-16 17:37:02 +02:00
|
|
|
%ghost %{_sysconfdir}/alternatives/unzipsfx
|
2013-08-02 17:06:01 +02:00
|
|
|
%{_bindir}/unzipsfx
|
|
|
|
%{_bindir}/unzipsfx-%{_suffix}
|
|
|
|
%{_bindir}/zipinfo
|
2016-06-16 17:37:02 +02:00
|
|
|
%ghost %{_sysconfdir}/alternatives/zipgrep
|
2013-08-02 17:06:01 +02:00
|
|
|
%{_bindir}/zipgrep
|
|
|
|
%{_bindir}/zipgrep-%{_suffix}
|
|
|
|
|
|
|
|
%if %{without rcc}
|
|
|
|
%files doc
|
2013-08-02 20:29:42 +02:00
|
|
|
%defattr(-,root,root)
|
2016-06-16 17:37:02 +02:00
|
|
|
%{_mandir}/man1/*
|
2013-08-02 17:06:01 +02:00
|
|
|
%doc BUGS Contents History.* LICENSE README ToDo WHERE
|
|
|
|
%doc *.txt proginfo
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%changelog
|