From michiel@boland.org  Mon Dec 20 16:15:39 2004
Return-Path: <michiel@boland.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 9A50516A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 20 Dec 2004 16:15:39 +0000 (GMT)
Received: from smtp-vbr9.xs4all.nl (smtp-vbr9.xs4all.nl [194.109.24.29])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 75A9243D55
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 20 Dec 2004 16:15:38 +0000 (GMT)
	(envelope-from michiel@boland.org)
Received: from xs6.xs4all.nl (xs6.xs4all.nl [194.109.21.6])
	by smtp-vbr9.xs4all.nl (8.12.11/8.12.11) with ESMTP id iBKGFbfJ075712
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 20 Dec 2004 17:15:37 +0100 (CET)
	(envelope-from michiel@boland.org)
Received: from xs6.xs4all.nl (boland37@localhost.xs4all.nl [127.0.0.1])
	by xs6.xs4all.nl (8.12.10/8.12.10) with ESMTP id iBKGFapo006422
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 20 Dec 2004 17:15:36 +0100 (CET)
	(envelope-from michiel@boland.org)
Received: (from boland37@localhost)
	by xs6.xs4all.nl (8.12.10/8.12.9/Submit) id iBKGFaIQ006421
	for FreeBSD-gnats-submit@freebsd.org; Mon, 20 Dec 2004 17:15:36 +0100 (CET)
	(envelope-from michiel@boland.org)
Message-Id: <200412201615.iBKGFaIQ006421@xs6.xs4all.nl>
Date: Mon, 20 Dec 2004 17:15:36 +0100 (CET)
From: Michiel Boland <michiel@boland.org>
To: FreeBSD-gnats-submit@freebsd.org
Subject: shells/bash2 is broken on -CURRENT
X-Send-Pr-Version: 3.113

>Number:         75315
>Category:       ports
>Synopsis:       the shells/bash2 port is broken on -CURRENT
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    lawrance
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 20 16:20:22 GMT 2004
>Closed-Date:    Fri Oct 20 08:08:25 GMT 2006
>Last-Modified:  Fri Oct 20 08:08:25 GMT 2006
>Originator:     Michiel Boland
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD leefnet.office.internl.net 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Fri Dec 10 13:49:33 CET 2004 root@leefnet.office.internl.net:/usr/obj/usr/src/sys/LEEFNET i386


	
>Description:
The shells/bash2 port is broken on -CURRENT.
To be precise, it was broken by the import of GNU Readline 5.0
in src/contrib and the addition of the 'timestamp' member to the
HIST_ENTRY structure.
The brokenness manifests itself in coredumps (see How-To-Repeat section.)
>How-To-Repeat:
At the shell prompt, type a command that spans multiple lines, like
$ echo '
'
Then bring back the previous line using ^P and press enter.
>Fix:
To fix the particular coredump mentioned above, rebuild the port as
follows: do 'make extract', then
cp /usr/include/readline/history.h ./work/bash-2.05b/lib/readline/.
and then continue the make.
Obviously this is not a real fix that would give a person a warm, fuzzy
feeling.

>Release-Note:
>Audit-Trail:

