You are not logged in.

#1 2012-08-30 22:09:12

fallen_arches
Member
Registered: 2012-08-30
Posts: 1

Merge /{s,}bin with /usr/{s,}bin

With the recent /lib -> usr/lib move, and things like systemD on the horizion, is it time to merge /bin and /sbin with /usr?  There was some talk in "GNU/Linux Discussion" then Fedora started down this path. What do people think about this idea today (2012-08-30)?  I personally like the idea of a read-only /usr partition mounted by initrd that I could share between VM's.  I'd also like to encrypt the partition, share it via NFS, take snapshots, and a few other fun activies.

I could probably do this today if I mapped /bin to usr/bin.root to sidestep /bin/foobar -> /usr/bin/foobar symlink issues.  I think the hardest part would be getting mkinitcpio's initrd to decrypt / and /usr, and then mount /usr.  I think all the pieces are there in one form or another today, I'd just need to string them togeather properly. As for the distro as a whole, would /bin & /sbin be very different from the /lib move?

Thank you for your input :)

Offline

#2 2012-08-30 22:35:12

fsckd
Forum Moderator
Registered: 2009-06-15
Posts: 3,639

Re: Merge /{s,}bin with /usr/{s,}bin

Mentioned here and on the mailing lists. No concrete plans publically disclosed yet since we're still in the middle of the transition to systemd.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#3 2012-08-30 22:36:19

Allan
is always right
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,463
Website

Re: Merge /{s,}bin with /usr/{s,}bin

Will require pacman-4.1 before this really gets done.

Offline

#4 2012-08-31 03:51:02

andjeng
Member
From: Indonesia
Registered: 2012-08-30
Posts: 146

Re: Merge /{s,}bin with /usr/{s,}bin

i'm sorry allan. i just dont know why we should merge /sbin to /usr/sbin
i would very appreciate if you explain it to me. smile


just looking around. wink

Offline

#5 2012-08-31 08:09:24

karol
Archivist
Registered: 2009-05-06
Posts: 25,433

Re: Merge /{s,}bin with /usr/{s,}bin

andjeng wrote:

i'm sorry allan. i just dont know why we should merge /sbin to /usr/sbin
i would very appreciate if you explain it to me. smile

https://mailman.archlinux.org/pipermail … 22625.html

* Having four different locations for binaries ({/usr,}/{s,}bin}) and
two locations for libraries ({/usr,}/lib) is less KISS than having one
location for binaries /usr/bin and one for libraries /usr/lib.

Offline

#6 2012-08-31 13:55:03

89c51
Member
Registered: 2012-06-05
Posts: 677

Re: Merge /{s,}bin with /usr/{s,}bin

Allan wrote:

Will require pacman-4.1 before this really gets done.

And pacman-4.1 will be out in ..... (months)





inb4 when its ready tongue

Offline

#7 2012-08-31 16:07:37

andjeng
Member
From: Indonesia
Registered: 2012-08-30
Posts: 146

Re: Merge /{s,}bin with /usr/{s,}bin

karol wrote:
andjeng wrote:

i'm sorry allan. i just dont know why we should merge /sbin to /usr/sbin
i would very appreciate if you explain it to me. smile

https://mailman.archlinux.org/pipermail … 22625.html

* Having four different locations for binaries ({/usr,}/{s,}bin}) and
two locations for libraries ({/usr,}/lib) is less KISS than having one
location for binaries /usr/bin and one for libraries /usr/lib.

thankyou Karol. smile
explains _alot_ of things. big_smile


just looking around. wink

Offline

#8 2012-09-01 06:16:54

Jristz
Member
From: America/Santiago
Registered: 2011-06-11
Posts: 930

Re: Merge /{s,}bin with /usr/{s,}bin

and Why we need pacman 4.1 ????
I maybe a for to deal whith absense of binaries in any location???


Well, I suppose that this is somekind of signature, no?

Offline

#9 2012-09-01 18:06:51

yaffare
Member
Registered: 2011-12-29
Posts: 71

Re: Merge /{s,}bin with /usr/{s,}bin

One thing im always asking myself, why did you choose to move everything in /usr and not the other way round?

Wouldnt it be more kiss, just to have the folders /bin /lib?

Why do we need /usr anyway? I know in the past /usr was ment to be on a separate partition and shared among different machines,
but is there still a use-case for this today?


systemd is like pacman. enjoys eating up stuff.

Offline

#10 2012-09-01 18:24:41

fsckd
Forum Moderator
Registered: 2009-06-15
Posts: 3,639

