GNU bug report logs - #14991
distcheck passes --prefix to configure before *DISTCHECK_CONFIGURE_FLAGS

Previous Next

Package: automake;

Reported by: Akim Demaille <akim <at> lrde.epita.fr>

Date: Wed, 31 Jul 2013 07:39:02 UTC

Severity: normal

Tags: patch

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14991 in the body.
You can then email your comments to 14991 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-automake <at> gnu.org:
bug#14991; Package automake. (Wed, 31 Jul 2013 07:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Akim Demaille <akim <at> lrde.epita.fr>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Wed, 31 Jul 2013 07:39:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Akim Demaille <akim <at> lrde.epita.fr>
To: Automake Bugs <bug-automake <at> gnu.org>
Subject: distcheck passes --prefix to configure before
 *DISTCHECK_CONFIGURE_FLAGS
Date: Wed, 31 Jul 2013 09:37:32 +0200
Hi!

Admittedly, what prompts this report is arguably a bug in
a package: It passes _all_ the configure flags to
AM_DISTCHECK_CONFIGURE_FLAGS.  Not a bright idea I guess,
but simple.

Unfortunately distcheck reads:

# This target untars the dist file and tries a VPATH configuration.  Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
	case '$(DIST_ARCHIVES)' in \
	*.tar.gz*) \
…
	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
	    $(DISTCHECK_CONFIGURE_FLAGS) \
	  && $(MAKE) $(AM_MAKEFLAGS) \

So the "local" flags, --srcdir and especially --prefix, are
provided by distcheck, and then overridden by the user's
DISTCHECK_CONFIGURE_FLAGS.  Since I use --prefix, boom.

Very much agreed, --prefix should not have made it into
(AM_)DISTCHECK_CONFIGURE_FLAGS; however it seems simple to
just pass --srcdir and --prefix last to be protected against
such cases.

Thanks!





Information forwarded to bug-automake <at> gnu.org:
bug#14991; Package automake. (Wed, 30 Oct 2013 22:03:01 GMT) Full text and rfc822 format available.

Message #8 received at 14991 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Akim Demaille <akim <at> lrde.epita.fr>
Cc: 14991 <at> debbugs.gnu.org,
 "automake-patches <at> gnu.org" <automake-patches <at> gnu.org>
Subject: Re: bug#14991: distcheck passes --prefix to configure before
 *DISTCHECK_CONFIGURE_FLAGS
Date: Wed, 30 Oct 2013 22:02:28 +0000
[Message part 1 (text/plain, inline)]
Reference: <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14991>

tags 14991 + patch
close 14991
thanks

On 07/31/2013 08:37 AM, Akim Demaille wrote:
> Hi!
> 
Hi Akim, thanks for the report, and sorry for the awful delay.

> Admittedly, what prompts this report is arguably a bug in
> a package: It passes _all_ the configure flags to
> AM_DISTCHECK_CONFIGURE_FLAGS.  Not a bright idea I guess,
> but simple.
> 
> Unfortunately distcheck reads:
> 
> # This target untars the dist file and tries a VPATH configuration.  Then
> # it guarantees that the distribution is self-contained by making another
> # tarfile.
> distcheck: dist
> 	case '$(DIST_ARCHIVES)' in \
> 	*.tar.gz*) \
> …
> 	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
> 	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
> 	    $(DISTCHECK_CONFIGURE_FLAGS) \
> 	  && $(MAKE) $(AM_MAKEFLAGS) \
> 
> So the "local" flags, --srcdir and especially --prefix, are
> provided by distcheck, and then overridden by the user's
> DISTCHECK_CONFIGURE_FLAGS.  Since I use --prefix, boom.
> 
> Very much agreed, --prefix should not have made it into
> (AM_)DISTCHECK_CONFIGURE_FLAGS; however it seems simple to
> just pass --srcdir and --prefix last to be protected against
> such cases.
>
I agree.  The code in "make distcheck" implicitly assumes that the
values for --srcdir and --prefix it defines cannot be changed, so
it makes no sense to allow them to be overridden.

I've fixed the issue with the two attached patches, that will appear
in Automake 1.14.1 (someday when I'll actually get around to release
it ;-).  I will wait some time before pushing the patches out, so a
review is welcome.

Regards,
  Stefano
[0001-tests-expose-bug-14991-relates-to-distcheck.patch (text/x-patch, attachment)]
[0002-distcheck-don-t-allow-overriding-of-prefix-and-srcdi.patch (text/x-patch, attachment)]

