SHA256
1
0
forked from pool/unzip

Accepting request 402774 from Archiving

- Require properly the update-alternatives to not throw out errors
  when installing in OBS chroot

- Require properly the update-alternatives to not throw out errors
  when installing in OBS chroot

OBS-URL: https://build.opensuse.org/request/show/402774
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/unzip?expand=0&rev=37
This commit is contained in:
Dominique Leuenberger 2016-06-29 13:01:37 +00:00 committed by Git OBS Bridge
commit 760d514b51
4 changed files with 64 additions and 56 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jun 16 14:58:41 UTC 2016 - tchvatal@suse.com
- Require properly the update-alternatives to not throw out errors
when installing in OBS chroot
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jan 26 13:25:54 UTC 2015 - tbehrens@suse.com Mon Jan 26 13:25:54 UTC 2015 - tbehrens@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package unzip-rcc # spec file for package unzip-rcc
# #
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,21 +16,29 @@
# #
%define _name unzip
%define fileversion 60
%bcond_without rcc %bcond_without rcc
%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
# NOTE: unzip.spec is the major file, if you want to update unzip-rcc.spec # NOTE: unzip.spec is the major file, if you want to update unzip-rcc.spec
# call pre_checkin.sh after editing unzip.spec # call pre_checkin.sh after editing unzip.spec
Name: unzip-rcc Name: unzip-rcc
%define _name unzip
Version: 6.00 Version: 6.00
Release: 0 Release: 0
%define fileversion 60
Summary: A program to unpack compressed files Summary: A program to unpack compressed files
License: BSD-3-Clause License: BSD-3-Clause
Group: Productivity/Archiving/Compression Group: Productivity/Archiving/Compression
Url: http://www.info-zip.org/ Url: http://www.info-zip.org/
Source: http://sourceforge.net/projects/infozip/files/UnZip%206.x%20%28latest%29/UnZip%206.0/%{_name}%{fileversion}.tar.gz Source: http://sourceforge.net/projects/infozip/files/UnZip%%206.x%%20%%28latest%%29/UnZip%%206.0/%{_name}%{fileversion}.tar.gz
Source1: pre_checkin.sh Source1: pre_checkin.sh
Patch0: unzip.dif Patch0: unzip.dif
Patch1: unzip-iso8859_2.patch Patch1: unzip-iso8859_2.patch
@ -43,20 +51,10 @@ Patch11: unzip-no-build-date.patch
Patch12: unzip-dont_call_isprint.patch Patch12: unzip-dont_call_isprint.patch
Patch13: Fix-CVE-2014-8139-unzip.patch Patch13: Fix-CVE-2014-8139-unzip.patch
Patch14: Fix-CVE-2014-8140-and-CVE-2014-8141.patch Patch14: Fix-CVE-2014-8140-and-CVE-2014-8141.patch
%if %{with rcc} Requires(post): update-alternatives
BuildRequires: librcc-devel Requires(preun): update-alternatives
Suggests: librcc0
Provides: %{_name} = %{version}
%define update_weight 20
%define _suffix rcc
%else
%define update_weight 10
%define _suffix plain
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: update-alternatives
Requires: update-alternatives
Recommends: %{_name}-doc Recommends: %{_name}-doc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
UnZip is an extraction utility for archives compressed in .zip format UnZip is an extraction utility for archives compressed in .zip format
@ -102,7 +100,7 @@ export RPM_OPT_FLAGS="%{optflags} \
make %{?_smp_mflags} -f unix/Makefile LF2="-ldl -pie" linux_noasm make %{?_smp_mflags} -f unix/Makefile LF2="-ldl -pie" linux_noasm
%check %check
make -f unix/Makefile check make %{?_smp_mflags} -f unix/Makefile check
%install %install
mkdir -p %{buildroot}%{_sysconfdir}/alternatives mkdir -p %{buildroot}%{_sysconfdir}/alternatives
@ -114,7 +112,7 @@ ln -s unzip %{buildroot}%{_bindir}/zipinfo
install unix/zipgrep "%{buildroot}%{_bindir}/zipgrep-"%{_suffix} install unix/zipgrep "%{buildroot}%{_bindir}/zipgrep-"%{_suffix}
for i in unzip funzip unzipsfx zipgrep; do for i in unzip funzip unzipsfx zipgrep; do
touch %{buildroot}%{_sysconfdir}/alternatives/$i touch %{buildroot}%{_sysconfdir}/alternatives/$i
ln -s %{_sysconfdir}/alternatives/$i %{buildroot}%_bindir/$i ln -s %{_sysconfdir}/alternatives/$i %{buildroot}%{_bindir}/$i
done done
# do not have the docu in both packages # do not have the docu in both packages
@ -126,36 +124,36 @@ done
%post %post
for bin in unzip funzip unzipsfx zipgrep; do for bin in unzip funzip unzipsfx zipgrep; do
/usr/sbin/update-alternatives --install %{_bindir}/$bin $bin "%{_bindir}/$bin-"%{_suffix} %{update_weight} %{_sbindir}/update-alternatives --install %{_bindir}/$bin $bin "%{_bindir}/$bin-"%{_suffix} %{update_weight}
done done
%preun %preun
if [ "$1" = 0 ] ; then if [ "$1" = 0 ] ; then
for bin in unzip funzip unzipsfx zipgrep; do for bin in unzip funzip unzipsfx zipgrep; do
/usr/sbin/update-alternatives --remove $bin "%{_bindir}/$bin"-%{_suffix} %{_sbindir}/update-alternatives --remove $bin "%{_bindir}/$bin"-%{_suffix}
done done
fi fi
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%ghost %_sysconfdir/alternatives/unzip %ghost %{_sysconfdir}/alternatives/unzip
%{_bindir}/unzip %{_bindir}/unzip
%{_bindir}/unzip-%{_suffix} %{_bindir}/unzip-%{_suffix}
%ghost %_sysconfdir/alternatives/funzip %ghost %{_sysconfdir}/alternatives/funzip
%{_bindir}/funzip %{_bindir}/funzip
%{_bindir}/funzip-%{_suffix} %{_bindir}/funzip-%{_suffix}
%ghost %_sysconfdir/alternatives/unzipsfx %ghost %{_sysconfdir}/alternatives/unzipsfx
%{_bindir}/unzipsfx %{_bindir}/unzipsfx
%{_bindir}/unzipsfx-%{_suffix} %{_bindir}/unzipsfx-%{_suffix}
%{_bindir}/zipinfo %{_bindir}/zipinfo
%ghost %_sysconfdir/alternatives/zipgrep %ghost %{_sysconfdir}/alternatives/zipgrep
%{_bindir}/zipgrep %{_bindir}/zipgrep
%{_bindir}/zipgrep-%{_suffix} %{_bindir}/zipgrep-%{_suffix}
%if %{without rcc} %if %{without rcc}
%files doc %files doc
%defattr(-,root,root) %defattr(-,root,root)
%doc %{_mandir}/man1/* %{_mandir}/man1/*
%doc BUGS Contents History.* LICENSE README ToDo WHERE %doc BUGS Contents History.* LICENSE README ToDo WHERE
%doc *.txt proginfo %doc *.txt proginfo

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jun 16 14:58:41 UTC 2016 - tchvatal@suse.com
- Require properly the update-alternatives to not throw out errors
when installing in OBS chroot
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jan 26 13:25:54 UTC 2015 - tbehrens@suse.com Mon Jan 26 13:25:54 UTC 2015 - tbehrens@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package unzip # spec file for package unzip
# #
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,21 +16,29 @@
# #
%define _name unzip
%define fileversion 60
%bcond_with rcc %bcond_with rcc
%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
# NOTE: unzip.spec is the major file, if you want to update unzip-rcc.spec # NOTE: unzip.spec is the major file, if you want to update unzip-rcc.spec
# call pre_checkin.sh after editing unzip.spec # call pre_checkin.sh after editing unzip.spec
Name: unzip Name: unzip
%define _name unzip
Version: 6.00 Version: 6.00
Release: 0 Release: 0
%define fileversion 60
Summary: A program to unpack compressed files Summary: A program to unpack compressed files
License: BSD-3-Clause License: BSD-3-Clause
Group: Productivity/Archiving/Compression Group: Productivity/Archiving/Compression
Url: http://www.info-zip.org/ Url: http://www.info-zip.org/
Source: http://sourceforge.net/projects/infozip/files/UnZip%206.x%20%28latest%29/UnZip%206.0/%{_name}%{fileversion}.tar.gz Source: http://sourceforge.net/projects/infozip/files/UnZip%%206.x%%20%%28latest%%29/UnZip%%206.0/%{_name}%{fileversion}.tar.gz
Source1: pre_checkin.sh Source1: pre_checkin.sh
Patch0: unzip.dif Patch0: unzip.dif
Patch1: unzip-iso8859_2.patch Patch1: unzip-iso8859_2.patch
@ -43,20 +51,10 @@ Patch11: unzip-no-build-date.patch
Patch12: unzip-dont_call_isprint.patch Patch12: unzip-dont_call_isprint.patch
Patch13: Fix-CVE-2014-8139-unzip.patch Patch13: Fix-CVE-2014-8139-unzip.patch
Patch14: Fix-CVE-2014-8140-and-CVE-2014-8141.patch Patch14: Fix-CVE-2014-8140-and-CVE-2014-8141.patch
%if %{with rcc} Requires(post): update-alternatives
BuildRequires: librcc-devel Requires(preun): update-alternatives
Suggests: librcc0
Provides: %{_name} = %{version}
%define update_weight 20
%define _suffix rcc
%else
%define update_weight 10
%define _suffix plain
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: update-alternatives
Requires: update-alternatives
Recommends: %{_name}-doc Recommends: %{_name}-doc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
UnZip is an extraction utility for archives compressed in .zip format UnZip is an extraction utility for archives compressed in .zip format
@ -102,7 +100,7 @@ export RPM_OPT_FLAGS="%{optflags} \
make %{?_smp_mflags} -f unix/Makefile LF2="-ldl -pie" linux_noasm make %{?_smp_mflags} -f unix/Makefile LF2="-ldl -pie" linux_noasm
%check %check
make -f unix/Makefile check make %{?_smp_mflags} -f unix/Makefile check
%install %install
mkdir -p %{buildroot}%{_sysconfdir}/alternatives mkdir -p %{buildroot}%{_sysconfdir}/alternatives
@ -114,7 +112,7 @@ ln -s unzip %{buildroot}%{_bindir}/zipinfo
install unix/zipgrep "%{buildroot}%{_bindir}/zipgrep-"%{_suffix} install unix/zipgrep "%{buildroot}%{_bindir}/zipgrep-"%{_suffix}
for i in unzip funzip unzipsfx zipgrep; do for i in unzip funzip unzipsfx zipgrep; do
touch %{buildroot}%{_sysconfdir}/alternatives/$i touch %{buildroot}%{_sysconfdir}/alternatives/$i
ln -s %{_sysconfdir}/alternatives/$i %{buildroot}%_bindir/$i ln -s %{_sysconfdir}/alternatives/$i %{buildroot}%{_bindir}/$i
done done
# do not have the docu in both packages # do not have the docu in both packages
@ -126,36 +124,36 @@ done
%post %post
for bin in unzip funzip unzipsfx zipgrep; do for bin in unzip funzip unzipsfx zipgrep; do
/usr/sbin/update-alternatives --install %{_bindir}/$bin $bin "%{_bindir}/$bin-"%{_suffix} %{update_weight} %{_sbindir}/update-alternatives --install %{_bindir}/$bin $bin "%{_bindir}/$bin-"%{_suffix} %{update_weight}
done done
%preun %preun
if [ "$1" = 0 ] ; then if [ "$1" = 0 ] ; then
for bin in unzip funzip unzipsfx zipgrep; do for bin in unzip funzip unzipsfx zipgrep; do
/usr/sbin/update-alternatives --remove $bin "%{_bindir}/$bin"-%{_suffix} %{_sbindir}/update-alternatives --remove $bin "%{_bindir}/$bin"-%{_suffix}
done done
fi fi
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%ghost %_sysconfdir/alternatives/unzip %ghost %{_sysconfdir}/alternatives/unzip
%{_bindir}/unzip %{_bindir}/unzip
%{_bindir}/unzip-%{_suffix} %{_bindir}/unzip-%{_suffix}
%ghost %_sysconfdir/alternatives/funzip %ghost %{_sysconfdir}/alternatives/funzip
%{_bindir}/funzip %{_bindir}/funzip
%{_bindir}/funzip-%{_suffix} %{_bindir}/funzip-%{_suffix}
%ghost %_sysconfdir/alternatives/unzipsfx %ghost %{_sysconfdir}/alternatives/unzipsfx
%{_bindir}/unzipsfx %{_bindir}/unzipsfx
%{_bindir}/unzipsfx-%{_suffix} %{_bindir}/unzipsfx-%{_suffix}
%{_bindir}/zipinfo %{_bindir}/zipinfo
%ghost %_sysconfdir/alternatives/zipgrep %ghost %{_sysconfdir}/alternatives/zipgrep
%{_bindir}/zipgrep %{_bindir}/zipgrep
%{_bindir}/zipgrep-%{_suffix} %{_bindir}/zipgrep-%{_suffix}
%if %{without rcc} %if %{without rcc}
%files doc %files doc
%defattr(-,root,root) %defattr(-,root,root)
%doc %{_mandir}/man1/* %{_mandir}/man1/*
%doc BUGS Contents History.* LICENSE README ToDo WHERE %doc BUGS Contents History.* LICENSE README ToDo WHERE
%doc *.txt proginfo %doc *.txt proginfo