Re: shells/bash-4.0 port horribly broken

2009-03-16 Thread matt donovan
On Thu, Mar 12, 2009 at 10:31 PM, David O'Brien  wrote:

> On Thu, Mar 12, 2009 at 12:48:09PM +0100, Stefan Bethke wrote:
> >> The update still remains broken:
> >> [r...@portjail ~]$ echo $(uname)
> >> -bash: command substitution: line 25: syntax error near unexpected token
> >> `)'
> >> -bash: command substitution: line 25: `uname)'
> >
> > I also find this rather annoying.  I believe that a rather large
> percentage
> > of people use bash as their default shell, so moving from 3.2 to 4.0
> should
> > have been preceded by a headsup or an entry in UPDATING.
>
> I didn't have issues with my ~/.bashrc when I updated from 3.2 to 4.0 so
> I didn't notice this issue.  (guess I'm too old school and use "`"'s).
>
> --
> -- David  (obr...@freebsd.org)
> ___
> freebsd-ports@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
>

I m not sure if the bash-4.0 port has the current patchset but I know it
fixes some issues with $()
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: shells/bash-4.0 port horribly broken

2009-03-12 Thread David O'Brien
On Thu, Mar 12, 2009 at 12:48:09PM +0100, Stefan Bethke wrote:
>> The update still remains broken:
>> [r...@portjail ~]$ echo $(uname)
>> -bash: command substitution: line 25: syntax error near unexpected token 
>> `)'
>> -bash: command substitution: line 25: `uname)'
> 
> I also find this rather annoying.  I believe that a rather large percentage 
> of people use bash as their default shell, so moving from 3.2 to 4.0 should 
> have been preceded by a headsup or an entry in UPDATING.

I didn't have issues with my ~/.bashrc when I updated from 3.2 to 4.0 so
I didn't notice this issue.  (guess I'm too old school and use "`"'s).

-- 
-- David  (obr...@freebsd.org)
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: shells/bash-4.0 port horribly broken

2009-03-12 Thread bf


> By any chance, did you commit a Send-PR for this patch? I will
> try the patch later tonight anyway.

> Thanks!

I've submitted a slightly revised patch in a follow-up to an old
PR:

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=ports/101230

It turns out that some of the parser problems with the new port
were noticed with earlier versions, but the maintainer decided
to be conservative and chose not to address them then.

b.


  
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: shells/bash-4.0 port horribly broken

2009-03-12 Thread Emanuel Haupt
> Yes, I can confirm on my system (8-CURRENT i386), switching
> the port from system yacc to bison 2.x solves the
> command substitution problem.  Try the attached patch.

I confirm that this patch solves the problem.

Emanuel


pgpQk4iOQmYKE.pgp
Description: PGP signature


Re: shells/bash-4.0 port horribly broken

2009-03-12 Thread Jerry
On Thu, 12 Mar 2009 14:18:28 -0700 (PDT)
bf  wrote:

>--- On Thu, 3/12/09, bf  wrote:
>> Hang on guys, we're looking into it.  The upstream
>> maintainer
>> confirms that failures in command substitutions are _not_
>> the
>> expected behavior of bash 4.x, that they are not being
>> observed on
>> many other systems, and that in the past similar problems
>> like
>> this have been connected with problems in bison, so maybe
>> our use
>> of system yacc has something to do with it.
>> 
>> The point about running the testsuite is well-taken.
>> 
>> b.
>
>Yes, I can confirm on my system (8-CURRENT i386), switching
>the port from system yacc to bison 2.x solves the
>command substitution problem.  Try the attached patch.

By any chance, did you commit a Send-PR for this patch? I will try the
patch later tonight anyway.

Thanks!

-- 
Jerry
ges...@yahoo.com

George Orwell 1984.  Northwestern 0.

Chicago Reader 10/15/82


signature.asc
Description: PGP signature


Re: shells/bash-4.0 port horribly broken

2009-03-12 Thread bf
--- On Thu, 3/12/09, bf  wrote:

