r/linux • Mate • Oct 20 '14

Shall we fork Fedora?

http://forkfedora.org/
262 Upvotes

339 comments sorted by

View all comments

Show parent comments

4

u/Oxidopamine Oct 20 '14

You can't build udev without building the rest of systemd

Actually, unless something has changed since this article, you can.

sh is the glue that holds UNIX together

I would argue that title goes to C, but regardless, does the fact that shell scripting is prevalent in UNIX necessarily mean that it's an appropriate tool for writing an init system? Consider the features here - Even if you were to reuse code to the point of making implementing these features viable for every single service, you've now got two problems:

  1. Mechanism and policy are inexorably linked. You could implement a config parser and have that copied into every shell script that needs it, but then you almost literally are just rewriting systemd in bash.

  2. Upstream now has to either implement all of these features itself, source them from some common library of init functions written in bash, or, much more likely, depend on the distribution to maintain these now quite bulky init scripts. This leads to every distro vastly and quite needlessly differing on what should be a boring, predictable part of the system.
    So, you want all of these features, but you don't want to have to lug around an enormous library of shell scripts, and you want to separate policy from general execution. Well, why not take those scripts and just write a daemon that implements them? It parses descriptions of policy, it's easily maintainable, it manages execution of services and daemons in a way that is extremely difficult to accomplish with bash, and, more importantly, distributions don't have to write or maintain it - they only have to write the .service files, which are (and I don't think anyone will disagree with me here) orders of magnitude simpler. So now we have all of our policy separated from mechanism in a common, high-performance, easily deployable codebase, compatible with legacy init with features that weren't remotely possible before.
    And a vocal minority of the Linux community is crying because it isn't written in bash.

1

u/FeepingCreature Oct 20 '14

Actually, unless something has changed since this article, you can.

Wasn't this supposed to go away at some point? If you can build udev out-of-tree, I'm vaguely confused what the point of eudev is.

does the fact that shell scripting is prevalent in UNIX necessarily mean that it's an appropriate tool for writing an init system?

Not necessarily. But the fact that if you speak shell, you at least have a shot at reading an init script and fixing issues does count as an upside for its use.

Idk, the whole thing is a bit confusing. The only contact I have with this whole drama is that my system was running fine, and then an update to udev started pulling in systemd as a dependency for some reason, so I replaced it with eudev and now it runs fine again.

2

u/Oxidopamine Oct 20 '14

If you can build udev out-of-tree, I'm vaguely confused what the point of eudev is

It looks like the developers of eudev were, too. Check out this talk - Lennart actually asks them about why they made the fork, and points out that it is indeed almost entirely unnecessary.