From a4dbf985b2440f8bb0210b90aaf549030e274b4f Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 18 Feb 2019 00:09:17 +0100 Subject: [PATCH] Fix systemd version detection Signed-off-by: Igor Gnatenko --- ...apper-multipath-fix-systemd-detection.diff | 12 +++++++++++ device-mapper-multipath.spec | 20 +++---------------- 2 files changed, 15 insertions(+), 17 deletions(-) create mode 100644 device-mapper-multipath-fix-systemd-detection.diff diff --git a/device-mapper-multipath-fix-systemd-detection.diff b/device-mapper-multipath-fix-systemd-detection.diff new file mode 100644 index 0000000..57fa3cb --- /dev/null +++ b/device-mapper-multipath-fix-systemd-detection.diff @@ -0,0 +1,12 @@ +diff -uNr multipath-tools-2df6110.orig/Makefile.inc multipath-tools-2df6110/Makefile.inc +--- multipath-tools-2df6110.orig/Makefile.inc 2019-02-18 00:03:30.709950703 +0100 ++++ multipath-tools-2df6110/Makefile.inc 2019-02-18 00:07:53.603837498 +0100 +@@ -37,7 +37,7 @@ + + ifndef SYSTEMD + ifeq ($(shell systemctl --version > /dev/null 2>&1 && echo 1), 1) +- SYSTEMD = $(shell systemctl --version 2> /dev/null | sed -n 's/systemd \([0-9]*\)/\1/p') ++ SYSTEMD = $(shell systemctl --version 2> /dev/null | sed -n 's/systemd \([0-9]*\).*/\1/p') + endif + endif + diff --git a/device-mapper-multipath.spec b/device-mapper-multipath.spec index 7f60732..310f8f9 100644 --- a/device-mapper-multipath.spec +++ b/device-mapper-multipath.spec @@ -27,6 +27,8 @@ Patch0014: 0014-RH-warn-on-invalid-regex-instead-of-failing.patch Patch0015: 0015-RH-reset-default-find_mutipaths-value-to-off.patch Patch0016: 0016-RH-Fix-nvme-compilation-warning.patch +Patch100: device-mapper-multipath-fix-systemd-detection.diff + # runtime Requires: %{name}-libs = %{version}-%{release} Requires: kpartx = %{version}-%{release} @@ -108,23 +110,7 @@ This package contains the files needed to develop applications that use device-mapper-multipath's libdmmp C API library %prep -%setup -q -n multipath-tools-2df6110 -%patch0001 -p1 -%patch0002 -p1 -%patch0003 -p1 -%patch0004 -p1 -%patch0005 -p1 -%patch0006 -p1 -%patch0007 -p1 -%patch0008 -p1 -%patch0009 -p1 -%patch0010 -p1 -%patch0011 -p1 -%patch0012 -p1 -%patch0013 -p1 -%patch0014 -p1 -%patch0015 -p1 -%patch0016 -p1 +%autosetup -n multipath-tools-2df6110 -p1 cp %{SOURCE1} . %build