linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] udev: sync udev rules directories with systemd units directories
@ 2012-07-13 21:21 William Hubbs
  2012-07-13 21:38 ` Kay Sievers
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: William Hubbs @ 2012-07-13 21:21 UTC (permalink / raw)
  To: linux-hotplug

From: Michał Górny <mgorny@gentoo.org>

This adds /usr/lib, /usr/local/lib, and /lib (if split-usr is enabled)
to the directories where udev searches for rules.d. This brings udev in
line with how systemd searches for units and it is also needed if
split-usr is enabled because other software packages currently install
rules in /lib/udev/rules.d.
---
 src/udev/udev-rules.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
index b5b54dd..784d25e 100644
--- a/src/udev/udev-rules.c
+++ b/src/udev/udev-rules.c
@@ -1759,7 +1759,12 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names)
 
         rules->dirs = strv_new(TEST_PREFIX SYSCONFDIR "/udev/rules.d",
                                TEST_PREFIX "/run/udev/rules.d",
+                               TEST_PREFIX "/usr/local/lib/udev/rules.d",
                                TEST_PREFIX UDEVLIBEXECDIR "/rules.d",
+                               TEST_PREFIX "/usr/lib/udev/rules.d",
+#ifdef HAVE_SPLIT_USR
+                               TEST_PREFIX "/lib/udev/rules.d",
+#endif
                                NULL);
         if (!rules->dirs) {
                 log_error("failed to build config directory array");
-- 
1.7.8.6


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH] udev: sync udev rules directories with systemd units directories
  2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
@ 2012-07-13 21:38 ` Kay Sievers
  2012-07-13 22:48 ` William Hubbs
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Kay Sievers @ 2012-07-13 21:38 UTC (permalink / raw)
  To: linux-hotplug

On Fri, Jul 13, 2012 at 11:21 PM, William Hubbs <w.d.hubbs@gmail.com> wrote:
> From: Michał Górny <mgorny@gentoo.org>
>
> This adds /usr/lib, /usr/local/lib, and /lib (if split-usr is enabled)
> to the directories where udev searches for rules.d. This brings udev in
> line with how systemd searches for units and it is also needed if
> split-usr is enabled because other software packages currently install
> rules in /lib/udev/rules.d.
> ---
>  src/udev/udev-rules.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
> index b5b54dd..784d25e 100644
> --- a/src/udev/udev-rules.c
> +++ b/src/udev/udev-rules.c
> @@ -1759,7 +1759,12 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names)
>
>          rules->dirs = strv_new(TEST_PREFIX SYSCONFDIR "/udev/rules.d",
>                                 TEST_PREFIX "/run/udev/rules.d",
> +                               TEST_PREFIX "/usr/local/lib/udev/rules.d",

Udev will *never* look in /usr/local, that is no place for
system-level software. My take on this is: early boot has absolutely
zero business in /usr/local.

I see that you just want to sync this, but I will not allow /usr/local
happen to udev. It makes no sense, does not solve any problem, creates
nothing but needless issues with custom setups and custom mounts
(which are not uncommon) on /usr/local that are better avoided.

I tried several times to talk Lennart out of that nonsense, but wasn't
successful so far. :)

>                                 TEST_PREFIX UDEVLIBEXECDIR "/rules.d",
> +                               TEST_PREFIX "/usr/lib/udev/rules.d",
> +#ifdef HAVE_SPLIT_USR
> +                               TEST_PREFIX "/lib/udev/rules.d",
> +#endif

I have no problem with that, even when I think it's the wrong way to
do these things. It just creates mess, that is much bigger than the
split-usr ever was. But we have it in systemd, and there is no real
argument for me to make against it.

Thanks,
Kay

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] udev: sync udev rules directories with systemd units directories
  2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
  2012-07-13 21:38 ` Kay Sievers
@ 2012-07-13 22:48 ` William Hubbs
  2012-07-13 23:06 ` Kay Sievers
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: William Hubbs @ 2012-07-13 22:48 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 1430 bytes --]

