Merge pull request #278984 from birkb/drbd-kernel-module

drbd: 9.19.1 -> 9.27.0 (utils), 9.2.7 kernel driver added
This commit is contained in:
lassulus 2024-04-12 21:53:55 +02:00 committed by GitHub
commit ad4c8244f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 82 additions and 8 deletions

View file

@ -2621,6 +2621,12 @@
githubId = 30630233;
name = "Timo Triebensky";
};
birkb = {
email = "birk@batchworks.de";
github = "birkb";
githubId = 10164833;
name = "Birk Bohne";
};
bjornfor = {
email = "bjorn.forsman@gmail.com";
github = "bjornfor";

View file

@ -578,6 +578,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- QtMultimedia has changed its default backend to `QT_MEDIA_BACKEND=ffmpeg` (previously `gstreamer` on Linux or `darwin` on MacOS).
The previous native backends remain available but are now minimally maintained. Refer to [upstream documentation](https://doc.qt.io/qt-6/qtmultimedia-index.html#ffmpeg-as-the-default-backend) for further details about each platform.
- The `drbd` out-of-tree Linux kernel driver has been added in version `9.2.7`. With it the DRBD 9.x features can be used instead of the 8.x features provided by the `8.4.11` in-tree driver.
- The oil shell's c++ version is now available as `oils-for-unix`. The python version is still available as `oil`
- `documentation.man.mandoc` now by default uses `MANPATH` to set the directories where mandoc will search for manual pages.

View file

@ -31,11 +31,11 @@ import ./make-test-python.nix (
}
on drbd1 {
address ${nodes.drbd1.config.networking.primaryIPAddress}:${toString drbdPort};
address ${nodes.drbd1.networking.primaryIPAddress}:${toString drbdPort};
}
on drbd2 {
address ${nodes.drbd2.config.networking.primaryIPAddress}:${toString drbdPort};
address ${nodes.drbd2.networking.primaryIPAddress}:${toString drbdPort};
}
}
'';
@ -45,7 +45,7 @@ import ./make-test-python.nix (
{
name = "drbd";
meta = with pkgs.lib.maintainers; {
maintainers = [ ryantm astro ];
maintainers = [ ryantm astro birkb ];
};
nodes.drbd1 = drbdConfig;

View file

@ -0,0 +1,57 @@
{ stdenv, lib, fetchurl, kernel, flex, coccinelle, python3 }:
stdenv.mkDerivation rec {
name = "drbd-${version}-${kernel.version}";
version = "9.2.7";
src = fetchurl {
url = "https://pkg.linbit.com//downloads/drbd/9/drbd-${version}.tar.gz";
sha256 = "1355ns10z0fjgqsdpf09qfy01j8lg2n7zy4kclmar3s798n3mh56";
};
hardeningDisable = [ "pic" ];
nativeBuildInputs = [
kernel.moduleBuildDependencies
flex
coccinelle
python3
];
makeFlags = [
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"SPAAS=false"
];
# 6.4 and newer provide a in-tree version of the handshake module https://www.kernel.org/doc/html/v6.4/networking/tls-handshake.html
installPhase = ''
runHook preInstall
install -D drbd/drbd.ko -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/block/drbd
install -D drbd/drbd_transport_tcp.ko -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/block/drbd
install -D drbd/drbd_transport_lb-tcp.ko -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/block/drbd
install -D drbd/drbd_transport_rdma.ko -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/block/drbd
${lib.optionalString (lib.versionOlder kernel.version "6.4") ''
install -D drbd/drbd-kernel-compat/handshake/handshake.ko -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/block/drbd
''}
runHook postInstall
'';
postPatch = ''
patchShebangs .
substituteInPlace Makefile --replace 'SHELL=/bin/bash' 'SHELL=${builtins.getEnv "SHELL"}'
'';
enableParallelBuilding = true;
meta = with lib; {
homepage = "https://github.com/LINBIT/drbd";
description = "LINBIT DRBD kernel module";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ birkb ];
longDescription = ''
DRBD is a software-based, shared-nothing, replicated storage solution
mirroring the content of block devices (hard disks, partitions, logical volumes, and so on) between hosts.
'';
};
}

View file

@ -10,7 +10,9 @@
, libxslt
, nixosTests
, perl
, perlPackages
, systemd
, keyutils
# drbd-utils are compiled twice, once with forOCF = true to extract
# its OCF definitions for use in the ocf-resource-agents derivation,
@ -22,11 +24,11 @@
stdenv.mkDerivation rec {
pname = "drbd";
version = "9.19.1";
version = "9.27.0";
src = fetchurl {
url = "https://pkg.linbit.com/downloads/drbd/utils/${pname}-utils-${version}.tar.gz";
sha256 = "1l99kcrb0j85wxxmrdihpx9bk1a4sdi7wlp5m1x5l24k8ck1m5cf";
sha256 = "1qwdrjrgas8z8vc6c85xcrqaczjwyqd61yig01n44wa5z0j3v4aq";
};
nativeBuildInputs = [
@ -34,11 +36,12 @@ stdenv.mkDerivation rec {
libxslt
docbook_xsl
asciidoctor
keyutils
];
buildInputs = [
perl
# perlPackages.Po4a used by ja documentation
perlPackages.Po4a
];
configureFlags = [
@ -123,6 +126,10 @@ stdenv.mkDerivation rec {
description = "Distributed Replicated Block Device, a distributed storage system for Linux (userspace utilities)";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ ryantm astro ];
maintainers = with maintainers; [ ryantm astro birkb ];
longDescription = ''
DRBD is a software-based, shared-nothing, replicated storage solution
mirroring the content of block devices (hard disks, partitions, logical volumes, and so on) between hosts.
'';
};
}

View file

@ -27230,7 +27230,7 @@ with pkgs;
dmraid = callPackage ../os-specific/linux/dmraid { lvm2 = lvm2_dmeventd; };
drbd = callPackage ../os-specific/linux/drbd { };
drbd = callPackage ../os-specific/linux/drbd/utils.nix { };
dropwatch = callPackage ../os-specific/linux/dropwatch { };

View file

@ -574,6 +574,8 @@ in {
hid-tmff2 = callPackage ../os-specific/linux/hid-tmff2 { };
drbd = callPackage ../os-specific/linux/drbd/driver.nix { };
} // lib.optionalAttrs config.allowAliases {
ati_drivers_x11 = throw "ati drivers are no longer supported by any kernel >=4.1"; # added 2021-05-18;
hid-nintendo = throw "hid-nintendo was added in mainline kernel version 5.16"; # Added 2023-07-30