From ad9521e07e188572fb64f4941b8eb770c7a7e20c Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Mon, 2 Jan 2023 21:34:35 +0100 Subject: [PATCH] multipath-tools: 0.9.3 -> 0.9.4 https://github.com/opensvc/multipath-tools/compare/0.9.3...0.9.4 Fixed a bunch of issues and warnings occuring during the build. `passthru.tests` is however still broken. --- .../modules/services/networking/multipath.nix | 1 - .../linux/multipath-tools/default.nix | 21 +++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/nixos/modules/services/networking/multipath.nix b/nixos/modules/services/networking/multipath.nix index 54ee2a015687..b20ec76ddf59 100644 --- a/nixos/modules/services/networking/multipath.nix +++ b/nixos/modules/services/networking/multipath.nix @@ -516,7 +516,6 @@ in { ${optionalString (!isNull defaults) '' defaults { ${indentLines 2 defaults} - multipath_dir ${cfg.package}/lib/multipath } ''} ${optionalString (!isNull blacklist) '' diff --git a/pkgs/os-specific/linux/multipath-tools/default.nix b/pkgs/os-specific/linux/multipath-tools/default.nix index d39da5fb9d7f..2509b6850514 100644 --- a/pkgs/os-specific/linux/multipath-tools/default.nix +++ b/pkgs/os-specific/linux/multipath-tools/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, coreutils , pkg-config , perl , lvm2 @@ -9,31 +10,28 @@ , systemd , liburcu , json_c -, kmod +, linuxHeaders , cmocka , nixosTests }: stdenv.mkDerivation rec { pname = "multipath-tools"; - version = "0.9.3"; + version = "0.9.4"; src = fetchFromGitHub { owner = "opensvc"; repo = "multipath-tools"; rev = "refs/tags/${version}"; - sha256 = "sha256-pIGeZ+jB+6GqkfVN83axHIuY/BobQ+zs+tH+MkLIln0="; + sha256 = "sha256-CPvtnjzkyxKXrT8+YXaIgDA548h8X61+jCxMHKFfEyg="; }; postPatch = '' - substituteInPlace libmultipath/Makefile \ - --replace /usr/include/libdevmapper.h ${lib.getDev lvm2}/include/libdevmapper.h + substituteInPlace create-config.mk \ + --replace /bin/echo ${coreutils}/bin/echo - # systemd-udev-settle.service is deprecated. substituteInPlace multipathd/multipathd.service \ - --replace /sbin/modprobe ${lib.getBin kmod}/sbin/modprobe \ - --replace /sbin/multipathd "$out/bin/multipathd" \ - --replace " systemd-udev-settle.service" "" + --replace /sbin/multipathd "$out/bin/multipathd" sed -i -re ' s,^( *#define +DEFAULT_MULTIPATHDIR\>).*,\1 "'"$out/lib/multipath"'", @@ -45,15 +43,16 @@ stdenv.mkDerivation rec { ''; nativeBuildInputs = [ pkg-config perl ]; - buildInputs = [ systemd lvm2 libaio readline liburcu json_c ]; + buildInputs = [ systemd lvm2 libaio readline liburcu json_c linuxHeaders ]; makeFlags = [ "LIB=lib" "prefix=$(out)" + "systemd_prefix=$(out)" + "kernel_incdir=${linuxHeaders}/include/" "man8dir=$(out)/share/man/man8" "man5dir=$(out)/share/man/man5" "man3dir=$(out)/share/man/man3" - "SYSTEMDPATH=lib" ]; doCheck = true;