On Fri, Jul 13, 2012 at 11:38:24PM +0200, Kay Sievers wrote:
> Udev will *never* look in /usr/local, that is no place for
> system-level software. My take on this is: early boot has absolutely
> zero business in /usr/local.
> 
> I see that you just want to sync this, but I will not allow /usr/local
> happen to udev. It makes no sense, does not solve any problem, creates
> nothing but needless issues with custom setups and custom mounts
> (which are not uncommon) on /usr/local that are better avoided.
> 
> I tried several times to talk Lennart out of that nonsense, but wasn't
> successful so far. :)
> 
> >                                 TEST_PREFIX UDEVLIBEXECDIR "/rules.d",
> > +                               TEST_PREFIX "/usr/lib/udev/rules.d",
> > +#ifdef HAVE_SPLIT_USR
> > +                               TEST_PREFIX "/lib/udev/rules.d",
> > +#endif
> 
> I have no problem with that, even when I think it's the wrong way to
> do these things. It just creates mess, that is much bigger than the
> split-usr ever was. But we have it in systemd, and there is no real
> argument for me to make against it.

I'm personally not concerned with /usr/local, but the portion above is
the more important to me. For split /usr systems, there is a lot of
software that installs rules in /lib/udev, so I think we need to support
that directory.

Should I resubmit the patch?

Thanks,

William


[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] udev: sync udev rules directories with systemd units directories
  2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
  2012-07-13 21:38 ` Kay Sievers
  2012-07-13 22:48 ` William Hubbs
@ 2012-07-13 23:06 ` Kay Sievers
  2012-07-14  0:33 ` William Hubbs
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Kay Sievers @ 2012-07-13 23:06 UTC (permalink / raw)
  To: linux-hotplug

On Sat, Jul 14, 2012 at 12:48 AM, William Hubbs <w.d.hubbs@gmail.com> wrote:
> On Fri, Jul 13, 2012 at 11:38:24PM +0200, Kay Sievers wrote:

>> >                                 TEST_PREFIX UDEVLIBEXECDIR "/rules.d",
>> > +                               TEST_PREFIX "/usr/lib/udev/rules.d",
>> > +#ifdef HAVE_SPLIT_USR
>> > +                               TEST_PREFIX "/lib/udev/rules.d",
>> > +#endif

Now we have 3 instead of one directory here, that really needs to be
sorted out. It's not cool to just add every random thing here. :)

>> I have no problem with that, even when I think it's the wrong way to
>> do these things. It just creates mess, that is much bigger than the
>> split-usr ever was. But we have it in systemd, and there is no real
>> argument for me to make against it.
>
> I'm personally not concerned with /usr/local, but the portion above is
> the more important to me. For split /usr systems, there is a lot of
> software that installs rules in /lib/udev, so I think we need to support
> that directory.

You are aware that this will not work with the installed binaries in
/lib/udev/ referenced from rules and whatever? The code is really not
made to have this I-read-stuff-from-all-possible locations.

It's a mess you are creating here, by not just merging /lib and
/usr/lib right away.

> Should I resubmit the patch?

Nah, we need to decide what to do first, I'll let you know.

Kay

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] udev: sync udev rules directories with systemd units directories
  2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
                   ` (2 preceding siblings ...)
  2012-07-13 23:06 ` Kay Sievers
@ 2012-07-14  0:33 ` William Hubbs
  2012-07-14  3:46 ` Marco d'Itri
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: William Hubbs @ 2012-07-14  0:33 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

On Sat, Jul 14, 2012 at 01:06:42AM +0200, Kay Sievers wrote:
> It's a mess you are creating here, by not just merging /lib and
> /usr/lib right away.

I'm not interested in the binaries being installed in /lib/udev. We just
need to be able to read rules from /lib/udev/rules.d along with
/usr/lib/udev/rules.d. The reason is not because of udev, but other
packages which install their rules in /lib/udev/rules.d need to be fixed
to install them in /usr/lib/udev/rules.d.


We are working on fixing things so we can merge /lib into /usr/lib, but
that is a process for us and can't happen over night.

Thanks,

William


[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] udev: sync udev rules directories with systemd units directories
  2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
                   ` (3 preceding siblings ...)
  2012-07-14  0:33 ` William Hubbs
@ 2012-07-14  3:46 ` Marco d'Itri
  2012-07-14  5:42 ` William Hubbs
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Marco d'Itri @ 2012-07-14  3:46 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 519 bytes --]

On Jul 14, William Hubbs <w.d.hubbs@gmail.com> wrote:

