bash: enable PGRP_PIPE deterministically #77055

wip/yesman
Arnout Engelen 4 years ago committed by Frederik Rietdijk
parent 320a4c1526
commit 996e11d92b
  1. 3
      pkgs/shells/bash/4.4.nix
  2. 5
      pkgs/shells/bash/5.0.nix
  3. 29
      pkgs/shells/bash/pgrp-pipe-4.4.patch
  4. 31
      pkgs/shells/bash/pgrp-pipe-5.0.patch

@ -41,9 +41,10 @@ stdenv.mkDerivation rec {
-DSSH_SOURCE_BASHRC
'';
patchFlags = [ "-p0" ];
patchFlags = [ "-p0" "-T" ];
patches = upstreamPatches
++ [ ./pgrp-pipe-4.4.patch ]
++ optional stdenv.hostPlatform.isCygwin ./cygwin-bash-4.4.11-2.src.patch
# https://lists.gnu.org/archive/html/bug-bash/2016-10/msg00006.html
++ optional stdenv.hostPlatform.isMusl (fetchurl {

@ -41,9 +41,10 @@ stdenv.mkDerivation rec {
-DSSH_SOURCE_BASHRC
'';
patchFlags = [ "-p0" ];
patchFlags = [ "-p0" "-T" ];
patches = upstreamPatches;
patches = upstreamPatches
++ [ ./pgrp-pipe-5.0.patch ];
configureFlags = [
(if interactive then "--with-installed-readline" else "--disable-readline")

@ -0,0 +1,29 @@
diff -u ./configure ../bash-4.4-fixed/configure
--- ./configure 2016-09-07 22:57:01.000000000 +0200
+++ ../bash-4.4-fixed/configure 2020-01-08 14:10:26.316858174 +0100
@@ -16064,10 +16064,7 @@
solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
- case "`uname -r`" in
- 2.[456789]*|[34]*) $as_echo "#define PGRP_PIPE 1" >>confdefs.h
- ;;
- esac ;;
+ $as_echo "#define PGRP_PIPE 1" >>confdefs.h ;;
*qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;;
*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
powerux*) LOCAL_LIBS="-lgen" ;;
diff -u ./configure.ac ../bash-4.4-fixed/configure.ac
--- ./configure.ac 2016-09-07 22:56:28.000000000 +0200
+++ ../bash-4.4-fixed/configure.ac 2016-09-07 22:56:28.000000000 +0200
@@ -1092,9 +1092,7 @@
solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
- case "`uname -r`" in
- 2.[[456789]]*|[[34]]*) AC_DEFINE(PGRP_PIPE) ;;
- esac ;;
+ AC_DEFINE(PGRP_PIPE) ;;
*qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;;
*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
powerux*) LOCAL_LIBS="-lgen" ;;

@ -0,0 +1,31 @@
diff -u ./configure ../bash-5.0-fixed/configure
--- ./configure 2019-01-02 15:43:31.000000000 +0100
+++ ../bash-5.0-fixed/configure 2020-01-08 14:18:21.017296179 +0100
@@ -16312,11 +16312,7 @@
solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
- case "`uname -r`" in
- 1.*|2.[0123]*) : ;;
- *) $as_echo "#define PGRP_PIPE 1" >>confdefs.h
- ;;
- esac ;;
+ $as_echo "#define PGRP_PIPE 1" >>confdefs.h ;;
netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;;
*qnx[67]*) LOCAL_LIBS="-lncurses" ;;
*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
diff -u ./configure.ac ../bash-5.0-fixed/configure.ac
--- ./configure.ac 2019-01-02 15:39:11.000000000 +0100
+++ ../bash-5.0-fixed/configure.ac 2019-01-02 15:39:11.000000000 +0100
@@ -1108,10 +1108,7 @@
solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
- case "`uname -r`" in
- 1.*|2.[[0123]]*) : ;;
- *) AC_DEFINE(PGRP_PIPE) ;;
- esac ;;
+ AC_DEFINE(PGRP_PIPE) ;;
netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;;
*qnx[[67]]*) LOCAL_LIBS="-lncurses" ;;
*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
Loading…
Cancel
Save