From fe255679842a7d498b6e45890dd9854725be2f2c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 24 May 2007 13:35:44 +0000 Subject: [PATCH] * Patch to make tar shut up about timestamps of 0 (1-1-1970 00:00:00 UTC). (NIXPKGS-46) svn path=/nixpkgs/trunk/; revision=8743 --- pkgs/tools/archivers/gnutar/default.nix | 1 + pkgs/tools/archivers/gnutar/implausible.patch | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 pkgs/tools/archivers/gnutar/implausible.patch diff --git a/pkgs/tools/archivers/gnutar/default.nix b/pkgs/tools/archivers/gnutar/default.nix index 835eb0eb48ab..97a12ecc1d2f 100644 --- a/pkgs/tools/archivers/gnutar/default.nix +++ b/pkgs/tools/archivers/gnutar/default.nix @@ -6,4 +6,5 @@ stdenv.mkDerivation { url = ftp://ftp.nluug.nl/pub/gnu/tar/tar-1.16.1.tar.bz2; md5 = "d51593461c5ef1f7e37134f22338bb9e"; }; + patches = [./implausible.patch]; } diff --git a/pkgs/tools/archivers/gnutar/implausible.patch b/pkgs/tools/archivers/gnutar/implausible.patch new file mode 100644 index 000000000000..a3522c743505 --- /dev/null +++ b/pkgs/tools/archivers/gnutar/implausible.patch @@ -0,0 +1,20 @@ +diff -rc tar-1.16.1-orig/src/extract.c tar-1.16.1/src/extract.c +*** tar-1.16.1-orig/src/extract.c 2006-12-07 14:26:00.000000000 +0100 +--- tar-1.16.1/src/extract.c 2007-05-24 11:39:47.000000000 +0200 +*************** +*** 194,200 **** + static void + check_time (char const *file_name, struct timespec t) + { +! if (t.tv_sec <= 0) + WARN ((0, 0, _("%s: implausibly old time stamp %s"), + file_name, tartime (t, true))); + else if (timespec_cmp (volume_start_time, t) < 0) +--- 194,200 ---- + static void + check_time (char const *file_name, struct timespec t) + { +! if (0 /* t.tv_sec <= 0 */) + WARN ((0, 0, _("%s: implausibly old time stamp %s"), + file_name, tartime (t, true))); + else if (timespec_cmp (volume_start_time, t) < 0)