> /usr/lib/udev/rules.d. The reason is not because of udev, but other
> packages which install their rules in /lib/udev/rules.d need to be fixed
> to install them in /usr/lib/udev/rules.d.
As the maintainer of udev for a distribution which still supports a 
standalone /usr I fail to see how this can be an issue.
Why should an upstream package install something in 
/usr/lib/udev/rules.d/ if no distribution supports this directory?

-- 
ciao,
Marco

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] udev: sync udev rules directories with systemd units directories
  2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
                   ` (4 preceding siblings ...)
  2012-07-14  3:46 ` Marco d'Itri
@ 2012-07-14  5:42 ` William Hubbs
  2012-07-14  5:52 ` Marco d'Itri
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: William Hubbs @ 2012-07-14  5:42 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 1234 bytes --]

On Sat, Jul 14, 2012 at 05:46:56AM +0200, Marco d'Itri wrote:
> On Jul 14, William Hubbs <w.d.hubbs@gmail.com> wrote:
> 
> > /usr/lib/udev/rules.d. The reason is not because of udev, but other
> > packages which install their rules in /lib/udev/rules.d need to be fixed
> > to install them in /usr/lib/udev/rules.d.
> As the maintainer of udev for a distribution which still supports a 
> standalone /usr I fail to see how this can be an issue.
> Why should an upstream package install something in 
> /usr/lib/udev/rules.d/ if no distribution supports this directory?

I'm not sure if you are asking me or Kay, but here is what we are
running into.

The default configuration of udev-186 installs its rules in
/usr/lib/udev/rules.d. When users upgrade to this udev, they will still
have packages on their system that install rules in /lib/udev/rules.d.
Udev needs to keep this directory as a place for rules for a while for
that reason.

With the /usr merge coming, I'm thinking that packages that install
rules in /lib/udev/rules.d will have to be fixed to install them in
/usr/lib/udev/rules.d eventually, but until then, we should retain
support in udev to read from both places.

Thoughts?

William


[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] udev: sync udev rules directories with systemd units directories
  2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
                   ` (5 preceding siblings ...)
  2012-07-14  5:42 ` William Hubbs
@ 2012-07-14  5:52 ` Marco d'Itri
  2012-07-14  7:21 ` William Hubbs
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Marco d'Itri @ 2012-07-14  5:52 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 749 bytes --]

On Jul 14, William Hubbs <w.d.hubbs@gmail.com> wrote:

> With the /usr merge coming, I'm thinking that packages that install
> rules in /lib/udev/rules.d will have to be fixed to install them in
> /usr/lib/udev/rules.d eventually, but until then, we should retain
> support in udev to read from both places.
> 
> Thoughts?
Now I see the your point. I need to think a bit about the best 
solution for the transition period, but right now I suspect that it
will be a /usr/lib/udev/rules.d/ to /lib/udev/rules.d/ symlink.

(My problem is that I need to think when the symlink should be created 
and removed to support the merge, distributions which do not support 
upgrades do not need to care about this detail...)

-- 
ciao,
Marco

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] udev: sync udev rules directories with systemd units directories
  2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
                   ` (6 preceding siblings ...)
  2012-07-14  5:52 ` Marco d'Itri
@ 2012-07-14  7:21 ` William Hubbs
  2012-07-15 17:03 ` Martin Pitt
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: William Hubbs @ 2012-07-14  7:21 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 1381 bytes --]

On Sat, Jul 14, 2012 at 07:52:23AM +0200, Marco d'Itri wrote:
> On Jul 14, William Hubbs <w.d.hubbs@gmail.com> wrote:
> 
> > With the /usr merge coming, I'm thinking that packages that install
> > rules in /lib/udev/rules.d will have to be fixed to install them in
> > /usr/lib/udev/rules.d eventually, but until then, we should retain
> > support in udev to read from both places.
> > 
> > Thoughts?
> Now I see the your point. I need to think a bit about the best 
> solution for the transition period, but right now I suspect that it
> will be a /usr/lib/udev/rules.d/ to /lib/udev/rules.d/ symlink.
> 
> (My problem is that I need to think when the symlink should be created 
> and removed to support the merge, distributions which do not support 
> upgrades do not need to care about this detail...)

I don't follow how a symlink either
/usr/lib/udev/rules.d->/lib/udev/rules.d or the other way around is
going to make the transition work smoothly for us. If we support both
locations as directories, once all of the packages that still install
things in /lib/udev/rules.d give us a way in their upstreams to install
the rules under /usr, /lib/udev/rules.d will just naturally disappear
from everyone's systems.

