summary refs log tree commit diff
path: root/pkgs/shells
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2006-10-25 12:38:57 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2006-10-25 12:38:57 +0000
commit4f03dec496afc166813e4233afbf864903840fb5 (patch)
treed44804fc885398f62a690a3ac4bc3b73d72fcffb /pkgs/shells
parent02254ec3d8607cd5dc4f50a120cede4fcb4ed081 (diff)
downloadnixlib-4f03dec496afc166813e4233afbf864903840fb5.tar
nixlib-4f03dec496afc166813e4233afbf864903840fb5.tar.gz
nixlib-4f03dec496afc166813e4233afbf864903840fb5.tar.bz2
nixlib-4f03dec496afc166813e4233afbf864903840fb5.tar.lz
nixlib-4f03dec496afc166813e4233afbf864903840fb5.tar.xz
nixlib-4f03dec496afc166813e4233afbf864903840fb5.tar.zst
nixlib-4f03dec496afc166813e4233afbf864903840fb5.zip
* Patch for a critical bug in bash.
svn path=/nixpkgs/trunk/; revision=6848
Diffstat (limited to 'pkgs/shells')
-rw-r--r--pkgs/shells/bash/bash32-001.patch47
-rw-r--r--pkgs/shells/bash/default.nix13
2 files changed, 58 insertions, 2 deletions
diff --git a/pkgs/shells/bash/bash32-001.patch b/pkgs/shells/bash/bash32-001.patch
new file mode 100644
index 000000000000..9f8a885df1f2
--- /dev/null
+++ b/pkgs/shells/bash/bash32-001.patch
@@ -0,0 +1,47 @@
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release: 3.2
+Patch-ID: bash32-001
+
+Bug-Reported-by:	Greg Schafer <gschafer@zip.com.au>
+Bug-Reference-ID:	<20061012084940.GA15768@tigers.local>
+Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2006-10/msg00046.html
+
+Bug-Description:
+
+When using historical ``-style command substitution, bash incorrectly attempts
+to interpret shell comments while scanning for the closing backquote.
+
+Patch:
+
+*** bash-3.2/parse.y	Tue Sep 19 16:37:21 2006
+--- new-bash/parse.y	Thu Oct 12 10:30:57 2006
+***************
+*** 2736,2740 ****
+    count = 1;
+    pass_next_character = backq_backslash = was_dollar = in_comment = 0;
+!   check_comment = (flags & P_COMMAND) && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0;
+  
+    /* RFLAGS is the set of flags we want to pass to recursive calls. */
+--- 2736,2740 ----
+    count = 1;
+    pass_next_character = backq_backslash = was_dollar = in_comment = 0;
+!   check_comment = (flags & P_COMMAND) && qc != '`' && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0;
+  
+    /* RFLAGS is the set of flags we want to pass to recursive calls. */
+*** bash-3.2/patchlevel.h	Thu Apr 13 08:31:04 2006
+--- new-bash/patchlevel.h	Mon Oct 16 14:22:54 2006
+***************
+*** 26,30 ****
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 0
+  
+  #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 1
+  
+  #endif /* _PATCHLEVEL_H_ */
diff --git a/pkgs/shells/bash/default.nix b/pkgs/shells/bash/default.nix
index 64f996cc0e5a..17e71f2fcc2f 100644
--- a/pkgs/shells/bash/default.nix
+++ b/pkgs/shells/bash/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl}:
+{stdenv, fetchurl, bison}:
 
 stdenv.mkDerivation {
   name = "bash-3.2";
@@ -8,7 +8,16 @@ stdenv.mkDerivation {
     md5 = "00bfa16d58e034e3c2aa27f390390d30";
   };
 
-  patches = [./winsize.patch];
+  patches = [
+    # Fix a nasty bug in bash-3.2.
+    ./bash32-001.patch
+  
+    # For dietlibc builds.
+    ./winsize.patch
+  ];
+
+  # !!! only needed for bash-3.2 (because of bash32-001.patch)
+  buildInputs = [bison]; 
 
   meta = {
     description = "GNU Bourne-Again Shell, the de facto standard shell on Linux";