public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] bash version in ebuilds/eclasses...non-compliance and what to do?
@ 2008-12-16 23:46 Jeremy Olexa
  2008-12-20  5:35 ` [gentoo-dev] " Steve Long
  2010-01-15  5:34 ` [gentoo-dev] " Mike Frysinger
  0 siblings, 2 replies; 8+ messages in thread
From: Jeremy Olexa @ 2008-12-16 23:46 UTC (permalink / raw
  To: gentoo-dev

Exhibit A:
http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/python.eclass?r1=1.48&r2=1.49

This causes me pain on my hosts that don't have >=bash-3.1[0] for
/bin/bash. Because I can't install portage with an old bash until I
get a new python installed which uses python.eclass which isn't
supported with my /bin/bash (quite circular indeed)

Technically there are workarounds for me...but it is still annoying.
So...what do we do? A) Specifically allow >=bash-3.1 features in
ebuilds/eclasses. or B) revert the commit because the PMS says[1] that
we comply with >bash-3.0

Please discuss, thanks.
-Jeremy

[0]: See bash CHANGES file. "+=" is new to bash-3.1
[1]: "The ebuild file format is in its basic form a subset of the
format of a bash script. The interpreter is assumed to be GNU bash,
version 3.0 or later." -Chapter 6 "Ebuild File Format" [2]
[2]: http://dev.gentoo.org/~ferdy/pms/pms-eapi-2-approved-2008-09-25.pdf



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [gentoo-dev]  Re: bash version in ebuilds/eclasses...non-compliance and what to do?
  2008-12-16 23:46 [gentoo-dev] bash version in ebuilds/eclasses...non-compliance and what to do? Jeremy Olexa
@ 2008-12-20  5:35 ` Steve Long
  2008-12-20  9:42   ` Fabian Groffen
  2008-12-20 13:54   ` [gentoo-dev] " Ciaran McCreesh
  2010-01-15  5:34 ` [gentoo-dev] " Mike Frysinger
  1 sibling, 2 replies; 8+ messages in thread
From: Steve Long @ 2008-12-20  5:35 UTC (permalink / raw
  To: gentoo-dev

Jeremy Olexa wrote:

> This causes me pain on my hosts that don't have >=bash-3.1[0] for
> /bin/bash. Because I can't install portage with an old bash until I
> get a new python installed which uses python.eclass which isn't
> supported with my /bin/bash (quite circular indeed)
> 
> Technically there are workarounds for me...but it is still annoying.
> So...what do we do? A) Specifically allow >=bash-3.1 features in
> ebuilds/eclasses. or B) revert the commit because the PMS says[1] that
> we comply with >bash-3.0
> 
> Please discuss, thanks.

I'd vote for updating the spec; it's going to be a pita trying to maintain
the tree without +=. From our discussion, you said it was fine for prefix
to specify a minimum version of bash for bootstrap, but clearly that can't
be 3.1 when the draft PMS says 3.0.

I note that bash-3.2_p17-r1 is stable on all the architectures that 3.0-r12
lists (it just adds the two -fbsd archs as unstable.) portage-2.1.4.5
requires at least that version (only unstable on mips as against 2.1.1-r2)
It might be worth skipping to 3.2, since that would simplify regex handling.

Not sure how that should be framed, or when it's okay to do it; clearly a
spec has to be updatable, whether it's by a specified policy, or
explicitly.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev]  Re: bash version in ebuilds/eclasses...non-compliance and what to do?
  2008-12-20  5:35 ` [gentoo-dev] " Steve Long
@ 2008-12-20  9:42   ` Fabian Groffen
  2008-12-24 11:31     ` [gentoo-dev] " Steve Long
  2008-12-20 13:54   ` [gentoo-dev] " Ciaran McCreesh
  1 sibling, 1 reply; 8+ messages in thread
From: Fabian Groffen @ 2008-12-20  9:42 UTC (permalink / raw
  To: gentoo-dev

On 20-12-2008 05:35:25 +0000, Steve Long wrote:
> I note that bash-3.2_p17-r1 is stable on all the architectures that 3.0-r12
> lists (it just adds the two -fbsd archs as unstable.) portage-2.1.4.5
> requires at least that version (only unstable on mips as against 2.1.1-r2)
> It might be worth skipping to 3.2, since that would simplify regex handling.

The only problem we have there is that bash-3.2.17 only comes in patches
on top of 3.2.  During bootstrap that's problematic, as gnu patch (or
any other patch) might not be available, or simply b0rked.
For that reason we bootstrap with a portage pre SVN revision 10460,
which does not require >=3.2.17.
See http://bugs.gentoo.org/show_bug.cgi?id=229677#c11 on why PMS should
require 3.2.17 over plain 3.2 if you decide to push the requirement
update.

