summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorMichael Tokarev <mjt@tls.msk.ru>2012-04-12 22:47:41 +0400
committerMichael Tokarev <mjt@tls.msk.ru>2012-04-12 22:47:41 +0400
commit3228706ff8c7cef5a4ee9618900c96eba5cbb766 (patch)
treea193901dfd61f4759b04344bba7233a9d555e3c2 /debian/patches
parent491715b9ff020cb2408eeb5cfd67d86097ddd280 (diff)
debian/patches/debian-run-udev.diff by Roger Leigh (Closes: #644319, #627774)
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/debian-run-udev.diff37
-rw-r--r--debian/patches/series1
2 files changed, 38 insertions, 0 deletions
diff --git a/debian/patches/debian-run-udev.diff b/debian/patches/debian-run-udev.diff
new file mode 100644
index 00000000..5d85a1aa
--- /dev/null
+++ b/debian/patches/debian-run-udev.diff
@@ -0,0 +1,37 @@
+From: Roger Leigh <rleigh@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@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 fc8d5536..9921517c 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