debian/gzip
13 years agoalgorithm.doc: mention Internet RFC 1952 and modernize a bit
Paul Eggert [Sun, 15 Aug 2010 23:27:06 +0000 (16:27 -0700)]
algorithm.doc: mention Internet RFC 1952 and modernize a bit

* algorithm.doc: Update to mention header-CRC and Internet RFC 1952.
Also, remove the crypto stuff, which never worked.
Inspired by that same suggestion of Greg Roelofs.

13 years agogzip: Use 0x%04x instead of %x when printing 16-bit checksums
Paul Eggert [Sun, 15 Aug 2010 22:50:12 +0000 (15:50 -0700)]
gzip: Use 0x%04x instead of %x when printing 16-bit checksums

* gzip.c (get_method): Use 0x%04x, not %x, to print 16-bit checksums.
Inspired by a suggestion of Greg Roelofs in
http://lists.gnu.org/archive/html/bug-gzip/2010-08/msg00004.html

13 years agomaint: update bootstrap
Paul Eggert [Tue, 3 Aug 2010 21:17:00 +0000 (14:17 -0700)]
maint: update bootstrap

* bootstrap, bootstrap.conf, tests/init.sh: Merge from gnulib.

13 years agogzip: don't assume C99, and don't assume overlapping memcpy should work
Paul R. Eggert [Mon, 19 Jul 2010 17:22:10 +0000 (10:22 -0700)]
gzip: don't assume C99, and don't assume overlapping memcpy should work

* tailor.h (NOMEMCPY): Remove.  memcpy is entitled to not work
on overlapping blocks.
* inflate.c (inflate_codes): Don't put decl after statement.
Omit NOMEMCPY.

13 years ago* gzip.c (get_method): don't assume size_t can be printed with %u
Paul R. Eggert [Mon, 19 Jul 2010 16:42:05 +0000 (09:42 -0700)]
* gzip.c (get_method): don't assume size_t can be printed with %u

13 years agoMention that gzip -d now handles FHCRC.
Paul Eggert [Sat, 3 Jul 2010 03:54:00 +0000 (20:54 -0700)]
Mention that gzip -d now handles FHCRC.

13 years agoDecode FHCRC flag properly, as per Internet RFC 1952.
Paul Eggert [Sat, 3 Jul 2010 03:41:11 +0000 (20:41 -0700)]
Decode FHCRC flag properly, as per Internet RFC 1952.

Problem reported by Greg Roelofs in:
http://lists.gnu.org/archive/html/bug-gzip/2010-06/msg00003.html

* gzip.c (discard_input_bytes): New function.
(get_method): Check header checksum, if given.  We never generate it,
but other programs may.
* gzip.h (HEADER_CRC): Renamed from CONTINUATION.  All uses changed.
* tailor.h [defined __50SERIES]: Remove PRIMOS stuff that was obsolete
anyway and would have made this patch harder to maintain.
(get_char, put_char): Remove.
* zip.c (zip): Use put_byte instead of the now-removed put_char.

13 years agoDon't assume that sizeof (long) == 4 when computing statistics.
Paul Eggert [Thu, 1 Jul 2010 18:46:56 +0000 (11:46 -0700)]
Don't assume that sizeof (long) == 4 when computing statistics.

* gzip.c (get_method): Don't assume sizeof (long) == 4.
* zip.c (zip): Likewise.

13 years agoUpdate Info-ZIP name and coordinates (thanks to Greg Roelofs).
Paul Eggert [Thu, 1 Jul 2010 17:09:47 +0000 (10:09 -0700)]
Update Info-ZIP name and coordinates (thanks to Greg Roelofs).

14 years ago* doc/gzip.texi (Sample): Fix backslash quoting problem.
Paul Eggert [Tue, 11 May 2010 23:36:20 +0000 (16:36 -0700)]
* doc/gzip.texi (Sample): Fix backslash quoting problem.

