%general-entities; ]> $LastChangedBy$ $Date$ Systemd-&systemd-version; systemd Introduction to Systemd This part contains instructions on how to build systemd package with more features and why some features are required. Package Information It is important that you use the _same_ version of systemd as it was used in LFS build. Download (HTTP): Download (FTP): Download MD5 sum: &systemd-md5sum; Download size: &systemd-size; Estimated disk space required: &systemd-buildsize; Estimated build time: &systemd-time; Systemd Dependencies Required , , Optional Dependencies (see note below), and (to rebuild the documentation) Optional Runtime Dependencies and Having the first two packages at build time results in: libgudev-1.0.so in /usr/lib, /usr/include/gudev-1.0 directory, GUdev-1.0. {typelib,gir} GObject-Introspection bindings in /usr/lib/girepository-1.0 and /usr/share/gir-1.0 respectively. Since GLib2 has a dependency on Python, systemd Python bindings were also installed in: /usr/lib/python2.7/site-packages/systemd Having the Linux-PAM package at build time results in: pam_systemd.so in /lib/security, a PAM module used to register logins/logouts with systemd-logind component. This is required by anything that now requires ConsoleKit (desktops, mostly), as well as some other software. User Notes: Installation of systemd fix a build error when using Util-Linux built in LFS-Systemd sed -i "s:blkid/::" $(grep -rl "blkid/blkid.h") Apply a patch so that compat pkg-config files get installed without installing compat libs which are useless on LFS: patch -Np1 -i ../systemd-&systemd-version;-compat-1.patch Prepare systemd for compilation: ./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --with-rootprefix= \ --with-rootlibdir=/lib \ --enable-split-usr \ --docdir=/usr/share/doc/systemd-&systemd-version; 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. Compile the package: make First prevent few broken test cases from running: sed -e "s:test/udev-test.pl::g" -i Makefile To test the results, issue: make -k check For full test coverage, the test suite should be run from a system booted using systemd. Installing the package will override all systemd components installed in LFS, so it is advised that the re-installation is done in a rescue mode with no programs except basic systemd ones running. To enter rescue mode with systemd, issue this as the root from a VT console: systemctl start rescue.target Install the package as the root user: make install Move NSS myhostname library to/lib: mv -v /usr/lib/libnss_myhostname.so.2 /lib Remove an unnecessary directory: rm -rfv /usr/lib/rpm Remove a reference to a non-existent group: sed -i "s:0775 root lock:0755 root root:g" /usr/lib/tmpfiles.d/legacy.conf WARNING do NOT run the systemd-machine-id-setup command again, UUID was generated once and as its name says, it should be unique. Generating a new one might result in broken logs from journald and who knows what else. If libgcrypt was present at build time, make sure you move both libgpg-error and libgcrypt versioned libraries to /lib so that they are available in case of separate /usr by issuing the following commands as the root user: mv -v /usr/lib/libgcrypt.so.* /usr/lib/libgpg-error.so.* /lib ln -sfv ../../lib/$(readlink /usr/lib/libgcrypt.so) /usr/lib/libgcrypt.so ln -sfv ../../lib/$(readlink /usr/lib/libgpg-error.so) /usr/lib/libgpg-error.so If the pam_systemd.so PAM module was built, the system-sesion PAM file needs to be modified and a new file needs to be created in order for systemd-logind to work correctly. Create the configuration file by issuing the following commands as the root user: cat > /etc/pam.d/system-session << "EOF" # Begin Systemd addition session optional pam_loginuid.so session optional pam_systemd.so # End Systemd addition EOF && cat > /etc/pam.d/systemd-user << "EOF" # Begin /etc/pam.d/systemd-user account required pam_access.so account include system-account session required pam_env.so session required pam_limits.so session include system-session auth required pam_deny.so password required pam_deny.so # End /etc/pam.d/systemd-user EOF At this point it would be a nice idea to reboot, or rather restart the systemd components in case of new dependencies as the root user: systemctl daemon-reexec systemctl restart systemd-logind systemd-journald systemd-udevd Contents A list of the installed files, along with their short descriptions can be found at .