diff -Nru multipath-tools-0.4.9/debian/changelog multipath-tools-0.4.9/debian/changelog --- multipath-tools-0.4.9/debian/changelog 2015-04-13 11:23:31.000000000 -0300 +++ multipath-tools-0.4.9/debian/changelog 2015-04-13 18:47:57.000000000 -0300 @@ -1,3 +1,11 @@ +multipath-tools (0.4.9-3ubuntu12whitespacedIDs1) UNRELEASED; urgency=medium + + * Support identifiers with spaces in it without user_friendly_names + - debian/kpartx.udev: replace dmsetup_env with equivalent udev rules (for kpartx_id) + - debian/patches/0019-libmultipath-scsi-id-replace-whitespace.patch: (for kpartx -a) + + -- Mauricio Faria de Oliveira Mon, 13 Apr 2015 18:43:32 -0300 + multipath-tools (0.4.9-3ubuntu12) vivid; urgency=medium [ Mauricio Faria de Oliveira ] diff -Nru multipath-tools-0.4.9/debian/kpartx.udev multipath-tools-0.4.9/debian/kpartx.udev --- multipath-tools-0.4.9/debian/kpartx.udev 2015-04-10 15:47:09.000000000 -0300 +++ multipath-tools-0.4.9/debian/kpartx.udev 2015-04-13 18:41:00.000000000 -0300 @@ -14,7 +14,12 @@ # This is a temporary hack until Debian's dmsetup properly supports "dmsetup # export". For more information see: #434241, #487881, #493078 -IMPORT{program}="/lib/udev/dmsetup_env %M %m" +#IMPORT{program}="/lib/udev/dmsetup_env %M %m" +# NOTE: dmsetup_env (re)defines DM_{NAME,UUID} with spaces incorrectly (unmangled values, +# not whitelisted for udev) and differently from earlier rules (mangled values, dm.rules). +# Instead, use the following rules with an equivalent check/output: +IMPORT{program}="/sbin/dmsetup info -j %M -m %m -c --nameprefixes --noheadings --rows -o attr" +ENV{DM_ATTR}=="L-*", ENV{DM_TABLE_STATE}="LIVE", ENV{DM_STATE}="ACTIVE" ENV{DM_TABLE_STATE}!="LIVE", GOTO="kpartx_end" diff -Nru multipath-tools-0.4.9/debian/patches/0019-libmultipath-scsi-id-replace-whitespace.patch multipath-tools-0.4.9/debian/patches/0019-libmultipath-scsi-id-replace-whitespace.patch --- multipath-tools-0.4.9/debian/patches/0019-libmultipath-scsi-id-replace-whitespace.patch 1969-12-31 21:00:00.000000000 -0300 +++ multipath-tools-0.4.9/debian/patches/0019-libmultipath-scsi-id-replace-whitespace.patch 2015-04-13 18:23:45.000000000 -0300 @@ -0,0 +1,29 @@ +Origin: upstream, http://git.opensvc.com/gitweb.cgi?p=multipath-tools/.git;a=commit;h=e7deadc8985652879ec54c0943d6b396eba60598 +From: Hannes Reinecke +Date: Wed, 27 Jan 2010 07:48:11 +0000 (+0100) +Subject: Use '--replace-whitespace' option for scsi_id +X-Git-Tag: 0.5.0~326^2~72 +X-Git-Url: http://git.opensvc.com/gitweb.cgi?p=multipath-tools%2F.git;a=commitdiff_plain;h=e7deadc8985652879ec54c0943d6b396eba60598 + +Use '--replace-whitespace' option for scsi_id + +Some SCSI devices will return an identifier with spaces in it. +As we're using this name as the default device-mapper name we +should be reformatting it to replace all spaces with underscores +so as not to confuse device-mapper. + +References: bnc#572209 + +Signed-off-by: Hannes Reinecke +--- + +diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h +index aa5d538..f268064 100644 +--- a/libmultipath/defaults.h ++++ b/libmultipath/defaults.h +@@ -1,4 +1,4 @@ +-#define DEFAULT_GETUID "/lib/udev/scsi_id --whitelisted --device=/dev/%n" ++#define DEFAULT_GETUID "/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/%n" + #define DEFAULT_UDEVDIR "/dev" + #define DEFAULT_MULTIPATHDIR "/" LIB_STRING "/multipath" + #define DEFAULT_SELECTOR "round-robin 0" diff -Nru multipath-tools-0.4.9/debian/patches/series multipath-tools-0.4.9/debian/patches/series --- multipath-tools-0.4.9/debian/patches/series 2015-04-10 15:49:32.000000000 -0300 +++ multipath-tools-0.4.9/debian/patches/series 2015-04-13 18:23:08.000000000 -0300 @@ -19,3 +19,4 @@ 0016-kpartx-non-512B-GPT.patch 0017-kpartx-non-512B-sectors.patch 0018-ext-part-gt-512B-sectors.patch +0019-libmultipath-scsi-id-replace-whitespace.patch