diff --git a/.cvsignore b/.cvsignore index 850d008..9709676 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -gzip-1.3.12.tar.gz +gzip-1.3.13.tar.gz diff --git a/gzip-1.3.12-futimens.patch b/gzip-1.3.12-futimens.patch deleted file mode 100644 index a6cfd5a..0000000 --- a/gzip-1.3.12-futimens.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- gzip-1.3.12/lib/utimens.h.pom 2007-02-23 19:25:21.000000000 +0100 -+++ gzip-1.3.12/lib/utimens.h 2007-06-04 12:18:29.000000000 +0200 -@@ -1,3 +1,3 @@ - #include --int futimens (int, char const *, struct timespec const [2]); -+int futimens_oi (int, char const *, struct timespec const [2]); - int utimens (char const *, struct timespec const [2]); ---- gzip-1.3.12/lib/utimens.c.pom 2007-01-18 09:33:34.000000000 +0100 -+++ gzip-1.3.12/lib/utimens.c 2007-06-04 12:18:23.000000000 +0200 -@@ -75,7 +75,7 @@ struct utimbuf - Return 0 on success, -1 (setting errno) on failure. */ - - int --futimens (int fd ATTRIBUTE_UNUSED, -+futimens_oi (int fd ATTRIBUTE_UNUSED, - char const *file, struct timespec const timespec[2]) - { - /* Some Linux-based NFS clients are buggy, and mishandle time stamps -@@ -185,5 +185,5 @@ futimens (int fd ATTRIBUTE_UNUSED, - int - utimens (char const *file, struct timespec const timespec[2]) - { -- return futimens (-1, file, timespec); -+ return futimens_oi (-1, file, timespec); - } ---- gzip-1.3.12/gzip.c.pom 2007-06-04 12:17:29.000000000 +0200 -+++ gzip-1.3.12/gzip.c 2007-06-04 12:17:59.000000000 +0200 -@@ -1643,7 +1643,7 @@ local void copy_stat(ifstat) - } - } - -- if (futimens (ofd, ofname, timespec) != 0) -+ if (futimens_oi (ofd, ofname, timespec) != 0) - { - int e = errno; - WARN ((stderr, "%s: ", program_name)); diff --git a/gzip-1.3.9-cve-2006-4337.patch b/gzip-1.3.13-cve-2006-4337.patch similarity index 98% rename from gzip-1.3.9-cve-2006-4337.patch rename to gzip-1.3.13-cve-2006-4337.patch index 3ba505d..af0eb4e 100644 --- a/gzip-1.3.9-cve-2006-4337.patch +++ b/gzip-1.3.13-cve-2006-4337.patch @@ -7,7 +7,7 @@ - if ((start[17] & 0xffff) != 0) - gzip_error ("Bad table\n"); + if ((start[17] & 0xffff) != 0 || tablebits > 16) /* 16 for weight below */ -+ error("Bad table (case b)\n"); ++ gzip_error ("Bad table (case b)\n"); jutbits = 16 - tablebits; for (i = 1; i <= (unsigned)tablebits; i++) { diff --git a/gzip-1.3.9-rsync.patch b/gzip-1.3.13-rsync.patch similarity index 84% rename from gzip-1.3.9-rsync.patch rename to gzip-1.3.13-rsync.patch index 61f2d50..2c5d94a 100644 --- a/gzip-1.3.9-rsync.patch +++ b/gzip-1.3.13-rsync.patch @@ -1,33 +1,7 @@ -diff -up gzip-1.3.12/trees.c.rsync gzip-1.3.12/trees.c ---- gzip-1.3.12/trees.c.rsync 2006-11-20 09:40:33.000000000 +0100 -+++ gzip-1.3.12/trees.c 2008-09-01 14:35:12.000000000 +0200 -@@ -860,9 +860,10 @@ local void send_all_trees(lcodes, dcodes - * trees or store, and output the encoded block to the zip file. This function - * returns the total compressed length for the file so far. - */ --off_t flush_block(buf, stored_len, eof) -+off_t flush_block(buf, stored_len, pad, eof) - char *buf; /* input block, or NULL if too old */ - ulg stored_len; /* length of input block */ -+ int pad; /* pad output to byte boundary */ - int eof; /* true if this is the last block for a file */ - { - ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */ -@@ -955,6 +956,10 @@ off_t flush_block(buf, stored_len, eof) - Assert (input_len == bytes_in, "bad input size"); - bi_windup(); - compressed_len += 7; /* align on byte boundary */ -+ } else if (pad && (compressed_len % 8) != 0) { -+ send_bits((STORED_BLOCK<<1)+eof, 3); /* send block type */ -+ compressed_len = (compressed_len + 3 + 7) & ~7L; -+ copy_block(buf, 0, 1); /* with header */ - } - - return compressed_len >> 3; -diff -up gzip-1.3.12/deflate.c.rsync gzip-1.3.12/deflate.c ---- gzip-1.3.12/deflate.c.rsync 2006-12-08 00:53:00.000000000 +0100 -+++ gzip-1.3.12/deflate.c 2008-09-01 14:35:12.000000000 +0200 -@@ -135,6 +135,14 @@ static char rcsid[] = "$Id: deflate.c,v +diff -up gzip-1.3.13/deflate.c.rsync gzip-1.3.13/deflate.c +--- gzip-1.3.13/deflate.c.rsync 2009-09-26 20:43:28.000000000 +0200 ++++ gzip-1.3.13/deflate.c 2009-12-01 16:14:24.656387546 +0100 +@@ -131,6 +131,14 @@ #endif /* Matches of length 3 are discarded if their distance exceeds TOO_FAR */ @@ -42,7 +16,7 @@ diff -up gzip-1.3.12/deflate.c.rsync gzip-1.3.12/deflate.c /* =========================================================================== * Local data used by the "longest match" routines. */ -@@ -216,6 +224,8 @@ local int compr_level; +@@ -212,6 +220,8 @@ local int compr_level; unsigned near good_match; /* Use a faster search when the previous match is longer than this */ @@ -51,7 +25,7 @@ diff -up gzip-1.3.12/deflate.c.rsync gzip-1.3.12/deflate.c /* Values for max_lazy_match, good_match and max_chain_length, depending on * the desired pack level (0..9). The values given below have been tuned to -@@ -314,6 +324,10 @@ void lm_init (pack_level, flags) +@@ -310,6 +320,10 @@ void lm_init (pack_level, flags) #endif /* prev will be initialized on the fly */ @@ -62,7 +36,7 @@ diff -up gzip-1.3.12/deflate.c.rsync gzip-1.3.12/deflate.c /* Set the default configuration parameters: */ max_lazy_match = configuration_table[pack_level].max_lazy; -@@ -550,6 +564,8 @@ local void fill_window() +@@ -546,6 +560,8 @@ local void fill_window() memcpy((char*)window, (char*)window+WSIZE, (unsigned)WSIZE); match_start -= WSIZE; strstart -= WSIZE; /* we now have strstart >= MAX_DIST: */ @@ -71,7 +45,7 @@ diff -up gzip-1.3.12/deflate.c.rsync gzip-1.3.12/deflate.c block_start -= (long) WSIZE; -@@ -577,13 +593,46 @@ local void fill_window() +@@ -573,13 +589,46 @@ local void fill_window() } } @@ -119,7 +93,7 @@ diff -up gzip-1.3.12/deflate.c.rsync gzip-1.3.12/deflate.c /* =========================================================================== * Processes a new input file and return its compressed length. This -@@ -594,7 +643,7 @@ local void fill_window() +@@ -590,7 +639,7 @@ local void fill_window() local off_t deflate_fast() { IPos hash_head; /* head of the hash chain */ @@ -128,7 +102,7 @@ diff -up gzip-1.3.12/deflate.c.rsync gzip-1.3.12/deflate.c unsigned match_length = 0; /* length of best match */ prev_length = MIN_MATCH-1; -@@ -624,6 +673,7 @@ local off_t deflate_fast() +@@ -620,6 +669,7 @@ local off_t deflate_fast() lookahead -= match_length; @@ -136,7 +110,7 @@ diff -up gzip-1.3.12/deflate.c.rsync gzip-1.3.12/deflate.c /* Insert new strings in the hash table only if the match length * is not too large. This saves time but degrades compression. */ -@@ -652,9 +702,14 @@ local off_t deflate_fast() +@@ -648,9 +698,14 @@ local off_t deflate_fast() /* No match, output a literal byte */ Tracevv((stderr,"%c",window[strstart])); flush = ct_tally (0, window[strstart]); @@ -151,7 +125,7 @@ diff -up gzip-1.3.12/deflate.c.rsync gzip-1.3.12/deflate.c if (flush) FLUSH_BLOCK(0), block_start = strstart; /* Make sure that we always have enough lookahead, except -@@ -728,6 +783,7 @@ off_t deflate() +@@ -724,6 +779,7 @@ off_t deflate() */ lookahead -= prev_length-1; prev_length -= 2; @@ -159,7 +133,7 @@ diff -up gzip-1.3.12/deflate.c.rsync gzip-1.3.12/deflate.c do { strstart++; INSERT_STRING(strstart, hash_head); -@@ -740,24 +796,40 @@ off_t deflate() +@@ -736,24 +792,40 @@ off_t deflate() match_available = 0; match_length = MIN_MATCH-1; strstart++; @@ -203,18 +177,36 @@ diff -up gzip-1.3.12/deflate.c.rsync gzip-1.3.12/deflate.c strstart++; lookahead--; } -diff -up gzip-1.3.12/gzip.c.rsync gzip-1.3.12/gzip.c ---- gzip-1.3.12/gzip.c.rsync 2007-03-20 06:09:51.000000000 +0100 -+++ gzip-1.3.12/gzip.c 2008-09-01 14:35:12.000000000 +0200 -@@ -231,6 +231,7 @@ int ofd; /* output fil +diff -up gzip-1.3.13/doc/gzip.texi.rsync gzip-1.3.13/doc/gzip.texi +--- gzip-1.3.13/doc/gzip.texi.rsync 2009-09-28 11:08:16.000000000 +0200 ++++ gzip-1.3.13/doc/gzip.texi 2009-12-01 16:14:24.664394713 +0100 +@@ -353,6 +353,14 @@ specified on the command line are direct + into the directory and compress all the files it finds there (or + decompress them in the case of @command{gunzip}). + ++@item --rsyncable ++While compressing, synchronize the output occasionally based on the ++input. This reduces compression by about 1 percent most cases, but ++means that the @code{rsync} program can take advantage of similarities ++in the uncompressed input when syncronizing two files compressed with ++this flag. @code{gunzip} cannot tell the difference between a ++compressed file created with this option, and one created without it. ++ + @item --suffix @var{suf} + @itemx -S @var{suf} + Use suffix @var{suf} instead of @samp{.gz}. Any suffix can be +diff -up gzip-1.3.13/gzip.c.rsync gzip-1.3.13/gzip.c +--- gzip-1.3.13/gzip.c.rsync 2009-09-26 20:56:02.000000000 +0200 ++++ gzip-1.3.13/gzip.c 2009-12-01 16:18:17.121387126 +0100 +@@ -229,6 +229,7 @@ int ofd; /* output fil unsigned insize; /* valid bytes in inbuf */ unsigned inptr; /* index of next byte to be processed in inbuf */ unsigned outcnt; /* bytes in output buffer */ +int rsync = 0; /* make ryncable chunks */ - struct option longopts[] = - { -@@ -260,6 +261,7 @@ struct option longopts[] = + static int handled_sig[] = + { +@@ -282,6 +283,7 @@ struct option longopts[] = {"best", 0, 0, '9'}, /* compress better */ {"lzw", 0, 0, 'Z'}, /* make output compatible with old compress */ {"bits", 1, 0, 'b'}, /* max number of bits per code (implies -Z) */ @@ -222,7 +214,7 @@ diff -up gzip-1.3.12/gzip.c.rsync gzip-1.3.12/gzip.c { 0, 0, 0, 0 } }; -@@ -341,6 +343,7 @@ local void help() +@@ -363,6 +365,7 @@ local void help() " -Z, --lzw produce output compatible with old compress", " -b, --bits=BITS max number of bits per code (implies -Z)", #endif @@ -230,7 +222,7 @@ diff -up gzip-1.3.12/gzip.c.rsync gzip-1.3.12/gzip.c "", "With no FILE, or when FILE is -, read standard input.", "", -@@ -469,6 +472,9 @@ int main (argc, argv) +@@ -493,6 +496,9 @@ int main (argc, argv) recursive = 1; #endif break; @@ -240,9 +232,9 @@ diff -up gzip-1.3.12/gzip.c.rsync gzip-1.3.12/gzip.c case 'S': #ifdef NO_MULTIPLE_DOTS if (*optarg == '.') optarg++; -diff -up gzip-1.3.12/gzip.h.rsync gzip-1.3.12/gzip.h ---- gzip-1.3.12/gzip.h.rsync 2007-03-20 06:09:51.000000000 +0100 -+++ gzip-1.3.12/gzip.h 2008-09-01 14:35:12.000000000 +0200 +diff -up gzip-1.3.13/gzip.h.rsync gzip-1.3.13/gzip.h +--- gzip-1.3.13/gzip.h.rsync 2009-09-26 20:43:28.000000000 +0200 ++++ gzip-1.3.13/gzip.h 2009-12-01 16:14:24.664394713 +0100 @@ -158,6 +158,7 @@ EXTERN(uch, window); /* Sliding extern unsigned insize; /* valid bytes in inbuf */ extern unsigned inptr; /* index of next byte to be processed in inbuf */ @@ -260,21 +252,29 @@ diff -up gzip-1.3.12/gzip.h.rsync gzip-1.3.12/gzip.h /* in bits.c */ void bi_init OF((file_t zipfile)); -diff -up gzip-1.3.12/doc/gzip.texi.rsync gzip-1.3.12/doc/gzip.texi ---- gzip-1.3.12/doc/gzip.texi.rsync 2007-02-06 00:29:04.000000000 +0100 -+++ gzip-1.3.12/doc/gzip.texi 2008-09-01 14:35:12.000000000 +0200 -@@ -350,6 +350,14 @@ specified on the command line are direct - into the directory and compress all the files it finds there (or - decompress them in the case of @command{gunzip}). +diff -up gzip-1.3.13/trees.c.rsync gzip-1.3.13/trees.c +--- gzip-1.3.13/trees.c.rsync 2009-09-26 20:43:28.000000000 +0200 ++++ gzip-1.3.13/trees.c 2009-12-01 16:14:24.655388257 +0100 +@@ -856,9 +856,10 @@ local void send_all_trees(lcodes, dcodes + * trees or store, and output the encoded block to the zip file. This function + * returns the total compressed length for the file so far. + */ +-off_t flush_block(buf, stored_len, eof) ++off_t flush_block(buf, stored_len, pad, eof) + char *buf; /* input block, or NULL if too old */ + ulg stored_len; /* length of input block */ ++ int pad; /* pad output to byte boundary */ + int eof; /* true if this is the last block for a file */ + { + ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */ +@@ -951,6 +952,10 @@ off_t flush_block(buf, stored_len, eof) + Assert (input_len == bytes_in, "bad input size"); + bi_windup(); + compressed_len += 7; /* align on byte boundary */ ++ } else if (pad && (compressed_len % 8) != 0) { ++ send_bits((STORED_BLOCK<<1)+eof, 3); /* send block type */ ++ compressed_len = (compressed_len + 3 + 7) & ~7L; ++ copy_block(buf, 0, 1); /* with header */ + } -+@item --rsyncable -+While compressing, synchronize the output occasionally based on the -+input. This reduces compression by about 1 percent most cases, but -+means that the @code{rsync} program can take advantage of similarities -+in the uncompressed input when syncronizing two files compressed with -+this flag. @code{gunzip} cannot tell the difference between a -+compressed file created with this option, and one created without it. -+ - @item --suffix @var{suf} - @itemx -S @var{suf} - Use suffix @var{suf} instead of @samp{.gz}. Any suffix can be + return compressed_len >> 3; diff --git a/gzip.spec b/gzip.spec index 8a2a4cd..bdb7da5 100644 --- a/gzip.spec +++ b/gzip.spec @@ -1,21 +1,20 @@ Summary: The GNU data compression program Name: gzip -Version: 1.3.12 -Release: 12%{?dist} +Version: 1.3.13 +Release: 1%{?dist} # info pages are under GFDL license -License: GPLv2 and GFDL +License: GPLv3+ and GFDL Group: Applications/File Source: http://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.gz Patch0: gzip-1.3.12-openbsd-owl-tmp.patch Patch1: gzip-1.3.5-zforce.patch Patch3: gzip-1.3.9-stderr.patch Patch4: gzip-1.3.10-zgreppipe.patch -Patch5: gzip-1.3.9-rsync.patch +Patch5: gzip-1.3.13-rsync.patch Patch7: gzip-1.3.9-addsuffix.patch Patch14: gzip-1.3.5-cve-2006-4338.patch -Patch15: gzip-1.3.9-cve-2006-4337.patch +Patch15: gzip-1.3.13-cve-2006-4337.patch Patch16: gzip-1.3.5-cve-2006-4337_len.patch -Patch17: gzip-1.3.12-futimens.patch Patch18: gzip-1.3.12-zdiff.patch URL: http://www.gzip.org/ Requires: /sbin/install-info @@ -41,8 +40,8 @@ very commonly used data compression program. %patch14 -p1 -b .4338 %patch15 -p1 -b .4337 %patch16 -p1 -b .4337l -%patch17 -p1 -b .futimens %patch18 -p1 -b .ret + %build export DEFS="NO_ASM" export CPPFLAGS="-DHAVE_LSTAT" @@ -93,6 +92,13 @@ fi %{_infodir}/gzip.info* %changelog +* Tue Dec 1 2009 Karel Klic - 1.3.13-1 +- New upstream version +- Updated license from GPLv2 to GPLv3+ +- Removed gzip-1.3.12-futimens.patch, as it is fixed in the new version +- Updated rsync patch to the new upstream version +- Updated cve-2006-4337 patch to use gzip_error instead of error + * Fri Oct 9 2009 Ivana Varekova - 1.3.12-12 - change the source tag diff --git a/sources b/sources index ad4e4be..0989d60 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b5bac2d21840ae077e0217bc5e4845b1 gzip-1.3.12.tar.gz +c54a31b93e865f6a4410b2dc64662706 gzip-1.3.13.tar.gz