> From: bf 
> Subject: Re: shells/bash-4.0 port horribly broken
> To: freebsd-ports@FreeBSD.org
> Cc: obr...@freebsd.org
> Date: Thursday, March 12, 2009, 4:48 PM
> Hang on guys, we're looking into it.  The upstream
> maintainer
> confirms that failures in command substitutions are _not_
> the
> expected behavior of bash 4.x, that they are not being
> observed on
> many other systems, and that in the past similar problems
> like
> this have been connected with problems in bison, so maybe
> our use
> of system yacc has something to do with it.
> 
> The point about running the testsuite is well-taken.
> 
> b.


Yes, I can confirm on my system (8-CURRENT i386), switching
the port from system yacc to bison 2.x solves the
command substitution problem.  Try the attached patch.

b.


  diff -ruN bash.orig/Makefile bash/Makefile
--- bash.orig/Makefile  2009-03-12 05:54:01.0 -0400
+++ bash/Makefile   2009-03-12 16:40:28.539057000 -0400
@@ -3,13 +3,13 @@
 # Date created:30 Jul 2004
 # Whom:Oliver Eikemeier
 #
-# $FreeBSD: ports/shells/bash/Makefile,v 1.110 2009/03/12 09:54:01 osa Exp $
+# $FreeBSD: ports/shells/bash/Makefile,v 1.107 2009/03/11 17:00:37 obrien Exp $
 #
 
 PORTNAME=  bash
 PATCHLEVEL=10
 PORTVERSION=   4.0.${PATCHLEVEL:S/^0//g}
-PORTREVISION?= 1
+PORTREVISION?= 2
 CATEGORIES=shells
 MASTER_SITES=  ${MASTER_SITE_GNU:S/$/:bash/} \
ftp://ftp.cwru.edu/pub/%SUBDIR%/:faq
@@ -43,6 +43,7 @@
 MAN1=  bash.1 bashbug.1
 INFO=  bash
 
+USE_BISON= yes
 GNU_CONFIGURE= yes
 
 .if !defined(NOPORTDOCS)
@@ -91,8 +92,7 @@
 LDFLAGS+=  -L${LOCALBASE}/lib
 
 CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \
-   LDFLAGS="${LDFLAGS}" \
-   YACC="${YACC}"
+   LDFLAGS="${LDFLAGS}"
 
 .include 
 
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Re: shells/bash-4.0 port horribly broken

2009-03-12 Thread Jerry
On Thu, 12 Mar 2009 13:48:47 -0700 (PDT)
bf  wrote:

>Hang on guys, we're looking into it.  The upstream maintainer
>confirms that failures in command substitutions are _not_ the
>expected behavior of bash 4.x, that they are not being observed on
>many other systems, and that in the past similar problems like
>this have been connected with problems in bison, so maybe our use
>of system yacc has something to do with it.
>
>The point about running the testsuite is well-taken.
>
>b. 

I have filed a bug-report with bash about this. So far, I have received
one reply with a request for further information. So, I guess someone is
at least working on it.

-- 
Jerry
ges...@yahoo.com


signature.asc
Description: PGP signature


Re: shells/bash-4.0 port horribly broken

2009-03-12 Thread bf

Hang on guys, we're looking into it.  The upstream maintainer
confirms that failures in command substitutions are _not_ the
expected behavior of bash 4.x, that they are not being observed on
many other systems, and that in the past similar problems like
this have been connected with problems in bison, so maybe our use
of system yacc has something to do with it.

The point about running the testsuite is well-taken.

b. 


  
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: shells/bash-4.0 port horribly broken

2009-03-12 Thread Christian Weisgerber
Emanuel Haupt  wrote:

> The update still remains broken:
> 
> [foo...@portjail ~]$ pkg_info 
> bash-static-4.0.10_1 The GNU Project's Bourne Again SHell
> 
> [r...@portjail ~]$ set -x
> [r...@portjail ~]$ echo $(uname)
> -bash: command substitution: line 25: syntax error near unexpected token `)'
> -bash: command substitution: line 25: `uname)'