Problem reported by Ole Tange in
<http://lists.gnu.org/archive/html/bug-gzip/2010-05/msg00000.html>.

14 years agobuild: update gnulib submodule to latest
Jim Meyering [Mon, 26 Apr 2010 16:55:22 +0000 (18:55 +0200)]
build: update gnulib submodule to latest

14 years agomaint: remove primos support
Jim Meyering [Mon, 26 Apr 2010 16:52:15 +0000 (18:52 +0200)]
maint: remove primos support

* Makefile.am (EXTRA_DIST): Remove all primos/ files.
* primos/build.cpl: Remove file.
* primos/ci.opts: Likewise.
* primos/include/errno.h: Likewise.
* primos/include/fcntl.h: Likewise.
* primos/include/stdlib.h: Likewise.
* primos/include/sysStat.h: Likewise.
* primos/include/sysTypes.h: Likewise.
* primos/primos.c: Likewise.
* primos/readme: Likewise.

14 years agobuild: include cfg.mk in the distribution tarball
Jim Meyering [Thu, 8 Apr 2010 08:56:17 +0000 (10:56 +0200)]
build: include cfg.mk in the distribution tarball

* Makefile.am (EXTRA_DIST): Add cfg.mk.

14 years agomaint: ignore more built files
Eric Blake [Wed, 7 Apr 2010 13:36:20 +0000 (07:36 -0600)]
maint: ignore more built files

* .gitignore: Add version files.

14 years agotests: help-version: cross-check PATH in tests
Jim Meyering [Wed, 7 Apr 2010 06:30:51 +0000 (08:30 +0200)]
tests: help-version: cross-check PATH in tests

* tests/help-version: Cross-check $VERSION and --version output.
* tests/Makefile.am (TESTS_ENVIRONMENT): Export VERSION=$(VERSION).

14 years agotests: improve help-version
Jim Meyering [Wed, 7 Apr 2010 06:19:02 +0000 (08:19 +0200)]
tests: improve help-version

* tests/help-version: Use fail_, rather than echo+Exit.

14 years agotests: pull help-version from grep
Jim Meyering [Wed, 7 Apr 2010 06:16:51 +0000 (08:16 +0200)]
tests: pull help-version from grep

14 years agobuild: keep --version strictly up to date
Jim Meyering [Wed, 7 Apr 2010 06:52:09 +0000 (08:52 +0200)]
build: keep --version strictly up to date

Before this change, in development, gzip's --version output could lag
behind reality by a couple deltas or by a "-dirty" suffix.  That would
lead to spurious failure of the new --version-$VERSION PATH cross-check.
* Makefile.am (version.c, version.h): New rules.
(BUILT_SOURCES): Set/append.
(noinst_LIBRARIES, noinst_libver_a_SOURCES): Define.
(gzip_LDADD): Add libver.a.
(DISTCLEANFILES): Define.
* gzip.c (license): Use Version, not VERSION.

14 years agotests: (portability) use st, not "status" as variable name
Jim Meyering [Tue, 6 Apr 2010 16:19:42 +0000 (18:19 +0200)]
tests: (portability) use st, not "status" as variable name

* tests/zgrep-signal: Do not use status as a variable name,
per autoconf's documentation that it is not portable to
some shells.

14 years agotests: s/framework_failure/framework_failure_/
Jim Meyering [Tue, 6 Apr 2010 09:38:29 +0000 (11:38 +0200)]
tests: s/framework_failure/framework_failure_/

14 years agotests: update init.sh from gnulib
Jim Meyering [Tue, 6 Apr 2010 09:36:52 +0000 (11:36 +0200)]
tests: update init.sh from gnulib

* tests/init.sh: Update from gnulib.

14 years agotests: run most tests via tests/Makefile.am
Jim Meyering [Tue, 6 Apr 2010 08:56:16 +0000 (10:56 +0200)]
tests: run most tests via tests/Makefile.am

