From cb1b1cf9c69ed49c617747fd8a168a8933fbe4ce Mon Sep 17 00:00:00 2001 From: hyperfekt Date: Thu, 20 May 2021 03:05:19 +0200 Subject: [PATCH] linux_testing_bcachefs: 5.9.0-2020.11.20 -> 5.13-2021-07-08 Changes the package to apply a patchset to the appropriate minor kernel instead of using its initial release, which means it will benefit from revision updates. --- .../linux/kernel/linux-testing-bcachefs.nix | 49 +++++++++++-------- pkgs/top-level/all-packages.nix | 8 ++- 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix b/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix index 619bf48b736c..7a79003add5f 100644 --- a/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix +++ b/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix @@ -1,24 +1,33 @@ -{ lib, buildPackages, fetchFromGitHub, fetchpatch, perl, buildLinux, ... } @ args: +{ lib +, fetchpatch +, kernel +, date ? "2021-07-08" +, commit ? "3693b2ca83ff9eda49660b31299d2bebe3a1075f" +, diffHash ? "1sfq3vwc2kxa761s292f2cqrm0vvqvkdx6drpyn5yaxwnapwidcw" +, kernelPatches # must always be defined in bcachefs' all-packages.nix entry because it's also a top-level attribute supplied by callPackage +, argsOverride ? {} +, ... +} @ args: -buildLinux (args // { - version = "5.9.0-2020.11.20"; - modDirVersion = "5.9.0"; +kernel.override ( args // { - src = fetchFromGitHub { - owner = "koverstreet"; - repo = "bcachefs"; - # commit does not exist on any branch on the target repository - rev = "6a505b63ed3003faf5000f19fd08bbd477d93fbc"; - sha256 = "1rf34gzv9npafp1c3i6lymk3b0gnqp4rb0wl33pw6yrpgnsry3cc"; - }; + argsOverride = { + version = "${kernel.version}-bcachefs-unstable-${date}"; + extraMeta = { + branch = "master"; + maintainers = with lib.maintainers; [ davidak chiiruno ]; + platforms = [ "x86_64-linux" ]; + }; + } // argsOverride; - extraConfig = "BCACHEFS_FS m"; + kernelPatches = [ { + name = "bcachefs-${commit}"; + patch = fetchpatch { + name = "bcachefs-${commit}.diff"; + url = "https://evilpiepirate.org/git/bcachefs.git/rawdiff/?id=${commit}&id2=v${lib.versions.major kernel.version}.${lib.versions.minor kernel.version}"; + sha256 = diffHash; + }; + extraConfig = "BCACHEFS_FS m"; + } ] ++ kernelPatches; - extraMeta = { - branch = "master"; - hydraPlatforms = []; # Should the testing kernels ever be built on Hydra? - maintainers = with lib.maintainers; [ davidak chiiruno ]; - platforms = [ "x86_64-linux" ]; - }; - -} // (args.argsOverride or {})) +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 786dd4e0dc21..516800c79107 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20846,11 +20846,9 @@ in ]; }; - linux_testing_bcachefs = callPackage ../os-specific/linux/kernel/linux-testing-bcachefs.nix { - kernelPatches = - [ kernelPatches.bridge_stp_helper - kernelPatches.request_key_helper - ]; + linux_testing_bcachefs = callPackage ../os-specific/linux/kernel/linux-testing-bcachefs.nix rec { + kernel = linux_5_13; + kernelPatches = kernel.kernelPatches; }; linux_hardkernel_4_14 = callPackage ../os-specific/linux/kernel/linux-hardkernel-4.14.nix {