bcachefs-tools: 1.31.0 -> 1.31.3, nixos/bcachefs: Use out-of-tree module. (#444428)
This commit is contained in:
@@ -264,6 +264,8 @@
|
|||||||
|
|
||||||
- Due to [deprecation of gnome-session X11 support](https://blogs.gnome.org/alatiera/2025/06/08/the-x11-session-removal/), `services.desktopManager.pantheon` now defaults to pantheon-wayland session. The X11 session has been removed, see [this issue](https://github.com/elementary/session-settings/issues/91) for details.
|
- Due to [deprecation of gnome-session X11 support](https://blogs.gnome.org/alatiera/2025/06/08/the-x11-session-removal/), `services.desktopManager.pantheon` now defaults to pantheon-wayland session. The X11 session has been removed, see [this issue](https://github.com/elementary/session-settings/issues/91) for details.
|
||||||
|
|
||||||
|
- `bcachefs` file systems will now use the out-of-tree module for supported kernels. The in-tree module is unmaintained and users are strongly recommended to switch to kernels that support the out-of-tree module.
|
||||||
|
|
||||||
- `services.gitea` supports sending notifications with sendmail again. To do this, activate the parameter `services.gitea.mailerUseSendmail` and configure SMTP server.
|
- `services.gitea` supports sending notifications with sendmail again. To do this, activate the parameter `services.gitea.mailerUseSendmail` and configure SMTP server.
|
||||||
|
|
||||||
- `networking.wireless.networks.<name>` now has an option to specify SSID, hence allowing duplicated SSID setup. The BSSID option is added along side with this.
|
- `networking.wireless.networks.<name>` now has an option to specify SSID, hence allowing duplicated SSID setup. The BSSID option is added along side with this.
|
||||||
|
|||||||
@@ -175,25 +175,6 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
assertions = [
|
|
||||||
{
|
|
||||||
assertion =
|
|
||||||
let
|
|
||||||
kernel = config.boot.kernelPackages.kernel;
|
|
||||||
in
|
|
||||||
(
|
|
||||||
kernel.kernelAtLeast "6.7"
|
|
||||||
|| (lib.elem (kernel.structuredExtraConfig.BCACHEFS_FS or null) [
|
|
||||||
lib.kernel.module
|
|
||||||
lib.kernel.yes
|
|
||||||
(lib.kernel.option lib.kernel.yes)
|
|
||||||
])
|
|
||||||
);
|
|
||||||
|
|
||||||
message = "Linux 6.7-rc1 at minimum or a custom linux kernel with bcachefs support is required";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -230,7 +211,32 @@ in
|
|||||||
config = lib.mkIf (config.boot.supportedFilesystems.bcachefs or false) (
|
config = lib.mkIf (config.boot.supportedFilesystems.bcachefs or false) (
|
||||||
lib.mkMerge [
|
lib.mkMerge [
|
||||||
{
|
{
|
||||||
inherit assertions;
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion =
|
||||||
|
let
|
||||||
|
kernel = config.boot.kernelPackages.kernel;
|
||||||
|
in
|
||||||
|
(
|
||||||
|
kernel.kernelAtLeast "6.7"
|
||||||
|
|| (lib.elem (kernel.structuredExtraConfig.BCACHEFS_FS or null) [
|
||||||
|
lib.kernel.module
|
||||||
|
lib.kernel.yes
|
||||||
|
(lib.kernel.option lib.kernel.yes)
|
||||||
|
])
|
||||||
|
);
|
||||||
|
|
||||||
|
message = "Linux 6.7-rc1 at minimum or a custom linux kernel with bcachefs support is required";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
warnings = lib.mkIf config.boot.kernelPackages.bcachefs.meta.broken [
|
||||||
|
''
|
||||||
|
Using unmaintained in-tree bcachefs kernel module. This
|
||||||
|
will be removed in 26.05. Please use a kernel supported
|
||||||
|
by the out-of-tree module package.
|
||||||
|
''
|
||||||
|
];
|
||||||
|
|
||||||
# Bcachefs upstream recommends using the latest kernel
|
# Bcachefs upstream recommends using the latest kernel
|
||||||
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||||
@@ -239,6 +245,10 @@ in
|
|||||||
system.fsPackages = [ cfg.package ];
|
system.fsPackages = [ cfg.package ];
|
||||||
services.udev.packages = [ cfg.package ];
|
services.udev.packages = [ cfg.package ];
|
||||||
|
|
||||||
|
boot.extraModulePackages = lib.optionals (!config.boot.kernelPackages.bcachefs.meta.broken) [
|
||||||
|
config.boot.kernelPackages.bcachefs
|
||||||
|
];
|
||||||
|
|
||||||
systemd = {
|
systemd = {
|
||||||
packages = [ cfg.package ];
|
packages = [ cfg.package ];
|
||||||
services = lib.mapAttrs' (mkUnits "") (
|
services = lib.mapAttrs' (mkUnits "") (
|
||||||
@@ -248,7 +258,6 @@ in
|
|||||||
}
|
}
|
||||||
|
|
||||||
(lib.mkIf ((config.boot.initrd.supportedFilesystems.bcachefs or false) || (bootFs != { })) {
|
(lib.mkIf ((config.boot.initrd.supportedFilesystems.bcachefs or false) || (bootFs != { })) {
|
||||||
inherit assertions;
|
|
||||||
boot.initrd.availableKernelModules = [
|
boot.initrd.availableKernelModules = [
|
||||||
"bcachefs"
|
"bcachefs"
|
||||||
"sha256"
|
"sha256"
|
||||||
|
|||||||
@@ -29,13 +29,13 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "bcachefs-tools";
|
pname = "bcachefs-tools";
|
||||||
version = "1.31.0";
|
version = "1.31.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "koverstreet";
|
owner = "koverstreet";
|
||||||
repo = "bcachefs-tools";
|
repo = "bcachefs-tools";
|
||||||
tag = "v${finalAttrs.version}";
|
tag = "v${finalAttrs.version}";
|
||||||
hash = "sha256-wYlfU4PTcVSPSHbIIDbl8pBOJsBAAl44XBapwFZ528U=";
|
hash = "sha256-sXv6YFM91T08WF5dPU7iQNqWbB/QiL2kMaXm6ZtIDqI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
@@ -66,19 +66,29 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
|
|
||||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||||
src = finalAttrs.src;
|
src = finalAttrs.src;
|
||||||
hash = "sha256-ZCzw3cDpQ8fb2jLYdIWrmlNTPStikIs09jx6jzzC2vM=";
|
hash = "sha256-04YrgYfhZ5NfA2BcF2H6Np1SXRiH6CJpkgc9hzlbMAo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
outputs = [
|
||||||
|
"out"
|
||||||
|
"dkms"
|
||||||
|
];
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"PREFIX=${placeholder "out"}"
|
"PREFIX=${placeholder "out"}"
|
||||||
"VERSION=${finalAttrs.version}"
|
"VERSION=${finalAttrs.version}"
|
||||||
"INITRAMFS_DIR=${placeholder "out"}/etc/initramfs-tools"
|
"INITRAMFS_DIR=${placeholder "out"}/etc/initramfs-tools"
|
||||||
|
"DKMSDIR=${placeholder "dkms"}"
|
||||||
|
|
||||||
# Tries to install to the 'systemd-minimal' and 'udev' nix installation paths
|
# Tries to install to the 'systemd-minimal' and 'udev' nix installation paths
|
||||||
"PKGCONFIG_SERVICEDIR=$(out)/lib/systemd/system"
|
"PKGCONFIG_SERVICEDIR=$(out)/lib/systemd/system"
|
||||||
"PKGCONFIG_UDEVDIR=$(out)/lib/udev"
|
"PKGCONFIG_UDEVDIR=$(out)/lib/udev"
|
||||||
]
|
]
|
||||||
++ lib.optional fuseSupport "BCACHEFS_FUSE=1";
|
++ lib.optional fuseSupport "BCACHEFS_FUSE=1";
|
||||||
|
installFlags = [
|
||||||
|
"install"
|
||||||
|
"install_dkms"
|
||||||
|
];
|
||||||
|
|
||||||
env = {
|
env = {
|
||||||
CARGO_BUILD_TARGET = stdenv.hostPlatform.rust.rustcTargetSpec;
|
CARGO_BUILD_TARGET = stdenv.hostPlatform.rust.rustcTargetSpec;
|
||||||
@@ -100,11 +110,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
'';
|
'';
|
||||||
checkFlags = [ "BCACHEFS_TEST_USE_VALGRIND=no" ];
|
checkFlags = [ "BCACHEFS_TEST_USE_VALGRIND=no" ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||||
substituteInPlace $out/libexec/bcachefsck_all \
|
|
||||||
--replace-fail "/usr/bin/python3" "${python3.interpreter}"
|
|
||||||
''
|
|
||||||
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
||||||
installShellCompletion --cmd bcachefs \
|
installShellCompletion --cmd bcachefs \
|
||||||
--bash <($out/sbin/bcachefs completions bash) \
|
--bash <($out/sbin/bcachefs completions bash) \
|
||||||
--zsh <($out/sbin/bcachefs completions zsh) \
|
--zsh <($out/sbin/bcachefs completions zsh) \
|
||||||
|
|||||||
48
pkgs/os-specific/linux/bcachefs-kernel-module/default.nix
Normal file
48
pkgs/os-specific/linux/bcachefs-kernel-module/default.nix
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
bcachefs-tools,
|
||||||
|
kernelModuleMakeFlags,
|
||||||
|
kernel,
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "bcachefs";
|
||||||
|
version = "${kernel.version}-${bcachefs-tools.version}";
|
||||||
|
|
||||||
|
__structuredAttrs = true;
|
||||||
|
|
||||||
|
src = bcachefs-tools.dkms;
|
||||||
|
|
||||||
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
makeFlags = kernelModuleMakeFlags ++ [
|
||||||
|
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||||
|
"INSTALL_MOD_PATH=${placeholder "out"}"
|
||||||
|
];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build M=$(pwd) modules_install "''${makeFlags[@]}" "''${installFlags[@]}"
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
inherit (bcachefs-tools.passthru) tests;
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "out-of-tree bcachefs kernel module";
|
||||||
|
|
||||||
|
inherit (bcachefs-tools.meta)
|
||||||
|
homepage
|
||||||
|
license
|
||||||
|
maintainers
|
||||||
|
platforms
|
||||||
|
;
|
||||||
|
|
||||||
|
broken = !(lib.versionAtLeast kernel.version "6.16" && lib.versionOlder kernel.version "6.18");
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -375,6 +375,8 @@ in
|
|||||||
|
|
||||||
bbswitch = callPackage ../os-specific/linux/bbswitch { };
|
bbswitch = callPackage ../os-specific/linux/bbswitch { };
|
||||||
|
|
||||||
|
bcachefs = callPackage ../os-specific/linux/bcachefs-kernel-module { };
|
||||||
|
|
||||||
ch9344 = callPackage ../os-specific/linux/ch9344 { };
|
ch9344 = callPackage ../os-specific/linux/ch9344 { };
|
||||||
|
|
||||||
chipsec = callPackage ../tools/security/chipsec {
|
chipsec = callPackage ../tools/security/chipsec {
|
||||||
|
|||||||
Reference in New Issue
Block a user