This breakage has been introduced somewhere in the first ten patches.
4.0.0 was fine.  Which is funny, considering that the patches claim
to fix some problems in that area.

Apparently nobody runs bash's included regression test suite either...

-- 
Christian "naddy" Weisgerber  na...@mips.inka.de

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: shells/bash-4.0 port horribly broken

2009-03-12 Thread Emanuel Haupt
> them work; however, I feel that the easiest thing would be to simply
> revert to Bash-3.

This is exactly what I did.

Emanuel
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: shells/bash-4.0 port horribly broken

2009-03-12 Thread Andrew W. Nosenko
On Thu, Mar 12, 2009 at 4:37 PM, Johan van Selst  wrote:
> Jerry wrote:
>> Was this some sort of 'improvement' by the Bash developers, or is it
>> an un-squashed bug?
>
> It seems that this might actually be a feature.
> Quoting the COMPAT document of bash4:
>
> 38. Since bash-4.0 now follows Posix rules for finding the closing delimiter
>of a $() command substitution, it will not behave as previous versions
>did, but will catch more syntax and parsing errors before spawning a
>subshell to evaluate the command substitution.

Sorry, but I didn't see how it can be applied.  In another words, how
the 'ls' command in the

$ echo $(ls)

contradicts with POSIX.

http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_03

With the $( command) form, all characters following the open
parenthesis to the matching closing parenthesis constitute the
command. Any valid shell script can be used for command,
except a script consisting solely of redirections which produces
unspecified results.

Sure, 'ls' is not a something that "consisting solely of redirections".

-- 
Andrew W. Nosenko 
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: shells/bash-4.0 port horribly broken

2009-03-12 Thread Alex Goncharov
,--- You/Jerry (Thu, 12 Mar 2009 10:30:15 -0400) *
| I am having the exact same problem. Several of my scripts are now
| failing. I have modified a few with the older "`" tic method to make
| them work; however, I feel that the easiest thing would be to simply
| revert to Bash-3.
|
| Was this some sort of 'improvement' by the Bash developers, or is it
| an un-squashed bug?

Breaking the $(command) substitution would be catastrophic and Bash
4.0 documentation claims support for it:

http://tiswww.case.edu/php/chet/bash/bashref.html

Bash Reference Manual

This text is a brief description of the features that are present in
the Bash shell (version 4.0, 29 December 2008).

This is Edition 4.0, last updated 29 December 2008, of The GNU Bash
Reference Manual, for Bash, Version 4.0.

3.5.4 Command Substitution

Command substitution allows the output of a command to replace the
command itself. Command substitution occurs when a command is enclosed
as follows: $(command)

or  `command`


Bash performs the expansion by executing command and replacing the
command substitution with the standard output of the command, with any
trailing newlines deleted. Embedded newlines are not deleted, but they
may be removed during word splitting. The command substitution $(cat
file) can be replaced by the equivalent but faster $(< file).

-- Alex -- alex-goncha...@comcast.net --

/*
 * Every time I lose weight, it finds me again!
 */
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: shells/bash-4.0 port horribly broken

2009-03-12 Thread Johan van Selst
Jerry wrote:
> Was this some sort of 'improvement' by the Bash developers, or is it
> an un-squashed bug?

It seems that this might actually be a feature.
Quoting the COMPAT document of bash4:

38. Since bash-4.0 now follows Posix rules for finding the closing delimiter
of a $() command substitution, it will not behave as previous versions
did, but will catch more syntax and parsing errors before spawning a
subshell to evaluate the command substitution.


Ciao,
Johan


pgpowQxOjpVNe.pgp
Description: PGP signature


Re: shells/bash-4.0 port horribly broken

2009-03-12 Thread Jerry
On Thu, 12 Mar 2009 12:48:09 +0100
Stefan Bethke  wrote:

>Am 12.03.2009 um 11:29 schrieb Emanuel Haupt:
>
 $ sudo make
 ===>  Vulnerability check disabled, database not found
 => bash-4.tar.gz is not in /usr/ports/shells/bash/distinfo.
 => Either /usr/ports/shells/bash/distinfo is out of date, or
 => bash-4.tar.gz is spelled incorrectly.
 *** Error code 1

 Stop in /usr/ports/shells/bash.
