Skip to contentSkip to conversation

The parallel make patch for mdadm

DISCUSSION Samuli Suominen 2 participants 2 messages Aug 21, 2014 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#2 lore raw
In reply to a message not in the archive
Quoted 5 lines · NeilBrown
Quoted 2 lines · On Wed, 20 Aug 2014 20:43:30 +0300 Samuli Suominen <[email protected]> wrote:

I think you forgot to apply the patch?

Quoted 9 lines
Quoted 3 lines

Link to it,

http://www.spinics.net/lists/raid/msg46782.html

No, I sent you a reply which you didn't respond to.

I've attached it.

NeilBrown

Sorry! I blame my mail client, and can't immediately find the responsible kludge
from Thunderbird.

So, here is it as attachment, properly git formatted patch.

From 917d62be74f07dc433ab4ddb224e7f3e04505ac1 Mon Sep 17 00:00:00 2001
From: Samuli Suominen <[email protected]>
Date: Thu, 21 Aug 2014 06:53:54 +0300
Subject: [PATCH] Fix parallel make problem, as in, when make is called with,
for example, "make -j9 install install-system", both install and install-systemd targets at the same line and with high -j value.
Same install.tmp file was used, and udev rules ended up in systemd service files, or otherway around.
For more information, see:
http://www.spinics.net/lists/raid/msg46782.html
http://bugs.gentoo.org/show_bug.cgi?id=517218

---
 Makefile | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
Makefile +9 -9
index 361e625..f058a22 100644
@@ -282,25 +282,25 @@ install-man: mdadm.8 md.4 mdadm.conf.5 mdmon.8
 
 install-udev: udev-md-raid-arrays.rules udev-md-raid-assembly.rules
 	@for file in 63-md-raid-arrays.rules 64-md-raid-assembly.rules ; \
-	do sed -e 's,BINDIR,$(BINDIR),g' udev-$${file#??-} > .install.tmp && \
+	do sed -e 's,BINDIR,$(BINDIR),g' udev-$${file#??-} > .install.tmp.1 && \
 	   echo $(INSTALL) -D -m 644 udev-$${file#??-} $(DESTDIR)$(UDEVDIR)/rules.d/$$file ; \
-	   $(INSTALL) -D -m 644 .install.tmp $(DESTDIR)$(UDEVDIR)/rules.d/$$file ; \
-	   rm -f .install.tmp; \
+	   $(INSTALL) -D -m 644 .install.tmp.1 $(DESTDIR)$(UDEVDIR)/rules.d/$$file ; \
+	   rm -f .install.tmp.1; \
 	done
 
 install-systemd: systemd/[email protected]
 	@for file in [email protected] mdmonitor.service [email protected] \
 		[email protected] [email protected]; \
-	do sed -e 's,BINDIR,$(BINDIR),g' systemd/$$file > .install.tmp && \
+	do sed -e 's,BINDIR,$(BINDIR),g' systemd/$$file > .install.tmp.2 && \
 	   echo $(INSTALL) -D -m 644 systemd/$$file $(DESTDIR)$(SYSTEMD_DIR)/$$file ; \
-	   $(INSTALL) -D -m 644 .install.tmp $(DESTDIR)$(SYSTEMD_DIR)/$$file ; \
-	   rm -f .install.tmp; \
+	   $(INSTALL) -D -m 644 .install.tmp.2 $(DESTDIR)$(SYSTEMD_DIR)/$$file ; \
+	   rm -f .install.tmp.2; \
 	done
 	@for file in mdadm.shutdown ; \
-	do sed -e 's,BINDIR,$(BINDIR),g' systemd/$$file > .install.tmp && \
+	do sed -e 's,BINDIR,$(BINDIR),g' systemd/$$file > .install.tmp.3 && \
 	   echo $(INSTALL) -D -m 755  systemd/$$file $(DESTDIR)$(SYSTEMD_DIR)-shutdown/$$file ; \
-	   $(INSTALL) -D -m 755  .install.tmp $(DESTDIR)$(SYSTEMD_DIR)-shutdown/$$file ; \
-	   rm -f .install.tmp; \
+	   $(INSTALL) -D -m 755  .install.tmp.3 $(DESTDIR)$(SYSTEMD_DIR)-shutdown/$$file ; \
+	   rm -f .install.tmp.3; \
 	done
 	if [ -f /etc/SuSE-release -o -n "$(SUSE)" ] ;then $(INSTALL) -D -m 755 systemd/SUSE-mdadm_env.sh $(DESTDIR)$(SYSTEMD_DIR)/../scripts/mdadm_env.sh ;fi
 
Signature · 1 line
2.0.2
#3 lore raw
Quoted 14 lines · On Thu, 21 Aug 2014 06:56:48 +0300 Samuli Suominen <[email protected]> wrote:
Quoted 12 lines · NeilBrown
Quoted 5 lines · On Wed, 20 Aug 2014 20:43:30 +0300 Samuli Suominen <[email protected]> wrote:

I think you forgot to apply the patch?

Link to it,

http://www.spinics.net/lists/raid/msg46782.html

No, I sent you a reply which you didn't respond to.

I've attached it.

Quoted 10 lines
Quoted 2 lines

NeilBrown

Sorry! I blame my mail client, and can't immediately find the responsible kludge
from Thunderbird.

So, here is it as attachment, properly git formatted patch.

Thanks. It was close enough so I applied it.
However you forgot the signed-off-by line, and you put the entire long description on a single line:

Subject: [PATCH] Fix parallel make problem, as in, when make is called with,
for example, "make -j9 install install-system", both install and install-systemd targets at the same line and with high -j value.
Same install.tmp file was used, and udev rules ended up in systemd service files, or otherway around.
For more information, see:
http://www.spinics.net/lists/raid/msg46782.html
http://bugs.gentoo.org/show_bug.cgi?id=517218

Best to have a short on-line description (this goes in the subject). Then a blank line. Then the details.

Like this:

http://git.neil.brown.name/?p=mdadm.git;a=commitdiff_plain;h=47c4331d1fe9c68e9d8dd0a7d94ee8e70b285a0b

Thanks,
NeilBrown