Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 66478 - [PATCH] Proposal: use newest automake/autoconf by default
Summary: [PATCH] Proposal: use newest automake/autoconf by default
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on: 56670
Blocks: 58791
  Show dependency tree
 
Reported: 2004-10-05 18:02 UTC by Gregorio Guidi (RETIRED)
Modified: 2004-11-13 21:46 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch for ac-wrapper-4.pl (ac-wrapper.patch,2.96 KB, patch)
2004-10-05 18:03 UTC, Gregorio Guidi (RETIRED)
Details | Diff
patch for am-wrapper.pl-1.8-v2 (am-wrapper.patch,8.49 KB, patch)
2004-10-05 18:03 UTC, Gregorio Guidi (RETIRED)
Details | Diff
plain ac-wrapper.pl (ac-wrapper.pl,2.31 KB, text/plain)
2004-10-05 18:04 UTC, Gregorio Guidi (RETIRED)
Details
plain am-wrapper.pl (am-wrapper.pl,4.54 KB, text/plain)
2004-10-05 18:04 UTC, Gregorio Guidi (RETIRED)
Details
patch for am-wrapper.pl-1.8-v2 (am-wrapper.patch,8.49 KB, patch)
2004-10-05 18:09 UTC, Gregorio Guidi (RETIRED)
Details | Diff
ac-wrapper.pl (ac-wrapper.pl,3.60 KB, text/plain)
2004-10-27 18:19 UTC, SpanKY
Details
ac-wrapper-1.pl based on the mdk one (ac-wrapper-1.pl,2.83 KB, text/plain)
2004-10-29 15:20 UTC, Gregorio Guidi (RETIRED)
Details
am-wrapper-1.pl based on the mdk one (am-wrapper-1.pl,3.95 KB, text/plain)
2004-10-29 15:31 UTC, Gregorio Guidi (RETIRED)
Details
ac-wrapper-1.sh (ac-wrapper-1.sh,2.69 KB, text/plain)
2004-11-05 09:23 UTC, Gregorio Guidi (RETIRED)
Details
am-wrapper-1.sh (am-wrapper-1.sh,3.78 KB, text/plain)
2004-11-05 09:23 UTC, Gregorio Guidi (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gregorio Guidi (RETIRED) gentoo-dev 2004-10-05 18:02:18 UTC
The following patches change the ac-wrapper.pl and am-wrapper.pl scripts
to use by default the most recent version of auto* tools (autoconf-2.59,
automake-1.8 at the moment) instead of the ancient 2.13 and 1.4.

This has little impact on the packages in the portage tree, because the
wrappers do a very good job at detecting the version used to generate
configure and Makefile.in, automatically choosing the correct version
even without defining WANT_AUTOCONF/WANT_AUTOMAKE.

The default comes into play mainly for newly created projects, when autotools
run for the first time; since Gentoo is the platform of choice for a lot of 
software developers it is a good idea to stimulate the use of newer tools.

Moreover, bug 56670, bug 58255 and newly created bug 66446 can take advantage 
of this change, and the code in the wrappers is a bit simplified.

I did quite a lot of testing to ensure the rules are correct, while I found
the current versions are not rock solid, for instance the rule in 
ac-wrapper.pl

(cat_('configure') =~ /^# Generated by Autoconf (\S+)/m ? $1 : '') gt '2.13'

is not correct (the text is a bit different and does not match).
Comment 1 Gregorio Guidi (RETIRED) gentoo-dev 2004-10-05 18:03:10 UTC
Created attachment 41191 [details, diff]
patch for ac-wrapper-4.pl
Comment 2 Gregorio Guidi (RETIRED) gentoo-dev 2004-10-05 18:03:43 UTC
Created attachment 41192 [details, diff]
patch for am-wrapper.pl-1.8-v2
Comment 3 Gregorio Guidi (RETIRED) gentoo-dev 2004-10-05 18:04:31 UTC
Created attachment 41193 [details]
plain ac-wrapper.pl
Comment 4 Gregorio Guidi (RETIRED) gentoo-dev 2004-10-05 18:04:54 UTC
Created attachment 41194 [details]
plain am-wrapper.pl
Comment 5 Gregorio Guidi (RETIRED) gentoo-dev 2004-10-05 18:09:08 UTC
Created attachment 41195 [details, diff]
patch for am-wrapper.pl-1.8-v2
Comment 6 SpanKY gentoo-dev 2004-10-20 18:03:24 UTC
autoconf-2.59-r6+ does this now
Comment 7 Gregorio Guidi (RETIRED) gentoo-dev 2004-10-23 05:00:21 UTC
Out of curiosity:

the new masked autoconf-wrapper brings back to the old deprecated syntax:
WANT_AUTOCONF_2_1 (and changes WANT_AUTOCONF_2_5 to FORCE_AUTOCONF_2_5),
is this the intended behavior for the future or is it just a work in progress?

If the autoconf/automake stuff will be slotted, will it be responsability
of the ebuild writers to depend on the right version? Doesn't this defeat
the purpose of the autodetection logic?
Comment 8 SpanKY gentoo-dev 2004-10-23 21:29:21 UTC
the WANT_AUTOCONF= missing is a mistake, i grabbed the latest mdk wrapper since it handles things better but i missed the reversal of the envvar

i'll port the syntax from the older wrapper forward

as for the SLOTing thing, we may just make the wrapper DEPEND on all versions
Comment 9 Martin Schlemmer (RETIRED) gentoo-dev 2004-10-25 10:14:47 UTC
In concept I do not have a problem with this, but you will have to a clean
bootstrap & emerge system & emerge gnome kde whateverelse to verify that there
are no regressions ...

Mike, also please do not just use the latest MDK stuff .. we have a lot of
fixes that they do not ...
Comment 10 SpanKY gentoo-dev 2004-10-25 16:16:18 UTC
like i mentioned before, i'm quite weak at perl ;)

the new wrapper handled Bug 56670 correctly ... or it could just be because the new wrapper runs 2.5x by default ...
Comment 11 Gregorio Guidi (RETIRED) gentoo-dev 2004-10-26 02:41:53 UTC
yes... as pointed out in comment #0

If anyone interested, I can repost my patches taking into account
the updated mdk scripts.
and now I'm going do the bootstrap test...
Comment 12 Martin Schlemmer (RETIRED) gentoo-dev 2004-10-26 12:21:39 UTC
For interest sake, what is new in the latest MDK scripts btw?  They bitched
about me not sending them fixes, but then when I did never bothered to use
it.  Oh, and do they actually have an am-wrapper.pl now?  They did not use
to have ...
Comment 13 SpanKY gentoo-dev 2004-10-26 12:32:00 UTC
i was only able to find an updated ac-wrapper via src rpms on some rpmfind sites ... wasnt able to find traces of am-wrapper anywhere at all, let alone an upstream cvs site or something

from what i could tell, ac-wrapper had these changed behaviors:
- better parsing for required versions
- no more support for WANT_AUTOCONF_#_#=1
- change the order of selection from newest to oldest instead of oldest to newest
Comment 14 Martin Schlemmer (RETIRED) gentoo-dev 2004-10-27 10:56:41 UTC
Mind attaching it to this bug?
Comment 15 SpanKY gentoo-dev 2004-10-27 18:19:45 UTC
Created attachment 42738 [details]
ac-wrapper.pl

http://rpm.pbone.net/index.php3/stat/4/idpl/1399863/com/autoconf2.5-2.59-6mdk.noarch.rpm.html

this was the best i could find, grabbed the ac-wrapper.pl out of it
Comment 16 Martin Schlemmer (RETIRED) gentoo-dev 2004-10-29 10:30:54 UTC
Seems they only really fix the check for the dubious:

  (cat_('configure') =~ /^# Generated by Autoconf (\S+)/m ? $1 : '') gt '2.13'

and then they add some really nice error checking and consistent checking.

Gregorio, I do not know if you want to take a stab at integrating some of the
ideas in there, as it seems your perl might be better than mine (which is only
slightly better than Mike's I *think*) ?
Comment 17 Gregorio Guidi (RETIRED) gentoo-dev 2004-10-29 15:20:47 UTC
Created attachment 42882 [details]
ac-wrapper-1.pl based on the mdk one

> ... it seems your perl might be better than mine

I don't think so... anyway, here's a version of the mdk script
modified to respect the WANT_AUTOCONF=x.y syntax, and using a style
consistent with am-wrapper.pl (will attach that in a minute...)
Comment 18 Gregorio Guidi (RETIRED) gentoo-dev 2004-10-29 15:31:05 UTC
Created attachment 42883 [details]
am-wrapper-1.pl based on the mdk one

... and here's a new am-wrapper.pl, created from the old one using
the same style of ac-wrapper.pl, naturally using the WANT_AUTOMAKE=x.y syntax.

Both the scripts have passed a fair round of testing.

Note: I didn't reintroduce the code to stay comptible with the old 
WANT_AUTOCONF_x_y syntax. That could be added with no troubles, but I think
it is convinient to just remove support for that:
currently in the tree there are just two packages setting WANT_AUTOCONF_2_1: 
kde-functions.eclass and mozilla (a bunch of others use WANT_AUTOCONF_2_5, 
which is now useless), and there are 6 that use WANT_AUTOMAKE_1_x: 
kde-functions.eclass, cyrus-sasl, vlc, drip, texinfo, libtool; all these could 

be changed by hand in a minute.

But the decision is up to you.
Comment 19 Martin Schlemmer (RETIRED) gentoo-dev 2004-10-31 04:32:20 UTC
Looks good.  I was thinking it might be a good idea to see if the old value
is in use, and then error out?  Should make sure it dies a good death.

Mike, can you possibly get time to fix the tree of the old syntax ?

Comment 20 SpanKY gentoo-dev 2004-10-31 11:19:37 UTC
yep, i'll start checkin now
Comment 21 SpanKY gentoo-dev 2004-10-31 17:20:59 UTC
all set now
Comment 22 SpanKY gentoo-dev 2004-11-04 20:27:50 UTC
you know, someone just pointed out something that was kind of obvious ...

why dont we just rewrite this frickin things in bash ?

the wrapper is pretty simple, not a lot of hard logic here ... the core guys can all handle bash/awk/sed/etc... easily (instead of perl) ...
and, we wont have to try to keep our crap in sync with mdk ... it's already proven to be a hassle

so what do you guys think ?
Comment 23 Gregorio Guidi (RETIRED) gentoo-dev 2004-11-05 09:23:13 UTC
Created attachment 43350 [details]
ac-wrapper-1.sh

Ok, what about this?

it calls perl to match the regexp, but it's just one line.
The same thing with awk will look like this:
 awk '{ if (match($0, "^# Generated (by (GNU )?Autoconf|automatically using
autoconf version) ([0-9].[0-9])", res)) { print res[3]; exit } }' configure

ugly, isn't it?
Comment 24 Gregorio Guidi (RETIRED) gentoo-dev 2004-11-05 09:23:44 UTC
Created attachment 43351 [details]
am-wrapper-1.sh

and here's the brother script
Comment 25 Martin Schlemmer (RETIRED) gentoo-dev 2004-11-05 10:27:11 UTC
I am pretty sure it will be faster if we just used perl, instead of bash
calling perl (bash is slow to begin with, now you have it calling perl).

Just my thoughts anyhow ...
Comment 26 SpanKY gentoo-dev 2004-11-05 16:16:53 UTC
that may be true, but in the larger scheme of things, how much of an overhead would it inflict ?

i'm sure the large majority of time will be spent in the actual autoconf/automake scripts and the overhead for using bash instead of perl is negligible

the call to perl can be rewritten in 'proper' shell (as pointed out by Gregorio) ... perhaps we could touch it up to make it less ugly :)

the biggest gain here is the level of competence required to fix the script ... simple fact, the core guys all know bash inside and out a lot less of us know perl (some even at all :p)
Comment 27 Martin Schlemmer (RETIRED) gentoo-dev 2004-11-08 10:19:41 UTC
I guess I will be more comfortable with bash/awk as well.
Comment 28 SpanKY gentoo-dev 2004-11-13 21:46:58 UTC
ok, new bash versions are in cvs, thanks :)

please file new bugs if the new bash versions have bugs ... i'm running some tests locally now