First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 66478
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo's Team for Core System packages <base-system@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Gregorio Guidi (RETIRED) <greg_g@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
ac-wrapper.patch patch for ac-wrapper-4.pl patch Gregorio Guidi (RETIRED) 2004-10-05 18:03 0000 2.96 KB Details | Diff
am-wrapper.patch patch for am-wrapper.pl-1.8-v2 patch Gregorio Guidi (RETIRED) 2004-10-05 18:03 0000 8.49 KB Details | Diff
ac-wrapper.pl plain ac-wrapper.pl text/plain Gregorio Guidi (RETIRED) 2004-10-05 18:04 0000 2.31 KB Details
am-wrapper.pl plain am-wrapper.pl text/plain Gregorio Guidi (RETIRED) 2004-10-05 18:04 0000 4.54 KB Details
am-wrapper.patch patch for am-wrapper.pl-1.8-v2 patch Gregorio Guidi (RETIRED) 2004-10-05 18:09 0000 8.49 KB Details | Diff
ac-wrapper.pl ac-wrapper.pl text/plain SpanKY 2004-10-27 18:19 0000 3.60 KB Details
ac-wrapper-1.pl ac-wrapper-1.pl based on the mdk one text/plain Gregorio Guidi (RETIRED) 2004-10-29 15:20 0000 2.83 KB Details
am-wrapper-1.pl am-wrapper-1.pl based on the mdk one text/plain Gregorio Guidi (RETIRED) 2004-10-29 15:31 0000 3.95 KB Details
ac-wrapper-1.sh ac-wrapper-1.sh text/plain Gregorio Guidi (RETIRED) 2004-11-05 09:23 0000 2.69 KB Details
am-wrapper-1.sh am-wrapper-1.sh text/plain Gregorio Guidi (RETIRED) 2004-11-05 09:23 0000 3.78 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 66478 depends on: 56670 Show dependency tree
Show dependency graph
Bug 66478 blocks: 58791
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-10-05 18:02 0000
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 From Gregorio Guidi (RETIRED) 2004-10-05 18:03:10 0000 -------
Created an attachment (id=41191) [edit]
patch for ac-wrapper-4.pl

------- Comment #2 From Gregorio Guidi (RETIRED) 2004-10-05 18:03:43 0000 -------
Created an attachment (id=41192) [edit]
patch for am-wrapper.pl-1.8-v2

------- Comment #3 From Gregorio Guidi (RETIRED) 2004-10-05 18:04:31 0000 -------
Created an attachment (id=41193) [edit]
plain ac-wrapper.pl

------- Comment #4 From Gregorio Guidi (RETIRED) 2004-10-05 18:04:54 0000 -------
Created an attachment (id=41194) [edit]
plain am-wrapper.pl

------- Comment #5 From Gregorio Guidi (RETIRED) 2004-10-05 18:09:08 0000 -------
Created an attachment (id=41195) [edit]
patch for am-wrapper.pl-1.8-v2

------- Comment #6 From SpanKY 2004-10-20 18:03:24 0000 -------
autoconf-2.59-r6+ does this now

------- Comment #7 From Gregorio Guidi (RETIRED) 2004-10-23 05:00:21 0000 -------
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 From SpanKY 2004-10-23 21:29:21 0000 -------
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 From Martin Schlemmer (RETIRED) 2004-10-25 10:14:47 0000 -------
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 From SpanKY 2004-10-25 16:16:18 0000 -------
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 From Gregorio Guidi (RETIRED) 2004-10-26 02:41:53 0000 -------
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 From Martin Schlemmer (RETIRED) 2004-10-26 12:21:39 0000 -------
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 From SpanKY 2004-10-26 12:32:00 0000 -------
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 From Martin Schlemmer (RETIRED) 2004-10-27 10:56:41 0000 -------
Mind attaching it to this bug?

------- Comment #15 From SpanKY 2004-10-27 18:19:45 0000 -------
Created an attachment (id=42738) [edit]
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 From Martin Schlemmer (RETIRED) 2004-10-29 10:30:54 0000 -------
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 From Gregorio Guidi (RETIRED) 2004-10-29 15:20:47 0000 -------
Created an attachment (id=42882) [edit]
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 From Gregorio Guidi (RETIRED) 2004-10-29 15:31:05 0000 -------
Created an attachment (id=42883) [edit]
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 From Martin Schlemmer (RETIRED) 2004-10-31 04:32:20 0000 -------
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 From SpanKY 2004-10-31 11:19:37 0000 -------
yep, i'll start checkin now

------- Comment #21 From SpanKY 2004-10-31 17:20:59 0000 -------
all set now

------- Comment #22 From SpanKY 2004-11-04 20:27:50 0000 -------
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 From Gregorio Guidi (RETIRED) 2004-11-05 09:23:13 0000 -------
Created an attachment (id=43350) [edit]
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 From Gregorio Guidi (RETIRED) 2004-11-05 09:23:44 0000 -------
Created an attachment (id=43351) [edit]
am-wrapper-1.sh

and here's the brother script

------- Comment #25 From Martin Schlemmer (RETIRED) 2004-11-05 10:27:11 0000 -------
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 From SpanKY 2004-11-05 16:16:53 0000 -------
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 From Martin Schlemmer (RETIRED) 2004-11-08 10:19:41 0000 -------
I guess I will be more comfortable with bash/awk as well.

------- Comment #28 From SpanKY 2004-11-13 21:46:58 0000 -------
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

First Last Prev Next    No search results available      Search page      Enter new bug