automake-patches
[Top][All Lists]
Advanced

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

Re: Automake 1.11.2 released


From: Antonio Diaz Diaz
Subject: Re: Automake 1.11.2 released
Date: Wed, 28 Dec 2011 01:41:51 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.11) Gecko/20050905

Stefano Lattarini wrote:
Ralf probably thought that 1.12 was going to be released much sooner, so his
decision seemed the most sensible one at the time.  The fact that the 1.12
release is really and lamentably late is mostly my fault (due to various
reasons I'm not going to repeat here), so let's not blame Ralf.

I'm not blaming anybody. It is clear for me that Ralf (and I) thought that 1.12 was going to be released much sooner.


Thanks.  I have some nits below; I can address them myself, but I'd really
appreciate if you could take care of them instead.

OK. Lets see what I can do.


Could you please send a patch formatted with "git format-patch", based on the
latest `maint' branch, and containing a proper ChangeLog entry?  Also, it
would be nice if you could update the NEWS file to report the new feature.

I work on a computer not connected to internet. I have never used git. I have no git installed. And in any case I couldn't checkout the git repository. So I can't format the patch as you ask.

I attach the ChangeLog entry (just the same I sent before but with an updated date).

About the NEWS file, what part of:
  - "make dist" can now create lzip-compressed tarballs.
want you for me to write? :-)


I don't like the idea of having the compression rate hard-coded in the rules.
Could you please allow the user to change it at "make dist" time, similarly to
what is done for the other compression formats?

Lzip does not accept environment variables but the compression level can be changed like this: +?LZIP? tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz

In fact I think it could be better to do it as shown above for all the compressors, as it facilitates the use of consistent names like GZIP_OPT, BZIP2_OPT, LZIP_OPT...


Also, are you sure that a default compression rate of `-9' isn't too high, and
is not going to cause problems similar to the ones `xz' and `lzma' had incurred
into, i.e., requiring too much memory usage at archive extraction time?

Some people may find "lzip -9" slow, but I think it will not cause memory problems because lzip never uses a dictionary size (much) larger than the file being compressed (even when compressing from stdin). See this example run on a machine with 512MiB of RAM, and note that lzip would need less than 7MiB to decompress the file produced with option "-9":

$ time lzip -9kv automake-1.11.2.tar
automake-1.11.2.tar: 6.382:1, 1.254 bits/byte, 84.33% saved, 6645760 in, 1041329 out.

real    0m8.434s
user    0m8.420s
sys     0m0.010s

$ lzip -tvv automake-1.11.2.tar.lz
  automake-1.11.2.tar.lz: version 1, dictionary size 6656 KiB.  ok

$ xz -9kv automake-1.11.2.tar
automake-1.11.2.tar (1/1)
xz: automake-1.11.2.tar: Cannot allocate memory


+# Copyright (C) 2010  Free Software Foundation, Inc.

s/2010/2011/

This patch was indeed written in 2010, but I have changed the date anyway.


+# Check support for no-dist-gzip with lzip

Missing trailing full stop.

This would be inconsistent. None of the similar test files has a full stop:

# Check support for no-dist-gzip
# Check support for no-dist-gzip with lzma
# Check support for no-dist-gzip with xz


I attach the ChangeLog entry and a corrected patch. I hope it is all fixed now.


Thanks,
Antonio.
diff -urdN automake-1.11.2/automake.in automake-1.11.2.new/automake.in
--- automake-1.11.2/automake.in 2011-12-21 20:35:28.000000000 +0100
+++ automake-1.11.2.new/automake.in     2011-12-26 21:42:05.000000000 +0100
@@ -3935,7 +3935,7 @@
     {
       my $archive_defined = option 'no-dist-gzip' ? 0 : 1;
       $archive_defined ||=
-       grep { option "dist-$_" } qw(shar zip tarZ bzip2 lzma xz);
+       grep { option "dist-$_" } qw(shar zip tarZ bzip2 lzip lzma xz);
       error (option 'no-dist-gzip',
             "no-dist-gzip specified but no dist-* specified, "
             . "at least one archive format must be enabled")
@@ -7140,6 +7140,7 @@
 
                 'XZ'          => !! option 'dist-xz',
                 'LZMA'        => !! option 'dist-lzma',
+                'LZIP'        => !! option 'dist-lzip',
                 'BZIP2'       => !! option 'dist-bzip2',
                 'COMPRESS'    => !! option 'dist-tarZ',
                 'GZIP'        =>  ! option 'no-dist-gzip',
diff -urdN automake-1.11.2/doc/automake.texi 
automake-1.11.2.new/doc/automake.texi
--- automake-1.11.2/doc/automake.texi   2011-12-21 20:53:41.000000000 +0100
+++ automake-1.11.2.new/doc/automake.texi       2011-12-26 21:42:05.000000000 
+0100
@@ -8687,6 +8687,11 @@
 Generate a gzip tar archive of the distribution.
 @trindex dist-gzip
 
address@hidden @code{dist-lzip}
+Generate a @samp{lzip} tar archive of the distribution.  @command{lzip}
+archives are frequently smaller than @command{bzip2}-compressed archives.
address@hidden dist-lzip
+
 @item @code{dist-lzma}
 Generate an @samp{lzma} tar archive of the distribution.  @command{lzma}
 archives are frequently smaller than @command{bzip2}-compressed archives.
@@ -9299,6 +9304,12 @@
 Hook @code{dist-bzip2} to @code{dist}.
 @trindex dist-bzip2
 
address@hidden @option{dist-lzip}
address@hidden Option, @option{dist-lzip}
address@hidden dist-lzip
+Hook @code{dist-lzip} to @code{dist}.
address@hidden dist-lzip
+
 @item @option{dist-lzma}
 @cindex Option, @option{dist-lzma}
 @opindex dist-lzma
@@ -9499,7 +9510,8 @@
 These three mutually exclusive options select the tar format to use
 when generating tarballs with @samp{make dist}.  (The tar file created
 is then compressed according to the set of @option{no-dist-gzip},
address@hidden, @option{dist-xz} and @option{dist-tarZ} options in use.)
address@hidden, @option{dist-lzip}, @option{dist-xz} and
address@hidden options in use.)
 
 These options must be passed as arguments to @code{AM_INIT_AUTOMAKE}
 (@pxref{Macros}) because they can require additional configure checks.
@@ -13561,4 +13573,4 @@
 @c  LocalWords:  LTALLOCA MALLOC malloc memcmp strdup alloca libcompat xyz DFOO
 @c  LocalWords:  unprefixed buildable preprocessed DBAZ DDATADIR WARNINGCFLAGS
 @c  LocalWords:  LIBFOOCFLAGS LIBFOOLDFLAGS ftable testSubDir obj LIBTOOLFLAGS
address@hidden  LocalWords:  barexec Pinard's automatize initialize lzma xz
address@hidden  LocalWords:  barexec Pinard's automatize initialize lzip lzma xz
diff -urdN automake-1.11.2/lib/Automake/Options.pm 
automake-1.11.2.new/lib/Automake/Options.pm
--- automake-1.11.2/lib/Automake/Options.pm     2011-12-20 21:56:29.000000000 
+0100
+++ automake-1.11.2.new/lib/Automake/Options.pm 2011-12-26 21:42:05.000000000 
+0100
@@ -264,7 +264,7 @@
       elsif ($_ eq 'no-installman' || $_ eq 'no-installinfo'
             || $_ eq 'dist-shar' || $_ eq 'dist-zip'
             || $_ eq 'dist-tarZ' || $_ eq 'dist-bzip2'
-            || $_ eq 'dist-lzma' || $_ eq 'dist-xz'
+            || $_ eq 'dist-lzip' || $_ eq 'dist-lzma' || $_ eq 'dist-xz'
             || $_ eq 'no-dist-gzip' || $_ eq 'no-dist'
             || $_ eq 'dejagnu' || $_ eq 'no-texinfo.tex'
             || $_ eq 'readme-alpha' || $_ eq 'check-news'
diff -urdN automake-1.11.2/lib/am/distdir.am 
automake-1.11.2.new/lib/am/distdir.am
--- automake-1.11.2/lib/am/distdir.am   2011-12-20 21:56:29.000000000 +0100
+++ automake-1.11.2.new/lib/am/distdir.am       2011-12-26 21:52:10.000000000 
+0100
@@ -344,6 +344,12 @@
        tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c 
>$(distdir).tar.bz2
        $(am__remove_distdir)
 
+?LZIP?DIST_ARCHIVES += $(distdir).tar.lz
+.PHONY: dist-lzip
+dist-lzip: distdir
+       tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} 
>$(distdir).tar.lz
+       $(am__remove_distdir)
+
 ?LZMA?DIST_ARCHIVES += $(distdir).tar.lzma
 .PHONY: dist-lzma
 dist-lzma: distdir
@@ -396,6 +402,7 @@
 dist dist-all: distdir
 ?GZIP? tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c 
>$(distdir).tar.gz
 ?BZIP2?        tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c 
>$(distdir).tar.bz2
+?LZIP? tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} 
>$(distdir).tar.lz
 ?LZMA? tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
 ?XZ?   tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c 
