From unknown Mon Jun 23 23:53:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10448: dist-xz and dist-gzip cannot be combined? Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-automake@gnu.org Resent-Date: Sat, 07 Jan 2012 21:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10448 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: 10448@debbugs.gnu.org X-Debbugs-Original-To: bug-automake@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13259733463360 (code B ref -1); Sat, 07 Jan 2012 21:56:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 Jan 2012 21:55:46 +0000 Received: from localhost ([127.0.0.1]:49248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RjeEr-0000s8-RW for submit@debbugs.gnu.org; Sat, 07 Jan 2012 16:55:46 -0500 Received: from eggs.gnu.org ([140.186.70.92]:57184) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RjeEq-0000rx-6V for submit@debbugs.gnu.org; Sat, 07 Jan 2012 16:55:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RjeEf-0006L0-S4 for submit@debbugs.gnu.org; Sat, 07 Jan 2012 16:55:34 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:37575) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjeEf-0006Kw-Qc for submit@debbugs.gnu.org; Sat, 07 Jan 2012 16:55:33 -0500 Received: from eggs.gnu.org ([140.186.70.92]:51347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjeEe-0008QK-QA for bug-automake@gnu.org; Sat, 07 Jan 2012 16:55:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RjeEd-0006KZ-FV for bug-automake@gnu.org; Sat, 07 Jan 2012 16:55:32 -0500 Received: from mail4-relais-sop.national.inria.fr ([192.134.164.105]:35776) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjeEd-0006KV-7B for bug-automake@gnu.org; Sat, 07 Jan 2012 16:55:31 -0500 X-IronPort-AV: E=Sophos;i="4.71,474,1320620400"; d="scan'208";a="125962786" Received: from reverse-83.fdn.fr (HELO pluto) ([80.67.176.83]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 07 Jan 2012 22:55:29 +0100 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 18 =?UTF-8?Q?Niv=C3=B4se?= an 220 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Date: Sat, 07 Jan 2012 22:55:28 +0100 Message-ID: <874nw72n5b.fsf@gnu.org> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.2 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Hi, The =E2=80=98master=E2=80=99 branch of Automake fails to produce both a tar= .gz and tar.xz tarball. The former is empty, apparently because the source tree gets removed after the tar.xz is created: --8<---------------cut here---------------start------------->8--- tardir=3Dautomake-1.11a && ${TAR-tar} chof - "$tardir" | XZ_OPT=3D${XZ_OPT-= -e} xz -c >automake-1.11a.tar.xz { test ! -d "automake-1.11a" || { find "automake-1.11a" -type d ! -perm -20= 0 -exec chmod u+w {} ';' && rm -fr "automake-1.11a"; }; } atardir=3Dautomake-1.11a && ${TAR-tar} chof - "$tardir" | GZIP=3D--best gzi= p -c >automake-1.11a.tar.gz tar: automake-1.11a: Cannot stat: No such file or directory tar: Exiting with failure status due to previous errors --8<---------------cut here---------------end--------------->8--- (This is from the =E2=80=98tarball=E2=80=99 job at .) Thanks, Ludo=E2=80=99. From unknown Mon Jun 23 23:53:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10448: dist-xz and dist-gzip cannot be combined? Resent-From: Stefano Lattarini Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-automake@gnu.org Resent-Date: Sat, 07 Jan 2012 22:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10448 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 10448@debbugs.gnu.org Received: via spool by 10448-submit@debbugs.gnu.org id=B10448.13259744635049 (code B ref 10448); Sat, 07 Jan 2012 22:15:02 +0000 Received: (at 10448) by debbugs.gnu.org; 7 Jan 2012 22:14:23 +0000 Received: from localhost ([127.0.0.1]:49266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RjeWs-0001JN-VQ for submit@debbugs.gnu.org; Sat, 07 Jan 2012 17:14:23 -0500 Received: from mail-ee0-f44.google.com ([74.125.83.44]:56227) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RjeWm-0001J3-VD; Sat, 07 Jan 2012 17:14:21 -0500 Received: by eekc14 with SMTP id c14so2199460eek.3 for ; Sat, 07 Jan 2012 14:14:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=x9+wOrNQdB0cgZBe335hm/EbZ+Mh/LTB1fCsM+5Ocb0=; b=fGBK/SN6AHxUshKkbMtphXMn5fwn38HPeD+iu+r1GSg1QsrAvFbpHAf3eJgbzCCOuo QEc7AWtk2filXx4RgMIcagRhbvo00iUGpqdhXGM1PAZ1Rxyr6piQveJFgRtdbNzq4T4X wlqcI+9FOGCH+hnYXv6nJy3auDM56aTKEbuCQ= Received: by 10.14.2.79 with SMTP id 55mr1742362eee.20.1325974446419; Sat, 07 Jan 2012 14:14:06 -0800 (PST) Received: from [87.0.103.3] (host3-103-dynamic.0-87-r.retail.telecomitalia.it. [87.0.103.3]) by mx.google.com with ESMTPS id u53sm220025471eeu.6.2012.01.07.14.14.04 (version=SSLv3 cipher=OTHER); Sat, 07 Jan 2012 14:14:05 -0800 (PST) Message-ID: <4F08C3A4.8070305@gmail.com> Date: Sat, 07 Jan 2012 23:13:56 +0100 From: Stefano Lattarini MIME-Version: 1.0 References: <874nw72n5b.fsf@gnu.org> In-Reply-To: <874nw72n5b.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) merge 10448 10444 thanks Hi Ludo, thanks for the report. On 01/07/2012 10:55 PM, Ludovic Courtès wrote: > Hi, > > The ‘master’ branch of Automake fails to produce both a tar.gz and > tar.xz tarball. The former is empty, apparently because the source tree > gets removed after the tar.xz is created: > Yes, I've noticed this too: Patch coming up tomorrow. Thanks, Stefano From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 07 17:22:20 2012 Received: (at control) by debbugs.gnu.org; 7 Jan 2012 22:22:20 +0000 Received: from localhost ([127.0.0.1]:49283 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RjeeZ-0001Vo-R2 for submit@debbugs.gnu.org; Sat, 07 Jan 2012 17:22:20 -0500 Received: from mail-ey0-f172.google.com ([209.85.215.172]:64197) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RjeeY-0001Vc-Eu for control@debbugs.gnu.org; Sat, 07 Jan 2012 17:22:19 -0500 Received: by eaak10 with SMTP id k10so1567837eaa.3 for ; Sat, 07 Jan 2012 14:22:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:mime-version:to:subject:content-type :content-transfer-encoding; bh=C+1yBVqPNmkRaG2U6VqDJwSSq53J8eSyImvPzLRGZ4g=; b=UP+XNlIq3hHvqBYhiaOUi7bIFJATeQZAXuD5r+bHaS4KTs6vBNRSEMQWCH/s33uXfC duzPVK7lch/nI7n461/X+KMxCGaCsqqLwNzWQSDWelve/BphZtCCchs+PWm8WSxkcys5 m1vrLdM8cXMzToNzZ00nKwDzcJ8zoWUcjKUj0= Received: by 10.213.34.210 with SMTP id m18mr2136382ebd.53.1325974928234; Sat, 07 Jan 2012 14:22:08 -0800 (PST) Received: from [87.0.103.3] (host3-103-dynamic.0-87-r.retail.telecomitalia.it. [87.0.103.3]) by mx.google.com with ESMTPS id e12sm117207125eea.5.2012.01.07.14.22.07 (version=SSLv3 cipher=OTHER); Sat, 07 Jan 2012 14:22:07 -0800 (PST) Message-ID: <4F08C58D.6000301@gmail.com> Date: Sat, 07 Jan 2012 23:22:05 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: control@debbugs.gnu.org Subject: x Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) severity 10448 grave merge 10448 10444 thanks From unknown Mon Jun 23 23:53:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10448: [PATCHES] {master} dist: distdir not unconditionally removed anymore for xz and lzip Resent-From: Stefano Lattarini Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-automake@gnu.org Resent-Date: Sun, 08 Jan 2012 09:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10448 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: automake-patches@gnu.org Cc: 10444@debbugs.gnu.org, 10448@debbugs.gnu.org Received: via spool by 10448-submit@debbugs.gnu.org id=B10448.132601437510896 (code B ref 10448); Sun, 08 Jan 2012 09:20:02 +0000 Received: (at 10448) by debbugs.gnu.org; 8 Jan 2012 09:19:35 +0000 Received: from localhost ([127.0.0.1]:49429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rjoub-0002pb-Bo for submit@debbugs.gnu.org; Sun, 08 Jan 2012 04:19:34 -0500 Received: from mail-ey0-f172.google.com ([209.85.215.172]:48048) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RjouS-0002p9-LL; Sun, 08 Jan 2012 04:19:30 -0500 Received: by eaak10 with SMTP id k10so1668566eaa.3 for ; Sun, 08 Jan 2012 01:19:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; bh=fPFhIujG8Q5bQHqiPGj2jaXfP9Wr6HZFaEcDYRk4CQ4=; b=fozYRY7AzE4h0FKEOOyUrl4RN0CjcZeRJeLVY/53oCuuSeYlJb0LHQQy004uyOjLn0 qrzHt2Ie+TwbjKGm3q4/RDB1gruJSAIZ2cZWLjVTCsd2a5sSILsq8lU9Ei3LC8JQ4FgV LV9vXepYmroQhRa2PZnt17AweKLx/WOgwQPq8= Received: by 10.213.13.147 with SMTP id c19mr254705eba.72.1326014351670; Sun, 08 Jan 2012 01:19:11 -0800 (PST) Received: from [82.56.38.65] (host65-38-dynamic.56-82-r.retail.telecomitalia.it. [82.56.38.65]) by mx.google.com with ESMTPS id 15sm23143565eeu.1.2012.01.08.01.19.09 (version=SSLv3 cipher=OTHER); Sun, 08 Jan 2012 01:19:10 -0800 (PST) Message-ID: <4F095F8C.90502@gmail.com> Date: Sun, 08 Jan 2012 10:19:08 +0100 From: Stefano Lattarini MIME-Version: 1.0 References: <4F074912.70609@gmail.com> In-Reply-To: <4F074912.70609@gmail.com> Content-Type: multipart/mixed; boundary="------------090400080908090403040907" X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) This is a multi-part message in MIME format. --------------090400080908090403040907 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit References: And here is a two-patch series fixing the bug. The first patch enhances the testsuite coverage for the various `dist-*' options and formats and for the "make dist" usages (and in doing so exposes the bug), the second patch fixes the problem (which, it turns out, was simply due to missing edits after a merge). Tested on Debian unstable (GNU make 3.81 and 3.80), Solaris 10 (with GNU make 3.82, CCS make and Sun Distributed Make) and NetBSD 5.1 (with system make and GNU make 3.82). I will push the patches to master in a day or two if there is no objection. Regards, Stefano --------------090400080908090403040907 Content-Type: text/x-diff; name="0001-coverage-archive-and-compression-formats-used-by-mak.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-coverage-archive-and-compression-formats-used-by-mak.pa"; filename*1="tch" >From 1d92795ebee0afa97c39a49a7ad6adee638c4846 Mon Sep 17 00:00:00 2001 Message-Id: <1d92795ebee0afa97c39a49a7ad6adee638c4846.1326014330.git.stefano.lattarini@gmail.com> From: Stefano Lattarini Date: Sat, 7 Jan 2012 11:25:12 +0100 Subject: [PATCH 1/2] coverage: archive and compression formats used by "make dist" This change exposes automake bug#10444 a.k.a. bug#10448. * tests/dist-formats.tap: New test. * tests/lzip.test: Remove, it's obsolete now. * tests/nogzip.test: Likewise. * tests/nogzip2.test: Likewise. * tests/xz.test: Likewise. * tests/list-of-tests.mk: Update. --- tests/dist-formats.tap | 430 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/list-of-tests.mk | 5 +- tests/lzip.test | 39 ----- tests/nogzip.test | 39 ----- tests/nogzip2.test | 35 ---- tests/xz.test | 39 ----- 6 files changed, 431 insertions(+), 156 deletions(-) create mode 100755 tests/dist-formats.tap delete mode 100755 tests/lzip.test delete mode 100755 tests/nogzip.test delete mode 100755 tests/nogzip2.test delete mode 100755 tests/xz.test diff --git a/tests/dist-formats.tap b/tests/dist-formats.tap new file mode 100755 index 0000000..34399bc --- /dev/null +++ b/tests/dist-formats.tap @@ -0,0 +1,430 @@ +#! /bin/sh +# Copyright (C) 2012 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 . + +# Check support for different compression formats used by distribution +# archives. + +am_create_testdir=empty +. ./defs || Exit 1 + +plan_ 70 + +# ---------------------------------------------------- # +# Common and/or auxiliary subroutines and variables. # +# ---------------------------------------------------- # + +ocwd=`pwd` || fatal_ "obtaining current working directory" + +TAR='' && unset TAR + +# Create common aclocal.m4 file, for later tests. +mkdir setup \ + && cd setup \ + && echo 'AC_INIT([x], [0]) AM_INIT_AUTOMAKE' > configure.ac \ + && $ACLOCAL \ + && mv aclocal.m4 .. \ + && cd .. \ + && rm -rf setup \ + || fatal_ "creating common aclocal.m4 file" + +# Some make implementations (e.g., HP-UX) don't grok `-j', some require +# no space between `-j' and the number of jobs (e.g., older GNU make +# versions), and some *do* require a space between `-j' and the number +# of jobs (e.g., Solaris dmake). We need a runtime test to see what +# works. +for MAKE_j4 in "$MAKE -j4" "$MAKE -j 4" false; do + echo all: | $MAKE_j4 -f - && break + : For shells with buggy 'set -e'. +done + +# Set variables `$compressor' and `$suffix'. +setup_vars_for_compression_format () +{ + suffix=NONE compressor=NONE + case $1 in + gzip) suffix=tar.gz compressor=gzip ;; + tarZ) suffix=tar.Z compressor=compress ;; + lzip) suffix=tar.lz compressor=lzip ;; + xz) suffix=tar.xz compressor=xz ;; + bzip2) suffix=tar.bz2 compressor=bzip2 ;; + zip) suffix=zip compressor=zip ;; + shar) suffix=shar.gz compressor=shar ;; + *) fatal_ "invalid compression format '$1'";; + esac +} + +all_compression_formats='gzip tarZ lzip xz bzip2 zip shar' + +all_compressors=` + for x in $all_compression_formats; do + setup_vars_for_compression_format $x + echo $compressor + done | tr "$nl" ' '` +echo All compressors: $all_compressors + +# Assume gzip(1) and compress(1) are available on every reasonable +# portability target. +missing_compressors=` + for c in $all_compressors; do + test $c = compress || test $c = gzip || $c --version &2 \ + && continue + echo $c + done | tr "$nl" ' '` +echo Missing compressors: $missing_compressors + +have_compressor () +{ + case " $missing_compressors " in *\ $1\ *) false;; *) : ;; esac +} + +have_all_compressors () +{ + test -z "$missing_compressors" +} + +start_subtest () +{ + name=$1; shift + test -n "$name" || fatal_ "start_subtest: no subtest name given" + if test $# -gt 0; then + eval "$@" || fatal_ "start_subtest: evaluating assignments" + fi + ac_opts=`echo $ac_opts | tr ',' ' '` + am_opts=`echo $am_opts | tr ',' ' '` + mkdir "$name" + cd "$name" + unindent > configure.in < Makefile.am + # It is imperative that aclocal.m4 is copied after configure.in has + # been created, to avoid a spurious trigger of the automatic remake + # rules for configure & co. + cp "$ocwd"/aclocal.m4 \ + "$am_scriptdir"/missing \ + "$am_scriptdir"/install-sh \ + . +} + +end_subtest () +{ + unset name; unset ac_opts; unset am_opts; + cd "$ocwd" || fatal_ "couldn't chdir back to '$ocwd'" +} + +command_ok_if_have_compressor () +{ + if have_compressor "$compressor"; then + command_ok_ "$@" + else + skip_ -r "'$compressor' not available" "$1" + fi +} + +can_compress () +{ + test $# -eq 2 || fatal_ "can_compress: bad number of arguments" + tarname=$1 format=$2 + setup_vars_for_compression_format "$format" + + command_ok_ "'dist-$format' target always created" $MAKE -n dist-$format + + command_ok_if_have_compressor "'make dist-$format' work by default" \ + eval ' + rm -f *$tarname* \ + && make dist-$format \ + && test -f $tarname-1.0.$suffix \ + && ls -l *$tarname* \ + && test "`ls *$tarname*`" = $tarname-1.0.$suffix' + + unset suffix compressor format tarname +} + +# ---------------------------------------- # +# Defaults layout of the dist-* targets. # +# ---------------------------------------- # + +start_subtest defaults + +command_ok_ "default [automake]" $AUTOMAKE +command_ok_ "default [autoconf]" $AUTOCONF +command_ok_ "default [configure]" ./configure +command_ok_ "default [make distcheck]" $MAKE distcheck + +command_ok_ "'make dist' only builds *.tar.gz by default" \ + test "`ls *defaults*`" = defaults-1.0.tar.gz + +rm -f *defaults* + +for fmt in $all_compression_formats; do + can_compress defaults $fmt +done +unset fmt + +end_subtest + +# ----------------------------------------------------------- # +# Check diagnostic for no-dist-gzip without another dist-*. # +# ----------------------------------------------------------- # + +nogzip_stderr () +{ + grep "$1:.*no-dist-gzip" stderr \ + && grep "$1:.* at least one archive format must be enabled" stderr +} + +nogzip_automake_failure () +{ + AUTOMAKE_fails -d "no-dist-gzip ($1) without other formats is an error" + command_ok_ "no-dist-gzip ($1) without other formats gives diagnostic" \ + nogzip_stderr "$2" +} + +start_subtest am-nogz-only am_opts=no-dist-gzip ac_opts= +nogzip_automake_failure 'am' 'Makefile\.am:1' +end_subtest + +start_subtest ac-nogz-only am_opts= ac_opts=no-dist-gzip +nogzip_automake_failure 'ac' 'configure\.in:2' +end_subtest + +# ------------------------------------------------- # +# Check use of no-dist-gzip with a dist-* option. # +# ------------------------------------------------- # + +append_to_opt () +{ + var=$1_opts val=$2 + eval "$var=\${$var:+\"\$$var,\"}\$val" || fatal_ "evaluating \${$var}" + unset var val +} + +nogzip () +{ + test $#,$1,$3,$5 = 6,in,and,in \ + && case $2,$6 in ac,ac|ac,am|am,ac|am,am) :;; *) false;; esac \ + || fatal_ "nogzip: invalid usage" + format=$4 where_dist_nogzip=$2 where_dist_format=$6 + shift 6 + + am_opts= ac_opts= + append_to_opt $where_dist_format dist-$format + append_to_opt $where_dist_nogzip no-dist-gzip + setup_vars_for_compression_format "$format" + # Do these before the am_opts and ac_opts variable can be munged + # by `start_subtest'. + desc= + test -n "$am_opts" && desc=${desc:+"$desc "}"am=$am_opts" + test -n "$ac_opts" && desc=${desc:+"$desc "}"ac=$ac_opts" + + start_subtest nogzip-$format am_opts=$am_opts ac_opts=$ac_opts + + unindent >> Makefile.am < am-init.m4 +echo 'AUTOMAKE_OPTIONS =' > Makefile.am + +# Add half `dist-*' options to AM_INIT_AUTOMAKE, half to AUTOMAKE_OPTIONS. +flip=: +for fmt in $all_compression_formats; do + test $fmt = gzip && continue + if $flip; then + echo " dist-$fmt" >> am-init.m4 + flip=false + else + echo "AUTOMAKE_OPTIONS += dist-$fmt" >> Makefil.am + flip=: + fi +done +unset flip fmt + +echo '])' >> am-init.m4 + +sed 's/AM_INIT_AUTOMAKE.*/m4_include([am-init.m4])/' configure.in > t +mv -f t configure.in + +# For debugging. +cat Makefil.am +cat configure.in +cat am-init.m4 + +command_ok_ "$desc [aclocal]" $ACLOCAL --force +command_ok_ "$desc [automake]" $AUTOMAKE +command_ok_ "$desc [autoconf]" $AUTOCONF +command_ok_ "$desc [configure]" ./configure + +if have_all_compressors; then + command_ok_ "$desc [make distcheck, real]" $MAKE distcheck +else + skip_ -r "not all compressors available" "$desc [make distcheck, real]" +fi + +# We fake existence of all the compressors here, so that we don't have +# to require any of them to run the further tests. This is especially +# important since it's very unlikely that a non-developer has all the +# compression tools installed on his machine at the same time. + +mkdir bin +cd bin +cat > check-distdir <&2 \ + || { echo "== distdir fail =="; exit 1; } +END +cat > grep-distdir-error <<'END' +#!/bin/sh +grep 'distdir fail' && exit 1 +: +END +chmod a+x check-distdir grep-distdir-error +for prog in tar $all_compressors; do + case $prog in + tar|shar|zip) cp check-distdir $prog;; + *) cp grep-distdir-error $prog;; + esac +done +unset prog +ls -l # For debugging. +cd .. + +oPATH=$PATH +PATH=`pwd`/bin$PATH_SEPARATOR$PATH; export PATH + +command_ok_ \ + "$desc ['make dist-all', stubbed]" \ + $MAKE dist-all + +subdesc="$desc ['make dist -j4', stubbed]" +if test "$MAKE_j4" = false; then + skip_ -r "make concurrency unavailable" "$subdesc" +else + command_ok_ "$subdesc" $MAKE_j4 dist +fi +unset subdesc + +PATH=$oPATH; export PATH + +end_subtest + +: diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk index 1aac45e..8355b7f 100644 --- a/tests/list-of-tests.mk +++ b/tests/list-of-tests.mk @@ -328,6 +328,7 @@ dirlist.test \ dirlist2.test \ dirlist-abspath.test \ discover.test \ +dist-formats.tap \ dist-auxdir-many-subdirs.test \ dist-auxfile-2.test \ dist-auxfile.test \ @@ -583,7 +584,6 @@ ltinstloc.test \ ltlibobjs.test \ ltlibsrc.test \ ltorder.test \ -lzip.test \ lzma.test \ m4-inclusion.test \ maintclean.test \ @@ -639,8 +639,6 @@ nodepcomp.test \ nodist.test \ nodist2.test \ nodist3.test \ -nogzip.test \ -nogzip2.test \ noinst.test \ noinstdir.test \ nolink.test \ @@ -1168,7 +1166,6 @@ werror3.test \ werror4.test \ whoami.test \ xsource.test \ -xz.test \ yacc-basic.test \ yacc-d-basic.test \ yacc-clean.test \ diff --git a/tests/lzip.test b/tests/lzip.test deleted file mode 100755 index d413a83..0000000 --- a/tests/lzip.test +++ /dev/null @@ -1,39 +0,0 @@ -#! /bin/sh -# Copyright (C) 2010, 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 . - -# Check support for no-dist-gzip with lzip. - -required=lzip -. ./defs || Exit 1 - -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 diff --git a/tests/nogzip.test b/tests/nogzip.test deleted file mode 100755 index bf49a53..0000000 --- a/tests/nogzip.test +++ /dev/null @@ -1,39 +0,0 @@ -#! /bin/sh -# Copyright (C) 2003, 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 . - -# Check support for no-dist-gzip - -required=bzip2 -. ./defs || Exit 1 - -cat > configure.in << 'END' -AC_INIT([nogzip], [1.0]) -AM_INIT_AUTOMAKE([no-dist-gzip dist-bzip2]) -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT -END - -cat > Makefile.am << 'END' -test: distcheck - test $(DIST_ARCHIVES) = nogzip-1.0.tar.bz2 - test -f $(DIST_ARCHIVES) -END - -$ACLOCAL -$AUTOCONF -$AUTOMAKE -./configure -$MAKE test diff --git a/tests/nogzip2.test b/tests/nogzip2.test deleted file mode 100755 index 1f8ed8f..0000000 --- a/tests/nogzip2.test +++ /dev/null @@ -1,35 +0,0 @@ -#! /bin/sh -# Copyright (C) 2003, 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 . - -# Check diagnostic for no-dist-gzip without dist-*. - -. ./defs || Exit 1 - -cat > configure.in << 'END' -AC_INIT([nogzip], [1.0]) -AM_INIT_AUTOMAKE([no-dist-gzip]) -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT -END - -: > Makefile.am - -$ACLOCAL -AUTOMAKE_fails -grep 'configure.in:2:.*no-dist-gzip' stderr - -echo 'AUTOMAKE_OPTIONS = dist-bzip2' > Makefile.am -$AUTOMAKE diff --git a/tests/xz.test b/tests/xz.test deleted file mode 100755 index 1320ed7..0000000 --- a/tests/xz.test +++ /dev/null @@ -1,39 +0,0 @@ -#! /bin/sh -# Copyright (C) 2008, 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 . - -# Check support for no-dist-gzip with xz. - -required=xz -. ./defs || Exit 1 - -cat > configure.in << 'END' -AC_INIT([xz], [1.0]) -AM_INIT_AUTOMAKE([no-dist-gzip dist-xz]) -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT -END - -cat > Makefile.am << 'END' -test: distcheck - test $(DIST_ARCHIVES) = xz-1.0.tar.xz - test -f $(DIST_ARCHIVES) -END - -$ACLOCAL -$AUTOCONF -$AUTOMAKE -./configure -$MAKE test -- 1.7.7.3 --------------090400080908090403040907 Content-Type: text/x-diff; name="0002-dist-distdir-not-unconditionally-removed-anymore-for.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0002-dist-distdir-not-unconditionally-removed-anymore-for.pa"; filename*1="tch" >From ecce6d4d386c925d5b58487edc2cdf985b20fda9 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: <1d92795ebee0afa97c39a49a7ad6adee638c4846.1326014330.git.stefano.lattarini@gmail.com> References: <1d92795ebee0afa97c39a49a7ad6adee638c4846.1326014330.git.stefano.lattarini@gmail.com> From: Stefano Lattarini Date: Fri, 6 Jan 2012 23:37:09 +0100 Subject: [PATCH 2/2] dist: distdir not unconditionally removed anymore for xz and lzip This change fixes automake bug#10444. The 'dist-xz' and 'dist-lzip' recipes were erroneously using '$(am__remove_distdir)' instead of '$(am__post_remove_distdir)' to cleanup the '$(distdir)'; so a "make dist" issued in a package using (say) gzip and xz compression would have failed to properly created the gzip tarball, since the distdir was unconditionally removed by "make dist-xz" upon its completion, instead of being left populated for the following "make dist-gzip". The problem with 'dist-xz' was introduced in the merge commit `v1.11-1183-g72c8dcb', and the problem with 'dist-lzip' was introduced in the merge commit `xxx' * lib/am/distdir.am (dist-xz): Use '$(am__post_remove_distdir)', not '$(am__remove_distdir)'. (dist-lzip): Likewise. --- lib/am/distdir.am | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/am/distdir.am b/lib/am/distdir.am index d8c1a89..72268cb 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -353,13 +353,13 @@ dist-bzip2: distdir .PHONY: dist-lzip dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz - $(am__remove_distdir) + $(am__post_remove_distdir) ?XZ?DIST_ARCHIVES += $(distdir).tar.xz .PHONY: dist-xz dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz - $(am__remove_distdir) + $(am__post_remove_distdir) ?COMPRESS?DIST_ARCHIVES += $(distdir).tar.Z .PHONY: dist-tarZ -- 1.7.7.3 --------------090400080908090403040907-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 08 04:20:35 2012 Received: (at control) by debbugs.gnu.org; 8 Jan 2012 09:20:35 +0000 Received: from localhost ([127.0.0.1]:49437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rjovb-0002rc-1G for submit@debbugs.gnu.org; Sun, 08 Jan 2012 04:20:35 -0500 Received: from mail-ey0-f172.google.com ([209.85.215.172]:59005) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RjovY-0002rQ-Db for control@debbugs.gnu.org; Sun, 08 Jan 2012 04:20:32 -0500 Received: by eaak10 with SMTP id k10so1668797eaa.3 for ; Sun, 08 Jan 2012 01:20:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:mime-version:to:subject:content-type :content-transfer-encoding; bh=dmLQxZUp/vk+ZQfpLN+g7YyOsAiUZyIQUhqVeQ3GQgk=; b=hgsBu/d9cRq90Dxxr9wcbc5p8QGZFg2MW+kicaK1QZv5YICI+IIETcXFXeieFrFs7i luQVK4OV1osO88H3nyTG6wAAPYbFX7ZWwkBi4Xwo6nhTkxf8TiGH17ChGZxO15vjOcHX HHwLzMF9guNWsv+kqEwHnThhLc2d9jXCgm9ws= Received: by 10.213.110.11 with SMTP id l11mr2409111ebp.72.1326014419651; Sun, 08 Jan 2012 01:20:19 -0800 (PST) Received: from [82.56.38.65] (host65-38-dynamic.56-82-r.retail.telecomitalia.it. [82.56.38.65]) by mx.google.com with ESMTPS id s16sm274059188eef.2.2012.01.08.01.20.18 (version=SSLv3 cipher=OTHER); Sun, 08 Jan 2012 01:20:18 -0800 (PST) Message-ID: <4F095FD1.4000207@gmail.com> Date: Sun, 08 Jan 2012 10:20:17 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: control@debbugs.gnu.org Subject: x Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) tags 10444 patch tags 10448 patch thanks