about summary refs log tree commit diff
path: root/pkgs/tools/archivers/cpio/default.nix
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2015-09-18 06:04:49 +0200
committerTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2015-09-18 06:06:39 +0200
commit3278007dae02dbe72c7ba128a3a592685b6af8f6 (patch)
treed206a941686e55f2d4826728618ae62fd3ecbf2c /pkgs/tools/archivers/cpio/default.nix
parent58fa09a40a287c891328ce7b4864cc911b96d21a (diff)
cpio: 2.11 -> 2.12
Enable tests (which may fail on Darwin, another reason to stage this).
Diffstat (limited to 'pkgs/tools/archivers/cpio/default.nix')
-rw-r--r--pkgs/tools/archivers/cpio/default.nix32
1 files changed, 10 insertions, 22 deletions
diff --git a/pkgs/tools/archivers/cpio/default.nix b/pkgs/tools/archivers/cpio/default.nix
index f2207b5884994..095b3086ff3fc 100644
--- a/pkgs/tools/archivers/cpio/default.nix
+++ b/pkgs/tools/archivers/cpio/default.nix
@@ -1,36 +1,24 @@
 { stdenv, fetchurl, fetchpatch }:
 
-stdenv.mkDerivation {
-  name = "cpio-2.11";
+let
+  version = "2.12";
+  name = "cpio-${version}";
+in stdenv.mkDerivation {
+  inherit name;
 
   src = fetchurl {
-    url = mirror://gnu/cpio/cpio-2.11.tar.bz2;
-    sha256 = "bb820bfd96e74fc6ce43104f06fe733178517e7f5d1cdee553773e8eff7d5bbd";
+    url = "mirror://gnu/cpio/${name}.tar.bz2";
+    sha256 = "0vi9q475h1rki53100zml75vxsykzyhrn70hidy41s5c2rc8r6bh";
   };
 
-  patches = [
-    ./no-gets.patch
-    (fetchpatch {
-      name = "CVE-2014-9112.diff";
-      url = "http://pkgs.fedoraproject.org/cgit/cpio.git/plain/cpio-2.11"
-        + "-CVE-2014-9112.patch?h=f21&id=b475b4d6f31c95e073edc95c742a33a39ef4ec95";
-      sha256 = "0c9yrysvpwbmiq7ph84dk6mv46hddiyvkgya1zsmj76n9ypb1b4i";
-    })
-  ] ++ stdenv.lib.optional stdenv.isDarwin ./darwin-fix.patch;
-
-  postPatch = let pp =
-    fetchpatch {
-      name = "CVE-2015-1197.diff";
-      url = "https://marc.info/?l=oss-security&m=142289947619786&w=2";
-      sha256 = "0fr95bj416zfljv40fl1sh50059d18wdmfgaq8ad2fqi5cnbk859";
-    };
-    # one "<" and one "&" sign get mangled in the patch
-    in "cat ${pp} | sed 's/&lt;/</;s/&amp;/\\&/' | patch -p1";
+  patches = [ ./CVE-2015-1197-cpio-2.12.patch ];
 
   preConfigure = if stdenv.isCygwin then ''
     sed -i gnu/fpending.h -e 's,include <stdio_ext.h>,,'
   '' else null;
 
+  enableParallelBuilding = true;
+
   meta = {
     homepage = http://www.gnu.org/software/cpio/;
     description = "A program to create or extract from cpio archives";