>$(distdir).tar.xz
 ?COMPRESS?     tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
@@ -429,6 +436,8 @@
          bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
        *.tar.lzma*) \
          lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+       *.tar.lz*) \
+         lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
        *.tar.xz*) \
          xz -dc $(distdir).tar.xz | $(am__untar) ;;\
        *.tar.Z*) \
diff -urdN automake-1.11.2/tests/Makefile.am 
automake-1.11.2.new/tests/Makefile.am
--- automake-1.11.2/tests/Makefile.am   2011-12-21 20:35:29.000000000 +0100
+++ automake-1.11.2.new/tests/Makefile.am       2011-12-26 21:42:05.000000000 
+0100
@@ -567,6 +567,7 @@
 ltlibobjs.test \
 ltlibsrc.test \
 ltorder.test \
+lzip.test \
 lzma.test \
 m4-inclusion.test \
 maintclean.test \
diff -urdN automake-1.11.2/tests/lzip.test automake-1.11.2.new/tests/lzip.test
--- automake-1.11.2/tests/lzip.test     1970-01-01 01:00:00.000000000 +0100
+++ automake-1.11.2.new/tests/lzip.test 2010-02-15 13:24:12.000000000 +0100
@@ -0,0 +1,41 @@
+#! /bin/sh
+# Copyright (C) 2011  Free Software Foundation, Inc.
+#
+# 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 2, 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/>.
+
+# Check support for no-dist-gzip with lzip
+
+required=lzip
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in << 'END'
+AC_INIT([lzip], [1.0])
+AM_INIT_AUTOMAKE([no-dist-gzip dist-lzip])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+test: distcheck
+       test $(DIST_ARCHIVES) = lzip-1.0.tar.lz
+       test -f $(DIST_ARCHIVES)
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+$MAKE test
2011-12-27  Antonio Diaz Diaz  <address@hidden>

        Add lzip compression support.
        * automake.in (handle_dist): Recognize dist-lzip.
          (make_paragraphs): Map LZIP to dist-lzip.
        * doc/automake.texi (Dist): Add dist-lzip.
          (Options): Likewise.
        * lib/Automake/Options.pm (_process_option_list): Add dist-lzip.
        * lib/am/distdir.am
          (dist dist-all): Add command to create an lzip-compressed tarball.
          (distcheck): Handle lzip-compressed tarballs just like the others.
        * tests/defs.in: Test for lzip, too.
        * tests/lzip.test: New file, based on nogzip.test.
        * tests/Makefile.am (TESTS): Add lzip.test.

reply via email to

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