--- /dev/null
+.deps
+Makefile
+*.o
+config.log
+config.status
+gunzip
+gzexe
+gzip
+zcat
+zcmp
+zdiff
+zegrep
+zfgrep
+zforce
+zgrep
+zless
+zmore
+znew
--- /dev/null
+/c++defs.h
AC_SUBST([GNULIB_WARN_CFLAGS])
fi
+gl_FUNC_GETDTABLESIZE
+if test $HAVE_GETDTABLESIZE = 0; then
+ AC_LIBOBJ([getdtablesize])
+fi
+gl_UNISTD_MODULE_INDICATOR([getdtablesize])
+
# cc -E produces incorrect asm files on SVR4, so postprocess it.
ASCPPPOST="sed '/^ *\\#/d; s,//.*,,; s/% /%/g; s/\\. /./g'"
AC_SUBST([ASCPPPOST])
--- /dev/null
+Note that using sudo during the build, such as with 'dpkg-buildpackage -rsudo'
+may fail because wine (which is needed to run mingw32) doesn't like being run
+as root when ~/.wine is owned by a normal user. The fix for this is to either
+build gzip with another root-gaining tool (fakeroot works fine), or to run the
+entire build as root (ick!). It may be possible to also solve this with some
+interesting set of wine options, but I'm not motivated to figure that out since
+fakeroot works.
+
+ -- Bdale Garbee <bdale@gag.com> Tue, 15 Apr 2008 08:16:17 -0600
+
--- /dev/null
+gzip (1.4-6) unstable; urgency=low
+
+ * patch to restore zgrep -h from Pär-Ola Nilsson, closes: #658734
+ * patch to fix pack reference in gzip man page from Stéphane Aulery,
+ closes: #308522
+ * patch to add --rsyncable doc to info page from Jörgen Grahn,
+ closes: #637626
+ * patch to improve zdiff doc from Stéphane Aulery, closes: #269612
+ * patches to fix RFC URLs from Stéphane Aulery, closes: #636182
+
+ -- Bdale Garbee <bdale@gag.com> Thu, 12 Apr 2012 23:11:46 -0600
+
+gzip (1.4-5) unstable; urgency=low
+
+ * patch from upstream to address determinism issue, closes: #647522
+
+ -- Bdale Garbee <bdale@gag.com> Mon, 19 Mar 2012 11:07:22 +0100
+
+gzip (1.4-4) unstable; urgency=low
+
+ * enable hardening build flags, closes: #664499
+
+ -- Bdale Garbee <bdale@gag.com> Sun, 18 Mar 2012 20:16:45 +0100
+
+gzip (1.4-3) unstable; urgency=low
+
+ * patch from upstream for sys_stat.in.h to fix mingw32 builds,
+ closes: #653960
+
+ -- Bdale Garbee <bdale@gag.com> Mon, 05 Mar 2012 22:13:33 -0700
+
+gzip (1.4-2) unstable; urgency=low
+
+ * patch to use DEB_HOST_ARCH in rules, closes: #644785
+ * fix missing stamp creating in rules file causing extra build cycle,
+ closes: #648555
+
+ -- Bdale Garbee <bdale@gag.com> Sat, 12 Nov 2011 17:24:17 -0700
+
+gzip (1.4-1) unstable; urgency=low
+
+ * new upstream version, closes: #627121, #633927
+ * add Vcs entries to control file
+ * patch zless LESSOPEN definition to allow handling of gunzip data on STDIN,
+ closes: #248302
+ * Build using mingw-w64 instead of mingw32, closes: #623428
+ * update to current policy, source package formats, etc
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 20 Apr 2011 01:48:46 -0600
+
+gzip (1.3.12-9) unstable; urgency=high
+
+ * fix applied for CVE-2010-0001 which identified an integer underflow when
+ decompressing files that are compressed using the LZW algorithm. This
+ could lead to the execution of arbitrary code when trying to decompress
+ a crafted LZW compressed gzip archive.
+ * switch to using dh_lintian for override delivery
+
+ -- Bdale Garbee <bdale@gag.com> Thu, 21 Jan 2010 07:38:41 +1300
+
+gzip (1.3.12-8) unstable; urgency=low
+
+ * Add Carl Worth as an uploader.
+ * Fix "-f -" to work with zgrep, closes: #168606
+ * Avoid creating undersized hufts table, closes: #507263
+
+ -- Carl Worth <cworth@cworth.org> Fri, 27 Feb 2009 12:54:37 -0800
+
+gzip (1.3.12-7) unstable; urgency=low
+
+ * improve package descriptions, remove ancient package relationship spec
+ in control file, closes: #484547
+
+ -- Bdale Garbee <bdale@gag.com> Sun, 15 Feb 2009 10:54:48 -0700
+
+gzip (1.3.12-6) unstable; urgency=low
+
+ * strip the win32 gzip.exe binary during install, closes: #464455
+ * patch from Reuben Thomas for the zless.1 man page with pointers to
+ lessfile and lesspipe, which are a better solution than zless in most
+ cases... closes: #46787, #51162
+ * fix FTBFS when using gcc-4.3, closes: #476031
+ * remove the preinst since the --assert-support-predepends check should
+ no longer be necessary
+
+ -- Bdale Garbee <bdale@gag.com> Tue, 15 Apr 2008 14:03:26 -0600
+
+gzip (1.3.12-5) unstable; urgency=low
+
+ * patch for zgrep.in from Daniel Kobras, closes: #434429
+ * patch from upstream to fix compilation with mingw32, and patch from
+ Robert Millan to build a win32 executable if mingw32 is available, all
+ to fix a preseeding problem in the win32-loader for Debian Installer.
+ closes: #457867
+
+ -- Bdale Garbee <bdale@gag.com> Mon, 04 Feb 2008 21:46:42 -0700
+
+gzip (1.3.12-4) unstable; urgency=low
+
+ * incorporate diffs from NMUs, closes: #434275, #433845, #438675
+ * define UNALIGNED_OK when building for amd64, closes: #386356
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 19 Dec 2007 17:48:37 -0700
+
+gzip (1.3.12-3.2) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Stop zdiff from dropping cmp's output. Patch thanks to Jorg-Volker Peetz
+ (Closes: Bug#434275)
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Sun, 14 Oct 2007 23:50:29 +1000
+
+gzip (1.3.12-3.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Rename futimens to gz_futimens, since glibc now defines an futimens
+ function with a different prototype. Closes: #433845.
+ * Urgency medium for the RC bug fix.
+
+ -- Daniel Schepler <schepler@debian.org> Sat, 18 Aug 2007 17:11:52 -0400
+
+gzip (1.3.12-3) unstable; urgency=low
+
+ * fix bindir so gunzip, et al, work again, closes: #429462
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 22 Jun 2007 01:08:59 +0100
+
+gzip (1.3.12-2) unstable; urgency=low
+
+ * fix typo in gzip fprintf, closes: #426965
+ * revert my zgrep.in patch since upstream handles alternates differently now
+
+ -- Bdale Garbee <bdale@gag.com> Thu, 14 Jun 2007 00:17:37 -0400
+
+gzip (1.3.12-1) unstable; urgency=low
+
+ * new upstream version, closes: #177942, #225864, #362786, #366660, #367400,
+ #383358, #402042, #404099, #404114, #419895
+ * fix delivery of upstream ChangeLog, closes: #404062
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 13 Jun 2007 18:55:42 -0400
+
+gzip (1.3.9-2) unstable; urgency=low
+
+ * change direntry ordering in gzip.texi to work around bug in install-info,
+ closes: #404048
+
+ -- Bdale Garbee <bdale@gag.com> Thu, 21 Dec 2006 09:16:16 -0700
+
+gzip (1.3.9-1) unstable; urgency=low
+
+ * new upstream version, closes: #366660, #403308
+ * clean up a few gratuitous differences from new upstream, leaving
+ only the rsyncable patch and tweaks like zmore always using more
+ * fix spelling error in documentation, closes: #395450
+ * upstream patch for regression uncompressing null input, closes: #403970
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 20 Dec 2006 19:16:36 -0700
+
+gzip (1.3.5-15) unstable; urgency=high
+
+ * security update, covering the following alerts:
+ CVE-2006-4334 CVE-2006-4335 CVE-2006-4336 CVE-2006-4337 CVE-2006-4338
+
+ -- Bdale Garbee <bdale@gag.com> Tue, 19 Sep 2006 06:35:26 -0600
+
+gzip (1.3.5-14) unstable; urgency=medium
+
+ * update section to match override
+ * patch from Matthew Chapman to avoid deleting input file before we're
+ sure the output file has been written without errors, closes: #366660
+ * patch from Reuben Thomas to fix zgrep return code,
+ closes: #292896, #192891, #190442
+ * enable gzexe compressed files to work on systems where tempfile is not
+ available while retaining preference for tempfile, closes: #334540
+
+ -- Bdale Garbee <bdale@gag.com> Tue, 20 Jun 2006 15:02:27 -0600
+
+gzip (1.3.5-13) unstable; urgency=low
+
+ * patch from Reuben Thomas fixes problem passing zgrep filenames starting
+ with dashes, closes: #342501
+ * fix a spelling error in gzip man page, closes: #356011
+ * document the fact that zless doesn't work with stdin,
+ closes: #320226, #345036
+
+ -- Bdale Garbee <bdale@gag.com> Sat, 15 Apr 2006 01:31:54 -0600
+
+gzip (1.3.5-12) unstable; urgency=low
+
+ * merge patch from Matt Zimmerman for futex hang due to improper signal
+ handling, closes: #310053, #315612
+ * merge patch to add --rsyncable to the man page, closes: #289616, #295721
+ * don't return failing result code on harmless warning, closes: #169669
+
+ -- Bdale Garbee <bdale@gag.com> Mon, 11 Jul 2005 22:10:51 +0300
+
+gzip (1.3.5-11) unstable; urgency=low
+
+ * patch from Peter Samuelson for bashism in zgrep,
+ closes: #314342, #314211, #312380, #310329
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 15 Jun 2005 14:39:11 -0600
+
+gzip (1.3.5-10) unstable; urgency=medium
+
+ * remove PAGER reference from zmore.1, closes: #263792
+ * patch to improve zgrep argument sanitizing (CAN-2005-0758),
+ closes: #308379
+ * patch isolated by Petter Reinholdtsen for CAN-2005-0988, closes: #303927
+ * patch for dir traversal bug (CAN-2005-1228), closes: #305255
+ * up the priority a click because of the security fixes
+ * patch to support cross building, closes: #283730
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 20 May 2005 22:34:49 -0600
+
+gzip (1.3.5-9) unstable; urgency=low
+
+ * eliminate the autoconf and automake build dependencies, since they are
+ no longer needed, closes: #250766
+ * improve temp file usage in gzexe, closes: #257314, #259043
+ * have zmore use 'more' instead of honoring $PAGER, to avoid violating
+ the principle of least astonishment, closes: #234212
+ * fix zgrep choke on filenames including a pipe character, closes: #216211
+ * incorporate watch file, closes: #248722
+ * suggest less, since we provide zless, closes: #217925
+ * use signames instead of signumbers for trap calls, closes: #259284
+
+ -- Bdale Garbee <bdale@gag.com> Sat, 24 Jul 2004 01:23:03 -0600
+
+gzip (1.3.5-8) unstable; urgency=low
+
+ * run autoreconf -i to address problem reported with dir.old.gz being
+ included on rebuilds, closes: #249519
+ * change automake build dependency from automake1.7 to automaken
+ * add lintian overrides to squelch the hardlink warnings
+ * fix typo in inflate.c comments, closes: #201881
+
+ -- Bdale Garbee <bdale@gag.com> Sun, 23 May 2004 01:07:03 -0600
+
+gzip (1.3.5-7) unstable; urgency=low
+
+ * patch from David Mosberger to incorporate work done by Sverre Jarp on
+ an ia64 version of match.c content.
+
+ -- Bdale Garbee <bdale@gag.com> Thu, 10 Jul 2003 08:45:27 -0600
+
+gzip (1.3.5-6) unstable; urgency=medium
+
+ * patch for insecure temp file usage in znew, closes: #193375
+
+ -- Bdale Garbee <bdale@gag.com> Sat, 7 Jun 2003 09:05:11 -0600
+
+gzip (1.3.5-5) unstable; urgency=low
+
+ * apply patch from Anthony Towns that fixes seg faults on alpha during
+ build of Xfree86 at the expense of slightly decreasing the effectiveness
+ of the deflate implementation. closes: #184057, #187417
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 16 Apr 2003 11:24:23 -0600
+
+gzip (1.3.5-4) unstable; urgency=low
+
+ * merge patch from Rusty Russell that adds --rsyncable option to gzip.
+ This modifies the output stream to allow rsync to transfer updated .gz
+ files much more effectively. The resulting .gz files should be compatible
+ with the existing gunzip. The plan is that if this works out well for
+ Debian, the functionality will be included in a future upstream gzip
+ release. Closes: #116183, #118118, #134741
+
+ -- Bdale Garbee <bdale@gag.com> Thu, 13 Feb 2003 23:50:23 -0700
+
+gzip (1.3.5-3) unstable; urgency=low
+
+ * upload a fresh version so m68k, et al, will rebuild, closes: #167790
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 6 Nov 2002 16:13:42 -0700
+
+gzip (1.3.5-2) unstable; urgency=low
+
+ * fix gzexe.in again as per what I did for 1.3.2-3 that accidentally got
+ lost when I merged 1.3.5 from upstream... sigh. Closes: #167150
+ * hack on gzip.texi a little harder to squelch warning at install time from
+ Debian's install-info, closes: #164106
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 30 Oct 2002 20:21:42 -0700
+
+gzip (1.3.5-1) unstable; urgency=low
+
+ * new upstream version
+ * fixes a bug in the incorrect-suffix diagnostic, which can lead to a
+ core dump, closes: #152579
+ * removes dangling output symlinks properly, closes: #144759
+ * zless no longer thinks it is zmore in usage message, closes: #121810
+ * zless replaced with a much simpler script, closes: #124097
+ * uses shell pattern matching instead of 'expr', closes: #123295
+ * man page suggests how to use gunzip on zip files, closes: #146019
+ * uses "trap -" to avoid bashism, closes: #140972, #157111
+ * accepts __i386 and __i386__ as synonyms for i386, closes: #152694
+ * fixes printing values greater than 10 * 2**32 bytes, closes: #141189
+ * includes fix for zforce needing -v, closes: #123294
+ * hack gzip.texi so that the Debian install-info doesn't choke on it (grrr),
+ and add texinfo as a build dependency
+ * eliminate things hard-coded in postinst and prerm now handled by debhelper
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 9 Oct 2002 09:05:27 -0600
+
+gzip (1.3.2-3) unstable; urgency=low
+
+ * modify gzexe.in to hard-code /bin/gzip instead of trying to use BINDIR
+ which yields /usr/bin/gzip. Don't use PATH since we have no idea what it
+ might be when the gzexe'd executable gets run. Closes: #119641
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 14 Nov 2001 23:00:59 -0700
+
+gzip (1.3.2-2) unstable; urgency=low
+
+ * fix silly mistake made when moving man pages from hard to soft links, so
+ man pages for zegrep, zfgrep, and uncompress work again, closes: #118325
+
+ -- Bdale Garbee <bdale@gag.com> Mon, 5 Nov 2001 00:53:40 -0700
+
+gzip (1.3.2-1) unstable; urgency=low
+
+ * new upstream release, incorporating my diffs to 1.3.1
+
+ -- Bdale Garbee <bdale@gag.com> Sun, 4 Nov 2001 09:47:40 -0700
+
+gzip (1.3.1-2) unstable; urgency=low
+
+ * add build dependencies on autoconf and automake
+ * fix infodir spec so we install in the build tree, not the system directory
+
+ -- Bdale Garbee <bdale@gag.com> Sat, 3 Nov 2001 02:18:06 -0700
+
+gzip (1.3.1-1) unstable; urgency=low
+
+ * new upstream version! From alpha.gnu.org, on the explicit advice of the
+ current upstream maintainers, who are working with Debian to prepare a new
+ stable release that addresses many of the open issues in our BTS.
+ .
+ large file support handled in configure, closes: #108612, #83061, #113000
+ it appears the subtle problem with concatenation is fixed, closes: #114591
+ various segfault problems appear fixed, closes: #46312
+ gzip -r issues fixed, closes: #53645, #106186
+ problem with --no-filename option fixed, closes: #59067
+ zgrep -r disallowed - "I did not use the patch as it was not a complete
+ . fix for the problem and I thought it would cause more problems than
+ . it would cure. Instead, I simply disallowed zgrep -r", closes: #81288
+ error message reworded, closes: #76238
+ compression factor output fixed, closes: #80362
+ zgrep -H fixed, closes: #84371
+ permission issue when forced to compress linked file fixed, closes: #88918
+ manpage hardlinks fixed, closes: #94733
+ gzip --help now goes to stdout, closes: #97020
+ zless no longer runs less if file doesn't exist, closes: #109097
+ problem with -best fixed, closes: #17650
+ zgrep now understands --, closes: #28475
+ file size output by gzip fixed for large files, closes: #40721
+ * fix location referenced for GPL on Debian systems, closes: #112095
+ * move install-info remove call from from postrm to prerm
+
+ -- Bdale Garbee <bdale@gag.com> Sat, 3 Nov 2001 01:01:02 -0700
+
+gzip (1.2.4-33) unstable; urgency=low
+
+ * update to current policy
+
+ -- Bdale Garbee <bdale@gag.com> Thu, 2 Dec 1999 01:10:58 -0700
+
+gzip (1.2.4-32) unstable; urgency=low
+
+ * update prototype for and definition of basename function for compatibility
+ with glibc2.0, still in use on m68k. Closes: #45058
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 15 Sep 1999 02:01:47 -0600
+
+gzip (1.2.4-31) unstable; urgency=medium
+
+ * fix problems I induced while merging the upstream patch in the last upload,
+ most notably omitting zless from the package.
+ Closes: #44883, #44885, #44890, #44882, #44887, #44895, #44896
+
+ -- Bdale Garbee <bdale@gag.com> Sun, 12 Sep 1999 12:06:00 -0600
+
+gzip (1.2.4-30) unstable; urgency=low
+
+ * upstream patch, closes: #28872
+ 1998-11-18 Paul Eggert <eggert@twinsun.com>
+ gzip.c (get_method): Don't complain about trailing zeros at
+ the end of a gzipped file, as they're commonly appended to fill
+ out a block (e.g. by GNU tar).
+ * update to FHS compliance
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 10 Sep 1999 21:34:07 -0600
+
+gzip (1.2.4-29) unstable; urgency=low
+
+ * apply patch from Vincent Renardias that improves behavior when trying to
+ decompress a corrupted .gz file. Closes 7472, 16385
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 27 Jan 1999 20:50:12 -0700
+
+gzip (1.2.4-28) frozen unstable; urgency=medium
+
+ * patch zforce to make it work at all, closes 22760
+ * patch to fix decompression of concatenated gzip files, closes 30537
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 22 Jan 1999 10:43:09 -0700
+
+gzip (1.2.4-27) frozen unstable; urgency=low
+
+ * patch from Jean-loup (upstream maintainer) for zgrep.in to fix the
+ problems with -A and -B successfully passing to grep. Closes 21209.
+
+ -- Bdale Garbee <bdale@gag.com> Sat, 25 Apr 1998 22:47:15 -0600
+
+gzip (1.2.4-26) frozen unstable; urgency=low
+
+ * fix FSF address in copyright file, lintian now reports no errors
+ * minor tweak to Makefile to fix warnings during dh_installmanpages run
+
+ -- Bdale Garbee <bdale@gag.com> Tue, 24 Mar 1998 00:40:48 -0700
+
+gzip (1.2.4-25) frozen unstable; urgency=low
+
+ * update znew.in and zdiff.in to do save tempfile handling, closes 19794
+
+ -- Bdale Garbee <bdale@gag.com> Sat, 21 Mar 1998 23:48:26 -0700
+
+gzip (1.2.4-24) unstable; urgency=low
+
+ * minor fix for complaints about short files, closes 19159
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 11 Mar 1998 02:21:50 -0700
+
+gzip (1.2.4-23) unstable; urgency=high
+
+ * respond to security advisory from Alan Cox via Christian Hudon, fixes
+ an obscure possibility to get gzip to execute code
+
+ -- Bdale Garbee <bdale@gag.com> Wed, 11 Mar 1998 02:16:59 -0700
+
+gzip (1.2.4-22) unstable; urgency=high
+
+ * gzexe modified to use tempfile in response to security advisory
+
+ -- Bdale Garbee <bdale@gag.com> Sat, 31 Jan 1998 14:30:20 -0700
+
+gzip (1.2.4-21) unstable; urgency=low
+
+ * fix from the upstream maintainer for voluminous "Broken Pipe" messages
+ when using 'zgrep -l' or equivalent. Closes bug 15178.
+
+ -- Bdale Garbee <bdale@gag.com> Sun, 4 Jan 1998 00:56:21 -0700
+
+gzip (1.2.4-20) unstable; urgency=low
+
+ * freshen rules file to match current debhelper
+ * improve handling of undocumented executables. Closes bug 13578.
+
+ -- Bdale Garbee <bdale@gag.com> Sun, 4 Jan 1998 00:56:21 -0700
+
+gzip (1.2.4-19) unstable; urgency=low
+
+ * change dependency to Pre-Depends, to keep dpkg from getting hosed during
+ libc6 upgrades. Closes 15091.
+ * switch from debmake to debhelper. In the process, closes 15412.
+
+ -- Bdale Garbee <bdale@gag.com> Mon, 8 Dec 1997 23:42:49 -0700
+
+gzip (1.2.4-18) unstable; urgency=low
+
+ * don't install INSTALL in the doc directory, closes bug 13224.
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 5 Sep 1997 15:06:35 -0600
+
+gzip (1.2.4-17) unstable; urgency=low
+
+ * fix distribution problem in changelog file
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 5 Sep 1997 15:06:35 -0600
+
+gzip (1.2.4-16) stable frozen unstable; urgency=low
+
+ * libc6
+ * tweaks to rules file to install Changelog, closes bug 12488
+
+ -- Bdale Garbee <bdale@gag.com> Thu, 4 Sep 1997 22:46:28 -0600
+
+gzip (1.2.4-15) stable frozen unstable; urgency=low
+
+ * fix minor security issue - race condition reported on bugtraq list
+ * rework debian/rules to build with debugging then strip
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 14 Mar 1997 21:14:44 -0700
+
+gzip (1.2.4-14) stable frozen unstable; urgency=medium
+
+ * The -13 upload was built against a libc5 too new for 'stable'.
+
+ -- Bdale Garbee <bdale@gag.com> Thu, 28 Nov 1996 11:37:31 -0700
+
+gzip (1.2.4-13) stable frozen unstable; urgency=medium
+
+ * Fix missing "essential" flag on package, lost during standards update.
+ * Push this version back into stable to solve the 'compress' link problem.
+
+ -- Bdale Garbee <bdale@gag.com> Tue, 19 Nov 1996 09:14:14 -0700
+
+gzip (1.2.4-12) unstable; urgency=low
+
+ * New packag format.
+
+ -- Bdale Garbee <bdale@gag.com> Sat, 02 Nov 1996 14:47:42 -0800
+
+
+Thu Jul 18 01:30:22 MDT 1996 Bdale Garbee <bdale@gag.com>
+
+ * add zegrep and zfgrep links in /usr/bin (Bug#3326)
+ * add an extended description (Bug#3591)
+ * tweak control files to use dpkg-name, etc.
+
+Fri May 24 07:37:54 MDT 1996 Bdale Garbee <bdale@gag.com>
+
+ * don't provide a 'compress' link since it breaks things, but provide
+ an 'uncompress' link since it's useful.
+ * fix some administrivia
+
+Sun Apr 14 20:39:19 MDT 1996 Bdale Garbee <bdale@gag.com>
+
+ * change gzexe.in to not use BINDIR, but assume gzip is in PATH
+ * add Architecture field in the control file
+
+Wed Jan 17 00:07:00 MST 1996 Bdale Garbee <bdale@gag.com>
+
+ * switch targets in the Makefile to also install the links called
+ 'compress' and 'uncompress' since some utilities care about these,
+ and we're unlikely to ever have a 'compress' package because of the
+ intellectual property issues.
+
+Sat Dec 2 23:45:40 MST 1995 Bdale Garbee <bdale@gag.com>
+
+ * building for ELF
+ * add 'zless' as a near-clone of 'zmore', closes bug 1776
+ * unable to duplicate bug 1090, something has improved since then?
+ * add libc5 dependency
+ * new maintainer
+
--- /dev/null
+Source: gzip
+Section: utils
+Priority: required
+Maintainer: Bdale Garbee <bdale@gag.com>
+Uploaders: Carl Worth <cworth@cworth.org>
+Build-Depends: debhelper (>= 5), texinfo, autoconf, automake, autotools-dev
+Build-Depends-Indep: mingw-w64
+Standards-Version: 3.9.3
+Vcs-Git: git://git.gag.com/debian/gzip
+Vcs-Browser: http://git.gag.com/?p=debian/gzip
+
+Package: gzip
+Architecture: any
+Essential: yes
+Pre-Depends: ${shlibs:Depends}
+Depends: dpkg (>= 1.15.4) | install-info
+Suggests: less
+Description: GNU compression utilities
+ This package provides the standard GNU file compression utilities, which
+ are also the default compression tools for Debian. They typically operate
+ on files with names ending in '.gz', but can also decompress files ending
+ in '.Z' created with 'compress'.
+
+Package: gzip-win32
+Architecture: all
+Priority: extra
+Suggests: wine
+Description: GNU compression utility (win32 build)
+ This is a win32 version of gzip, meant to be used by the win32-loader
+ component of Debian-Installer.
--- /dev/null
+This package is maintained for Debian by Bdale Garbee <bdale@gag.com>, and
+was built from the sources found at:
+
+ ftp://ftp.gnu.org/gnu/gzip/
+
+Copyright (C) 1999, 2001-2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
+Copyright (C) 1992-1993 Jean-loup Gailly
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
--- /dev/null
+bin
+usr/share/info
+usr/share/lintian/overrides
+usr/share/man/man1
--- /dev/null
+usr/share/win32
--- /dev/null
+gzip: package-contains-hardlink bin/gunzip
+gzip: package-contains-hardlink bin/zcat
+gzip: package-contains-hardlink bin/zcmp
+gzip: package-contains-hardlink bin/zegrep
+gzip: package-contains-hardlink bin/zfgrep
+gzip: package-contains-hardlink bin/uncompress
--- /dev/null
+From 0a284baeaedca68017f46d2646e4c921aa98a90d Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Sun, 18 Mar 2012 18:07:02 +0000
+Subject: gzip: fix nondeterministic compression results
+
+Reported by Jakub Wilk in <http://bugs.debian.org/647522>.
+* deflate.c (fill_window): Don't let garbage pollute the dictionary.
+---
+diff --git a/deflate.c b/deflate.c
+index 6c19552..5405f10 100644
+--- a/deflate.c
++++ b/deflate.c
+@@ -571,6 +571,8 @@ local void fill_window()
+ n = read_buf((char*)window+strstart+lookahead, more);
+ if (n == 0 || n == (unsigned)EOF) {
+ eofile = 1;
++ /* Don't let garbage pollute the dictionary. */
++ memzero (window + strstart + lookahead, MIN_MATCH - 1);
+ } else {
+ lookahead += n;
+ }
+--
+cgit v0.9.0.2
--- /dev/null
+diff --git a/configure.ac b/configure.ac
+index 818dbd9..0919132 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -129,6 +129,12 @@ if test "$gl_gcc_warnings" = yes; then
+ AC_SUBST([GNULIB_WARN_CFLAGS])
+ fi
+
++gl_FUNC_GETDTABLESIZE
++if test $HAVE_GETDTABLESIZE = 0; then
++ AC_LIBOBJ([getdtablesize])
++fi
++gl_UNISTD_MODULE_INDICATOR([getdtablesize])
++
+ # cc -E produces incorrect asm files on SVR4, so postprocess it.
+ ASCPPPOST="sed '/^ *#/d; s,//.*,,; s/% /%/g; s/\\. /./g'"
+ AC_SUBST([ASCPPPOST])
+diff --git a/lib/getdtablesize.c b/lib/getdtablesize.c
+new file mode 100644
+index 0000000..60e7f5a
+--- /dev/null
++++ b/lib/getdtablesize.c
+@@ -0,0 +1,63 @@
++/* getdtablesize() function for platforms that don't have it.
++ Copyright (C) 2008-2011 Free Software Foundation, Inc.
++ Written by Bruno Haible <bruno@clisp.org>, 2008.
++
++ This program is free software: you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 3 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program. If not, see <http://www.gnu.org/licenses/>. */
++
++#include <config.h>
++
++/* Specification. */
++#include <unistd.h>
++
++#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
++
++#include <stdio.h>
++
++/* Cache for the previous getdtablesize () result. */
++static int dtablesize;
++
++int
++getdtablesize (void)
++{
++ if (dtablesize == 0)
++ {
++ /* We are looking for the number N such that the valid file descriptors
++ are 0..N-1. It can be obtained through a loop as follows:
++ {
++ int fd;
++ for (fd = 3; fd < 65536; fd++)
++ if (dup2 (0, fd) == -1)
++ break;
++ return fd;
++ }
++ On Windows XP, the result is 2048.
++ The drawback of this loop is that it allocates memory for a libc
++ internal array that is never freed.
++
++ The number N can also be obtained as the upper bound for
++ _getmaxstdio (). _getmaxstdio () returns the maximum number of open
++ FILE objects. The sanity check in _setmaxstdio reveals the maximum
++ number of file descriptors. This too allocates memory, but it is
++ freed when we call _setmaxstdio with the original value. */
++ int orig_max_stdio = _getmaxstdio ();
++ unsigned int bound;
++ for (bound = 0x10000; _setmaxstdio (bound) < 0; bound = bound / 2)
++ ;
++ _setmaxstdio (orig_max_stdio);
++ dtablesize = bound;
++ }
++ return dtablesize;
++}
++
++#endif
+diff --git a/m4/getdtablesize.m4 b/m4/getdtablesize.m4
+new file mode 100644
+index 0000000..40a598b
+--- /dev/null
++++ b/m4/getdtablesize.m4
+@@ -0,0 +1,14 @@
++# getdtablesize.m4 serial 2
++dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
++dnl This file is free software; the Free Software Foundation
++dnl gives unlimited permission to copy and/or distribute it,
++dnl with or without modifications, as long as this notice is preserved.
++
++AC_DEFUN([gl_FUNC_GETDTABLESIZE],
++[
++ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
++ AC_CHECK_FUNCS_ONCE([getdtablesize])
++ if test $ac_cv_func_getdtablesize != yes; then
++ HAVE_GETDTABLESIZE=0
++ fi
++])
--- /dev/null
+--- old/gzip.1 2012-02-04 23:12:50.000000000 +0100
++++ new/gzip.1 2012-02-04 22:58:11.181471569 +0100
+@@ -300,7 +300,7 @@
+
+ Previous versions of gzip used
+ the .z suffix. This was changed to avoid a conflict with
+-.IR pack "(1)".
++.I pack.
+ .TP
+ .B \-t --test
+ Test. Check the compressed file integrity.
+@@ -383,8 +383,7 @@
+ On Vax/VMS, the name of the environment variable is GZIP_OPT, to
+ avoid a conflict with the symbol set for invocation of the program.
+ .SH "SEE ALSO"
+-znew(1), zcmp(1), zmore(1), zforce(1), gzexe(1), zip(1), unzip(1), compress(1),
+-pack(1), compact(1)
++znew(1), zcmp(1), zmore(1), zforce(1), gzexe(1), zip(1), unzip(1), compress(1)
+ .PP
+ The
+ .I gzip
--- /dev/null
+diff --git a/gzip.1 b/gzip.1
+index 48902bd..17f94ad 100644
+--- a/gzip.1
++++ b/gzip.1
+@@ -180,12 +180,12 @@ or decompressing.
+ The
+ .I gzip
+ file format is specified in P. Deutsch, \s-1GZIP\s0 file format
+-specification version 4.3, <ftp://ftp.isi.edu/in-notes/rfc1952.txt>,
++specification version 4.3, <http://www.ietf.org/rfc/rfc1952.txt>,
+ Internet RFC 1952 (May 1996). The
+ .I zip
+ deflation format is specified in P. Deutsch, \s-1DEFLATE\s0 Compressed
+ Data Format Specification version 1.3,
+-<ftp://ftp.isi.edu/in-notes/rfc1951.txt>, Internet RFC 1951 (May 1996).
++<http://www.ietf.org/rfc/rfc1951.txt>, Internet RFC 1951 (May 1996).
+
+ .SH OPTIONS
+ .TP
+@@ -389,13 +389,13 @@ The
+ .I gzip
+ file format is specified in P. Deutsch, \s-1GZIP\s0 file format
+ specification version 4.3,
+-.BR <ftp://ftp.isi.edu/in-notes/rfc1952.txt> ,
++.BR <http://www.ietf.org/rfc/rfc1952.txt> ,
+ Internet RFC 1952 (May 1996).
+ The
+ .I zip
+ deflation format is specified in P. Deutsch, \s-1DEFLATE\s0 Compressed
+ Data Format Specification version 1.3,
+-.BR <ftp://ftp.isi.edu/in-notes/rfc1951.txt> ,
++.BR <http://www.ietf.org/rfc/rfc1951.txt> ,
+ Internet RFC 1951 (May 1996).
+ .SH "DIAGNOSTICS"
+ Exit status is normally 0;
+diff --git a/gzip.doc b/gzip.doc
+index e730a1c..2e5557e 100644
+--- a/gzip.doc
++++ b/gzip.doc
+@@ -85,10 +85,10 @@ DESCRIPTION
+ ownership and timestamps of files when compressing or decompressing.
+
+ The gzip file format is specified in P. Deutsch, GZIP file format spec-
+- ification version 4.3, <ftp://ftp.isi.edu/in-notes/rfc1952.txt>, Inter-
+- net RFC 1952 (May 1996). The zip deflation format is specified in P.
+- Deutsch, DEFLATE Compressed Data Format Specification version 1.3,
+- <ftp://ftp.isi.edu/in-notes/rfc1951.txt>, Internet RFC 1951 (May 1996).
++ ification version 4.3, <http://www.ietf.org/rfc/rfc1952.txt>, Inter-
++ net RFC 1952 (May 1996). The zip deflation format is specified in P.
++ Deutsch, DEFLATE Compressed Data Format Specification version 1.3,
++ <http://www.ietf.org/rfc/rfc1951.txt>, Internet RFC 1951 (May 1996).
+
+ OPTIONS
+ -a --ascii
+@@ -268,10 +268,10 @@ SEE ALSO
+ press(1), pack(1), compact(1)
+
+ The gzip file format is specified in P. Deutsch, GZIP file format spec-
+- ification version 4.3, <ftp://ftp.isi.edu/in-notes/rfc1952.txt>, Inter-
+- net RFC 1952 (May 1996). The zip deflation format is specified in P.
+- Deutsch, DEFLATE Compressed Data Format Specification version 1.3,
+- <ftp://ftp.isi.edu/in-notes/rfc1951.txt>, Internet RFC 1951 (May 1996).
++ ification version 4.3, <http://www.ietf.org/rfc/rfc1952.txt>, Inter-
++ net RFC 1952 (May 1996). The zip deflation format is specified in P.
++ Deutsch, DEFLATE Compressed Data Format Specification version 1.3,
++ <http://www.ietf.org/rfc/rfc1951.txt>, Internet RFC 1951 (May 1996).
+
+ DIAGNOSTICS
+ Exit status is normally 0; if an error occurs, exit status is 1. If a
--- /dev/null
+diff --git a/deflate.c b/deflate.c
+index 0950391..1b3ac52 100644
+--- a/deflate.c
++++ b/deflate.c
+@@ -131,6 +131,14 @@
+ #endif
+ /* Matches of length 3 are discarded if their distance exceeds TOO_FAR */
+
++#ifndef RSYNC_WIN
++# define RSYNC_WIN 8192
++#endif
++/* Size of rsync window, must be < MAX_DIST */
++
++#define RSYNC_SUM_MATCH(sum) (((sum) & (RSYNC_WIN - 1)) == 0)
++/* Whether window sum matches magic value */
++
+ /* ===========================================================================
+ * Local data used by the "longest match" routines.
+ */
+@@ -212,6 +220,8 @@ local int compr_level;
+ unsigned near good_match;
+ /* Use a faster search when the previous match is longer than this */
+
++local ulg rsync_sum; /* rolling sum of rsync window */
++local ulg rsync_chunk_end; /* next rsync sequence point */
+
+ /* 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
+@@ -307,6 +317,10 @@ void lm_init (pack_level, flags)
+ #endif
+ /* prev will be initialized on the fly */
+
++ /* rsync params */
++ rsync_chunk_end = 0xFFFFFFFFUL;
++ rsync_sum = 0;
++
+ /* Set the default configuration parameters:
+ */
+ max_lazy_match = configuration_table[pack_level].max_lazy;
+@@ -324,6 +338,7 @@ void lm_init (pack_level, flags)
+
+ strstart = 0;
+ block_start = 0L;
++ rsync_chunk_end = 0xFFFFFFFFUL;
+ #ifdef ASMV
+ match_init(); /* initialize the asm code */
+ #endif
+@@ -543,6 +558,8 @@ local void fill_window()
+ memcpy((char*)window, (char*)window+WSIZE, (unsigned)WSIZE);
+ match_start -= WSIZE;
+ strstart -= WSIZE; /* we now have strstart >= MAX_DIST: */
++ if (rsync_chunk_end != 0xFFFFFFFFUL)
++ rsync_chunk_end -= WSIZE;
+
+ block_start -= (long) WSIZE;
+
+@@ -570,6 +587,39 @@ local void fill_window()
+ }
+ }
+
++local void rsync_roll(start, num)
++ unsigned start;
++ unsigned num;
++{
++ unsigned i;
++
++ if (start < RSYNC_WIN) {
++ /* before window fills. */
++ for (i = start; i < RSYNC_WIN; i++) {
++ if (i == start + num) return;
++ rsync_sum += (ulg)window[i];
++ }
++ num -= (RSYNC_WIN - start);
++ start = RSYNC_WIN;
++ }
++
++ /* buffer after window full */
++ for (i = start; i < start+num; i++) {
++ /* New character in */
++ rsync_sum += (ulg)window[i];
++ /* Old character out */
++ rsync_sum -= (ulg)window[i - RSYNC_WIN];
++ if (rsync_chunk_end == 0xFFFFFFFFUL && RSYNC_SUM_MATCH(rsync_sum))
++ rsync_chunk_end = i;
++ }
++}
++
++/* ===========================================================================
++ * Set rsync_chunk_end if window sum matches magic value.
++ */
++#define RSYNC_ROLL(s, n) \
++ do { if (rsync) rsync_roll((s), (n)); } while(0)
++
+ /* ===========================================================================
+ * Flush the current block, with given end-of-file flag.
+ * IN assertion: strstart is set to the end of the current match.
+@@ -617,6 +667,7 @@ local off_t deflate_fast()
+
+ lookahead -= match_length;
+
++ RSYNC_ROLL(strstart, match_length);
+ /* Insert new strings in the hash table only if the match length
+ * is not too large. This saves time but degrades compression.
+ */
+@@ -645,9 +696,18 @@ local off_t deflate_fast()
+ /* No match, output a literal byte */
+ Tracevv((stderr,"%c",window[strstart]));
+ flush = ct_tally (0, window[strstart]);
++ RSYNC_ROLL(strstart, 1);
+ lookahead--;
+ strstart++;
+ }
++ if (rsync && strstart > rsync_chunk_end) {
++ ush attr = 0; /* ascii/binary flag */
++
++ flush = 1;
++ /* Reset huffman tree */
++ ct_init(&attr, &method);
++ rsync_chunk_end = 0xFFFFFFFFUL;
++ }
+ if (flush) FLUSH_BLOCK(0), block_start = strstart;
+
+ /* Make sure that we always have enough lookahead, except
+@@ -721,6 +781,7 @@ off_t deflate()
+ */
+ lookahead -= prev_length-1;
+ prev_length -= 2;
++ RSYNC_ROLL(strstart, prev_length+1);
+ do {
+ strstart++;
+ INSERT_STRING(strstart, hash_head);
+@@ -733,24 +794,51 @@ off_t deflate()
+ match_available = 0;
+ match_length = MIN_MATCH-1;
+ strstart++;
+- if (flush) FLUSH_BLOCK(0), block_start = strstart;
+
++ if (rsync && strstart > rsync_chunk_end) {
++ ush attr = 0; /* ascii/binary flag */
++
++ /* Reset huffman tree */
++ ct_init(&attr, &method);
++ rsync_chunk_end = 0xFFFFFFFFUL;
++ flush = 1;
++ }
++ if (flush) FLUSH_BLOCK(0), block_start = strstart;
+ } else if (match_available) {
+ /* If there was no match at the previous position, output a
+ * single literal. If there was a match but the current match
+ * is longer, truncate the previous match to a single literal.
+ */
+ Tracevv((stderr,"%c",window[strstart-1]));
+- if (ct_tally (0, window[strstart-1])) {
+- FLUSH_BLOCK(0), block_start = strstart;
+- }
++ flush = ct_tally (0, window[strstart-1]);
++ if (rsync && strstart > rsync_chunk_end) {
++ ush attr = 0; /* ascii/binary flag */
++
++ /* Reset huffman tree */
++ ct_init(&attr, &method);
++ rsync_chunk_end = 0xFFFFFFFFUL;
++
++ flush = 1;
++ }
++ if (flush) FLUSH_BLOCK(0), block_start = strstart;
++ RSYNC_ROLL(strstart, 1);
+ strstart++;
+ lookahead--;
+ } else {
+ /* There is no previous match to compare with, wait for
+ * the next step to decide.
+ */
++ if (rsync && strstart > rsync_chunk_end) {
++ ush attr = 0; /* ascii/binary flag */
++
++ /* Reset huffman tree */
++ ct_init(&attr, &method);
++ rsync_chunk_end = 0xFFFFFFFFUL;
++
++ FLUSH_BLOCK(0), block_start = strstart;
++ }
+ match_available = 1;
++ RSYNC_ROLL(strstart, 1);
+ strstart++;
+ lookahead--;
+ }
+diff --git a/doc/gzip.texi b/doc/gzip.texi
+index a6009d2..84887c3 100644
+--- a/doc/gzip.texi
++++ b/doc/gzip.texi
+@@ -353,6 +353,14 @@ specified on the command line are directories, @command{gzip} will descend
+ 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 can reduce the compression slightly in some 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 --git a/gzip.c b/gzip.c
+index 9e2a890..b867350 100644
+--- a/gzip.c
++++ b/gzip.c
+@@ -218,6 +218,7 @@ int ofd; /* output file descriptor */
+ 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 */
+
+ static int handled_sig[] =
+ {
+@@ -271,6 +272,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 }
+ };
+
+@@ -352,6 +354,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.",
+ "",
+@@ -479,6 +482,9 @@ int main (int argc, char **argv)
+ recursive = 1;
+ #endif
+ break;
++ case 'R':
++ rsync = 1; break;
++
+ case 'S':
+ #ifdef NO_MULTIPLE_DOTS
+ if (*optarg == '.') optarg++;
+diff --git a/gzip.h b/gzip.h
+index 0c3dd68..5270c56 100644
+--- a/gzip.h
++++ b/gzip.h
+@@ -146,6 +146,7 @@ EXTERN(uch, window); /* Sliding window and suffix table (unlzw) */
+ 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 */
++extern int rsync; /* deflate into rsyncable chunks */
+
+ extern off_t bytes_in; /* number of input bytes */
+ extern off_t bytes_out; /* number of output bytes */
+diff --git a/doc/gzip.texi b/doc/gzip.texi
+index 84887c3..ecd4e00 100644
+--- a/doc/gzip.texi
++++ b/doc/gzip.texi
+@@ -207,6 +207,7 @@ Mandatory arguments to long options are mandatory for short options too.
+ -V, --version display version number
+ -1, --fast compress faster
+ -9, --best compress better
++ --rsyncable Make rsync-friendly archive
+
+ With no FILE, or when FILE is -, read standard input.
+
+@@ -361,6 +362,14 @@ 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 --rsyncable
++While compressing, synchronize the output occasionally based on
++the input. This increases size by less than 1 percent most
++cases, but means that the @command{rsync} program can much more efficiently
++synchronize files compressed with this flag. @command{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
--- /dev/null
+getdtablesize-missing.diff
+rsyncable.diff
+zless-LESSOPEN.diff
+sys_stat.in.h.diff
+determinism.diff
+zgrep-dash-h.diff
+gzip-man-pack.diff
+zdiff-man.diff
+rfc-urls.diff
--- /dev/null
+diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h
+index e83ab1a..c71d44e 100644
+--- a/lib/sys_stat.in.h
++++ b/lib/sys_stat.in.h
+@@ -500,14 +500,33 @@ extern int mknodat (int fd, char const *file, mode_t mode, dev_t dev)
+ /* We can't use the object-like #define stat rpl_stat, because of
+ struct stat. This means that rpl_stat will not be used if the user
+ does (stat)(a,b). Oh well. */
+-# undef stat
+-# ifdef _LARGE_FILES
++# if defined _AIX && defined stat && defined _LARGE_FILES
+ /* With _LARGE_FILES defined, AIX (only) defines stat to stat64,
+ so we have to replace stat64() instead of stat(). */
+-# define stat stat64
+ # undef stat64
+ # define stat64(name, st) rpl_stat (name, st)
+-# else /* !_LARGE_FILES */
++# elif defined __MINGW32__ && defined stat
++# ifdef _USE_32BIT_TIME_T
++ /* The system headers define stat to _stat32i64. */
++# undef _stat32i64
++# define _stat32i64(name, st) rpl_stat (name, st)
++# else
++ /* The system headers define stat to _stat64. */
++# undef _stat64
++# define _stat64(name, st) rpl_stat (name, st)
++# endif
++# elif defined _MSC_VER && defined stat
++# ifdef _USE_32BIT_TIME_T
++ /* The system headers define stat to _stat32. */
++# undef _stat32
++# define _stat32(name, st) rpl_stat (name, st)
++# else
++ /* The system headers define stat to _stat64i32. */
++# undef _stat64i32
++# define _stat64i32(name, st) rpl_stat (name, st)
++# endif
++# else /* !(_AIX ||__MINGW32__ || _MSC_VER) */
++# undef stat
+ # define stat(name, st) rpl_stat (name, st)
+ # endif /* !_LARGE_FILES */
+ extern int stat (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2));
--- /dev/null
+diff --git a/zdiff.1 b/zdiff.1
+index 588974c..3a586a2 100644
+--- a/zdiff.1
++++ b/zdiff.1
+@@ -10,6 +10,7 @@ zcmp, zdiff \- compare compressed files
+ [ diff_options ] file1
+ [ file2 ]
+ .SH DESCRIPTION
++.P
+ .I Zcmp
+ and
+ .I zdiff
+@@ -23,11 +24,11 @@ All options specified are passed directly to
+ .I cmp
+ or
+ .IR diff "."
+-If only 1 file is specified, then the files compared are
+-.I file1
+-and an uncompressed
+-.IR file1 ".gz."
+-If two files are specified, then they are uncompressed if necessary and fed to
++If only one file is specified, then it is compared to a file with the same name
++without the
++.I ".gz"
++extension. If two files are specified, then they are uncompressed if necessary
++and fed to
+ .I cmp
+ or
+ .IR diff "."
+@@ -36,6 +37,13 @@ The exit status from
+ or
+ .I diff
+ is preserved.
++.P
++When both files must be uncompressed before comparison, the second is
++uncompressed to
++.IR "/tmp" "."
++In all other cases,
++.IR "zdiff" " and " "zcmp"
++use only a pipe.
+ .SH "SEE ALSO"
+ cmp(1), diff(1), zmore(1), zgrep(1), znew(1), zforce(1), gzip(1), gzexe(1)
+ .SH BUGS
--- /dev/null
+diff --git a/zgrep.in b/zgrep.in
+index a828bbc..7095aff 100644
+--- a/zgrep.in
++++ b/zgrep.in
+@@ -138,7 +138,7 @@ while test $# -ne 0; do
+ files_with_matches=1;;
+ (-L | --files-witho*)
+ files_without_matches=1;;
+- (--no-f*)
++ (-h | --no-f*)
+ no_filename=1;;
+ (-V | --v | --ve | --ver | --vers | --versi | --versio | --version)
+ echo "$version" || exit 2
--- /dev/null
+--- gzip-1.4.orig/zless.in
++++ gzip-1.4/zless.in
+@@ -53,5 +53,5 @@ if test "${LESSMETACHARS+set}" != set; t
+ export LESSMETACHARS
+ fi
+
+-LESSOPEN="|gzip -cdfq -- %s"; export LESSOPEN
++LESSOPEN="|-gzip -cdfq -- %s"; export LESSOPEN
+ exec less "$@"
--- /dev/null
+#!/usr/bin/make -f
+# Debian rules file for gzip, requires the debhelper package.
+# Crafted by Bdale Garbee, bdale@gag.com, 5 November 2000
+
+# Comment this to turn off debhelper verbose mode.
+export DH_VERBOSE=1
+
+DEB_BUILD_GNU_TYPE = $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+CONFARGS = --host=$(DEB_HOST_GNU_TYPE)
+endif
+
+CFLAGS = `dpkg-buildflags --get CFLAGS`
+CFLAGS += -Wall
+LDFLAGS = `dpkg-buildflags --get LDFLAGS`
+CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
+
+ifeq ($(shell dpkg-architecture -qDEB_HOST_ARCH),amd64)
+CFLAGS += -DUNALIGNED_OK
+endif
+
+reconf-stamp:
+ cp -f /usr/share/misc/config.sub build-aux/config.sub
+ cp -f /usr/share/misc/config.guess build-aux/config.guess
+ autoreconf -v
+ touch $@
+
+configure: configure-stamp
+configure-stamp: reconf-stamp
+ dh_testdir
+ mkdir -p build
+ cd build && CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" ../configure \
+ --prefix=/usr --bindir=/bin \
+ --infodir=`pwd`/debian/gzip/usr/share/info \
+ --mandir=`pwd`/debian/gzip/usr/share/man $(CONFARGS)
+ touch $@
+
+configure-indep: configure-indep-stamp
+configure-indep-stamp: reconf-stamp
+ dh_testdir
+ mkdir -p build-indep
+ cd build-indep && ../configure --host=i686-w64-mingw32
+ touch $@
+
+build: build-arch build-indep
+
+build-arch: build-stamp
+build-stamp: configure-stamp
+ dh_testdir
+ $(MAKE) -C build
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+ $(MAKE) -C build check
+endif
+endif
+ touch $@
+
+build-indep: build-indep-stamp
+build-indep-stamp: configure-indep-stamp
+ dh_testdir
+ $(MAKE) -C build-indep
+ touch $@
+
+clean:
+ dh_testdir
+ dh_testroot
+ -rm -f build-stamp build-indep-stamp configure-stamp configure-indep-stamp reconf-stamp
+ -rm -rf build build-indep
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ $(MAKE) -C build install prefix=`pwd`/debian/gzip/usr bindir=`pwd`/debian/gzip/bin
+
+install-indep: build-indep
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ i686-w64-mingw32-strip build-indep/gzip.exe
+ install -m 0755 build-indep/gzip.exe debian/gzip-win32/usr/share/win32/
+
+binary-indep: build-indep install-indep
+ dh_testdir -i
+ dh_testroot -i
+ dh_installdocs -i README* TODO
+ dh_installchangelogs -i ChangeLog
+ dh_lintian -i
+ dh_compress -i
+ dh_fixperms -i
+ dh_installdeb -i
+ dh_gencontrol -i
+ dh_md5sums -i
+ dh_builddeb -i
+
+binary-arch: build install
+ dh_testdir -s
+ dh_testroot -s
+ dh_installdocs -s README* TODO
+ dh_installman *.1
+ dh_installinfo -s doc/gzip.info
+ dh_installchangelogs -s ChangeLog
+ dh_link -s
+ dh_lintian -s
+ dh_strip -s
+ dh_compress -s
+ ln -s gunzip.1.gz debian/gzip/usr/share/man/man1/uncompress.1.gz
+ ln -s zgrep.1.gz debian/gzip/usr/share/man/man1/zegrep.1.gz
+ ln -s zgrep.1.gz debian/gzip/usr/share/man/man1/zfgrep.1.gz
+ dh_fixperms -s
+ # You may want to make some executables suid here.
+ dh_makeshlibs -s
+ dh_installdeb -s
+ dh_shlibdeps -s
+ dh_gencontrol -s
+ dh_md5sums -s
+ dh_builddeb -s
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
+.PHONY: build-indep install-indep configure-indep
+
--- /dev/null
+3.0 (quilt)
--- /dev/null
+gzip source: debhelper-but-no-misc-depends gzip-win32
+gzip source: debhelper-but-no-misc-depends gzip
--- /dev/null
+version=2
+ftp://ftp.gnu.org/gnu/gzip/gzip-([\d\.\d]+)\.tar\.gz
#endif
/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */
+#ifndef RSYNC_WIN
+# define RSYNC_WIN 8192
+#endif
+/* Size of rsync window, must be < MAX_DIST */
+
+#define RSYNC_SUM_MATCH(sum) (((sum) & (RSYNC_WIN - 1)) == 0)
+/* Whether window sum matches magic value */
+
/* ===========================================================================
* Local data used by the "longest match" routines.
*/
unsigned good_match;
/* Use a faster search when the previous match is longer than this */
+local ulg rsync_sum; /* rolling sum of rsync window */
+local ulg rsync_chunk_end; /* next rsync sequence point */
/* 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
#endif
/* prev will be initialized on the fly */
+ /* rsync params */
+ rsync_chunk_end = 0xFFFFFFFFUL;
+ rsync_sum = 0;
+
/* Set the default configuration parameters:
*/
max_lazy_match = configuration_table[pack_level].max_lazy;
strstart = 0;
block_start = 0L;
+ rsync_chunk_end = 0xFFFFFFFFUL;
#ifdef ASMV
match_init(); /* initialize the asm code */
#endif
memcpy((char*)window, (char*)window+WSIZE, (unsigned)WSIZE);
match_start -= WSIZE;
strstart -= WSIZE; /* we now have strstart >= MAX_DIST: */
+ if (rsync_chunk_end != 0xFFFFFFFFUL)
+ rsync_chunk_end -= WSIZE;
block_start -= (long) WSIZE;
}
}
+local void rsync_roll(start, num)
+ unsigned start;
+ unsigned num;
+{
+ unsigned i;
+
+ if (start < RSYNC_WIN) {
+ /* before window fills. */
+ for (i = start; i < RSYNC_WIN; i++) {
+ if (i == start + num) return;
+ rsync_sum += (ulg)window[i];
+ }
+ num -= (RSYNC_WIN - start);
+ start = RSYNC_WIN;
+ }
+
+ /* buffer after window full */
+ for (i = start; i < start+num; i++) {
+ /* New character in */
+ rsync_sum += (ulg)window[i];
+ /* Old character out */
+ rsync_sum -= (ulg)window[i - RSYNC_WIN];
+ if (rsync_chunk_end == 0xFFFFFFFFUL && RSYNC_SUM_MATCH(rsync_sum))
+ rsync_chunk_end = i;
+ }
+}
+
+/* ===========================================================================
+ * Set rsync_chunk_end if window sum matches magic value.
+ */
+#define RSYNC_ROLL(s, n) \
+ do { if (rsync) rsync_roll((s), (n)); } while(0)
+
/* ===========================================================================
* Flush the current block, with given end-of-file flag.
* IN assertion: strstart is set to the end of the current match.
lookahead -= match_length;
- /* Insert new strings in the hash table only if the match length
+ RSYNC_ROLL(strstart, match_length);
+ /* Insert new strings in the hash table only if the match length
* is not too large. This saves time but degrades compression.
*/
if (match_length <= max_insert_length) {
/* No match, output a literal byte */
Tracevv((stderr,"%c",window[strstart]));
flush = ct_tally (0, window[strstart]);
+ RSYNC_ROLL(strstart, 1);
lookahead--;
strstart++;
}
+ if (rsync && strstart > rsync_chunk_end) {
+ ush attr = 0; /* ascii/binary flag */
+
+ flush = 1;
+ /* Reset huffman tree */
+ ct_init(&attr, &method);
+ rsync_chunk_end = 0xFFFFFFFFUL;
+ }
if (flush) FLUSH_BLOCK(0), block_start = strstart;
/* Make sure that we always have enough lookahead, except
*/
lookahead -= prev_length-1;
prev_length -= 2;
+ RSYNC_ROLL(strstart, prev_length+1);
do {
strstart++;
INSERT_STRING(strstart, hash_head);
match_available = 0;
match_length = MIN_MATCH-1;
strstart++;
- if (flush) FLUSH_BLOCK(0), block_start = strstart;
+ if (rsync && strstart > rsync_chunk_end) {
+ ush attr = 0; /* ascii/binary flag */
+
+ /* Reset huffman tree */
+ ct_init(&attr, &method);
+ rsync_chunk_end = 0xFFFFFFFFUL;
+ flush = 1;
+ }
+ if (flush) FLUSH_BLOCK(0), block_start = strstart;
} else if (match_available) {
/* If there was no match at the previous position, output a
* single literal. If there was a match but the current match
* is longer, truncate the previous match to a single literal.
*/
Tracevv((stderr,"%c",window[strstart-1]));
- if (ct_tally (0, window[strstart-1])) {
- FLUSH_BLOCK(0), block_start = strstart;
- }
+ flush = ct_tally (0, window[strstart-1]);
+ if (rsync && strstart > rsync_chunk_end) {
+ ush attr = 0; /* ascii/binary flag */
+
+ /* Reset huffman tree */
+ ct_init(&attr, &method);
+ rsync_chunk_end = 0xFFFFFFFFUL;
+
+ flush = 1;
+ }
+ if (flush) FLUSH_BLOCK(0), block_start = strstart;
+ RSYNC_ROLL(strstart, 1);
strstart++;
lookahead--;
} else {
/* There is no previous match to compare with, wait for
* the next step to decide.
*/
+ if (rsync && strstart > rsync_chunk_end) {
+ ush attr = 0; /* ascii/binary flag */
+
+ /* Reset huffman tree */
+ ct_init(&attr, &method);
+ rsync_chunk_end = 0xFFFFFFFFUL;
+
+ FLUSH_BLOCK(0), block_start = strstart;
+ }
match_available = 1;
+ RSYNC_ROLL(strstart, 1);
strstart++;
lookahead--;
}
--- /dev/null
+/gendocs_template
-V, --version display version number
-1, --fast compress faster
-9, --best compress better
+ --rsyncable Make rsync-friendly archive
With no FILE, or when FILE is -, read standard input.
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 can reduce the compression slightly in some 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 --rsyncable
+While compressing, synchronize the output occasionally based on
+the input. This increases size by less than 1 percent most
+cases, but means that the @command{rsync} program can much more efficiently
+synchronize files compressed with this flag. @command{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
The
.I gzip
file format is specified in P. Deutsch, \s-1GZIP\s0 file format
-specification version 4.3, <ftp://ftp.isi.edu/in-notes/rfc1952.txt>,
+specification version 4.3, <http://www.ietf.org/rfc/rfc1952.txt>,
Internet RFC 1952 (May 1996). The
.I zip
deflation format is specified in P. Deutsch, \s-1DEFLATE\s0 Compressed
Data Format Specification version 1.3,
-<ftp://ftp.isi.edu/in-notes/rfc1951.txt>, Internet RFC 1951 (May 1996).
+<http://www.ietf.org/rfc/rfc1951.txt>, Internet RFC 1951 (May 1996).
.SH OPTIONS
.TP
On Vax/VMS, the name of the environment variable is GZIP_OPT, to
avoid a conflict with the symbol set for invocation of the program.
.SH "SEE ALSO"
-znew(1), zcmp(1), zmore(1), zforce(1), gzexe(1), zip(1), unzip(1), compress(1),
-pack(1), compact(1)
+znew(1), zcmp(1), zmore(1), zforce(1), gzexe(1), zip(1), unzip(1), compress(1)
.PP
The
.I gzip
file format is specified in P. Deutsch, \s-1GZIP\s0 file format
specification version 4.3,
-.BR <ftp://ftp.isi.edu/in-notes/rfc1952.txt> ,
+.BR <http://www.ietf.org/rfc/rfc1952.txt> ,
Internet RFC 1952 (May 1996).
The
.I zip
deflation format is specified in P. Deutsch, \s-1DEFLATE\s0 Compressed
Data Format Specification version 1.3,
-.BR <ftp://ftp.isi.edu/in-notes/rfc1951.txt> ,
+.BR <http://www.ietf.org/rfc/rfc1951.txt> ,
Internet RFC 1951 (May 1996).
.SH "DIAGNOSTICS"
Exit status is normally 0;
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 */
static int handled_sig[] =
{
{"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 }
};
" -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.",
"",
#else
recursive = 1;
#endif
- break;
- case 'S':
+ break;
+ case 'R':
+ rsync = 1; break;
+
+ case 'S':
#ifdef NO_MULTIPLE_DOTS
if (*optarg == '.') optarg++;
#endif
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 */
+extern int rsync; /* deflate into rsyncable chunks */
extern off_t bytes_in; /* number of input bytes */
extern off_t bytes_out; /* number of output bytes */
--- /dev/null
+config.h
+fcntl.h
+libgzip.a
+stamp-h1
+stdlib.h
+time.h
+unistd.h
+sys/stat.h
--- /dev/null
+/asm-underscore.m4
+/cloexec.m4
+/configmake.m4
+/gnulib-comp.m4
+/gnulib-tool.m4
+/wchar_h.m4
+/wctype_h.m4
[ diff_options ] file1
[ file2 ]
.SH DESCRIPTION
+.P
.I Zcmp
and
.I zdiff
.I cmp
or
.IR diff "."
-If only 1 file is specified, then the files compared are
-.I file1
-and an uncompressed
-.IR file1 ".gz."
-If two files are specified, then they are uncompressed if necessary and fed to
+If only one file is specified, then it is compared to a file with the same name
+without the
+.I ".gz"
+extension. If two files are specified, then they are uncompressed if necessary
+and fed to
.I cmp
or
.IR diff "."
or
.I diff
is preserved.
+.P
+When both files must be uncompressed before comparison, the second is
+uncompressed to
+.IR "/tmp" "."
+In all other cases,
+.IR "zdiff" " and " "zcmp"
+use only a pipe.
.SH "SEE ALSO"
cmp(1), diff(1), zmore(1), zgrep(1), znew(1), zforce(1), gzip(1), gzexe(1)
.SH BUGS