From 16acdb45bd6f79b8bb49ff71fa66251538336598 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 19 Nov 2015 14:08:24 +0100 Subject: [PATCH] Revert "kernel: Remove unsupported 3.10, 3.12, 3.14" This reverts commit 2441e002e26d60e62306ae03a2c0d42fe156f129. The motivation for removing them was not very convincing. Also, we need 3.14 on some Hydra build machines. --- pkgs/build-support/grsecurity/default.nix | 2 +- pkgs/os-specific/linux/kernel/linux-3.10.nix | 17 +++++++++++ pkgs/os-specific/linux/kernel/linux-3.12.nix | 17 +++++++++++ pkgs/os-specific/linux/kernel/linux-3.14.nix | 18 ++++++++++++ pkgs/top-level/all-packages.nix | 31 ++++++++++++++++++++ 5 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 pkgs/os-specific/linux/kernel/linux-3.10.nix create mode 100644 pkgs/os-specific/linux/kernel/linux-3.12.nix create mode 100644 pkgs/os-specific/linux/kernel/linux-3.14.nix diff --git a/pkgs/build-support/grsecurity/default.nix b/pkgs/build-support/grsecurity/default.nix index 6a964c535b8b..3bf40a2e8d6b 100644 --- a/pkgs/build-support/grsecurity/default.nix +++ b/pkgs/build-support/grsecurity/default.nix @@ -32,7 +32,7 @@ let stable-patch = with pkgs.kernelPatches; grsecurity_stable; grKernel = if cfg.stable - then throw "Grsecurity stable no longer supported due to https://grsecurity.net/announce.php" + then mkKernel pkgs.linux_3_14 stable-patch else mkKernel pkgs.linux_4_2 test-patch; ## -- grsecurity configuration --------------------------------------------- diff --git a/pkgs/os-specific/linux/kernel/linux-3.10.nix b/pkgs/os-specific/linux/kernel/linux-3.10.nix new file mode 100644 index 000000000000..a231b551dc06 --- /dev/null +++ b/pkgs/os-specific/linux/kernel/linux-3.10.nix @@ -0,0 +1,17 @@ +{ stdenv, fetchurl, perl, buildLinux, ... } @ args: + +import ./generic.nix (args // rec { + version = "3.10.92"; + extraMeta.branch = "3.10"; + + src = fetchurl { + url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz"; + sha256 = "0z0jdix1mfpnnc8cxw7rzpnhxdayckpnrasvxi1qf0dwhcqgk92d"; + }; + + features.iwlwifi = true; + features.efiBootStub = true; + features.needsCifsUtils = true; + features.canDisableNetfilterConntrackHelpers = true; + features.netfilterRPFilter = true; +}) diff --git a/pkgs/os-specific/linux/kernel/linux-3.12.nix b/pkgs/os-specific/linux/kernel/linux-3.12.nix new file mode 100644 index 000000000000..7ed6cd142d15 --- /dev/null +++ b/pkgs/os-specific/linux/kernel/linux-3.12.nix @@ -0,0 +1,17 @@ +{ stdenv, fetchurl, perl, buildLinux, ... } @ args: + +import ./generic.nix (args // rec { + version = "3.12.50"; + extraMeta.branch = "3.12"; + + src = fetchurl { + url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz"; + sha256 = "1bn07wsrcbg4qgqd4v2810c3qc0ifbcza0fyj8s54yd78g9qj4lj"; + }; + + features.iwlwifi = true; + features.efiBootStub = true; + features.needsCifsUtils = true; + features.canDisableNetfilterConntrackHelpers = true; + features.netfilterRPFilter = true; +}) diff --git a/pkgs/os-specific/linux/kernel/linux-3.14.nix b/pkgs/os-specific/linux/kernel/linux-3.14.nix new file mode 100644 index 000000000000..afb4437459b7 --- /dev/null +++ b/pkgs/os-specific/linux/kernel/linux-3.14.nix @@ -0,0 +1,18 @@ +{ stdenv, fetchurl, perl, buildLinux, ... } @ args: + +import ./generic.nix (args // rec { + version = "3.14.56"; + # Remember to update grsecurity! + extraMeta.branch = "3.14"; + + src = fetchurl { + url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz"; + sha256 = "1ggvjrz51nfhj7amn3v2nd0b0x8dnz68k9cldzl729cqp9gsc3hf"; + }; + + features.iwlwifi = true; + features.efiBootStub = true; + features.needsCifsUtils = true; + features.canDisableNetfilterConntrackHelpers = true; + features.netfilterRPFilter = true; +} // (args.argsOverride or {})) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 394de03d6715..46e103054827 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9902,6 +9902,33 @@ let kernelPatches = [ kernelPatches.bridge_stp_helper ]; }; + linux_3_10 = callPackage ../os-specific/linux/kernel/linux-3.10.nix { + kernelPatches = [ kernelPatches.bridge_stp_helper ] + ++ lib.optionals ((platform.kernelArch or null) == "mips") + [ kernelPatches.mips_fpureg_emu + kernelPatches.mips_fpu_sigill + kernelPatches.mips_ext3_n32 + ]; + }; + + linux_3_12 = callPackage ../os-specific/linux/kernel/linux-3.12.nix { + kernelPatches = [ kernelPatches.bridge_stp_helper kernelPatches.crc_regression ] + ++ lib.optionals ((platform.kernelArch or null) == "mips") + [ kernelPatches.mips_fpureg_emu + kernelPatches.mips_fpu_sigill + kernelPatches.mips_ext3_n32 + ]; + }; + + linux_3_14 = callPackage ../os-specific/linux/kernel/linux-3.14.nix { + kernelPatches = [ kernelPatches.bridge_stp_helper ] + ++ lib.optionals ((platform.kernelArch or null) == "mips") + [ kernelPatches.mips_fpureg_emu + kernelPatches.mips_fpu_sigill + kernelPatches.mips_ext3_n32 + ]; + }; + linux_3_18 = callPackage ../os-specific/linux/kernel/linux-3.18.nix { kernelPatches = [ kernelPatches.bridge_stp_helper ] ++ lib.optionals ((platform.kernelArch or null) == "mips") @@ -10105,6 +10132,10 @@ let # Build the kernel modules for the some of the kernels. linuxPackages_rpi = linuxPackagesFor pkgs.linux_rpi linuxPackages_rpi; + linuxPackages_3_10 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_10 linuxPackages_3_10); + linuxPackages_3_10_tuxonice = linuxPackagesFor pkgs.linux_3_10_tuxonice linuxPackages_3_10_tuxonice; + linuxPackages_3_12 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_12 linuxPackages_3_12); + linuxPackages_3_14 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_14 linuxPackages_3_14); linuxPackages_3_18 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_18 linuxPackages_3_18); linuxPackages_4_1 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_1 linuxPackages_4_1); linuxPackages_4_2 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_2 linuxPackages_4_2);