diff options
Diffstat (limited to 'opt/zip')
| -rw-r--r-- | opt/zip/.footprint | 13 | ||||
| -rw-r--r-- | opt/zip/.signature | 13 | ||||
| -rw-r--r-- | opt/zip/MAKEPKG | 56 | ||||
| -rw-r--r-- | opt/zip/zip-3.0-currdir.patch | 12 | ||||
| -rw-r--r-- | opt/zip/zip-3.0-exec-shield.patch | 20 | ||||
| -rw-r--r-- | opt/zip/zip-3.0-format-security.patch | 20 | ||||
| -rw-r--r-- | opt/zip/zip-3.0-no-crypt.patch | 57 | ||||
| -rw-r--r-- | opt/zip/zip-3.0-pic.patch | 15 | ||||
| -rw-r--r-- | opt/zip/zip-gnu89-build.patch | 15 | ||||
| -rw-r--r-- | opt/zip/zipnote.patch | 13 |
10 files changed, 234 insertions, 0 deletions
diff --git a/opt/zip/.footprint b/opt/zip/.footprint new file mode 100644 index 0000000..c288a6a --- /dev/null +++ b/opt/zip/.footprint @@ -0,0 +1,13 @@ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/zip +-rwxr-xr-x root/root usr/bin/zipcloak +-rwxr-xr-x root/root usr/bin/zipnote +-rwxr-xr-x root/root usr/bin/zipsplit +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/man/ +drwxr-xr-x root/root usr/share/man/man1/ +-rw-r--r-- root/root usr/share/man/man1/zip.1.gz +-rw-r--r-- root/root usr/share/man/man1/zipcloak.1.gz +-rw-r--r-- root/root usr/share/man/man1/zipnote.1.gz +-rw-r--r-- root/root usr/share/man/man1/zipsplit.1.gz diff --git a/opt/zip/.signature b/opt/zip/.signature new file mode 100644 index 0000000..b560b4e --- /dev/null +++ b/opt/zip/.signature @@ -0,0 +1,13 @@ +RWTZ9IduCSQ/mIcd/eStl8rm0rvvng1qo3KS+dzkf3RI2hkFFqnbKKiPAhEP25xUJT5kjEe2BvNGeugWYcpohhI3rsA/XFzD+Ao= + +SHA256 (MAKEPKG) = 5312eeffb186119a990cb13715207ca18732f75371568dad0353a98e66abc15e +SHA256 (.footprint) = 7e128e0a910cd361b3d50b36d155016a1e368456fac92d076f1d7b8d6f320d34 +SHA256 (zip30.tar.gz) = f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369 +SHA256 (zipnote.patch) = 89249a3f1fdf838b795ce432a2d763fdbe913d6a146541e41b7a2e2769291ba0 +SHA256 (zip-3.0-no-crypt.patch) = 32d263c492dbc2b37b71d0aa80e566283422e8e6493d91f8aa12946d6d587a4a +SHA256 (zip-3.0-pic.patch) = afca923887828f6ccdcb98bcb1130f138d014614ca49c2a2526bd0fdc91dda6e +SHA256 (zip-3.0-currdir.patch) = 44cac3d4e8b447988b6e4eeb4bb6e701110cedfb09ea49eac471011328c8acab +SHA256 (zip-3.0-exec-shield.patch) = 10f0f3756a2415e33edf1455373b322404962b743b3a52a757b669e47dd7f1b2 +SHA256 (zip-gnu89-build.patch) = 74c767b5c6699c0fbb1649c93182d6aa89d595e115444cb67a3d380009fe7c1c +SHA256 (zip-3.0-format-security.patch) = 3759134487afad9c63e2e9693aa05b9dcc67f55a9ef961e82074b587b094292a +SHA256 (zip#3.0-1.pkg.tar.gz) = e9c3c6dad75ddd69cc8695a7a2e3ad2d3885c9da5fd4b7fa93302b07e4ef52e8 diff --git a/opt/zip/MAKEPKG b/opt/zip/MAKEPKG new file mode 100644 index 0000000..0c9e51e --- /dev/null +++ b/opt/zip/MAKEPKG @@ -0,0 +1,56 @@ +#!/bin/mkpkg +# description: Compression and file packaging utility +# url: https://infozip.sourceforge.net/Zip.html + +name=zip +version=3.0 +release=1 +depends=(bzip2) +source=(https://downloads.sourceforge.net/sourceforge/infozip/zip30.tar.gz + zipnote.patch + zip-3.0-no-crypt.patch + zip-3.0-pic.patch + zip-3.0-currdir.patch + zip-3.0-exec-shield.patch + zip-gnu89-build.patch + zip-3.0-format-security.patch) +sha256sums=( + "f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369" + "89249a3f1fdf838b795ce432a2d763fdbe913d6a146541e41b7a2e2769291ba0" + "32d263c492dbc2b37b71d0aa80e566283422e8e6493d91f8aa12946d6d587a4a" + "afca923887828f6ccdcb98bcb1130f138d014614ca49c2a2526bd0fdc91dda6e" + "44cac3d4e8b447988b6e4eeb4bb6e701110cedfb09ea49eac471011328c8acab" + "10f0f3756a2415e33edf1455373b322404962b743b3a52a757b669e47dd7f1b2" + "74c767b5c6699c0fbb1649c93182d6aa89d595e115444cb67a3d380009fe7c1c" + "3759134487afad9c63e2e9693aa05b9dcc67f55a9ef961e82074b587b094292a" +) + +build() { + cd zip30 + + + for p in \ + zip-3.0-format-security.patch \ + zip-3.0-exec-shield.patch \ + zip-3.0-currdir.patch \ + zipnote.patch \ + zip-3.0-pic.patch \ + zip-3.0-no-crypt.patch \ + zip-gnu89-build.patch + do + patch -Np1 -i $SRC/$p + done + + make -f unix/Makefile CC=clang LOCAL_ZIP="$CFLAGS" prefix=/usr + make -f unix/Makefile INSTALL=install \ + prefix=$PKG/usr \ + MANDIR=$PKG/usr/share/man/man1 \ + install +} + +signify() { + untrusted comment: public key + RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3 +} + +# vim: filetype=sh diff --git a/opt/zip/zip-3.0-currdir.patch b/opt/zip/zip-3.0-currdir.patch new file mode 100644 index 0000000..40da32e --- /dev/null +++ b/opt/zip/zip-3.0-currdir.patch @@ -0,0 +1,12 @@ +diff -up zip30/util.c.currdir zip30/util.c +--- zip30/util.c.currdir 2009-11-16 12:42:17.783961701 +0100 ++++ zip30/util.c 2009-11-16 12:42:58.185960707 +0100 +@@ -493,6 +493,8 @@ int cs; /* force case-se + /* Compare the sh pattern p with the string s and return true if they match, + false if they don't or if there is a syntax error in the pattern. */ + { ++ while (s[0] == '.' && s[1] == '/') ++ s += 2; /* strip redundant leading "./" sections */ + return recmatch(p, s, cs) == 1; + } + diff --git a/opt/zip/zip-3.0-exec-shield.patch b/opt/zip/zip-3.0-exec-shield.patch new file mode 100644 index 0000000..05c1a6c --- /dev/null +++ b/opt/zip/zip-3.0-exec-shield.patch @@ -0,0 +1,20 @@ +diff -up zip30/crc_i386.S.exec_shield zip30/crc_i386.S +--- zip30/crc_i386.S.exec_shield 2009-11-13 18:37:45.000000000 +0100 ++++ zip30/crc_i386.S 2009-11-13 18:39:54.435390166 +0100 +@@ -302,3 +302,6 @@ _crc32: /* ulg c + #endif /* i386 || _i386 || _I386 || __i386 */ + + #endif /* !USE_ZLIB && !CRC_TABLE_ONLY */ ++ ++.section .note.GNU-stack, "", @progbits ++.previous +diff -up zip30/match.S.exec_shield zip30/match.S +--- zip30/match.S.exec_shield 2005-01-28 10:40:14.000000000 +0100 ++++ zip30/match.S 2009-11-13 18:39:48.570389058 +0100 +@@ -405,3 +405,6 @@ L__return: + #endif /* i386 || _I386 || _i386 || __i386 */ + + #endif /* !USE_ZLIB */ ++ ++.section .note.GNU-stack, "", @progbits ++.previous diff --git a/opt/zip/zip-3.0-format-security.patch b/opt/zip/zip-3.0-format-security.patch new file mode 100644 index 0000000..54ce2e6 --- /dev/null +++ b/opt/zip/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/opt/zip/zip-3.0-no-crypt.patch b/opt/zip/zip-3.0-no-crypt.patch new file mode 100644 index 0000000..9a1302c --- /dev/null +++ b/opt/zip/zip-3.0-no-crypt.patch @@ -0,0 +1,57 @@ +fix building when NO_CRYPT is used + +forward ported from zip-2.32 + +http://bugs.gentoo.org/238398 + +--- a/zip.c ++++ b/zip.c +@@ -3452,6 +3452,9 @@ char **argv; /* command line tokens */ + + /* Key not yet specified. If needed, get/verify it now. */ + if (key_needed) { ++#if !CRYPT ++ ZIPERR(ZE_PARMS, "encryption not supported"); ++#else /* CRYPT */ + if ((key = malloc(IZ_PWLEN+1)) == NULL) { + ZIPERR(ZE_MEM, "was getting encryption password"); + } +@@ -3478,6 +3481,7 @@ char **argv; /* command line tokens */ + if (r) { + ZIPERR(ZE_PARMS, "password verification failed"); + } ++#endif + } + if (key) { + /* if -P "" could get here */ +--- a/zipcloak.c ++++ b/zipcloak.c +@@ -744,6 +744,28 @@ struct option_struct far options[] = { + + int main OF((void)); + ++void zipmessage_nl(a, nl) ++ZCONST char *a; ++int nl; ++{ ++} ++ ++void zipmessage(a, b) ++ZCONST char *a, *b; ++{ ++} ++ ++int set_filetype(out_path) ++ char *out_path; ++{ ++} ++ ++int rename_split(temp_name, out_path) ++ char *temp_name; ++ char *out_path; ++{ ++} ++ + void zipwarn(msg1, msg2) + ZCONST char *msg1, *msg2; + { diff --git a/opt/zip/zip-3.0-pic.patch b/opt/zip/zip-3.0-pic.patch new file mode 100644 index 0000000..89a52e2 --- /dev/null +++ b/opt/zip/zip-3.0-pic.patch @@ -0,0 +1,15 @@ +if our toolchain generates PIC by default, then do not use the hand written +assembly files as none of it is PIC friendly. + +--- a/unix/configure ++++ b/unix/configure +@@ -29,6 +29,9 @@ + echo Check if we can use asm code + OBJA="" + OCRCU8="" ++piclib="$(echo | $CPP -dM $CFLAGS - | grep -i __pic__)" ++echo "Checking if compiler wants to create pic code" ++[ "$piclib" = "" ] && \ + if eval "$CPP match.S > _match.s 2>/dev/null"; then + if test ! -s _match.s || grep error < _match.s > /dev/null; then + : diff --git a/opt/zip/zip-gnu89-build.patch b/opt/zip/zip-gnu89-build.patch new file mode 100644 index 0000000..65ee7a7 --- /dev/null +++ b/opt/zip/zip-gnu89-build.patch @@ -0,0 +1,15 @@ +zip uses C89-only features, so it needs to be built in C89 mode. + +diff --git a/unix/Makefile b/unix/Makefile +index 86cf54bf0f56cea9..244390893eab5fc6 100644 +--- a/unix/Makefile ++++ b/unix/Makefile +@@ -202,7 +202,7 @@ generic: flags + eval $(MAKE) $(MAKEF) zips `cat flags` + + generic_gcc: +- $(MAKE) $(MAKEF) generic CC=gcc CPP="gcc -E" ++ $(MAKE) $(MAKEF) generic CC="gcc -std=gnu89" CPP="gcc -E" + + # AT&T 6300 PLUS (don't know yet how to allocate 64K bytes): + att6300nodir: diff --git a/opt/zip/zipnote.patch b/opt/zip/zipnote.patch new file mode 100644 index 0000000..4177a7d --- /dev/null +++ b/opt/zip/zipnote.patch @@ -0,0 +1,13 @@ +diff --git a/zipnote.c b/zipnote.c +index 5e02cb6..996f012 100644 +--- a/zipnote.c ++++ b/zipnote.c +@@ -661,7 +661,7 @@ char **argv; /* command line tokens */ + 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 */ |
