GNU bug report logs - #22556
25.0.90; autogen.sh automatic parameter isn't working

Previous Next

Package: emacs;

Reported by: David Caldwell <david <at> porkrind.org>

Date: Thu, 4 Feb 2016 18:19:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

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 22556 in the body.
You can then email your comments to 22556 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-gnu-emacs <at> gnu.org:
bug#22556; Package emacs. (Thu, 04 Feb 2016 18:19:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Caldwell <david <at> porkrind.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 04 Feb 2016 18:19:02 GMT) Full text and rfc822 format available.

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

From: David Caldwell <david <at> porkrind.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.90; autogen.sh automatic parameter isn't working
Date: Thu, 4 Feb 2016 10:18:02 -0800
[Message part 1 (text/plain, inline)]
Hello,

Commit aca31e3815b9bd9c696cf0c74cc4a80ad7e35ec9 seems to have broken
'./autogen.sh'. It's requiring me to invoke it with the 'autoconf'
parameter. A quick peek at the source looks like it should be automatic,
but I think there's a bug in the shell code. At least, I needed this
change to make the 'autoconf' automatic under bash. I don't know enough
about the differences between bash and pure POSIX shells to know if this
is correct everywhere, but it fixes the issue for me:

diff --git a/autogen.sh b/autogen.sh
index 2ed58e1..c5c8d51 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -106,7 +106,7 @@ check_version ()
 do_autoconf=false
 do_git=false

-for arg in ${*-autoconf}; do
+for arg in ${*:-autoconf}; do
     case $arg in
       --help)
        exec echo "$0: usage: $0 [all|autoconf|git]";;



