fsync output file before closing
[debian/gzip] / NEWS
1 GNU gzip NEWS                                    -*- outline -*-
2
3 * Noteworthy changes in release ?.? (????-??-??) [?]
4
5 ** Changes in behavior
6
7   When acting in-place, gzip now fsyncs the output before closing it.
8   This is slower, but on many file systems it is safer if the system
9   is about to crash.
10
11   The GZIP environment variable is now obsolescent; gzip now warns if
12   it is used, and rejects attempts to use dangerous options or operands.
13   You can use an alias or script instead.
14
15 ** Bug fixes
16
17   gzip -k -v no longer reports that files are replaced.
18   [bug present since the beginning]
19
20
21 * Noteworthy changes in release 1.6 (2013-06-09) [stable]
22
23 ** New features
24
25   gzip now accepts the --keep (-k) option, for consistency with tools
26   like xz, lzip and bzip2.  With this option, gzip no longer removes
27   named input files when compressing or decompressing.
28
29 ** Bug fixes
30
31   gzip -d no longer malfunctions with certain invalid data in 'pack' format.
32   [bug introduced in gzip-0.8]
33
34   When overwriting, gzip no longer acts as if you typed "y" when you type "n",
35   on some platforms when compiled with optimization.
36   [bug introduced in gzip-1.3.6]
37
38   zgrep no longer malfunctions with a multi-digit context option like -15.
39   Now, it passes that option to grep (equivalent to -C15) just as it does
40   for single-digit options. [bug introduced in gzip-1.3.12]
41
42   zmore now acts more like 'more', and is more portable to POSIXish hosts.
43
44
45 * Noteworthy changes in release 1.5 (2012-06-17) [stable]
46
47 ** Bug fixes
48
49   gzip -d now decodes and checks header CRC16 checksums as specified by
50   the FHCRC section of Internet RFC 1952.
51
52   "gzip -d -S '' precious.gz" is now rejected immediately.  Before,
53   that command would emulate "rm -i precious.gz", but with an easily-
54   misunderstood prompt.  I.e., gzip would ask if it's ok to remove the
55   existing file, "precious.gz".  If you made the mistake of saying "yes",
56   it would remove that input file before attempting to uncompress it.
57
58   gzip -cdf now properly handles input consisting of gzip'd data followed
59   by uncompressed data.  Before it would output raw compressed input, too.
60   For example, now "(printf x|gzip; echo y)|gzip -dcf" prints "xy\n",
61   while before it would print "x<compressed data>y\n".
62
63   gzip -rf no longer compresses files more than once (e.g., replacing
64   FOO with FOO.gz.gz) on file systems such as ZFS where a readdir
65   loop that unlinks and creates files can revisit output files.
66
67
68 * Noteworthy changes in release 1.4 (2010-01-20) [stable]
69
70 ** Bug fixes
71
72   gzip -d could segfault and/or clobber the stack, possibly leading to
73   arbitrary code execution.  This affects x86_64 but not 32-bit systems.
74   This fixes CVE-2010-0001.
75   For more details, see http://bugzilla.redhat.com/554418
76
77   gzip -d would fail with a CRC error for some valid inputs.
78   So far, the only valid input known to exhibit this failure was
79   compressed "from FAT filesystem (MS-DOS, OS/2, NT)".  In addition,
80   to trigger the failure, your memcpy implementation must copy in
81   the "reverse" order.
82
83
84 * Noteworthy changes in release 1.3.14 (2009-10-30) [beta]
85
86 ** Bug fixes
87
88   gzip no longer fails when there is exactly one trailing NUL byte
89   gzip has always accepted trailing NUL bytes.  Note the plural.
90
91   zdiff would exit with status 2 (indicating an error) rather than 1 to
92   indicate differences when both inputs were compressed and different.
93
94   zdiff would fail to print differences in two compressed inputs
95
96   zgrep -f - didn't work
97
98
99 * Noteworthy changes in release 1.3.13 (2009-09-30) [stable]
100
101 ** 'gzip -f foo.gz' now creates a file foo.gz.gz instead of complaining.
102
103 ** Bug fixes
104
105   gzip -d no longer fails with "-" as 2nd or subsequent argument
106
107   gzip no longer ignores a close-induced write failure, e.g., on NFS
108
109   gzip -d no longer segfaults on certain invalid inputs
110
111
112 Major changes in Gzip 1.3.12 (2007-04-13)
113
114 * znew now uses $TMPDIR (default /tmp) instead of always using /tmp.
115
116 * It is now documented that gzip ignores case when examining file name
117   extensions; for example, 'gzip test.Gz' (without -f) fails because
118   the file name ends in '.Gz'.
119
120 Major changes in Gzip 1.3.11 (2007-02-05)
121
122 * As per the GNU coding standards, the behavior of gzip and its
123   companion executables no longer depend on the name used to invoke them.
124   For example, 'gzip' and 'gunzip' are no longer hard links;
125   instead, 'gunzip' is now a small program that invokes 'gzip -d'.
126
127 * zdiff now checks for subsidiary gzip failures, and works around
128   bugs in IRIX 6 sh, Tru64 4.0F ksh, and Solaris 8 bash.
129
130 Major changes in Gzip 1.3.10 (2006-12-30)
131
132 * gzip -c and zcat now work on special files, files with special mode bits,
133   and files with multiple hard links.
134 * gzip -q now exits with status 2 (not 1) when SIGPIPE is received.
135 * zcmp and zdiff did not work in the usual case, due to a typo.
136 * zgrep has many bugs fixed with argument handling, special characters,
137   and exit status.
138 * zless no longer mishandles $%=~ in file names.
139
140 Gzip 1.3.9 (2006-12-15)
141
142 * No major changes; only porting fixes.
143
144 Major changes in Gzip 1.3.8 (2006-12-08)
145
146 * Fix some gzip problems:
147   - A security fix from Debian 1.3.5-5 was inadvertently omitted.
148   - The assembler is now invoked with --noexecstack if supported,
149     so that gzip can better resist stack-smashing attacks.
150
151 Major changes in Gzip 1.3.7 (2006-12-06)
152
153 * Fix some gzip problems:
154   - Refuse to compress setuid or setgid files, or files with the sticky bit.
155   - Fix more race conditions in setting file permissions and owner,
156     removing output files, following symbolic links, and dealing with
157     special files.
158   - Remove most of the code working around ENAMETOOLONG deficiencies.
159     Systems with those deficiencies are long-dead, and the workarounds
160     had race conditions on modern hosts.
161   - Catch CPU time and file size limit signals, too.
162   - Check for read errors when closing files.
163   - Fix a core dump caused by a stray abort mistakenly introduced in 1.3.6.
164 * Fix some gzexe problems:
165   - Improve resistance to denial-of-service attacks.
166   - Fix some quoting and escaping bugs.
167   - Do not assume /tmp is sticky (though it should be!).
168   - Do not assume the working directory can be written.
169   - Rely on PATH in the generated executable, as the man page says.
170   - Don't assume IFS is sane.
171   - Exit with signal's status, if signaled.
172
173 Major changes in Gzip 1.3.6 (2006-11-20)
174
175 * Fix some race conditions in setting file time stamps, permissions, and owner.
176 * Fix some race conditions in signal handling.
177 * When gzip exits due to a signal, it exits with the signal's status, not 1.
178 * gzip now restores file time stamps to the resolution supported by the
179   time-setting primitives of the operating system, typically 1 microsecond.
180   Formerly it restored them only to the nearest second.
181 * gzip -r no longer attempts to reset the last-access times of directories
182   it reads, as this messes up when other processes are reading the directories.
183 * The options --version and --help now work on all gzip-installed executables,
184   and now use a format similar to other GNU programs.
185 * The manual is now distributed under the terms of the GNU Free
186   Documentation License without invariant sections or cover texts.
187 * Port to current versions of Autoconf, Automake, and Gnulib.
188
189 Major changes from 1.3.4 to 1.3.5
190 * gzip now removes any output symlink before writing output file.
191 * zgrep etc. scripts now port to POSIX 1003.1-2001 hosts.
192 * zforce no longer assumes 14-byte file name length limit.
193 * zless is now implemented using less and LESSOPEN, not zmore and PAGER.
194 * assembly-language speedups reenabled; were mistakenly disabled in 1.3.
195
196 Major changes from 1.3.3 to 1.3.4
197 * Less output is lost when decompressing a truncated file.
198 * The manual is now distributed under the terms of the GNU Free
199   Documentation License.
200
201 No major changes in 1.3.2 or 1.3.3 (bug fixes only)
202
203 Major changes from 1.3 to 1.3.1
204 * zgrep now supports --, -H, -h, -L, -l, -C, -d, -m and their long equivalents.
205
206 Major changes from 1.2.4 to 1.3
207 * Add support for large files, e.g. files larger than 2 GB on Solaris 2.6.
208 * Adjust file size listing format for files larger than 10 GB.
209 * New command `zless'.
210 * `zdiff' now reports exit status like `diff' does.
211 * `zcat' is now always called `zcat', not `gzcat'.
212   Similarly for `zdiff', `zgrep', `zmore', `znew', `zforce'.
213 * Warn about a compressed file's trailing zeros only if verbose,
214   for compatibility with recent versions of GNU tar.
215 * Conform to changes to GNU makefile standards.
216 * Port to Autoconf 2.13.
217 * Convert to Automake.
218 * Fix bugs in the following areas:
219   - files larger than 4 GB
220   - security hole involving symlinks from /tmp
221   - security hole involving long file names
222   - permissions bug when compressing a symbolic link to a file
223   - core dumps
224   - concatenated compressed files on INBUFSIZ boundaries
225   - porting bugs on hosts with signed chars
226   - porting bug with upper and lower case
227   - porting bug for hosts that reserve the names `basename' or `warning'
228
229 Major changes from 1.2.3 to 1.2.4
230 * By default, do not restore file name and timestamp from those saved
231   inside the .gz file (behave as 'compress'). Added the --name option
232   to force name and timestamp restoration.
233 * Accept - as synonym for stdin.
234 * Use manlinks=so or ln to support either hard links or .so in man pages
235 * Accept foo.gz~ in zdiff.
236 * Added support for Windows NT
237 * Handle ENAMETOOLONG for strict Posix systems
238 * Use --recursive instead of --recurse to comply with Webster and
239   the GNU stdandard.
240 * Allow installation of shell scripts with a g prefix: make G=g install
241 * Install by default zcat as gzcat if gzcat already exists in path.
242 * Let zmore behave as more when invoked without parameters (give help)
243 * Let gzip --list reject files not in gzip format even with --force.
244 * Don't complain about non gzip files for options -rt or -rl.
245 * Added advice in INSTALL for several systems.
246
247 Major changes from 1.2.2 to 1.2.3
248 * Don't display the output name when decompressing except with --verbose.
249 * Remove usage of alloca in getopt.c and all makefiles.
250 * Added the zfile shell script in subdirectory sample.
251 * Moved the list of compiler bugs from README to INSTALL.
252 * Added vms/Readme.vms.
253
254 Major changes from 1.2.1 to 1.2.2
255 * Fix a compilation error on Sun with cc (worked with gcc).
256
257 Major changes from 1.2 to 1.2.1
258 * Let zmore act as more if the data is not gzipped.
259 * made gzexe more secure (don't rely on PATH).
260 * By default, display output name only when the name was actually truncated.
261
262 Major changes from 1.1.2 to 1.2
263 * Added the --list option to display the file characteristics.
264 * Added the --no-name option: do not save or restore original filename
265   Save the original name by default.
266 * Allow gunzip --suffix "" to attempt decompression on any file
267   regardless of its extension if an original name is present.
268 * Add support for the SCO compress -H format.
269 * gzip --fast now compresses faster (speed close to that of compress)
270   with degraded compression ratio (but still better than compress).
271   Default level changed to -6 (acts exactly as previous level -5) to
272   be a better indication of its placement in the speed/ratio range.
273 * Use smart name truncation: 123456789012.c -> 123456789.c.gz
274    instead of 12345678901.gz
275 * With --force, let zcat pass non gzip'ed data unchanged (zcat == cat)
276 * Added the zgrep shell script.
277 * Made sub.c useful for 16 bit sound, 24 bit images, etc..
278 * Suppress warnings about suffix for gunzip -r, except with --verbose.
279 * On MSDOS, use .gz extension when possible (files without extension)
280 * Moved the sample programs to a subdirectory sample.
281 * Added a "Special targets" section in INSTALL.
282
283 Major changes from 1.1.1 to 1.1.2.
284 * Fix serious bug for VMS (-gz not removed when decompressing).
285 * Allow suffix other than .gz in znew.
286 * Do not display compression ratio when decompressing stdin.
287 * In zmore.in, work around brain damaged stty -g (Ultrix).
288 * Display a correct compression ratio for .Z files.
289 * Added .z to .gz renaming script in INTALL.
290 * Allow setting CFLAGS in configure.
291
292 Major changes from 1.1 to 1.1.1.
293 * Fix serious bug in vms.c (affects Vax/VMS only).
294 * Added --ascii option.
295 * Add workaround in configure.in for Ultrix (quote eval argument)
296
297 Major changes from 1.0.7 to 1.1.
298 * Use .gz suffix by default, add --suffix option.
299 * Let gunzip accept a "_z" suffix (used by one 'compress' on Vax/VMS).
300 * Quit when reading garbage from stdin instead of reporting an error.
301 * Added makefile for VAX/MMS and support for wildcards on VMS.
302 * Added support for MSC under OS/2.
303 * Added support for Prime/PRIMOS.
304 * Display compression ratio also when decompressing (with --verbose).
305 * Quit after --version (GNU standard)
306 * Use --force to bypass isatty() check
307 * Continue processing other files in case of recoverable error.
308 * Added comparison of zip and gzip in the readme file.
309 * Added small sample programs (ztouch, sub, add)
310 * Use less memory when compiled with -DSMALL_MEM (for MSDOS).
311 * Remove the "off by more than one minute" time stamp kludge
312
313 Major changes from 1.0.6 to 1.0.7.
314 * Allow zmore to read from standard input (like more).
315 * Support the 68000 (Atari ST) in match.S.
316 * Retry partial writes (required on Linux when gzip is suspended in a pipe).
317 * Allow full pathnames and renamings in gzexe.
318 * Don't let gzexe compress setuid executables or gzip itself.
319 * Added vms/Makefile.gcc for gcc on the Vax.
320 * Allow installation of binaries and shell scripts in different dirs.
321 * Allows complex PAGER variable in zmore (e.g.: PAGER="col -x | more")
322 * Allow installation of zcat as gzcat.
323 * Several small changes for portability to old or weird systems.
324 * Suppress help message and send compressed data to the terminal when
325   gzip is invoked without parameters and without redirection.
326 *  Add compile option GNU_STANDARD to respect the GNU coding standards:
327    with -DGNU_STANDARD, behave as gzip even if invoked under the name gunzip.
328 (I don't like the last two changes, which were requested by the FSF.)
329
330 Major changes from 1.0.5 to 1.0.6.
331 * Let gzexe detect executables that are already gzexe'd.
332 * Keep file attributes in znew and gzexe if cpmod is available.
333 * Don't try restoring record format on VMS (1.0.5 did not work correctly)
334 * Added asm version for 68000 in amiga/match.a.
335   Use asm version for Atari TT and NeXT.
336 * For OS/2, assume HPFS by default, add flag OS2FAT if necessary.
337 * Fixed some bugs in zdiff and define zcmp as a link to zdiff.
338
339
340 Major changes from 1.0.4 to 1.0.5.
341 * For VMS, restore the file type for variable record format, otherwise
342     extract in fixed length format (not perfect, but better than
343     forcing all files to be in stream_LF format).
344 * For VMS, use "-z" default suffix and accept a version number in file names.
345 * For Unix, allow compression of files with name ending in 'z'. Use only
346   .z, .*-z, .tgz, .taz as valid gzip extensions. In the last two cases,
347   extract to .tar by default.
348 * On some versions of MSDOS, files with a 3 character extension could not
349   be compressed.
350 * Garbage collect files in /tmp created by gzexe.
351 * Fix the 'OS code' byte in the gzip header.
352 * For the Amiga, add the missing utime.h and add support for gcc.
353
354
355 Major changes from 1.0.3 to 1.0.4.
356 * Added optimized asm version for 68020.
357 * Add support for DJGPP.
358
359 * Add support for the Atari ST.
360 * Added zforce to rename gzip'ed files with truncated names.
361 * Do not install with name uncompress (some systems rely on the
362   absence of any check in the old uncompress).
363 * Added missing function (fcfree) in msdos/tailor.c
364 * Let gunzip handle .tgz files, and let gzip skip them.
365 * Added -d option (decompress) for gzexe and try preserving file permissions.
366 * Suppress all warnings with -q.
367 * Use GZIP_OPT for VMS to avoid conflict with program name.
368 * ... and many other small changes (see ChangeLog)
369
370
371 Major changes from 1.0.2 to 1.0.3
372 * Added -K option for znew to keep old .Z files if smaller
373 * Added -q option (quiet) to cancel -v in GZIP env variable.
374 * Made gzexe safer on systems with filename limitation to 14 chars.
375 * Fixed bugs in handling of GZIP env variable and incorrect free with Turbo C.
376
377
378 Major changes from 1.0.1 to 1.0.2
379 * Added env variable GZIP for default options. Example:
380    for sh:   GZIP="-8 -v"; export GZIP
381    for csh:  setenv GZIP "-8 -v"
382 * Added support for the Amiga.
383 * znew now keeps the old .Z if it is smaller than the .z file.
384   This can happen for some large and very redundant files.
385 * Do not complain about trailing garbage for record oriented IO (Vax/VMS).
386   This implies however that multi-part gzip files are not supported
387   on such systems.
388 * Added gzexe to compress rarely used executables.
389 * Reduce memory usage (required for MSDOS and useful on all systems).
390 * Preserve time stamp in znew -P (pipe option) if touch -r works.
391
392
393 Major changes from 1.0 to 1.0.1
394 * fix trivial errors in the Borland makefile (msdos/Makefile.bor)
395
396
397 Major changes from 0.8.2 to 1.0
398 * gzip now runs on Vax/VMS
399 * gzip will not not overwrite files without -f when using /bin/sh in
400   background.
401 * Support the test option -t for compressed (.Z) files.
402   Allow some data recovery for bad .Z files.
403 * Added makefiles for MSDOS (Only tested for MSC, not Borland).
404 * still more changes to configure for several systems
405
406
407 Major changes from 0.8.1 to 0.8.2:
408 * yet more changes to configure for Linux and other systems
409 * Allow zcat on a file with multiple links.
410
411
412 Major changes from 0.8 to 0.8.1:
413 * znew has now a pipe option -P to reduce the disk space requirements,
414   but this option does not preserve timestamps.
415 * Fixed some #if directives for compilation with TurboC.
416
417
418 Major changes from 0.7 to 0.8:
419 * gzip can now extract .z files created by 'pack'.
420 * configure should no longer believe that every machine is a 386
421 * Fix the entry for /etc/magic in INSTALL.
422 * Add patch for GNU tar 1.11.1 and a pointer to crypt++.el
423 * Uncompress files with multiple links only with -f.
424 * Fix for uncompress of .Z files on 16-bit machines
425 * Create a correct output name for file names of exactly N-1 chars when
426   the system has a limit of N chars.
427
428
429 Major changes from 0.6 to 0.7:
430 * Use "make check" instead of "make test".
431 * Keep time stamp and pass options to gzip in znew.
432 * Do not create .z.z files with gzip -r.
433 * Allow again gunzip .zip files (was working in 0.5)
434 * Allow again compilation with TurboC 2.0 (was working in 0.4)
435
436
437 Major changes form 0.5 to 0.6:
438 * gunzip reported an error when extracting certain .z files. The .z files
439   produced by gzip 0.5 are correct and can be read by gunzip 0.6.
440 * gunzip now supports multiple compressed members within a single .z file.
441 * Fix the check for i386 in configure.
442 * Added "make test" to check for compiler bugs. (gcc -finline-functions
443   is broken at least on the NeXT.)
444 * Use environment variable PAGER in zmore if it is defined.
445 * Accept gzcat in addition to zcat for people having /usr/bin before
446   /usr/local/bin in their path.
447
448
449 ========================================================================
450
451 Copyright (C) 1999, 2001-2002, 2006-2007, 2009-2016 Free Software Foundation,
452 Inc.
453 Copyright (C) 1992, 1993 Jean-loup Gailly
454
455 Permission is granted to copy, distribute and/or modify this document
456 under the terms of the GNU Free Documentation License, Version 1.3 or
457 any later version published by the Free Software Foundation; with no
458 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
459 Texts.  A copy of the license is included in the ``GNU Free
460 Documentation License'' file as part of this distribution.