automake-patches
[Top][All Lists]
Advanced

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

[PATCH] {maint} dist: obsolote support for lzma (superseded by xz)


From: Stefano Lattarini
Subject: [PATCH] {maint} dist: obsolote support for lzma (superseded by xz)
Date: Fri, 30 Dec 2011 17:54:18 +0100

I will push this in a couple of days or so, barring any objection.

Regards,
  Stefano

-*-*-

The lzma utilities are today superseded by the xz utilities; in
fact, the official site at <http://tukaani.org/lzma/> reads:

  ``LZMA Utils are legacy data compression software with high
    compression ratio.  LZMA Utils are no longer developed, ...
    Users of LZMA Utils should move to XZ Utils.''

and the existing automake manual (as of 1.11.2) already says:

  ``dist-xz
    Generate an 'xz' tar archive of the distribution. xz archives
    are frequently smaller than bzip2-compressed archives. The 'xz'
    format will soon (early 2009) displace the 'lzma' format''

Also, the `dist-lzma' target still suffers of never-solved bugs,
due to the too-high compression ratio its uses by default, which
might cause an unacceptable memory consumptions when one tries to
compress or, worse, decompress the created tarballs; see also:

  <http://lists.gnu.org/archive/html/automake/2011-12/msg00025.html>
  <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9658>

* NEWS: Update.
* doc/automake.texi (Dist, Options): State that `dist-lzma' will
go away in the next major automake version.
* lib/Automake/Options.pm (_process_option_list): Deprecate
`dist-lzma'.
* tests/lzma.test: Update.
---
 NEWS                    |    4 ++++
 doc/automake.texi       |    6 +++---
 lib/Automake/Options.pm |    9 ++++++++-
 tests/lzma.test         |   21 +++++++++++++++++----
 4 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/NEWS b/NEWS
index 0c0a2dc..14660b6 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,10 @@ New in 1.11.0a:
 
 * WARNING: Future backward-incompatibilities!
 
+  - The `lzma' compression format for distribution archives has been
+    deprecated in favor of `xz', and will be removed the next major
+    Automake release (1.12).
+
   - The Automake support for automatic de-ANSI-fication will be removed in
     the next major Automake release (1.12).
 
diff --git a/doc/automake.texi b/doc/automake.texi
index e155fd1..976c2f8 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -8667,10 +8667,10 @@ Generate a gzip tar archive of the distribution.
 @trindex dist-gzip
 
 @item @code{dist-lzma}
-Generate an @samp{lzma} tar archive of the distribution.  @command{lzma}
-archives are frequently smaller than @command{bzip2}-compressed archives.
+Generate an @samp{lzma} tar archive of the distribution.
 The @samp{lzma} format is obsolete, you should use the @samp{xz} format
-instead.
+instead. @emph{Support for @samp{lzma}-compressed archives will be
+removed in the next major Automake release.}
 @trindex dist-lzma
 
 @item @code{dist-shar}
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index b7ff3d1..4d9e53f 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -261,10 +261,17 @@ sub _process_option_list (\%$@)
          # directory.  We save the actual option for later.
          $options->{'ansi2knr'} = [$_, $where];
        }
+      elsif ($_ eq 'dist-lzma')
+        {
+          # Creation of distribution tarball compressed with lzma is
+          # deprecated, will be removed in the next major release.
+          msg 'obsolete', $where,
+              "lzma compression is deprecated; use `dist-xz' instead\n";
+        }
       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-xz'
             || $_ eq 'no-dist-gzip' || $_ eq 'no-dist'
             || $_ eq 'dejagnu' || $_ eq 'no-texinfo.tex'
             || $_ eq 'readme-alpha' || $_ eq 'check-news'
diff --git a/tests/lzma.test b/tests/lzma.test
index 11bb93d..b2fa693 100755
--- a/tests/lzma.test
+++ b/tests/lzma.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2007, 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
@@ -16,11 +16,16 @@
 
 # Check support for no-dist-gzip with lzma
 
-required=lzma
 . ./defs || Exit 1
 
 set -e
 
+$ACLOCAL
+
+echo AUTOMAKE_OPTIONS = dist-lzma > Makefile.am
+AUTOMAKE_fails -Wnone -Wobsolete
+grep '^Makefile\.am:1:.*lzma.*deprecated.*dist-xz.*instead' stderr
+
 cat > configure.in << 'END'
 AC_INIT([lzma], [1.0])
 AM_INIT_AUTOMAKE([no-dist-gzip dist-lzma])
@@ -34,8 +39,16 @@ test: distcheck
        test -f $(DIST_ARCHIVES)
 END
 
-$ACLOCAL
+AUTOMAKE_fails
+grep '^configure\.in:2:.*lzma.*deprecated.*dist-xz.*instead' stderr
+
+$ACLOCAL --force
+$AUTOMAKE -Wno-obsolete
+
+lzma --version || skip_ "lzma compressor required for the rest of the test"
+
 $AUTOCONF
-$AUTOMAKE
 ./configure
 $MAKE test
+
+:
-- 
1.7.7.3




reply via email to

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