* Makefile.am (SUBDIRS): List tests after ".".
Move most test-related things from here to ...
* tests/Makefile.am: ... here.
* configure.ac (AC_CONFIG_FILES): Add tests/Makefile.
* tests/helin-segv: Adjust.
* tests/help-version: Likewise.
* tests/hufts: Likewise.
* tests/memcpy-abuse: Likewise.
* tests/mixed: Likewise.
* tests/null-suffix-clobber: Likewise.
* tests/stdin: Likewise.
* tests/trailing-nul: Likewise.
* tests/zdiff: Likewise.
* tests/zgrep-f: Likewise.
* tests/zgrep-signal: Likewise.
* tests/znew-k: Likewise.

14 years agotests: skip tests that use grep's -f and -E options, if they don't work
Jim Meyering [Tue, 6 Apr 2010 07:22:54 +0000 (09:22 +0200)]
tests: skip tests that use grep's -f and -E options, if they don't work

* tests/init.cfg (require_grep_minus_f): New function.
* tests/zgrep-f: Use require_grep_minus_f.  Use path_prepend_.

14 years agotests: arrange for skip and failure notices to go to stderr, not .log
Jim Meyering [Tue, 6 Apr 2010 07:08:03 +0000 (09:08 +0200)]
tests: arrange for skip and failure notices to go to stderr, not .log

* tests/init.cfg: New file.  Make init.sh's stderr_fileno_ match
what the "exec 9>&2" we use in TESTS_ENVIRONMENT.
* Makefile.am (EXTRA_DIST): Add it.

14 years agomaint: ignore generated files
Eric Blake [Tue, 6 Apr 2010 16:13:17 +0000 (10:13 -0600)]
maint: ignore generated files

* .gitignore: Ignore recent gnulib additions.

14 years agomaint: update bootstrap
Eric Blake [Tue, 6 Apr 2010 16:00:01 +0000 (10:00 -0600)]
maint: update bootstrap

* bootstrap: Use latest copy from gnulib/build-aux.

14 years agobuild: use gnulib's lib-ignore module
Jim Meyering [Mon, 5 Apr 2010 19:46:23 +0000 (21:46 +0200)]
build: use gnulib's lib-ignore module

* bootstrap.conf (gnulib_modules): Add lib-ignore, in case it helps.
* Makefile.am (AM_LDFLAGS): Define it.

14 years agomaint: let configure-invoked cpp emit diagnostics to config.log
Jim Meyering [Mon, 5 Apr 2010 19:35:07 +0000 (21:35 +0200)]
maint: let configure-invoked cpp emit diagnostics to config.log

* configure.ac: Do not discard CPP's stderr.

14 years agobuild: update gnulib submodule to latest, and adapt
Jim Meyering [Mon, 5 Apr 2010 18:56:19 +0000 (20:56 +0200)]
build: update gnulib submodule to latest, and adapt

* cfg.mk: Update to use new _sc_search_regexp interface.  Run this:
perl -pi -e 's/\b_prohibit_regexp\b/_sc_search_regexp/;'
-e 's/\bmsg=/halt=/; s/\bre=/prohibit=/;' cfg.mk
and then adjust backslashes so they still line up.
* cfg.mk (local-checks-to-skip): Add new sc_texinfo_acronym, to skip it.
* msdos/tailor.c (fcalloc): Mark a diagnostic for translation, to
placate stricter syntax-check, even though no one uses this file.

14 years agouse assembly code matcher when possible
Jim Meyering [Sat, 20 Mar 2010 12:05:58 +0000 (13:05 +0100)]
use assembly code matcher when possible

* configure.ac (ASCPPPOST): Backslash-escape "#" in AC_SUBST'd
variable, to keep make from seeing it as a comment-introducer.
Based on a patch by Petr Pisar.
* lib/Makefile.am (match.$(OBJEXT)): Use AM_V_GEN and AM_V_at.
* lib/match.c: Don't include <config.h>.
It would impede configure-time assembler test.
* .x-sc_require_config_h: Exempt lib/match.c from syntax-check.
* .x-sc_require_config_h_first: Likewise.

