bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

maint.mk v. gzip 1.2.4


From: Steven M. Schweda
Subject: maint.mk v. gzip 1.2.4
Date: Fri, 19 Oct 2007 17:21:24 -0500 (CDT)

   Greetings:

   While trying to build a recent edition of wget on a Tru64 system, I
ran into a problem, apparently involving gnulib's maint.mk
("build-aux/maint.mk"?)

   On a system with an old gzip, say version 1.2.4 (which is supplied
with Tru64), the victim gets much spewage from an unhappy gzip test. 
For example:

urtx# gmake
gzip 1.2.4 (18 Aug 93)
usage: gzip [-cdfhlLnNrtvV19] [-S suffix] [file ...]
 -c --stdout      write on standard output, keep original files unchanged
 -d --decompress  decompress
 -f --force       force overwrite of output file and compress links
 -h --help        give this help
 -l --list        list compressed file contents
 -L --license     display software license
 -n --no-name     do not save or restore the original name and time stamp
 -N --name        save or restore the original name and time stamp
 -q --quiet       suppress all warnings
 -r --recursive   operate recursively on directories
 -S .suf  --suffix .suf     use suffix .suf on compressed files
 -t --test        test compressed file integrity
 -v --verbose     verbose mode
 -V --version     display version number
 -1 --fast        compress faster
 -9 --best        compress better
 file...          files to (de)compress. If none given, use standard input.
Making all in lib
[...]

   The cause of this clutter appears to be this part of maint.mk:

      # Do not save the original name or timestamp in the .tar.gz file.
      # Use --rsyncable if available.
      gzip_rsyncable := \
        $(shell gzip --help|grep rsyncable >/dev/null && echo --rsyncable)
      GZIP_ENV = '--no-name --best $(gzip_rsyncable)'

Sadly, old versions of gzip send the help/usage report to stderr, not
stdout, so ">/dev/null" alone does not discard it.  (And grep wouldn't
see an "rsyncable", even if it were there.)  Folding stderr into stdout
looks harmless to me (not quite a proof of correctness, I realize), and
seems to solve the spewage problem:

      gzip_rsyncable := \
        $(shell gzip --help 2>&1 |grep rsyncable >/dev/null && echo --rsyncable)


   For the record, that's on Tru64 V5.1B-4 (Patch Kit 6), but I'd expect
that anyone with a sufficiently obsolete gzip would see it, too.

------------------------------------------------------------------------

   Steven M. Schweda               address@hidden
   382 South Warwick Street        (+1) 651-699-9818
   Saint Paul  MN  55105-2547




reply via email to

[Prev in Thread] Current Thread [Next in Thread]