about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorTim Steinbach <tim@nequissimus.com>2018-04-28 19:46:25 +0000
committerTim Steinbach <tim@nequissimus.com>2018-04-28 19:46:25 +0000
commit844c08ec0a5b79abb16d9de5bd39ed492f4fc214 (patch)
treec04e220fb0b65e81b40edc13e063503a5e740a1c /pkgs
parent2eb42290e7fbe634a87720d7d954864049729a00 (diff)
linux-copperhead: Add 4.16.5.a
Separate LTS and stable kernel releases
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/os-specific/linux/kernel/linux-copperhead-lts.nix (renamed from pkgs/os-specific/linux/kernel/linux-copperhead-hardened.nix)0
-rw-r--r--pkgs/os-specific/linux/kernel/linux-copperhead-stable.nix30
-rw-r--r--pkgs/top-level/all-packages.nix21
3 files changed, 44 insertions, 7 deletions
diff --git a/pkgs/os-specific/linux/kernel/linux-copperhead-hardened.nix b/pkgs/os-specific/linux/kernel/linux-copperhead-lts.nix
index 76b59ee75fb16..76b59ee75fb16 100644
--- a/pkgs/os-specific/linux/kernel/linux-copperhead-hardened.nix
+++ b/pkgs/os-specific/linux/kernel/linux-copperhead-lts.nix
diff --git a/pkgs/os-specific/linux/kernel/linux-copperhead-stable.nix b/pkgs/os-specific/linux/kernel/linux-copperhead-stable.nix
new file mode 100644
index 0000000000000..86b7eaa8823ec
--- /dev/null
+++ b/pkgs/os-specific/linux/kernel/linux-copperhead-stable.nix
@@ -0,0 +1,30 @@
+{ stdenv, buildPackages, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args:
+
+with stdenv.lib;
+
+let
+  version = "4.16.5";
+  revision = "a";
+  sha256 = "150cwq51x3cnnvnd7izizi93jmiqs0na15p8ip4vkm5frspmnks7";
+
+  # modVersion needs to be x.y.z, will automatically add .0 if needed
+  modVersion = concatStrings (intersperse "." (take 3 (splitString "." "${version}.0")));
+
+  # branchVersion needs to be x.y
+  branchVersion = concatStrings (intersperse "." (take 2 (splitString "." version)));
+
+  modDirVersion = "${modVersion}-hardened";
+in
+buildLinux (args // {
+  inherit modDirVersion;
+
+  version = "${version}-${revision}";
+  extraMeta.branch = "${branchVersion}";
+
+  src = fetchFromGitHub {
+    inherit sha256;
+    owner = "copperhead";
+    repo = "linux-hardened";
+    rev = "${version}.${revision}";
+  };
+} // (args.argsOverride or {}))
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index afd6a60ee060a..3bc6ca6e96c25 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -13321,11 +13321,19 @@ with pkgs;
       ];
   };
 
-  linux_copperhead = callPackage ../os-specific/linux/kernel/linux-copperhead-hardened.nix {
+  linux_copperhead_lts = callPackage ../os-specific/linux/kernel/linux-copperhead-lts.nix {
     kernelPatches = with kernelPatches; [
-      kernelPatches.bridge_stp_helper
-      kernelPatches.modinst_arg_list_too_long
-      kernelPatches.tag_hardened
+      bridge_stp_helper
+      modinst_arg_list_too_long
+      tag_hardened
+    ];
+  };
+
+  linux_copperhead_stable = callPackage ../os-specific/linux/kernel/linux-copperhead-stable.nix {
+    kernelPatches = with kernelPatches; [
+      bridge_stp_helper
+      modinst_arg_list_too_long
+      tag_hardened
     ];
   };
 
@@ -13661,9 +13669,8 @@ with pkgs;
 
   linuxPackages_latest_xen_dom0_hardened = recurseIntoAttrs (hardenedLinuxPackagesFor (pkgs.linux_latest.override { features.xen_dom0=true; }));
 
-  linuxPackages_copperhead_hardened = recurseIntoAttrs (hardenedLinuxPackagesFor pkgs.linux_copperhead);
-  linux_copperhead_hardened = linuxPackages_copperhead_hardened.kernel;
-  linux_hardened_copperhead = linux_copperhead_hardened; # alias for backward compatibility
+  linuxPackages_copperhead_lts = recurseIntoAttrs (hardenedLinuxPackagesFor pkgs.linux_copperhead_lts);
+  linuxPackages_copperhead_stable = recurseIntoAttr (hardenedLinuxPackagesFor pkgs.linux_copperhead_stable);
 
   # Samus kernels
   linuxPackages_samus_4_12 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_samus_4_12);