14 years agodo not use stat.st_mtime of a non-regular file
Jim Meyering [Fri, 19 Mar 2010 17:09:20 +0000 (18:09 +0100)]
do not use stat.st_mtime of a non-regular file

* gzip.c: Include "timespec.h".
(treat_stdin): Use st_mtime only from a regular file.
This matters at least on Cygwin 1.7.1-1, for which a stdin-pipe has
the mtime of /dev/null, rather than the gzip-documented-for-pipes
"current time".  Reported by Denis Excoffier.

14 years agotests: exercise the fix for the decompression data-loss bug
Jim Meyering [Fri, 19 Feb 2010 19:50:09 +0000 (20:50 +0100)]
tests: exercise the fix for the decompression data-loss bug

* tests/null-suffix-clobber: New file.
* Makefile.am (TESTS): Add it.

14 years agogzip: fix a data-loss bug when decompressing with --suffix=''
Jim Meyering [Sat, 20 Feb 2010 10:07:55 +0000 (11:07 +0100)]
gzip: fix a data-loss bug when decompressing with --suffix=''

* gzip.c (main): Disallow an empty --suffix=S also with -d.
Otherwise, "gzip -d -S '' F.gz" would ask if it's ok to remove the
existing file, "F.gz";  if you reply "yes", you'd lose all of that data.
Use of an empty suffix was already rejected in compression mode.
* gzip.1 (--suffix (-S)): Do not recommend to use "gunzip -S '' *".
Describe how the suffix is used when decompressing, too.
* NEWS (Bug fixes): mention the fix.
Reported by Ripduman Sohan.

14 years agotests: add ---presume-input-tty option, solely for testing
Jim Meyering [Fri, 19 Feb 2010 19:52:04 +0000 (20:52 +0100)]
tests: add ---presume-input-tty option, solely for testing

* gzip.c: Include <stdbool.h>.
(presume_input_tty): New global.
(main): Set it.
(treat_stdin, check_ofname): Use it.

14 years agodoc: minor adjustment to README-release
Jim Meyering [Sun, 7 Feb 2010 11:24:07 +0000 (12:24 +0100)]
doc: minor adjustment to README-release

* README-release: Tweak description, to sync from coreutils.

14 years agotests: add the help-version sanity tests from coreutils
Jim Meyering [Sun, 7 Feb 2010 11:22:58 +0000 (12:22 +0100)]
tests: add the help-version sanity tests from coreutils

* tests/help-version: New file, from coreutils.
* Makefile.am (TESTS): Add it.

14 years agotests: make distcheck invoke "make syntax-check" and other tests
Jim Meyering [Sun, 7 Feb 2010 11:21:36 +0000 (12:21 +0100)]
tests: make distcheck invoke "make syntax-check" and other tests

* dist-check.mk: New file, from coreutils.
* cfg.mk: Include it.
* Makefile.am (distcheck-hook): New rule, to make us use it.

14 years agozcmp: consistently indicate failure with exit status of 2
Jim Meyering [Sun, 7 Feb 2010 11:04:22 +0000 (12:04 +0100)]
zcmp: consistently indicate failure with exit status of 2

* zcmp.in: Exit with status of 2 (not 1), when writing
--help or --version output fails, to be more like cmp.

14 years agotests: add more tests of gzip -cdf
Jim Meyering [Thu, 4 Feb 2010 07:09:23 +0000 (08:09 +0100)]
tests: add more tests of gzip -cdf

* tests/mixed: Test "gzip -cdf" for a range of small uncompressed files.

14 years agotests: flip and adjust mixed test, now that the bug is fixed
Jim Meyering [Wed, 3 Feb 2010 08:36:00 +0000 (09:36 +0100)]
tests: flip and adjust mixed test, now that the bug is fixed

* NEWS (Bug fixes): Mention the fix.
* Makefile.am (XFAIL_TESTS): Move tests/mixed from here...
(TESTS): ...to here.
* tests/mixed: Comment out the currently (always?) failing part.

