You are not logged in.

#1 2014-08-04 11:09:43

aditya3098
Member
From: In front of the computer
Registered: 2014-05-01
Posts: 53
Website

Alternative to systemd

Can anyone tell me how I can use minirc or openrc? Specifically, how do I move all my systemd scripts from systemd to the new init system? Is there any lightweight alternative compatible with systemd scripts?

Offline

#2 2014-08-04 11:45:43

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,550
Website

Re: Alternative to systemd

Have you done any searching?

https://wiki.archlinux.org/index.php/Openrc

https://bbs.archlinux.org/viewtopic.php?id=176854

As for using systemd services, that's highly unlikely (i.e. impossible without some dedicated script/program to translating them into a different form).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#3 2014-08-04 11:45:49

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Alternative to systemd

What have you studied so far? Have you read the Wiki page on the subject?

What are you looking for in a systemd alternative that would make it "lightweight"?

Offline

#4 2014-08-04 14:39:02

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Alternative to systemd

Is there any lightweight alternative compatible with systemd scripts?

This doesn't make any sense. systemd doesn't use "scripts." Its unit files use its own .ini-style syntax, and systemd has its own dedicated text parser that interprets the contents of those unit files. This is actually one of the key philosophical gripes people have with systemd, and one thing that makes interacting with it different from interacting with other init systems. If you have a bunch of custom systemd units, you'd need to rewrite them all in some sh-compatible scripting language in order for another init system to make use of them.

The shortest answer I've got is that the most lightweight alternative essentially requires writing your own init scripts, unique to your setup, from scratch.

Offline

#5 2014-08-04 14:45:54

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,550
Website

Re: Alternative to systemd

ANOKNUSA wrote:

unit files use its own .ini-style syntax ... This is actually one of the key philosophical gripes people have with systemd

This also confused me.  I admit to being very reluctant in accepting systemd - but the "proof is in the pudding": it really is faster than the alternatives (at least those that I've tried).  The alternatives often boast a smaller/simpler code base, and almost always reject systemd for some of these philosophical differences - but none of the alternatives seem to claim to be faster.

So if you want fast and currently well supported - use systemd.  If you want to maintain a certain philosophy which is incompatible with systemd (a view with which I could identify) they you definitely shouldn't want to use systemd's service files.

So this circle's round to the question of what you mean by 'lightweight' as the only option left would be to mean small amount of code.


EDIT: also, how much compatibility with systemd service files would you need?  For 100% compatibility, you need systemd.  If you just want to extract the Exec* lines and run them as backgrounded processes, that would be trivially easy in any init system.  If you want to do that and honor Before/After/Requires/etc you'd need to add more code and more processing with which you'd basically be reinventing systemd, just not likely doing it as well as the original.

Last edited by Trilby (2014-08-04 14:51:16)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#6 2014-08-04 14:57:19

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Alternative to systemd

Sorry for OT, but I'm very curious. I've read a fair bit of criticism of systemd, but I don't remember the service files being an issue. I can't find anything through google either. Any links?


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#7 2014-08-04 15:18:19

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Alternative to systemd

alphaniner wrote:

Sorry for OT, but I'm very curious. I've read a fair bit of criticism of systemd, but I don't remember the service files being an issue. I can't find anything through google either. Any links?

I'll concede that I can't give you any link to someone making that precise statement about unit files, since it's an inference I've drawn after watching people rant about it for two years.The philosophical difference (I stress philosophical, not technical) is that systemd units sit at a higher level of abstraction than bourne-shell scripts, requiring their own interpreter built into the init system, and so systemd is perceived as a) more complex, and b) potentially less redunant/harder to troubleshoot. Ignoring systemd's implementation of system logs and cron, it's that abstraction that makes people say systemd as an init system is "more complex." Init systems such as runit and minirc are just a bunch of shell scripts. Neither method may be technically superior, but I can definitely see the appeal in using sinit and some shell scripts to write an init system consisting only of what my system needs to get up and running.

Offline

#8 2014-08-04 15:38:20

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Alternative to systemd

I'm not sure I understand where the perceived complexity arises from, is it about systemd's managing dependencies?
Instead of dropping a script to a directory or adding a line to your crontab, you first create a timer and an associated service. Tthis part is an analog to adding a line to your crontab. If instead of a oneliner, a longer script needs to be run, you call if from the service file instead of it being run by crond.

Offline

#9 2014-08-04 15:52:04

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,550
Website

Re: Alternative to systemd

