From cf21eecc661ce10ce7e47c0412b7fd8ea07d2fcb Mon Sep 17 00:00:00 2001 From: travankor Date: Sat, 1 Feb 2020 23:42:26 -0700 Subject: [PATCH] zip: add Debian patches. --- srcpkgs/zip/patches/exec-stack.patch | 21 ++++++++++++++++++++ srcpkgs/zip/patches/reproducible-build.patch | 15 ++++++++++++++ srcpkgs/zip/patches/zipnote.patch | 16 +++++++++++++++ srcpkgs/zip/template | 6 +++--- 4 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/zip/patches/exec-stack.patch create mode 100644 srcpkgs/zip/patches/reproducible-build.patch create mode 100644 srcpkgs/zip/patches/zipnote.patch diff --git a/srcpkgs/zip/patches/exec-stack.patch b/srcpkgs/zip/patches/exec-stack.patch new file mode 100644 index 00000000000..1d3009f70eb --- /dev/null +++ b/srcpkgs/zip/patches/exec-stack.patch @@ -0,0 +1,21 @@ +From: Kees Cook +Subject: put stack markings in i386 assembly to avoid executable stack +Bug-Debian: http://bugs.debian.org/528280 +X-Debian-version: 3.0-2 + +--- crc_i386.S ++++ crc_i386.S +@@ -302,3 +302,5 @@ + #endif /* i386 || _i386 || _I386 || __i386 */ + + #endif /* !USE_ZLIB && !CRC_TABLE_ONLY */ ++.section .note.GNU-stack, "", @progbits ++.previous +--- match.S ++++ match.S +@@ -405,3 +405,5 @@ + #endif /* i386 || _I386 || _i386 || __i386 */ + + #endif /* !USE_ZLIB */ ++.section .note.GNU-stack, "", @progbits ++.previous diff --git a/srcpkgs/zip/patches/reproducible-build.patch b/srcpkgs/zip/patches/reproducible-build.patch new file mode 100644 index 00000000000..f0de5bf8eb0 --- /dev/null +++ b/srcpkgs/zip/patches/reproducible-build.patch @@ -0,0 +1,15 @@ +From: Santiago Vila +Subject: Remove (optional) build date to make the build reproducible +Bug-Debian: http://bugs.debian.org/779042 + +--- unix/unix.c ++++ unix/unix.c +@@ -1020,7 +1020,7 @@ + + + /* Define the compile date string */ +-#ifdef __DATE__ ++#if 0 + # define COMPILE_DATE " on " __DATE__ + #else + # define COMPILE_DATE "" diff --git a/srcpkgs/zip/patches/zipnote.patch b/srcpkgs/zip/patches/zipnote.patch new file mode 100644 index 00000000000..b8027746775 --- /dev/null +++ b/srcpkgs/zip/patches/zipnote.patch @@ -0,0 +1,16 @@ +From: Christian Spieler +Subject: zipnote.c: Close in_file instead of undefined file x +Bug-Debian: http://bugs.debian.org/628594 +X-Debian-version: 3.0-4 + +--- zipnote.c ++++ zipnote.c +@@ -661,7 +661,7 @@ + if ((r = zipcopy(z)) != ZE_OK) + ziperr(r, "was copying an entry"); + } +- fclose(x); ++ fclose(in_file); + + /* Write central directory and end of central directory with new comments */ + if ((c = zftello(y)) == (zoff_t)-1) /* get start of central */ diff --git a/srcpkgs/zip/template b/srcpkgs/zip/template index a964f998ab2..94cb4c96103 100644 --- a/srcpkgs/zip/template +++ b/srcpkgs/zip/template @@ -1,11 +1,11 @@ -# Template build file for 'zip'. +# Template file for 'zip' pkgname=zip version=3.0 -revision=5 +revision=6 wrksrc="zip30" short_desc="Create/update ZIP files compatible with pkzip" maintainer="Orphaned " -license="BSD" +license="Info-ZIP" homepage="http://infozip.sf.net/" distfiles="${SOURCEFORGE_SITE}/infozip/zip30.tar.gz" checksum=f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369