TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The Case for the /usr Merge (2012)

137 pointsby goranmoominover 2 years ago

17 comments

jmillikinover 2 years ago
<p><pre><code> &gt; The primary commercial Unix implementation is nowadays Oracle Solaris. </code></pre> Surely it&#x27;s macOS? The total install base of Solaris must be a rounding error compared to the number of Macbooks sold daily.
评论 #32760454 未加载
评论 #32761610 未加载
评论 #32761082 未加载
评论 #32760573 未加载
评论 #32760593 未加载
评论 #32763108 未加载
评论 #32763155 未加载
评论 #32763870 未加载
评论 #32760808 未加载
dietricheppover 2 years ago
&gt; With the merged &#x2F;usr directory we can offer a read-only export of the vendor supplied OS to the network, which will contain almost the entire operating system resources.<p>Back in 2005 or 2006, I made a Linux that exported the filesystem this way, and it worked by mounting &#x2F; as a network volume. This worked by doing a particular dance with &quot;pivot_root&quot; at the beginning and a union mount with a tmpfs volume. We used it to play LAN games in the computer lab. Because the network booting Linux didn&#x27;t touch the local hard drive, you could clean up after yourself just by shutting down the machines. It was also nice and fast, because the machines all had gigabit ethernet and the file server was serving from cache most of the time. It ended up being noticeably better than running off local hard disk... this was the era before SSDs took over, obviously.
评论 #32761003 未加载
gjadiover 2 years ago
On OpenBSD the split is nicely described in <a href="https:&#x2F;&#x2F;man.openbsd.org&#x2F;man7&#x2F;hier.7" rel="nofollow">https:&#x2F;&#x2F;man.openbsd.org&#x2F;man7&#x2F;hier.7</a><p>The main difference is about static linking.<p>&gt; &#x2F;bin&#x2F; User utilities fundamental to both single and multi-user environments. These programs are statically compiled and therefore do not depend on any system libraries to run.<p>&gt; &#x2F;sbin&#x2F; System programs and administration utilities fundamental to both single and multi-user environments. These programs are statically compiled and therefore do not depend on any system libraries to run.<p>It was discussed a few month ago: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=31336396" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=31336396</a>
评论 #32763701 未加载
评论 #32764461 未加载
评论 #32763554 未加载
RustyRussellover 2 years ago
(2013)<p>Though I responded in 2012, so it may be older (the log on the site says 2013 though).<p>FWIW, my response, as FHS editor:<p><a href="https:&#x2F;&#x2F;rusty.ozlabs.org&#x2F;?p=236" rel="nofollow">https:&#x2F;&#x2F;rusty.ozlabs.org&#x2F;?p=236</a>
评论 #32763602 未加载
评论 #32761934 未加载
评论 #32763293 未加载
hulituover 2 years ago
&gt; That means scripts&#x2F;programs written for other Unixes or other Linuxes and ported to your distribution will no longer need fixing for the file system paths of the binaries called, which is otherwise a major source of frustration<p>I don&#x27;t know what this guy is smoking, but this has never been a problem.
评论 #32760484 未加载
评论 #32760033 未加载
评论 #32760113 未加载
评论 #32760095 未加载
评论 #32761843 未加载
gladiatr72over 2 years ago
&quot;... Improved compatibility with other Unixes (in particular Solaris)...&quot;<p>&lt;snort&gt;
评论 #32760275 未加载
评论 #32760118 未加载
评论 #32760381 未加载
jablover 2 years ago
I recall, with some amusement, the uproar this caused when proposed a decade ago. Luckily sanity prevailed over the kneejerkers in the end, and today our systems are a little bit simpler, and another tiny gratuitous portability issue is no more.
评论 #32761736 未加载
kazinatorover 2 years ago
Why not go the other way?<p>&#x2F;usr&#x2F;bin -&gt; &#x2F;bin<p>One less path component to resolve.
评论 #32760353 未加载
foxdie99over 2 years ago
Hurray! Finally we slowly making progress towards c:&#x2F; !!! I can not wait until &#x2F;etc also ceases to exit in turn for an SQL-LITE variant run by systemd. We are really living in the future. Monolithic central administration tools, fewer system folders... Yes this is it. I really hope everybody else is as happy as me. &#x2F;etc &#x2F;proc &#x2F;sys &#x2F;home &#x2F;root &#x2F;usr &#x2F;bin &#x2F;sbin &#x2F;mnt &#x2F;boot who needs all of these anyway? Am I right? Lets simplify stuff make it easy. Also just as an added note please kill the Man pages system its just make it so that I can click a link the automaticaly opens my browser to the documentation I need or known forums! Screw living in the terminal, make it all invisible and make sure I do not need to know how it actually works. That way I can just call RedHat support the same way we do with Microsoft support.<p>The Unix way will prevail. I am happy the BSDs continue with the philosophy. Old does not mean outdated and tradition does not mean backwards. One thing only and do it well.
knorkerover 2 years ago
The reasons:<p>&gt; Improved compatibility with other Unixes&#x2F;Linuxes in behavior:<p>Well, some of them.<p>&gt; Improved compatibility with other Unixes (in particular Solaris) in appearance:<p>I guess, but if you supported Linux you already supported Solaris, so if you think of Solaris as second class then nothing gained.<p>Also: Solaris is (to me) clearly on its way out. Not worth a migration to converge with it.<p>&gt; Improved compatibility with GNU build systems:<p>This one is pure hogwash. Either you need to support the systems that don&#x27;t do this (e.g. OpenBSD), or you only care about Linux. (this is a bit simplified, but pretty true)<p>So your build system <i>still</i> needs to support non-merged.<p>Except now you&#x27;re going to bake in Linux-specific merge assumptions into your build system, so that they&#x27;ll be even more broken.<p>&gt; Improved compatibility with current upstream development:<p>This seems more like tech debt to me, in the name of expedience.<p>I&#x27;m here not saying it shouldn&#x27;t be done. I&#x27;m saying these are terrible reasons.
评论 #32763452 未加载
nooberminover 2 years ago
Why not go in reverse and have &#x2F;bin and &#x2F;lib directories again? Why merge into &#x2F;usr? I feel like the suckless people and fellows like them will be happy.<p>I think even &#x2F;usr&#x2F;share can get its own directory, why not?
评论 #32761600 未加载
评论 #32761192 未加载
tdeckover 2 years ago
I wish we could just unify &#x2F;usr&#x2F;local&#x2F;bin, &#x2F;usr&#x2F;bin, &#x2F;usr&#x2F;sbin, &#x2F;bin, and &#x2F;opt. I&#x27;m a Linux user for 15 years and I <i>still</i> don&#x27;t know if there&#x27;s a good modern reason to have so many different directory trees for binaries and what that reason is. It&#x27;s all historical craft that makes it so hard to find things as far as I am concerned.
评论 #32761813 未加载
评论 #32761669 未加载
评论 #32761338 未加载
评论 #32761561 未加载
评论 #32761154 未加载
ch33zerover 2 years ago
LWN has a nice write up of some of the issues resulting from the merge that Debian did:<p><a href="https:&#x2F;&#x2F;lwn.net&#x2F;Articles&#x2F;773342&#x2F;" rel="nofollow">https:&#x2F;&#x2F;lwn.net&#x2F;Articles&#x2F;773342&#x2F;</a><p>tl;dr: Do the merge or don&#x27;t but don&#x27;t support both.
elmacho39over 2 years ago
Its the wrong direction, &#x2F;usr&#x2F;bin should have to move to &#x2F;bin<p>make &#x2F;usr home again.
midislackover 2 years ago
&#x2F;sbin&#x2F; fits on a small root partition, historical precedent still applies
waynesonfireover 2 years ago
&quot;By making the same change in Linux we minimize the difference towards the primary Unix implementation, thus easing portability from Solaris&quot;<p>Since when are you so concerned about Unix compatibility as you push systemd?
throwaway892238over 2 years ago
Some thoughts:<p>- If you have your own system, with very tightly controlled specifications, you can make any change you want, and its impact will be easy to manage. When you change the specifications of random people&#x27;s systems, random things happen. Doesn&#x27;t matter what the change is. A file showing up where it didn&#x27;t exist before, or being a symbolic link rather than a regular file, or duplicate files, <i>will</i> cause logic bugs.<p>- There isn&#x27;t a single mention of any downside to this fundamental shift in the expectations of the filesystem of major distributions. Yet you can be <i>guaranteed</i> that this will break compatibility with some applications&#x2F;systems. They still they make no attempt whatsoever to estimate this.<p>- It can&#x27;t be stated enough that this is a Fedora &#x2F; RedHat &#x2F; Lennart Poettering thing. Quite frankly, <i>anything</i> they suggest should ring giant alarm bells. This group is singly responsible for every incompatible, over-designed, pain-in-the-ass change to Linux distributions in the past 10+ years. If it causes problems, and it didn&#x27;t come from a hardware vendor, it came from these people.<p>- Who in the actual fuck cares about filesystem-level porting from Solaris?! If you&#x27;re already dealing with all the rest of the portability issues, file paths are literally the very last and least-difficult consideration. <i>&quot;Oh no! In what directory will I find &#x27;pkill&#x27; ?! It&#x27;s so difficult!&quot;</i> Only a company obsessed with converting whales to their platform and want one more bullet point to add to their sales deck cares. I don&#x27;t actually care if this goes through, but just the fact that RedHat is still shilling their unnecessary changes as if anyone else other than them wants it makes my skin scrawl.
评论 #32760950 未加载