Udisks2 and UNIX Philosophy

Apparently the udisks devs took it upon themselves to violate the FHS and moved the path for automounted media from /media/$DEVICE_NAME to /run/media/$USER/$DEVICE_NAME.

This is a user-facing change that I can’t find primary documentation for with google, which means the developers are automatically in the wrong, even if it is a good change.

Now, let’s talk about some things this change does (The first three are the developer’s claimed features):

  • Mount paths now belong to users – Why would a device plugged in to a computer belong to a particular user? It’s just as likely to be a backup drive or some other shared resource, and the interactions with hotplugging filesystems that support proper permissions are kind of bizarre. Older auto-mounters having to work around the “priviliged mount as a user” issue was a feature.
  • Avoids name clashes – Seriously? If we make the assumption that all relevant systems are single-user interactive machines, as the FreeDesktop folks have been making, every disc will belong to the same user, so the namespace is exactly the same. Also, is this a real problem? How common are device name conflicts? Can’t we just append “-(n+1)” or something straightforward like that?
  • Works with a ro / – OK, fair enough, it’s a neat idea. Now who run anything other than a statically configured embedded system with a ro /? Bueller? Bueller?
  • Where do discs plugged in before a user logs in go? How about if you have multiple interactive users logged in? This Fedora mailing list discussion seems to indicate they didn’t even think about it before pushing the change, and the suggestions mean your disc will mount in different places depending on when you plug it in. Broken.
  • The FHS is a standard, all manner of programs and scripts follow the standard. Everyone who was following the rules just got burnt.

    It wouldn’t be so aggravating if it weren’t part of a stream of douchey autocratic decisions the the gnome and RedHat contingent among the FreeDesktop folks have been making during the transition off of HAL, that harm everyone but the narrow use case they envision while making the decision. This is the same crew that has been forcing the *Kits on us (PolicyKit, ConsoleKit, DeviceKit, etc.), which have all made things less transparent, and power users’s lives more difficult. Most of these changes seem to be dedicated to breaking features accessible from the command line or other simple interfaces and instead integrating them into one of the bloated libraries attached to Gnome and QT, just to make things easier for the big desktop environments, which I find philosophically objectionable … in the words of Doug McIlroy himself, “This is the Unix philosophy: Write programs that do one thing and do it well. Write programs to work together.”

    There is a ragier condemation of it here that fails to bring in the UNIX philosophy argument, and an obnoxious but partly correct rebuttal from someone involved here if you would like to peruse the politics.

  • This entry was posted in Computers, DIY, General and tagged , . Bookmark the permalink.

    4 Responses to Udisks2 and UNIX Philosophy

    1. Pingback: Linux Future | PAPPP's Rambling

    2. Simon says:

      A somewhat late response, but I saw this thread linked from your most recent one on systemd and “Linux future”. The thing I wanted to point out was that, though you criticise the distros for not adhering to the FHS, the problem is that the FHS is effectively dead, and the de-facto standard is now whatever the majority of big distros are doing.

      And the reason for that isn’t that the distros are simply ignoring the standard – it’s that the standard isn’t really maintained. If (e.g) Fedora devs want to make a change (such as the recent introduction of /run), they’ve given up on trying to get things incorporated into the standard. Instead, they just have a talk to their peers from Suse, Debian, Ubuntu, et al, and try to get a consensus on changing the de-facto standard, i.e what everyone else does.

    3. Ivan says:

      Well, UNIX philosophy does not apply here.

      If you want pipes and plain text, go for it — you still have your /etc/fstab(5) and mount(8), as well as sudo(8) if we talk about PolicyKit.

      These new things were designed for a different purpose: to scale and with multi-seat configurations in mind. Here, the good old console is no more than a “recovery mode”, while all main interoperation takes place e. g. in D-Bus. This is just faster and more uniform than spawning a process per each atomic action.

      And yes, FHS is outdated.

    4. Pingback: How to restore mounting in /media, not /run/media ? - Page 3

    Leave a Reply to Ivan Cancel reply

    Your email address will not be published. Required fields are marked *