How is linking /usr/lib/udev/rules.d to /lib/udev/rules.d going to aid
in the transition? That seems to be going backward.

William


[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] udev: sync udev rules directories with systemd units directories
  2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
                   ` (7 preceding siblings ...)
  2012-07-14  7:21 ` William Hubbs
@ 2012-07-15 17:03 ` Martin Pitt
  2012-07-15 17:14 ` Marco d'Itri
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Martin Pitt @ 2012-07-15 17:03 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 976 bytes --]

Hello Marco,

Marco d'Itri [2012-07-14  7:52 +0200]:
> Now I see the your point. I need to think a bit about the best 
> solution for the transition period, but right now I suspect that it
> will be a /usr/lib/udev/rules.d/ to /lib/udev/rules.d/ symlink.

FWIW, this seems like the best solution to me. In Debian we don't want
packages (which are under our control) nor third-party packages (which
would be covered by the symlink) to install udev rules (or binaries)
under /usr, as (as far as I understand) Debian still wants to support
a standalone /usr.

I take it the Debian udev/systemd package would not change the layout?
I. e. still install most things under /lib?

> (My problem is that I need to think when the symlink should be created 
> and removed to support the merge

Which merge?

Thanks,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] udev: sync udev rules directories with systemd units directories
  2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
                   ` (8 preceding siblings ...)
  2012-07-15 17:03 ` Martin Pitt
@ 2012-07-15 17:14 ` Marco d'Itri
  2012-07-15 17:45 ` Martin Pitt
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Marco d'Itri @ 2012-07-15 17:14 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 455 bytes --]

On Jul 15, Martin Pitt <martin.pitt@ubuntu.com> wrote:

> I take it the Debian udev/systemd package would not change the layout?
> I. e. still install most things under /lib?
Indeed.

> > (My problem is that I need to think when the symlink should be created 
> > and removed to support the merge
> Which merge?
The "everything in /usr" merge, which I plan to propose after the 
release. Does Ubuntu have plans about this?

-- 
ciao,
Marco

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] udev: sync udev rules directories with systemd units directories
  2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
                   ` (9 preceding siblings ...)
  2012-07-15 17:14 ` Marco d'Itri
@ 2012-07-15 17:45 ` Martin Pitt
  2012-07-15 23:09 ` William Hubbs
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Martin Pitt @ 2012-07-15 17:45 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 664 bytes --]

Marco d'Itri [2012-07-15 19:14 +0200]:
> > Which merge?
> The "everything in /usr" merge, which I plan to propose after the 
> release. Does Ubuntu have plans about this?

No, we don't. We do support a separate /usr (just like Debian), but
quite frankly this is an issue which is of little interest on the
areas Ubuntu is concerned with, so on the the Ubuntu side we won't
spend any work on on this subject, one way or the other.  I. e. we'll
continue to support separate /usr for as long as Debian does.

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] udev: sync udev rules directories with systemd units directories
  2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
                   ` (10 preceding siblings ...)
  2012-07-15 17:45 ` Martin Pitt
@ 2012-07-15 23:09 ` William Hubbs
  2012-07-16  0:02 ` Kay Sievers
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: William Hubbs @ 2012-07-15 23:09 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 841 bytes --]