14 years agogzip -cdf now handles concatenation of gzip'd and uncompressed data
Mark Adler [Wed, 3 Feb 2010 09:11:33 +0000 (10:11 +0100)]
gzip -cdf now handles concatenation of gzip'd and uncompressed data

* util.c (copy): Change semantics so as to honor a decremented inptr.
* gzip.c (get_method): When needed (-cdf), decrement inptr rather
than clearing it -- and output the first magic byte.

14 years agozgrep: terminate gracefully when a pipeline is interrupted by a signal
Dmitry V. Levin [Sat, 30 Jan 2010 22:36:35 +0000 (22:36 +0000)]
zgrep: terminate gracefully when a pipeline is interrupted by a signal

zgrep is not terminated gracefully when its grep/sed pipeline
is terminated by a signal.  For example, a command like
zgrep -F .TH /usr/share/man/man1/*.gz | head
continues working long after the "head" process completes.
Another example, a command like
zgrep unmatched-pattern /usr/share/man/man1/*.gz
cannot be interrupted by sending a SIGQUIT with Ctrl-\ key, it outputs
zgrep: line 221: test: : integer expression expected
and goes on.
* zgrep.in: Terminate gracefully when the grep/sed pipeline is
terminated by a signal.
* tests/zgrep-signal: New test.
* Makefile.am (TESTS): Add it.

14 years agomaint: teach "make syntax-check" the space-only indentation rule
Jim Meyering [Wed, 3 Feb 2010 08:21:02 +0000 (09:21 +0100)]
maint: teach "make syntax-check" the space-only indentation rule

* cfg.mk (sc_prohibit_tab_based_indentation): New rule, from coreutils.
(sc_prohibit_emacs__indent_tabs_mode__setting): Likewise.
* bootstrap: Remove "indent-tabs-mode: nil" directive.
* .x-sc_prohibit_tab_based_indentation: New file.

14 years agoglobal: convert indentation-TABs to spaces
Jim Meyering [Wed, 3 Feb 2010 07:53:02 +0000 (08:53 +0100)]
global: convert indentation-TABs to spaces

Transformed via this shell code:
t=$'\t'
git ls-files \
  | grep -vE '(^|/)((GNU)?[Mm]akefile|ChangeLog)|\.(am|mk)$' \
  | grep -vE 'tests/pr/|help2man' \
  | xargs grep -lE "^ *$t" \
  | xargs perl -MText::Tabs -ni -le \
    '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'

14 years agowrapper scripts: write diagnostics to stderr, not to stdout
Dmitry V. Levin [Mon, 1 Feb 2010 21:40:41 +0000 (00:40 +0300)]
wrapper scripts: write diagnostics to stderr, not to stdout

* zforce.in: In case of usage error, output short error diagnostics to
stderr instead of printing help text to stdout.
* zmore.in: Likewise.
* znew.in: Likewise.

14 years agogzip -cdf mishandles some concatenated input streams: test it
Jim Meyering [Tue, 2 Feb 2010 07:19:36 +0000 (08:19 +0100)]
gzip -cdf mishandles some concatenated input streams: test it

* tests/mixed: Exercise "gzip -cdf" bug.
* Makefile.am (XFAIL_TESTS): Add it.
Mark Adler reported the bug.

14 years agotests: move the hufts-segv test to its own file
Jim Meyering [Mon, 1 Feb 2010 14:02:34 +0000 (15:02 +0100)]
tests: move the hufts-segv test to its own file

* tests/hufts: New test.
* Makefile.am (TESTS): Add tests/
(check-local): Remove the hufts-segv test from this rule.

14 years agotests: begin moving tests into their own files
Jim Meyering [Mon, 1 Feb 2010 12:49:22 +0000 (13:49 +0100)]
tests: begin moving tests into their own files

* Makefile.am (TESTS): Add tests/stdin.
(check-local): Move the stdin check to its own file:
* tests/stdin: New script.

14 years agotests: remove unnecessary use of "path_prepend_ ."
Jim Meyering [Mon, 1 Feb 2010 12:34:46 +0000 (13:34 +0100)]
tests: remove unnecessary use of "path_prepend_ ."

It is unnecessary, since Makefile.am's TESTS_ENVIRONMENT setting
already adds the top build directory, and besides, is only
marginally useful when running stand-alone, since it presumes
that the script is being run from the top build directory.
* tests/helin-segv: Remove unnecessary use of path_prepend_.
* tests/memcpy-abuse: Likewise.
* tests/trailing-nul: Likewise.
* tests/zdiff: Likewise.
* tests/zgrep-f: Likewise.

14 years agotests: note that znew-k test depends on length of temp file name
Jim Meyering [Mon, 1 Feb 2010 10:09:14 +0000 (11:09 +0100)]
tests: note that znew-k test depends on length of temp file name

* tests/znew-k: Tweak diagnostic, factor and add a surprising comment.

14 years agobuild: update gnulib submodule to latest
Jim Meyering [Mon, 1 Feb 2010 09:47:42 +0000 (10:47 +0100)]
build: update gnulib submodule to latest

14 years agofix "znew -K" to work without use of compress utility
Dmitry V. Levin [Fri, 29 Jan 2010 16:23:40 +0000 (19:23 +0300)]
fix "znew -K" to work without use of compress utility

* znew.in: Change -K option to imply -t, do not use compress(1).
* znew.1: Document it.
* tests/znew-k: New test.
* Makefile.am (TESTS): Add it.

14 years agomaint: update README-release procedure
Jim Meyering [Wed, 20 Jan 2010 18:34:55 +0000 (19:34 +0100)]
maint: update README-release procedure

* README-release: sync from coreutils.

14 years agopost-release administrivia
Jim Meyering [Wed, 20 Jan 2010 16:28:01 +0000 (17:28 +0100)]
post-release administrivia

* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.

14 years agoversion 1.4 v1.4
Jim Meyering [Wed, 20 Jan 2010 16:24:59 +0000 (17:24 +0100)]
version 1.4

* NEWS: Record release date.

14 years agotests: exercise the segfault fix
Jim Meyering [Mon, 11 Jan 2010 07:20:52 +0000 (08:20 +0100)]
tests: exercise the segfault fix

* tests/helin-segv: New test.
* Makefile.am (TESTS): Add it.

14 years agogzip -d: do not clobber stack for valid input on x86_64
Jim Meyering [Sun, 10 Jan 2010 16:13:01 +0000 (17:13 +0100)]
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.

14 years agomaint: avoid a minor "make syntax-check" failure
Jim Meyering [Wed, 20 Jan 2010 13:38:13 +0000 (14:38 +0100)]
maint: avoid a minor "make syntax-check" failure

* .x-sc_file_system: Exempt NEWS, since it includes a literal
from an old diagnostic.

14 years agomaint: remove unused file: README-alpha
Jim Meyering [Wed, 20 Jan 2010 13:32:59 +0000 (14:32 +0100)]
maint: remove unused file: README-alpha

* README-alpha: Remove unused file.

14 years agobuild: update gnulib submodule to latest
Jim Meyering [Wed, 20 Jan 2010 13:19:55 +0000 (14:19 +0100)]
build: update gnulib submodule to latest

14 years agogzip -d: use memcpy more often
Yuxi Zhang [Mon, 11 Jan 2010 17:28:30 +0000 (18:28 +0100)]
gzip -d: use memcpy more often

* inflate.c (inflate_codes): Use memcpy (rather than slower
memcopy-like code) in more cases.

14 years agobuild: do not override gnulib-provided AM_CFLAGS options
Jim Meyering [Mon, 11 Jan 2010 10:51:13 +0000 (11:51 +0100)]
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.

14 years agogzip -d would fail with a CRC error...
Jim Meyering [Sun, 10 Jan 2010 19:53:10 +0000 (20:53 +0100)]
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

14 years agotests: switch to gnulib's init.sh test infrastructure
Jim Meyering [Fri, 8 Jan 2010 18:18:37 +0000 (19:18 +0100)]
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.

14 years agobuild: update gnulib submodule to latest
Jim Meyering [Fri, 8 Jan 2010 10:33:04 +0000 (11:33 +0100)]
build: update gnulib submodule to latest

14 years agomaint: record update-copyright options for this package
Jim Meyering [Sun, 3 Jan 2010 17:25:27 +0000 (18:25 +0100)]
maint: record update-copyright options for this package

* cfg.mk: Next time, just run "make update-copyright".

14 years agomaint: update all FSF copyright year lists to include 2010
Jim Meyering [Fri, 1 Jan 2010 15:16:21 +0000 (16:16 +0100)]
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

14 years agomaint: newer gnulib; don't hard-code my GPG key ID
Jim Meyering [Thu, 31 Dec 2009 15:42:41 +0000 (16:42 +0100)]
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.

14 years agobuild: update gnulib submodule to latest
Jim Meyering [Wed, 30 Dec 2009 16:12:08 +0000 (17:12 +0100)]
build: update gnulib submodule to latest

14 years agomaint: remove lots of obsolete #if...HAVE_* checks
Jim Meyering [Sun, 20 Dec 2009 18:41:39 +0000 (19:41 +0100)]
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.

14 years agobuild: add a syntax-check
Jim Meyering [Sun, 20 Dec 2009 16:41:12 +0000 (17:41 +0100)]
build: add a syntax-check

* cfg.mk (sc_prohibit_obsolete_HAVE_HEADER_H): New rule.

14 years agobuild: with --enable-gcc-warnings, use -Werror
Jim Meyering [Thu, 17 Dec 2009 15:59:59 +0000 (16:59 +0100)]
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).

14 years agobuild: quiet warnings from util.c
Jim Meyering [Sun, 20 Dec 2009 16:40:15 +0000 (17:40 +0100)]
build: quiet warnings from util.c

* configure.ac (warnings): Add -Wno-overflow and -Wno-type-limits.

14 years agobuild: avoid warning about possibly-no-return functions
Jim Meyering [Thu, 17 Dec 2009 15:51:29 +0000 (16:51 +0100)]
build: avoid warning about possibly-no-return functions

* gzip.h (read_error, write_error): Mark these functions as "no-return".

14 years agobuild: avoid warning about ignored chown/fchown return value
Jim Meyering [Thu, 17 Dec 2009 15:48:59 +0000 (16:48 +0100)]
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

14 years agobuild: update gnulib submodule to latest
Jim Meyering [Fri, 11 Dec 2009 20:45:26 +0000 (21:45 +0100)]
build: update gnulib submodule to latest

14 years agobuild: unlzw.c: avoid warnings about unused macros
Jim Meyering [Fri, 20 Nov 2009 18:34:46 +0000 (19:34 +0100)]
build: unlzw.c: avoid warnings about unused macros

* configure.ac: Turn off -Wunused-macros.

14 years agobuild: avoid warnings about unused macros
Jim Meyering [Fri, 20 Nov 2009 18:27:20 +0000 (19:27 +0100)]
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.

14 years agobuild: util.c: avoid warnings about add_envopt
Jim Meyering [Fri, 20 Nov 2009 17:54:38 +0000 (18:54 +0100)]
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.

14 years agobuild: avoid many const-related warnings
Jim Meyering [Fri, 20 Nov 2009 17:32:28 +0000 (18:32 +0100)]
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.

14 years agobuild: avoid warnings from -Wstrict-prototypes
Jim Meyering [Fri, 20 Nov 2009 17:19:18 +0000 (18:19 +0100)]
build: avoid warnings from -Wstrict-prototypes

* gzip.c (main): Declare using a prototype.
(progerror): Likewise.  And make parameter const.

14 years agobuild: use gnulib's fdopendir module
Jim Meyering [Thu, 19 Nov 2009 12:59:11 +0000 (13:59 +0100)]
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.

14 years agobuild: enable many warnings
Jim Meyering [Wed, 18 Nov 2009 13:29:51 +0000 (14:29 +0100)]
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)

14 years agomaint: tweak formatting of bootstrap.conf
Jim Meyering [Wed, 18 Nov 2009 13:15:22 +0000 (14:15 +0100)]
maint: tweak formatting of bootstrap.conf

* bootstrap.conf (gnulib_modules): Unindent list.

14 years agomaint: cfg.mk: remove factored-out ftp host/dir definitions
Jim Meyering [Fri, 20 Nov 2009 16:13:16 +0000 (17:13 +0100)]
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.

14 years agobuild: "make stable" emitted an invalid gnupload command
Jim Meyering [Wed, 18 Nov 2009 20:31:50 +0000 (21:31 +0100)]
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/.

14 years agopost-release administrivia
Jim Meyering [Fri, 30 Oct 2009 18:54:37 +0000 (19:54 +0100)]
post-release administrivia

* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.

14 years agoversion 1.3.14 v1.3.14
Jim Meyering [Fri, 30 Oct 2009 18:52:37 +0000 (19:52 +0100)]
version 1.3.14

* NEWS: Record release date.

14 years agobuild: accommodate new syntax-check test
Jim Meyering [Fri, 30 Oct 2009 18:52:17 +0000 (19:52 +0100)]
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 <stdlib.h>.
(main): Use EXIT_FAILURE and EXIT_SUCCESS, not 1 and 0.
* sample/sub.c (main): Likewise.
* sample/zread.c (main): Likewise.

14 years agobuild: update gnulib submodule to latest
Jim Meyering [Fri, 30 Oct 2009 18:16:47 +0000 (19:16 +0100)]
build: update gnulib submodule to latest

14 years agobuild: link with $(LIB_CLOCK_GETTIME)
Jim Meyering [Fri, 30 Oct 2009 18:38:00 +0000 (19:38 +0100)]
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.

14 years agomsdos: fix syntax in Makefile.djg
Jim Meyering [Wed, 28 Oct 2009 13:17:18 +0000 (14:17 +0100)]
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.

14 years agobuild: do not use AC_PREFIX_PROGRAM
Jim Meyering [Tue, 20 Oct 2009 11:21:21 +0000 (13:21 +0200)]
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

14 years agogzip: add tests for today's bug fix
Jim Meyering [Sat, 10 Oct 2009 09:29:33 +0000 (11:29 +0200)]
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.

14 years agogzip: don't fail when there is exactly one trailing NUL byte
Daniel Barkalow [Sat, 10 Oct 2009 09:35:13 +0000 (11:35 +0200)]
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.

14 years agobuild: enable automake color- and parallel-test options
Jim Meyering [Fri, 9 Oct 2009 18:12:30 +0000 (20:12 +0200)]
build: enable automake color- and parallel-test options

* configure.ac (AM_INIT_AUTOMAKE): Enable color-tests and parallel-tests.

14 years agozgrep: portability improvements; exercise "-f -"
Jim Meyering [Fri, 9 Oct 2009 18:03:09 +0000 (20:03 +0200)]
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.

14 years agozgrep: handle "-f -" the same way that it works with grep
Carl Worth [Fri, 9 Oct 2009 15:32:48 +0000 (17:32 +0200)]
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.

14 years agozdiff would exit 2 (error) rather than 1 for differences
Jim Meyering [Fri, 9 Oct 2009 10:37:05 +0000 (12:37 +0200)]
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).

14 years agozdiff: fix malfunction when operating on two gzip'd inputs
Jim Meyering [Fri, 9 Oct 2009 10:28:56 +0000 (12:28 +0200)]
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
<http://bugs.debian.org/434275>
* NEWS (Bug fixes): Mention it.