Michael Tokarev: debian/patches/debian-run-udev.diff by Roger Leigh (Closes : #644319, #627774)
Michael Tokarev
mjt at alioth.debian.org
Thu Apr 12 20:20:06 UTC 2012
Module: mdadm
Branch: master
Commit: 3228706ff8c7cef5a4ee9618900c96eba5cbb766
URL: http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=3228706ff8c7cef5a4ee9618900c96eba5cbb766
Author: Michael Tokarev <mjt at tls.msk.ru>
Date: Thu Apr 12 22:47:41 2012 +0400
debian/patches/debian-run-udev.diff by Roger Leigh (Closes: #644319, #627774)
---
debian/changelog | 1 +
debian/patches/debian-run-udev.diff | 37 +++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 39 insertions(+), 0 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index e6e34c1..651c698 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ mdadm (3.2.3-3) UNRELEASED; urgency=low
* switch from topgit to plain 3.0 (quilt) layout, creating
debian/patches. Don't build-depend on quilt as patching
is done automatically by dpkg-source.
+ * debian/patches/debian-run-udev.diff by Roger Leigh (Closes: #644319, #627774)
-- Michael Tokarev <mjt at tls.msk.ru> Thu, 12 Apr 2012 22:35:36 +0400
diff --git a/debian/patches/debian-run-udev.diff b/debian/patches/debian-run-udev.diff
new file mode 100644
index 0000000..5d85a1a
--- /dev/null
+++ b/debian/patches/debian-run-udev.diff
@@ -0,0 +1,37 @@
+From: Roger Leigh <rleigh at codelibre.net>
+Subject: check for /run/udev in addition to /dev/.udev
+
+On Debian (and probably other distros too), /dev/.udev
+has been moved /run/udev, and mdadm checks if udev is
+running by verifying its directory. So check /run/udev
+too.
+
+Forwarded: not-needed
+Reviewed-by: Michael Tokarev <mjt at tls.msk.ru>
+
+diff -urN mdadm-3.2.2.orig/Manage.c mdadm-3.2.2/Manage.c
+--- mdadm-3.2.2.orig/Manage.c 2011-06-14 03:50:01.000000000 +0100
++++ mdadm-3.2.2/Manage.c 2012-01-18 10:47:13.086097662 +0000
+@@ -333,7 +333,8 @@
+
+
+ if (devnum != NoMdDev &&
+- (stat("/dev/.udev", &stb) != 0 ||
++ (stat("/run/udev", &stb) != 0 ||
++ stat("/dev/.udev", &stb) != 0 ||
+ check_env("MDADM_NO_UDEV"))) {
+ struct map_ent *mp = map_by_devnum(&map, devnum);
+ remove_devices(devnum, mp ? mp->path : NULL);
+diff -urN mdadm-3.2.2.orig/mdopen.c mdadm-3.2.2/mdopen.c
+--- mdadm-3.2.2.orig/mdopen.c 2011-04-24 13:23:10.000000000 +0100
++++ mdadm-3.2.2/mdopen.c 2012-01-18 10:47:36.242413633 +0000
+@@ -318,7 +318,8 @@
+ * If we cannot detect udev, we need to make
+ * devices and links ourselves.
+ */
+- if (stat("/dev/.udev", &stb) != 0 ||
++ if (stat("/run/udev", &stb) != 0 ||
++ stat("/dev/.udev", &stb) != 0 ||
+ check_env("MDADM_NO_UDEV")) {
+ /* Make sure 'devname' exists and 'chosen' is a symlink to it */
+ if (lstat(devname, &stb) == 0) {
diff --git a/debian/patches/series b/debian/patches/series
index fc8d553..9921517 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
debian-conffile-location.diff
debian-disable-udev-incr-assembly.diff
debian-no-Werror.diff
+debian-run-udev.diff
More information about the pkg-mdadm-commits
mailing list