%general-entities; ]> Systemd-&systemd-version; Systemd <para>The systemd package is a system and service manager for Linux operating systems.</para> </sect2> <sect2 role="installation"> <title>Installation of Systemd Systemd 209 merged several libraries into libsystemd, but some packages that use systemd still expect those separate libraries. Apply a patch to allow backwards compatibility with these packages by installing Pkg-config files for the old libraries: patch -Np1 -i ../&systemd-compat-patch; Prevent the Makefile from trying to run setcap on systemd-detect-virt, which will fail if the kernel or file system does not support extended capabilities: sed -i '/virt-install-hook /d' Makefile.in The timesyncd.conf file contains a reference to a non-existent timesyncd.conf(5) man page. Remove that reference to avoid possible confusion: sed -i '/timesyncd.conf/d' src/timesync/timesyncd.conf.in By default, systemd-fsck will run /sbin/fsck with the option, which applies an flock on the file system being checked. This can conflict with an flock that systemd itself puts on the file system, which could result in problems booting. fsck will be fixed to avoid this problem in a future release of Util-linux, but for now we will work around the issue by simply preventing systemd-fsck from using : sed -i '/-l/d' src/fsck/fsck.c Prepare systemd for compilation: ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --libexecdir=/usr/lib \ --docdir=/usr/share/doc/systemd-&systemd-version; \ --with-rootprefix="" \ --with-rootlibdir=/lib \ --enable-split-usr \ --disable-gudev \ --with-kbd-loadkeys=/bin/loadkeys \ --with-kbd-setfont=/bin/setfont \ --with-dbuspolicydir=/etc/dbus-1/system.d \ --with-dbusinterfacedir=/usr/share/dbus-1/interfaces \ --with-dbussessionservicedir=/usr/share/dbus-1/services \ --with-dbussystemservicedir=/usr/share/dbus-1/system-services \ cc_cv_CFLAGS__flto=no The meaning of the configure options: --with-root* These switches ensure that core programs and shared libraries are installed in the subdirectories of the root partition. --enable-split-usr This switch ensures that systemd will work on systems where /bin, /lib and /sbin directories are not symlinks to their /usr counterparts. --disable-gudev This switch prevents systemd from building libgudev as it requires Glib, which is not installed in CLFS. --with-dbus* These switches ensure that D-Bus configuration files get installed to the correct locations. cc_cv_CFLAGS__flto=no This prevents the build system from using GCC's Link-time optimization (LTO), to ensure that systemd's binaries will not try to link to libgcc_s. Compile the package: make Prevent a broken test case from running: sed -e "s:test/udev-test.pl::g" \ -e "s:test-bus-cleanup\$(EXEEXT) ::g" \ -e "s:test-bus-gvariant\$(EXEEXT) ::g" \ -i Makefile To test the results, issue: make check Install the package: make install Install documentation files that are not installed by default: install -v -m644 man/*.html /usr/share/doc/systemd-&systemd-version; Move the nss_myhostname library to /lib: mv -v /usr/lib/libnss_myhostname.so.2 /lib Remove an unnecessary directory: rm -rfv /usr/lib/rpm Create symlinks for backwards-compatibility with Sysvinit: for tool in runlevel reboot shutdown poweroff halt telinit; do ln -sfv ../bin/systemctl /sbin/$tool done ln -sfv ../lib/systemd/systemd /sbin/init Modify a configuration file which references a group that doesn't exist: sed -i "s@root lock@root root@g" /usr/lib/tmpfiles.d/legacy.conf Configuring Systemd systemd configuring /etc/os-release Create /etc/machine-id which is needed by Journald: systemd-machine-id-setup Create a file to identify the operating system. systemd will use this file on boot to put information on the screen. cat > /etc/os-release << "EOF" # Begin /etc/os-release NAME=Cross-LFS ID=clfs PRETTY_NAME=Cross Linux From Scratch ANSI_COLOR=0;33 VERSION=&version; VERSION_ID=&versionid; # End /etc/os-release EOF Contents of Systemd Installed programs Installed libraries Installed directories bootctl, busctl, halt (link to systemctl), hostnamectl, init (link to systemd), journalctl, kernel-install, localectl, loginctl, machinectl, poweroff (link to systemctl), reboot (link to systemctl), runlevel (link to systemctl), shutdown (link to systemctl), systemctl, systemd, system-analyze, systemd-ask-password, systemd-cat, systemd-cgls, systemd-cgtop, systemd-coredumpctl, systemd-delta, systemd-detect-virt, systemd-inhibit, systemd-machine-id-setup, systemd-notify, systemd-nspawn, systemd-run, systemd-stdio-bridge (link to systemd-bus-proxyd), systemd-tmpfiles, systemd-tty-ask-password-agent, telinit (link to systemctl), timedatectl, udevadm libnss_myhostname.so, libsystemd.so, libudev.so /etc/binfmt.d, /etc/init.d, /etc/kernel, /etc/modules-load.d, /etc/sysctl.d, /etc/systemd, /etc/tmpfiles.d, /etc/udev, /etc/xdg/systemd, /lib/systemd, /lib/udev, /usr/include/systemd, /usr/lib/binfmt.d, /usr/lib/kernel, /usr/lib/modules-load.d, /usr/lib/sysctl.d, /usr/lib/systemd, /usr/share/doc-systemd-&systemd-version;, /usr/share/systemd, /usr/share/zsh, /var/lib/systemd Short Descriptions bootctl Controls the firmware and boot manager settings bootctl busctl Introspects and monitors the D-Bus bus busctl halt Halts, powers off, or reboots the machine halt hostnamectl Controls the system hostname hostnamectl init systemd system and service manager init journalctl Queries the systemd journal journalctl kernel-install Adds and removes kernel and initramfs images to and from /boot kernel-install localectl Controls the system locale and keyboard layout settings localectl loginctl Controls the systemd login manager loginctl machinectl Controls the systemd machine manager machinectl poweroff Halts, powers off, or reboots the machine poweroff reboot Halts, powers off, or reboots the machine reboot runlevel Prints previous and current SysV runlevel runlevel shutdown Halts, powers off, or reboots the machine shutdown systemctl Control the systemd system and service manager systemctl systemd System and service manager for Linux systemd systemd-analyze Analyzes system boot-up permformance systemd-analyze systemd-ask-password Queries the user for a system passphrase, via the TTY or an UI agent. systemd-ask-password systemd-cat Connects a pipeline or program's output with the journal systemd-cat systemd-cgls Recursively shows control group contents systemd-cgls systemd-cgtop Shows top control groups by resource usage systemd-cgtop systemd-coredumpctl Retrieves coredumps from the journal systemd-coredumpctl systemd-delta Finds overridden configuration files systemd-delta systemd-detect-virt Detects execution in a virtual environment systemd-detect-virt systemd-inhibit Executes a program with an inhibition lock taken systemd-inhibit systemd-machine-id-setup Initializes the machine ID in /etc/machine-id systemd-machine-id-setup systemd-notify Notifies init system about start-up completion and other daemon status changes systemd-notify systemd-nspawn Spawns a namespace container for debugging, testing, and building systemd-nspawn systemd-run Runs programs in transient scope or service units systemd-run systemd-stdio-bridge Connects stdio or a socket to a given bus address systemd-stdio-bridge systemd-tmpfiles Creates, deletes, and cleans up volatile and temporary files systemd-tmpfiles systemd-tty-ask-password-agent Process system password requests systemd-tty-ask-password-agent telinit Tells init which run-level to change to telinit timedatectl Controls the system time and date timedatectl udevadm Udev management tool udevadm libnss_myhostname Plugin for the GNU Name Service Switch (NSS) functionality of Glibc, provding hostname resolution for the locally configured system hostname libnss_myhostname libsystemd Support library for systemd libsystemd libudev A library interface to Udev device information. libudev