[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22556; Package emacs. (Fri, 05 Feb 2016 02:34:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: David Caldwell <david <at> porkrind.org>
Cc: 22556 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>
Subject: Re: bug#22556: 25.0.90; autogen.sh automatic parameter isn't working
Date: Thu, 04 Feb 2016 21:32:51 -0500
David Caldwell wrote:

> Commit aca31e3815b9bd9c696cf0c74cc4a80ad7e35ec9 seems to have broken
> './autogen.sh'. It's requiring me to invoke it with the 'autoconf'
> parameter. A quick peek at the source looks like it should be automatic,
> but I think there's a bug in the shell code. At least, I needed this
> change to make the 'autoconf' automatic under bash.

I don't see the issue with bash, but I do with eg dash.

> -for arg in ${*-autoconf}; do
> +for arg in ${*:-autoconf}; do

The autoconf manual says that this is portable to all shells that
support functions, so it should be fine, since autogen.sh uses
functions.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22556; Package emacs. (Fri, 05 Feb 2016 03:07:02 GMT) Full text and rfc822 format available.

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

From: David Caldwell <david <at> porkrind.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 22556 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>
Subject: Re: bug#22556: 25.0.90; autogen.sh automatic parameter isn't working
Date: Thu, 4 Feb 2016 19:06:12 -0800
[Message part 1 (text/plain, inline)]
On 2/4/16 6:32 PM, Glenn Morris wrote:
> David Caldwell wrote:
> 
>> Commit aca31e3815b9bd9c696cf0c74cc4a80ad7e35ec9 seems to have broken
>> './autogen.sh'. It's requiring me to invoke it with the 'autoconf'
>> parameter. A quick peek at the source looks like it should be automatic,
>> but I think there's a bug in the shell code. At least, I needed this
>> change to make the 'autoconf' automatic under bash.
> 
> I don't see the issue with bash, but I do with eg dash.

Whoops, you're right: I'm running this on Debian, where /bin/sh is dash.

I forgot to show the symptom in my original bug report, which was:
$ ./autogen.sh
You can now run './autogen.sh autoconf'.
$

>> -for arg in ${*-autoconf}; do
>> +for arg in ${*:-autoconf}; do
> 
> The autoconf manual says that this is portable to all shells that
> support functions, so it should be fine, since autogen.sh uses
> functions.

Sorry, were you referring to "${*-autoconf}" or "${*:-autoconf}" being
portable?

-David


[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22556; Package emacs. (Fri, 05 Feb 2016 17:42:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: David Caldwell <david <at> porkrind.org>
Cc: 22556 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>
Subject: Re: bug#22556: 25.0.90; autogen.sh automatic parameter isn't working
Date: Fri, 05 Feb 2016 12:41:03 -0500
David Caldwell wrote:

>> The autoconf manual says that this is portable to all shells that
>> support functions, so it should be fine, since autogen.sh uses
>> functions.
>
> Sorry, were you referring to "${*-autoconf}" or "${*:-autoconf}" being
> portable?

I meant that your patch should be fine to apply.
But AFAICS at the next merge from emacs-25 the relevant code will all
disappear anyway. Or there will be a merge conflict.

(BTW, please try to put the right version number in the subject.
I thought this report was about the emacs-25 branch, but it seems it
wasn't.)




bug No longer marked as found in versions 25.0.90. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 05 Feb 2016 17:43:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22556; Package emacs. (Fri, 05 Feb 2016 18:08:02 GMT) Full text and rfc822 format available.

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

From: David Caldwell <david <at> porkrind.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 22556 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>
Subject: Re: bug#22556: HEAD; autogen.sh automatic parameter isn't working
Date: Fri, 5 Feb 2016 10:06:56 -0800
[Message part 1 (text/plain, inline)]
On 2/5/16 9:41 AM, Glenn Morris wrote:
> David Caldwell wrote:
> 
>>> The autoconf manual says that this is portable to all shells that
>>> support functions, so it should be fine, since autogen.sh uses
>>> functions.
>>
>> Sorry, were you referring to "${*-autoconf}" or "${*:-autoconf}" being
>> portable?
> 
> I meant that your patch should be fine to apply.
> But AFAICS at the next merge from emacs-25 the relevant code will all
> disappear anyway. Or there will be a merge conflict.

If the merge isn't going to happen today, would you mind installing the
patch (I would but I don't have a commit bit)? It's currently causing my
automated builds to break. And if I change the builder to pass the
"autoconf" flag, then if the code goes away in a merge it might break
again tomorrow.

> (BTW, please try to put the right version number in the subject.
> I thought this report was about the emacs-25 branch, but it seems it
> wasn't.)

Apologies, I even looked at it twice and thought it was correct. :-) I
guess I got confused because of the freeze and the recent version changes.

-David


[smime.p7s (application/pkcs7-signature, attachment)]

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Fri, 05 Feb 2016 22:19:02 GMT) Full text and rfc822 format available.

Notification sent to David Caldwell <david <at> porkrind.org>:
bug acknowledged by developer. (Fri, 05 Feb 2016 22:19:02 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Glenn Morris <rgm <at> gnu.org>, David Caldwell <david <at> porkrind.org>
Cc: 22556-done <at> debbugs.gnu.org
Subject: Re: bug#22556: 25.0.90; autogen.sh automatic parameter isn't working
Date: Fri, 5 Feb 2016 14:18:44 -0800
[Message part 1 (text/plain, inline)]
On 02/05/2016 09:41 AM, Glenn Morris wrote:
> I meant that your patch should be fine to apply.
> But AFAICS at the next merge from emacs-25 the relevant code will all
> disappear anyway. Or there will be a merge conflict.

I think this problem is present only in master. I installed the attached 
patch, which should fix it. David, thanks for reporting it.

This shell compatibility issue isn't documented in the Autoconf manual, 
so I installed a patch to document it, here:

http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=5483deb8ae9a6265ce3af0f4c5c574d44cafbcf5
[0001-autogen.sh-Port-to-dash-Bug-22556.patch (application/x-patch, attachment)]

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

This bug report was last modified 8 years and 24 days ago.

Previous Next


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