bcachefs: revert using json to hold bcachefs commits/hashes

The json appearantly contained the wrong checksum and we don't have a way to generate this

authored by Jörg Thalheim and committed by Jörg Thalheim 98b8e0de 1048867f

+21 -27
-5
pkgs/os-specific/linux/kernel/bcachefs.json
··· 1 - { 2 - "diffHash": "sha256-BmXd/5Hn/xr7gNFp6BsBMG2XeKFlPGxv66IQ8DEwh5k=", 3 - "commit": "4d2faeb4fb58c389dc9f76b8d5ae991ef4497e04", 4 - "date": "2023-09-28" 5 - }
+9 -11
pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix
··· 2 2 , stdenv 3 3 , fetchpatch 4 4 , kernel 5 + , commitDate ? "2023-06-28" 5 6 # bcachefs-tools stores the expected-revision in: 6 7 # https://evilpiepirate.org/git/bcachefs-tools.git/tree/.bcachefs_revision 7 8 # but this does not means that it'll be the latest-compatible revision 8 - , version ? lib.importJSON ./bcachefs.json 9 + , currentCommit ? "4d2faeb4fb58c389dc9f76b8d5ae991ef4497e04" 10 + , diffHash ? "sha256-DtMc8P4lTRzvS6PVvD7WtWEPsfnxIXSpqMsKKWs+edI=" 9 11 , kernelPatches # must always be defined in bcachefs' all-packages.nix entry because it's also a top-level attribute supplied by callPackage 10 12 , argsOverride ? {} 11 13 , ... 12 14 } @ args: 13 - let localversion = "-bcachefs-unstable-${version.date}"; 14 - in 15 15 # NOTE: bcachefs-tools should be updated simultaneously to preserve compatibility 16 16 (kernel.override ( args // { 17 17 18 18 argsOverride = { 19 - version = "${kernel.version}${localversion}"; 20 - modDirVersion = "${kernel.version}${localversion}"; 19 + version = "${kernel.version}-bcachefs-unstable-${commitDate}"; 20 + modDirVersion = kernel.modDirVersion; 21 21 22 22 extraMeta = { 23 23 homepage = "https://bcachefs.org/"; ··· 27 27 } // argsOverride; 28 28 29 29 structuredExtraConfig = with lib.kernel; { 30 - # we need this for uname 31 - LOCALVERSION = freeform localversion; 32 30 BCACHEFS_FS = module; 33 31 BCACHEFS_QUOTA = option yes; 34 32 BCACHEFS_POSIX_ACL = option yes; ··· 37 35 }; 38 36 39 37 kernelPatches = [ { 40 - name = "bcachefs-${version.commit}"; 38 + name = "bcachefs-${currentCommit}"; 41 39 42 40 patch = fetchpatch { 43 - name = "bcachefs-${version.commit}.diff"; 44 - url = "https://evilpiepirate.org/git/bcachefs.git/rawdiff/?id=${version.commit}&id2=v${lib.versions.majorMinor kernel.version}"; 45 - sha256 = version.diffHash; 41 + name = "bcachefs-${currentCommit}.diff"; 42 + url = "https://evilpiepirate.org/git/bcachefs.git/rawdiff/?id=${currentCommit}&id2=v${lib.versions.majorMinor kernel.version}"; 43 + sha256 = diffHash; 46 44 }; 47 45 } ] ++ kernelPatches; 48 46 }))
+12 -4
pkgs/tools/filesystems/bcachefs-tools/default.nix
··· 19 19 , rustPlatform 20 20 , makeWrapper 21 21 , fuseSupport ? false 22 - , version ? lib.importJSON ./version.json 23 22 }: 23 + let 24 + rev = "6b175a022496572416918bd38d083120c23ba5f2"; 25 + in 24 26 stdenv.mkDerivation { 25 27 pname = "bcachefs-tools"; 26 - version = "unstable-${version.date}"; 28 + version = "unstable-2023-09-29"; 27 29 28 - src = fetchFromGitHub (builtins.removeAttrs version ["date"]); 30 + 31 + src = fetchFromGitHub { 32 + owner = "koverstreet"; 33 + repo = "bcachefs-tools"; 34 + inherit rev; 35 + hash = "sha256-qC6Bq2zdO8Tj+bZbIUvcVBqvuKccqDEX3HIeOXsEloQ="; 36 + }; 29 37 30 38 nativeBuildInputs = [ 31 39 pkg-config ··· 63 71 64 72 makeFlags = [ 65 73 "PREFIX=${placeholder "out"}" 66 - "VERSION=${lib.strings.substring 0 7 version.rev}" 74 + "VERSION=${lib.strings.substring 0 7 rev}" 67 75 "INITRAMFS_DIR=${placeholder "out"}/etc/initramfs-tools" 68 76 ]; 69 77
-7
pkgs/tools/filesystems/bcachefs-tools/version.json
··· 1 - { 2 - "owner": "koverstreet", 3 - "repo": "bcachefs-tools", 4 - "rev": "6b175a022496572416918bd38d083120c23ba5f2", 5 - "sha256": "qC6Bq2zdO8Tj+bZbIUvcVBqvuKccqDEX3HIeOXsEloQ=", 6 - "date": "2023-09-29" 7 - }