3 ms·
Pray for all those scripts out there that assume /bin/sh or /bin/bash exists. Sounds like they only have a couple more years of error-free life
by VWWHFSfQ 3y ago
Pray for all those scripts out there that assume /bin/sh or /bin/bash exists. Sounds like they only have a couple more years of error-free life
- josephcsible 3y agoWon't there be a symlink to keep those working?
- blueflow 3y agoThere is no intent to remove the /bin symlink.
- VWWHFSfQ 3y agoah ok. well then whats the point of this
- blueflow 3y agoYes, this is why its a controversial thing.
- masklinn 3y agousr merge has been a topic for more than a decade, you can easily find articles on the subject in general, and for Debian in particular.
- rektide 3y agoThere's a bunch of compatibly reasons why this helps maintain portability across Unixes. But my favorite reasons for this are how much nicer it makes managing & switching between Linux images: > 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/TheCaseForTheUsrMerge/ 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.
- unethical_ban 3y agoWell, you can only symlink one direction and they want to merge.
- semiquaver 3y agoThink of all the greenhouse gas emissions that will be saved when everyone collectively removes an entry from their $PATH…
- csdvrx 3y agoToo bad. Will it at least lead to the removal of /sbin and /lib?
- blueflow 3y agoThere are still many paths hardcoded into /sbin. /lib is expected to stay since the LDSO path for dynamic linking points there, removing it is not possible without breaking the ABI.
- csdvrx 3y ago> There are still many paths hardcoded into /sbin This is fixable: it only truly matters for /sbin/init, but it's nothing than can be fixed in a minute with the right kernel cmdline. For the rest, a regex could replace /sbin by /usr/sbin in the package files > /lib is expected to stay since the LDSO path for dynamic linking points there, removing it is not possible without breaking the ABI. Maybe it's time to do that too? Android does just fine without /lib. Only the linker needs that, and changing the path to ld-linux should just require a kernel tweak. But breaking the ABI could also be the opportunity to bring in android improvements, like the linkerconfig or namespaces!
- blueflow 3y agoNot sure if trolling...
- csdvrx 3y agoI sincerely mean all of that. I don't see why we can't take advantage of android advances to facilitate having specific dynamic libraries to specific programs. If you disagree, please explain your point because I think google did some genuine improvements for dynamic libraries.
- mjg59 3y agoThe kernel has no idea about /lib (unless you're using the in-kernel firmware loader, which you really shouldn't be) - the rtdl path is present in every ELF object that depends on it, so the "kernel tweak" would be hacking the ELF loader to rewrite /lib (or /lib64) to something else.
- masklinn 3y ago/bin/sh is mandated by posix, so there’ll be a link to usr. /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.
- VWWHFSfQ 3y agonah I always use /bin/bash because I use bash features and I don't want to use some crappy dash or fish or whatever default shell is set on the system
- masklinn 3y agoThat you’re using bash is an other problem which you also have. But the issue I’m talking about is using the specific path /bin/bash, as that just reduces compatibility compared to going through env.
- VWWHFSfQ 3y agono I like bash and all the systems I care about have /bin/bash so I don't care the /usr/bin/env bash thing always just seemed like pointless cargo culting to me. never had this problem
- doubled112 3y agoI think it is fair not to care if it isn't making a difference for you. “/usr/bin/env bash” will keep the shebang working between a Linux and FreeBSD (and probably other *NIX) machines. This bit me at one point, and it just became a habit since. Bash (if installed) is in /usr/local/bin there. Other interpreters often are too.
- _piif 3y agoAlso /usr/bin/env bash is required on NixOS and Guix, neither of which have /bin/bash.