tags 644319 + patch thanks On Tue, Oct 04, 2011 at 11:49:17PM +0200, bi...@debian.org wrote: > During an automated test your package mdadm was flagged to reference > files/directories matching /dev/.udev A log of this test can be found > at [2]. > > In most cases checking for /dev/.udev is used to determine if udev is > active. This check no longer works with udev using /run/udev now. > > In most cases, checking for udev being installed is not appropriate > and should be avoided.
I've attached a patch for /run/udev checks. While this patch does not address the concern that mdadm should not be checking for udev, it does correct the checks for /dev/.udev in two source files. It checks for both /run/udev and /dev/.udev so it's backward compatible. The /dev/.udev check can be dropped post-wheezy. Please forward upstream if such a change has not already been merged. Regards, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/ `- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
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) {