On Sun, Jul 15, 2012 at 07:14:02PM +0200, Marco d'Itri wrote:
> On Jul 15, Martin Pitt <martin.pitt@ubuntu.com> wrote:
> 
> > I take it the Debian udev/systemd package would not change the layout?
> > I. e. still install most things under /lib?
> Indeed.
> 
> > > (My problem is that I need to think when the symlink should be created 
> > > and removed to support the merge
> > Which merge?
> The "everything in /usr" merge, which I plan to propose after the 
> release. Does Ubuntu have plans about this?

That's the problem with a symlink, either way. How do you know when to
create or remove it?

For us, I would have to do the following on every user's system a udev upgrade:

cp -a /lib/udev /usr/lib/udev
ln -s /usr/lib/udev /lib/udev

Then, I have no idea how I would know when to remove the link.

William


[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] udev: sync udev rules directories with systemd units directories
  2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
                   ` (11 preceding siblings ...)
  2012-07-15 23:09 ` William Hubbs
@ 2012-07-16  0:02 ` Kay Sievers
  2012-07-16  0:06 ` Marco d'Itri
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Kay Sievers @ 2012-07-16  0:02 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Jul 16, 2012 at 1:09 AM, William Hubbs <w.d.hubbs@gmail.com> wrote:
> On Sun, Jul 15, 2012 at 07:14:02PM +0200, Marco d'Itri wrote:
>> On Jul 15, Martin Pitt <martin.pitt@ubuntu.com> wrote:
>>
>> > I take it the Debian udev/systemd package would not change the layout?
>> > I. e. still install most things under /lib?
>> Indeed.
>>
>> > > (My problem is that I need to think when the symlink should be created
>> > > and removed to support the merge
>> > Which merge?
>> The "everything in /usr" merge, which I plan to propose after the
>> release. Does Ubuntu have plans about this?
>
> That's the problem with a symlink, either way. How do you know when to
> create or remove it?
>
> For us, I would have to do the following on every user's system a udev upgrade:
>
> cp -a /lib/udev /usr/lib/udev
> ln -s /usr/lib/udev /lib/udev
>
> Then, I have no idea how I would know when to remove the link.

Which is why you don't do such a mess.

You keep the historic split as long as it works (some day it will
break step-by-step in non-interesting ways because upstream projects
don't care or test a anymore), or you convert /bin, /sbin, /lib,
/lib64 _one_ go to symlinks.

The conversion of the top-level dirs to symlinks is almost trivial. We
did it in Fedora with no interesting problems at all.
  http://people.freedesktop.org/~kay/usrmove-convert-log.png
  http://people.freedesktop.org/~kay/usrmove-convert-log.txt

Doing what you try to do here, with creating a total mess with stuff
randomly spread around the filesystem is just plain crazy. We do not
really support that in any tool, and honestly the --enable-split-usr
configure option you added to systemd should just be removed. We do
not support that mess, and it makes no sense to even try. That should
be a distro patch, that makes it clear that you are completely on your
own here.

Better get your stuff together and make decision, by either doing
nothing for now, leaving the stuff in /lib, or by really doing it and
make /lib a symlink. There is no sane option to choose from doing only
a part of it, or gradual, it's just madness.

Kay

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] udev: sync udev rules directories with systemd units directories
  2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
                   ` (12 preceding siblings ...)
  2012-07-16  0:02 ` Kay Sievers
@ 2012-07-16  0:06 ` Marco d'Itri
  2012-07-16  0:26 ` Kay Sievers
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Marco d'Itri @ 2012-07-16  0:06 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 565 bytes --]

On Jul 16, William Hubbs <w.d.hubbs@gmail.com> wrote:

> That's the problem with a symlink, either way. How do you know when to
> create or remove it?
This is a general problem for every package which ships the same file in 
/ and /usr, I fear that the only solution will be to create the link 
in postinst if needed.

On Jul 16, Kay Sievers <kay@vrfy.org> wrote:

> The conversion of the top-level dirs to symlinks is almost trivial. We
Except for patching tens of packages which ship the a file with the
same name in / and /usr.

-- 
ciao,
Marco

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] udev: sync udev rules directories with systemd units directories
  2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
                   ` (13 preceding siblings ...)
  2012-07-16  0:06 ` Marco d'Itri
@ 2012-07-16  0:26 ` Kay Sievers
  2012-07-17  0:57 ` William Hubbs
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Kay Sievers @ 2012-07-16  0:26 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Jul 16, 2012 at 2:06 AM, Marco d'Itri <md@linux.it> wrote:
> On Jul 16, Kay Sievers <kay@vrfy.org> wrote:
>
>> The conversion of the top-level dirs to symlinks is almost trivial. We
> Except for patching tens of packages which ship the a file with the
> same name in / and /usr.

Which was ~25 for Fedora, which is: nothing.

Then it might be ~75 for Debian, and that can still be fixed in one
single day, if wanted to.

Kay

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] udev: sync udev rules directories with systemd units directories
  2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
                   ` (14 preceding siblings ...)
  2012-07-16  0:26 ` Kay Sievers
@ 2012-07-17  0:57 ` William Hubbs
  2012-07-17  1:14 ` William Hubbs
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: William Hubbs @ 2012-07-17  0:57 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 1173 bytes --]

