about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kernel/patches.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/linux/kernel/patches.nix')
-rw-r--r--pkgs/os-specific/linux/kernel/patches.nix124
1 files changed, 30 insertions, 94 deletions
diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix
index 613f40c6fc96..cfe006fbe4b5 100644
--- a/pkgs/os-specific/linux/kernel/patches.nix
+++ b/pkgs/os-specific/linux/kernel/patches.nix
@@ -3,7 +3,7 @@
 let
 
   makeTuxonicePatch = { version, kernelVersion, sha256,
-    url ? "http://tuxonice.net/files/tuxonice-${version}-for-${kernelVersion}.patch.bz2" }:
+    url ? "http://tuxonice.nigelcunningham.com.au/downloads/all/tuxonice-for-linux-${kernelVersion}-${version}.patch.bz2" }:
     { name = "tuxonice-${kernelVersion}";
       patch = stdenv.mkDerivation {
         name = "tuxonice-${version}-for-${kernelVersion}.patch";
@@ -18,98 +18,20 @@ let
       };
     };
 
-  makeAufs3StandalonePatch = {version, rev, sha256}:
-
-    stdenv.mkDerivation {
-      name = "aufs3-standalone-${version}.patch";
-
-      src = fetchgit {
-        url = git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git;
-        inherit sha256 rev;
+  grsecPatch = { grversion ? "3.0", kversion, revision, branch, sha256 }:
+    { name = "grsecurity-${grversion}-${kversion}";
+      inherit grversion kversion revision;
+      patch = fetchurl {
+        url = "http://grsecurity.net/${branch}/grsecurity-${grversion}-${kversion}-${revision}.patch";
+        inherit sha256;
       };
-
-      phases = [ "unpackPhase" "installPhase" ];
-
-      # Instructions from http://aufs.git.sourceforge.net/git/gitweb.cgi?p=aufs/aufs3-standalone.git;a=blob;f=Documentation/filesystems/aufs/README;h=b8cf077635b323d1b454266366f05f476bbd09cb;hb=1067b9d8d64d23c70d905c9cd3c90a669e39c4d4
-      installPhase = ''
-        cat aufs3-base.patch aufs3-proc_map.patch aufs3-standalone.patch > $out
-      '';
+      features.grsecurity = true;
     };
 
-  makeAppArmorPatch = {apparmor, version}:
-    stdenv.mkDerivation {
-      name = "apparmor-${version}.patch";
-      phases = ["installPhase"];
-      installPhase = ''
-        cat ${apparmor}/kernel-patches/${version}/* > $out
-      '';
-    };
 in
 
 rec {
 
-  apparmor_3_2 = rec {
-    version = "3.2";
-    name = "apparmor-${version}";
-    patch = makeAppArmorPatch { inherit apparmor version; };
-    features.apparmor = true;
-  };
-
-  apparmor_3_4 = rec {
-    version = "3.4";
-    name = "apparmor-${version}";
-    patch = makeAppArmorPatch { inherit apparmor version; };
-    features.apparmor = true;
-  };
-
-  sec_perm_2_6_24 =
-    { name = "sec_perm-2.6.24";
-      patch = ./sec_perm-2.6.24.patch;
-      features.secPermPatch = true;
-    };
-
-  aufs3_0 = rec {
-    name = "aufs3.0";
-    version = "3.0.20121210";
-    utilRev = "91af15f977d12e02165759620005f6ce1a4d7602";
-    utilHash = "dda4df89828dcf0e4012d88b4aa3eda8c30af69d6530ff5fedc2411de872c996";
-    patch = makeAufs3StandalonePatch {
-      inherit version;
-      rev = "0627c706d69778f5c74be982f28c746153b8cdf7";
-      sha256 = "7008ff64f5adc2b3a30fcbb090bcbfaac61b778af38493b6144fc7d768a6514d";
-    };
-    features.aufsBase = true;
-    features.aufs3 = true;
-  };
-
-  aufs3_2 = rec {
-    name = "aufs3.2";
-    version = "3.2.20121210";
-    utilRev = "91af15f977d12e02165759620005f6ce1a4d7602";
-    utilHash = "dda4df89828dcf0e4012d88b4aa3eda8c30af69d6530ff5fedc2411de872c996";
-    patch = makeAufs3StandalonePatch {
-      inherit version;
-      rev = "0bf50c3b82f98e2ddc4c9ba0657f28ebfa8d15cb";
-      sha256 = "bc4b65cb77c62744db251da98488fdf4962f14a144c045cea6cbbbd42718ff89";
-    };
-    features.aufsBase = true;
-    features.aufs3 = true;
-  };
-
-  aufs3_4 = rec {
-    name = "aufs3.4";
-    version = "3.4.20121210";
-    utilRev = "91af15f977d12e02165759620005f6ce1a4d7602";
-    utilHash = "dda4df89828dcf0e4012d88b4aa3eda8c30af69d6530ff5fedc2411de872c996";
-    patch = makeAufs3StandalonePatch {
-      inherit version;
-      rev = "2faacd9baffb37df3b9062cc554353eebe68df1e";
-      sha256 = "3ecf97468f5e85970d9fd2bfc61e38c7f5ae2c6dde0045d5a17de085c411d452";
-    };
-    features.aufsBase = true;
-    features.aufs3 = true;
-  };
-
   no_xsave =
     { name = "no-xsave";
       patch = ./no-xsave.patch;
@@ -131,14 +53,28 @@ rec {
       patch = ./mips-ext3-n32.patch;
     };
 
-  grsecurity_2_9_1_3_2_52 =
-    { name = "grsecurity-2.9.1-3.2.52";
-      patch = fetchurl {
-        url = http://grsecurity.net/stable/grsecurity-2.9.1-3.2.52-201310271550.patch;
-        sha256 = "08y4y323y2lfvdj67gmg3ca8gaf3snhr3pyrmgvj877avaz0475m";
-      };
-      # The grsec kernel patch seems to include the apparmor patches as of 2.9.1-3.2.52
-      features.apparmor = true;
+  tuxonice_3_10 = makeTuxonicePatch {
+    version = "2013-11-07";
+    kernelVersion = "3.10.18";
+    sha256 = "00b1rqgd4yr206dxp4mcymr56ymbjcjfa4m82pxw73khj032qw3j";
+  };
+
+  grsecurity_stable = grsecPatch
+    { kversion  = "3.14.10";
+      revision  = "201407012152";
+      branch    = "stable";
+      sha256    = "1119044lzkr9wpr1gpl1g0bz67c2xpdd9bkddllij7ja24jv8sx1";
     };
 
+  grsecurity_unstable = grsecPatch
+    { kversion  = "3.15.3";
+      revision  = "201407012153";
+      branch    = "test";
+      sha256    = "0bccayakprc77530crxfr9v2hbs6hlcf290pj1ywlh1p861ljgbm";
+    };
+
+  grsec_fix_path =
+    { name = "grsec-fix-path";
+      patch = ./grsec-path.patch;
+    };
 }