From aae36e6869162e97b6ff02b6bdfdeb23e55f3c5d Mon Sep 17 00:00:00 2001 From: Markus Napierkowski Date: Tue, 20 Dec 2022 17:29:59 +0100 Subject: [PATCH] bash: 5.1 -> 5.2 --- pkgs/shells/bash/{5.1.nix => 5.nix} | 21 +++++++++++---------- pkgs/shells/bash/bash-5.1-patches.nix | 20 -------------------- pkgs/shells/bash/bash-5.2-patches.nix | 19 +++++++++++++++++++ pkgs/shells/bash/pgrp-pipe-5.1.patch | 16 ---------------- pkgs/shells/bash/pgrp-pipe-5.patch | 15 +++++++++++++++ pkgs/top-level/all-packages.nix | 6 +++--- 6 files changed, 48 insertions(+), 49 deletions(-) rename pkgs/shells/bash/{5.1.nix => 5.nix} (85%) delete mode 100644 pkgs/shells/bash/bash-5.1-patches.nix create mode 100644 pkgs/shells/bash/bash-5.2-patches.nix delete mode 100644 pkgs/shells/bash/pgrp-pipe-5.1.patch create mode 100644 pkgs/shells/bash/pgrp-pipe-5.patch diff --git a/pkgs/shells/bash/5.1.nix b/pkgs/shells/bash/5.nix similarity index 85% rename from pkgs/shells/bash/5.1.nix rename to pkgs/shells/bash/5.nix index 458210873a68..6e16c083bc7c 100644 --- a/pkgs/shells/bash/5.1.nix +++ b/pkgs/shells/bash/5.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , buildPackages , fetchurl , binutils @@ -14,25 +15,25 @@ }: let - upstreamPatches = import ./bash-5.1-patches.nix (nr: sha256: fetchurl { - url = "mirror://gnu/bash/bash-5.1-patches/bash51-${nr}"; + upstreamPatches = import ./bash-5.2-patches.nix (nr: sha256: fetchurl { + url = "mirror://gnu/bash/bash-5.2-patches/bash52-${nr}"; inherit sha256; }); in stdenv.mkDerivation rec { name = "bash-${lib.optionalString interactive "interactive-"}${version}-p${toString (builtins.length upstreamPatches)}"; - version = "5.1"; + version = "5.2"; src = fetchurl { url = "mirror://gnu/bash/bash-${version}.tar.gz"; - sha256 = "1alv68wplnfdm6mh39hm57060xgssb9vqca4yr1cyva0c342n0fc"; + sha256 = "sha256-oTnBZt9/9EccXgczBRZC7lVWwcyKSnjxRVg8XIGrMvs="; }; hardeningDisable = [ "format" ] - # bionic libc is super weird and has issues with fortify outside of its own libc, check this comment: - # https://github.com/NixOS/nixpkgs/pull/192630#discussion_r978985593 - # or you can check libc/include/sys/cdefs.h in bionic source code - ++ lib.optional (stdenv.hostPlatform.libc == "bionic") "fortify"; + # bionic libc is super weird and has issues with fortify outside of its own libc, check this comment: + # https://github.com/NixOS/nixpkgs/pull/192630#discussion_r978985593 + # or you can check libc/include/sys/cdefs.h in bionic source code + ++ lib.optional (stdenv.hostPlatform.libc == "bionic") "fortify"; outputs = [ "out" "dev" "man" "doc" "info" ]; @@ -50,7 +51,7 @@ stdenv.mkDerivation rec { patchFlags = [ "-p0" ]; patches = upstreamPatches - ++ [ ./pgrp-pipe-5.1.patch ]; + ++ [ ./pgrp-pipe-5.patch ]; configureFlags = [ (if interactive then "--with-installed-readline" else "--disable-readline") diff --git a/pkgs/shells/bash/bash-5.1-patches.nix b/pkgs/shells/bash/bash-5.1-patches.nix deleted file mode 100644 index 41eb92710588..000000000000 --- a/pkgs/shells/bash/bash-5.1-patches.nix +++ /dev/null @@ -1,20 +0,0 @@ -# Automatically generated by `update-patch-set.sh'; do not edit. - -patch: [ -(patch "001" "1ymm8ppss6gyh9ifznjwiabrb4k91npd09c10y7mk66xp8yppc7b") -(patch "002" "1gjx9zqcm407am3n2sh44b8dxm48kgm15rzfiijqxr01m0hn3shm") -(patch "003" "1cdnpbfc64yhvkjj4d12s9ywp11g195vzfl1cab24sq55wkcrwi2") -(patch "004" "11iwhy6v562bv0kk7lwj7f5jj65ma9bblivy0v02h3ggcibbdbls") -(patch "005" "19bdyigdr81824nxvqr6a7k0cax60wq7376j6b91afbnwvlvbjyc") -(patch "006" "051x8wlwrqk0yr0zg378vh824iklfl5g9pkmcdf62qp8gn9pvqbm") -(patch "007" "0fir80pp1gmlpadmqcgkrv4y119pc7xllchjzg05fd7px73viz5c") -(patch "008" "1lfjgshk8i9vch92p5wgc9r90j3phw79aa7gbai89w183b2z6b7j") -(patch "009" "1vn36dzd9g4y1h3jiss6418crla0rbcd0d6wwsyv9d5l7aaxlp74") -(patch "010" "0amfmvbzsand7bdypylkjdpcp88fa3cplfshn7vyzv2ff2rdgj52") -(patch "011" "0yq24abb4fzfxqnwl20b330sxl9lr9ds0nc4yi30f81l94b1y6aq") -(patch "012" "165bff97ffih49vfs4mkr5w3z5gn1w6zfyrf773iajkw6v48kw8h") -(patch "013" "1bfmgv3lagbk3aq9a831d29xv7jz4sjq7jhn9hq89limyinvdb67") -(patch "014" "1l43dw4kpddn7l41i8wmj406z9abxky1wb3rk8krcys33g4f0kka") -(patch "015" "1w40vzadzx019v0zhs4q6yqycrk04x1k8xs6qb73vk7ny4p6jdqv") -(patch "016" "0krqqljz4bkp9wrdnwfx51bxkb8rkwf8ivc93as1znx5fr7i96c8") -] diff --git a/pkgs/shells/bash/bash-5.2-patches.nix b/pkgs/shells/bash/bash-5.2-patches.nix new file mode 100644 index 000000000000..e118f03e0300 --- /dev/null +++ b/pkgs/shells/bash/bash-5.2-patches.nix @@ -0,0 +1,19 @@ +# Automatically generated by `update-patch-set.sh'; do not edit. + +patch: [ +(patch "001" "02iibpd3jq8p1bhdzgik8ps6gi1145vr463a82gj1hivjbp2ybzl") +(patch "002" "1f6p1z85qh1lavdp3xikgp0bfv0vqhvgpgwmdzlywl35hwdmxk25") +(patch "003" "1zxsi869jd90hksx3nyypgyqwrxhw2ws3r6hmk76yc1lsgdhq2ba") +(patch "004" "04i5liw5cg6dqkdxfgazqc2jrw40bmclx3dx45bwy259pcj7g0iq") +(patch "005" "0mykflv9qnbx3jz71l4f7isadiw9knm4qimqkwsv9cv88dafpq7c") +(patch "006" "13265akl8w6zyrg0l7f0x6arjgqjhllcwl6lk46rl53x4mm5dq6i") +(patch "007" "146lrwkn5wgxzs6vx34wl47g69zsxdy032k40qzi626b47ya6015") +(patch "008" "1s5i8hcayrv25lc8fxcr431v634yx5sii53b8fmip789s0pxjjvb") +(patch "009" "1kfk25151ka9wkmk1myf12irgcmvhsd8b0nfifvhrszah9w82npr") +(patch "010" "1kf1jrwm30js0v3d1r2rk4x09s1pyjp70wnd1qqhf9bmkw15ww67") +(patch "011" "1x5nkvbj6hci7gx42q7qa72hg2a9wwxh85dk79gn521ypwjmy6w3") +(patch "012" "0b6lcwzm7v5bzjiwaz2c8n5aj77w8ckhp2vwk4v3zsdq3z70gc9g") +(patch "013" "1rkwpibd6j2ghppfhqsva2jm4kdni6b7jpdsxdps52643gc4yjq9") +(patch "014" "09766vqqw4ffnmysm725v35qkhp1g9j4qgqag941xvq655pj9y9y") +(patch "015" "12im449abnq5gaqjmdxr5i38kmp02fa8l8wffad3jryvd58r0wzg") +] diff --git a/pkgs/shells/bash/pgrp-pipe-5.1.patch b/pkgs/shells/bash/pgrp-pipe-5.1.patch deleted file mode 100644 index 478327cafc45..000000000000 --- a/pkgs/shells/bash/pgrp-pipe-5.1.patch +++ /dev/null @@ -1,16 +0,0 @@ -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 --git a/pkgs/shells/bash/pgrp-pipe-5.patch b/pkgs/shells/bash/pgrp-pipe-5.patch new file mode 100644 index 000000000000..71b397901cb0 --- /dev/null +++ b/pkgs/shells/bash/pgrp-pipe-5.patch @@ -0,0 +1,15 @@ +--- ./configure 2022-12-20 17:13:17.804045620 +0100 ++++ ./configure-fixed 2022-12-20 17:16:00.444114824 +0100 +@@ -21723,11 +21723,7 @@ + solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; + lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; + linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading +- case "`uname -r`" in +- 1.*|2.[0123]*) : ;; +- *) printf "%s\n" "#define PGRP_PIPE 1" >>confdefs.h +- ;; +- esac ;; ++ printf "%s\n" "#define PGRP_PIPE 1" >>confdefs.h ;; + netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; + freebsd*|midnightbsd*) LOCAL_CFLAGS='-DHEREDOC_PIPESIZE=4096' ;; + *qnx[67]*) LOCAL_LIBS="-lncurses" ;; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2c4807866049..899560269b96 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13558,16 +13558,16 @@ with pkgs; any-nix-shell = callPackage ../shells/any-nix-shell { }; - bash = lowPrio (callPackage ../shells/bash/5.1.nix { + bash = lowPrio (callPackage ../shells/bash/5.nix { binutils = stdenv.cc.bintools; }); # WARNING: this attribute is used by nix-shell so it shouldn't be removed/renamed - bashInteractive = callPackage ../shells/bash/5.1.nix { + bashInteractive = callPackage ../shells/bash/5.nix { binutils = stdenv.cc.bintools; interactive = true; withDocs = true; }; - bashInteractiveFHS = callPackage ../shells/bash/5.1.nix { + bashInteractiveFHS = callPackage ../shells/bash/5.nix { binutils = stdenv.cc.bintools; interactive = true; withDocs = true;