On Mon, Jul 16, 2012 at 02:26:26AM +0200, Kay Sievers wrote:
> On Mon, Jul 16, 2012 at 2:06 AM, Marco d'Itri <md@linux.it> wrote:
> > On Jul 16, Kay Sievers <kay@vrfy.org> wrote:
> >
> >> The conversion of the top-level dirs to symlinks is almost trivial. We
> > Except for patching tens of packages which ship the a file with the
> > same name in / and /usr.
> 
> Which was ~25 for Fedora, which is: nothing.
> 
> Then it might be ~75 for Debian, and that can still be fixed in one
> single day, if wanted to.

Then there are things like what we did in gentoo years before I came on
board to get around a toolchain bug https://bugs.gentoo.org/4411.

Whoever was working on this back then decided that we should move most
of the critical shared libraries to /lib or /lib64 and put linker
scripts in /usr/lib*. That has to disappear before we can even think
about the /usr merge.

Also, remember that we are a rolling release distro. We do not have
specific gentoo x.x releases; users just go along updating packages. So,
I'm not sure how to force the /usr merge and symlink creation to happen
on all of our users' systems in one go.


William


[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] udev: sync udev rules directories with systemd units directories
  2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
                   ` (15 preceding siblings ...)
  2012-07-17  0:57 ` William Hubbs
@ 2012-07-17  1:14 ` William Hubbs
  2012-07-17  7:03 ` Lucas De Marchi
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: William Hubbs @ 2012-07-17  1:14 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 397 bytes --]

I need to try to make the issue for us a bit more clear.

Basically gentoo does not have fixed releases, and we support in-place
upgrades of packages. So if udev changes in a way that does not retain
backward compatibility for a while, it will cause breakage for us.

This is why we are asking that you continue supporting rules in
/lib/udev for a while.

Thanks for your consideration,

William


[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] udev: sync udev rules directories with systemd units directories
  2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
                   ` (16 preceding siblings ...)
  2012-07-17  1:14 ` William Hubbs
@ 2012-07-17  7:03 ` Lucas De Marchi
  2012-07-17 11:46 ` Tom Gundersen
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Lucas De Marchi @ 2012-07-17  7:03 UTC (permalink / raw)
  To: linux-hotplug

Hi William,

On Mon, Jul 16, 2012 at 9:57 PM, William Hubbs <w.d.hubbs@gmail.com> wrote:
> On Mon, Jul 16, 2012 at 02:26:26AM +0200, Kay Sievers wrote:
>> On Mon, Jul 16, 2012 at 2:06 AM, Marco d'Itri <md@linux.it> wrote:
>> > On Jul 16, Kay Sievers <kay@vrfy.org> wrote:
>> >
>> >> The conversion of the top-level dirs to symlinks is almost trivial. We
>> > Except for patching tens of packages which ship the a file with the
>> > same name in / and /usr.
>>
>> Which was ~25 for Fedora, which is: nothing.
>>
>> Then it might be ~75 for Debian, and that can still be fixed in one
>> single day, if wanted to.
>
> Then there are things like what we did in gentoo years before I came on
> board to get around a toolchain bug https://bugs.gentoo.org/4411.
>
> Whoever was working on this back then decided that we should move most
> of the critical shared libraries to /lib or /lib64 and put linker
> scripts in /usr/lib*. That has to disappear before we can even think
> about the /usr merge.
>
> Also, remember that we are a rolling release distro. We do not have
> specific gentoo x.x releases; users just go along updating packages. So,
> I'm not sure how to force the /usr merge and symlink creation to happen
> on all of our users' systems in one go.

Talk to Dave and Tom (CC'ed) . Archlinux is a rolling distro as welll,
and they managed to get it working.


Lucas De Marchi

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] udev: sync udev rules directories with systemd units directories
  2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
                   ` (17 preceding siblings ...)
  2012-07-17  7:03 ` Lucas De Marchi
@ 2012-07-17 11:46 ` Tom Gundersen
  2012-07-17 23:44 ` William Hubbs
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: Tom Gundersen @ 2012-07-17 11:46 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Jul 17, 2012 at 2:57 AM, William Hubbs <w.d.hubbs@gmail.com> wrote:
> Whoever was working on this back then decided that we should move most
> of the critical shared libraries to /lib or /lib64 and put linker
> scripts in /usr/lib*. That has to disappear before we can even think
> about the /usr merge.
>
> Also, remember that we are a rolling release distro. We do not have
> specific gentoo x.x releases; users just go along updating packages. So,
> I'm not sure how to force the /usr merge and symlink creation to happen
> on all of our users' systems in one go.

