bash: improvements to derivation (no rebuild) (#417564)

This commit is contained in:
Philip Taron
2025-07-23 06:21:02 -07:00
committed by GitHub
2 changed files with 12 additions and 5 deletions
+5
View File
@@ -74,6 +74,11 @@ lib.warnIf (withDocs != null)
patchFlags = [ "-p0" ];
patches = upstreamPatches ++ [
# Enable PGRP_PIPE independently of the kernel of the build machine.
# This doesn't seem to be upstreamed despite such a mention of in https://github.com/NixOS/nixpkgs/pull/77196,
# which originally introduced the patch
# Some related discussion can be found in
# https://lists.gnu.org/archive/html/bug-bash/2015-05/msg00071.html
./pgrp-pipe-5.patch
# Apply parallel build fix pending upstream inclusion:
# https://savannah.gnu.org/patch/index.php?10373
+7 -5
View File
@@ -22,11 +22,13 @@ set -e
rm -vf "$PATCH_LIST"
wget "https://tiswww.case.edu/php/chet/gpgkey.asc"
echo "4ef5051ce7200241e65d29c11eb57df8 gpgkey.asc" > gpgkey.asc.md5
md5sum -c gpgkey.asc.md5
# https://savannah.gnu.org/projects/bash/: Group Admins: Chet Ramey
# https://savannah.gnu.org/users/chet: Download GPG Key
wget "https://savannah.gnu.org/people/viewgpg.php?user_id=2590" -O gpgkey.asc
echo "db4041b4d3896b9f21250e6c29861958bd5d4781f521f06beda849a9ed79fae8 gpgkey.asc" > gpgkey.asc.sha256
sha256sum -c gpgkey.asc.sha256
gpg --import ./gpgkey.asc
rm gpgkey.asc{,.md5}
rm gpgkey.asc{,.sha256}
( echo "# Automatically generated by \`$(basename "$0")'; do not edit." ; \
echo "" ; \
@@ -39,7 +41,7 @@ do
wget -P "$DIR" "ftp.gnu.org/gnu/$PROJECT/$PROJECT-$VERSION-patches/$PROJECT$VERSION_CONDENSED-$i.sig"
gpg --verify "$DIR/$PROJECT$VERSION_CONDENSED-$i.sig"
hash=$(nix-hash --flat --type sha256 --base32 "$DIR/$PROJECT$VERSION_CONDENSED-$i")
echo "(patch \"$i\" \"$hash\")" \
echo " (patch \"$i\" \"$hash\")" \
>> "$PATCH_LIST"
rm -f "$DIR/$PROJECT$VERSION_CONDENSED-$i"{,.sig}