41 points · by gslin · 3y ago · 57 comments
> [T]his is a misleading writeup of a Debian-internal announcement. One specific action that is mostly internal to Debian, which some developers wanted to push ahead with after the bookworm release, has been paused.
> On a merged-/usr system (which will include all Debian 12 and Debian 13 systems, both new installations and upgrades), both /bin/cat and /usr/bin/cat exist, but dpkg is only aware of one of those paths (/bin/cat in this case); in dpkg jargon, the other is said to be an alias. The specific action that should not proceed until further notice is: swapping the path that dpkg considers to be canonical, for example from /bin/cat to /usr/bin/cat.
In particular, the thing that this announcement pauses is only a shuffling of internal metadata. For users, /usr will already look merged either way.
The other bit of context is that this "pause" comes as Debian approaches its next major release, and they expect to unpause it shortly after that.
What's the motivation of moving /bin to /usr/bin? What is gained? What is lost?
/usr/bin only existed because of fast small mainframe hard drives and slower larger hard drives.
I don't understand why the direction is the way it is thou. getting rid of /usr/ seems like it would make more sense.
/usr doesn't mean "user". It means "User Software Resources". I learned this from a good friend whose 70+ years old, and worked with Ritchie. My friend is also cited in K&R C.
/usr/bin and /usr/sbin should have always been the place to put "user software resources". And we're finally getting back to what it was originally.
I don't get the proposed benefits?
It's the systemd gangs don't want to support the standard directory hierarchy and force every distro to migrate.
Debian is among the last to do these changes.
> The merged directory /usr, containing almost the entire vendor-supplied operating system resources, offers us a number of new features regarding OS snapshotting and options for enterprise environments for network sharing or running multiple guests on one host. https://www.freedesktop.org/wiki/Software/systemd/TheCaseFor...
And indeed, with systemd one can boot a whole system from practically any unpopulated root mount with a /usr image mounted on it.
Want to OS upgrade? Swap /usr & try it. /etc and /home and the other directories might have instance specific content, but the OS image is nicely set away & swappable in /usr. And one should be able to keep the same "instance" while swapping the image. It containerizes the OS image, separate-ish from the OS instancd, whereas before the OS was somewhat amorphously sprawled across multiple top level directories. It's a huge boon to manageability.
Will it at least lead to the removal of /sbin and /lib?
/bin/bash will be as well because /bin itself is a symlink to /usr/bin.
Though that’s a very dumb shebang to use and you should be ashamed: lots of systems don’t have it, or have an absolutely ancient system bash. By hard coding this you’re just making your scripts worse.
Where? POSIX says:
Applications should note that the standard PATH to the shell cannot be assumed to be either /bin/sh or /usr/bin/sh, and should be determined by interrogation of the PATH returned by getconf PATH, ensuring that the returned pathname is an absolute pathname and not a shell built-in.But the issue I’m talking about is using the specific path /bin/bash, as that just reduces compatibility compared to going through env.