We had a similar issue in Arch. What we did was the following:

Patch udev+kmod+systemd (the last one was for free) to read from
{/usr,}/lib/{modprobe.d,depmod.d,udev/rules.d,systemd/system}.

We then rebuild all the packages that installed binaries to /lib/udev/
and /lib/systemd to move them to their /usr/lib counterparts (as we
did not want to patch udev/systemd to read the helpers from more than
one location).

Then we let people rebuild their packages to move things from /lib to
/usr/lib on a package-by-package basis.

Then we rebuilt all our kernels and pointed kmod/udev to
/usr/lib/modules rather than /lib/modules.

At this point only glibc owned stuff in /lib, so we rebuilt that to
move it all to /usr/lib and replace /lib with a symlink to /usr/lib.

The only step that caused any issues was the last one, and that was
due to users ignoring the upgrade instructions[0] and doing clever
things like "rm -rf /lib".

HTH,

Tom

[0]: <http://www.archlinux.org/news/the-lib-directory-becomes-a-symlink/>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] udev: sync udev rules directories with systemd units directories
  2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
                   ` (18 preceding siblings ...)
  2012-07-17 11:46 ` Tom Gundersen
@ 2012-07-17 23:44 ` William Hubbs
  2012-07-17 23:50 ` Greg KH
  2012-07-18  6:02 ` William Hubbs
  21 siblings, 0 replies; 23+ messages in thread
From: William Hubbs @ 2012-07-17 23:44 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 1298 bytes --]

On Tue, Jul 17, 2012 at 01:46:17PM +0200, Tom Gundersen wrote:
> We had a similar issue in Arch. What we did was the following:
> 
> Patch udev+kmod+systemd (the last one was for free) to read from
> {/usr,}/lib/{modprobe.d,depmod.d,udev/rules.d,systemd/system}.
> 
> We then rebuild all the packages that installed binaries to /lib/udev/
> and /lib/systemd to move them to their /usr/lib counterparts (as we
> did not want to patch udev/systemd to read the helpers from more than
> one location).
> 
> Then we let people rebuild their packages to move things from /lib to
> /usr/lib on a package-by-package basis.
> 
> Then we rebuilt all our kernels and pointed kmod/udev to
> /usr/lib/modules rather than /lib/modules.
> 
> At this point only glibc owned stuff in /lib, so we rebuilt that to
> move it all to /usr/lib and replace /lib with a symlink to /usr/lib.

The problem for us with these steps is that the building happens on
users' systems since we are source based, so we have to go about it
differently. We can't rebuild packages and send them down to the users.

This is why it would be very helpful if udev would keep some backward
compatibility and read rules from /lib/udev/rules.d as long as it was a
directory.

Thanks for consideration,

William


[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] udev: sync udev rules directories with systemd units directories
  2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
                   ` (19 preceding siblings ...)
  2012-07-17 23:44 ` William Hubbs
@ 2012-07-17 23:50 ` Greg KH
  2012-07-18  6:02 ` William Hubbs
  21 siblings, 0 replies; 23+ messages in thread
From: Greg KH @ 2012-07-17 23:50 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Jul 17, 2012 at 06:44:00PM -0500, William Hubbs wrote:
> On Tue, Jul 17, 2012 at 01:46:17PM +0200, Tom Gundersen wrote:
> > We had a similar issue in Arch. What we did was the following:
> > 
> > Patch udev+kmod+systemd (the last one was for free) to read from
> > {/usr,}/lib/{modprobe.d,depmod.d,udev/rules.d,systemd/system}.
> > 
> > We then rebuild all the packages that installed binaries to /lib/udev/
> > and /lib/systemd to move them to their /usr/lib counterparts (as we
> > did not want to patch udev/systemd to read the helpers from more than
> > one location).
> > 
> > Then we let people rebuild their packages to move things from /lib to
> > /usr/lib on a package-by-package basis.
> > 
> > Then we rebuilt all our kernels and pointed kmod/udev to
> > /usr/lib/modules rather than /lib/modules.
> > 
> > At this point only glibc owned stuff in /lib, so we rebuilt that to
> > move it all to /usr/lib and replace /lib with a symlink to /usr/lib.
> 
> The problem for us with these steps is that the building happens on
> users' systems since we are source based, so we have to go about it
> differently. We can't rebuild packages and send them down to the users.

No, but we can fix all packages in the tree, and then update the udev
version, with a big fat warning / error when we install the new udev
package saying that the rules need to be fixed by updating the packages
that placed them there.

> This is why it would be very helpful if udev would keep some backward
> compatibility and read rules from /lib/udev/rules.d as long as it was a
> directory.

I don't think this is really necessary, as long as we just fix up all
packages in the tree that are doing things wrong.  That shouldn't take
very long (hint, if you need help, I'll be glad to do so.)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] udev: sync udev rules directories with systemd units directories
  2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
                   ` (20 preceding siblings ...)
  2012-07-17 23:50 ` Greg KH
@ 2012-07-18  6:02 ` William Hubbs
  21 siblings, 0 replies; 23+ messages in thread
