Fix: missing compiler/linker flags

Resolves: RHEL-33526
This commit is contained in:
Jakub Martisko 2024-04-29 15:55:08 +02:00
parent a8beae149e
commit dc6ad88ffe
2 changed files with 35 additions and 10 deletions

12
zip-3.0-configure.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up zip30/unix/configure.nostrip zip30/unix/configure
--- zip30/unix/configure.nostrip 2009-11-30 10:18:09.000000000 +0100
+++ zip30/unix/configure 2009-11-30 10:21:08.354264213 +0100
@@ -17,7 +17,7 @@ CFLAGSR=${CFLAGS}
CC=${1-cc}
CFLAGS=${2-"-I. -DUNIX"}
LFLAGS1=''
-LFLAGS2=''
+LFLAGS2="${LFLAGS2}"
LN="ln -s"
CFLAGS_OPT=''

View File

@ -1,7 +1,7 @@
Summary: A file compression and packaging utility compatible with PKZIP Summary: A file compression and packaging utility compatible with PKZIP
Name: zip Name: zip
Version: 3.0 Version: 3.0
Release: 41%{?dist} Release: 42%{?dist}
License: Info-ZIP License: Info-ZIP
Source: http://downloads.sourceforge.net/infozip/zip30.tar.gz Source: http://downloads.sourceforge.net/infozip/zip30.tar.gz
URL: http://www.info-zip.org/Zip.html URL: http://www.info-zip.org/Zip.html
@ -18,6 +18,7 @@ Patch5: zip-3.0-format-security.patch
Patch6: zipnote.patch Patch6: zipnote.patch
Patch7: zip-gnu89-build.patch Patch7: zip-gnu89-build.patch
Patch8: buffer_overflow.patch Patch8: buffer_overflow.patch
Patch9: zip-3.0-configure.patch
BuildRequires: make BuildRequires: make
BuildRequires: bzip2-devel, gcc BuildRequires: bzip2-devel, gcc
Requires: unzip Requires: unzip
@ -33,17 +34,23 @@ program.
%prep %prep
%setup -q -n zip30 %setup -q -n zip30
%patch1 -p1 -b .exec-shield %patch 1 -p1
%patch2 -p1 -b .currdir %patch 2 -p1
%patch3 -p1 -b .time %patch 3 -p1
%patch4 -p1 -b .man %patch 4 -p1
%patch5 -p1 -b .format-security %patch 5 -p1
%patch6 -p1 -b .zipnote %patch 6 -p1
%patch7 -p1 -b .gnu89-build %patch 7 -p1
%patch8 -p1 %patch 8 -p1
%patch 9 -p1
%build %build
%{make_build} -f unix/Makefile prefix=%{_prefix} "CFLAGS_NOOPT=-I. -DUNIX $RPM_OPT_FLAGS" generic_gcc #Remove assembly file to force the c implementation of the crc functions
#Related to 3.0-33 and 3.0-34
rm crc_i386.S
rm match.S
%{make_build} -f unix/Makefile prefix=%{_prefix} CFLAGS_NOOPT="-I. -DUNIX -DNO_ASM $RPM_OPT_FLAGS" LFLAGS2="%{?__global_ldflags}" generic_gcc %{?_smp_mflags}
%install %install
mkdir -p $RPM_BUILD_ROOT%{_bindir} mkdir -p $RPM_BUILD_ROOT%{_bindir}
@ -66,6 +73,12 @@ mkdir -p $RPM_BULD_ROOT%{_mandir}/man1
%{_mandir}/man1/zipsplit.1* %{_mandir}/man1/zipsplit.1*
%changelog %changelog
* Wed Jul 03 2024 Jakub Martisko <jamartis@redhat.com> - 3.0-42
- Use C implementation of some functions instead of asm
- Fix the missing compiler/linker flags
- Minor spec clean up
Resolves: RHEL-33526
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 3.0-41 * Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 3.0-41
- Bump release for June 2024 mass rebuild - Bump release for June 2024 mass rebuild