This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

Hard dependencies on systemd

From Gentoo Wiki (test)
Jump to:navigation Jump to:search

A systemd free system

Ideally packages should not depend on a specific init system, however a number do:

  • x11-wm/mutter (USE="wayland" emerge mutter) - Mutter's native (KMS) backend requires systemd-logind. Building the native backend is optional, and enabled by the configure script's --enable-native-backend option. This option is turned on when the wayland USE flag is set. Mutter 3.28.1 allows building the native backend with elogind as an alternative to systemd[2], but this version is not in Gentoo's repository yet. If or when more recent versions get added, >=x11-wm/mutter-3.28.1 should have elogind and systemd USE flags with a ?? ( elogind systemd ) REQUIRED_USE specification like e.g. the D-Bus ebuild, or at least specify a || ( sys-auth/elogind sys-apps/systemd ) dependency.
  • www-misc/profile-sync-daemon - This package provides a bash script, profile-sync-daemon, intended to be periodically executed with a resync argument, and a timer unit file and accompanying service unit files to implement that with systemd. The script is likely usable on Gentoo without systemd regardless, e.g. with explicit cron setup by the user, provided the XDG_RUNTIME_DIR environment variable is appropriately set as per the XDG Base Directory Specification[3]. The psd preview command also uses systemctl is-active to show the status of its supplied units as part of its output ("Systemd service is currently active", "Systemd resync service is currently active"), which is meaningless without systemd. Running the unmodified script would be ugly because of the shell's "command not found" error messages instead of the intended output, but otherwise nonfatal. Cosmetic patches could be applied to suppress that part of the output, and to fix other error messages that suggest systemd commands to the user in order to fix the situation that caused the error.
  • net-misc/netctl This package requires systemd. unit files only provided. makes use of unitfiles and systemctl to interact with the system
  • app-admin/abrt - This package includes three daemons, abrt_dump_journal_core, abrt_dump_journal_oops and abrt_dump_journal_xorg, that extract core dumps, oopses and Xorg crashes, respectively, logged in systemd's journal. These tools are useless on Gentoo without systemd. However, the package's build system builds them unconditionally, and because they access the journal using the sd-journal API of libsystemd, this results in a build failure if that library is not present. Assuming the rest of the package is still worth it without these programs, a possible workaround would be patching the build system to make it conditionally build the abrt_dump_journal_* daemons, based on a configure script option that a modified ebuild could turn on or off depending on the systemd USE flag state. The Gentoo ebuild installs OpenRC service scripts for other daemons though, in addition to upstream's service unit files.

References

  1. Olav Vitters, GNOME and logind+systemd thoughts, September 25th, 2013. Retrieved on July 18th, 2018.
  2. NEWS file for mutter-3.28.1 and the commit that introduced the feature.
  3. XDG Base Directory Specification, section "Environment variables". Retrieved on July 21st, 2018.
  4. Email announcing the new systemd requirement. Mon, 05 Sep 2016 14:40:47 +0200