{"id":969,"date":"2012-08-22T01:44:44","date_gmt":"2012-08-22T05:44:44","guid":{"rendered":"http:\/\/pappp.net\/?p=969"},"modified":"2013-01-21T13:13:57","modified_gmt":"2013-01-21T18:13:57","slug":"linux-future","status":"publish","type":"post","link":"https:\/\/pappp.net\/?p=969","title":{"rendered":"Linux Future"},"content":{"rendered":"<p>Some time ago I came across yet another <a href=\"http:\/\/news.ycombinator.com\/item?id=4383243\">angry discussion<\/a>[1] about <a href=\"http:\/\/en.wikipedia.org\/wiki\/Systemd\">systemd<\/a>, and have been reading and thinking a great deal about the design of Systemd, and what it says about Linux.  I&#8217;ve come to realize that the strife in the Linux community is because an active and well-funded group of developers who have been driving the direction of various core components <em>are not building UNIX<\/em>.  They are building some other philosophically divergent system on top of the Linux kernel, with roughly the same relationship to UNIX as Plan9[2].  For convenience I&#8217;m going to call the non-UNIX environment they&#8217;re building FLOS for the remainder of this post (<b>F<\/b> since the FreeDesktop.org folks, and their backers in the Fedora project, are driving this, <b>L<\/b> for the Linux kernel, <b>OS<\/b> should be self-explanatory).  I intend this term to be value-neutral[3].<\/p>\n<p>To me, the core of a UNIX system is a philosophical matter.  To quote Mike Gancarz&#8217;s <a href=\"http:\/\/www.amazon.com\/The-UNIX-Philosophy-Mike-Gancarz\/dp\/1555581234\">The UNIX Philosophy<\/a> from 1994, UNIX has 9 paramount precepts: <\/p>\n<ol>\n<li>Small is beautiful.<\/li>\n<li>Make each program do one thing well.<\/li>\n<li>Build a prototype as soon as possible.<\/li>\n<li>Choose portability over efficiency.<\/li>\n<li>Store data in flat text files.<\/li>\n<li>Use software leverage to your advantage.<\/li>\n<li>Use shell scripts to increase leverage and portability.<\/li>\n<li>Avoid captive user interfaces.<\/li>\n<li>Make every program a filter.<\/li>\n<\/ol>\n<p>FLOS is a nearly diametrically opposed design, with design concepts like the following: <\/p>\n<ul>\n<li>FLOS avoids scripts, and prefers to split tasks into compiled logic interacting with logic-less configuration files.\n<li> FLOS prioritizes ease of machine manipulablity over human manipulablity.\n<li>The components of FLOS communicate over <a href=\"http:\/\/en.wikipedia.org\/wiki\/D-Bus\">D-Bus<\/a> rather than sockets and pipes.\n<li>FLOS is built on a core of monolithic programs which attempt to synergisticly manage multiple complex components.\n<li>FLOS leverages features specific to Linux and ignores portability.\n<li>FLOS prefers tightly integrated components to generic solutions.\n<\/ul>\n<p><b>I&#8217;m not sure that this is a bad design, but it is most definitely not UNIX or anything like it.<\/b>  I&#8217;ve seen some fairly convincing arguments that the FLOS design philosophy has serious benefits, and there are decades of convincing arguments that abandoning the UNIX way is the path to ruin. Systemd is the big realization of the FLOS design, but many projects, especially FreeDesktop projects, have been working this way for some time.  I&#8217;m going to pick out a couple examples and talk about them under the fold.  <\/p>\n<p><!--more--><\/p>\n<p>I run <a href=\"http:\/\/www.archlinux.org\/\">Arch<\/a>, so my examples will be focused there&#8230; although from the look of things the Fedora project&#8217;s choices are being taken as upstream gospel, so I&#8217;ll be pointing at them quite a bit as well.  Allan Mcrae has been <a href=\"http:\/\/allanmcrae.com\/2012\/08\/are-we-removing-what-defines-arch-linux\/\">particularly vocal<\/a> about whatever Fedora does being the right thing for Arch to do, such that no Arch-specific changes will need to be made for software that is compatible with FLOS.  Arch&#8217;s own philosophy, <a href=\"https:\/\/wiki.archlinux.org\/index.php\/The_Arch_Way\">The Arch Way<\/a> was[4] a big part of what attracted me to Arch in the first place, but its execution is making Arch a particularly bloody place while the larger community decides if Linux will continue to be a UNIX-like system.<\/p>\n<p>In retrospect, the first strong signs of the FLOS design showed up with <a href=\"http:\/\/en.wikipedia.org\/wiki\/Udev\">Udev<\/a> in 2003.  Udev was easy to miss, because it was a necessary change &#8211; the old DevFS system did not deal well with dynamic devices, was largely unmaintained and ill-understood, and there is a cogent argument that it is safer and more flexible to perform device management in userspace rather than in the kernel.  Udev initially demonstrated FLOS design in that it uses a fleet of logicless configuration files, but has since swallowed Linux&#8217;s old hardware abstraction layer, <a href=\"http:\/\/en.wikipedia.org\/wiki\/HAL_(software)\">HAL<\/a>, becoming a sort of monolithic hardware management process, and switched to communicating with other processes via d-bus. Udev&#8217;s source tree and development process has also recently been moved into systemd&#8217;s, to further integrate the pieces, as a FLOS design would advocate. <\/p>\n<p>One of the earliest really apparent examples of the difference between UNIX and FLOS is the move to ignore the <a href=\"http:\/\/en.wikipedia.org\/wiki\/Filesystem_Hierarchy_Standard\">FHS<\/a>. Ignoring the FHS is happening in two ways visible from my Arch system at the moment.  <\/p>\n<p>One form is that the Udisks developers (FreeDesktop.org folks, naturally) took it upon themselves to move automount paths from <code>\/media\/$DEVICE_NAME<\/code> to <code>\/run\/media\/$USER\/$DEVICE_NAME<\/code>.  I&#8217;ve already bitched about that <a href=\"http:\/\/pappp.net\/?p=948\">here<\/a>, but to summarize it makes working with removable media from the command line a miserable exercise in digging around long unpredictable directory hierarchies, makes it much harder to script around removable media, and creates weird problems with device ownership and mount paths for removable devices attached when the number of users logged in is not exactly equal to 1 (0 being the most frustrating and common exception).  I&#8217;d like to specifically quote the Udiscs2 command documentation, because it makes my point for me: <\/p>\n<blockquote><p>This program is not intended to be used by scripts or other programs \u2013 options\/commands may change in incompatible ways in the future even in maintenance releases. Scripts and\/or other programs should either use the D-Bus APIs of udisks2-daemon(8) or native low-level commands such as mount(8).<\/p><\/blockquote>\n<p>In other words, Udisks2 is not to be used with scripts or via a textual interface, you communicate with it via d-bus.  It is tightly integrated with upstream (udev, and the *Kits) and downstream components (Desktop Environment) &#8211; FLOS, not UNIX. <\/p>\n<p>The more drastic form is the effort to throw everything into \/usr and symlink stuff out to where the FHS says it should be, and nearly every piece of software for a UNIX like system ever made expects it to be.  The Fedora project has a vast document <a href=\"http:\/\/fedoraproject.org\/wiki\/Features\/UsrMove\">here<\/a>, which makes circular references to the <a href=\"http:\/\/www.freedesktop.org\/wiki\/Software\/systemd\/TheCaseForTheUsrMerge\"> similar page<\/a> at the FreeDesktop project defending and documenting this change. <\/p>\n<p>Historically, the basic distinction was that <code>\/<\/code> is required to bring up the system, and <code>\/usr<\/code> can be mounted later, from the network, or a slower\/more complicated storage device&#8230; or not at all if something goes wrong.  This also means that a single image of the entirety of <code>\/usr<\/code> should be readily shared between similarly configured systems, bolstered by a rule that things not performing system administration should never write to <code>\/usr<\/code>.  There is a reasonably recent spat about this stuff <a href=\"http:\/\/lists.busybox.net\/pipermail\/busybox\/2010-December\/074114.html\">here<\/a>, do <em>not<\/em> just read the first message that tries to trivialize the distinction despite supplying still-relevant reasons, a few messages later more counter arguments show up.  I&#8217;m going to exclude a longer discussion of this, because it is instructive only as an example of &#8220;We don&#8217;t care about UNIX,&#8221;[5] rather than a good exposition of the FLOS design.  <\/p>\n<p>Another big piece of FLOS style design showing up on Linux was the rise of the *Kits<br \/>\n&#8211; <a href=\"http:\/\/www.freedesktop.org\/wiki\/Software\/polkit\">PolicyKit<\/a>, <a href=\"http:\/\/www.freedesktop.org\/wiki\/Software\/ConsoleKit\">ConsoleKit<\/a>, PackageKit, etc. These are now all but required to run a normal looking interactive Linux system.  They are designed to be easy to use via an API, but difficult to use from the command line.  They support configuration files and discourage scripting. They have basically built a FLOS-style system to supersede various pieces of UNIX, particularly around user management and permissions, which break various UNIX conventions in favor of finer granularity and binary APIs. <\/p>\n<p>ConsoleKit and its successor, systemd-loginctl are particularly interesting.  <a href=\"https:\/\/wiki.archlinux.org\/index.php\/ConsoleKit\">ConsoleKit<\/a> is a cludgy abomination, built to bridge between FLOS-designed parts and UNIX designed parts &#8211; it spawns on the order of 60 idle threads, and manages the interaction of normal UNIX processes with FLOS style behaviors in session management, permissions, and hardware interaction.  systemd-loginctl is the new mechanism, which is integrated into systemd and simply ignores the old UNIX way of doing things.  systemd-loginctl is naturally much more elegant as it doesn&#8217;t have to bridge paradigms, but also leaves anyone not using a suitably enabled session type out in the cold. <\/p>\n<p>I&#8217;ll only mention Systemd in passing, even though it is clear to me that systemd is the transition point from &#8220;Linux as UNIX&#8221; to &#8220;Linux as FLOS,&#8221; simply because I haven&#8217;t dealt with it enough to feel comfortable commenting on the implementation yet, and wanted to get this finished and posted.  The simplest argument for Systemd as the realization of FLOS is to take a look at the <a href=\"http:\/\/0pointer.de\/blog\/projects\/why.html\">list of features<\/a> in this justification for Systemd.  Even a Linux sysadmin\/power user will be spending some time with google figuring out what many of the things Systemd does <em>are<\/em> &#8211; it doesn&#8217;t do one thing well, because it does <em>fucking everything <\/em>.  It does init&#8217;s job. It does inetd&#8217;s job. It integrates a bootsplash mechanism.  It talks over d-bus. It is configured with a pile of logic-less configuration files and binary tools.  It integrates with the *kits.  It makes heavy use of Linux-specific features like cgroups. It handles disc management. It handles user authentication. It has more bells, whistles, and kitchen sinks than many simple Linux based systems I use regularly, and it is just the init process.  I find reading about systemd rather draining, because it consistently makes design decisions that are absolutely opposite of the UNIX way, backed by otherwise mostly cogent arguments.  The argument is whether or not preserving the UNIX philosophy is more important than adding features and making ease and performance gains for specific use cases, not about systemd in particular. <\/p>\n<p>It&#8217;s too early to tell if FLOS will fall on its face like all the other not-quite-UNIXy-enough OSes that have come by, or if mainline Linux is going to retain its position but become largely unrecognizable as a UNIX system.  I&#8217;m not entirely decided if that is a bad thing (for the record: I mostly think it is, but there are a handful of convincing arguments to the contrary in specific cases), and I&#8217;m not sure what I&#8217;ll end up running in that eventuality.  The various more UNIX-like *NIXes (the *BSD flavors and Minix and such) are third-class citizens, and having nothing that behaves like UNIX around dramatically reduces the joy of <a href=\"http:\/\/www.youtube.com\/watch?v=dFUlAQZB9Ng\">It&#8217;s a UNIX system! I know this!<\/a>. <\/p>\n<p>Now that I have the product of some weeks&#8217; musings and readings out in a wall of text, I&#8217;d like to know if my interpretation of the situation makes sense to anyone else.<br \/>\n&#8212;<\/p>\n<p>[1] Anyone who objects to most of what I&#8217;m talking about on the internet seems to be immediately, and ironically, accused of ad-hominem attacks on <a href=\"http:\/\/0pointer.de\/lennart\/\">Lennart Poettering<\/a>, so I&#8217;ll go ahead and address that &#8211; I&#8217;m interested in the philosophical situation, not the individual developers.  Pottering has been a prolific adherent to the FLOS philosophy in words and code, so he naturally comes in to the discussion, but this isn&#8217;t about him.<\/p>\n<p>[2] I don&#8217;t mean to compare what Linux is turning in to to Plan9.  Plan9 is, frankly, more UNIX than UNIX in its philosophy and adherence to that philosophy.  Plan9 was also very carefully, if you&#8217;ll pardon the pun, planned, while FLOS looks to be very much an ad-hoc effort, making a sort of <a href=\"http:\/\/queue.acm.org\/detail.cfm?id=2349257&#038;ref=fullrss\">Cathedral\/Bazaar<\/a> example (Link is to a recent discussion, not the old ESR book). <\/p>\n<p>[3] W&#8217;re talking about nerds and philosophy, so things are obviously contentious.  FLOS suggests both &#8220;FLOSS&#8221; (Free\/Libre Open Source Software) and &#8220;F*ing Loss&#8221;, so the reader is welcome to hear the value distinction they want in it. <\/p>\n<p>[4] As much as I love Arch, some things <em>really piss me off<\/em> about the community, in particular that development decisions for some years have been made by insular cabals on high-volume mailing lists, and if anyone in the user community complains about decisions on the nice modern managable BBS that <em>looks<\/em> like the center of the community, they are told they &#8220;Should have read the mailing list a year ago,&#8221; while non-members of the cabals are angrily dismissed if they speak up on the lists.<\/p>\n<p>[5] The merged \/usr (which is an ass-backward name, btw) proponents point out that Solaris has been working this way for 15 years.  Solaris has always been an odd duckling among the *NIXen, which eschews many conventions that most others follow.  I for one find the hall-of-mirrors nature of the Solaris file system really fucking aggravating &#8211; last time I dealt with Solaris boxes, I was working on a system configured from a pile of directories and subdirectories haphazardly cross-linked between \/etc\/ and \/usr\/lib, which is absolutely fucking insane.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some time ago I came across yet another angry discussion[1] about systemd, and have been reading and thinking a great deal about the design of Systemd, and what it says about Linux. I&#8217;ve come to realize that the strife in &hellip; <a href=\"https:\/\/pappp.net\/?p=969\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,8,1],"tags":[51,207,170],"class_list":["post-969","post","type-post","status-publish","format-standard","hentry","category-computers","category-diy","category-general","tag-linux","tag-philosophy","tag-unix"],"_links":{"self":[{"href":"https:\/\/pappp.net\/index.php?rest_route=\/wp\/v2\/posts\/969","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pappp.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pappp.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pappp.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pappp.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=969"}],"version-history":[{"count":0,"href":"https:\/\/pappp.net\/index.php?rest_route=\/wp\/v2\/posts\/969\/revisions"}],"wp:attachment":[{"href":"https:\/\/pappp.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=969"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pappp.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=969"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pappp.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=969"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}