Added tag(s) patch. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 30 Oct 2013 22:03:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 14991 <at> debbugs.gnu.org and Akim Demaille <akim <at> lrde.epita.fr> Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 30 Oct 2013 22:03:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#14991; Package automake. (Wed, 30 Oct 2013 22:11:01 GMT) Full text and rfc822 format available.

Message #15 received at 14991 <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>,
 Akim Demaille <akim <at> lrde.epita.fr>
Cc: 14991 <at> debbugs.gnu.org,
 "automake-patches <at> gnu.org" <automake-patches <at> gnu.org>
Subject: Re: bug#14991: distcheck passes --prefix to configure before
 *DISTCHECK_CONFIGURE_FLAGS
Date: Wed, 30 Oct 2013 16:10:18 -0600
[Message part 1 (text/plain, inline)]
On 10/30/2013 04:02 PM, Stefano Lattarini wrote:

> Subject: [PATCH 2/2] distcheck: don't allow overriding of --prefix and
>  --srcdir by the user
> 
> Not trough AM_DISTCHECK_FLAGS, nor through DISTCHECK_FLAGS.  Apparently,

s/trough/through/

> some packages got in the habit of relaying all the options passed to the
> original ./configure invocation through to the configure invocations
> in "make distcheck".  This was causing problems, because it also passed
> through the original --srcdir and --prefix options.
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-automake <at> gnu.org:
bug#14991; Package automake. (Wed, 30 Oct 2013 22:27:01 GMT) Full text and rfc822 format available.

Message #18 received at 14991 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Eric Blake <eblake <at> redhat.com>
Cc: 14991 <at> debbugs.gnu.org, Akim Demaille <akim <at> lrde.epita.fr>,
 "automake-patches <at> gnu.org" <automake-patches <at> gnu.org>
Subject: Re: bug#14991: distcheck passes --prefix to configure before
 *DISTCHECK_CONFIGURE_FLAGS
Date: Wed, 30 Oct 2013 22:26:27 +0000
On 10/30/2013 10:10 PM, Eric Blake wrote:
> On 10/30/2013 04:02 PM, Stefano Lattarini wrote:
> 
>> Subject: [PATCH 2/2] distcheck: don't allow overriding of --prefix and
>>  --srcdir by the user
>>
>> Not trough AM_DISTCHECK_FLAGS, nor through DISTCHECK_FLAGS.  Apparently,
> 
> s/trough/through/
> 
Thanks, fixed.

Stefano





Information forwarded to bug-automake <at> gnu.org:
bug#14991; Package automake. (Thu, 31 Oct 2013 08:26:02 GMT) Full text and rfc822 format available.

Message #21 received at 14991 <at> debbugs.gnu.org (full text, mbox):

From: Akim Demaille <akim <at> lrde.epita.fr>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: 14991 <at> debbugs.gnu.org,
 "automake-patches <at> gnu.org" <automake-patches <at> gnu.org>
Subject: Re: bug#14991: distcheck passes --prefix to configure before
 *DISTCHECK_CONFIGURE_FLAGS
Date: Thu, 31 Oct 2013 09:25:30 +0100
Hi Stefano!

Le 30 oct. 2013 à 23:02, Stefano Lattarini <stefano.lattarini <at> gmail.com> a écrit :

> I've fixed the issue with the two attached patches, that will appear
> in Automake 1.14.1 (someday when I'll actually get around to release
> it ;-).  I will wait some time before pushing the patches out, so a
> review is welcome.

It looks fine, thanks!



Information forwarded to bug-automake <at> gnu.org:
bug#14991; Package automake. (Sat, 02 Nov 2013 02:48:03 GMT) Full text and rfc822 format available.

Message #24 received at 14991 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Akim Demaille <akim <at> lrde.epita.fr>
Cc: 14991 <at> debbugs.gnu.org,
 "automake-patches <at> gnu.org" <automake-patches <at> gnu.org>
Subject: Re: bug#14991: distcheck passes --prefix to configure before
 *DISTCHECK_CONFIGURE_FLAGS
Date: Sat, 02 Nov 2013 02:46:54 +0000
On 10/31/2013 08:25 AM, Akim Demaille wrote:
> Hi Stefano!
> 
> Le 30 oct. 2013 à 23:02, Stefano Lattarini <stefano.lattarini <at> gmail.com> a écrit :
> 
>> I've fixed the issue with the two attached patches, that will appear
>> in Automake 1.14.1 (someday when I'll actually get around to release
>> it ;-).  I will wait some time before pushing the patches out, so a
>> review is welcome.
> 
> It looks fine, thanks!
> 
Pushed.

Thanks,
  Stefano




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 30 Nov 2013 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 287 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.