2010-01-20 Jim Meyering version 1.4 * NEWS: Record release date. tests: exercise the segfault fix * tests/helin-segv: New test. * Makefile.am (TESTS): Add it. gzip -d: do not clobber stack for valid input on x86_64 * unlzw.c (unlzw): Avoid integer overflow. Aki Helin reported the segfault along with an input to trigger the bug. * NEWS (Bug fixes): Mention it. maint: avoid a minor "make syntax-check" failure * .x-sc_file_system: Exempt NEWS, since it includes a literal from an old diagnostic. maint: remove unused file: README-alpha * README-alpha: Remove unused file. build: update gnulib submodule to latest 2010-01-11 Yuxi Zhang gzip -d: use memcpy more often * inflate.c (inflate_codes): Use memcpy (rather than slower memcopy-like code) in more cases. 2010-01-11 Jim Meyering build: do not override gnulib-provided AM_CFLAGS options Avoid a warning from automake: lib/Makefile.am:24: AM_CFLAGS multiply defined in condition TRUE ... lib/gnulib.mk:30: ... `AM_CFLAGS' previously defined here lib/Makefile.am:20: `lib/gnulib.mk' included from here * lib/Makefile.am (AM_CFLAGS): Append $(WARN_CFLAGS) and $(WERROR_CFLAGS), i.e., use "+=", not "=". This was introduced via 2009-12-17 commit 0341fc22, "build: with --enable-gcc-warnings, use -Werror", but fortunately is not a bug, because the definition it would have overridden was always empty. gzip -d would fail with a CRC error... ...for some inputs, and some memcpy implementations. It is possible that an offending input has to be compressed "from FAT filesystem (MS-DOS, OS/2, NT)", since the sole reproducer no longer evokes a CRC error when uncompressed and recompressed on a GNU/Linux system. Also, using an unpatched reverse-memcpy-gzip on over 100,000 inputs on a GNU/Linux system did not turn up another reproducer. * inflate.c (inflate_codes): Don't call memcpy with overlapping regions. Properly detect when source and destination overlap. * tests/memcpy-abuse: New test, to trigger misbehavior. * Makefile.am (TESTS): Add it. * NEWS (Bug fixes): Mention it. Reported by Alain Magloire in http://thread.gmane.org/gmane.comp.gnu.gzip.bugs/307 2010-01-08 Jim Meyering tests: switch to gnulib's init.sh test infrastructure * tests/test-lib.sh: Remove file. * tests/init.sh: New file, from gnulib. * tests/trailing-nul: Use the new file. * tests/zdiff: Likewise. * tests/zgrep-f: Likewise. * Makefile.am (EXTRA_DIST): List tests/init.sh, not test-lib.sh. build: update gnulib submodule to latest 2010-01-03 Jim Meyering maint: record update-copyright options for this package * cfg.mk: Next time, just run "make update-copyright". 2010-01-01 Jim Meyering maint: update all FSF copyright year lists to include 2010 Use this command: git ls-files |grep -vE '^(\..*|COPYING|gnulib)$' |xargs \ env UPDATE_COPYRIGHT_USE_INTERVALS=1 build-aux/update-copyright 2009-12-31 Jim Meyering maint: newer gnulib; don't hard-code my GPG key ID * cfg.mk (gpg_key_ID): Remove definition, now that maint.mk automates it. * gnulib: Update to lastest. 2009-12-30 Jim Meyering build: update gnulib submodule to latest maint: remove lots of obsolete #if...HAVE_* checks Remove many always-true cpp tests like #ifdef HAVE_UNISTD_H, #ifdef HAVE_FCNTL_H and #ifdef SSIZE_MAX. * gzip.c: As above. * gzip.h: Likewise. * inflate.c: Likewise. * tailor.h: Likewise. * unlzw.c: Likewise. * util.c: Likewise. * zip.c: Likewise. build: add a syntax-check * cfg.mk (sc_prohibit_obsolete_HAVE_HEADER_H): New rule. build: with --enable-gcc-warnings, use -Werror * Makefile.am (AM_CFLAGS): Enable $(WERROR_CFLAGS). * lib/Makefile.am (AM_CFLAGS): Enable both $(WARN_CFLAGS) and $(WERROR_CFLAGS). build: quiet warnings from util.c * configure.ac (warnings): Add -Wno-overflow and -Wno-type-limits. build: avoid warning about possibly-no-return functions * gzip.h (read_error, write_error): Mark these functions as "no-return". build: avoid warning about ignored chown/fchown return value * bootstrap.conf (gnulib_modules): Add ignore-value. * gzip.c: Include "ignore-value.h". (copy_stat): Explicitly ignore chown and fchown failure build: update gnulib submodule to latest 2009-11-20 Jim Meyering build: unlzw.c: avoid warnings about unused macros * configure.ac: Turn off -Wunused-macros. build: avoid warnings about unused macros * unzip.c (LOCTIM): Comment out unused macro. * deflate.c (EQUAL): Remove definition. Use "0" at sole point of use. build: util.c: avoid warnings about add_envopt * util.c (add_envopt): The parameter "env" was used for two conflicting purposes. One use required a const char* parameter, while the other was used as an argument to free, which must not be "const". Rename the parameter and use a new local variable for the second role. build: avoid many const-related warnings * gzip.c: Add "const" to many variables, to avoid compiler warnings. * util.c (add_envopt): Make 3rd parameter const (gzip_error): Make sole parameter const. * gzip.h: Update prototypes. build: avoid warnings from -Wstrict-prototypes * gzip.c (main): Declare using a prototype. (progerror): Likewise. And make parameter const. build: use gnulib's fdopendir module * bootstrap.conf (gnulib_modules): Add fdopendir. * gzip.c (treat_dir): Don't depend on HAVE_FDOPENDIR. Gnulib now guarantees its availability. * configure.ac: Don't check for fdopendir here. build: enable many warnings * configure.ac: Add support for --enable-gcc-warnings. * bootstrap.conf (gnulib_modules): Add manywarnings. * Makefile.am (AM_CFLAGS): Add (WARN_CFLAGS) # $(WERROR_CFLAGS) maint: tweak formatting of bootstrap.conf * bootstrap.conf (gnulib_modules): Unindent list. maint: cfg.mk: remove factored-out ftp host/dir definitions * cfg.mk (gnu_ftp_host-alpha, gnu_ftp_host-beta gnu_ftp_host-stable): (gnu_rel_host, url_dir_list): Remove definitions. The defaults, now provided by maint.mk, are the same. * gnulib: Update for latest, including those maint.mk additions. build: "make stable" emitted an invalid gnupload command * cfg.mk (gnu_ftp_host-stable): Rename from gnu_ftp_host-major. * README-release: Change another s/major/stable/. 2009-10-30 Jim Meyering post-release administrivia * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update. version 1.3.14 * NEWS: Record release date. build: accommodate new syntax-check test * amiga/tailor.c (_expand_args): Change each of three uses of "exit(20)" to "exit(EXIT_FAILURE)". * sample/add.c: Include . (main): Use EXIT_FAILURE and EXIT_SUCCESS, not 1 and 0. * sample/sub.c (main): Likewise. * sample/zread.c (main): Likewise. build: update gnulib submodule to latest build: link with $(LIB_CLOCK_GETTIME) * Makefile.am (gzip_LDADD): Add $(LIB_CLOCK_GETTIME), now that utimens pulls in gettime. (FILES_TO_CHECK): Remove $(gzip_LDADD), now that it may contain -lrt. 2009-10-28 Jim Meyering msdos: fix syntax in Makefile.djg * msdos/Makefile.djg (gzip): Change each of two leading 8-space sequences to a TAB. Reported by Allan Mui. 2009-10-20 Jim Meyering build: do not use AC_PREFIX_PROGRAM * configure.ac: Do not use "AC_PREFIX_PROGRAM(gzip)". It would induce behavior that is so surprising that it is probably universally considered to be buggy, these days. Reported by Zube in http://thread.gmane.org/gmane.comp.gnu.gzip.bugs/273 2009-10-10 Jim Meyering gzip: add tests for today's bug fix * tests/trailing-nul: New file. Test for today's fix. * Makefile.am (TESTS): Add new script. * NEWS (Bug fixes): Mention it. 2009-10-10 Daniel Barkalow gzip: don't fail when there is exactly one trailing NUL byte * gzip.c (get_method): Require the second byte of magic only if the first byte was nonzero. 2009-10-09 Jim Meyering build: enable automake color- and parallel-test options * configure.ac (AM_INIT_AUTOMAKE): Enable color-tests and parallel-tests. zgrep: portability improvements; exercise "-f -" * zgrep.in: Adjust loop not to use seq; it's not portable enough. Fail if we don't find a free file descriptor. (exists): New function; Use it in place of less portable "test -e". Testing for existence of /dev/fd/$fd doesn't work on Solaris 10, since all 256 always exist (as char devices), but testing for /proc/$$/fd/$fd does work, so do that instead. * Makefile.am (TESTS): Add tests/zgrep-f. * tests/zgrep-f: New test; exercise this bug. * NEWS (Bug fixes): Mention it. 2009-10-09 Carl Worth zgrep: handle "-f -" the same way that it works with grep Before this change, echo needle|zgrep -f - haystack.gz would not work. * zgrep.in: When the pattern comes from stdin, redirect it to a different file descriptor, since we're about to use stdin. 2009-10-09 Jim Meyering zdiff would exit 2 (error) rather than 1 for differences * zdiff.in: Save and restore cmp's exit status around a case statement that would otherwise clobber its value. * NEWS (Bug fixes): Mention it. * tests/zdiff: New test; exercise both bugs. * tests/test-lib.sh: New file. From coreutils. * Makefile.am (EXTRA_DIST): Add tests/test-lib.sh. (TESTS): Add tests/zdiff. (TESTS_ENVIRONMENT): Define. From coreutils. (EXTRA_DIST): Append all $(TESTS). zdiff: fix malfunction when operating on two gzip'd inputs zdiff would fail to print differences in two compressed inputs * zdiff.in: Don't let cmp output mix with echo'd gzip exit status values. Report and fix from Jörg-Volker Peetz via * NEWS (Bug fixes): Mention it. build: update gnulib submodule to latest 2009-10-07 Jim Meyering build: update gnulib submodule to latest 2009-10-06 Jim Meyering maint: clarify web-doc-update instructions * README-release: sync a tiny change from coreutils. 2009-10-03 Jim Meyering build: update gnulib submodule to latest doc: use gnu-web-doc-update module * bootstrap.conf (gnulib_modules): Add it. 2009-10-02 Jim Meyering doc: describe release procedure * README-release: New file. 2009-10-01 Jim Meyering maint: make cfg.mk slightly more generic * cfg.mk (url_dir_list): Don't hard-code "coreutils". Use $(PACKAGE). 2009-09-30 Jim Meyering post-release administrivia * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update. version 1.3.13 * NEWS: Record release date. build: update gnulib submodule to latest maint: update bootstrap script * bootstrap (with_gettext): Update from coreutils. maint: pull in two release-related modules from gnulib * bootstrap.conf (gnulib_modules): Add announce-gen and gnupload. build: use more gnulib modules for better POSIX compliance * bootstrap.conf (gnulib_modules): Add modules exposed via make CFLAGS=-DGNULIB_POSIXCHECK 2>&1 \ |perl -lne '/.* use gnulib module (\S+).*/ and print $1' \ |sort |uniq -c|sort -nr Add these: calloc close fclose fprintf-posix lstat malloc perror printf-posix realloc 2009-09-30 Karl Berry doc: update to FDL 1.3, minor clean-up * NEWS, README, TODO: Update FDL s/1.2/1.3/. 2009-09-28 Karl Berry doc: update gzip.texi * doc/gzip.texi: FDL 1.3+ Consistently (de)capitalize section names. "User's" is not correct; seems best to simplify the title. Throw in some "GNU"'s. Make direntries be what we actually want. Detabify. 2009-09-26 Jim Meyering maint: temporarily exempt failing syntax-check tests * cfg.mk (local-checks-to-skip): Add the list of currently-failing tests, to exempt them from "make syntax-check". gzip: don't use an uninitialized file descriptor gzip interprets an argument of "-" as indicating stdin, but when "-" is not the first name on the command line, it doesn't work. * gzip.c (treat_stdin): Initialize "ifd". Patch and fine description by Lasse Collin in http://www.mail-archive.com/bug-gzip@gnu.org/msg00213.html * Makefile.am (check-local): Exercise the fix. Based on the above. * NEWS (Bug fixes): Mention this. maint: use a git submodule for gnulib * .gitmodules: New file, to track gnulib. * gnulib: New file, created by running this: git submodule add git://git.sv.gnu.org/gnulib.git gnulib maint: update existing copyright year lists to include 2009 * bootstrap.conf (gnulib_modules): Add update-copyright. maint: include first in many files maint: avoid another "make syntax-check" failure * lib/Makefile.am (match.$(OBJEXT)): Use $(ASCPPPOST), not @ASCPPPOST@. maint: remove RCS $Id$ variables and comments maint: change spelling in comments: s/filesystem/file system/ maint: don't use "the the" * msdos/doturboc.bat: s/the the/the/. maint: remove trailing blanks maint: remove useless if-before-free tests * gzip.c (do_exit): Remove useless if-before-free tests. maint: remove useless casts to avoid "make syntax-check" failures * gzip.c (do_exit): Remove anachronistic cast. * inflate.c (huft_free): Likewise. * util.c (add_envopt): Likewise. * vms/vms.c (vms_expand_args): Likewise. maint: new file: .prev-version * .prev-version: New file, to record previous version number. 2009-09-06 Jim Meyering build: avoid spurious warnings from clang * gzip.h (gzip_error): Declare with ATTRIBUTE_NORETURN. maint: update build-from-scratch infrastructure * bootstrap: Modernize. * bootstrap.conf: Modernize. * cfg.mk: New file. 2009-08-18 Jim Meyering inflate: avoid a leak on a error path * inflate.c (inflate_dynamic): Don't leak maint: ignore a few generated files * lib/.gitignore: ignore more generated files. tests: add a test for just-fixed bug * tests/hufts-segv.gz: New file, from bug report. * Makefile.am (EXTRA_DIST): Add tests/hufts-segv.gz. (check-local): Exercise the bug. tests: don't misinterpret a failing test as successful * Makefile.am (check-local): Exit "1" upon failure, not 0. 2009-08-18 Thiemo Nagel avoid creating an undersized buffer for the hufts table A malformed input file can cause gzip to crash with a segmentation violation or hang in an endless loop. Reported in . * NEWS (Bug fixes): Mention it. 2009-08-18 Jim Meyering avoid silent data loss e.g., on NFS, due to unchecked close of stdout * gzip.c: Include "closein.h". (main): Use atexit (close_stdin); * bootstrap.conf (gnulib_modules): Add closein. Prompted by Mark Kidwell's report and patch in http://bugs.debian.org/538187 * NEWS (Bug fixes): Mention it. * */.gitignore: Update. build: require automake-1.11 and produce xz-compressed tarballs, too * configure.ac: Require automake-1.11. Use the dist-xz option. build: avoid non-srcdir build failure * Makefile.am (gzip.doc.gz): Use $(srcdir)/gzip.doc, not gzip.doc. Don't redirect directly to $@. Use $(AM_V_GEN). (gzip.doc, .in): Don't redirect directly to $@. Use $(AM_V_GEN). * NEWS: Add template header for upcoming release. build: enable git-version-gen, automake silent rules, generate ChangeLog * configure.ac (AC_INIT): Use git-version-gen. Use AM_SILENT_RULES([yes]). (AM_INIT_AUTOMAKE): Drop gnits; conflicts with git-version-gen versions. * bootstrap.conf (gnulib_modules): Use getopt-gnu Ensure ChangeLog exists, for automake. rather than obsolete "getopt" module. Add gitlog-to-changelog. Add git-version-gen. Add gnu-make, gnumakefile and maintainer-makefile. * Makefile.am (dist-hook, gen-ChangeLog): New rules, to generate ChangeLog and insert it into the distribution tarball. (EXTRA_DIST): Add ChangeLog-2007. maint: retire the last VC'd ChangeLog file * ChangeLog-2007: Rename from ChangeLog. From now on, the ChangeLog file will be generated automatically from commit logs. maint: rename .cvsignore files to .gitignore * .gitignore: Renamed from .cvsignore. * doc/.gitignore: Likewise. * lib/.gitignore: Likewise. * m4/.gitignore: Likewise.