>>>
>>> Update: After a recent ports tree update bash now builds correctly
>>> here.
>>
>> The update still remains broken:
>>
>> [foo...@portjail ~]$ pkg_info
>> bash-static-4.0.10_1 The GNU Project's Bourne Again SHell
>>
>> [r...@portjail ~]$ set -x
>> [r...@portjail ~]$ echo $(uname)
>> -bash: command substitution: line 25: syntax error near unexpected  
>> token `)'
>> -bash: command substitution: line 25: `uname)'
>
>I also find this rather annoying.  I believe that a rather large  
>percentage of people use bash as their default shell, so moving from  
>3.2 to 4.0 should have been preceded by a headsup or an entry in  
>UPDATING.

I am having the exact same problem. Several of my scripts are now
failing. I have modified a few with the older "`" tic method to make
them work; however, I feel that the easiest thing would be to simply
revert to Bash-3.

Was this some sort of 'improvement' by the Bash developers, or is it an
un-squashed bug?

-- 
Jerry
ges...@yahoo.com




signature.asc
Description: PGP signature


Re: shells/bash-4.0 port horribly broken

2009-03-12 Thread Andrew W. Nosenko
On Thu, Mar 12, 2009 at 1:48 PM, Stefan Bethke  wrote:
> Am 12.03.2009 um 11:29 schrieb Emanuel Haupt:
>
 $ sudo make
 ===>  Vulnerability check disabled, database not found
 => bash-4.tar.gz is not in /usr/ports/shells/bash/distinfo.
 => Either /usr/ports/shells/bash/distinfo is out of date, or
 => bash-4.tar.gz is spelled incorrectly.
 *** Error code 1

 Stop in /usr/ports/shells/bash.
>>>
>>> Update: After a recent ports tree update bash now builds correctly
>>> here.
>>
>> The update still remains broken:
>>
>> [foo...@portjail ~]$ pkg_info
>> bash-static-4.0.10_1 The GNU Project's Bourne Again SHell
>>
>> [r...@portjail ~]$ set -x
>> [r...@portjail ~]$ echo $(uname)
>> -bash: command substitution: line 25: syntax error near unexpected token
>> `)'
>> -bash: command substitution: line 25: `uname)'
>
> I also find this rather annoying.  I believe that a rather large percentage
> of people use bash as their default shell, so moving from 3.2 to 4.0 should
> have been preceded by a headsup or an entry in UPDATING.

Hmm...  But record in UPDATING won't cure the bug itself.  Or error in
the parsing

$ echo $(ls)

construct is not a bug?  If it is not a bug but intended behavior,
then could someone point me to the appropriate part of documentation?

-- 
Andrew W. Nosenko 
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: shells/bash-4.0 port horribly broken

2009-03-12 Thread Stefan Bethke

Am 12.03.2009 um 11:29 schrieb Emanuel Haupt:


$ sudo make
===>  Vulnerability check disabled, database not found
=> bash-4.tar.gz is not in /usr/ports/shells/bash/distinfo.
=> Either /usr/ports/shells/bash/distinfo is out of date, or
=> bash-4.tar.gz is spelled incorrectly.
*** Error code 1

Stop in /usr/ports/shells/bash.


Update: After a recent ports tree update bash now builds correctly
here.


The update still remains broken:

[foo...@portjail ~]$ pkg_info
bash-static-4.0.10_1 The GNU Project's Bourne Again SHell

[r...@portjail ~]$ set -x
[r...@portjail ~]$ echo $(uname)
-bash: command substitution: line 25: syntax error near unexpected  
token `)'

-bash: command substitution: line 25: `uname)'


I also find this rather annoying.  I believe that a rather large  
percentage of people use bash as their default shell, so moving from  
3.2 to 4.0 should have been preceded by a headsup or an entry in  
UPDATING.



Stefan

--
Stefan BethkeFon +49 151 14070811




___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: shells/bash-4.0 port horribly broken