Re: Merge /{s,}bin with /usr/{s,}bin

yaffare wrote:

Why do we need /usr anyway? I know in the past /usr was ment to be on a separate partition and shared among different machines,
but is there still a use-case for this today?

In the mailing list thread karol links to above. Follow along until you find Allan's post. smile


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#11 2012-09-01 18:49:10

yaffare
Member
Registered: 2011-12-29
Posts: 71

Re: Merge /{s,}bin with /usr/{s,}bin

thx fsckd

Allan wrote:

When I first looked at hurd and saw "usr -> .", I was immediately
convinced that this was a great idea.  It is simplifying the filesystem
layout in terms of where of where to look to find specific files (e.g.
is the library in /lib or /usr/lib) and makes packaging simpler (e.g. if
libfoo.so is in /lib and libfoo.a is in /usr/lib then you need symlinks
to libfoo.so in /usr/lib too).  It makes little difference from a users
perspective provided the symlink is present so the old directory layout
can be used transparently.

What convinced me of putting all this in /usr rather than on / is that I
can have a separate /usr partition that is mounted read only (unless I
want to do an update).  If everything from /usr gets moved to the root
(a.k.a hurd style) this would require many partitions.

Didnt know hurd was doing it, definitely like it better,
as the read only partition is a very good point, but how many actually use it? < 5% I guess,
besides someone could still do it as Allan said, he just needs like 3 partitions instead of 1.

Last edited by yaffare (2012-09-01 18:49:32)


systemd is like pacman. enjoys eating up stuff.

Offline

#12 2012-09-02 20:09:37

ConnorBehan
Trusted User (TU)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,357
Website

Re: Merge /{s,}bin with /usr/{s,}bin

I fully support this move of putting all binaries on an equal footing. I don't know how many times I've rolled my eyes about how arbitrary it is now. Avahi thinks it's more critical than grep? Please.

I also think it's more pragmatic to keep /usr.
1. This would create /share, /include and /src.
2. Changing "--prefix=/usr" to "--prefix=/" in every program would be a huge undertaking.
3. An impression I got in my early days with Arch was that a lot of people do have it on its own partition. And the one weakness of these plans to reorganize the filesystem is that you can't create cross-device symlinks. We wouldn't want to have to go with some kernel level hack like GoboLinux uses, would we?


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

#13 2012-09-02 22:27:35

Allan
is always right
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,463
Website

Re: Merge /{s,}bin with /usr/{s,}bin

ConnorBehan wrote:

And the one weakness of these plans to reorganize the filesystem is that you can't create cross-device symlinks.

symlinks are fine...   hardlinks are not.

Offline

#14 2012-09-08 10:38:02

karol
Archivist
Registered: 2009-05-06
Posts: 25,433

Re: Merge /{s,}bin with /usr/{s,}bin

A thread about the idea of symlinking /usr to / : https://bbs.archlinux.org/viewtopic.php?id=145942

Offline

#15 2012-09-15 04:36:26

techwiz
Member
Registered: 2012-01-26
Posts: 48

Re: Merge /{s,}bin with /usr/{s,}bin

Just my 2 cents but I always thought /usr was meant to contain userspace binaries while the stuff in /bin and /lib were all system specific (read as "Don't mess with this stuff or kiss your system goodbye") so that the usr directory could in theory be isolated from the system preventing rogue apps from going haywire on the system. And of course sbin was for superuser binaries (I think it still is). I don't think any of this matters anymore since permissions are pretty much the same now between the 2 locations and root owns everything for the most part except the home directory.

Offline

#16 2012-09-15 14:12:19

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: Merge /{s,}bin with /usr/{s,}bin

techwiz wrote:

Just my 2 cents but I always thought /usr was meant to contain userspace binaries while the stuff in /bin and /lib were all system specific (read as "Don't mess with this stuff or kiss your system goodbye") so that the usr directory could in theory be isolated from the system preventing rogue apps from going haywire on the system. And of course sbin was for superuser binaries (I think it still is). I don't think any of this matters anymore since permissions are pretty much the same now between the 2 locations and root owns everything for the most part except the home directory.

