2014-12-10 19:20:28 +01:00
|
|
|
{ stdenv, fetchurl, fetchpatch }:
|
2005-08-30 15:56:15 +02:00
|
|
|
|
2010-08-03 12:55:58 +02:00
|
|
|
stdenv.mkDerivation {
|
2013-02-26 10:08:00 +01:00
|
|
|
name = "cpio-2.11";
|
2013-03-20 23:01:36 +01:00
|
|
|
|
2005-08-30 15:56:15 +02:00
|
|
|
src = fetchurl {
|
2013-02-20 10:20:07 +01:00
|
|
|
url = mirror://gnu/cpio/cpio-2.11.tar.bz2;
|
|
|
|
sha256 = "bb820bfd96e74fc6ce43104f06fe733178517e7f5d1cdee553773e8eff7d5bbd";
|
2005-08-30 15:56:15 +02:00
|
|
|
};
|
2009-02-12 20:04:44 +01:00
|
|
|
|
2014-12-10 19:20:28 +01:00
|
|
|
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;
|
2013-03-20 23:01:36 +01:00
|
|
|
|
2015-02-26 21:24:45 +01:00
|
|
|
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/</</;s/&/\\&/' | patch -p1";
|
|
|
|
|
2014-10-23 20:10:12 +02:00
|
|
|
preConfigure = if stdenv.isCygwin then ''
|
|
|
|
sed -i gnu/fpending.h -e 's,include <stdio_ext.h>,,'
|
|
|
|
'' else null;
|
|
|
|
|
2009-02-12 20:04:44 +01:00
|
|
|
meta = {
|
|
|
|
homepage = http://www.gnu.org/software/cpio/;
|
2010-08-03 12:55:58 +02:00
|
|
|
description = "A program to create or extract from cpio archives";
|
2014-01-28 13:36:35 +01:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
2009-02-12 20:04:44 +01:00
|
|
|
};
|
2005-08-30 15:56:15 +02:00
|
|
|
}
|