From 7047be9adce7af9553393c4d5427e43f49f9101a Mon Sep 17 00:00:00 2001 From: Ivana Varekova Date: Mon, 1 Sep 2008 13:04:10 +0000 Subject: [PATCH] update patch --- gzip-1.3.9-rsync.patch | 127 +++++++++++++++++++++-------------------- 1 file changed, 66 insertions(+), 61 deletions(-) diff --git a/gzip-1.3.9-rsync.patch b/gzip-1.3.9-rsync.patch index dacee35..61f2d50 100644 --- a/gzip-1.3.9-rsync.patch +++ b/gzip-1.3.9-rsync.patch @@ -1,42 +1,7 @@ ---- gzip-1.3.9/gzip.c.pom 2007-01-15 14:32:26.000000000 +0100 -+++ gzip-1.3.9/gzip.c 2007-01-15 14:54:08.000000000 +0100 -@@ -238,6 +238,7 @@ - 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[] = - { -@@ -267,6 +268,7 @@ - {"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) */ -+ {"rsyncable", 0, 0, 'R'}, /* make rsync-friendly archive */ - { 0, 0, 0, 0 } - }; - -@@ -348,6 +350,7 @@ - " -Z, --lzw produce output compatible with old compress", - " -b, --bits=BITS max number of bits per code (implies -Z)", - #endif -+ " --rsyncable Make rsync-friendly archive", - "", - "With no FILE, or when FILE is -, read standard input.", - "", -@@ -473,6 +476,9 @@ - recursive = 1; - #endif - break; -+ -+ case 'R': -+ rsync = 1; break; - case 'S': - #ifdef NO_MULTIPLE_DOTS - if (*optarg == '.') optarg++; ---- gzip-1.3.9/trees.c.pom 2006-11-20 09:40:33.000000000 +0100 -+++ gzip-1.3.9/trees.c 2007-01-15 14:58:42.000000000 +0100 -@@ -860,9 +860,10 @@ +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. */ @@ -48,7 +13,7 @@ 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 @@ +@@ -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 */ @@ -59,9 +24,10 @@ } return compressed_len >> 3; ---- gzip-1.3.9/deflate.c.pom 2006-12-08 00:53:00.000000000 +0100 -+++ gzip-1.3.9/deflate.c 2007-01-15 15:25:40.000000000 +0100 -@@ -135,6 +135,14 @@ +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 /* Matches of length 3 are discarded if their distance exceeds TOO_FAR */ @@ -76,7 +42,7 @@ /* =========================================================================== * Local data used by the "longest match" routines. */ -@@ -216,6 +224,8 @@ +@@ -216,6 +224,8 @@ local int compr_level; unsigned near good_match; /* Use a faster search when the previous match is longer than this */ @@ -85,7 +51,7 @@ /* 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 @@ +@@ -314,6 +324,10 @@ void lm_init (pack_level, flags) #endif /* prev will be initialized on the fly */ @@ -96,7 +62,7 @@ /* Set the default configuration parameters: */ max_lazy_match = configuration_table[pack_level].max_lazy; -@@ -550,6 +564,8 @@ +@@ -550,6 +564,8 @@ local void fill_window() memcpy((char*)window, (char*)window+WSIZE, (unsigned)WSIZE); match_start -= WSIZE; strstart -= WSIZE; /* we now have strstart >= MAX_DIST: */ @@ -105,7 +71,7 @@ block_start -= (long) WSIZE; -@@ -577,13 +593,46 @@ +@@ -577,13 +593,46 @@ local void fill_window() } } @@ -153,7 +119,7 @@ /* =========================================================================== * Processes a new input file and return its compressed length. This -@@ -594,7 +643,7 @@ +@@ -594,7 +643,7 @@ local void fill_window() local off_t deflate_fast() { IPos hash_head; /* head of the hash chain */ @@ -162,7 +128,7 @@ unsigned match_length = 0; /* length of best match */ prev_length = MIN_MATCH-1; -@@ -624,6 +673,7 @@ +@@ -624,6 +673,7 @@ local off_t deflate_fast() lookahead -= match_length; @@ -170,7 +136,7 @@ /* 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 @@ +@@ -652,9 +702,14 @@ local off_t deflate_fast() /* No match, output a literal byte */ Tracevv((stderr,"%c",window[strstart])); flush = ct_tally (0, window[strstart]); @@ -185,7 +151,7 @@ if (flush) FLUSH_BLOCK(0), block_start = strstart; /* Make sure that we always have enough lookahead, except -@@ -728,6 +783,7 @@ +@@ -728,6 +783,7 @@ off_t deflate() */ lookahead -= prev_length-1; prev_length -= 2; @@ -193,7 +159,7 @@ do { strstart++; INSERT_STRING(strstart, hash_head); -@@ -740,24 +796,40 @@ +@@ -740,24 +796,40 @@ off_t deflate() match_available = 0; match_length = MIN_MATCH-1; strstart++; @@ -237,9 +203,47 @@ strstart++; lookahead--; } ---- gzip-1.3.9/gzip.h.pom 2006-12-11 19:54:39.000000000 +0100 -+++ gzip-1.3.9/gzip.h 2007-01-15 14:47:01.000000000 +0100 -@@ -155,6 +155,7 @@ +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 + 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[] = + {"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) */ ++ {"rsyncable", 0, 0, 'R'}, /* make rsync-friendly archive */ + { 0, 0, 0, 0 } + }; + +@@ -341,6 +343,7 @@ local void help() + " -Z, --lzw produce output compatible with old compress", + " -b, --bits=BITS max number of bits per code (implies -Z)", + #endif ++ " --rsyncable Make rsync-friendly archive", + "", + "With no FILE, or when FILE is -, read standard input.", + "", +@@ -469,6 +472,9 @@ int main (argc, argv) + recursive = 1; + #endif + break; ++ ++ case 'R': ++ rsync = 1; break; + 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 +@@ -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 */ extern unsigned outcnt; /* bytes in output buffer */ @@ -247,7 +251,7 @@ extern off_t bytes_in; /* number of input bytes */ extern off_t bytes_out; /* number of output bytes */ -@@ -303,7 +304,7 @@ +@@ -306,7 +307,7 @@ off_t deflate OF((void)); /* in trees.c */ void ct_init OF((ush *attr, int *method)); int ct_tally OF((int dist, int lc)); @@ -256,11 +260,12 @@ /* in bits.c */ void bi_init OF((file_t zipfile)); ---- gzip-1.3.9/doc/gzip.texi.pom 2006-12-08 19:45:37.000000000 +0100 -+++ gzip-1.3.9/doc/gzip.texi 2007-01-15 15:30:00.000000000 +0100 -@@ -334,6 +334,14 @@ +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 @code{gunzip}). + decompress them in the case of @command{gunzip}). +@item --rsyncable +While compressing, synchronize the output occasionally based on the @@ -272,4 +277,4 @@ + @item --suffix @var{suf} @itemx -S @var{suf} - Use suffix @samp{@var{suf}} instead of @samp{.gz}. Any suffix can be + Use suffix @var{suf} instead of @samp{.gz}. Any suffix can be