diff options
Diffstat (limited to 'pkgs/os-specific/linux')
74 files changed, 627 insertions, 671 deletions
diff --git a/pkgs/os-specific/linux/acpid/default.nix b/pkgs/os-specific/linux/acpid/default.nix index b766739aaaf..8f981ec401b 100644 --- a/pkgs/os-specific/linux/acpid/default.nix +++ b/pkgs/os-specific/linux/acpid/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "acpid"; - version = "2.0.33"; + version = "2.0.34"; src = fetchurl { url = "mirror://sourceforge/acpid2/acpid-${version}.tar.xz"; - sha256 = "sha256-CFb3Gz6zShtmPQqOY2Pfy8UZ5j2EczBJiJhljily2+g="; + sha256 = "sha256-LQlcjPy8hHyux0bWLNyNC/8ewbxy73xnTHIeBNpqszM="; }; nativeBuildInputs = [ autoreconfHook ]; diff --git a/pkgs/os-specific/linux/bcc/default.nix b/pkgs/os-specific/linux/bcc/default.nix index ab3e2232852..bb042e31c0e 100644 --- a/pkgs/os-specific/linux/bcc/default.nix +++ b/pkgs/os-specific/linux/bcc/default.nix @@ -52,6 +52,10 @@ python.pkgs.buildPythonApplication rec { substituteAll ${./absolute-ausyscall.patch} ./absolute-ausyscall.patch patch -p1 < absolute-ausyscall.patch + + # https://github.com/iovisor/bcc/issues/3996 + substituteInPlace src/cc/libbcc.pc.in \ + --replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ ''; postInstall = '' diff --git a/pkgs/os-specific/linux/bluez/default.nix b/pkgs/os-specific/linux/bluez/default.nix index d09ef77fb0d..ff8fbb460b2 100644 --- a/pkgs/os-specific/linux/bluez/default.nix +++ b/pkgs/os-specific/linux/bluez/default.nix @@ -1,7 +1,6 @@ { stdenv , lib , fetchurl -, fetchpatch , alsa-lib , dbus , ell @@ -23,11 +22,11 @@ ]; in stdenv.mkDerivation rec { pname = "bluez"; - version = "5.64"; + version = "5.65"; src = fetchurl { url = "mirror://kernel/linux/bluetooth/${pname}-${version}.tar.xz"; - sha256 = "sha256-rkN+ZbazBwwZi8WwEJ/pzeueqjhzgOIHL53mX+ih3jQ="; + sha256 = "sha256-JWWk1INUtXbmrZLiW1TtZoCCllgciruAWHBR+Zk9ltQ="; }; buildInputs = [ @@ -50,17 +49,6 @@ in stdenv.mkDerivation rec { outputs = [ "out" "dev" "test" ]; - patches = [ - # https://github.com/bluez/bluez/commit/0905a06410d4a5189f0be81e25eb3c3e8a2199c5 - # which fixes https://github.com/bluez/bluez/issues/329 - # and is already merged upstream and not yet in a release. - (fetchpatch { - name = "StateDirectory_and_ConfigurationDirectory.patch"; - url = "https://github.com/bluez/bluez/commit/0905a06410d4a5189f0be81e25eb3c3e8a2199c5.patch"; - sha256 = "sha256-MI6yPTiDLHsSTjLvNqtWnuy2xUMYpSat1WhMbeoedSM="; - }) - ]; - postPatch = '' substituteInPlace tools/hid2hci.rules \ --replace /sbin/udevadm ${systemdMinimal}/bin/udevadm \ diff --git a/pkgs/os-specific/linux/bolt/default.nix b/pkgs/os-specific/linux/bolt/default.nix index d424f89fdfb..2545c73ac58 100644 --- a/pkgs/os-specific/linux/bolt/default.nix +++ b/pkgs/os-specific/linux/bolt/default.nix @@ -44,6 +44,10 @@ stdenv.mkDerivation rec { }) ]; + depsBuildBuild = [ + pkg-config + ]; + nativeBuildInputs = [ asciidoc docbook_xml_dtd_45 @@ -53,10 +57,10 @@ stdenv.mkDerivation rec { meson ninja pkg-config + glib ] ++ lib.optional (!doCheck) python3; buildInputs = [ - glib polkit systemd ]; @@ -71,7 +75,7 @@ stdenv.mkDerivation rec { dbus gobject-introspection umockdev - (python3.withPackages + (python3.pythonForBuild.withPackages (p: [ p.pygobject3 p.dbus-python p.python-dbusmock ])) ]; diff --git a/pkgs/os-specific/linux/bpftools/default.nix b/pkgs/os-specific/linux/bpftools/default.nix index 5a02a1022d5..640ab5f76a9 100644 --- a/pkgs/os-specific/linux/bpftools/default.nix +++ b/pkgs/os-specific/linux/bpftools/default.nix @@ -1,14 +1,19 @@ -{ lib, stdenv +{ lib, stdenv, fetchurl , libopcodes, libopcodes_2_38 , libbfd, libbfd_2_38 , elfutils, readline -, linuxPackages_latest, zlib +, zlib , python3, bison, flex }: stdenv.mkDerivation rec { pname = "bpftools"; - inherit (linuxPackages_latest.kernel) version src; + version = "5.19.8"; + + src = fetchurl { + url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; + sha256 = "1kl7fifsa6vsm34xg3kd2svhx18n771hfj67nhwnlalmb9whhqv1"; + }; nativeBuildInputs = [ python3 bison flex ]; buildInputs = (if (lib.versionAtLeast version "5.20") diff --git a/pkgs/os-specific/linux/conky/default.nix b/pkgs/os-specific/linux/conky/default.nix index 87f5bb052f4..9755e516214 100644 --- a/pkgs/os-specific/linux/conky/default.nix +++ b/pkgs/os-specific/linux/conky/default.nix @@ -68,13 +68,13 @@ with lib; stdenv.mkDerivation rec { pname = "conky"; - version = "1.12.2"; + version = "1.13.1"; src = fetchFromGitHub { owner = "brndnmtthws"; repo = "conky"; rev = "v${version}"; - sha256 = "sha256-x6bR5E5LIvKWiVM15IEoUgGas/hcRp3F/O4MTOhVPb8="; + sha256 = "sha256-3eCRzjfHGFiKuxmRHvnzqAg/+ApUKnHhsumWnio/Qxg="; }; postPatch = '' diff --git a/pkgs/os-specific/linux/cpuid/default.nix b/pkgs/os-specific/linux/cpuid/default.nix index abe6f44f31a..70d5b195d9b 100644 --- a/pkgs/os-specific/linux/cpuid/default.nix +++ b/pkgs/os-specific/linux/cpuid/default.nix @@ -6,11 +6,11 @@ stdenv.mkDerivation rec { pname = "cpuid"; - version = "20220812"; + version = "20221003"; src = fetchurl { url = "http://etallen.com/cpuid/${pname}-${version}.src.tar.gz"; - sha256 = "sha256-O/aPuX2UcU+QdjzK2BDfjcX3/pwfmjZSQ2SR/XVBWr8="; + sha256 = "sha256-Y8TFwGtWglgrou7Jbuom14MngqeJWSu5XE5P1icKgwc="; }; # For pod2man during the build process. diff --git a/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch b/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch index c136f935e03..2a6ae96cef1 100644 --- a/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch +++ b/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch @@ -1,5 +1,16 @@ +diff --git a/data/bios-settings.d/meson.build b/data/bios-settings.d/meson.build +index b0ff5b106..13ac380d0 100644 +--- a/data/bios-settings.d/meson.build ++++ b/data/bios-settings.d/meson.build +@@ -1,5 +1,5 @@ + if build_standalone and host_machine.system() == 'linux' + install_data('README.md', +- install_dir: join_paths(sysconfdir, 'fwupd', 'bios-settings.d') ++ install_dir: join_paths(sysconfdir_install, 'fwupd', 'bios-settings.d') + ) + endif diff --git a/data/meson.build b/data/meson.build -index d8494020d..7c896fa0d 100644 +index 3a77a7bfc..747bd1988 100644 --- a/data/meson.build +++ b/data/meson.build @@ -26,7 +26,7 @@ endif @@ -83,7 +94,7 @@ index 1d1698a7e..5469d00a6 100644 + install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), ) diff --git a/meson.build b/meson.build -index e6b717078..f8a7a7455 100644 +index e7980e965..2c66e2dc4 100644 --- a/meson.build +++ b/meson.build @@ -195,6 +195,12 @@ endif @@ -100,7 +111,7 @@ index e6b717078..f8a7a7455 100644 gio = dependency('gio-2.0', version: '>= 2.45.8') giounix = dependency('gio-unix-2.0', version: '>= 2.45.8', required: false) diff --git a/meson_options.txt b/meson_options.txt -index 06d242371..d9e517fc0 100644 +index 6cf92e72e..2e8568292 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,4 @@ @@ -121,7 +132,7 @@ index 67bd3b9d9..ad04a91b6 100644 ) endif diff --git a/plugins/msr/meson.build b/plugins/msr/meson.build -index 13f03ccd4..9235ebe33 100644 +index d626c3ad3..5a2f847d5 100644 --- a/plugins/msr/meson.build +++ b/plugins/msr/meson.build @@ -10,7 +10,7 @@ install_data(['fwupd-msr.conf'], diff --git a/pkgs/os-specific/linux/firmware/fwupd/default.nix b/pkgs/os-specific/linux/firmware/fwupd/default.nix index 541bef93a8a..66cfbef940b 100644 --- a/pkgs/os-specific/linux/firmware/fwupd/default.nix +++ b/pkgs/os-specific/linux/firmware/fwupd/default.nix @@ -114,7 +114,7 @@ let self = stdenv.mkDerivation rec { pname = "fwupd"; - version = "1.8.3"; + version = "1.8.4"; # libfwupd goes to lib # daemon, plug-ins and libfwupdplugin go to out @@ -123,7 +123,7 @@ let src = fetchurl { url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz"; - sha256 = "sha256-ciIpd86KhmJRH/o8CIFWb2xFjsjWHSUNlGYRfWEiOOw="; + sha256 = "sha256-rfoHQ0zcKexBxA/vRg6Nlwlj/gx+hJ3sfzkyrbFh+IY="; }; patches = [ @@ -322,6 +322,7 @@ let passthru = { filesInstalledToEtc = [ + "fwupd/bios-settings.d/README.md" "fwupd/daemon.conf" "fwupd/remotes.d/lvfs-testing.conf" "fwupd/remotes.d/lvfs.conf" diff --git a/pkgs/os-specific/linux/firmware/linux-firmware/default.nix b/pkgs/os-specific/linux/firmware/linux-firmware/default.nix index 20058e7bc82..e882ddd69b4 100644 --- a/pkgs/os-specific/linux/firmware/linux-firmware/default.nix +++ b/pkgs/os-specific/linux/firmware/linux-firmware/default.nix @@ -1,12 +1,18 @@ -{ stdenvNoCC, fetchzip, lib }: +let + source = import ./source.nix; +in { + stdenvNoCC, + fetchzip, + lib, +}: stdenvNoCC.mkDerivation rec { pname = "linux-firmware"; - version = "20220815"; + version = source.version; src = fetchzip { url = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-${version}.tar.gz"; - sha256 = "sha256-StPlnwn4KOvOf4fRblDzJQqyI8iIz8e9fo/BsTyCKjI="; + hash = source.sourceHash; }; installFlags = [ "DESTDIR=$(out)" ]; @@ -16,7 +22,7 @@ stdenvNoCC.mkDerivation rec { outputHashMode = "recursive"; outputHashAlgo = "sha256"; - outputHash = "sha256-VTRrOOkdWepUCKAkziO/0egb3oaQEOJCtsuDEgs/W78="; + outputHash = source.outputHash; meta = with lib; { description = "Binary firmware collection packaged by kernel.org"; diff --git a/pkgs/os-specific/linux/firmware/linux-firmware/source.nix b/pkgs/os-specific/linux/firmware/linux-firmware/source.nix new file mode 100644 index 00000000000..a0f049ce134 --- /dev/null +++ b/pkgs/os-specific/linux/firmware/linux-firmware/source.nix @@ -0,0 +1,6 @@ +# This file is autogenerated! Run ./update.sh to regenerate. +{ + version = "20220913"; + sourceHash = "sha256-qxSgkytJBW9ux95tEOHfz/4pvOp5TII3ICAY7dg5UC8="; + outputHash = "sha256-eVDXNyx9gwa46pBmsoTU9bQ2XBzkjVocIHydieJ9ruU="; +} diff --git a/pkgs/os-specific/linux/firmware/linux-firmware/update.sh b/pkgs/os-specific/linux/firmware/linux-firmware/update.sh new file mode 100755 index 00000000000..cd711db7de4 --- /dev/null +++ b/pkgs/os-specific/linux/firmware/linux-firmware/update.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash +set -euo pipefail +cd "$(dirname "$(readlink -f "$0")")" || exit + +# step 1: figure out the latest version from the tags +repo="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git" +latestTag="$(git ls-remote --refs --tags --sort refname "$repo" | tail -n1 | cut -f2 | cut -d '/' -f3)" + +# step 2: prefetch the source tarball +snapshotUrl="$repo/snapshot/linux-firmware-$latestTag.tar.gz" +hash="$(nix-prefetch-url --unpack "$snapshotUrl")" +sriHash="$(nix --experimental-features nix-command hash to-sri "sha256:$hash")" + +# step 3: rebuild as a non-FO derivation to get the right hash +cat > source.nix << EOF +{ + version = "$latestTag"; + sourceHash = "$sriHash"; + outputHash = null; +} +EOF + +outPath="$(nix --experimental-features "nix-command flakes" build ".#linux-firmware" --no-link --print-out-paths)" +outHash="$(nix --experimental-features nix-command hash path "$outPath")" + +# step 4: generate the final file +cat > source.nix << EOF +# This file is autogenerated! Run ./update.sh to regenerate. +{ + version = "$latestTag"; + sourceHash = "$sriHash"; + outputHash = "$outHash"; +} +EOF diff --git a/pkgs/os-specific/linux/firmware/system76-firmware/default.nix b/pkgs/os-specific/linux/firmware/system76-firmware/default.nix index 9e3a8209a4d..24eb4dcdf61 100644 --- a/pkgs/os-specific/linux/firmware/system76-firmware/default.nix +++ b/pkgs/os-specific/linux/firmware/system76-firmware/default.nix @@ -2,13 +2,13 @@ rustPlatform.buildRustPackage rec { pname = "system76-firmware"; # Check Makefile when updating, make sure postInstall matches make install - version = "1.0.42"; + version = "1.0.43"; src = fetchFromGitHub { owner = "pop-os"; repo = pname; rev = version; - sha256 = "sha256-8raRfmNAvgxBVsFeOu/XPs5YU1wPpRBo3Cog/UpE5/o="; + sha256 = "sha256-0NlM5ugpJzwzXgm8TqM6/aj3b+lDYbLeYOHNHM3g8aw="; }; nativeBuildInputs = [ pkg-config makeWrapper ]; @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { cargoBuildFlags = [ "--workspace" ]; - cargoSha256 = "sha256-aKyLAISZlQz5e8MvOoydAZ4bwCEZ1K3FldyoG6R9FJU="; + cargoSha256 = "sha256-oyHnEWtQ0pl4SaJsnao+oTDBuu9PJdU3uqLTDowRWQw="; # Purposefully don't install systemd unit file, that's for NixOS postInstall = '' diff --git a/pkgs/os-specific/linux/hdparm/default.nix b/pkgs/os-specific/linux/hdparm/default.nix index 1dd0fa6a208..12938dbac89 100644 --- a/pkgs/os-specific/linux/hdparm/default.nix +++ b/pkgs/os-specific/linux/hdparm/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "hdparm"; - version = "9.64"; + version = "9.65"; src = fetchurl { url = "mirror://sourceforge/hdparm/hdparm-${version}.tar.gz"; - sha256 = "sha256-MVuVaVHD/qAnKH3iBDgVNCF8C9Dze0k1h3/i2wyrhZo="; + sha256 = "sha256-0Ukp+RDQYJMucX6TgkJdR8LnFEI1pTcT1VqU995TWks="; }; preBuild = '' diff --git a/pkgs/os-specific/linux/iio-sensor-proxy/default.nix b/pkgs/os-specific/linux/iio-sensor-proxy/default.nix index 5f44622c512..d2dd6605601 100644 --- a/pkgs/os-specific/linux/iio-sensor-proxy/default.nix +++ b/pkgs/os-specific/linux/iio-sensor-proxy/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Proxy for sending IIO sensor data to D-Bus"; - homepage = "https://github.com/hadess/iio-sensor-proxy"; + homepage = "https://gitlab.freedesktop.org/hadess/iio-sensor-proxy"; license = licenses.gpl3 ; maintainers = with maintainers; [ peterhoeg ]; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/iproute/default.nix b/pkgs/os-specific/linux/iproute/default.nix index 0cc8ee3cf3f..87c5c91ecea 100644 --- a/pkgs/os-specific/linux/iproute/default.nix +++ b/pkgs/os-specific/linux/iproute/default.nix @@ -19,6 +19,12 @@ stdenv.mkDerivation rec { url = "https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/patch/?id=a3272b93725a406bc98b67373da67a4bdf6fcdb0"; sha256 = "0hyagh2lf6rrfss4z7ca8q3ydya6gg7vfhh25slhpgcn6lnk0xbv"; }) + + # fix build on musl. applied anywhere to prevent patchrot. + (fetchpatch { + url = "https://git.alpinelinux.org/aports/plain/main/iproute2/min.patch?id=4b78dbe29d18151402052c56af43cc12d04b1a69"; + sha256 = "sha256-0ROZQAN3mUPPgggictr23jyA4JDG7m9vmBUhgRp4ExY="; + }) ]; preConfigure = '' @@ -50,7 +56,6 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; passthru.updateScript = gitUpdater { - inherit pname version; # No nicer place to find latest release. url = "https://git.kernel.org/pub/scm/network/iproute2/iproute2.git"; rev-prefix = "v"; diff --git a/pkgs/os-specific/linux/kbd/default.nix b/pkgs/os-specific/linux/kbd/default.nix index 4d08a38dbe8..c58a1b8db07 100644 --- a/pkgs/os-specific/linux/kbd/default.nix +++ b/pkgs/os-specific/linux/kbd/default.nix @@ -16,11 +16,11 @@ stdenv.mkDerivation rec { pname = "kbd"; - version = "2.4.0"; + version = "2.5.1"; src = fetchurl { url = "mirror://kernel/linux/utils/kbd/${pname}-${version}.tar.xz"; - sha256 = "17wvrqz2kk0w87idinhyvd31ih1dp7ldfl2yfx7ailygb0279w2m"; + sha256 = "sha256-zN9FI4emOAlz0pJzY+nLuTn6IGiRWm+Tf/nSRSICRoM="; }; configureFlags = [ diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 8211860b62f..97bf388d46a 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -270,6 +270,9 @@ let }; video = { + DRM_LEGACY = no; + NOUVEAU_LEGACY_CTX_SUPPORT = whenAtLeast "5.2" no; + # Allow specifying custom EDID on the kernel command line DRM_LOAD_EDID_FIRMWARE = yes; VGA_SWITCHEROO = yes; # Hybrid graphics support diff --git a/pkgs/os-specific/linux/kernel/genksyms-fix-segfault.patch b/pkgs/os-specific/linux/kernel/genksyms-fix-segfault.patch deleted file mode 100644 index 47ae77a5a54..00000000000 --- a/pkgs/os-specific/linux/kernel/genksyms-fix-segfault.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c -index 88632df..ba6cfa9 100644 ---- a/scripts/genksyms/genksyms.c -+++ b/scripts/genksyms/genksyms.c -@@ -233,11 +233,11 @@ static struct symbol *__add_symbol(const char *name, enum symbol_type type, - free_list(last_enum_expr, NULL); - last_enum_expr = NULL; - enum_counter = 0; -- if (!name) -- /* Anonymous enum definition, nothing more to do */ -- return NULL; - } - -+ if (!name) -+ return NULL; -+ - h = crc32(name) % HASH_BUCKETS; - for (sym = symtab[h]; sym; sym = sym->hash_next) { - if (map_to_ns(sym->type) == map_to_ns(type) && diff --git a/pkgs/os-specific/linux/kernel/hardened/config.nix b/pkgs/os-specific/linux/kernel/hardened/config.nix index 0beab0725f6..c90027f3eb1 100644 --- a/pkgs/os-specific/linux/kernel/hardened/config.nix +++ b/pkgs/os-specific/linux/kernel/hardened/config.nix @@ -72,8 +72,12 @@ assert (stdenv.hostPlatform.isx86_64 -> versions.majorMinor version != "5.4"); GCC_PLUGIN_STRUCTLEAK = whenAtLeast "4.11" yes; # A port of the PaX structleak plugin GCC_PLUGIN_STRUCTLEAK_BYREF_ALL = whenAtLeast "4.14" yes; # Also cover structs passed by address GCC_PLUGIN_STACKLEAK = whenAtLeast "4.20" yes; # A port of the PaX stackleak plugin - GCC_PLUGIN_RANDSTRUCT = whenAtLeast "4.13" yes; # A port of the PaX randstruct plugin - GCC_PLUGIN_RANDSTRUCT_PERFORMANCE = whenAtLeast "4.13" yes; + GCC_PLUGIN_RANDSTRUCT = whenBetween "4.13" "5.19" yes; # A port of the PaX randstruct plugin + GCC_PLUGIN_RANDSTRUCT_PERFORMANCE = whenBetween "4.13" "5.19" yes; + + # Same as GCC_PLUGIN_RANDSTRUCT*, but has been renamed to `RANDSTRUCT*` in 5.19. + RANDSTRUCT = whenAtLeast "5.19" yes; + RANDSTRUCT_PERFORMANCE = whenAtLeast "5.19" yes; # Disable various dangerous settings ACPI_CUSTOM_METHOD = no; # Allows writing directly to physical memory diff --git a/pkgs/os-specific/linux/kernel/hardened/patches.json b/pkgs/os-specific/linux/kernel/hardened/patches.json index 82fea2f9b5d..c9e600657bf 100644 --- a/pkgs/os-specific/linux/kernel/hardened/patches.json +++ b/pkgs/os-specific/linux/kernel/hardened/patches.json @@ -2,71 +2,61 @@ "4.14": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-4.14.291-hardened1.patch", - "sha256": "04fkfk5kdbqavdg5syyv35xbc8dl5pz8vf1xsvfcv30z5rslsr2c", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/4.14.291-hardened1/linux-hardened-4.14.291-hardened1.patch" + "name": "linux-hardened-4.14.295-hardened1.patch", + "sha256": "0jync3d52qif0pxnmbx7js7zgxnrhrjxiiyp0n57cmdxi9jcjc8j", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/4.14.295-hardened1/linux-hardened-4.14.295-hardened1.patch" }, - "sha256": "15h76l81zn733g8dc6gsymf52nz325plhminv3m4x3klwhav34zc", - "version": "4.14.291" + "sha256": "0svalywqmrhav63vw0ns06c25sgyvzwfngljpham3nm7jjxbkk32", + "version": "4.14.295" }, "4.19": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-4.19.256-hardened1.patch", - "sha256": "1vqdv2xnfr4ccnfvdrdhj7i0yjhjf48kgc9sziz7fwnfdis8zrrf", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/4.19.256-hardened1/linux-hardened-4.19.256-hardened1.patch" + "name": "linux-hardened-4.19.260-hardened1.patch", + "sha256": "08b3kk5m12yqq12ik1d9zxaga2pzw2znzcwh9ymk6i9b8y5f3bsm", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/4.19.260-hardened1/linux-hardened-4.19.260-hardened1.patch" }, - "sha256": "0jgm7ydha9achbcq3a6q85wq1nz4qg7phx122jzk0mqb1339bpk7", - "version": "4.19.256" + "sha256": "1vlhaapbkvvk2acw1i5f6v6gd8v0x37n1y3i066cddl90my6yl24", + "version": "4.19.260" }, "5.10": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-5.10.140-hardened1.patch", - "sha256": "0352nh6r9p3djk07lprjpmd8q17kkqb5pi2zwrywlxrzws4wqhzh", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.10.140-hardened1/linux-hardened-5.10.140-hardened1.patch" + "name": "linux-hardened-5.10.146-hardened1.patch", + "sha256": "1ah8p0iy4cqjhmjd1zxqvspihx0wkj515ggca65rjrpmfr05f2ll", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.10.146-hardened1/linux-hardened-5.10.146-hardened1.patch" }, - "sha256": "00v8mdbc8ndx29grfnlf49ifikqxnl25zn0243j3bgclvfyxipx4", - "version": "5.10.140" + "sha256": "1hbdxvlibp9w0q8bk1zlx77ayq2wcld8rjm134ybgbcf4zrrggbv", + "version": "5.10.146" }, "5.15": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-5.15.64-hardened1.patch", - "sha256": "08hj5rx37vmw8mapzz15smpp775vrzhbfh2i0xps5qwi9majywrf", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.15.64-hardened1/linux-hardened-5.15.64-hardened1.patch" + "name": "linux-hardened-5.15.71-hardened1.patch", + "sha256": "0yfvwivjj8swc4l0ngq4x1104jpfmzj9cb4pvxsagkkf8dwfvqc6", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.15.71-hardened1/linux-hardened-5.15.71-hardened1.patch" }, - "sha256": "0l6ylmxhk3lqz2zyqcbyhbfcq1p8i84g0p1d6x0q6yd3dy6d78f6", - "version": "5.15.64" - }, - "5.18": { - "patch": { - "extra": "-hardened1", - "name": "linux-hardened-5.18.19-hardened1.patch", - "sha256": "1q61641b8lr87h04kjpd7izgi4kxdvknsn8ssmcs8n6fk6cswv8c", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.18.19-hardened1/linux-hardened-5.18.19-hardened1.patch" - }, - "sha256": "1mc8zhiw0v7fka64mydpdrxkrvy0jyqggq5lghw3pyqj2wjrpw6z", - "version": "5.18.19" + "sha256": "0lqy3nmhij6sb4963kb5dhvfdx46mg79hp81kq10wv01iq9hhm2z", + "version": "5.15.71" }, "5.19": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-5.19.6-hardened1.patch", - "sha256": "1lx4li0f0j6wmh3p75hr2qa780ckybhma8s34p6xlbvxz054ncpr", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.19.6-hardened1/linux-hardened-5.19.6-hardened1.patch" + "name": "linux-hardened-5.19.12-hardened1.patch", + "sha256": "157m9mkdqpm01rzwsgdcv88z51642fp3v0h5q0mafg4ph4afd7pg", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.19.12-hardened1/linux-hardened-5.19.12-hardened1.patch" }, - "sha256": "0fm6xysg5mjfig0jils700ph83mvvkl27ix757260i31mwjgi921", - "version": "5.19.6" + "sha256": "1fmhwbgqpr6q3z3ygys153szivlmv3mcnwilbbyfcb1iqx4aadn4", + "version": "5.19.12" }, "5.4": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-5.4.211-hardened1.patch", - "sha256": "061c1c3ha88798l9q3n2dd3ankvw0hlz8f8cisxljpzfj4napk8z", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.4.211-hardened1/linux-hardened-5.4.211-hardened1.patch" + "name": "linux-hardened-5.4.215-hardened1.patch", + "sha256": "1xfyvppf16y7bjmjkhpps9vp4zw2dcrk18kajj1lkzhh441y1g94", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/5.4.215-hardened1/linux-hardened-5.4.215-hardened1.patch" }, - "sha256": "1v1dgsk66fi6x6v9k6hg9ik3f3b3pv7a3gk8mybmgm9cnx0k5d5z", - "version": "5.4.211" + "sha256": "1gafnf9gbsfzvp9jq6y8qhpvas5cv9y0m9bad2sg55sjlb1zfard", + "version": "5.4.215" } } diff --git a/pkgs/os-specific/linux/kernel/hardened/update.py b/pkgs/os-specific/linux/kernel/hardened/update.py index 8b40088756e..e289a97c56f 100755 --- a/pkgs/os-specific/linux/kernel/hardened/update.py +++ b/pkgs/os-specific/linux/kernel/hardened/update.py @@ -138,7 +138,7 @@ def fetch_patch(*, name: str, release_info: ReleaseInfo) -> Optional[Patch]: if not sig_ok: return None - kernel_ver = release_info.release.tag_name.replace("-hardened1", "") + kernel_ver = re.sub(r"(.*)(-hardened[\d]+)$", r'\1', release_info.release.tag_name) major = kernel_ver.split('.')[0] sha256_kernel, _ = nix_prefetch_url(f"mirror://kernel/linux/kernel/v{major}.x/linux-{kernel_ver}.tar.xz") diff --git a/pkgs/os-specific/linux/kernel/linux-4.14.nix b/pkgs/os-specific/linux/kernel/linux-4.14.nix index cbcb2d04def..655bba0c897 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.14.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.14.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "4.14.291"; + version = "4.14.295"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "15h76l81zn733g8dc6gsymf52nz325plhminv3m4x3klwhav34zc"; + sha256 = "0svalywqmrhav63vw0ns06c25sgyvzwfngljpham3nm7jjxbkk32"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-4.19.nix b/pkgs/os-specific/linux/kernel/linux-4.19.nix index d1923b847e7..cd07e1a9144 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.19.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.19.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "4.19.256"; + version = "4.19.261"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "0jgm7ydha9achbcq3a6q85wq1nz4qg7phx122jzk0mqb1339bpk7"; + sha256 = "1cicb3zydpka9yjx875hbh305bsdvni2kp674pkvaw04pnc35hxy"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-4.9.nix b/pkgs/os-specific/linux/kernel/linux-4.9.nix index 4fc1ce1f1e5..c9b002abd78 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.9.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.9.nix @@ -1,12 +1,12 @@ { buildPackages, fetchurl, perl, buildLinux, nixosTests, stdenv, ... } @ args: buildLinux (args // rec { - version = "4.9.326"; + version = "4.9.330"; extraMeta.branch = "4.9"; extraMeta.broken = stdenv.isAarch64; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "0yw83a8nk5abjsvqrz8m2sj699c228j2f2wr5q8m95vgqzfw5wrb"; + sha256 = "0psrl8fcbp1bsanjmllic503dlyhkj8bjzfc20p2ksahlhv1j0mz"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-5.10.nix b/pkgs/os-specific/linux/kernel/linux-5.10.nix index 3a08b4a0a45..febd6664956 100644 --- a/pkgs/os-specific/linux/kernel/linux-5.10.nix +++ b/pkgs/os-specific/linux/kernel/linux-5.10.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "5.10.140"; + version = "5.10.147"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "00v8mdbc8ndx29grfnlf49ifikqxnl25zn0243j3bgclvfyxipx4"; + sha256 = "16pdpjmvrdml7am7s2kydrif1l7f4aq0wh4ak0xh3dby16zkl9c5"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-5.15.nix b/pkgs/os-specific/linux/kernel/linux-5.15.nix index 8e0edd8273e..7ae1f282256 100644 --- a/pkgs/os-specific/linux/kernel/linux-5.15.nix +++ b/pkgs/os-specific/linux/kernel/linux-5.15.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "5.15.64"; + version = "5.15.72"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "0l6ylmxhk3lqz2zyqcbyhbfcq1p8i84g0p1d6x0q6yd3dy6d78f6"; + sha256 = "1aq75z2spa1jvxv9m89gsaxza29n25k8j1f0pg9yj6j7bcxk5430"; }; } // (args.argsOverride or { })) diff --git a/pkgs/os-specific/linux/kernel/linux-5.19.nix b/pkgs/os-specific/linux/kernel/linux-5.19.nix index 42fd32716da..06041ed9450 100644 --- a/pkgs/os-specific/linux/kernel/linux-5.19.nix +++ b/pkgs/os-specific/linux/kernel/linux-5.19.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "5.19.6"; + version = "5.19.14"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "0fm6xysg5mjfig0jils700ph83mvvkl27ix757260i31mwjgi921"; + sha256 = "1h8srn3fw4vw61qi0xxlk9fq0fqq4wl7fbrzz7sivdd8qkhjgv8x"; }; } // (args.argsOverride or { })) diff --git a/pkgs/os-specific/linux/kernel/linux-5.4.nix b/pkgs/os-specific/linux/kernel/linux-5.4.nix index f08433e50b4..41e925a9d25 100644 --- a/pkgs/os-specific/linux/kernel/linux-5.4.nix +++ b/pkgs/os-specific/linux/kernel/linux-5.4.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "5.4.211"; + version = "5.4.216"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "1v1dgsk66fi6x6v9k6hg9ik3f3b3pv7a3gk8mybmgm9cnx0k5d5z"; + sha256 = "19vyxa0yzdf4w48jamjfz6kpiaaa7mjjz5gs2awckzilfc0n4pyf"; }; } // (args.argsOverride or {})) diff --git a/pkgs/os-specific/linux/kernel/linux-5.18.nix b/pkgs/os-specific/linux/kernel/linux-6.0.nix index 1e36baf9c4e..b099c5dc140 100644 --- a/pkgs/os-specific/linux/kernel/linux-5.18.nix +++ b/pkgs/os-specific/linux/kernel/linux-6.0.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "5.18.19"; + version = "6.0"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -12,7 +12,7 @@ buildLinux (args // rec { extraMeta.branch = versions.majorMinor version; src = fetchurl { - url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "1mc8zhiw0v7fka64mydpdrxkrvy0jyqggq5lghw3pyqj2wjrpw6z"; + url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; + sha256 = "13kqh7yhifwz5dmd3ky0b3mzbh9r0nmjfp5mxy42drcdafjl692w"; }; } // (args.argsOverride or { })) diff --git a/pkgs/os-specific/linux/kernel/linux-libre.nix b/pkgs/os-specific/linux/kernel/linux-libre.nix index 437366d1f6e..1814d4cee06 100644 --- a/pkgs/os-specific/linux/kernel/linux-libre.nix +++ b/pkgs/os-specific/linux/kernel/linux-libre.nix @@ -1,8 +1,8 @@ { stdenv, lib, fetchsvn, linux , scripts ? fetchsvn { url = "https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/branches/"; - rev = "18885"; - sha256 = "1ywd4bhjh6pqxvv20jgadmyvrcrdwf8333z8rzbjy6r0b4fggpra"; + rev = "18950"; + sha256 = "1k84mqvi71bmd7x0km980z1y7cm71fc6jvnf2rzhxss9pjscrh2j"; } , ... }: diff --git a/pkgs/os-specific/linux/kernel/linux-rt-5.10.nix b/pkgs/os-specific/linux/kernel/linux-rt-5.10.nix index 58be2be6e9d..755a058c1f9 100644 --- a/pkgs/os-specific/linux/kernel/linux-rt-5.10.nix +++ b/pkgs/os-specific/linux/kernel/linux-rt-5.10.nix @@ -6,7 +6,7 @@ , ... } @ args: let - version = "5.10.131-rt72"; # updated by ./update-rt.sh + version = "5.10.145-rt74"; # updated by ./update-rt.sh branch = lib.versions.majorMinor version; kversion = builtins.elemAt (lib.splitString "-" version) 0; in buildLinux (args // { @@ -18,14 +18,14 @@ in buildLinux (args // { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${kversion}.tar.xz"; - sha256 = "1ki11mvl3dky7iih90znr47vr66dxnlwrqwg2jkk1hqn5i243i4b"; + sha256 = "0qdcqmwvc70hfgj8hb8ccwmnvwl41dvdffqrmyg3cyblwprr0ngw"; }; kernelPatches = let rt-patch = { name = "rt"; patch = fetchurl { url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz"; - sha256 = "0ag000h9m7phvgrqa4jcmd94x0rk8z8bh7qhqqlywbiz2b1b91qa"; + sha256 = "16a2cnvn1azxsw1qjwbygkych0jzkfpmj0kx08jdz3fx3xbmqpr4"; }; }; in [ rt-patch ] ++ kernelPatches; diff --git a/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix b/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix index a1748156d09..6c3e739e27d 100644 --- a/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix +++ b/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix @@ -1,9 +1,9 @@ { lib , fetchpatch , kernel -, date ? "2022-04-25" -, commit ? "bdf6d7c1350497bc7b0be6027a51d9330645672d" -, diffHash ? "09bcbklvfj9i9czjdpix2iz7fvjksmavaljx8l92ay1i9fapjmhc" +, commitDate ? "2022-09-28" +, currentCommit ? "24c6361e202cc09de0159505eb3ab3ca265520d8" +, diffHash ? "sha256-Y3uKkVMCaLGJpYb27ef3FfbqEQ32mgCVpWtYzvYamr8=" , kernelPatches # must always be defined in bcachefs' all-packages.nix entry because it's also a top-level attribute supplied by callPackage , argsOverride ? {} , ... @@ -12,21 +12,20 @@ # NOTE: bcachefs-tools should be updated simultaneously to preserve compatibility (kernel.override ( args // { argsOverride = { - version = "${kernel.version}-bcachefs-unstable-${date}"; + version = "${kernel.version}-bcachefs-unstable-${commitDate}"; extraMeta = { branch = "master"; maintainers = with lib.maintainers; [ davidak Madouura ]; - broken = true; }; } // argsOverride; kernelPatches = [ { - name = "bcachefs-${commit}"; + name = "bcachefs-${currentCommit}"; patch = fetchpatch { - name = "bcachefs-${commit}.diff"; - url = "https://evilpiepirate.org/git/bcachefs.git/rawdiff/?id=${commit}&id2=v${lib.versions.majorMinor kernel.version}"; + name = "bcachefs-${currentCommit}.diff"; + url = "https://evilpiepirate.org/git/bcachefs.git/rawdiff/?id=${currentCommit}&id2=v${lib.versions.majorMinor kernel.version}"; sha256 = diffHash; }; diff --git a/pkgs/os-specific/linux/kernel/linux-testing.nix b/pkgs/os-specific/linux/kernel/linux-testing.nix index a4304e9e936..3d07fd3175b 100644 --- a/pkgs/os-specific/linux/kernel/linux-testing.nix +++ b/pkgs/os-specific/linux/kernel/linux-testing.nix @@ -3,7 +3,7 @@ with lib; buildLinux (args // rec { - version = "6.0-rc1"; + version = "6.0-rc5"; extraMeta.branch = lib.versions.majorMinor version; # modDirVersion needs to be x.y.z, will always add .0 @@ -11,7 +11,7 @@ buildLinux (args // rec { src = fetchurl { url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz"; - sha256 = "sha256-RReHoEYavib86K9XQKwguBYQvyQboRl7537p69P8ca0="; + hash = "sha256-GELU1ZEOM5gGUJxG54JoiI9qLQXJ2Cd/kyOLcp0AWgc="; }; # Should the testing kernels ever be built on Hydra? diff --git a/pkgs/os-specific/linux/kernel/mac-nvme-t2.patch b/pkgs/os-specific/linux/kernel/mac-nvme-t2.patch deleted file mode 100644 index 2f1fa6a0dae..00000000000 --- a/pkgs/os-specific/linux/kernel/mac-nvme-t2.patch +++ /dev/null @@ -1,283 +0,0 @@ -diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c -index dd10cf78f2d3..8f006638452b 100644 ---- a/drivers/nvme/host/pci.c -+++ b/drivers/nvme/host/pci.c -@@ -28,8 +28,8 @@ - #include "trace.h" - #include "nvme.h" - --#define SQ_SIZE(depth) (depth * sizeof(struct nvme_command)) --#define CQ_SIZE(depth) (depth * sizeof(struct nvme_completion)) -+#define SQ_SIZE(q) ((q)->q_depth * sizeof(struct nvme_command)) -+#define CQ_SIZE(q) ((q)->q_depth * sizeof(struct nvme_completion)) - - #define SGES_PER_PAGE (PAGE_SIZE / sizeof(struct nvme_sgl_desc)) - -@@ -1344,16 +1344,16 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved) - - static void nvme_free_queue(struct nvme_queue *nvmeq) - { -- dma_free_coherent(nvmeq->dev->dev, CQ_SIZE(nvmeq->q_depth), -+ dma_free_coherent(nvmeq->dev->dev, CQ_SIZE(nvmeq), - (void *)nvmeq->cqes, nvmeq->cq_dma_addr); - if (!nvmeq->sq_cmds) - return; - - if (test_and_clear_bit(NVMEQ_SQ_CMB, &nvmeq->flags)) { - pci_free_p2pmem(to_pci_dev(nvmeq->dev->dev), -- nvmeq->sq_cmds, SQ_SIZE(nvmeq->q_depth)); -+ nvmeq->sq_cmds, SQ_SIZE(nvmeq)); - } else { -- dma_free_coherent(nvmeq->dev->dev, SQ_SIZE(nvmeq->q_depth), -+ dma_free_coherent(nvmeq->dev->dev, SQ_SIZE(nvmeq), - nvmeq->sq_cmds, nvmeq->sq_dma_addr); - } - } -@@ -1433,12 +1433,12 @@ static int nvme_cmb_qdepth(struct nvme_dev *dev, int nr_io_queues, - } - - static int nvme_alloc_sq_cmds(struct nvme_dev *dev, struct nvme_queue *nvmeq, -- int qid, int depth) -+ int qid) - { - struct pci_dev *pdev = to_pci_dev(dev->dev); - - if (qid && dev->cmb_use_sqes && (dev->cmbsz & NVME_CMBSZ_SQS)) { -- nvmeq->sq_cmds = pci_alloc_p2pmem(pdev, SQ_SIZE(depth)); -+ nvmeq->sq_cmds = pci_alloc_p2pmem(pdev, SQ_SIZE(nvmeq)); - if (nvmeq->sq_cmds) { - nvmeq->sq_dma_addr = pci_p2pmem_virt_to_bus(pdev, - nvmeq->sq_cmds); -@@ -1447,11 +1447,11 @@ static int nvme_alloc_sq_cmds(struct nvme_dev *dev, struct nvme_queue *nvmeq, - return 0; - } - -- pci_free_p2pmem(pdev, nvmeq->sq_cmds, SQ_SIZE(depth)); -+ pci_free_p2pmem(pdev, nvmeq->sq_cmds, SQ_SIZE(nvmeq)); - } - } - -- nvmeq->sq_cmds = dma_alloc_coherent(dev->dev, SQ_SIZE(depth), -+ nvmeq->sq_cmds = dma_alloc_coherent(dev->dev, SQ_SIZE(nvmeq), - &nvmeq->sq_dma_addr, GFP_KERNEL); - if (!nvmeq->sq_cmds) - return -ENOMEM; -@@ -1465,12 +1465,13 @@ static int nvme_alloc_queue(struct nvme_dev *dev, int qid, int depth) - if (dev->ctrl.queue_count > qid) - return 0; - -- nvmeq->cqes = dma_alloc_coherent(dev->dev, CQ_SIZE(depth), -+ nvmeq->q_depth = depth; -+ nvmeq->cqes = dma_alloc_coherent(dev->dev, CQ_SIZE(nvmeq), - &nvmeq->cq_dma_addr, GFP_KERNEL); - if (!nvmeq->cqes) - goto free_nvmeq; - -- if (nvme_alloc_sq_cmds(dev, nvmeq, qid, depth)) -+ if (nvme_alloc_sq_cmds(dev, nvmeq, qid)) - goto free_cqdma; - - nvmeq->dev = dev; -@@ -1479,15 +1480,14 @@ static int nvme_alloc_queue(struct nvme_dev *dev, int qid, int depth) - nvmeq->cq_head = 0; - nvmeq->cq_phase = 1; - nvmeq->q_db = &dev->dbs[qid * 2 * dev->db_stride]; -- nvmeq->q_depth = depth; - nvmeq->qid = qid; - dev->ctrl.queue_count++; - - return 0; - - free_cqdma: -- dma_free_coherent(dev->dev, CQ_SIZE(depth), (void *)nvmeq->cqes, -- nvmeq->cq_dma_addr); -+ dma_free_coherent(dev->dev, CQ_SIZE(nvmeq), (void *)nvmeq->cqes, -+ nvmeq->cq_dma_addr); - free_nvmeq: - return -ENOMEM; - } -@@ -1515,7 +1515,7 @@ static void nvme_init_queue(struct nvme_queue *nvmeq, u16 qid) - nvmeq->cq_head = 0; - nvmeq->cq_phase = 1; - nvmeq->q_db = &dev->dbs[qid * 2 * dev->db_stride]; -- memset((void *)nvmeq->cqes, 0, CQ_SIZE(nvmeq->q_depth)); -+ memset((void *)nvmeq->cqes, 0, CQ_SIZE(nvmeq)); - nvme_dbbuf_init(dev, nvmeq, qid); - dev->online_queues++; - wmb(); /* ensure the first interrupt sees the initialization */ -diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c -index cc09b81fc7f4..716ebe87a2b8 100644 ---- a/drivers/nvme/host/core.c -+++ b/drivers/nvme/host/core.c -@@ -1986,6 +1986,7 @@ int nvme_enable_ctrl(struct nvme_ctrl *ctrl, u64 cap) - ctrl->ctrl_config = NVME_CC_CSS_NVM; - ctrl->ctrl_config |= (page_shift - 12) << NVME_CC_MPS_SHIFT; - ctrl->ctrl_config |= NVME_CC_AMS_RR | NVME_CC_SHN_NONE; -+ /* Use default IOSQES. We'll update it later if needed */ - ctrl->ctrl_config |= NVME_CC_IOSQES | NVME_CC_IOCQES; - ctrl->ctrl_config |= NVME_CC_ENABLE; - -@@ -2698,6 +2699,30 @@ int nvme_init_identify(struct nvme_ctrl *ctrl) - ctrl->hmmin = le32_to_cpu(id->hmmin); - ctrl->hmminds = le32_to_cpu(id->hmminds); - ctrl->hmmaxd = le16_to_cpu(id->hmmaxd); -+ -+ /* Grab required IO queue size */ -+ ctrl->iosqes = id->sqes & 0xf; -+ if (ctrl->iosqes < NVME_NVM_IOSQES) { -+ dev_err(ctrl->device, -+ "unsupported required IO queue size %d\n", ctrl->iosqes); -+ ret = -EINVAL; -+ goto out_free; -+ } -+ /* -+ * If our IO queue size isn't the default, update the setting -+ * in CC:IOSQES. -+ */ -+ if (ctrl->iosqes != NVME_NVM_IOSQES) { -+ ctrl->ctrl_config &= ~(0xfu << NVME_CC_IOSQES_SHIFT); -+ ctrl->ctrl_config |= ctrl->iosqes << NVME_CC_IOSQES_SHIFT; -+ ret = ctrl->ops->reg_write32(ctrl, NVME_REG_CC, -+ ctrl->ctrl_config); -+ if (ret) { -+ dev_err(ctrl->device, -+ "error updating CC register\n"); -+ goto out_free; -+ } -+ } - } - - ret = nvme_mpath_init(ctrl, id); -diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h -index 716a876119c8..34ef35fcd8a5 100644 ---- a/drivers/nvme/host/nvme.h -+++ b/drivers/nvme/host/nvme.h -@@ -244,6 +244,7 @@ struct nvme_ctrl { - u32 hmmin; - u32 hmminds; - u16 hmmaxd; -+ u8 iosqes; - - /* Fabrics only */ - u16 sqsize; -diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c -index 8f006638452b..54b35ea4af88 100644 ---- a/drivers/nvme/host/pci.c -+++ b/drivers/nvme/host/pci.c -@@ -28,7 +28,7 @@ - #include "trace.h" - #include "nvme.h" - --#define SQ_SIZE(q) ((q)->q_depth * sizeof(struct nvme_command)) -+#define SQ_SIZE(q) ((q)->q_depth << (q)->sqes) - #define CQ_SIZE(q) ((q)->q_depth * sizeof(struct nvme_completion)) - - #define SGES_PER_PAGE (PAGE_SIZE / sizeof(struct nvme_sgl_desc)) -@@ -162,7 +162,7 @@ static inline struct nvme_dev *to_nvme_dev(struct nvme_ctrl *ctrl) - struct nvme_queue { - struct nvme_dev *dev; - spinlock_t sq_lock; -- struct nvme_command *sq_cmds; -+ void *sq_cmds; - /* only used for poll queues: */ - spinlock_t cq_poll_lock ____cacheline_aligned_in_smp; - volatile struct nvme_completion *cqes; -@@ -178,6 +178,7 @@ struct nvme_queue { - u16 last_cq_head; - u16 qid; - u8 cq_phase; -+ u8 sqes; - unsigned long flags; - #define NVMEQ_ENABLED 0 - #define NVMEQ_SQ_CMB 1 -@@ -488,7 +489,8 @@ static void nvme_submit_cmd(struct nvme_queue *nvmeq, struct nvme_command *cmd, - bool write_sq) - { - spin_lock(&nvmeq->sq_lock); -- memcpy(&nvmeq->sq_cmds[nvmeq->sq_tail], cmd, sizeof(*cmd)); -+ memcpy(nvmeq->sq_cmds + (nvmeq->sq_tail << nvmeq->sqes), -+ cmd, sizeof(*cmd)); - if (++nvmeq->sq_tail == nvmeq->q_depth) - nvmeq->sq_tail = 0; - nvme_write_sq_db(nvmeq, write_sq); -@@ -1465,6 +1467,7 @@ static int nvme_alloc_queue(struct nvme_dev *dev, int qid, int depth) - if (dev->ctrl.queue_count > qid) - return 0; - -+ nvmeq->sqes = qid ? dev->ctrl.iosqes : NVME_NVM_ADMSQES; - nvmeq->q_depth = depth; - nvmeq->cqes = dma_alloc_coherent(dev->dev, CQ_SIZE(nvmeq), - &nvmeq->cq_dma_addr, GFP_KERNEL); -diff --git a/include/linux/nvme.h b/include/linux/nvme.h -index 01aa6a6c241d..7af18965fb57 100644 ---- a/include/linux/nvme.h -+++ b/include/linux/nvme.h -@@ -141,6 +141,7 @@ enum { - * (In bytes and specified as a power of two (2^n)). - */ - #define NVME_NVM_IOSQES 6 -+#define NVME_NVM_ADMSQES 6 - #define NVME_NVM_IOCQES 4 - - enum { -diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c -index 716ebe87a2b8..480ea24d8cf4 100644 ---- a/drivers/nvme/host/core.c -+++ b/drivers/nvme/host/core.c -@@ -2701,7 +2701,10 @@ int nvme_init_identify(struct nvme_ctrl *ctrl) - ctrl->hmmaxd = le16_to_cpu(id->hmmaxd); - - /* Grab required IO queue size */ -- ctrl->iosqes = id->sqes & 0xf; -+ if (ctrl->quirks & NVME_QUIRK_128_BYTES_SQES) -+ ctrl->iosqes = 7; -+ else -+ ctrl->iosqes = id->sqes & 0xf; - if (ctrl->iosqes < NVME_NVM_IOSQES) { - dev_err(ctrl->device, - "unsupported required IO queue size %d\n", ctrl->iosqes); -diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h -index 34ef35fcd8a5..b2a78d08b984 100644 ---- a/drivers/nvme/host/nvme.h -+++ b/drivers/nvme/host/nvme.h -@@ -92,6 +92,16 @@ enum nvme_quirks { - * Broken Write Zeroes. - */ - NVME_QUIRK_DISABLE_WRITE_ZEROES = (1 << 9), -+ -+ /* -+ * Use only one interrupt vector for all queues -+ */ -+ NVME_QUIRK_SINGLE_VECTOR = (1 << 10), -+ -+ /* -+ * Use non-standard 128 bytes SQEs. -+ */ -+ NVME_QUIRK_128_BYTES_SQES = (1 << 11), - }; - - /* -diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c -index 54b35ea4af88..ab2358137419 100644 ---- a/drivers/nvme/host/pci.c -+++ b/drivers/nvme/host/pci.c -@@ -2080,6 +2080,9 @@ static int nvme_setup_irqs(struct nvme_dev *dev, unsigned int nr_io_queues) - dev->io_queues[HCTX_TYPE_DEFAULT] = 1; - dev->io_queues[HCTX_TYPE_READ] = 0; - -+ if (dev->ctrl.quirks & NVME_QUIRK_SINGLE_VECTOR) -+ irq_queues = 1; -+ - return pci_alloc_irq_vectors_affinity(pdev, 1, irq_queues, - PCI_IRQ_ALL_TYPES | PCI_IRQ_AFFINITY, &affd); - } -@@ -3037,6 +3040,9 @@ static const struct pci_device_id nvme_id_table[] = { - { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) }, - { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001) }, - { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2003) }, -+ { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2005), -+ .driver_data = NVME_QUIRK_SINGLE_VECTOR | -+ NVME_QUIRK_128_BYTES_SQES }, - { 0, } - }; - MODULE_DEVICE_TABLE(pci, nvme_id_table); diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 4780c959315..1049d1c62a9 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -131,11 +131,14 @@ let # the buildFlags, but that would require also patching the kernel's # toplevel Makefile to add a variable export. This would be likely to # cause future patch conflicts. - if [ -f scripts/gcc-plugins/gen-random-seed.sh ]; then - substituteInPlace scripts/gcc-plugins/gen-random-seed.sh \ - --replace NIXOS_RANDSTRUCT_SEED \ - $(echo ${randstructSeed}${src} ${configfile} | sha256sum | cut -d ' ' -f 1 | tr -d '\n') - fi + for file in scripts/gen-randstruct-seed.sh scripts/gcc-plugins/gen-random-seed.sh; do + if [ -f "$file" ]; then + substituteInPlace "$file" \ + --replace NIXOS_RANDSTRUCT_SEED \ + $(echo ${randstructSeed}${src} ${configfile} | sha256sum | cut -d ' ' -f 1 | tr -d '\n') + break + fi + done patchShebangs scripts diff --git a/pkgs/os-specific/linux/kernel/p9-fixes.patch b/pkgs/os-specific/linux/kernel/p9-fixes.patch deleted file mode 100644 index f6061b60667..00000000000 --- a/pkgs/os-specific/linux/kernel/p9-fixes.patch +++ /dev/null @@ -1,85 +0,0 @@ -diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c ---- a/fs/9p/vfs_inode.c -+++ b/fs/9p/vfs_inode.c -@@ -483,6 +483,9 @@ static int v9fs_test_inode(struct inode *inode, void *data) - - if (v9inode->qid.type != st->qid.type) - return 0; -+ -+ if (v9inode->qid.path != st->qid.path) -+ return 0; - return 1; - } - -diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c ---- a/fs/9p/vfs_inode_dotl.c -+++ b/fs/9p/vfs_inode_dotl.c -@@ -87,6 +87,9 @@ static int v9fs_test_inode_dotl(struct inode *inode, void *data) - - if (v9inode->qid.type != st->qid.type) - return 0; -+ -+ if (v9inode->qid.path != st->qid.path) -+ return 0; - return 1; - } - -diff --git a/net/9p/client.c b/net/9p/client.c -index 3ce672af1596..f1c8ad373f90 100644 ---- a/net/9p/client.c -+++ b/net/9p/client.c -@@ -749,8 +749,7 @@ p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...) - } - again: - /* Wait for the response */ -- err = wait_event_interruptible(*req->wq, -- req->status >= REQ_STATUS_RCVD); -+ err = wait_event_killable(*req->wq, req->status >= REQ_STATUS_RCVD); - - /* - * Make sure our req is coherent with regard to updates in other -diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c -index f24b25c25106..f3a4efcf1456 100644 ---- a/net/9p/trans_virtio.c -+++ b/net/9p/trans_virtio.c -@@ -286,8 +286,8 @@ p9_virtio_request(struct p9_client *client, struct p9_req_t *req) - if (err == -ENOSPC) { - chan->ring_bufs_avail = 0; - spin_unlock_irqrestore(&chan->lock, flags); -- err = wait_event_interruptible(*chan->vc_wq, -- chan->ring_bufs_avail); -+ err = wait_event_killable(*chan->vc_wq, -+ chan->ring_bufs_avail); - if (err == -ERESTARTSYS) - return err; - -@@ -327,7 +327,7 @@ static int p9_get_mapped_pages(struct virtio_chan *chan, - * Other zc request to finish here - */ - if (atomic_read(&vp_pinned) >= chan->p9_max_pages) { -- err = wait_event_interruptible(vp_wq, -+ err = wait_event_killable(vp_wq, - (atomic_read(&vp_pinned) < chan->p9_max_pages)); - if (err == -ERESTARTSYS) - return err; -@@ -471,8 +471,8 @@ p9_virtio_zc_request(struct p9_client *client, struct p9_req_t *req, - if (err == -ENOSPC) { - chan->ring_bufs_avail = 0; - spin_unlock_irqrestore(&chan->lock, flags); -- err = wait_event_interruptible(*chan->vc_wq, -- chan->ring_bufs_avail); -+ err = wait_event_killable(*chan->vc_wq, -+ chan->ring_bufs_avail); - if (err == -ERESTARTSYS) - goto err_out; - -@@ -489,8 +489,7 @@ p9_virtio_zc_request(struct p9_client *client, struct p9_req_t *req, - virtqueue_kick(chan->vq); - spin_unlock_irqrestore(&chan->lock, flags); - p9_debug(P9_DEBUG_TRANS, "virtio request kicked\n"); -- err = wait_event_interruptible(*req->wq, -- req->status >= REQ_STATUS_RCVD); -+ err = wait_event_killable(*req->wq, req->status >= REQ_STATUS_RCVD); - /* - * Non kernel buffers are pinned, unpin them - */ diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix index f64a0a0ef15..f941ca9f007 100644 --- a/pkgs/os-specific/linux/kernel/patches.nix +++ b/pkgs/os-specific/linux/kernel/patches.nix @@ -29,21 +29,11 @@ patch = ./request-key-helper-updated.patch; }; - p9_fixes = - { name = "p9-fixes"; - patch = ./p9-fixes.patch; - }; - modinst_arg_list_too_long = { name = "modinst-arglist-too-long"; patch = ./modinst-arg-list-too-long.patch; }; - genksyms_fix_segfault = - { name = "genksyms-fix-segfault"; - patch = ./genksyms-fix-segfault.patch; - }; - cpu-cgroup-v2 = import ./cpu-cgroup-v2-patches; hardened = let @@ -56,36 +46,6 @@ patches = lib.importJSON ./hardened/patches.json; in lib.mapAttrs mkPatch patches; - # https://bugzilla.kernel.org/show_bug.cgi?id=197591#c6 - iwlwifi_mvm_support_version_7_scan_req_umac_fw_command = rec { - name = "iwlwifi_mvm_support_version_7_scan_req_umac_fw_command"; - patch = fetchpatch { - name = name + ".patch"; - url = "https://bugzilla.kernel.org/attachment.cgi?id=260597"; - sha256 = "09096npxpgvlwdz3pb3m9brvxh7vy0xc9z9p8hh85xyczyzcsjhr"; - }; - }; - - # https://github.com/NixOS/nixpkgs/issues/42755 - xen-netfront_fix_mismatched_rtnl_unlock = rec { - name = "xen-netfront_fix_mismatched_rtnl_unlock"; - patch = fetchpatch { - name = name + ".patch"; - url = "https://github.com/torvalds/linux/commit/cb257783c2927b73614b20f915a91ff78aa6f3e8.patch"; - sha256 = "0xhblx2j8wi3kpnfpgjjwlcwdry97ji2aaq54r3zirk5g5p72zs8"; - }; - }; - - # https://github.com/NixOS/nixpkgs/issues/42755 - xen-netfront_update_features_after_registering_netdev = rec { - name = "xen-netfront_update_features_after_registering_netdev"; - patch = fetchpatch { - name = name + ".patch"; - url = "https://github.com/torvalds/linux/commit/45c8184c1bed1ca8a7f02918552063a00b909bf5.patch"; - sha256 = "1l8xq02rd7vakxg52xm9g4zng0ald866rpgm8kjlh88mwwyjkrwv"; - }; - }; - # Adapted for Linux 5.4 from: # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=04896832c94aae4842100cafb8d3a73e1bed3a45 rtl8761b_support = @@ -97,10 +57,4 @@ name = "export-rt-sched-migrate"; patch = ./export-rt-sched-migrate.patch; }; - - # patches from https://lkml.org/lkml/2019/7/15/1748 - mac_nvme_t2 = rec { - name = "mac_nvme_t2"; - patch = ./mac-nvme-t2.patch; - }; } diff --git a/pkgs/os-specific/linux/kernel/perf/default.nix b/pkgs/os-specific/linux/kernel/perf/default.nix index dcb1c4e9dcc..5e0b5850f01 100644 --- a/pkgs/os-specific/linux/kernel/perf/default.nix +++ b/pkgs/os-specific/linux/kernel/perf/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchpatch, kernel, elfutils, python2, python3, perl, newt, slang, asciidoc, xmlto, makeWrapper +{ lib, stdenv, fetchpatch, kernel, elfutils, python2, python3, python3Packages, perl, newt, slang, asciidoc, xmlto, makeWrapper , docbook_xsl, docbook_xml_dtd_45, libxslt, flex, bison, pkg-config, libunwind, binutils-unwrapped , libiberty, audit, libbfd, libbfd_2_38, libopcodes, libopcodes_2_38, openssl, systemtap, numactl , zlib @@ -53,7 +53,8 @@ stdenv.mkDerivation { ++ lib.optional withGtk gtk2 ++ (if (lib.versionAtLeast kernel.version "4.19") then [ python3 ] else [ python2 ]) ++ lib.optional withZstd zstd - ++ lib.optional withLibcap libcap; + ++ lib.optional withLibcap libcap + ++ lib.optional (lib.versionAtLeast kernel.version "6.0") python3Packages.setuptools; NIX_CFLAGS_COMPILE = toString [ "-Wno-error=cpp" @@ -63,7 +64,7 @@ stdenv.mkDerivation { ]; postPatch = '' - patchShebangs scripts + patchShebangs scripts tools/perf/pmu-events/jevents.py ''; doCheck = false; # requires "sparse" diff --git a/pkgs/os-specific/linux/kernel/zen-kernels.nix b/pkgs/os-specific/linux/kernel/zen-kernels.nix index 7e702297c4f..3cb3042b0e3 100644 --- a/pkgs/os-specific/linux/kernel/zen-kernels.nix +++ b/pkgs/os-specific/linux/kernel/zen-kernels.nix @@ -4,16 +4,16 @@ let # comments with variant added for update script # ./update-zen.py zen zenVariant = { - version = "5.19.6"; #zen + version = "5.19.12"; #zen suffix = "zen1"; #zen - sha256 = "1mnrnvlxdckf036w8bhw48z915187sfbfy3cpwclvcrmhixiafql"; #zen + sha256 = "001zrsgsg5yl74yn4qdmykwmys4mdwnnbiqmfpw60i3qr5ig90ap"; #zen isLqx = false; }; # ./update-zen.py lqx lqxVariant = { - version = "5.19.6"; #lqx + version = "5.19.12"; #lqx suffix = "lqx1"; #lqx - sha256 = "0siv53qr6192s4qq1skssxkzapqk5w3k043dl548rdzp6a26yvrh"; #lqx + sha256 = "19y3znj3zjifkd1m8agb8f80kzfs1rx1ccpnq7fvkd7j4yd3khlf"; #lqx isLqx = true; }; zenKernelsFor = { version, suffix, sha256, isLqx }: buildLinux (args // { diff --git a/pkgs/os-specific/linux/klibc/default.nix b/pkgs/os-specific/linux/klibc/default.nix index 6efcb01cc53..47cf03a3a87 100644 --- a/pkgs/os-specific/linux/klibc/default.nix +++ b/pkgs/os-specific/linux/klibc/default.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" "stackprotector" ]; makeFlags = commonMakeFlags ++ [ - "KLIBCARCH=${stdenv.hostPlatform.linuxArch}" + "KLIBCARCH=${if stdenv.hostPlatform.isRiscV64 then "riscv64" else stdenv.hostPlatform.linuxArch}" "KLIBCKERNELSRC=${linuxHeaders}" ] # TODO(@Ericson2314): We now can get the ABI from # `stdenv.hostPlatform.parsed.abi`, is this still a good idea? diff --git a/pkgs/os-specific/linux/kmod/default.nix b/pkgs/os-specific/linux/kmod/default.nix index 80233504634..669a145358e 100644 --- a/pkgs/os-specific/linux/kmod/default.nix +++ b/pkgs/os-specific/linux/kmod/default.nix @@ -58,7 +58,6 @@ in stdenv.mkDerivation rec { ''; passthru.updateScript = gitUpdater { - inherit pname version; # No nicer place to find latest release. url = "https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git"; rev-prefix = "v"; diff --git a/pkgs/os-specific/linux/ksmbd-tools/default.nix b/pkgs/os-specific/linux/ksmbd-tools/default.nix new file mode 100644 index 00000000000..d0a1f1f4e68 --- /dev/null +++ b/pkgs/os-specific/linux/ksmbd-tools/default.nix @@ -0,0 +1,40 @@ +{ lib +, stdenv +, fetchFromGitHub +, autoconf +, automake +, glib +, libkrb5 +, libnl +, libtool +, pkg-config +, withKerberos ? false +}: + +stdenv.mkDerivation rec { + pname = "ksmbd-tools"; + version = "3.4.5"; + + src = fetchFromGitHub { + owner = "cifsd-team"; + repo = pname; + rev = version; + sha256 = "sha256-sSCLXNdVUAdk+GnFlVx/BsAzyfz0KDdugJ1isrOztgs="; + }; + + buildInputs = [ glib libnl ] ++ lib.optional withKerberos libkrb5; + + nativeBuildInputs = [ autoconf automake libtool pkg-config ]; + + preConfigure = "./autogen.sh"; + + configureFlags = lib.optional withKerberos "--enable-krb5"; + + meta = with lib; { + description = "Userspace utilities for the ksmbd kernel SMB server"; + homepage = "https://www.kernel.org/doc/html/latest/filesystems/cifs/ksmbd.html"; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = with maintainers; [ elohmeier ]; + }; +} diff --git a/pkgs/os-specific/linux/libbpf/0.x.nix b/pkgs/os-specific/linux/libbpf/0.x.nix new file mode 100644 index 00000000000..2c15e3d49ee --- /dev/null +++ b/pkgs/os-specific/linux/libbpf/0.x.nix @@ -0,0 +1,49 @@ +{ fetchFromGitHub +, elfutils +, pkg-config +, stdenv +, zlib +, lib +, nixosTests +}: + +stdenv.mkDerivation rec { + pname = "libbpf"; + version = "0.8.1"; + + src = fetchFromGitHub { + owner = "libbpf"; + repo = "libbpf"; + rev = "v${version}"; + sha256 = "sha256-daVS+TErmDU8ksThOvcepg1A61iD8N8GIkC40cmc9/8="; + }; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ elfutils zlib ]; + + enableParallelBuilding = true; + makeFlags = [ "PREFIX=$(out)" "-C src" ]; + + passthru.tests = { + bpf = nixosTests.bpf; + }; + + postInstall = '' + # install linux's libbpf-compatible linux/btf.h + install -Dm444 include/uapi/linux/*.h -t $out/include/linux + ''; + + # FIXME: Multi-output requires some fixes to the way the pkg-config file is + # constructed (it gets put in $out instead of $dev for some reason, with + # improper paths embedded). Don't enable it for now. + + # outputs = [ "out" "dev" ]; + + meta = with lib; { + description = "Upstream mirror of libbpf"; + homepage = "https://github.com/libbpf/libbpf"; + license = with licenses; [ lgpl21 /* or */ bsd2 ]; + maintainers = with maintainers; [ thoughtpolice vcunat saschagrunert martinetd ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/os-specific/linux/libbpf/default.nix b/pkgs/os-specific/linux/libbpf/default.nix index 2c15e3d49ee..04322a35b4f 100644 --- a/pkgs/os-specific/linux/libbpf/default.nix +++ b/pkgs/os-specific/linux/libbpf/default.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation rec { pname = "libbpf"; - version = "0.8.1"; + version = "1.0.1"; src = fetchFromGitHub { owner = "libbpf"; repo = "libbpf"; rev = "v${version}"; - sha256 = "sha256-daVS+TErmDU8ksThOvcepg1A61iD8N8GIkC40cmc9/8="; + sha256 = "sha256-2rzVah+CxCztKnlEWMIQrUS2JJTLiWscfIA1aOBtIzs="; }; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/os-specific/linux/libcap-ng/default.nix b/pkgs/os-specific/linux/libcap-ng/default.nix index ad01a83ac93..1ba14c5f471 100644 --- a/pkgs/os-specific/linux/libcap-ng/default.nix +++ b/pkgs/os-specific/linux/libcap-ng/default.nix @@ -1,36 +1,19 @@ -{ lib, stdenv, fetchurl, swig ? null, python2 ? null, python3 ? null }: - -assert python2 != null || python3 != null -> swig != null; +{ lib, stdenv, fetchurl }: stdenv.mkDerivation rec { pname = "libcap-ng"; - # When updating make sure to test that the version with - # all of the python bindings still works version = "0.8.3"; src = fetchurl { - url = "${meta.homepage}/${pname}-${version}.tar.gz"; + url = "https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${version}.tar.gz"; sha256 = "sha256-vtb2hI4iuy+Dtfdksq7w7TkwVOgDqOOocRyyo55rSS0="; }; - nativeBuildInputs = [ swig ]; - buildInputs = [ python2 python3 ]; - - postPatch = '' - function get_header() { - echo -e "#include <$1>" | gcc -M -xc - | tr ' ' '\n' | grep "$1" | head -n 1 - } - - # Fix some hardcoding of header paths - sed -i "s,/usr/include/linux/capability.h,$(get_header linux/capability.h),g" bindings/python{,3}/Makefile.in - ''; - configureFlags = [ - (if python2 != null then "--with-python" else "--without-python") - (if python3 != null then "--with-python3" else "--without-python3") + "--without-python" ]; - meta = let inherit (lib) platforms licenses; in { + meta = with lib; { description = "Library for working with POSIX capabilities"; homepage = "https://people.redhat.com/sgrubb/libcap-ng/"; platforms = platforms.linux; diff --git a/pkgs/os-specific/linux/libnvme/default.nix b/pkgs/os-specific/linux/libnvme/default.nix new file mode 100644 index 00000000000..6c2ece4b8cb --- /dev/null +++ b/pkgs/os-specific/linux/libnvme/default.nix @@ -0,0 +1,63 @@ +{ fetchFromGitHub +, json_c +, lib +, libuuid +, meson +, ninja +, openssl +, perl +, pkg-config +, python3 +, stdenv +, systemd +}: + +stdenv.mkDerivation rec { + pname = "libnvme"; + version = "1.1"; + + outputs = [ "out" "man" ]; + + src = fetchFromGitHub { + owner = "linux-nvme"; + repo = "libnvme"; + rev = "v${version}"; + sha256 = "EPAPWY6/Bh8I1eLslKJAofLn0IAizmGn00Q5PJPtdRw="; + }; + + postPatch = '' + patchShebangs meson-vcs-tag.sh + chmod +x doc/kernel-doc-check + patchShebangs doc/kernel-doc doc/kernel-doc-check doc/list-man-pages.sh + ''; + + nativeBuildInputs = [ + meson + ninja + perl # for kernel-doc + pkg-config + ]; + + buildInputs = [ + json_c + libuuid + openssl + python3 + systemd + ]; + + mesonFlags = [ + "-Ddocs=man" + "-Ddocs-build=true" + ]; + + doCheck = true; + + meta = with lib; { + description = "C Library for NVM Express on Linux"; + homepage = "https://github.com/linux-nvme/libnvme"; + maintainers = with maintainers; [ zseri ]; + license = with licenses; [ lgpl21Plus ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/os-specific/linux/libtracefs/default.nix b/pkgs/os-specific/linux/libtracefs/default.nix index 3a973b9880d..46a633aec55 100644 --- a/pkgs/os-specific/linux/libtracefs/default.nix +++ b/pkgs/os-specific/linux/libtracefs/default.nix @@ -15,12 +15,12 @@ stdenv.mkDerivation rec { pname = "libtracefs"; - version = "1.4.2"; + version = "1.5.0"; src = fetchgit { url = "git://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git"; rev = "libtracefs-${version}"; - sha256 = "sha256-CmFzonPq91iLflolJaucpPWzb8MCgfuov/OQ6KUD3f4="; + sha256 = "sha256-5OUTOIla4adtSJwQkii6f/mB99R5QzodyQkq/g6oNSw="; }; postPatch = '' diff --git a/pkgs/os-specific/linux/libzbc/default.nix b/pkgs/os-specific/linux/libzbc/default.nix new file mode 100644 index 00000000000..5fa981a767f --- /dev/null +++ b/pkgs/os-specific/linux/libzbc/default.nix @@ -0,0 +1,40 @@ +{ lib +, stdenv +, autoconf-archive +, autoreconfHook +, fetchFromGitHub +, gtk3 +, libtool +, pkg-config +, guiSupport ? false +}: + +stdenv.mkDerivation rec { + pname = "libzbc"; + version = "5.12.0"; + + src = fetchFromGitHub { + owner = "westerndigitalcorporation"; + repo = "libzbc"; + rev = "v${version}"; + sha256 = "qI09dkMCwMym3j1ELrFDNbNB5hW/CzwmFmZhUNDXsfI="; + }; + + nativeBuildInputs = [ + autoconf-archive # this can be removed with the next release + autoreconfHook + libtool + ] ++ lib.optionals guiSupport [ pkg-config ]; + + buildInputs = lib.optionals guiSupport [ gtk3 ]; + + configureFlags = lib.optional guiSupport "--enable-gui"; + + meta = with lib; { + description = "ZBC device manipulation library"; + homepage = "https://github.com/westerndigitalcorporation/libzbc"; + maintainers = with maintainers; [ zseri ]; + license = with licenses; [ bsd2 lgpl3Plus ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/os-specific/linux/libzbd/default.nix b/pkgs/os-specific/linux/libzbd/default.nix new file mode 100644 index 00000000000..f058e09bbd2 --- /dev/null +++ b/pkgs/os-specific/linux/libzbd/default.nix @@ -0,0 +1,40 @@ +{ lib +, stdenv +, autoconf-archive +, autoreconfHook +, fetchFromGitHub +, gtk3 +, libtool +, pkg-config +, guiSupport ? false +}: + +stdenv.mkDerivation rec { + pname = "libzbd"; + version = "2.0.3"; + + src = fetchFromGitHub { + owner = "westerndigitalcorporation"; + repo = "libzbd"; + rev = "v${version}"; + sha256 = "GoCHwuR4ylyaN/FskIqKyAPe2A2O3iFVcI3UxPlqvtk="; + }; + + nativeBuildInputs = [ + autoconf-archive # this can be removed with the next release + autoreconfHook + libtool + ] ++ lib.optionals guiSupport [ pkg-config ]; + + buildInputs = lib.optionals guiSupport [ gtk3 ]; + + configureFlags = lib.optional guiSupport "--enable-gui"; + + meta = with lib; { + description = "Zoned block device manipulation library and tools"; + homepage = "https://github.com/westerndigitalcorporation/libzbd"; + maintainers = with maintainers; [ zseri ]; + license = with licenses; [ lgpl3Plus gpl3Plus ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/os-specific/linux/mmc-utils/default.nix b/pkgs/os-specific/linux/mmc-utils/default.nix index 6d737ea6bad..c28c55091ef 100644 --- a/pkgs/os-specific/linux/mmc-utils/default.nix +++ b/pkgs/os-specific/linux/mmc-utils/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation { pname = "mmc-utils"; - version = "unstable-2022-07-13"; + version = "unstable-2022-09-27"; src = fetchzip rec { url = "https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git/snapshot/mmc-utils-${passthru.rev}.tar.gz"; - passthru.rev = "d7b343fd262880994f041ce2335442e7bd1071f5"; - sha256 = "cTF3xSNvZ1wifItPmflNFd+fpYArPRvinM7Cyg3JoeE="; + passthru.rev = "dfc3b6ecda84d21418fb4408b39c5c71db4c6458"; + sha256 = "G4sBwRW8NOq7CGTADvXgMbcVInStSueGfGsb4ApVaSk="; }; makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "prefix=$(out)" ]; diff --git a/pkgs/os-specific/linux/musl/default.nix b/pkgs/os-specific/linux/musl/default.nix index b73c0ae04cd..bef1fa6e33a 100644 --- a/pkgs/os-specific/linux/musl/default.nix +++ b/pkgs/os-specific/linux/musl/default.nix @@ -67,6 +67,12 @@ stdenv.mkDerivation rec { url = "https://raw.githubusercontent.com/openwrt/openwrt/87606e25afac6776d1bbc67ed284434ec5a832b4/toolchain/musl/patches/300-relative.patch"; sha256 = "0hfadrycb60sm6hb6by4ycgaqc9sgrhh42k39v8xpmcvdzxrsq2n"; }) + + # fix parsing lines with optional fields in fstab etc. NOTE: Remove for the next release since it has been merged upstream + (fetchurl { + url = "https://git.musl-libc.org/cgit/musl/patch/?id=751bee0ee727e8d8b003c87cff77ac76f1dbecd6"; + sha256 = "sha256-qCw132TCSaZrkISmtDb8Q8ufyt8sAJdwACkvfwuoi/0="; + }) ]; CFLAGS = [ "-fstack-protector-strong" ] ++ lib.optional stdenv.hostPlatform.isPower "-mlong-double-64"; diff --git a/pkgs/os-specific/linux/numactl/default.nix b/pkgs/os-specific/linux/numactl/default.nix index 2f8a4feb030..ac17a18273a 100644 --- a/pkgs/os-specific/linux/numactl/default.nix +++ b/pkgs/os-specific/linux/numactl/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "numactl"; - version = "2.0.14"; + version = "2.0.15"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "v${version}"; - sha256 = "0hahpdp5xqy9cbg251bdxqkml341djn2h856g435h4ngz63sr9fs"; + sha256 = "sha256-mowDqCkAHDEV9AWCgAEWL0//sNMUk/K8w3eO7Wg+AwQ="; }; nativeBuildInputs = [ autoreconfHook ]; diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix index 598ac6a4c45..1ec98cc7b34 100644 --- a/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -27,11 +27,11 @@ rec { stable = if stdenv.hostPlatform.system == "i686-linux" then legacy_390 else latest; production = generic { - version = "515.65.01"; - sha256_64bit = "sha256-BJLdxbXmWqAMvHYujWaAIFyNCOEDtxMQh6FRJq7klek="; - openSha256 = "sha256-GCCDnaDsbXTmbCYZBCM3fpHmOSWti/DkBJwYrRGAMPI="; - settingsSha256 = "sha256-kBELMJCIWD9peZba14wfCoxsi3UXO3ehFYcVh4nvzVg="; - persistencedSha256 = "sha256-P8oT7g944HvNk2Ot/0T0sJM7dZs+e0d+KwbwRrmsuDY="; + version = "515.76"; + sha256_64bit = "sha256-xqKhjOuWX0mAvOTlzqNv1iLNwaXzGg6xu9NZqen2v0Q="; + openSha256 = "sha256-843l42atzaTm4pX5UC/JZjXAvhwmBpE8k3SQFEFdcdY="; + settingsSha256 = "sha256-2GdqmuvROLa8xFfyFY/F4YzEBq+SlVIYM4CVEARh9MI="; + persistencedSha256 = "sha256-nIfP7xBIVy+BUa9VBCNQ9v5RT4l4S9X0GHLpNiN/WRg="; brokenOpen = kernelModVersion == "5.4" && kernel.isHardened; }; @@ -54,11 +54,11 @@ rec { # Vulkan developer beta driver # See here for more information: https://developer.nvidia.com/vulkan-driver vulkan_beta = generic rec { - version = "515.49.14"; + version = "515.49.15"; persistencedVersion = "515.48.07"; settingsVersion = "515.48.07"; - sha256_64bit = "sha256-xNaqTeIfYQIdCxo841rQ87RQc+br5OhP6K12o4V3I18="; - openSha256 = "sha256-4KvOOAR0RQkHTFJkkG32y6uOSHB85Lh6PyVSgRjU1l4="; + sha256_64bit = "sha256-yQbNE+YsbHUc4scXvMZFGuuBRrFTa42g1XoMVZEO/zo="; + openSha256 = "sha256-2RvogIdTA7Rg4oq14TG7Kh31HWuj860xsK7/MYFitpQ="; settingsSha256 = "sha256-XwdMsAAu5132x2ZHqjtFvcBJk6Dao7I86UksxrOkknU="; persistencedSha256 = "sha256-BTfYNDJKe4tOvV71/1JJSPltJua0Mx/RvDcWT5ccRRY="; url = "https://developer.nvidia.com/vulkan-beta-${lib.concatStrings (lib.splitString "." version)}-linux"; diff --git a/pkgs/os-specific/linux/nvidia-x11/generic.nix b/pkgs/os-specific/linux/nvidia-x11/generic.nix index b694dc1fd0c..351d71ab8e2 100644 --- a/pkgs/os-specific/linux/nvidia-x11/generic.nix +++ b/pkgs/os-specific/linux/nvidia-x11/generic.nix @@ -115,6 +115,7 @@ let }; persistenced = mapNullable (hash: callPackage (import ./persistenced.nix self hash) { }) persistencedSha256; inherit persistencedVersion settingsVersion; + compressFirmware = false; } // optionalAttrs (!i686bundled) { inherit lib32; }; diff --git a/pkgs/os-specific/linux/open-isns/default.nix b/pkgs/os-specific/linux/open-isns/default.nix index 3f939024a48..7afe13eea86 100644 --- a/pkgs/os-specific/linux/open-isns/default.nix +++ b/pkgs/os-specific/linux/open-isns/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "open-isns"; - version = "0.101"; + version = "0.102"; src = fetchFromGitHub { owner = "open-iscsi"; repo = "open-isns"; rev = "v${version}"; - sha256 = "1g7kp1j2f8afsach6sbl4k05ybz1yz2s8yg073bv4gnv48gyxb2p"; + sha256 = "sha256-Vz6VqqvEr0f8AdN9NcVnruapswmoOgvAXxXSfrM3yRA="; }; propagatedBuildInputs = [ openssl ]; diff --git a/pkgs/os-specific/linux/oxtools/default.nix b/pkgs/os-specific/linux/oxtools/default.nix new file mode 100644 index 00000000000..02afb28e66e --- /dev/null +++ b/pkgs/os-specific/linux/oxtools/default.nix @@ -0,0 +1,36 @@ +{ lib, stdenv, fetchFromGitHub +, glibc, python3 +}: + +stdenv.mkDerivation rec { + pname = "0xtools"; + version = "1.1.3"; + + src = fetchFromGitHub { + owner = "tanelpoder"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-pe64st3yhVfZi8/sTEfH1cNjx7JpqxDmxMmodpXnqaU="; + }; + + postPatch = '' + substituteInPlace lib/0xtools/proc.py \ + --replace /usr/include/asm/unistd_64.h ${glibc.dev}/include/asm/unistd_64.h + ''; + + buildInputs = [ python3 ]; + + makeFlags = [ "PREFIX=${placeholder "out"}" ]; + + preInstall = '' + mkdir -p $out/bin + ''; + + meta = with lib; { + description = "Utilities for analyzing application performance"; + homepage = "https://0x.tools"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ astro ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/os-specific/linux/pax-utils/default.nix b/pkgs/os-specific/linux/pax-utils/default.nix index 234771054ae..3b248b60efe 100644 --- a/pkgs/os-specific/linux/pax-utils/default.nix +++ b/pkgs/os-specific/linux/pax-utils/default.nix @@ -32,7 +32,6 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ (python3.withPackages (p: with p; [ pyelftools ])) ]; passthru.updateScript = gitUpdater { - inherit pname version; url = "https://anongit.gentoo.org/git/proj/pax-utils.git"; rev-prefix = "v"; }; diff --git a/pkgs/os-specific/linux/power-profiles-daemon/default.nix b/pkgs/os-specific/linux/power-profiles-daemon/default.nix index 402b2536163..f2720f40f5d 100644 --- a/pkgs/os-specific/linux/power-profiles-daemon/default.nix +++ b/pkgs/os-specific/linux/power-profiles-daemon/default.nix @@ -2,6 +2,7 @@ , lib , pkg-config , meson +, mesonEmulatorHook , ninja , fetchFromGitLab , fetchpatch @@ -24,13 +25,6 @@ , nixosTests }: -let - testPythonPkgs = ps: with ps; [ - pygobject3 - dbus-python - python-dbusmock - ]; -in stdenv.mkDerivation rec { pname = "power-profiles-daemon"; version = "0.12"; @@ -58,6 +52,14 @@ stdenv.mkDerivation rec { gobject-introspection wrapGAppsNoGuiHook python3.pkgs.wrapPython + # checkInput but cheked for during the configuring + (python3.pythonForBuild.withPackages (ps: with ps; [ + pygobject3 + dbus-python + python-dbusmock + ])) + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; buildInputs = [ @@ -81,13 +83,12 @@ stdenv.mkDerivation rec { checkInputs = [ umockdev dbus - (python3.withPackages testPythonPkgs) ]; mesonFlags = [ "-Dsystemdsystemunitdir=${placeholder "out"}/lib/systemd/system" "-Dgtk_doc=true" - "-Dtests=true" + "-Dtests=${lib.boolToString (stdenv.buildPlatform.canExecute stdenv.hostPlatform)}" ]; doCheck = true; diff --git a/pkgs/os-specific/linux/powercap/default.nix b/pkgs/os-specific/linux/powercap/default.nix index 96ec83852d9..e705b6a3485 100644 --- a/pkgs/os-specific/linux/powercap/default.nix +++ b/pkgs/os-specific/linux/powercap/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, cmake }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }: stdenv.mkDerivation rec { pname = "powercap"; @@ -11,6 +11,15 @@ stdenv.mkDerivation rec { sha256 = "sha256-l+IpFqBnCYUU825++sUPySD/Ku0TEIX2kt+S0Wml6iA="; }; + # in master post 0.6.0, see https://github.com/powercap/powercap/issues/8 + patches = [ + (fetchpatch { + name = "fix-pkg-config.patch"; + url = "https://github.com/powercap/powercap/commit/278dceb51635686e343edfc357b6020533fff299.patch"; + sha256 = "0h62j63xdn0iqyx4xbia6hlmdjn45camb82z4vv6sb37x9sph7rg"; + }) + ]; + nativeBuildInputs = [ cmake ]; cmakeFlags = [ diff --git a/pkgs/os-specific/linux/prl-tools/default.nix b/pkgs/os-specific/linux/prl-tools/default.nix index 0b4acc44400..1f042f76fe0 100644 --- a/pkgs/os-specific/linux/prl-tools/default.nix +++ b/pkgs/os-specific/linux/prl-tools/default.nix @@ -24,14 +24,14 @@ assert (!libsOnly) -> kernel != null; stdenv.mkDerivation rec { - version = "18.0.0-53049"; + version = "18.0.2-53077"; pname = "prl-tools"; # We download the full distribution to extract prl-tools-lin.iso from # => ${dmg}/Parallels\ Desktop.app/Contents/Resources/Tools/prl-tools-lin.iso src = fetchurl { url = "https://download.parallels.com/desktop/v${lib.versions.major version}/${version}/ParallelsDesktop-${version}.dmg"; - sha256 = "sha256-MGiqCvOsu/sKz6JHJFGP5bT12XYnm2kTMdOiflg9ses="; + sha256 = "sha256-yrCg3qr96SUCHmT3IAF79/Ha+L82V3nIC6Hb5ugXoGk="; }; hardeningDisable = [ "pic" "format" ]; diff --git a/pkgs/os-specific/linux/qperf/default.nix b/pkgs/os-specific/linux/qperf/default.nix new file mode 100644 index 00000000000..a074cde448d --- /dev/null +++ b/pkgs/os-specific/linux/qperf/default.nix @@ -0,0 +1,43 @@ +{ stdenv, lib +, fetchFromGitHub, fetchpatch +, autoconf, automake, perl, rdma-core }: + +stdenv.mkDerivation rec { + pname = "qperf"; + version = "0.4.11"; + + src = fetchFromGitHub { + owner = "linux-rdma"; + repo = "qperf"; + rev = "v${version}"; + hash = "sha256-x9l8xqwMDHlXRZpWt3XiqN5xyCTV5rk8jp/ClRPPECI="; + }; + + patches = [ (fetchpatch { + name = "version-bump.patch"; + url = "https://github.com/linux-rdma/qperf/commit/34ec57ddb7e5ae1adfcfc8093065dff90b69a275.patch"; + hash = "sha256-+7ckhUUB+7BG6qRKv0wgyIxkyvll2xjf3Wk1hpRsDo0="; + }) ]; + + nativeBuildInputs = [ autoconf automake perl rdma-core ]; + buildInputs = [ rdma-core ]; + + postUnpack = '' + patchShebangs . + ''; + + configurePhase = '' + runHook preConfigure + ./autogen.sh + ./configure --prefix=$out + runHook postConfigure + ''; + + meta = with lib; { + description = "Measure RDMA and IP performance"; + homepage = "https://github.com/linux-rdma/qperf"; + license = licenses.gpl2Only; + platforms = platforms.linux; + maintainers = with maintainers; [ edwtjo ]; + }; +} diff --git a/pkgs/os-specific/linux/sgx/sdk/ipp-crypto.nix b/pkgs/os-specific/linux/sgx/sdk/ipp-crypto.nix index 85fcfc9c554..16f3d836833 100644 --- a/pkgs/os-specific/linux/sgx/sdk/ipp-crypto.nix +++ b/pkgs/os-specific/linux/sgx/sdk/ipp-crypto.nix @@ -3,7 +3,7 @@ , fetchFromGitHub , cmake , nasm -, openssl +, openssl_1_1 , python3 , extraCmakeFlags ? [ ] }: @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake nasm - openssl + openssl_1_1 python3 ]; } diff --git a/pkgs/os-specific/linux/sssd/default.nix b/pkgs/os-specific/linux/sssd/default.nix index ba655e75be5..462151ff64f 100644 --- a/pkgs/os-specific/linux/sssd/default.nix +++ b/pkgs/os-specific/linux/sssd/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { preConfigure = '' export SGML_CATALOG_FILES="${docbookFiles}" - export PYTHONPATH=$(find ${python3.pkgs.ldap} -type d -name site-packages) + export PYTHONPATH=$(find ${python3.pkgs.python-ldap} -type d -name site-packages) export PATH=$PATH:${openldap}/libexec configureFlagsArray=( @@ -59,7 +59,7 @@ stdenv.mkDerivation rec { samba nfs-utils p11-kit python3 popt talloc tdb tevent ldb pam openldap pcre2 libkrb5 cifs-utils glib keyutils dbus fakeroot libxslt libxml2 - libuuid python3.pkgs.ldap systemd nspr check cmocka uid_wrapper + libuuid python3.pkgs.python-ldap systemd nspr check cmocka uid_wrapper nss_wrapper ncurses Po4a http-parser jansson jose ]; makeFlags = [ diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index d2d6146c5d6..5b417369a55 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -83,7 +83,7 @@ , withHostnamed ? true , withHwdb ? true , withImportd ? !stdenv.hostPlatform.isMusl -, withLibBPF ? false # currently fails while generating BPF objects +, withLibBPF ? true , withLocaled ? true , withLogind ? true , withMachined ? true @@ -98,8 +98,9 @@ , withShellCompletions ? true , withTimedated ? true , withTimesyncd ? true -, withTpm2Tss ? !stdenv.hostPlatform.isMusl -, withUserDb ? !stdenv.hostPlatform.isMusl +, withTpm2Tss ? true +, withUserDb ? true +, withUtmp ? !stdenv.hostPlatform.isMusl # tests assume too much system access for them to be feasible for us right now , withTests ? false @@ -112,18 +113,10 @@ , docbook_xml_dtd_45 }: -assert withResolved -> (libgcrypt != null && libgpg-error != null); -assert withImportd -> -(curl.dev != null && zlib != null && xz != null && libgcrypt != null - && gnutar != null && gnupg != null && withCompression); - -assert withEfi -> (gnu-efi != null); -assert withRemote -> lib.getDev curl != null; +assert withImportd -> withCompression; assert withCoredump -> withCompression; - assert withHomed -> withCryptsetup; -assert withCryptsetup -> (cryptsetup != null); let wantCurl = withRemote || withImportd; wantGcrypt = withResolved || withImportd; @@ -207,6 +200,12 @@ stdenv.mkDerivation { --replace \ "run_command(cc.cmd_array(), '-print-prog-name=objcopy', check: true).stdout().strip()" \ "'${stdenv.cc.bintools.targetPrefix}objcopy'" + '' + lib.optionalString withLibBPF '' + substituteInPlace meson.build \ + --replace "find_program('clang'" "find_program('${stdenv.cc.targetPrefix}clang'" + # BPF does not work with stack protector + substituteInPlace src/core/bpf/meson.build \ + --replace "clang_flags = [" "clang_flags = [ '-fno-stack-protector'," '' + ( let # The following patches references to dynamic libraries to ensure that @@ -348,7 +347,7 @@ stdenv.mkDerivation { docbook_xml_dtd_45 (buildPackages.python3Packages.python.withPackages (ps: with ps; [ lxml jinja2 ])) ] - ++ lib.optional withLibBPF [ + ++ lib.optionals withLibBPF [ bpftools llvmPackages.clang llvmPackages.libllvm @@ -496,9 +495,10 @@ stdenv.mkDerivation { "-Dbpf-framework=true" ] ++ lib.optionals withTpm2Tss [ "-Dtpm2=true" + ] ++ lib.optionals (!withUtmp) [ + "-Dutmp=false" ] ++ lib.optionals stdenv.hostPlatform.isMusl [ "-Dgshadow=false" - "-Dutmp=false" "-Didn=false" ]; preConfigure = @@ -677,7 +677,7 @@ stdenv.mkDerivation { # runtime; otherwise we can't and we need to reboot. interfaceVersion = 2; - inherit withCryptsetup withHostnamed withImportd withLocaled withMachined withTimedated util-linux kmod kbd; + inherit withCryptsetup withHostnamed withImportd withLocaled withMachined withTimedated withUtmp util-linux kmod kbd; tests = { inherit (nixosTests) switchTest; diff --git a/pkgs/os-specific/linux/usbguard/default.nix b/pkgs/os-specific/linux/usbguard/default.nix index 35505af5a1e..46e9ee3d0a5 100644 --- a/pkgs/os-specific/linux/usbguard/default.nix +++ b/pkgs/os-specific/linux/usbguard/default.nix @@ -17,21 +17,18 @@ , polkit , protobuf , audit -, libgcrypt , libsodium }: -assert libgcrypt != null -> libsodium == null; - stdenv.mkDerivation rec { - version = "1.1.1"; + version = "1.1.2"; pname = "usbguard"; src = fetchFromGitHub { owner = "USBGuard"; repo = pname; rev = "usbguard-${version}"; - sha256 = "sha256-lAh+l9GF+FHQqv2kEYU5JienZKGwR5e45BYAwjieYgw="; + sha256 = "sha256-uwNoKczmVOMpkU4KcKTOtbcTHiYVGXjk/rVbqMl5pGk="; fetchSubmodules = true; }; @@ -44,6 +41,8 @@ stdenv.mkDerivation rec { libxml2 # xmllint docbook_xml_dtd_45 docbook_xsl + dbus-glib # gdbus-codegen + protobuf # protoc ]; buildInputs = [ @@ -51,21 +50,19 @@ stdenv.mkDerivation rec { libcap_ng libqb libseccomp + libsodium polkit protobuf audit - ] - ++ (lib.optional (libgcrypt != null) libgcrypt) - ++ (lib.optional (libsodium != null) libsodium); + ]; configureFlags = [ "--with-bundled-catch" "--with-bundled-pegtl" "--with-dbus" + "--with-crypto-library=sodium" "--with-polkit" - ] - ++ (lib.optional (libgcrypt != null) "--with-crypto-library=gcrypt") - ++ (lib.optional (libsodium != null) "--with-crypto-library=sodium"); + ]; enableParallelBuilding = true; diff --git a/pkgs/os-specific/linux/usbrelay/daemon.nix b/pkgs/os-specific/linux/usbrelay/daemon.nix index e5e4baae9e9..7aa1c3f153b 100644 --- a/pkgs/os-specific/linux/usbrelay/daemon.nix +++ b/pkgs/os-specific/linux/usbrelay/daemon.nix @@ -1,4 +1,4 @@ -{ stdenv, usbrelay, python3 }: +{ stdenv, usbrelay, python3, installShellFiles }: let python = python3.withPackages (ps: with ps; [ usbrelay-py paho-mqtt ]); in @@ -16,6 +16,8 @@ stdenv.mkDerivation rec { --replace '/usr/sbin/usbrelayd' "$out/bin/usbrelayd" ''; + nativeBuildInputs = [ installShellFiles ]; + buildInputs = [ python ]; dontBuild = true; @@ -26,6 +28,7 @@ stdenv.mkDerivation rec { install -m 644 -D usbrelayd.service $out/lib/systemd/system/usbrelayd.service install -m 644 -D 50-usbrelay.rules $out/lib/udev/rules.d/50-usbrelay.rules install -m 644 -D usbrelayd.conf $out/etc/usbrelayd.conf # include this as an example + installManPage usbrelayd.8 runHook postInstall ''; diff --git a/pkgs/os-specific/linux/usbrelay/default.nix b/pkgs/os-specific/linux/usbrelay/default.nix index 25388d3b230..c5b4f2b8a53 100644 --- a/pkgs/os-specific/linux/usbrelay/default.nix +++ b/pkgs/os-specific/linux/usbrelay/default.nix @@ -1,13 +1,13 @@ { stdenv, lib, fetchFromGitHub, hidapi, installShellFiles }: stdenv.mkDerivation rec { pname = "usbrelay"; - version = "1.0"; + version = "1.0.1"; src = fetchFromGitHub { owner = "darrylb123"; repo = "usbrelay"; rev = version; - sha256 = "sha256-5zgpN4a+r0tmw0ISTJM+d9mo+L/qwUvpWPSsykuG0cg="; + sha256 = "sha256-2elDrO+WaaRYdTrG40Ez00qSsNVQjXE6GdOJbWPfugE="; }; nativeBuildInputs = [ diff --git a/pkgs/os-specific/linux/usbrelay/python.nix b/pkgs/os-specific/linux/usbrelay/python.nix index 02d5ac284ed..b8779894090 100644 --- a/pkgs/os-specific/linux/usbrelay/python.nix +++ b/pkgs/os-specific/linux/usbrelay/python.nix @@ -4,6 +4,10 @@ buildPythonPackage rec { pname = "usbrelay_py"; inherit (usbrelay) version src; + preConfigure = '' + cd usbrelay_py + ''; + buildInputs = [ usbrelay ]; pythonImportsCheck = [ "usbrelay_py" ]; diff --git a/pkgs/os-specific/linux/usbrelay/test.nix b/pkgs/os-specific/linux/usbrelay/test.nix index dc5847558a6..58e4375dab8 100644 --- a/pkgs/os-specific/linux/usbrelay/test.nix +++ b/pkgs/os-specific/linux/usbrelay/test.nix @@ -42,6 +42,7 @@ import ../../../../nixos/tests/make-test-python.nix ({ pkgs, ... }: { }; testScript = '' + import os if os.waitstatus_to_exitcode(os.system("lsusb -d 16c0:05df")) != 0: print("No USB relay detected, skipping test") import sys diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index cb323e623be..d57fdba7310 100644 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -14,11 +14,11 @@ stdenv.mkDerivation rec { pname = "util-linux" + lib.optionalString (!nlsSupport && !ncursesSupport && !systemdSupport) "-minimal"; - version = "2.38"; + version = "2.38.1"; src = fetchurl { url = "mirror://kernel/linux/utils/util-linux/v${lib.versions.majorMinor version}/util-linux-${version}.tar.xz"; - hash = "sha256-bREcvk1VszbbLx++/7xluJkIcEwBE2Nx0yqpvsNz62Q="; + hash = "sha256-YEkqGbRObPmj3f9oMlszO4tStsWc4+vWoOyqTFEX6E8="; }; patches = [ diff --git a/pkgs/os-specific/linux/waydroid/default.nix b/pkgs/os-specific/linux/waydroid/default.nix index c9298ecec4e..74f32cd8599 100644 --- a/pkgs/os-specific/linux/waydroid/default.nix +++ b/pkgs/os-specific/linux/waydroid/default.nix @@ -17,6 +17,7 @@ python3Packages.buildPythonApplication rec { pname = "waydroid"; version = "1.3.0"; + format = "other"; src = fetchFromGitHub { owner = pname; diff --git a/pkgs/os-specific/linux/xpadneo/default.nix b/pkgs/os-specific/linux/xpadneo/default.nix index 623b881cd0f..bb47bf03f58 100644 --- a/pkgs/os-specific/linux/xpadneo/default.nix +++ b/pkgs/os-specific/linux/xpadneo/default.nix @@ -1,14 +1,20 @@ -{ lib, stdenv, fetchFromGitHub, kernel, bluez }: +{ lib +, stdenv +, fetchFromGitHub +, kernel +, bluez +, nixosTests +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "xpadneo"; - version = "0.9.4"; + version = "0.9.5"; src = fetchFromGitHub { owner = "atar-axis"; - repo = pname; - rev = "refs/tags/v${version}"; - sha256 = "sha256-4zd+x9uYl0lJgePM9LEgLYFqvcw6VPF/CbR1XiYSwGE="; + repo = "xpadneo"; + rev = "refs/tags/v${finalAttrs.version}"; + sha256 = "sha256-rT2Mq40fE055FemDG7PBjt+cxgIHJG9tTjtw2nW6B98="; }; setSourceRoot = '' @@ -22,13 +28,17 @@ stdenv.mkDerivation rec { "-C" "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" "M=$(sourceRoot)" - "VERSION=${version}" + "VERSION=${finalAttrs.version}" ]; buildFlags = [ "modules" ]; installFlags = [ "INSTALL_MOD_PATH=${placeholder "out"}" ]; installTargets = [ "modules_install" ]; + passthru.tests = { + xpadneo = nixosTests.xpadneo; + }; + meta = with lib; { description = "Advanced Linux driver for Xbox One wireless controllers"; homepage = "https://atar-axis.github.io/xpadneo"; @@ -36,4 +46,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ kira-bruneau ]; platforms = platforms.linux; }; -} +}) diff --git a/pkgs/os-specific/linux/zfs/default.nix b/pkgs/os-specific/linux/zfs/default.nix index 5d55d1db657..080a198b0f4 100644 --- a/pkgs/os-specific/linux/zfs/default.nix +++ b/pkgs/os-specific/linux/zfs/default.nix @@ -16,7 +16,7 @@ , enablePython ? true # for determining the latest compatible linuxPackages -, linuxPackages_5_18 ? pkgs.linuxKernel.packages.linux_5_18 +, linuxPackages_5_19 ? pkgs.linuxKernel.packages.linux_5_19 }: let @@ -216,28 +216,28 @@ in { # to be adapted zfsStable = common { # check the release notes for compatible kernels - kernelCompatible = kernel.kernelOlder "5.19"; - latestCompatibleLinuxPackages = linuxPackages_5_18; + kernelCompatible = kernel.kernelOlder "5.20"; + latestCompatibleLinuxPackages = linuxPackages_5_19; # this package should point to the latest release. - version = "2.1.5"; + version = "2.1.6"; - sha256 = "sha256-a9rmuPO8R8UfxdHvwjfFuYRGn97a1MPmLZRvr3l0swE="; + sha256 = "sha256-gd5WlNtnoSiVj4sKUGf0WhR7Z1GPebwu3Z1mkNsoC/I="; }; zfsUnstable = common { # check the release notes for compatible kernels - kernelCompatible = kernel.kernelOlder "5.19"; - latestCompatibleLinuxPackages = linuxPackages_5_18; + kernelCompatible = kernel.kernelOlder "5.20"; + latestCompatibleLinuxPackages = linuxPackages_5_19; # this package should point to a version / git revision compatible with the latest kernel release # IMPORTANT: Always use a tagged release candidate or commits from the # zfs-<version>-staging branch, because this is tested by the OpenZFS # maintainers. - version = "2.1.5"; + version = "2.1.6"; # rev = "0000000000000000000000000000000000000000"; - sha256 = "sha256-a9rmuPO8R8UfxdHvwjfFuYRGn97a1MPmLZRvr3l0swE="; + sha256 = "sha256-gd5WlNtnoSiVj4sKUGf0WhR7Z1GPebwu3Z1mkNsoC/I="; isUnstable = true; }; |