From 00aeb53bc08c591f4acf7b8a25b3ba1c74d25704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Wed, 4 Nov 2015 12:01:21 +0100 Subject: [PATCH] coreutils 8.24 have a bug exhibited in a test in the Pi2. Patching. I pick the patch from upstream, and I apply only for ARM to avoid rebuilding stdenv. (cherry picked from commit 1b36f489b6fb2bde3b241d2763abfaa860a4fe55) --- pkgs/tools/misc/coreutils/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index c9d8f0ad6029..adbe62dd494e 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -19,13 +19,22 @@ let sha256 = "0w11jw3fb5sslf0f72kxy7llxgk1ia3a6bcw0c9kmvxrlj355mx2"; }; - patches = if stdenv.isCygwin then [ ./coreutils-8.23-4.cygwin.patch ] else null; + patches = (optional stdenv.isCygwin ./coreutils-8.23-4.cygwin.patch) ++ + (optional stdenv.isArm (fetchurl { + url = "http://git.savannah.gnu.org/cgit/coreutils.git/patch/?id=3ba68f9e64fa2eb8af22d510437a0c6441feb5e0"; + sha256 = "1dnlszhc8lihhg801i9sz896mlrgfsjfcz62636prb27k5hmixqz"; + name = "coreutils-tail-inotify-race.patch"; + })); # The test tends to fail on btrfs and maybe other unusual filesystems. postPatch = stdenv.lib.optionalString (!stdenv.isDarwin) '' sed '2i echo Skipping dd sparse test && exit 0' -i ./tests/dd/sparse.sh sed '2i echo Skipping cp sparse test && exit 0' -i ./tests/cp/sparse.sh - ''; + '' + + # This is required by coreutils-tail-inotify-race.patch to avoid more deps + stdenv.lib.optionalString stdenv.isArm '' + touch -r src/stat.c src/tail.c + ''; nativeBuildInputs = [ perl ]; buildInputs = [ gmp ]