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