From c6669231a6cb61da7b7ceee7264101948cf1df35 Mon Sep 17 00:00:00 2001 From: David Levine Date: Wed, 14 Nov 2012 08:47:14 -0600 Subject: [PATCH] Removed support for zip from sendfiles. I added it as part of the sendfiles rewrite, f8baa5a34335fc0fc8ccabfabc601d0af73ab769, a few weeks ago. But because sendfiles fed zip from standard input, zip would use Zip64 extensions. That would require unzip 6.0 or later to extract, according to the zip man page. But current MacOS X uses unzip 5.52, so it broke there. --- etc/sendfiles | 6 ++---- man/sendfiles.man | 2 +- test/post/test-sendfiles | 7 +++---- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/etc/sendfiles b/etc/sendfiles index b3f4971..99c170e 100755 --- a/etc/sendfiles +++ b/etc/sendfiles @@ -12,7 +12,7 @@ usage='Usage: sendfiles [switches] -to recipient -subject subject '"\ or sendfiles [switches] recipient subject file1 [file2 ...] switches are: - -compress [bzip2 | compress | gzip | lzma | none | zip] + -compress [bzip2 | compress | gzip | lzma | none] -from -[delay] (expressed in seconds) -version @@ -145,7 +145,7 @@ fi #### Determine compression method and descriptive info. if [ x"$compress" = x ]; then - for compressor in gzip bzip2 lzma zip compress none; do + for compressor in gzip bzip2 lzma compress none; do if [ x"`finddir $compressor`" = x ]; then :; else compress="$compressor" break @@ -161,8 +161,6 @@ case $compress in conversion='; x-conversions=gzip' ;; lzma) compress='lzma -c'; uncompress='lzma -cd' conversion='; x-conversions=lzma' ;; - zip) compress='zip -q'; uncompress='unzip -p' - conversion='; x-conversions=zip' ;; none) compress=cat uncompress=cat; conversion= ;; *) printf 'sendfiles: unknown compression method "%s"\n' \ "$compress" >&2 diff --git a/man/sendfiles.man b/man/sendfiles.man index f8aec3f..020fd9d 100644 --- a/man/sendfiles.man +++ b/man/sendfiles.man @@ -9,7 +9,7 @@ sendfiles \- send multiple files via a MIME message .na .B sendfiles .RB [ -compress -.IR bzip2 " | " compress " | " gzip " | " lzma " | " none " | " zip ] +.IR bzip2 " | " compress " | " gzip " | " lzma " | " none ] .br .RB [ \-from .IR sender ] diff --git a/test/post/test-sendfiles b/test/post/test-sendfiles index cc45960..687c5d9 100755 --- a/test/post/test-sendfiles +++ b/test/post/test-sendfiles @@ -80,7 +80,7 @@ Usage: sendfiles [switches] -to recipient -subject subject file1 [file2 ...] or sendfiles [switches] recipient subject file1 [file2 ...] switches are: - -compress [bzip2 | compress | gzip | lzma | none | zip] + -compress [bzip2 | compress | gzip | lzma | none] -from -[delay] (expressed in seconds) -version @@ -104,7 +104,7 @@ run_test 'sendfiles -nonexistent' "Usage: sendfiles [switches] -to recipient \ or sendfiles [switches] recipient subject file1 [file2 ...] switches are: - -compress [bzip2 | compress | gzip | lzma | none | zip] + -compress [bzip2 | compress | gzip | lzma | none] -from -[delay] (expressed in seconds) -version @@ -119,7 +119,7 @@ Usage: sendfiles [switches] -to recipient \ or sendfiles [switches] recipient subject file1 [file2 ...] switches are: - -compress [bzip2 | compress | gzip | lzma | none | zip] + -compress [bzip2 | compress | gzip | lzma | none] -from -[delay] (expressed in seconds) -version @@ -136,7 +136,6 @@ Usage: sendfiles [switches] -to recipient \ [ "`findprog gzip`" ] && test_sendfiles 'gzip -cd' new -compress gzip [ "`findprog gzip`" ] && test_sendfiles 'gzip -cd' new -gzip [ "`findprog lzma`" ] && test_sendfiles 'lzma -cd' new -compress lzma -[ "`findprog zip`" ] && test_sendfiles 'unzip -p' new -compress zip # check with no compression cat >"$expected" <