Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 410147 - sys-fs/udev-182 - add USE=usr to override bindir
Summary: sys-fs/udev-182 - add USE=usr to override bindir
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: udev maintainers
URL:
Whiteboard:
Keywords: PATCH
: 419871 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-29 13:49 UTC by Konstantin Ivanov
Modified: 2012-06-07 03:30 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
modifed ebuild sys-fs/udev-182-r1 (udev-182-r1.ebuild,10.05 KB, text/plain)
2012-03-29 13:49 UTC, Konstantin Ivanov
Details
patch for udev-182 configure (udev-182-separate_usr.patch,406 bytes, patch)
2012-03-29 13:50 UTC, Konstantin Ivanov
Details | Diff
modifed ebuild sys-apps/kmod-7-r1 (kmod-7-r1.ebuild,1.97 KB, text/plain)
2012-03-29 13:51 UTC, Konstantin Ivanov
Details
udev-182-r2.ebuild.patch (udev-182-r2.ebuild.patch,3.34 KB, patch)
2012-03-29 14:23 UTC, Jeroen Roovers (RETIRED)
Details | Diff
kmod-7.ebuild.patch (kmod-7.ebuild.patch,990 bytes, patch)
2012-03-29 14:24 UTC, Jeroen Roovers (RETIRED)
Details | Diff
patch for udev ebuild (udev-182-r3.ebuild.patch,2.68 KB, patch)
2012-04-25 18:45 UTC, daemonpnz
Details | Diff
udev-182-r3.ebuild.patch (udev-182-r3.ebuild.patch,2.68 KB, patch)
2012-04-25 18:48 UTC, daemonpnz
Details | Diff
udev-182-r3.patch (udev-182-r3.patch,1.40 KB, text/plain)
2012-04-26 06:55 UTC, Konstantin Ivanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Ivanov 2012-03-29 13:49:40 UTC
Created attachment 307071 [details]
modifed ebuild sys-fs/udev-182-r1

I propose to add a special flag when you use a separate usr partition, I have prepared for the ebuild revision, which added the flag "usr" to override "--bindir" and "--libdir" in / bin and / Lieb, respectively.

I attach a patch for the script "configure" to build udev, because "kmod" and "libkmod" also must be located in "/ bin" and "/ lib", a modified ebuild kmod also attached.
Comment 1 Konstantin Ivanov 2012-03-29 13:50:30 UTC
Created attachment 307073 [details, diff]
patch for udev-182 configure
Comment 2 Konstantin Ivanov 2012-03-29 13:51:18 UTC
Created attachment 307075 [details]
modifed ebuild sys-apps/kmod-7-r1
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2012-03-29 14:23:17 UTC
Created attachment 307083 [details, diff]
udev-182-r2.ebuild.patch

