diff options
author | aszlig <aszlig@redmoonstudios.org> | 2016-01-21 15:29:02 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2016-01-21 16:18:13 +0100 |
commit | 05fed13de3b4afcd7b65869e6807858af3d9e20d (patch) | |
tree | dbb86c3b0a93c190285add19770ab641dc5cdbd5 /pkgs/os-specific/linux/multipath-tools | |
parent | 4d5293d8c37e66dd18e9539cf65fc79391e8d301 (diff) | |
download | nixpkgs-05fed13de3b4afcd7b65869e6807858af3d9e20d.tar nixpkgs-05fed13de3b4afcd7b65869e6807858af3d9e20d.tar.gz nixpkgs-05fed13de3b4afcd7b65869e6807858af3d9e20d.tar.bz2 nixpkgs-05fed13de3b4afcd7b65869e6807858af3d9e20d.tar.lz nixpkgs-05fed13de3b4afcd7b65869e6807858af3d9e20d.tar.xz nixpkgs-05fed13de3b4afcd7b65869e6807858af3d9e20d.tar.zst nixpkgs-05fed13de3b4afcd7b65869e6807858af3d9e20d.zip |
multipath_tools: Cleanup and update to v0.5.0
Previously, version 0.4.9 was a tarbomb and in version 0.5.0 this fortunately isn't the case anymore so we don't need to set sourceRoot by ourselves. I've also moved the definition of makeFlagsArray to the attribute makeFlags, because we can use $(var) to substitute shell variables within make. The references to /lib/udev/scsi_id no longer exist in version 0.5.0 and it seems that libudev is used directly. Nevertheless, there are still references to FHS paths such as /var/run, /etc/multipath.conf and /etc/multipath but these are only relevant at runtime and can be configured to point to a different path elsewhere. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/os-specific/linux/multipath-tools')
-rw-r--r-- | pkgs/os-specific/linux/multipath-tools/default.nix | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/pkgs/os-specific/linux/multipath-tools/default.nix b/pkgs/os-specific/linux/multipath-tools/default.nix index 3da37a89923..ba69b421c3d 100644 --- a/pkgs/os-specific/linux/multipath-tools/default.nix +++ b/pkgs/os-specific/linux/multipath-tools/default.nix @@ -1,30 +1,32 @@ { stdenv, fetchurl, lvm2, libaio, gzip, readline, udev }: stdenv.mkDerivation rec { - name = "multipath-tools-0.4.9"; + name = "multipath-tools-0.5.0"; src = fetchurl { url = "http://christophe.varoqui.free.fr/multipath-tools/${name}.tar.bz2"; - sha256 = "04n7kazp1zrlqfza32phmqla0xkcq4zwn176qff5ida4a60whi4d"; + sha256 = "1yd6l1l1c62xjr1xnij2x49kr416anbgfs4y06r86kp9hkmz2g7i"; }; - sourceRoot = "."; + postPatch = '' + sed -i -re ' + s,^( *#define +DEFAULT_MULTIPATHDIR\>).*,\1 "'"$out/lib/multipath"'", + ' libmultipath/defaults.h + sed -i -e 's,\$(DESTDIR)/\(usr/\)\?,$(prefix)/,g' \ + kpartx/Makefile libmpathpersist/Makefile + ''; - buildInputs = [ lvm2 libaio readline ]; + nativeBuildInputs = [ gzip ]; + buildInputs = [ udev lvm2 libaio readline ]; - preBuild = - '' - makeFlagsArray=(GZIP="${gzip}/bin/gzip -9n -c" prefix=$out mandir=$out/share/man/man8 man5dir=$out/share/man/man5 LIB=lib) - - substituteInPlace multipath/Makefile --replace /etc $out/etc - substituteInPlace kpartx/Makefile --replace /etc $out/etc - - substituteInPlace kpartx/kpartx.rules --replace /sbin/kpartx $out/sbin/kpartx - substituteInPlace kpartx/kpartx_id --replace /sbin/dmsetup ${lvm2}/sbin/dmsetup - - substituteInPlace libmultipath/defaults.h --replace /lib/udev/scsi_id ${udev}/lib/udev/scsi_id - substituteInPlace libmultipath/hwtable.c --replace /lib/udev/scsi_id ${udev}/lib/udev/scsi_id - ''; + makeFlags = [ + "LIB=lib" + "prefix=$(out)" + "mandir=$(out)/share/man/man8" + "man5dir=$(out)/share/man/man5" + "man3dir=$(out)/share/man/man3" + "unitdir=$(out)/lib/systemd/system" + ]; meta = { description = "Tools for the Linux multipathing driver"; |