The history of /usr is long and amusing (originally it was what /home is now, then hack layered upon hack and a chain of reinterpretations of /usr's purpose gave us what we have today).

Anyway, the description you give is roughly what we used to have before we started merging stuff back from / to /usr. There are several problems:

* it is not really clear what is the important stuff and what is the user-specific stuff as things change over time and between different users/use-cases
* moving binaries from /usr/bin to /bin (or any other combination) without adding symlinks for compatibility is likely to cause problems as the path will be hardcoded in scripts++
* we end up with having stuff in /usr that should be in / and stuff in / that should be in /usr, either because we did not anticipate the change in usage and stuff is "stuck", or because we thought something might change in the future and took this into account, but it did not.
* the problem is even more pronounced with /bin v. /sbin, as adding a feature that can be used by non-root users to a binary that used to be only for root means that it should move to /bin. However, we can't do that (because the path is hardcoded everywhere). The end result is that both /bin and /sbin is in the PATH of everyone (including non-root), and the distinction is meaningless.
* if an app can change /usr then it can change /bin. There should never be a need for any app to have write-access to either.

In short: getting the distinction right is hard. Even if we could do it, it does not gain us anything.

-t

Offline

#17 2013-04-01 10:42:54

frony0
Member
From: London, United Kingdom
Registered: 2011-05-01
Posts: 43
Website

Re: Merge /{s,}bin with /usr/{s,}bin

Allan wrote:

Will require pacman-4.1 before this really gets done.

Can I hold you to that now? Is there any timescale for when this'll be done, now that pacman 4.1 has been completed?


Make it idiot-proof, and someone will breed a better idiot.
-- Oliver Elphick

Offline

#18 2013-04-01 10:52:05

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 14,766
Website

Re: Merge /{s,}bin with /usr/{s,}bin

I'm sure you can hold him to that.  Now it's a done deal: whenever the transition happens, pacman 4.1 will have been completed first.  This is just as true if the /usr transition is done in 10 years as if it is done tomorrow.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#19 2013-04-01 10:55:01

Allan
is always right
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,463
Website

Re: Merge /{s,}bin with /usr/{s,}bin

I'd guess it will still be a few months...

Offline

#20 2013-04-01 13:00:53

Jristz
Member
From: America/Santiago
Registered: 2011-06-11
Posts: 930

Re: Merge /{s,}bin with /usr/{s,}bin

Allan wrote:

I'd guess it will still be a few months...

and why not begin whit the pollicy about placing all in bin now??

you can discover bugs on programs related to this more early and adressed with uptream early for prevent patching programs


Well, I suppose that this is somekind of signature, no?

Offline

#21 2013-04-01 13:09:22

Allan
is always right
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,463
Website

Re: Merge /{s,}bin with /usr/{s,}bin

Because it will screw less people over if we move everything and create the need symlinks in one go.

Offline

#22 2013-04-01 14:37:39

frony0
Member
From: London, United Kingdom
Registered: 2011-05-01
Posts: 43
Website

Re: Merge /{s,}bin with /usr/{s,}bin

Allan wrote:

I'd guess it will still be a few months...

Do you have an idea an idea of how you're going to do it?

e.g. https://wiki.archlinux.org/index.php/De … ki:UsrMove for the /lib move

Another wiki like that would be great if you could smile


Make it idiot-proof, and someone will breed a better idiot.
-- Oliver Elphick

Offline

#23 2013-04-01 18:53:53

progandy
Member
Registered: 2012-05-17
Posts: 2,152

Re: Merge /{s,}bin with /usr/{s,}bin

Do you have an idea an idea of how you're going to do it?

If all binaries should move to /usr/bin, I count 354 (+12 testing) packages in the repos (without AUR) with files in /sbin, /bin and /usr/sbin which have to be rebuilt.

$ pacman -Sql | xargs -n1 pkgfile -l | grep "\s/s\?bin/\|/usr/sbin/" | cut -f1 | sort | uniq

Last edited by progandy (2013-04-01 18:56:12)

Offline

#24 2013-04-01 20:21:03

frony0
Member
From: London, United Kingdom
Registered: 2011-05-01
Posts: 43
Website

Re: Merge /{s,}bin with /usr/{s,}bin

progandy wrote:

Do you have an idea an idea of how you're going to do it?

If all binaries should move to /usr/bin, I count 354 (+12 testing) packages in the repos (without AUR) with files in /sbin, /bin and /usr/sbin which have to be rebuilt.

$ pacman -Sql | xargs -n1 pkgfile -l | grep "\s/s\?bin/\|/usr/sbin/" | cut -f1 | sort | uniq

Oh so it's just a case of moving the files in all the packages? Fair enough. I'd be happy to help, if you guys ever need!


Make it idiot-proof, and someone will breed a better idiot.
-- Oliver Elphick

Offline

Board footer

Powered by FluxBB