From 249fe1aa0769e2fa1be9355fb83aaf0deb063117 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Tue, 1 Apr 2014 07:42:36 +0100 Subject: [PATCH] Add patch to fix format-security FTBFS (RHBZ 1037412) --- zip-3.0-format-security.patch | 20 ++++++++++++++++++++ zip.spec | 10 +++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 zip-3.0-format-security.patch diff --git a/zip-3.0-format-security.patch b/zip-3.0-format-security.patch new file mode 100644 index 0000000..54ce2e6 --- /dev/null +++ b/zip-3.0-format-security.patch @@ -0,0 +1,20 @@ +--- a/zip.c ++++ a/zip.c +@@ -1028,7 +1028,7 @@ local void help_extended() + + for (i = 0; i < sizeof(text)/sizeof(char *); i++) + { +- printf(text[i]); ++ printf("%s", text[i]); + putchar('\n'); + } + #ifdef DOS +@@ -1225,7 +1225,7 @@ local void version_info() + CR_MAJORVER, CR_MINORVER, CR_BETA_VER, CR_VERSION_DATE); + for (i = 0; i < sizeof(cryptnote)/sizeof(char *); i++) + { +- printf(cryptnote[i]); ++ printf("%s", cryptnote[i]); + putchar('\n'); + } + ++i; /* crypt support means there IS at least one compilation option */ diff --git a/zip.spec b/zip.spec index 18c9569..7c9e00d 100644 --- a/zip.spec +++ b/zip.spec @@ -1,11 +1,12 @@ Summary: A file compression and packaging utility compatible with PKZIP Name: zip Version: 3.0 -Release: 9%{?dist} +Release: 10%{?dist} License: BSD Group: Applications/Archiving Source: http://downloads.sourceforge.net/infozip/zip30.tar.gz URL: http://www.info-zip.org/Zip.html + # This patch will probably be merged to zip 3.1 # http://www.info-zip.org/board/board.pl?m-1249408491/ Patch1: zip-3.0-exec-shield.patch @@ -14,6 +15,7 @@ Patch2: zip-3.0-currdir.patch # Not upstreamed. Patch3: zip-3.0-time.patch Patch4: man.patch +Patch5: zip-3.0-format-security.patch BuildRequires: bzip2-devel %description @@ -31,12 +33,12 @@ program. %patch2 -p1 -b .currdir %patch3 -p1 -b .time %patch4 -p1 -b .man +%patch5 -p1 -b .format-security %build make -f unix/Makefile prefix=%{_prefix} "CFLAGS_NOOPT=-I. -DUNIX $RPM_OPT_FLAGS" generic_gcc %{?_smp_mflags} %install -rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_bindir} mkdir -p $RPM_BULD_ROOT%{_mandir}/man1 @@ -44,7 +46,6 @@ make -f unix/Makefile prefix=$RPM_BUILD_ROOT%{_prefix} \ MANDIR=$RPM_BUILD_ROOT%{_mandir}/man1 install %files -%defattr(-,root,root,-) %doc README CHANGES TODO WHATSNEW WHERE LICENSE README.CR %doc proginfo/algorith.txt %{_bindir}/zipnote @@ -57,6 +58,9 @@ make -f unix/Makefile prefix=$RPM_BUILD_ROOT%{_prefix} \ %{_mandir}/man1/zipsplit.1* %changelog +* Tue Apr 1 2014 Peter Robinson 3.0-10 +- Add patch to fix format-security FTBFS (RHBZ 1037412) + * Sun Aug 04 2013 Fedora Release Engineering - 3.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild