From 2a6bf99e788af5397f6fca43359002685e6d8a30 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Sun, 24 Nov 2024 14:58:40 -0800 Subject: [PATCH] linuxPackages.openafs: Patch for Linux kernel 6.12. Signed-off-by: Anders Kaseorg --- pkgs/servers/openafs/1.8/module.nix | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/pkgs/servers/openafs/1.8/module.nix b/pkgs/servers/openafs/1.8/module.nix index 077a592bd024..d0e600f056ec 100644 --- a/pkgs/servers/openafs/1.8/module.nix +++ b/pkgs/servers/openafs/1.8/module.nix @@ -20,17 +20,32 @@ let modDestDir = "$out/lib/modules/${kernel.modDirVersion}/extra/openafs"; kernelBuildDir = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; - fetchBase64Patch = args: (fetchpatch args).overrideAttrs (o: { - postFetch = "mv $out p; base64 -d p > $out; " + o.postFetch; - }); - in stdenv.mkDerivation { pname = "openafs"; version = "${version}-${kernel.modDirVersion}"; inherit src; - patches = [ ]; + patches = [ + # Linux: Define Clear/Set PageError macros as NOPs + (fetchpatch { + url = "https://gerrit.openafs.org/changes/15964/revisions/917d071a1b3c3e23c984ca8e5501ddccd62a01b6/patch"; + decode = "base64 -d"; + hash = "sha256-WqAHRN1YZj7Cz4X4iF1K3DJC1h8nXlnA9gveClL3KHc="; + }) + # Linux: Refactor afs_linux_write_begin() variants + (fetchpatch { + url = "https://gerrit.openafs.org/changes/15965/revisions/c955b666b904b96620df10328a9a37c2fb5f2ed6/patch"; + decode = "base64 -d"; + hash = "sha256-U2W+8YrD1K7Pb/Jq08uBcuPnGkVvcSyTpwaWWcTbq0w="; + }) + # Linux: Use folios for aops->write_begin/end + (fetchpatch { + url = "https://gerrit.openafs.org/changes/15966/revisions/d1706bdc5080b86b1876d10f062c369e8d898188/patch"; + decode = "base64 -d"; + hash = "sha256-jY+r9LO/4g6K9J1stxNCa38nyr1/J3beOhG9YilEbzg="; + }) + ]; nativeBuildInputs = [ autoconf automake flex libtool_2 perl which bison ] ++ kernel.moduleBuildDependencies;