treewide: remove obsolete kernel version checks

We don't support Linux kernels older than 4.4 in Nixpkgs.
This commit is contained in:
Alyssa Ross 2022-01-21 11:40:28 +00:00
parent 65c8149cb1
commit 1176525f87
7 changed files with 1 additions and 38 deletions

View file

@ -24,10 +24,6 @@ let kernelVersion = config.boot.kernelPackages.kernel.version; in
###### implementation ###### implementation
config = mkIf config.networking.enableB43Firmware { config = mkIf config.networking.enableB43Firmware {
assertions = singleton
{ assertion = lessThan 0 (builtins.compareVersions kernelVersion "3.2");
message = "b43 firmware for kernels older than 3.2 not packaged yet!";
};
hardware.firmware = [ pkgs.b43Firmware_5_1_138 ]; hardware.firmware = [ pkgs.b43Firmware_5_1_138 ];
}; };

View file

@ -16,11 +16,6 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
assertions = singleton {
assertion = versionAtLeast kernelPackages.kernel.version "3.2";
message = "Magewell Pro Capture family module is not supported for kernels older than 3.2";
};
boot.kernelModules = [ "ProCapture" ]; boot.kernelModules = [ "ProCapture" ];
environment.systemPackages = [ kernelPackages.mwprocapture ]; environment.systemPackages = [ kernelPackages.mwprocapture ];

View file

@ -92,7 +92,6 @@ let
, permissions , permissions
, ... , ...
}: }:
assert (lib.versionAtLeast (lib.getVersion config.boot.kernelPackages.kernel) "4.3");
'' ''
cp ${securityWrapper}/bin/security-wrapper "$wrapperDir/${program}" cp ${securityWrapper}/bin/security-wrapper "$wrapperDir/${program}"
echo -n "${source}" > "$wrapperDir/${program}.real" echo -n "${source}" > "$wrapperDir/${program}.real"

View file

@ -433,8 +433,6 @@ in
drop the packet if the source address is not reachable via any drop the packet if the source address is not reachable via any
interface) or false. Defaults to the value of interface) or false. Defaults to the value of
kernelHasRPFilter. kernelHasRPFilter.
(needs kernel 3.3+)
''; '';
}; };

View file

@ -242,21 +242,6 @@ in {
''; '';
}; };
retain_attached_hw_handler = mkOption {
type = nullOr (enum [ "yes" "no" ]);
default = null; # real default: "yes"
description = ''
(Obsolete for kernels >= 4.3) If set to "yes" and the SCSI layer has
already attached a hardware_handler to the device, multipath will not
force the device to use the hardware_handler specified by mutipath.conf.
If the SCSI layer has not attached a hardware handler, multipath will
continue to use its configured hardware handler.
Important Note: Linux kernel 4.3 or newer always behaves as if
"retain_attached_hw_handler yes" was set.
'';
};
detect_prio = mkOption { detect_prio = mkOption {
type = nullOr (enum [ "yes" "no" ]); type = nullOr (enum [ "yes" "no" ]);
default = null; # real default: "yes" default = null; # real default: "yes"

View file

@ -1325,22 +1325,13 @@ in
val = tempaddrValues.${opt}.sysctl; val = tempaddrValues.${opt}.sysctl;
in nameValuePair "net.ipv6.conf.${replaceChars ["."] ["/"] i.name}.use_tempaddr" val)); in nameValuePair "net.ipv6.conf.${replaceChars ["."] ["/"] i.name}.use_tempaddr" val));
# Capabilities won't work unless we have at-least a 4.3 Linux security.wrappers = {
# kernel because we need the ambient capability
security.wrappers = if (versionAtLeast (getVersion config.boot.kernelPackages.kernel) "4.3") then {
ping = { ping = {
owner = "root"; owner = "root";
group = "root"; group = "root";
capabilities = "cap_net_raw+p"; capabilities = "cap_net_raw+p";
source = "${pkgs.iputils.out}/bin/ping"; source = "${pkgs.iputils.out}/bin/ping";
}; };
} else {
ping = {
setuid = true;
owner = "root";
group = "root";
source = "${pkgs.iputils.out}/bin/ping";
};
}; };
security.apparmor.policies."bin.ping".profile = lib.mkIf config.security.apparmor.policies."bin.ping".enable (lib.mkAfter '' security.apparmor.policies."bin.ping".profile = lib.mkIf config.security.apparmor.policies."bin.ping".enable (lib.mkAfter ''
/run/wrappers/bin/ping { /run/wrappers/bin/ping {

View file

@ -60,6 +60,5 @@ stdenv.mkDerivation rec {
license = licenses.unfreeRedistributable; license = licenses.unfreeRedistributable;
maintainers = with maintainers; [ MP2E ]; maintainers = with maintainers; [ MP2E ];
platforms = platforms.linux; platforms = platforms.linux;
broken = kernel.kernelOlder "3.2.0";
}; };
} }