From 60d400626a3a04068526025b03eef98f99c6c24a Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Tue, 1 Sep 2015 09:08:52 +0000 Subject: [PATCH] - fix paths in udev rules --- mdadm-udev-rules-paths.patch | 21 +++++++++++++++++++++ mdadm.spec | 4 +++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 mdadm-udev-rules-paths.patch diff --git a/mdadm-udev-rules-paths.patch b/mdadm-udev-rules-paths.patch new file mode 100644 index 0000000..439dc4d --- /dev/null +++ b/mdadm-udev-rules-paths.patch @@ -0,0 +1,21 @@ +--- udev-md-raid-arrays.rules.orig 2015-08-03 06:17:13.000000000 +0000 ++++ udev-md-raid-arrays.rules 2015-09-01 08:57:31.874593251 +0000 +@@ -17,7 +17,7 @@ + ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0", GOTO="md_end" + LABEL="md_ignore_state" + +-IMPORT{program}="BINDIR/mdadm --detail --export $devnode" ++IMPORT{program}="/sbin/mdadm --detail --export $devnode" + ENV{DEVTYPE}=="disk", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}", OPTIONS+="string_escape=replace" + ENV{DEVTYPE}=="disk", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}" + ENV{DEVTYPE}=="disk", ENV{MD_DEVNAME}=="?*", SYMLINK+="md/$env{MD_DEVNAME}" +@@ -35,7 +35,7 @@ + ENV{MD_LEVEL}=="raid[1-9]*", ENV{SYSTEMD_WANTS}+="mdmonitor.service" + + # Tell systemd to run mdmon for our container, if we need it. +-ENV{MD_LEVEL}=="raid[1-9]*", ENV{MD_CONTAINER}=="?*", PROGRAM="/usr/bin/readlink $env{MD_CONTAINER}", ENV{MD_MON_THIS}="%c" +-ENV{MD_MON_THIS}=="?*", PROGRAM="/usr/bin/basename $env{MD_MON_THIS}", ENV{SYSTEMD_WANTS}+="mdmon@%c.service" ++ENV{MD_LEVEL}=="raid[1-9]*", ENV{MD_CONTAINER}=="?*", PROGRAM="/bin/readlink $env{MD_CONTAINER}", ENV{MD_MON_THIS}="%c" ++ENV{MD_MON_THIS}=="?*", PROGRAM="/bin/basename $env{MD_MON_THIS}", ENV{SYSTEMD_WANTS}+="mdmon@%c.service" + + LABEL="md_end" diff --git a/mdadm.spec b/mdadm.spec index 3a0ef52..d670a58 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -8,7 +8,7 @@ Summary: Tool for creating and maintaining software RAID devices Summary(pl.UTF-8): Narzędzie do tworzenia i obsługi programowych macierzy RAID Name: mdadm Version: 3.3.4 -Release: 2 +Release: 3 License: GPL v2+ Group: Base Source0: https://www.kernel.org/pub/linux/utils/raid/mdadm/%{name}-%{version}.tar.xz @@ -17,6 +17,7 @@ Source1: %{name}.init Source2: %{name}.sysconfig Source3: %{name}.cron Source4: %{name}-checkarray +Patch0: %{name}-udev-rules-paths.patch URL: https://www.kernel.org/pub/linux/utils/raid/mdadm/ BuildRequires: groff BuildRequires: rpmbuild(macros) >= 1.213 @@ -66,6 +67,7 @@ skonsolidowane na potrzeby initrd. %prep %setup -q +%patch0 -p0 %build %if %{with initrd} -- 2.46.0