diff --git a/pkgs/os-specific/linux/kernel/linux-copperhead-hardened.nix b/pkgs/os-specific/linux/kernel/linux-copperhead-lts.nix similarity index 100% rename from pkgs/os-specific/linux/kernel/linux-copperhead-hardened.nix rename to 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 00000000000000..86b7eaa8823ec6 --- /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 afd6a60ee060a3..3bc6ca6e96c256 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);