From: William Hubbs @ 2012-07-18  6:02 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 2070 bytes --]

On Tue, Jul 17, 2012 at 04:50:48PM -0700, greg wrote:
> On Tue, Jul 17, 2012 at 06:44:00PM -0500, William Hubbs wrote:
> > On Tue, Jul 17, 2012 at 01:46:17PM +0200, Tom Gundersen wrote:
> > > We had a similar issue in Arch. What we did was the following:
> > > 
> > > Patch udev+kmod+systemd (the last one was for free) to read from
> > > {/usr,}/lib/{modprobe.d,depmod.d,udev/rules.d,systemd/system}.
> > > 
> > > We then rebuild all the packages that installed binaries to /lib/udev/
> > > and /lib/systemd to move them to their /usr/lib counterparts (as we
> > > did not want to patch udev/systemd to read the helpers from more than
> > > one location).
> > > 
> > > Then we let people rebuild their packages to move things from /lib to
> > > /usr/lib on a package-by-package basis.
> > > 
> > > Then we rebuilt all our kernels and pointed kmod/udev to
> > > /usr/lib/modules rather than /lib/modules.
> > > 
> > > At this point only glibc owned stuff in /lib, so we rebuilt that to
> > > move it all to /usr/lib and replace /lib with a symlink to /usr/lib.
> > 
> > The problem for us with these steps is that the building happens on
> > users' systems since we are source based, so we have to go about it
> > differently. We can't rebuild packages and send them down to the users.
> 
> No, but we can fix all packages in the tree, and then update the udev
> version, with a big fat warning / error when we install the new udev
> package saying that the rules need to be fixed by updating the packages
> that placed them there.
> 
> > This is why it would be very helpful if udev would keep some backward
> > compatibility and read rules from /lib/udev/rules.d as long as it was a
> > directory.
> 
> I don't think this is really necessary, as long as we just fix up all
> packages in the tree that are doing things wrong.  That shouldn't take
> very long (hint, if you need help, I'll be glad to do so.)

Hey greg,

write to me off list and let me know what we need to do and we can go
from there.

Thanks,

William


[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2012-07-18  6:02 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-13 21:21 [PATCH] udev: sync udev rules directories with systemd units directories William Hubbs
2012-07-13 21:38 ` Kay Sievers
2012-07-13 22:48 ` William Hubbs
2012-07-13 23:06 ` Kay Sievers
2012-07-14  0:33 ` William Hubbs
2012-07-14  3:46 ` Marco d'Itri
2012-07-14  5:42 ` William Hubbs
2012-07-14  5:52 ` Marco d'Itri
2012-07-14  7:21 ` William Hubbs
2012-07-15 17:03 ` Martin Pitt
2012-07-15 17:14 ` Marco d'Itri
2012-07-15 17:45 ` Martin Pitt
2012-07-15 23:09 ` William Hubbs
2012-07-16  0:02 ` Kay Sievers
2012-07-16  0:06 ` Marco d'Itri
2012-07-16  0:26 ` Kay Sievers
2012-07-17  0:57 ` William Hubbs
2012-07-17  1:14 ` William Hubbs
2012-07-17  7:03 ` Lucas De Marchi
2012-07-17 11:46 ` Tom Gundersen
2012-07-17 23:44 ` William Hubbs
2012-07-17 23:50 ` Greg KH
2012-07-18  6:02 ` William Hubbs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).