2009-03-12 Thread Emanuel Haupt
> > $ sudo make
> > ===>  Vulnerability check disabled, database not found
> > => bash-4.tar.gz is not in /usr/ports/shells/bash/distinfo.
> > => Either /usr/ports/shells/bash/distinfo is out of date, or
> > => bash-4.tar.gz is spelled incorrectly.
> > *** Error code 1
> > 
> > Stop in /usr/ports/shells/bash.
> 
> Update: After a recent ports tree update bash now builds correctly
> here.

The update still remains broken:

[foo...@portjail ~]$ pkg_info 
bash-static-4.0.10_1 The GNU Project's Bourne Again SHell

[r...@portjail ~]$ set -x
[r...@portjail ~]$ echo $(uname)
-bash: command substitution: line 25: syntax error near unexpected token `)'
-bash: command substitution: line 25: `uname)'
[r...@portjail ~]$ echo $(uptime)
-bash: command substitution: line 26: syntax error near unexpected token `)'
-bash: command substitution: line 26: `uptime)'
[r...@portjail ~]$ echo $(ls)
-bash: command substitution: line 27: syntax error near unexpected token `)'
-bash: command substitution: line 27: `ls)'

however, backticks work:

[r...@portjail ~]$ echo `uname`
++ uname
+ echo FreeBSD
FreeBSD

Also, shells/bash now conflicts with shells/bash-completion which
it shouldn't.

Emanuel

-- 
GnuPG key id: 0x90215DB9 Download: http://pgp.mit.edu:11371
Key fingerprint: 741B C70F 100B F360 0B52  E92D 5F01 7A86 9021 5DB9
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: shells/bash-4.0 port horribly broken

2009-03-12 Thread andrew clarke
On Thu 2009-03-12 08:03:23 UTC+1100, andrew clarke (m...@ozzmosis.com) wrote:

> $ sudo make
> ===>  Vulnerability check disabled, database not found
> => bash-4.tar.gz is not in /usr/ports/shells/bash/distinfo.
> => Either /usr/ports/shells/bash/distinfo is out of date, or
> => bash-4.tar.gz is spelled incorrectly.
> *** Error code 1
> 
> Stop in /usr/ports/shells/bash.

Update: After a recent ports tree update bash now builds correctly here.

Thanks again :)
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


shells/bash-4.0 port horribly broken

2009-03-11 Thread andrew clarke
Apologies in advance if this is already fixed...

$ uname -a
FreeBSD blizzard.phoenix 6.4-RELEASE-p1 FreeBSD 6.4-RELEASE-p1 #0: Sun
Dec 21 07:56:41 UTC 2008
r...@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386

$ sudo portsnap fetch update
Looking up portsnap.FreeBSD.org mirrors... 3 mirrors found.
Fetching snapshot tag from portsnap1.FreeBSD.org... done.
Latest snapshot on server matches what we already have.
No updates needed.
Ports tree is already up to date.

$ sudo make
===>  Vulnerability check disabled, database not found
=> bash-4.tar.gz is not in /usr/ports/shells/bash/distinfo.
=> Either /usr/ports/shells/bash/distinfo is out of date, or
=> bash-4.tar.gz is spelled incorrectly.
*** Error code 1

Stop in /usr/ports/shells/bash.

$ portlint
FATAL: Makefile: extra item "PATCHLEVEL" placed in the PORTNAME section.
FATAL: Package conflicts with itself. You should remove
"bash-[0-24-9].*" from CONFLICTS.
WARN: Makefile: "PKGNAMESUFFIX" has to appear earlier.
WARN: Found IGNOREFILES. It is not recomended.
FATAL: /usr/ports/shells/bash/distinfo: has no SIZE record for
bash/bash-4.tar.gz.
FATAL: -1: [no checksum record for bash/bash-4.tar.gz.]:
WARN: /usr/ports/shells/bash/distinfo: no checksum records for all
supported algorithms (SHA256 MD5) for bash/bash-4.tar.gz.
4 fatal errors and 3 warnings found.

Thanks,

Regards
Andrew
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"