diff --git a/1004-Makefile-install-mdadm_env.sh-to-usr-lib-mdadm.patch b/1004-Makefile-install-mdadm_env.sh-to-usr-lib-mdadm.patch deleted file mode 100644 index bd123f0..0000000 --- a/1004-Makefile-install-mdadm_env.sh-to-usr-lib-mdadm.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 6e79d4bd229e5db4e435917daf4c57cd79db9265 Mon Sep 17 00:00:00 2001 -From: colyli -Date: Wed, 17 Oct 2018 11:08:39 +0800 -Subject: [PATCH] Makefile: install mdadm_env.sh to /usr/lib/mdadm -Patch-mainline: N/A, SUSE only patch -References: bsc#1111960 - -Current Makefile installs mdadm_env.sh to /usr/libexec/mdadm but calls it -from /usr/lib/mdadm. This patch changes the installation directory to -/usr/lib/mdadm to make things working. - -Signed-off-by: Coly Li ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 2767ac6..c0aaece 100644 ---- a/Makefile -+++ b/Makefile -@@ -89,7 +89,7 @@ MDMON_DIR = $(RUN_DIR) - # place for autoreplace cookies - FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots - SYSTEMD_DIR=/lib/systemd/system --LIB_DIR=/usr/libexec/mdadm -+LIB_DIR=/usr/lib/mdadm - - COROSYNC:=$(shell [ -d /usr/include/corosync ] || echo -DNO_COROSYNC) - DLM:=$(shell [ -f /usr/include/libdlm.h ] || echo -DNO_DLM) --- -2.19.0 - diff --git a/1004-call-mdadm_env.sh-from-usr-libexec-mdadm.patch b/1004-call-mdadm_env.sh-from-usr-libexec-mdadm.patch new file mode 100644 index 0000000..8f86110 --- /dev/null +++ b/1004-call-mdadm_env.sh-from-usr-libexec-mdadm.patch @@ -0,0 +1,61 @@ +From 6e79d4bd229e5db4e435917daf4c57cd79db9265 Mon Sep 17 00:00:00 2001 +From: colyli +Date: Wed, 17 Oct 2018 11:08:39 +0800 +Subject: [PATCH] Call mdadm_env.sh from /usr/libexec/mdadm +Patch-mainline: N/A, SUSE only patch +References: bsc#1111960, bsc#1202090 + +Current Makefile installs mdadm_env.sh to /usr/libexec/mdadm but the +systemd service files call it from /usr/lib/mdadm. This patch changes +the calling path in systemd service files to /usr/libexec/mdadm to +make things working. + +Signed-off-by: Coly Li +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: mdadm-4.2/systemd/mdcheck_continue.service +=================================================================== +--- mdadm-4.2.orig/systemd/mdcheck_continue.service ++++ mdadm-4.2/systemd/mdcheck_continue.service +@@ -14,5 +14,5 @@ Documentation=man:mdadm(8) + Type=oneshot + Environment="MDADM_CHECK_DURATION=6 hours" + EnvironmentFile=-/run/sysconfig/mdadm +-ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh ++ExecStartPre=-/usr/libexec/mdadm/mdadm_env.sh + ExecStart=/usr/share/mdadm/mdcheck --continue --duration ${MDADM_CHECK_DURATION} +Index: mdadm-4.2/systemd/mdcheck_start.service +=================================================================== +--- mdadm-4.2.orig/systemd/mdcheck_start.service ++++ mdadm-4.2/systemd/mdcheck_start.service +@@ -14,5 +14,5 @@ Documentation=man:mdadm(8) + Type=oneshot + Environment="MDADM_CHECK_DURATION=6 hours" + EnvironmentFile=-/run/sysconfig/mdadm +-ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh ++ExecStartPre=-/usr/libexec/mdadm/mdadm_env.sh + ExecStart=/usr/share/mdadm/mdcheck --duration ${MDADM_CHECK_DURATION} +Index: mdadm-4.2/systemd/mdmonitor-oneshot.service +=================================================================== +--- mdadm-4.2.orig/systemd/mdmonitor-oneshot.service ++++ mdadm-4.2/systemd/mdmonitor-oneshot.service +@@ -12,5 +12,5 @@ Documentation=man:mdadm(8) + [Service] + Environment=MDADM_MONITOR_ARGS=--scan + EnvironmentFile=-/run/sysconfig/mdadm +-ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh ++ExecStartPre=-/usr/libexec/mdadm/mdadm_env.sh + ExecStart=BINDIR/mdadm --monitor --oneshot $MDADM_MONITOR_ARGS +Index: mdadm-4.2/systemd/mdmonitor.service +=================================================================== +--- mdadm-4.2.orig/systemd/mdmonitor.service ++++ mdadm-4.2/systemd/mdmonitor.service +@@ -13,5 +13,5 @@ Documentation=man:mdadm(8) + [Service] + Environment= MDADM_MONITOR_ARGS=--scan + EnvironmentFile=-/run/sysconfig/mdadm +-ExecStartPre=-/usr/lib/mdadm/mdadm_env.sh ++ExecStartPre=-/usr/libexec/mdadm/mdadm_env.sh + ExecStart=BINDIR/mdadm --monitor $MDADM_MONITOR_ARGS diff --git a/mdadm.changes b/mdadm.changes index c31ff01..5417031 100644 --- a/mdadm.changes +++ b/mdadm.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Thu Nov 24 06:23:28 UTC 2022 - Coly Li + +- Call mdadm_env.sh from /usr/libexec/mdadm (bsc#1111960, bsc#1202090) + 1004-call-mdadm_env.sh-from-usr-libexec-mdadm.patch +- The patch (bsc#1111960) which fixed rpm check failure is replaced + by the above patch, + 1004-Makefile-install-mdadm_env.sh-to-usr-lib-mdadm.patch. + +------------------------------------------------------------------- +Thu Nov 24 05:57:50 UTC 2022 - Coly Li + +- mdadm.spec: remove "PreReq: %{_sbindir}/mkinitrd" as it is + unnecessary now. (bsc#1202352) + ------------------------------------------------------------------- Thu Nov 3 15:58:38 UTC 2022 - Coly Li diff --git a/mdadm.spec b/mdadm.spec index 10487c3..da2b331 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -32,7 +32,6 @@ BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(udev) PreReq: %fillup_prereq -PreReq: %{_sbindir}/mkinitrd PreReq: coreutils Recommends: smtp_daemon URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/ @@ -97,7 +96,7 @@ Patch51: 0051-Mdmonitor-Omit-non-md-devices.patch Patch1001: 1001-display-timeout-status.patch Patch1002: 1002-OnCalendar-format-fix-of-mdcheck_start-timer.patch Patch1003: 1003-mdadm-treat-the-Dell-softraid-array-as-local-array.patch -Patch1004: 1004-Makefile-install-mdadm_env.sh-to-usr-lib-mdadm.patch +Patch1004: 1004-call-mdadm_env.sh-from-usr-libexec-mdadm.patch Patch1005: 1005-mdadm-enable-Intel-Alderlake-RSTe-configuration.patch %define _udevdir %(pkg-config --variable=udevdir udev) %define _systemdshutdowndir %{_unitdir}/../system-shutdown @@ -231,7 +230,8 @@ ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcmdmonitor %{_unitdir}/mdcheck_start.timer %{_unitdir}/mdmonitor-oneshot.service %{_unitdir}/mdmonitor-oneshot.timer -%dir %{_prefix}/lib/mdadm -%{_prefix}/lib/mdadm/mdadm_env.sh +%dir %{_prefix}/libexec/ +%dir %{_prefix}/libexec/mdadm +%{_prefix}/libexec/mdadm/mdadm_env.sh %changelog