The developers of the postmarketOS project, which is developing a Linux distribution for smartphones based on the Alpine Linux package base, the standard C library Musl, and a set of BusyBox utilities, announced the provision of support for the system manager systemd. As a result of work to implement systemd support, which lasted about a year, a prototype build has been prepared and is available for testing, in which systemd is used instead of the OpenRC initialization system.
Support for creating builds based on OpenRC will be maintained for at least as long as this system is used in Alpine Linux. When building postmarketOS images, the option to choose OpenRC in pmbootstrap remains. Among other things, OpenRC is planned to continue being used by developers of the graphical shell build Sxmo (Simple X Mobile), which is based on the Sway compositing manager.
Builds with systemd will continue to be formed on the Alpine Linux package base, despite the fact that this distribution does not support systemd and uses the Musl C library. Systemd officially supports only the Glibc C library, and postmarketOS developers have to use additional patches, which they plan to integrate into the main body of systemd over time (work is being done with systemd developers to simplify integration).
The reason for implementing support for systemd is cited as the complexity of maintaining the OpenRC-based initialization stack amidst the ever-growing dependencies of GNOME and KDE on systemd components. To ensure the functionality of GNOME and KDE tied to systemd, various wrappers had to be used, and the price of operating without systemd was the necessity of maintaining these wrappers in proper condition and synchronizing with the development of GNOME and KDE, in conditions where certain necessary functions were missing in the wrappers, as well as the unpredictability of their continued maintenance by developers.
For example, to maintain compatibility with the hostnamed, localed, and timedated services, the openrc-settingsd wrapper was used, the eudev package was employed instead of udev, elogind was used in place of logind, logbookd replaced journald, the superd package was used to provide functionality for ‘systemd --user’, and waked was used as a replacement for systemd.timer.

Among the layers used, proper support and the level of support for the necessary functionality are provided only in openrc-settingsd and eudev. The projects elogind, logbookd, and superd continue to be maintained but require enhancements, as they lack some necessary features, while waked has been without support for about a year. Additionally, the KDE Plasma Mobile developers would like to use the systemd-coredumpd service to simplify debugging, but its replacement, corecollector, has been unsupported since 2020.
Regarding the necessity of using these services, the D-Bus APIs provided by hostnamed, localed, and timedated are employed in GNOME to change locales, system settings, and time zones; udev is essential for managing connected devices; logind, 'systemd --user', and journald are involved in managing user sessions in gnome-session; systemd.timer is used in GNOME Clock.
Among the new features that can be implemented in builds based on systemd are granular privilege management, the engagement of enhanced capabilities for security and service dependency management, full integration with cgroups, the use of socket activation (for instance, CUPS can only be started upon accessing the network port), and the availability of built-in tools for analyzing the boot process.
Source: opennet.ru