(In reply to comment #0)
> Created attachment 307071 [details]
> modifed ebuild sys-fs/udev-182-r1
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2012-03-29 14:24:57 UTC
Created attachment 307085 [details, diff]
kmod-7.ebuild.patch
Comment 5 William Hubbs gentoo-dev 2012-03-29 15:00:25 UTC
If you have a separate /usr partition, you need to use an initramfs to
pre-mount /usr when you boot your system [1]. Also, moving all of this
to /bin and /lib is counter-productive since we are working toward
implementing the /usr merge [2].

[1] http://freedesktop.org/wiki/Software/systemd/separate-usr-is-broken
[2] http://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge
Comment 6 Konstantin Ivanov 2012-03-29 16:47:23 UTC
The fact that the initrd is needed if the "/ usr" my system on a separate partition I'm aware of. But right now I do not use initrd, but "/ usr" a separate section, all necessary for the normal running of the system is in the kernel and root partition. I do not like to impose on the use of something, when you can do without it, so I think it should be allowed to choose the needed initrd in particular or not. It's one of the basic principles of "Linux" and "Gentoo", in particular. To implement what I suggested is not difficult, nor what it will not cause complications. Added flag for default is not active, if necessary, it will be possible to activate and get a bootable system without "initrd", later, after the transition to a new file system hierarchy flag can be removed, or left to the systems that were previously installed, and where not made these changes.

The decision to merge the "/bin", "/sbin", "/lib," and "/usr/bin", "/USR/sbin", "/USR/lib" final?

Unfortunately I have not seen the course of making a decision on this matter, I would like to see.

Links "/bin" -> "/usr/bin" and others will be created?
Comment 7 William Hubbs gentoo-dev 2012-03-30 04:32:46 UTC
(In reply to comment #6)
> The decision to merge the "/bin", "/sbin", "/lib," and "/usr/bin",
> "/USR/sbin", "/USR/lib" final?
> Unfortunately I have not seen the course of making a decision on this
> matter, I would like to see.

There were lengthy discussions about this issue on the gentoo-dev mailing list. 

Multiple upstream projects and linux distributions are making changes to support doing this. Especially since upstream projects are starting to assume that systems are set up this way, doing anything differently is going to cause a lot of extra work for us, such as maintaining custom patches.

Also, there are advantages to doing this; see the link above about "The Case for the /usr Merge."

> Links "/bin" -> "/usr/bin" and others will be created?

That is correct. Once we have everything moved, /bin, /sbin and /lib* will become symbolic links to the same directory names under /usr.

This actual migration process will not start until >=udev-182 is stable.  A news item will be sent out detailing the process just before that happens.

So, again, adding this use flag would go against where multiple linux distributions and upstream projects are moving, so it would be counter-productive.
Comment 8 Joshua Kinard gentoo-dev 2012-03-30 08:51:23 UTC
(In reply to comment #6)
> The fact that the initrd is needed if the "/ usr" my system on a separate
> partition I'm aware of. But right now I do not use initrd, but "/ usr" a
> separate section, all necessary for the normal running of the system is in
> the kernel and root partition. I do not like to impose on the use of
> something, when you can do without it, so I think it should be allowed to
> choose the needed initrd in particular or not. It's one of the basic
> principles of "Linux" and "Gentoo", in particular. To implement what I
> suggested is not difficult, nor what it will not cause complications. Added
> flag for default is not active, if necessary, it will be possible to
> activate and get a bootable system without "initrd", later, after the
> transition to a new file system hierarchy flag can be removed, or left to
> the systems that were previously installed, and where not made these changes.

The philosophical argument is lost on this one.  Fedora owns the Linux community now, since if they can dictate this to the Linux community, they'll dictate other stuff in the future.  Just watch.

Your only choice is to drop udev entirely until such a time when you rebuild the system to merge / and /usr.  If you run a simple setup and don't have anything fancy going on (i.e., you're using standard filesystems like ext3/ext4), then you can replace udev with mdev and keep your current setup.

I hate it as much as a lot of other people do, but the backers of this move are adamant that it's the RightWay(TM) and the OnlyWay(TM).

See this Wiki link on replacing udev with mdev:
https://wiki.gentoo.org/wiki/Mdev
Comment 9 Konstantin Ivanov 2012-03-30 11:25:23 UTC
> The philosophical argument is lost on this one.  Fedora owns the Linux
> community now, since if they can dictate this to the Linux community,
> they'll dictate other stuff in the future.  Just watch.
> 
> Your only choice is to drop udev entirely until such a time when you rebuild
> the system to merge / and /usr.  If you run a simple setup and don't have
> anything fancy going on (i.e., you're using standard filesystems like
> ext3/ext4), then you can replace udev with mdev and keep your current setup.
> 
> I hate it as much as a lot of other people do, but the backers of this move
> are adamant that it's the RightWay(TM) and the OnlyWay(TM).
> 
> See this Wiki link on replacing udev with mdev:
> https://wiki.gentoo.org/wiki/Mdev

I'm glad you understand me. I myself do not particularly like the the merger "/ bin" to "/ usr / bin" and others. Thanks for the url about the "mdev", may follow the advice, but most likely will stay on udev, setting it to me later with a modified "ebuild", with the flag of "usr". I offered to make these changes, which would have had a choice, polnsotyu refuse to "udev" I do not plan to. On our forum (my country) is also erupted over the swift merger of directories and the need to use initrd., So I made ​​this offer.

But once rejected my proposal will use a modified ebuild in a local overlay, perhaps someone from our user forum to follow my suggestion.

But still sorry that was rejected.
Comment 10 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2012-03-30 19:58:15 UTC
As I hate this idiotic / -> /usr merges as well I started to work against it in my private overlay (poly-c). Just look at the udev and kmod ebuilds there. They should be a start for you to make the needed changes for getting a separate /usr partition running without hassle.
Please keep in mind that I don't have a /usr partition and thus cannot do any tests. I merely wanna keep binaries where they belong and don't want to be part of this braindamaged / -> /usr move all our fedora-/systemd-fanboys are trying to impose on us.
Comment 11 Joshua Kinard gentoo-dev 2012-03-30 20:52:35 UTC
(In reply to comment #9)
> I'm glad you understand me. I myself do not particularly like the the merger
> "/ bin" to "/ usr / bin" and others. Thanks for the url about the "mdev",
> may follow the advice, but most likely will stay on udev, setting it to me
> later with a modified "ebuild", with the flag of "usr". I offered to make
> these changes, which would have had a choice, polnsotyu refuse to "udev" I
> do not plan to. On our forum (my country) is also erupted over the swift
> merger of directories and the need to use initrd., So I made ​​this offer.
> 
> But once rejected my proposal will use a modified ebuild in a local overlay,
> perhaps someone from our user forum to follow my suggestion.
> 
> But still sorry that was rejected.

Constantly modifying udev isn't going to work for very long.  The udev maintainers feel very strongly that the /usr merge is how things should have been from the start and will reject any patch that tries to change that.  As new udev versions are released and as it gains new features, maintaining this will be come a lot trickier, too.

Hopefully mdev will become its own project that aims to fill that gap for people with simple setups, but who knows right now.  It itself is a bit of a hack, but it works and it negates the need for an initramfs until you start adding in things like LVM, encryption, etc.

Now to just wait until dbus becomes a dependency for init to even run...
Comment 12 William Hubbs gentoo-dev 2012-03-30 22:41:25 UTC
(In reply to comment #11)
> Hopefully mdev will become its own project that aims to fill that gap for
> people with simple setups, but who knows right now.  It itself is a bit of a
> hack, but it works and it negates the need for an initramfs until you start
> adding in things like LVM, encryption, etc.

The other concern with this mdev setup is that busybox will eventually migrate to /usr and when it does this will not work.
Comment 13 Joshua Kinard gentoo-dev 2012-04-03 01:17:30 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > Hopefully mdev will become its own project that aims to fill that gap for
> > people with simple setups, but who knows right now.  It itself is a bit of a
> > hack, but it works and it negates the need for an initramfs until you start
> > adding in things like LVM, encryption, etc.
> 
> The other concern with this mdev setup is that busybox will eventually
> migrate to /usr and when it does this will not work.

Merging busybox as a static binary should mitigate this.  We'll find out, though.  Someone will think up a workaround, because I'm not rebuilding/reinstalling my entire system right now to align with a configuration change that I find pointless within our specific distribution (regardless of however much sense it might have in other distributions).  Maybe I'm just getting old...
Comment 14 daemonpnz 2012-04-25 18:45:44 UTC
Created attachment 310109 [details, diff]
patch for udev ebuild
Comment 15 daemonpnz 2012-04-25 18:48:00 UTC
Created attachment 310113 [details, diff]
udev-182-r3.ebuild.patch

Please delete previous attachment
Comment 16 Konstantin Ivanov 2012-04-26 06:55:57 UTC
Created attachment 310143 [details]
udev-182-r3.patch
Comment 17 Konstantin Ivanov 2012-04-26 06:58:00 UTC
Attach a new version of the patch to udev-182-r3.ebuild, udev-182-r3.patch.
With the following changes:
  - Instead of using the patch udev-182-separate_usr.patch use variable declarations 'KMOD_CFLAGS' and 'KMOD_LIBS' in src_configure() through the 'declare- x';
  - In src_install() added check enable of the flag "usr" and create a link '/sbin/udevadm -> /usr/sbin/udevadm' if the flag "usr" is not used.
Comment 18 Konstantin Ivanov 2012-04-26 16:35:51 UTC
(In reply to comment #17)
> Attach a new version of the patch to udev-182-r3.ebuild, udev-182-r3.patch.
> With the following changes:
>   - Instead of using the patch udev-182-separate_usr.patch use variable
> declarations 'KMOD_CFLAGS' and 'KMOD_LIBS' in src_configure() through the
> 'declare- x';
>   - In src_install() added check enable of the flag "usr" and create a link
> '/sbin/udevadm -> /usr/sbin/udevadm' if the flag "usr" is not used.

Attached*
Comment 19 SpanKY gentoo-dev 2012-04-29 02:44:21 UTC
(In reply to comment #12)

i don't have any plans of moving busybox out of /bin

(In reply to comment #13)

the current busybox ebuild always installs a static copy at /bin/bb
Comment 20 William Hubbs gentoo-dev 2012-04-29 17:51:53 UTC
(In reply to comment #19)
> (In reply to comment #12)
> 
> i don't have any plans of moving busybox out of /bin
> 
> (In reply to comment #13)
> 
> the current busybox ebuild always installs a static copy at /bin/bb

The community seems ok about us doing the /usr merge (see the thread I sited on -project), so eventualy /bin will be a symlink to /usr/bin.
Comment 21 SpanKY gentoo-dev 2012-04-29 21:57:55 UTC
udev's hard requirement on recent kernels and specific filesystem layouts has seriously failed the community.  i'll have a solution in busybox that'll work regardless of sep-/usr, merged-/usr, and doesn't require recent kernels or initramfs.  udev's tight integration is producing unnecessarily fragile systems.
Comment 22 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-06-07 03:30:31 UTC
*** Bug 419871 has been marked as a duplicate of this bug. ***