We can work around it by using a self-made pre-patched tarball, though.


-- 
Fabian Groffen
Gentoo on a different level



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev]  Re: bash version in ebuilds/eclasses...non-compliance and what to do?
  2008-12-20  5:35 ` [gentoo-dev] " Steve Long
  2008-12-20  9:42   ` Fabian Groffen
@ 2008-12-20 13:54   ` Ciaran McCreesh
  1 sibling, 0 replies; 8+ messages in thread
From: Ciaran McCreesh @ 2008-12-20 13:54 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 521 bytes --]

On Sat, 20 Dec 2008 05:35:25 +0000
Steve Long <slong@rathaus.eclipse.co.uk> wrote:
> I note that bash-3.2_p17-r1 is stable on all the architectures that
> 3.0-r12 lists (it just adds the two -fbsd archs as unstable.)
> portage-2.1.4.5 requires at least that version (only unstable on mips
> as against 2.1.1-r2) It might be worth skipping to 3.2, since that
> would simplify regex handling.

Stable isn't the measure. Stages are. Read the original email carefully
and you shall see why.

-- 
Ciaran McCreesh

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [gentoo-dev]  Re: Re: bash version in ebuilds/eclasses...non-compliance and what to do?
  2008-12-20  9:42   ` Fabian Groffen
@ 2008-12-24 11:31     ` Steve Long
  0 siblings, 0 replies; 8+ messages in thread
From: Steve Long @ 2008-12-24 11:31 UTC (permalink / raw
  To: gentoo-dev

Fabian Groffen wrote:

> On 20-12-2008 05:35:25 +0000, Steve Long wrote:
>> I note that bash-3.2_p17-r1 is stable on all the architectures that
>> 3.0-r12 lists (it just adds the two -fbsd archs as unstable.)
>> portage-2.1.4.5 requires at least that version (only unstable on mips as
>> against 2.1.1-r2) It might be worth skipping to 3.2, since that would
>> simplify regex handling.
> 
> The only problem we have there is that bash-3.2.17 only comes in patches
> on top of 3.2.  During bootstrap that's problematic, as gnu patch (or
> any other patch) might not be available, or simply b0rked.
> For that reason we bootstrap with a portage pre SVN revision 10460,
> which does not require >=3.2.17.
> See http://bugs.gentoo.org/show_bug.cgi?id=229677#c11 on why PMS should
> require 3.2.17 over plain 3.2 if you decide to push the requirement
> update.
>
Yeah, that sounds great. Believe me I ran into troubles with early 3.2 ;)
which is why I'm deadset against unstable across the board.

Regex handling within BASH is quite important eg on cygwin where process
creation is expensive. While I'm happy keeping my scripts compatible across
3.x (they're not Gentoo-specific) ebuild syntax would be much more
perl-like if we were on 3.2.17+ (and would thus hold less gotchas for
people new to the format, as well as perhaps giving some old hands a bit of
new shiny;)

> We can work around it by using a self-made pre-patched tarball, though.
> 
Indeed, and they can be pushed out to stages pretty painlessly. If metro is
politically unacceptable, I'm sure releng could do it with catalyst;
somehow I doubt it's as hard to bootstrap as perl, but please don't flame
me if you have something to say; just _add_ something technical.

Happy Holidays to all those whom I don't /ignore ;-)





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] bash version in ebuilds/eclasses...non-compliance and what to do?
  2008-12-16 23:46 [gentoo-dev] bash version in ebuilds/eclasses...non-compliance and what to do? Jeremy Olexa
  2008-12-20  5:35 ` [gentoo-dev] " Steve Long