Similar to ANOKNUSA, I cannot cite specific gripes about service files, but rather it is an inference as follows: some concerns with systemd is that it tried to do "too much": it depends on / includes udev, dbus, and other components.  Because of this complexity, service files can include bits that rely on that complexity.

Hence my point about supporting systemd's service files in another init system.  Just executing the Exec* lines would be trivially easy.  But to support everything a service file was capable of specifying (eg dbus interfaces) then the init system that was parsing those service files would have to be as complex and all-encompassing as systemd.

So the service files themselves may never have been the concern - but supporting them requires all the features that did lead to the concerns.

Anyhow - wondering why we were puzzled over wanting to support service files was a relevant question, but lets not let this derail in to pro-con systemd.  Hopefuly the OP can clarify their needs / goals so we can keep this moving in a productive direciton.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#10 2014-08-04 16:23:32

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

Re: Alternative to systemd

I would actually welcome a lightweight init system that retains compatibility with the unit files. It would be like systemd but without the device manager, network manager, tmpfile manager, journal manager, etc.

The closest thing to a rant about the unit files IMO comes from the 2012 flamewar. It basically claims that shell scripts make it easier to mount filesystems.

More on topic, the author of that post ended up writing his own init system called finit that supports cgroups and socket activation. No one has packaged it for the AUR yet, but I'd expect it to work just as well as openrc, runit and initscripts-fork.


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

#11 2014-08-04 23:21:58

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,413
Website

Re: Alternative to systemd

Well, I can't guarantee on retaining compatibility, but watchman (service manager, usually combined with sinit and spark-rc) has service files similiar in syntax to systemd (as in, they're declarative, and support both user and system services).

IOW, it shouldn't be hard to adapt your existing services (and there's many examples in watchman-sm-services-git). It also supports parallel start, so I've found it as fast as systemd (both 21s from grub on a basic i3 install).

https://fleshless.org/pages/spark.html

If you want even faster, you can replace systemd-udev with smdev. But that's a considerable effort (though non-invasive).

Last edited by Alad (2014-08-04 23:37:44)


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#12 2014-08-05 03:51:33

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Alternative to systemd

Thanks for the info Alad, I hadn't heard of that project yet. I'm intrigued now.

Offline

#13 2014-08-10 10:55:12

aditya3098
Member
From: In front of the computer
Registered: 2014-05-01
Posts: 53
Website

Re: Alternative to systemd

i tried out spark, but i ran into two bugs:
1) My network das dhcp, however, it doesnt autoconnect for some reason. I had used the default systemd unit file on the wiki page.
when I try that on spark, it says rtnetlink answers: network is unreachable
2) Xorg complains about some missing udev.so.0

Offline

#14 2014-08-10 10:55:12

aditya3098
Member
From: In front of the computer
Registered: 2014-05-01
Posts: 53
Website

Re: Alternative to systemd

i tried out spark, but i ran into two bugs:
1) My network das dhcp, however, it doesnt autoconnect for some reason. I had used the default systemd unit file on the wiki page.
when I try that on spark, it says rtnetlink answers: network is unreachable
2) Xorg complains about some missing udev.so.0

Offline

#15 2014-08-10 11:07:36

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,413
Website

Re: Alternative to systemd

1) Can you please post your /etc/rc.conf and /etc/watchman/init.d/dhcpcd

2) Did you remove systemd? If you did, did you add eudev, libsystemd-standalone and systemd-shim?


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#16 2014-08-10 11:36:18

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Alternative to systemd

aditya3098 wrote:

network is unreachable

Well, google it - example

Offline

#17 2014-08-10 22:58:03

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: Alternative to systemd

Recompile systemd and disable components you don't want. It's actually extremely modular. Personally, I use the following ./configure flags:

  ./configure \
      --libexecdir=/usr/lib \
      --localstatedir=/var \
      --sysconfdir=/etc \
      --enable-introspection \
      --enable-gtk-doc \
      --enable-compat-libs \
      --disable-audit \
      --disable-ima \
      --disable-chkconfig \
      --disable-selinux \
      --disable-apparmor \
      --disable-smack \
      --disable-qrencode \
      --disable-microhttpd \
      --disable-bootchart \
      --disable-quotacheck \
      --disable-resolved \
      --disable-efi \
      --disable-networkd \
      --disable-kdbus \
      --disable-sysusers \
      --with-sysvinit-path= \
      --with-sysvrcnd-path= \
      --with-firmware-path="/usr/lib/firmware/updates:/usr/lib/firmware"

Last edited by Stebalien (2014-08-10 23:01:39)


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

Board footer

Powered by FluxBB