New upstream version

This commit is contained in:
Karel Klíč 2009-12-01 15:50:17 +00:00
parent d809faabf5
commit 2dbffede93
6 changed files with 84 additions and 114 deletions

View File

@ -1 +1 @@
gzip-1.3.12.tar.gz gzip-1.3.13.tar.gz

View File

@ -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 <time.h>
-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));

View File

@ -7,7 +7,7 @@
- if ((start[17] & 0xffff) != 0) - if ((start[17] & 0xffff) != 0)
- gzip_error ("Bad table\n"); - gzip_error ("Bad table\n");
+ if ((start[17] & 0xffff) != 0 || tablebits > 16) /* 16 for weight below */ + 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; jutbits = 16 - tablebits;
for (i = 1; i <= (unsigned)tablebits; i++) { for (i = 1; i <= (unsigned)tablebits; i++) {

View File

@ -1,33 +1,7 @@
diff -up gzip-1.3.12/trees.c.rsync gzip-1.3.12/trees.c diff -up gzip-1.3.13/deflate.c.rsync gzip-1.3.13/deflate.c
--- gzip-1.3.12/trees.c.rsync 2006-11-20 09:40:33.000000000 +0100 --- gzip-1.3.13/deflate.c.rsync 2009-09-26 20:43:28.000000000 +0200
+++ gzip-1.3.12/trees.c 2008-09-01 14:35:12.000000000 +0200 +++ gzip-1.3.13/deflate.c 2009-12-01 16:14:24.656387546 +0100
@@ -860,9 +860,10 @@ local void send_all_trees(lcodes, dcodes @@ -131,6 +131,14 @@
* 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
#endif #endif
/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */ /* 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. * 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; unsigned near good_match;
/* Use a faster search when the previous match is longer than this */ /* 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 /* 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 * 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 #endif
/* prev will be initialized on the fly */ /* 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: /* Set the default configuration parameters:
*/ */
max_lazy_match = configuration_table[pack_level].max_lazy; 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); memcpy((char*)window, (char*)window+WSIZE, (unsigned)WSIZE);
match_start -= WSIZE; match_start -= WSIZE;
strstart -= WSIZE; /* we now have strstart >= MAX_DIST: */ 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; 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 * 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() local off_t deflate_fast()
{ {
IPos hash_head; /* head of the hash chain */ 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 */ unsigned match_length = 0; /* length of best match */
prev_length = MIN_MATCH-1; 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; 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 /* Insert new strings in the hash table only if the match length
* is not too large. This saves time but degrades compression. * 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 */ /* No match, output a literal byte */
Tracevv((stderr,"%c",window[strstart])); Tracevv((stderr,"%c",window[strstart]));
flush = ct_tally (0, 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; if (flush) FLUSH_BLOCK(0), block_start = strstart;
/* Make sure that we always have enough lookahead, except /* 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; lookahead -= prev_length-1;
prev_length -= 2; prev_length -= 2;
@ -159,7 +133,7 @@ diff -up gzip-1.3.12/deflate.c.rsync gzip-1.3.12/deflate.c
do { do {
strstart++; strstart++;
INSERT_STRING(strstart, hash_head); INSERT_STRING(strstart, hash_head);
@@ -740,24 +796,40 @@ off_t deflate() @@ -736,24 +792,40 @@ off_t deflate()
match_available = 0; match_available = 0;
match_length = MIN_MATCH-1; match_length = MIN_MATCH-1;
strstart++; strstart++;
@ -203,18 +177,36 @@ diff -up gzip-1.3.12/deflate.c.rsync gzip-1.3.12/deflate.c
strstart++; strstart++;
lookahead--; lookahead--;
} }
diff -up gzip-1.3.12/gzip.c.rsync gzip-1.3.12/gzip.c diff -up gzip-1.3.13/doc/gzip.texi.rsync gzip-1.3.13/doc/gzip.texi
--- gzip-1.3.12/gzip.c.rsync 2007-03-20 06:09:51.000000000 +0100 --- gzip-1.3.13/doc/gzip.texi.rsync 2009-09-28 11:08:16.000000000 +0200
+++ gzip-1.3.12/gzip.c 2008-09-01 14:35:12.000000000 +0200 +++ gzip-1.3.13/doc/gzip.texi 2009-12-01 16:14:24.664394713 +0100
@@ -231,6 +231,7 @@ int ofd; /* output fil @@ -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 insize; /* valid bytes in inbuf */
unsigned inptr; /* index of next byte to be processed in inbuf */ unsigned inptr; /* index of next byte to be processed in inbuf */
unsigned outcnt; /* bytes in output buffer */ unsigned outcnt; /* bytes in output buffer */
+int rsync = 0; /* make ryncable chunks */ +int rsync = 0; /* make ryncable chunks */
struct option longopts[] = static int handled_sig[] =
{ {
@@ -260,6 +261,7 @@ struct option longopts[] = @@ -282,6 +283,7 @@ struct option longopts[] =
{"best", 0, 0, '9'}, /* compress better */ {"best", 0, 0, '9'}, /* compress better */
{"lzw", 0, 0, 'Z'}, /* make output compatible with old compress */ {"lzw", 0, 0, 'Z'}, /* make output compatible with old compress */
{"bits", 1, 0, 'b'}, /* max number of bits per code (implies -Z) */ {"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 } { 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", " -Z, --lzw produce output compatible with old compress",
" -b, --bits=BITS max number of bits per code (implies -Z)", " -b, --bits=BITS max number of bits per code (implies -Z)",
#endif #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.", "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; recursive = 1;
#endif #endif
break; break;
@ -240,9 +232,9 @@ diff -up gzip-1.3.12/gzip.c.rsync gzip-1.3.12/gzip.c
case 'S': case 'S':
#ifdef NO_MULTIPLE_DOTS #ifdef NO_MULTIPLE_DOTS
if (*optarg == '.') optarg++; if (*optarg == '.') optarg++;
diff -up gzip-1.3.12/gzip.h.rsync gzip-1.3.12/gzip.h diff -up gzip-1.3.13/gzip.h.rsync gzip-1.3.13/gzip.h
--- gzip-1.3.12/gzip.h.rsync 2007-03-20 06:09:51.000000000 +0100 --- gzip-1.3.13/gzip.h.rsync 2009-09-26 20:43:28.000000000 +0200
+++ gzip-1.3.12/gzip.h 2008-09-01 14:35:12.000000000 +0200 +++ gzip-1.3.13/gzip.h 2009-12-01 16:14:24.664394713 +0100
@@ -158,6 +158,7 @@ EXTERN(uch, window); /* Sliding @@ -158,6 +158,7 @@ EXTERN(uch, window); /* Sliding
extern unsigned insize; /* valid bytes in inbuf */ extern unsigned insize; /* valid bytes in inbuf */
extern unsigned inptr; /* index of next byte to be processed 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 */ /* in bits.c */
void bi_init OF((file_t zipfile)); void bi_init OF((file_t zipfile));
diff -up gzip-1.3.12/doc/gzip.texi.rsync gzip-1.3.12/doc/gzip.texi diff -up gzip-1.3.13/trees.c.rsync gzip-1.3.13/trees.c
--- gzip-1.3.12/doc/gzip.texi.rsync 2007-02-06 00:29:04.000000000 +0100 --- gzip-1.3.13/trees.c.rsync 2009-09-26 20:43:28.000000000 +0200
+++ gzip-1.3.12/doc/gzip.texi 2008-09-01 14:35:12.000000000 +0200 +++ gzip-1.3.13/trees.c 2009-12-01 16:14:24.655388257 +0100
@@ -350,6 +350,14 @@ specified on the command line are direct @@ -856,9 +856,10 @@ local void send_all_trees(lcodes, dcodes
into the directory and compress all the files it finds there (or * trees or store, and output the encoded block to the zip file. This function
decompress them in the case of @command{gunzip}). * 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 return compressed_len >> 3;
+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

View File

@ -1,21 +1,20 @@
Summary: The GNU data compression program Summary: The GNU data compression program
Name: gzip Name: gzip
Version: 1.3.12 Version: 1.3.13
Release: 12%{?dist} Release: 1%{?dist}
# info pages are under GFDL license # info pages are under GFDL license
License: GPLv2 and GFDL License: GPLv3+ and GFDL
Group: Applications/File Group: Applications/File
Source: http://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.gz Source: http://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.gz
Patch0: gzip-1.3.12-openbsd-owl-tmp.patch Patch0: gzip-1.3.12-openbsd-owl-tmp.patch
Patch1: gzip-1.3.5-zforce.patch Patch1: gzip-1.3.5-zforce.patch
Patch3: gzip-1.3.9-stderr.patch Patch3: gzip-1.3.9-stderr.patch
Patch4: gzip-1.3.10-zgreppipe.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 Patch7: gzip-1.3.9-addsuffix.patch
Patch14: gzip-1.3.5-cve-2006-4338.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 Patch16: gzip-1.3.5-cve-2006-4337_len.patch
Patch17: gzip-1.3.12-futimens.patch
Patch18: gzip-1.3.12-zdiff.patch Patch18: gzip-1.3.12-zdiff.patch
URL: http://www.gzip.org/ URL: http://www.gzip.org/
Requires: /sbin/install-info Requires: /sbin/install-info
@ -41,8 +40,8 @@ very commonly used data compression program.
%patch14 -p1 -b .4338 %patch14 -p1 -b .4338
%patch15 -p1 -b .4337 %patch15 -p1 -b .4337
%patch16 -p1 -b .4337l %patch16 -p1 -b .4337l
%patch17 -p1 -b .futimens
%patch18 -p1 -b .ret %patch18 -p1 -b .ret
%build %build
export DEFS="NO_ASM" export DEFS="NO_ASM"
export CPPFLAGS="-DHAVE_LSTAT" export CPPFLAGS="-DHAVE_LSTAT"
@ -93,6 +92,13 @@ fi
%{_infodir}/gzip.info* %{_infodir}/gzip.info*
%changelog %changelog
* Tue Dec 1 2009 Karel Klic <kklic@redhat.com> - 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 <varekova@redhat.com> - 1.3.12-12 * Fri Oct 9 2009 Ivana Varekova <varekova@redhat.com> - 1.3.12-12
- change the source tag - change the source tag

View File

@ -1 +1 @@
b5bac2d21840ae077e0217bc5e4845b1 gzip-1.3.12.tar.gz c54a31b93e865f6a4410b2dc64662706 gzip-1.3.13.tar.gz