@ 2010-01-15  5:34 ` Mike Frysinger
  2010-01-15 10:46   ` Fabian Groffen
  2010-01-15 15:13   ` [gentoo-dev] " Christian Faulhammer
  1 sibling, 2 replies; 8+ messages in thread
From: Mike Frysinger @ 2010-01-15  5:34 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: Text/Plain, Size: 1022 bytes --]

On Tuesday 16 December 2008 18:46:44 Jeremy Olexa wrote:
> Exhibit A:
> http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/python.eclass?r1=1.4
> 8&r2=1.49
> 
> This causes me pain on my hosts that don't have >=bash-3.1[0] for
> /bin/bash. Because I can't install portage with an old bash until I
> get a new python installed which uses python.eclass which isn't
> supported with my /bin/bash (quite circular indeed)
> 
> Technically there are workarounds for me...but it is still annoying.
> So...what do we do? A) Specifically allow >=bash-3.1 features in
> ebuilds/eclasses. or B) revert the commit because the PMS says[1] that
> we comply with >bash-3.0
> 
> Please discuss, thanks.

btw, latest python.eclass requires bash-3.2+ due to parsing errors in the
regex checks:
$ bash-3.1 -c '[[ a =~ ^(a|b)$ ]]'
bash-3.1: -c: line 0: syntax error in conditional expression: unexpected token `('
bash-3.1: -c: line 0: syntax error near `^(a'

we could quote these or require bash-3.2+ ...
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] bash version in ebuilds/eclasses...non-compliance and what to do?
  2010-01-15  5:34 ` [gentoo-dev] " Mike Frysinger
@ 2010-01-15 10:46   ` Fabian Groffen
  2010-01-15 15:13   ` [gentoo-dev] " Christian Faulhammer
  1 sibling, 0 replies; 8+ messages in thread
From: Fabian Groffen @ 2010-01-15 10:46 UTC (permalink / raw
  To: gentoo-dev

On 15-01-2010 00:34:08 -0500, Mike Frysinger wrote:
> On Tuesday 16 December 2008 18:46:44 Jeremy Olexa wrote:
> > Exhibit A:
> > http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/python.eclass?r1=1.4
> > 8&r2=1.49
> > 
> > This causes me pain on my hosts that don't have >=bash-3.1[0] for
> > /bin/bash. Because I can't install portage with an old bash until I
> > get a new python installed which uses python.eclass which isn't
> > supported with my /bin/bash (quite circular indeed)
> > 
> > Technically there are workarounds for me...but it is still annoying.
> > So...what do we do? A) Specifically allow >=bash-3.1 features in
> > ebuilds/eclasses. or B) revert the commit because the PMS says[1] that
> > we comply with >bash-3.0
> > 
> > Please discuss, thanks.
> 
> btw, latest python.eclass requires bash-3.2+ due to parsing errors in the
> regex checks:
> $ bash-3.1 -c '[[ a =~ ^(a|b)$ ]]'
> bash-3.1: -c: line 0: syntax error in conditional expression: unexpected token `('
> bash-3.1: -c: line 0: syntax error near `^(a'
> 
> we could quote these or require bash-3.2+ ...

We actually don't require (vanilla) bash 3.2, but bash-3.2.48 (Gentoo patches don't matter iirc) for our tree.  IMO we should explicitly state this instead of requiring "bash-3.2" which just doesn't work.


-- 
Fabian Groffen
Gentoo on a different level



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [gentoo-dev] Re: bash version in ebuilds/eclasses...non-compliance and what to do?
  2010-01-15  5:34 ` [gentoo-dev] " Mike Frysinger
  2010-01-15 10:46   ` Fabian Groffen
@ 2010-01-15 15:13   ` Christian Faulhammer
  1 sibling, 0 replies; 8+ messages in thread
From: Christian Faulhammer @ 2010-01-15 15:13 UTC (permalink / raw
  To: Gentoo Development

[-- Attachment #1: Type: text/plain, Size: 671 bytes --]

Hi,

Mike Frysinger <vapier@gentoo.org>:
> btw, latest python.eclass requires bash-3.2+ due to parsing errors in
> the regex checks:
> $ bash-3.1 -c '[[ a =~ ^(a|b)$ ]]'
> bash-3.1: -c: line 0: syntax error in conditional expression:
> unexpected token `(' bash-3.1: -c: line 0: syntax error near `^(a'
> 
> we could quote these or require bash-3.2+ ...

 We discussed it briefly on the -pms mailing list [1].

V-Li
[1]http://archives.gentoo.org/gentoo-pms/msg_f4fee4c3a79ae4f37eaf4c4ebce6aafe.xml

-- 
Christian Faulhammer, Gentoo Lisp project
<URL:http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode

<URL:http://gentoo.faulhammer.org/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-01-15 15:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-16 23:46 [gentoo-dev] bash version in ebuilds/eclasses...non-compliance and what to do? Jeremy Olexa
2008-12-20  5:35 ` [gentoo-dev] " Steve Long
2008-12-20  9:42   ` Fabian Groffen
2008-12-24 11:31     ` [gentoo-dev] " Steve Long
2008-12-20 13:54   ` [gentoo-dev] " Ciaran McCreesh
2010-01-15  5:34 ` [gentoo-dev] " Mike Frysinger
2010-01-15 10:46   ` Fabian Groffen
2010-01-15 15:13   ` [gentoo-dev] " Christian Faulhammer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox