Ubuntu should move all binaries to /usr/bin/

Luis Mondesi lemsx1 at gmail.com
Tue Dec 6 19:23:12 UTC 2011


If you really care about end users and you think this is something that
need fixing, then the proper way to do it is to:

1. create a fake /usr/bin/ where all binaries are available without
breaking anything else. (this could be done by having a virtual filesystem
of some sort that automatically finds things for you, think autofs /etc/
auto.net. So if you say: which bash it shows as /bin/bash if it hasn't been
used from /usr/bin/bash. and which bash will be /bin/bash and /usr/bin/bash
if somebody or some command called /usr/bin/bash as it would "mount" this
for you there). This would mean that all packages that install things to
/usr/bin would need to be installed elsewhere... which is really bad
2. write GUI tools that find binaries properly, think gnome-open but for
binaries. I guess similar to command-not-found in Ubuntu
3. hide the whole filesystem from end-users GUI programs (MacOS X does this
beautifully, if you open a terminal you can cd / and it takes you to some
/private hidden directory)

If it was me, I would do this actually:

1. hide all from users
2. install all packages to /opt/app/version/{bin,share,lib}
3. symlink stuff from /opt/app/version/bin/* to /usr/bin/ if not already
there

And write a really good update-alternatives to manage /usr/bin/* symlinks

Both solutions are really destructive and break UNIX mentalities dating
back to who knows when... However, the second solution would work cleanest
up to some point (say that somebody decides to mount /opt from a disk
that's not available during early boot and your fsck needs to be exec from
/usr/bin)

My opinion is that this is silly and we should not move anything to
/usr/bin only. If your goal is to make things easier to end-users, then
just add a new path to /etc/profile and they will all have it, and put
symlinks there. If your solution is to make it easier for both 3rd party
vendors and end-users, then modify the FHS so it gets standarized for all
Linux distributions.

I do not think that all people using Ubuntu have /usr from the same
partition that / is. And even if they do, I'm sure a lot of scripts/apps
will break if you move everything to /usr/bin and, say, symlink from
/usr/bin to /bin /sbin /usr/local/bin /usr/local/sbin etc..., so the same
commands are available from all legacy PATHs. Madness. Things will break.
Examples: some obscure app needed the user-level privileges from /usr/bin
and not the admin-only /usr/sbin version (which might have set-uid bit set
and who knows what other permissions setup). Or another example: your app
does not like symlinks and it found /bin/foo. Or another: my binary has the
same name as one provided by the system in /usr/sbin, but since now
/usr/bin/ has this name, my app will conflict (3rd party vendors, not
packages from Debian/Ubuntu).

-- 
----)(-----
Luis Mondesi

----- START ENCRYPTED BLOCK (Triple-ROT13) ------
Gur Hohagh [Yvahk] qvfgevohgvba oevatf gur fcvevg bs Hohagh gb gur fbsgjner
jbeyq.
----- END ENCRYPTED BLOCK (Triple-ROT13) ------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20111206/3697ab1f/attachment.html>


More information about the Ubuntu-devel-discuss mailing list