From a76707e813b56ed367c0683ad7e2e4a06248c5d2 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 1 Aug 2024 14:17:37 +0100 Subject: [PATCH 1/2] bash: 5.2p26 -> 5.2p32 Replace one patch with its upstream version. --- pkgs/shells/bash/5.nix | 5 ----- pkgs/shells/bash/bash-5.2-patches.nix | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/shells/bash/5.nix b/pkgs/shells/bash/5.nix index 395fffe293fc..e36d69593bd3 100644 --- a/pkgs/shells/bash/5.nix +++ b/pkgs/shells/bash/5.nix @@ -57,11 +57,6 @@ stdenv.mkDerivation rec { patches = upstreamPatches ++ [ ./pgrp-pipe-5.patch - (fetchurl { - name = "fix-static.patch"; - url = "https://cgit.freebsd.org/ports/plain/shells/bash/files/patch-configure?id=3e147a1f594751a68fea00a28090d0792bee0b51"; - sha256 = "XHFMQ6eXTReNoywdETyrfQEv1rKF8+XFbQZP4YoVKFk="; - }) # Apply parallel build fix pending upstream inclusion: # https://savannah.gnu.org/patch/index.php?10373 # Had to fetch manually to workaround -p0 default. diff --git a/pkgs/shells/bash/bash-5.2-patches.nix b/pkgs/shells/bash/bash-5.2-patches.nix index 5d5ef94676de..fb4c9c4e3678 100644 --- a/pkgs/shells/bash/bash-5.2-patches.nix +++ b/pkgs/shells/bash/bash-5.2-patches.nix @@ -27,4 +27,10 @@ patch: [ (patch "024" "1hq23djqbr7s9y2324jq9mxr5bwdkmgizn3zgpchbsqp054k85cp") (patch "025" "0x9hc4silzl4d3zw4p43i5dm7w86k50j47f87lracwfgwy3z8f2i") (patch "026" "1b1fhm1dsi67r8ip17s0xvx2qq31fsxc1g9n3r931dd0k9a1zvln") +(patch "027" "0fdbhvs9dkf4knncifh98a76q4gylhyvfrffq5p9q3ag5q58jap1") +(patch "028" "1hdacd6sssjshmry1sscdnxxfb2r51bvdyghlfjaqgc9l85phhk0") +(patch "029" "11wrlb20w6v89b96krg0gwxipwhvrda6rq1y9f972m32gsrsqp0j") +(patch "030" "13v9fqgim082dmvkslsr0hs793yzhsij2s91mjswsfhj1qip7zy3") +(patch "031" "15d7rddj6spwc1fy997lxx6zvzq0zbxgf2h20mhi4wgp5nzbglf2") +(patch "032" "05ia6yf32hjprmyyxqawhgckxs3684ikfx8xg08zfgx9xkd7g73v") ] From b62cfa99c3583b5c77490b0875390d0d813706a5 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 1 Aug 2024 14:21:50 +0100 Subject: [PATCH 2/2] bash: add upstream fix for `pop_var_context` error Closes: #214822 --- pkgs/shells/bash/5.nix | 2 ++ .../shells/bash/fix-pop-var-context-error.patch | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 pkgs/shells/bash/fix-pop-var-context-error.patch diff --git a/pkgs/shells/bash/5.nix b/pkgs/shells/bash/5.nix index e36d69593bd3..b2167b9ef7fa 100644 --- a/pkgs/shells/bash/5.nix +++ b/pkgs/shells/bash/5.nix @@ -61,6 +61,8 @@ stdenv.mkDerivation rec { # https://savannah.gnu.org/patch/index.php?10373 # Had to fetch manually to workaround -p0 default. ./parallel.patch + # Fix `pop_var_context: head of shell_variables not a function context`. + ./fix-pop-var-context-error.patch ]; configureFlags = [ diff --git a/pkgs/shells/bash/fix-pop-var-context-error.patch b/pkgs/shells/bash/fix-pop-var-context-error.patch new file mode 100644 index 000000000000..1b8d5ae20b31 --- /dev/null +++ b/pkgs/shells/bash/fix-pop-var-context-error.patch @@ -0,0 +1,17 @@ +Excerpted from . + +Original author: Chet Ramey + +--- variables.c ++++ variables.c +@@ -5413,7 +5413,9 @@ pop_var_context () + vcxt = shell_variables; + if (vc_isfuncenv (vcxt) == 0) + { +- internal_error (_("pop_var_context: head of shell_variables not a function context")); ++ /* If we haven't flushed all of the local contexts already, flag an error */ ++ if (shell_variables != global_variables || variable_context > 0) ++ internal_error (_("pop_var_context: head of shell_variables not a function context")); + return; + } +