From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 17 20:30:43 2014 Received: (at submit) by debbugs.gnu.org; 18 Aug 2014 00:30:43 +0000 Received: from localhost ([127.0.0.1]:45727 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XJAqP-0002yi-OD for submit@debbugs.gnu.org; Sun, 17 Aug 2014 20:30:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46196) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XJAqM-0002yQ-Od for submit@debbugs.gnu.org; Sun, 17 Aug 2014 20:30:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XJAqC-0004P4-HO for submit@debbugs.gnu.org; Sun, 17 Aug 2014 20:30:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:50924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJAqC-0004P0-DR for submit@debbugs.gnu.org; Sun, 17 Aug 2014 20:30:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJAq7-0008Dg-7J for bug-automake@gnu.org; Sun, 17 Aug 2014 20:30:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XJAq2-0004OZ-7h for bug-automake@gnu.org; Sun, 17 Aug 2014 20:30:23 -0400 Received: from mail-pa0-x22e.google.com ([2607:f8b0:400e:c03::22e]:48446) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJAq1-0004OT-Vr for bug-automake@gnu.org; Sun, 17 Aug 2014 20:30:18 -0400 Received: by mail-pa0-f46.google.com with SMTP id lj1so6621155pab.33 for ; Sun, 17 Aug 2014 17:30:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=3fdf0JMAMn5bR2P3YJ2ZgBTkfuNLc2bcZnaZv1+NSvk=; b=V336Vh25JFEFmFBkuF+ju/IMJvCnxu3G3sRSmoX5ydqlHPNhsp8VXwAzuXBfUqDx3A O3uY1izojkhdA/rgMmVjWGsYPQI2GHmnNkaT5fWAXkxnTHFfF/z4ePr7LxK6Z8M/pJHl keQiGygFLfHqhzxUE2CYAiLDqhvOcZCmR2JSrgzvVnyvjEI84opb5T2TeJyajyBRDtqd 6e2ZezYZwQl3dRVyscgaykbwibBtc7clQBi9wcI0V5YXQmE/Yrk2qFGaSpAUH3DnRoMf t1dSpgEAuuNtc1tAupfTnR2q8397ZHioeJmI4nImRAxK3EGtP6s20oS5O0lYbyXbxM16 84hQ== X-Received: by 10.68.182.33 with SMTP id eb1mr24868899pbc.80.1408321816205; Sun, 17 Aug 2014 17:30:16 -0700 (PDT) Received: from [10.3.81.47] (gateway.qimr.edu.au. [152.98.8.1]) by mx.google.com with ESMTPSA id w7sm22181971pdo.90.2014.08.17.17.30.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 17 Aug 2014 17:30:15 -0700 (PDT) Message-ID: <53F14913.2020906@gmail.com> Date: Mon, 18 Aug 2014 10:30:11 +1000 From: Peter Johansson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: bug-automake@gnu.org Subject: distcheck fails to detect missing files Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Hi, I have this snippet in my 'Makefile.am' include am/test_data.am $(srcdir)/am/test_data.am: $(srcdir)/test/data.txt $(srcdir)/am/test_data.am.in cd $(srcdir) && $(SHELL) bootstrap am/test_data.am It first includes (at Automake time) a snippet, which is generated while bootstrapping. Now I forgot to include $(srcdir)/test/data.txt $(srcdir)/am/test_data.am.in in the distball, which caused the embarrassing make: *** No rule to make target `am/test_data.am.in', needed by `am/test_data.am'. Stop. The surprising thing is that distcheck does not detect this problem, but 'make distcheck' passes through without problem. The reason for this is probably because while $(srcdir)/test/data.txt does not exist, make also looks in $(srcdir)/$(srcdir)/test/data.txt and that file exists as it is part of my development directory. If I change my Makefile.am to $(srcdir)/am/test_data.am: test/data.txt am/test_data.am.in cd $(srcdir) && $(SHELL) bootstrap am/test_data.am 'make distcheck' will detect the problem, but I have this habit of type $(srcdir) for things that are supposed to be in $(srcdir). Is that a bad habit? A fix could be to let distcheck not work in $(distdir) but instead create 'tmp_/$(distdir)', builddir 'tmp_/$(distdir)/$(builddir)', and installdir 'tmp_/$(distdir)/inst_' which would hide the development files from the distcheck. What do you think? Thanks, Peter -- Peter Johansson From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 22 14:30:59 2014 Received: (at 18286) by debbugs.gnu.org; 22 Dec 2014 19:30:59 +0000 Received: from localhost ([127.0.0.1]:55164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y38h0-0003Ca-Sc for submit@debbugs.gnu.org; Mon, 22 Dec 2014 14:30:59 -0500 Received: from mail-wg0-f54.google.com ([74.125.82.54]:52473) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y38gp-0003CD-KN for 18286@debbugs.gnu.org; Mon, 22 Dec 2014 14:30:58 -0500 Received: by mail-wg0-f54.google.com with SMTP id l2so7471274wgh.41 for <18286@debbugs.gnu.org>; Mon, 22 Dec 2014 11:30:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=u/cAo3guSFWA2xYO+q5ATnMXzTzqGFjuBkQhwkivSO4=; b=TuPUpDZU6+n8WVfFNMFSwtg9AaTPBEom1UsB9zhqFIEmkK916gAFaecuN5Oit4UOrT EMNrXmV9VuOoU/w0WEa68wjo8oy9JVMKmPeOZP+D8zZ9yCMOSVkuQgVDB1RUZf3gEpx1 RAXWQqaNxHI8WcKKpzSY8i/mnylmCTm3OeulhDPkpg5/Nu96I74OO/rDwLzteJ7f+VtC 57Dn5n71Rb5CY5olMNUnJpgTKGqaGVZJkkZ/rJrfTNHtrRb7KWV80pV/gw2oefv2/VTN DQAonNcp1MguwnOuGGufuOwtIQTBI6oZiBd8ZdXfCvlcpUZDnjNf0rroSCO/zul7IaIW qd0w== X-Received: by 10.194.62.76 with SMTP id w12mr45000690wjr.5.1419276646980; Mon, 22 Dec 2014 11:30:46 -0800 (PST) Received: from [192.168.0.101] (host159-94-dynamic.7-79-r.retail.telecomitalia.it. [79.7.94.159]) by mx.google.com with ESMTPSA id kn5sm24824124wjb.48.2014.12.22.11.30.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Dec 2014 11:30:46 -0800 (PST) Message-ID: <54987159.9030000@gmail.com> Date: Mon, 22 Dec 2014 20:30:33 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: Peter Johansson , 18286@debbugs.gnu.org Subject: Re: bug#18286: distcheck fails to detect missing files References: <53F14913.2020906@gmail.com> In-Reply-To: <53F14913.2020906@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18286 Cc: Nicola Fontana , "automake-patches@gnu.org" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Reference: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18286 On 08/18/2014 02:30 AM, Peter Johansson wrote: > Hi, > > I have this snippet in my 'Makefile.am' > > > include am/test_data.am > > $(srcdir)/am/test_data.am: $(srcdir)/test/data.txt $(srcdir)/am/test_data.am.in > cd $(srcdir) && $(SHELL) bootstrap am/test_data.am > > > It first includes (at Automake time) a snippet, which is generated while bootstrapping. Now I forgot to include $(srcdir)/test/data.txt $(srcdir)/am/test_data.am.in in the distball, which caused the embarrassing > > make: *** No rule to make target `am/test_data.am.in', needed by `am/test_data.am'. Stop. > > The surprising thing is that distcheck does not detect this problem, > but 'make distcheck' passes through without problem. > This issue has been reported already in the past: http://lists.gnu.org/archive/html/automake/2006-09/msg00008.html http://lists.gnu.org/archive/html/automake/2013-01/msg00049.html (BTW, sorry Nicola for missing your report and your fix for so long!) > The reason for > this is probably because while $(srcdir)/test/data.txt does not exist, > make also looks in $(srcdir)/$(srcdir)/test/data.txt and that file exists > as it is part of my development directory. If I change my Makefile.am to > > $(srcdir)/am/test_data.am: test/data.txt am/test_data.am.in > cd $(srcdir) && $(SHELL) bootstrap am/test_data.am > > 'make distcheck' will detect the problem, but I have this habit of type > $(srcdir) for things that are supposed to be in $(srcdir). Is that a bad > habit? > It can sometimes lead to strange interactions, if not used consistently; see http://lists.gnu.org/archive/html/automake/2006-09/msg00008.html and follow-up messages. But the issue you are experiencing is not due to that, but rather to a bug/limitation of the current 'distcheck' implementation. > A fix could be to let distcheck not work in $(distdir) but instead create > 'tmp_/$(distdir)', builddir 'tmp_/$(distdir)/build_', and installdir > 'tmp_/$(distdir)/inst_' which would hide the development files from the > distcheck. > > What do you think? > Seems like a viable plan. In such a setup, relatively to $(builddir), $(srcdir) will be '..', while the "developement" copy of the source tree will be in '../..'; so the incomplete tarball should be diagnosed. Definitely a nice fix to have for Automake 1.15... Let's see if I can make it happen. From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 23 14:24:32 2014 Received: (at 18286) by debbugs.gnu.org; 23 Dec 2014 19:24:32 +0000 Received: from localhost ([127.0.0.1]:56007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3V4I-0000el-M1 for submit@debbugs.gnu.org; Tue, 23 Dec 2014 14:24:31 -0500 Received: from mail-wi0-f170.google.com ([209.85.212.170]:61226) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3V4F-0000eY-48 for 18286@debbugs.gnu.org; Tue, 23 Dec 2014 14:24:29 -0500 Received: by mail-wi0-f170.google.com with SMTP id bs8so14020822wib.5 for <18286@debbugs.gnu.org>; Tue, 23 Dec 2014 11:24:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=3pzrVCtws9dgIHv1iE7hCYYTBhgLn4IQS8LRQqGHyUk=; b=AnUSerKAW1gfhwRe/4ehEUKpOWEmmDE9v7n2y/b1Jr0NSqR787C9Nq8Y6g4aS1vl4K NpjbQozXwJkdnAIAFRH/tu65Jy1zBpOAl/UVzyOL09fJeARj0euJGa8rykP4tRckkGEI 3QHr8sYq4Sc4Gfjm6Ymg61WiWbqstXfQD/B3nAtJ41sLd2BigQeKPGpqswgFTfCHYxTV 7VVpGqpky3t2G5WuehLDv/Jfze8HSad8/GrZGSLcwqhw8te4LeV66q1wrAoPS7lSKabl VsrB6ltogIfAMBNjO8JEUxeWHNdbiMKjBZFsrBm+UNr+YOgowUm9X6E57CTNYTPJ4R5q c2dA== X-Received: by 10.180.210.228 with SMTP id mx4mr44894569wic.57.1419362666551; Tue, 23 Dec 2014 11:24:26 -0800 (PST) Received: from localhost.localdomain (host159-94-dynamic.7-79-r.retail.telecomitalia.it. [79.7.94.159]) by mx.google.com with ESMTPSA id ud4sm18430427wib.0.2014.12.23.11.24.21 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Dec 2014 11:24:26 -0800 (PST) From: Stefano Lattarini To: automake-patches@gnu.org Subject: [PATCH 2/2] dist: fix bug#18286 "distcheck fails to detect missing files" Date: Tue, 23 Dec 2014 20:23:58 +0100 Message-Id: <01a7a4a7bea81b4e2d03d08b45d605b98501e024.1419362614.git.stefano.lattarini@gmail.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: <2629aa9e713c584c799677987ffb03156b8aae8e.1419362614.git.stefano.lattarini@gmail.com> References: <2629aa9e713c584c799677987ffb03156b8aae8e.1419362614.git.stefano.lattarini@gmail.com> In-Reply-To: <2629aa9e713c584c799677987ffb03156b8aae8e.1419362614.git.stefano.lattarini@gmail.com> References: <2629aa9e713c584c799677987ffb03156b8aae8e.1419362614.git.stefano.lattarini@gmail.com> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18286 Cc: Nicola Fontana , 18286@debbugs.gnu.org, Peter Johansson X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) BTW, this issue had been already reported in the past: http://lists.gnu.org/archive/html/automake/2006-09/msg00008.html http://lists.gnu.org/archive/html/automake/2013-01/msg00049.html "make distcheck" could sometimes fail to detect missing files in the distribution tarball, especially in those cases where both the generated files and their dependencies are explicitly in $(srcdir). An important example of this are *generated* makefile fragments included at Automake time in Makefile.am. A basic example: # -*- Makefile.am -*- $(srcdir)/fragment.am: $(srcdir)/data.txt $(srcdir)/preproc.sh cd $(srcdir) && $(SHELL) preproc.sh fragment.am include $(srcdir)/fragment.am ... If the use forgot to add data.txt and/or preproc.sh in the distribution tarball, "make distcheck" would have erroneously succeeded! The reason is that, while $(srcdir)/data.txt does not exist, make also looks in $(srcdir)/$(srcdir)/data.txt, and in the distcheck-issued VPATH build where $(srcdir) is '..', that file exists, as it is part of the original development directory. * t/distdir.am (distcheck): Adjust to have the build directory be '$(distdir)/_build/sub' rather than just '$(distdir)/_build'. Thanks Nicola Fontana for the suggestion. * t/distcheck-pr18286.sh: Enhance and tighten a little. * t/list-of-tests.mk (XFAIL_TESTS): Remove 't/distcheck-pr18286.sh', as it's now passing. * t/subdir-am-cond.sh: Adjust to avoid a fully spurious failure due to the new distcheck semantics. * t/subdir-ac-subst.sh: Likewise. * t/dejagnu-relative-srcdir.sh: Likewise. * t/txinfo-builddir.sh: Likewise. * NEWS: Update. Helped-by: Nicola Fontana Helped-by: Peter Johansson Signed-off-by: Stefano Lattarini --- NEWS | 16 ++++++++++++++++ THANKS | 1 + lib/am/distdir.am | 14 +++++++++----- t/dejagnu-relative-srcdir.sh | 8 ++++---- t/distcheck-pr18286.sh | 8 ++++++++ t/list-of-tests.mk | 1 - t/subdir-ac-subst.sh | 16 +++++++++------- t/subdir-am-cond.sh | 16 +++++++++------- t/txinfo-builddir.sh | 4 ++-- 9 files changed, 58 insertions(+), 26 deletions(-) diff --git a/NEWS b/NEWS index 1fae7ad..8f2d2a7 100644 --- a/NEWS +++ b/NEWS @@ -115,6 +115,22 @@ New in 1.14.2: something like "... overrides Automake target '$(srcdir)/foo.am". This bug is now fixed. + - Automake bug#18286: "make distcheck" could sometimes fail to detect + missing files in the distribution tarball, especially in those cases + where both the generated files and their dependencies are explicitly + in $(srcdir). An important example of this are *generated* makefile + fragments included at Automake time in Makefile.am; e.g.: + + ... + $(srcdir)/fragment.am: $(srcdir)/data.txt $(srcdir)/preproc.sh + cd $(srcdir) && $(SHELL) preproc.sh fragment.am + include $(srcdir)/fragment.am + ... + + If the use forgot to add data.txt and/or preproc.sh in the distribution + tarball, "make distcheck" would have erroneously succeeded! This issue + is now fixed. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ New in 1.14.1: diff --git a/THANKS b/THANKS index 6be803e..62f22f8 100644 --- a/THANKS +++ b/THANKS @@ -281,6 +281,7 @@ Nathanael Nerode neroden@twcny.rr.com Nelson H. F. Beebe beebe@math.utah.edu Nicholas Wourms nwourms@netscape.net Nick Bowler nbowler@elliptictech.com +Nicola Fontana ntd@entidi.it Nicolas Joly njoly@pasteur.fr Nicolas Thiery nthiery@Icare.mines.edu NightStrike nightstrike@gmail.com diff --git a/lib/am/distdir.am b/lib/am/distdir.am index a8ad63c..6d9d42f 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright (C) 2001-2013 Free Software Foundation, Inc. +## Copyright (C) 2001-2014 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 @@ -430,7 +430,7 @@ distcheck: dist ## can make our new subdirs. chmod -R a-w $(distdir) chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_inst + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst ## Undo the write access. chmod a-w $(distdir) ## With GNU make, the following command will be executed even with "make -n", @@ -451,8 +451,12 @@ distcheck: dist ## Parallel BSD make may not start a new shell for each command in a recipe, ## so be sure to 'cd' back to the original directory after this. && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure \ +## If we merely used '$(distdir)/_build' here, "make distcheck" could +## sometimes fail to detect missing files in the distribution tarball, +## especially in those cases where both the generated files and their +## dependencies are explicitly in $(srcdir). See automake bug#18286. + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ ?GETTEXT? --with-included-gettext \ ## Additional flags for configure. $(AM_DISTCHECK_CONFIGURE_FLAGS) \ @@ -461,7 +465,7 @@ distcheck: dist ## and --prefix values, so don't allow them to be overridden by the user or ## the developer. That used to be allowed, and caused issues in practice ## (in corner-case usages); see automake bug#14991. - --srcdir=.. --prefix="$$dc_install_base" \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ diff --git a/t/dejagnu-relative-srcdir.sh b/t/dejagnu-relative-srcdir.sh index 6168421..34e6710 100644 --- a/t/dejagnu-relative-srcdir.sh +++ b/t/dejagnu-relative-srcdir.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# Copyright (C) 2011-2014 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 @@ -43,7 +43,7 @@ END cat > env.test/env.exp << 'END' set env_srcdir $env(srcdir) send_user "env_srcdir: $env_srcdir\n" -if { [ regexp "^\.\.?$" $env_srcdir ] } { +if { [ regexp "^\.(\./\.\.)?$" $env_srcdir ] } { pass "test_env_src" } else { fail "test_env_src" @@ -52,13 +52,13 @@ END cat > tcl.test/tcl.exp << 'END' send_user "tcl_srcdir: $srcdir\n" -if { [ regexp "^\.\.?$" $srcdir ] } { +if { [ regexp "^\.(\./\.\.)?$" $srcdir ] } { pass "test_tcl_src" } else { fail "test_tcl_src" } send_user "tcl_orig_srcdir: $orig_srcdir\n" -if { [ regexp "^\.\.?$" $orig_srcdir ] } { +if { [ regexp "^\.(\./\.\.)?$" $orig_srcdir ] } { pass "test_tcl_orig_src" } else { fail "test_tcl_orig_src" diff --git a/t/distcheck-pr18286.sh b/t/distcheck-pr18286.sh index b107735..fe89612 100644 --- a/t/distcheck-pr18286.sh +++ b/t/distcheck-pr18286.sh @@ -57,6 +57,14 @@ $AUTOMAKE -a $MAKE check +# Oops, we failed to distribute some required files! run_make -e FAIL -M distcheck +$FGREP '../../test_data.txt' output + +# But if we distribute them, everything will be OK. +echo 'EXTRA_DIST = test_data.txt gen-testdata.sh' >> Makefile.am + +using_gmake || $MAKE Makefile +$MAKE distcheck : diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index ad96326..f97f2f6 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -31,7 +31,6 @@ t/pm/Version3.pl XFAIL_TESTS = \ t/all.sh \ t/cond17.sh \ -t/distcheck-pr18286.sh \ t/gcj6.sh \ t/override-conditional-2.sh \ t/override-conditional-pr13940.sh \ diff --git a/t/subdir-ac-subst.sh b/t/subdir-ac-subst.sh index d3f50bc..b3ede8c 100644 --- a/t/subdir-ac-subst.sh +++ b/t/subdir-ac-subst.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2014 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 @@ -20,7 +20,7 @@ . test-init.sh -cat >>configure.ac <<'END' +cat >> configure.ac <<'END' if test "$want_opt" = yes; then MAYBE_OPT=opt else @@ -31,7 +31,7 @@ AC_CONFIG_FILES([src/Makefile opt/Makefile]) AC_OUTPUT END -cat >Makefile.am << 'END' +cat > Makefile.am <<'END' SUBDIRS = src $(MAYBE_OPT) DIST_SUBDIRS = src opt @@ -45,14 +45,16 @@ DIST_SUBDIRS = src opt # We rely on 'distcheck' to run 'check-local' and use # 'sanity1' and 'sanity2' as evidences that test-build was run. +test_rootdir = $(top_builddir)/../../.. + test-build: all test -f src/result if test -n "$(MAYBE_OPT)"; then \ test -f opt/result || exit 1; \ - : > $(top_builddir)/../../sanity2 || exit 1; \ + : > $(test_rootdir)/sanity2 || exit 1; \ else \ test ! -f opt/result || exit 1; \ - : > $(top_builddir)/../../sanity1 || exit 1; \ + : > $(test_rootdir)/sanity1 || exit 1; \ fi test-dist: distdir @@ -66,7 +68,7 @@ mkdir src opt : > src/source : > opt/source -cat >src/Makefile.am << 'END' +cat > src/Makefile.am <<'END' EXTRA_DIST = source all-local: result CLEANFILES = result @@ -76,7 +78,7 @@ result: source END # We want in opt/ the same Makefile as in src/. Let's exercise 'include'. -cat >opt/Makefile.am << 'END' +cat > opt/Makefile.am <<'END' include ../src/Makefile.am END diff --git a/t/subdir-am-cond.sh b/t/subdir-am-cond.sh index 8a36bc3..69345d1 100644 --- a/t/subdir-am-cond.sh +++ b/t/subdir-am-cond.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2014 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 @@ -20,13 +20,13 @@ . test-init.sh -cat >>configure.ac <<'END' +cat >> configure.ac <<'END' AM_CONDITIONAL([COND_OPT], [test "$want_opt" = yes]) AC_CONFIG_FILES([src/Makefile opt/Makefile]) AC_OUTPUT END -cat >Makefile.am << 'END' +cat > Makefile.am <<'END' if COND_OPT MAYBE_OPT = opt endif @@ -42,16 +42,18 @@ SUBDIRS = src $(MAYBE_OPT) # We rely on 'distcheck' to run 'check-local' and use # 'sanity1' and 'sanity2' as evidences that test-build was run. +test_rootdir = $(top_builddir)/../../.. + if COND_OPT test-build: all test -f src/result test -f opt/result - : > $(top_builddir)/../../sanity2 + : > $(test_rootdir)/sanity2 else test-build: all test -f src/result test ! -f opt/result - : > $(top_builddir)/../../sanity1 + : > $(test_rootdir)/sanity1 endif test-dist: distdir @@ -65,7 +67,7 @@ mkdir src opt : > src/source : > opt/source -cat >src/Makefile.am << 'END' +cat > src/Makefile.am <<'END' EXTRA_DIST = source all-local: result CLEANFILES = result @@ -75,7 +77,7 @@ result: source END # We want in opt/ the same Makefile as in src/. Let's exercise 'include'. -cat >opt/Makefile.am << 'END' +cat > opt/Makefile.am <<'END' include ../src/Makefile.am END diff --git a/t/txinfo-builddir.sh b/t/txinfo-builddir.sh index 42d4112..50e3417 100644 --- a/t/txinfo-builddir.sh +++ b/t/txinfo-builddir.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2012-2013 Free Software Foundation, Inc. +# Copyright (C) 2012-2014 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 @@ -43,7 +43,7 @@ CLEANFILES = mu.info # to think 'version.texi' has been created... check-local: test ! -e mu.info - test -f ../mu.info + test -f $(srcdir)/mu.info END mkdir subdir -- 2.1.3 From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 23 14:24:42 2014 Received: (at 18286) by debbugs.gnu.org; 23 Dec 2014 19:24:42 +0000 Received: from localhost ([127.0.0.1]:56009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3V4O-0000fv-3F for submit@debbugs.gnu.org; Tue, 23 Dec 2014 14:24:42 -0500 Received: from mail-wi0-f182.google.com ([209.85.212.182]:46907) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3V49-0000eT-Te for 18286@debbugs.gnu.org; Tue, 23 Dec 2014 14:24:33 -0500 Received: by mail-wi0-f182.google.com with SMTP id h11so11737767wiw.15 for <18286@debbugs.gnu.org>; Tue, 23 Dec 2014 11:24:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=bFuB1gr84JLut/OXNIF6quTzycB+EFhQfuVoUTEg61I=; b=AEr/MAT6cSHgD0MsvgnicIM0Gva1FMcvCLSFDgPrHnNPB+q+KXQ8HI9m5BIL7+GVUy tSQcamWcR4gKwX1sSqKS12LDE1ZCfECDCsPzMxoKeAHhZBHmMNjhHmo9J1r9INIUof25 nR5D6uWPe+vHFWzZv7+qnPRxdrTceQaUKkYaDKDKxMiHKzCj8t5oeagwETSHp6PuXYhm E2m33+rxqnnjldm4MadV5JY7sTpxEKH7BAeV/YUZImi4GUHOqQM9AKHLsyP/NZKjgmI0 xQAtwqVlZTxrR23UATYh6K7IHnZPZgMazAtz1O+nMV8Yamvl9E4+YB0mpEbBDUWamepg 3Iaw== X-Received: by 10.194.94.164 with SMTP id dd4mr56672813wjb.56.1419362661310; Tue, 23 Dec 2014 11:24:21 -0800 (PST) Received: from localhost.localdomain (host159-94-dynamic.7-79-r.retail.telecomitalia.it. [79.7.94.159]) by mx.google.com with ESMTPSA id ud4sm18430427wib.0.2014.12.23.11.24.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Dec 2014 11:24:20 -0800 (PST) From: Stefano Lattarini To: automake-patches@gnu.org Subject: [PATCH 1/2] tests: expose automake bug#18286 "distcheck fails to detect missing files" Date: Tue, 23 Dec 2014 20:23:57 +0100 Message-Id: <2629aa9e713c584c799677987ffb03156b8aae8e.1419362614.git.stefano.lattarini@gmail.com> X-Mailer: git-send-email 2.1.3 X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18286 Cc: Nicola Fontana , 18286@debbugs.gnu.org, Peter Johansson X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.7 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * t/distcheck-pr18286.sh: New test, still XFAILing. * t/list-of-tests.mk: Add it. Signed-off-by: Stefano Lattarini --- t/distcheck-pr18286.sh | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++ t/list-of-tests.mk | 2 ++ 2 files changed, 64 insertions(+) create mode 100644 t/distcheck-pr18286.sh [...] Content analysis details: (1.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefano.lattarini[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.7 URIBL_BLACK Contains an URL listed in the URIBL blacklist [URIs: configure.ac] 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid * t/distcheck-pr18286.sh: New test, still XFAILing. * t/list-of-tests.mk: Add it. Signed-off-by: Stefano Lattarini --- t/distcheck-pr18286.sh | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++ t/list-of-tests.mk | 2 ++ 2 files changed, 64 insertions(+) create mode 100644 t/distcheck-pr18286.sh diff --git a/t/distcheck-pr18286.sh b/t/distcheck-pr18286.sh new file mode 100644 index 0000000..b107735 --- /dev/null +++ b/t/distcheck-pr18286.sh @@ -0,0 +1,62 @@ +#! /bin/sh +# Copyright (C) 2014 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 . + +# Ensure "make distcheck" detects all missing files, without getting +# confused by the fact that they exists in the "original" source tree +# from which "make distcheck" is run. See automake bug#18286. + +. test-init.sh + +echo AC_OUTPUT >> configure.ac + +cat > Makefile.am <<'END' +$(srcdir)/test_data.am: $(srcdir)/test_data.txt $(srcdir)/gen-testdata.sh + cd $(srcdir) && $(SHELL) gen-testdata.sh test_data.am + +include $(srcdir)/test_data.am + +check-local: + is $(testdata) == foo bar +END + +cat > test_data.txt <<'END' +foo +bar +END + + +cat > gen-testdata.sh <<'END' +#!/bin/sh +printf 'testdata = \\\n' +sed 's/$/ \\/' +echo '$(empty_string)' +END +chmod a+x gen-testdata.sh + +$sleep +./gen-testdata.sh test_data.am + +$ACLOCAL +$AUTOCONF +$AUTOMAKE -a + +./configure + +$MAKE check + +run_make -e FAIL -M distcheck + +: diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index c07eb72..ad96326 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -31,6 +31,7 @@ t/pm/Version3.pl XFAIL_TESTS = \ t/all.sh \ t/cond17.sh \ +t/distcheck-pr18286.sh \ t/gcj6.sh \ t/override-conditional-2.sh \ t/override-conditional-pr13940.sh \ @@ -427,6 +428,7 @@ t/distcheck-no-prefix-or-srcdir-override.sh \ t/distcheck-override-infodir.sh \ t/distcheck-pr9579.sh \ t/distcheck-pr10470.sh \ +t/distcheck-pr18286.sh \ t/dmalloc.sh \ t/doc-parsing-buglets-colneq-subst.sh \ t/doc-parsing-buglets-tabs.sh \ -- 2.1.3 From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 23 14:26:30 2014 Received: (at control) by debbugs.gnu.org; 23 Dec 2014 19:26:30 +0000 Received: from localhost ([127.0.0.1]:56014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3V6D-0000jE-W2 for submit@debbugs.gnu.org; Tue, 23 Dec 2014 14:26:30 -0500 Received: from mail-wg0-f50.google.com ([74.125.82.50]:62600) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3V6C-0000j0-Ir for control@debbugs.gnu.org; Tue, 23 Dec 2014 14:26:29 -0500 Received: by mail-wg0-f50.google.com with SMTP id a1so9829419wgh.37 for ; Tue, 23 Dec 2014 11:26:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:mime-version:to:subject:content-type :content-transfer-encoding; bh=hrUKjuoqbzrc8l5HY4liOHepI96G2ognglefpfbK/kY=; b=kei3lP4bkvJpuZE3yzBEQv3eq9YG0/T6n/ZtXQyQqD/ZsPHRaKdnAlQ6MPhg93055v Sc51Z6mZlNZrRALs7era1ZO1pJWNA89ynLBD5JayWhmTVdSOcgAnV6ToDCdio1SnoLoO 646EO3fjweB4hIuwDUXPbjn2obaBLsJoclymdAdRrwsW8FsKejawSMrCdTs0GbmtSGy4 1aIL8O0ey50oAMfT5lLYAV1Hr6SICGGMoczlA/iv7WzJSVCnzZ8ybZ6REcXtDIi8Kx+R 970+6tC69TOhDkb3VtshOF+R0d+K+1eSsGN7h6k3nQZ3o5GOlsyS75kq15D85I7gKcJA AjJA== X-Received: by 10.180.7.198 with SMTP id l6mr44496678wia.26.1419362787695; Tue, 23 Dec 2014 11:26:27 -0800 (PST) Received: from [192.168.0.101] (host159-94-dynamic.7-79-r.retail.telecomitalia.it. [79.7.94.159]) by mx.google.com with ESMTPSA id bs2sm28809265wjc.43.2014.12.23.11.26.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Dec 2014 11:26:27 -0800 (PST) Message-ID: <5499C1DE.40206@gmail.com> Date: Tue, 23 Dec 2014 20:26:22 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: GNU bug tracker automated control server Subject: 18286 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) tags 18286 patch close 18286 stop From unknown Sun Jun 22 07:34:19 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 21 Jan 2015 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator