From 81ed05f85e7cc98389d055b7529685b3e59f3502 Mon Sep 17 00:00:00 2001 From: DJ Lucas Date: Sun, 24 Sep 2017 07:04:44 +0000 Subject: [PATCH] Use upstream systemd tarball with meson build system and supply only prebuilt man pages. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11306 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter01/changelog.xml | 10 +++ chapter03/packages.xml | 18 +++-- chapter06/createfiles.xml | 2 +- chapter06/systemd.xml | 159 +++++++++++++++++++------------------- general.ent | 6 +- packages.ent | 17 ++-- 6 files changed, 116 insertions(+), 96 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 4c8941aea..5947ac1ef 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -42,6 +42,16 @@ or as appropriate for the entry or if needed the entire day's listitem. --> + + 2017-09-24 + + + [dj] - Use upstream systemd tarball with meson build system and + supply only prebuilt man pages. + + + + 2017-09-23 diff --git a/chapter03/packages.xml b/chapter03/packages.xml index d2674a40b..82514dcdd 100644 --- a/chapter03/packages.xml +++ b/chapter03/packages.xml @@ -634,19 +634,25 @@ Home page: Download: MD5 sum: &systemd-md5; + + + + + Systemd Man Pages(&systemd-version;) - &systemd-man-size;: + + Home page: + Download: + MD5 sum: &systemd-man-md5; The Linux From Scratch systemd team generates its own tarball - of the systemd source. This is done in order to generate the manual - pages and documentation, as well as prevent unnecessary files from - the systemd git repo from being installed - on the system. Please use the version generated by the Linux From - Scratch team. + of the man pages using the systemd source. This is done in order to + avoid unnecessary dependencies. - + Sysvinit (&sysvinit-version;) - &sysvinit-size;: diff --git a/chapter06/createfiles.xml b/chapter06/createfiles.xml index 5df57ef2a..fbe70a96b 100644 --- a/chapter06/createfiles.xml +++ b/chapter06/createfiles.xml @@ -47,7 +47,7 @@ sed 's/tools/usr/' /tools/lib/libstdc++.la > /usr/lib/libstdc++.la ln -sv bash /bin/sh ln -sv /tools/bin/{bash,cat,dd,echo,ln,pwd,rm,stty} /bin -ln -sv /tools/bin/{install,perl} /usr/bin +ln -sv /tools/bin/{env,install,perl} /usr/bin ln -sv /tools/lib/libgcc_s.so{,.1} /usr/lib ln -sv /tools/lib/libstdc++.{a,so{,.6}} /usr/lib sed 's/tools/usr/' /tools/lib/libstdc++.la > /usr/lib/libstdc++.la diff --git a/chapter06/systemd.xml b/chapter06/systemd.xml index e1b9c0b2d..9b132921c 100644 --- a/chapter06/systemd.xml +++ b/chapter06/systemd.xml @@ -40,88 +40,58 @@ Installation of systemd - Create a file to allow systemd to build when using Util-Linux - built in Chapter 5, to disable LTO by default, and to build without - xlstproc: + Create a symlink to work around missing xsltproc: -cat > config.cache << "EOF" -KILL=/bin/kill -MOUNT_PATH=/bin/mount -UMOUNT_PATH=/bin/umount -HAVE_BLKID=1 -BLKID_LIBS="-lblkid" -BLKID_CFLAGS="-I/tools/include/blkid" -HAVE_LIBMOUNT=1 -MOUNT_LIBS="-lmount" -MOUNT_CFLAGS="-I/tools/include/libmount" -cc_cv_CFLAGS__flto=no -SULOGIN="/sbin/sulogin" -GPERF_LEN_TYPE=size_t -XSLTPROC="/usr/bin/xsltproc" -EOF - - LTO is disabled by default because it causes - systemd and other auxiliary programs to link to - libgcc_s.so, slows the build down - and makes the compiled code larger. +ln -s /tools/bin/true /usr/bin/xsltproc Prepare systemd for compilation: -./configure --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --config-cache \ - --with-rootprefix= \ - --with-rootlibdir=/lib \ - --enable-split-usr \ - --disable-firstboot \ - --disable-ldconfig \ - --disable-sysusers \ - --without-python \ - --with-default-dnssec=no \ - --docdir=/usr/share/doc/systemd-&systemd-version; +PKG_CONFIG_PATH=/usr/lib/pkgconfig:/tools/lib/pkgconfig \ +LANG=en_US.UTF-8 \ + meson --prefix /usr \ + --sysconfdir /etc \ + --localstatedir /var \ + -Dblkid=true \ + -Dbuildtype=release \ + -Ddefault-dnssec=no \ + -Dfirstboot=false \ + -Dkill-path=/bin/kill \ + -Dkmod-path=/bin/kmod \ + -Dldconfig=false \ + -Dmount-path=/bin/mount \ + -Drootprefix= \ + -Drootlibdir=/lib \ + -Dsplit-usr=true \ + -Dsulogin-path=/sbin/sulogin \ + -Dsysusers=false \ + -Dumount-path=/bin/umount \ + -Db_lto=false \ + -Dc_link_args="-lblkid -lmount" \ + -Dc_args="-I/tools/include/blkid -I/tools/include/libmount" \ + $PWD build - The meaning of the configure options: + The meaning of the meson options: - --config-cache + -D*-path=* - This switch tells the build system to use - the config.cache file which - was created earlier. + These switches provide location of binaries needed by + systemd at runtime that have not yet been installed, or who's + pkgconfig files are currently only in + /tools/lib/pkgconfig. - --with-root* + -Ddefault-dnssec=no - These switches ensure that core programs and - shared libraries are installed in the subdirectories - of the root partition. + This switch turns off the experimental DNSSEC support. - --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. - - - - - --without-python - - This switch prevents configure - from trying to use Python which isn't built - in LFS. - - - - - --disable-firstboot + -Dfirstboot=false This switch prevents installation of systemd services responsible for setting up the system for @@ -131,7 +101,7 @@ EOF - --disable-ldconfig + -Dldconfig=no This switch prevents installation of a systemd unit that runs ldconfig at @@ -142,7 +112,25 @@ EOF - --disable-sysusers + -Droot* + + These switches ensure that core programs and + shared libraries are installed in the subdirectories + of the root partition. + + + + + -Dsplit-usr=true + + This switch ensures that systemd will work on + systems where /bin, /lib and /sbin directories are not + symlinks to their /usr counterparts. + + + + + -Dsysusers=false This switch prevents installation of systemd services responsible for setting up the @@ -153,9 +141,21 @@ EOF - --with-default-dnssec=no + -Dc_link_args="-lblkid -lmount" - This switch turns off the experimental DNSSEC support. + This switch manually adds libblkid and libmount to the + linker flags as they only exist in /tools/lib + until Util-Linux is installed later in + this chapter. + + + + + -Dc_args="-I/tools/include/blkid -I/tools/include/libmount" + + This switch manually adds the include paths for libblkid and + libmount to the CFLAGS variable as the packages are not yet installed + in the final system. @@ -163,20 +163,17 @@ EOF Compile the package: -make - - This package has a test suite, but it can only be run after the - package has been reinstalled in BLFS. +tar -xf ../systemd-man-pages-&systemd-version;.tar.xz +cd build +LANG=en_US.UTF-8 ninja + Install the package: -make install - - +LANG=en_US.UTF-8 ninja install Remove an unnecessary directory: @@ -190,6 +187,10 @@ EOF done ln -sfv ../lib/systemd/systemd /sbin/init + Remove our earlier created symlink for xsltproc: + +rm -f /usr/bin/xsltproc + Create the /etc/machine-id file needed by systemd-journald: diff --git a/general.ent b/general.ent index b072e20b6..bb626279e 100644 --- a/general.ent +++ b/general.ent @@ -1,13 +1,13 @@ - + - + - + diff --git a/packages.ent b/packages.ent index 3ce8c242b..79e1737ed 100644 --- a/packages.ent +++ b/packages.ent @@ -593,13 +593,16 @@ - - - - - - - + + + + + + + + + +