|
|
Subscribe / Log in / New account

Debian still having trouble with merged /usr

Debian still having trouble with merged /usr

Posted Apr 13, 2022 8:27 UTC (Wed) by mirabilos (subscriber, #84359)
In reply to: Debian still having trouble with merged /usr by Cyberax
Parent article: Debian still having trouble with merged /usr

No, it cannot. For some utilities like ed and sh, it is mandated they be accessible via /bin/.

Also, *I* know it’s somewhat¹ possible to use env(1), but typical script writers won’t.

¹) not portably if you also need flags


to post comments

Debian still having trouble with merged /usr

Posted Apr 13, 2022 9:36 UTC (Wed) by Cyberax (✭ supporter ✭, #52523) [Link] (6 responses)

> No, it cannot. For some utilities like ed and sh, it is mandated they be accessible via /bin/.
It's actually the reverse. POSIX explicitly says not to depend on it: https://pubs.opengroup.org/onlinepubs/009695399/utilities... - "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."

I've been using "#!/usr/bin/env sh" scripts just fine for the last 10 years or so. I don't remember any problems with that.

> Also, *I* know it’s somewhat¹ possible to use env(1), but typical script writers won’t.

They'll get used to it over time. Transition to /usr-only systems won't happen overnight.

Debian still having trouble with merged /usr

Posted Apr 13, 2022 19:17 UTC (Wed) by mirabilos (subscriber, #84359) [Link] (5 responses)

I think it was the FHS or LSB or something like that.

Debian still having trouble with merged /usr

Posted Apr 14, 2022 1:39 UTC (Thu) by rahulsundaram (subscriber, #21946) [Link] (4 responses)

> I think it was the FHS or LSB or something like that.

Can you provide a specific reference? The objections to this effort which was proposed and implemented in Fedora nearly a decade back and subsequently adopted by several major distributions doesn't appear to be technical.

Debian still having trouble with merged /usr

Posted Apr 14, 2022 2:14 UTC (Thu) by mirabilos (subscriber, #84359) [Link] (3 responses)

This was in reference to getting rid of /bin; as far as I am told, Poettering/Fedora still hae thatr, as symlink.

Debian still having trouble with merged /usr

Posted Apr 14, 2022 3:21 UTC (Thu) by rahulsundaram (subscriber, #21946) [Link] (2 responses)

> This was in reference to getting rid of /bin; as far as I am told, Poettering/Fedora still hae thatr, as symlink.

To give credit where it is due, Harold Hoyer and Kay Sievers put together the original proposal for Fedora and did all of the work involved. Getting rid of any associated symlinks is not part of the plan.

Debian still having trouble with merged /usr

Posted Apr 14, 2022 6:40 UTC (Thu) by smurf (subscriber, #17840) [Link] (1 responses)

> Getting rid of any associated symlinks is not part of the plan.

It's also basically impossible. You will not convince the world to replace all instances of '#!/bin/sh'. Nor would you want to.

Debian still having trouble with merged /usr

Posted Apr 14, 2022 7:24 UTC (Thu) by Cyberax (✭ supporter ✭, #52523) [Link]

> Nor would you want to.

I want to, just out of aesthetic reasons. I periodically test that in containers and actually pretty much everything works.

But yeah, it'll take at least a decade to transition to /bin-less systems.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds