Install kpartx rules with correct prefix for dracut

dracut is looking for 66-kpartx.rules. So install the rules
with the correct prefix.

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath: filter for missing property in get_refwwid()

get_refwwid() needs to filter for missing udev properties,
otherwise it'll accept just about any SCSI device.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Double uevent stacksize yet again

Another report indicates that the uevent stacksize might still be
too small.

Signed-off-by: Hannes Reinecke <hare@suse.de>
discovery: do not fail discovery on individual devices

Any errors returned from individual devices during discovery do
not invalidate the entire discovery. So instead of returning
the pointless accumulated error count we should be returning
the number of devices which were actually discovered.

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath: Prefer deprecated 'getuid' callout

We need first to check if the deprecated 'getuid' callout
should be used, otherwise it might never be called.

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath: Skip paths with empty wwid

If the WWID is empty this is pretty much a terminal error, as
we don't have anything to identify the multipath device.
So skip those devices during discovery.

References: bnc#861534

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath: correctly terminate string in strlcpy()

strlcpy would not add a trailing '\0' if the string buffer
was longer than the string, causing getuid callout to
always fail.

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath: Don't chop const strings

multipath was chopping sysfs attr strings in order to make sure that
ending whitespace didn't cause them to overflow their buffer. However
those strings were const strings. This patch makes multipath check how
much of the string length is ending whitespace, so that it can tell if
it will really overflow the buffer without chopping the const string.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
kpartx: Install rules file with correct prefix

We don't need to swizzle names in the spec file, the Makefile
should be doing it on itself.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Fixup typo in Makefile

Signed-off-by: Hannes Reinecke <hare@suse.de>
multipathd: display uevent sequence number on 'show daemon'

Display the sequence number of the last processed ueven for
the CLI command 'show daemon'.

Signed-off-by: Hannes Reinecke <hare@suse.de>
- Update Changelog
kpartx: Install rules under /usr/lib/udev/rules.d

The rules files are generic, so they should be installed under
/usr/lib/udev/rules.d

Signed-off-by: Hannes Reinecke <hare@suse.de>
Update build_rpm script to allow submission to external obs

Signed-off-by: Hannes Reinecke <hare@suse.de>
Add multipath rules for systemd support

Systemd and dracut rely on the DM_MULTIPATH_DEVICE_PATH setting
to mark the devices as used by multipathing. So add a ruleset
providing this setting.

Signed-off-by: Hannes Reinecke <hare@suse.de>
- Update Changelog