From: Michiel Boland <michiel@boland.org>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org
Cc:  
Subject: Re: ports/75315: shells/bash2 is broken on -CURRENT
Date: Tue, 21 Dec 2004 08:45:05 +0100

 > http://www.freebsd.org/cgi/query-pr.cgi?pr=75315
 
 Another workaround would be to use the bundled readline, as in
 
 Index: Makefile
 ===================================================================
 RCS file: /usr/ncvs/ports/shells/bash2/Makefile,v
 retrieving revision 1.74
 diff -u -r1.74 Makefile
 --- Makefile	27 Oct 2004 22:13:04 -0000	1.74
 +++ Makefile	21 Dec 2004 07:35:59 -0000
 @@ -35,7 +35,6 @@
  USE_REINPLACE=	yes
  WRKSRC=		${WRKDIR}/bash-${PORTVERSION:C/\....$//}
  GNU_CONFIGURE=	Yes
 -CONFIGURE_ARGS=	--with-installed-readline
  .if defined(WANT_STATIC_BASH) || defined(NO_DYNAMICROOT) || (defined(NOSHARED) && ( ${NOSHARED} != "no" && ${NOSHARED} != "NO" ))
  CONFIGURE_ARGS+= --enable-static-link
  .else
 
 The above patch needs to be modified of course to preserve the working
 setup for RELENG_5 etc, but I don't know how to do that.
 
 The bash port is not broken, so another thing would be to
 deinstall bash2 and use bash instead. (Why do I always discover things
 like this right after I submit a PR.)
Responsible-Changed-From-To: freebsd-ports-bugs->obrien 
Responsible-Changed-By: sem 
Responsible-Changed-When: Tue Dec 21 22:32:13 GMT 2004 
Responsible-Changed-Why:  
His port 

http://www.freebsd.org/cgi/query-pr.cgi?pr=75315 

From: Garance A Drosehn <gad@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org, michiel@boland.org
Cc:  
Subject: Re: ports/75315: the shells/bash2 port is broken on -CURRENT
Date: Sat, 26 Feb 2005 22:20:30 -0500

 I just thought I would confirm that I run into this problem
 very frequently, both on 5.x and 6.x systems.  Here are two
 more simple ways to trigger it:
 
 Type:
 
 echo aaa \
 bbb
 
 then cursor-up and re-enter that line from history.
 
 Type:
 
 for fname in * ; do
 echo $fname
 done
 
 When you enter the 'for', bash will come back with the '>'
 prompt asking for the rest of your for loop.  After you
 are done entering it, then cursor-up, and re-enter the
 'for' loop.  bash2 will core-dump.  This is the situation
 that nails me the most, because I always type in a test
 'for' loop to make sure the loop will do exactly what I
 want it to do, and then I re-enter enter the 'for' loop
 after changing it (usually to delete 'echo' in front of
 some command-lines).
 
 I tried copying /usr/include/readline/history.h into the
 work directory (after doing 'make patch'), and that did
 seem to solve the problem.  I imagine the real fix will
 need to be more complicated, to avoid breaking bash2 on
 3.x or 4.x systems when fixing it for 5.x and 6.x systems.
 
 -- 
 Garance Alistair Drosehn     =      gad@gilead.netel.rpi.edu
 Senior Systems Programmer               or   gad@FreeBSD.org
 Rensselaer Polytechnic Institute;             Troy, NY;  USA

From: Garance A Drosehn <gad@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org, michiel@boland.org
Cc:  
Subject: Re: ports/75315: the shells/bash2 port is broken on -CURRENT
Date: Sat, 26 Feb 2005 22:25:44 -0500

 Oops.  This is apparently only a problem on 6.x systems.  I
 had tested on my usual 5.x testing-system, but now I notice
 that that-system is presently booted up in 6.x...
 
 -- 
 Garance Alistair Drosehn     =      gad@gilead.netel.rpi.edu
 Senior Systems Programmer               or   gad@FreeBSD.org
 Rensselaer Polytechnic Institute;             Troy, NY;  USA

From: "Mike Jakubik" <mikej@rogers.com>
To: freebsd-gnats-submit@FreeBSD.org, michiel@boland.org
Cc:  
Subject: Re: ports/75315: the shells/bash2 port is broken on -CURRENT
Date: Wed, 6 Apr 2005 18:00:41 -0400 (EDT)

 The problem goes away for me if i
 recompile and reinstall /usr/src/contrib/libreadline,
 /usr/src/gnu/lib/libreadline/ with these CFLAGs "-O -pipe -ggdb", followed
 by a recompile of bash2. The default CFLAGs are "-O2 -fno-strict-aliasing
 -pipe -march=athlon". Could this be a bug in libreadline/gcc due to
 over optimization?
 
 

From: Garance A Drosehn <gad@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/75315: the shells/bash2 port is broken on -CURRENT
Date: Thu, 7 Apr 2005 14:22:42 -0500

 As noted in my previous entries on this PR, the problem is in
 the bash2 port.  It is not in the gcc compiler.
 
 I do find it interesting that the problem apparently will go away
 if you recompile the system readline library with different CFLAGS,
 but the bash2 port *does* definitely have a version-skew problem
 with readline in the 6.x-current base system, and if you fix that
 problem then you will not need to change anything in the base
 system.
 
 -- 
 Garance Alistair Drosehn     =      gad@gilead.netel.rpi.edu
 Senior Systems Programmer               or   gad@FreeBSD.org
 Rensselaer Polytechnic Institute;             Troy, NY;  USA
Responsible-Changed-From-To: obrien->lawrance 
Responsible-Changed-By: lawrance 
Responsible-Changed-When: Fri Dec 16 14:10:01 UTC 2005 
Responsible-Changed-Why:  
Problem confirmed on 6.x, I'll have a stab at fixing it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=75315 

From: Arseny Nasokin <tarc@tarc.po.cs.msu.su>
To: bug-followup@FreeBSD.org, Arseny Nasokin <tarc@tarc.po.cs.msu.su>,
        lawrance@FreeBSD.org, Michiel Boland <michiel@boland.org>
Cc:  
Subject: Re: ports/75315 : the shells/bash2 port is broken on -CURRENT
Date: Fri, 30 Jun 2006 06:46:23 +0400

 I have no problems on todays -CURRENT without any make.conf hints (__MAKE_CONF=/dev/null)
 
 I simply compile port. All crash-tests listed above doesn't fails.
 Should it be closed?!

From: Michiel Boland <michiel@boland.org>
To: Arseny Nasokin <tarc@tarc.po.cs.msu.su>
Cc: bug-followup@FreeBSD.org, lawrance@FreeBSD.org
Subject: Re: ports/75315 : the shells/bash2 port is broken on -CURRENT
Date: Sun, 2 Jul 2006 16:32:14 +0200 (MEST)

 > I simply compile port. All crash-tests listed above doesn't fails.
 > Should it be closed?!
 
 echo '
 '
 <cursor up>
 <enter>
 
 still crashes over here (7.0-CURRENT, bash-2.05b.007_4)

From: Sam Lawrance <boris@brooknet.com.au>
To: bug-followup@FreeBSD.org,  michiel@boland.org
Cc:  
Subject: Re: ports/75315: the shells/bash2 port is broken on -CURRENT
Date: Sun, 15 Oct 2006 01:30:47 +1000

 bash2 is a bit weird.  Even though you get the option of using a 
 preinstalled version of readline, the build stupidly still uses bundled 
 readline files.
 
 I'm considering the following changes to the port:
 
 1. When patching, delete the bundled copy of readline in 
 bash-2.05b/lib/readline.  Add an empty Makefile.in just to keep 
 configure from breaking.
 2. Edit the bash-2.05b/Makefile.in so that RL_LIBSRC and HIST_LIBSRC 
 point to /usr/include/readline.
 
 I'm a bit worried about whether this change will cause undesired 
 effects. OTOH, the port is currently building with mismatched headers, 
 so it probably can't get much worse.
 

From: Sam Lawrance <lawrance@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/75315: the shells/bash2 port is broken on -CURRENT
Date: Mon, 16 Oct 2006 22:15:38 +1000

 Noting that a patch is available at 
 http://people.freebsd.org/~lawrance/patch-bash2 so that it doesn't get 
 lost while the ports freeze is on.
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/75315: commit references a PR
Date: Fri, 20 Oct 2006 07:57:56 +0000 (UTC)

 lawrance    2006-10-20 07:55:54 UTC
 
   FreeBSD ports repository
 
   Modified files:
     shells/bash2         Makefile 
   Log:
   bash2 links against the system readline, so patch it to build with the
   system readline headers too.  This prevents segfaults due to certain
   key sequences.
   
   PR:             ports/75315
   Submitted by:   Michiel Boland
   Approved by:    portmgr (marcus)
   Approved by:    obrien (maintainer, timeout 22 months)
   
   Revision  Changes    Path
   1.83      +4 -1      ports/shells/bash2/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: lawrance 
State-Changed-When: Fri Oct 20 08:07:54 UTC 2006 
State-Changed-Why:  
Patch committed to build bash2 with system headers. 

Thanks all. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=75315 
>Unformatted:
