summary refs log tree commit diff
diff options
context:
space:
mode:
authorArnout Engelen <arnout@bzzt.net>2021-03-22 12:27:10 +0100
committerArnout Engelen <arnout@bzzt.net>2021-03-22 12:27:10 +0100
commit078c2a734110b80195781442b2c227b3027a734f (patch)
treebfb420618e6fe21787c32b6833bf8e4af7a57dd3
parentf5e8bdd07d1afaabf6b37afc5497b1e498b8046f (diff)
downloadnixpkgs-078c2a734110b80195781442b2c227b3027a734f.tar
nixpkgs-078c2a734110b80195781442b2c227b3027a734f.tar.gz
nixpkgs-078c2a734110b80195781442b2c227b3027a734f.tar.bz2
nixpkgs-078c2a734110b80195781442b2c227b3027a734f.tar.lz
nixpkgs-078c2a734110b80195781442b2c227b3027a734f.tar.xz
nixpkgs-078c2a734110b80195781442b2c227b3027a734f.tar.zst
nixpkgs-078c2a734110b80195781442b2c227b3027a734f.zip
bash 5.1: don't rely on patch timestamps in build
When, after patching, `configure.ac` is newer than `configure`, the
Makefile will try to regenerate `configure` from `configure.ac`.

While that might usually be desirable, in this case we want to keep
bootstrapping simple and directly use the `configure` from the package
so we can avoid a dependency on automake.

Previously, we used the `-T` parameter to automake to make sure the
timestamps were okay. However, this is brittle when we update: when the
timestamp of the original file changes, and no longer matches the
timestamp of the original file in the patch, `patch` will show a warning
but otherwise continue without updating the timestamp.

This PR changes things so we only patch `configure`, so that will always
have a newer timestamp.

We will update bash-4.4 in a separate PR (but that one has a bigger rebuild
impact so will have to target staging)

Refs #115177
-rw-r--r--pkgs/shells/bash/5.1.nix2
-rw-r--r--pkgs/shells/bash/pgrp-pipe-5.1.patch15
2 files changed, 1 insertions, 16 deletions
diff --git a/pkgs/shells/bash/5.1.nix b/pkgs/shells/bash/5.1.nix
index 5dd060db7ef..d234b18e6c9 100644
--- a/pkgs/shells/bash/5.1.nix
+++ b/pkgs/shells/bash/5.1.nix
@@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
     -DSSH_SOURCE_BASHRC
   '';
 
-  patchFlags = [ "-p0" "-T" ];
+  patchFlags = [ "-p0" ];
 
   patches = upstreamPatches
     ++ [ ./pgrp-pipe-5.1.patch ];
diff --git a/pkgs/shells/bash/pgrp-pipe-5.1.patch b/pkgs/shells/bash/pgrp-pipe-5.1.patch
index 2a9fa6f33c3..478327cafc4 100644
--- a/pkgs/shells/bash/pgrp-pipe-5.1.patch
+++ b/pkgs/shells/bash/pgrp-pipe-5.1.patch
@@ -14,18 +14,3 @@ diff -u ./configure ../bash-5.0-fixed/configure
  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" ;;