1 |
On Fri, Jan 11, 2013 at 4:03 PM, Canek Peláez Valdés <caneko@×××××.com> wrote: |
2 |
> On Fri, Jan 11, 2013 at 3:39 PM, Sascha Cunz <sascha-ml@×××××××××.org> wrote: |
3 |
>> [...] |
4 |
>> |
5 |
>>> But it fixes how udev it's packaged in Gentoo, which is very good |
6 |
>>> news. I haven't upgraded, since I need systemd-197 also (which wasn't |
7 |
>>> yet in the tree yesterday), and I don't use LVM, but I'm wondering if |
8 |
>>> the LVM problem happens when you use an initramfs. I'm guessing it |
9 |
>>> doesn't, since udev should read rules from /lib/udev/rules.d AND |
10 |
>>> /usr/lib/udev/rules.d. |
11 |
>> |
12 |
>> I don't use an initramfs but neither do i have a separate /usr. Still, lvm2 |
13 |
>> hung after the udev upgrade. So it probably did _not_ search the old location. |
14 |
> |
15 |
> You are right, the code in udev only searches for one prefix. All the |
16 |
> other commands the other members of the list have been mentioning |
17 |
> would be necessary for all the people needing udev rules to boot. |
18 |
> |
19 |
> I believe this is a kinda serious bug in the packaging. And it's |
20 |
> really easy to fix: the following patch should cover all the udev |
21 |
> Gentoo users: |
22 |
> |
23 |
> diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c |
24 |
> index bb57d2a..027750a 100644 |
25 |
> --- a/src/udev/udev-rules.c |
26 |
> +++ b/src/udev/udev-rules.c |
27 |
> @@ -1602,6 +1602,8 @@ struct udev_rules *udev_rules_new(struct udev |
28 |
> *udev, int resolve_names) |
29 |
> |
30 |
> rules->dirs = strv_new("/etc/udev/rules.d", |
31 |
> "/run/udev/rules.d", |
32 |
> + "/usr/lib/rules.d", |
33 |
> + "/lib/rules.d", |
34 |
> UDEVLIBEXECDIR "/rules.d", |
35 |
> NULL); |
36 |
> if (!rules->dirs) { |
37 |
> |
38 |
> I thought Gentoo had a patch like that. It's necessary, since not |
39 |
> every package will install rules in /lib. |
40 |
|
41 |
I hit click too quickly: Gentoo *does* include a patch like the one I presented: |
42 |
|
43 |
From d2a922619a466c47a88ff11aea43bc2dbb4ea324 Mon Sep 17 00:00:00 2001 |
44 |
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
45 |
Date: Fri, 13 Jul 2012 16:15:14 +0200 |
46 |
Subject: [PATCH 1/2] udev: add /lib/udev/rules.d to rules directories |
47 |
|
48 |
This adds /lib if split-usr is enabled |
49 |
to the directories where udev searches for rules.d. |
50 |
|
51 |
This is needed if split-usr is enabled because some software still |
52 |
installs rules in /lib/udev/rules.d. |
53 |
--- |
54 |
src/udev/udev-rules.c | 3 +++ |
55 |
1 files changed, 3 insertions(+), 0 deletions(-) |
56 |
|
57 |
diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c |
58 |
index e6f0f5d..f6b0c01 100644 |
59 |
--- a/src/udev/udev-rules.c |
60 |
+++ b/src/udev/udev-rules.c |
61 |
@@ -1603,6 +1603,9 @@ struct udev_rules *udev_rules_new(struct udev |
62 |
*udev, int resolve_names) |
63 |
rules->dirs = strv_new("/etc/udev/rules.d", |
64 |
"/run/udev/rules.d", |
65 |
UDEVLIBEXECDIR "/rules.d", |
66 |
+#ifdef HAVE_SPLIT_USR |
67 |
+ "/lib/udev/rules.d", |
68 |
+#endif |
69 |
NULL); |
70 |
if (!rules->dirs) { |
71 |
log_error("failed to build config directory array"); |
72 |
-- |
73 |
|
74 |
It should be in udev-197-patches-1.tar.bz2 (it is in |
75 |
udev-196-patches-1.tar.bz2). So Gentoo *does* read the rules from /lib |
76 |
if the patch is present. If that's the case, the problem with LVM is |
77 |
not because it can't read the rules. |
78 |
|
79 |
Regards. |
80 |
-- |
81 |
Canek Peláez Valdés |
82 |
Posgrado en Ciencia e Ingeniería de la Computación |
83 |
Universidad Nacional Autónoma de México |