mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
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>
This commit is contained in:
parent
4d5293d8c3
commit
05fed13de3
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user