From d7a942197e713339d4dc1eedab4dafd4179a5cd8 Mon Sep 17 00:00:00 2001 From: "Douglas R. Reno" Date: Tue, 11 May 2021 23:24:11 -0500 Subject: Merge Xi's changes into trunk Update to meson-0.58.0 Update to systemd-248 Update to gcc-11.1.0 Update to linux-5.12.1 Update to iproute2-5.12.0 Update to Python-3.9.5 Make /bin, /sbin, and /lib symlinks to their counterparts in /usr. Thanks again for a significant portion of this work goes to Xi, I only really merged it and made a couple of modifications for my updates. To LFS 11.x we go! --- chapter08/acl.xml | 17 +-------- chapter08/adjusting.xml | 4 +- chapter08/attr.xml | 16 +------- chapter08/bash.xml | 6 +-- chapter08/bzip2.xml | 16 ++++---- chapter08/coreutils.xml | 14 +------ chapter08/dbus.xml | 8 ---- chapter08/e2fsprogs.xml | 17 --------- chapter08/eudev.xml | 14 ++----- chapter08/file.xml | 10 ----- chapter08/findutils.xml | 14 ------- chapter08/gcc.xml | 7 +++- chapter08/glibc.xml | 10 +++-- chapter08/grep.xml | 2 +- chapter08/gzip.xml | 4 -- chapter08/inetutils.xml | 6 +-- chapter08/kmod.xml | 10 ----- chapter08/libcap.xml | 16 ++++---- chapter08/libelf.xml | 5 +-- chapter08/man-db.xml | 13 +------ chapter08/ncurses.xml | 11 ------ chapter08/procps.xml | 10 ----- chapter08/psmisc.xml | 6 --- chapter08/readline.xml | 7 ---- chapter08/revisedchroot.xml | 2 +- chapter08/sed.xml | 2 +- chapter08/shadow.xml | 26 +++++++------ chapter08/strippingagain.xml | 19 +++------ chapter08/systemd.xml | 91 ++++++++++++++++++++++---------------------- chapter08/tar.xml | 3 +- chapter08/util-linux.xml | 2 + chapter08/xz.xml | 8 +--- chapter08/zlib.xml | 8 ---- chapter08/zstd.xml | 10 +---- 34 files changed, 116 insertions(+), 298 deletions(-) (limited to 'chapter08') diff --git a/chapter08/acl.xml b/chapter08/acl.xml index a71f964cb..48bf73a75 100644 --- a/chapter08/acl.xml +++ b/chapter08/acl.xml @@ -44,15 +44,8 @@ Prepare Acl for compilation: -./configure --prefix=/usr \ - --bindir=/bin \ +./configure --prefix=/usr \ --disable-static \ - --libexecdir=/usr/lib \ - --docdir=/usr/share/doc/acl-&acl-version; - -./configure --prefix=/usr \ - --disable-static \ - --libexecdir=/usr/lib \ --docdir=/usr/share/doc/acl-&acl-version; Compile the package: @@ -69,14 +62,6 @@ make install - The shared library needs to be moved to - /lib, and as a result the - .so file in - /usr/lib will need to be recreated: - -mv -v /usr/lib/libacl.so.* /lib -ln -sfv ../../lib/$(readlink /usr/lib/libacl.so) /usr/lib/libacl.so - diff --git a/chapter08/adjusting.xml b/chapter08/adjusting.xml index 4bd8a85cc..7d01dcfb6 100644 --- a/chapter08/adjusting.xml +++ b/chapter08/adjusting.xml @@ -102,7 +102,7 @@ SEARCH_DIR("/lib") The output of the last command should be: -attempt to open /lib/libc.so.6 succeeded +attempt to open /usr/lib/libc.so.6 succeeded Make sure GCC is using the correct dynamic linker: @@ -111,7 +111,7 @@ SEARCH_DIR("/lib") The output of the last command should be (allowing for platform-specific differences in dynamic linker name): -found ld-linux-x86-64.so.2 at /lib/ld-linux-x86-64.so.2 +found ld-linux-x86-64.so.2 at /usr/lib/ld-linux-x86-64.so.2 If the output does not appear as shown above or is not received at all, then something is seriously wrong. Investigate and retrace the diff --git a/chapter08/attr.xml b/chapter08/attr.xml index 526852b6d..122781f27 100644 --- a/chapter08/attr.xml +++ b/chapter08/attr.xml @@ -43,13 +43,7 @@ Prepare Attr for compilation: -./configure --prefix=/usr \ - --bindir=/bin \ - --disable-static \ - --sysconfdir=/etc \ - --docdir=/usr/share/doc/attr-&attr-version; - -./configure --prefix=/usr \ +./configure --prefix=/usr \ --disable-static \ --sysconfdir=/etc \ --docdir=/usr/share/doc/attr-&attr-version; @@ -68,14 +62,6 @@ make install - The shared library needs to be moved to - /lib, and as a result the - .so file in - /usr/lib will need to be recreated: - -mv -v /usr/lib/libattr.so.* /lib -ln -sfv ../../lib/$(readlink /usr/lib/libattr.so) /usr/lib/libattr.so - diff --git a/chapter08/bash.xml b/chapter08/bash.xml index 4ab6f7d81..e4960efcc 100644 --- a/chapter08/bash.xml +++ b/chapter08/bash.xml @@ -84,11 +84,9 @@ PATH=$PATH make tests < $(tty) EOF - Install the package and move the main executable to - /bin: + Install the package: -make install -mv -vf /usr/bin/bash /bin +make install Run the newly compiled bash program (replacing the one that is currently being executed): diff --git a/chapter08/bzip2.xml b/chapter08/bzip2.xml index c842e5cd9..d3b7d42c4 100644 --- a/chapter08/bzip2.xml +++ b/chapter08/bzip2.xml @@ -84,16 +84,14 @@ make clean make PREFIX=/usr install + Install the shared library: +cp -av libbz2.so.* /usr/lib +ln -sv libbz2.so.&bzip2-version; /usr/lib/libbz2.so + Install the shared bzip2 binary into the - /bin directory, make - some necessary symbolic links, and clean up: - -cp -v bzip2-shared /bin/bzip2 -cp -av libbz2.so* /lib -ln -sv ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so -rm -v /usr/bin/{bunzip2,bzcat,bzip2} -ln -sv bzip2 /bin/bunzip2 -ln -sv bzip2 /bin/bzcat + /bin directory: + +cp -v bzip2-shared /bin/bzip2 Remove an useless static library: diff --git a/chapter08/coreutils.xml b/chapter08/coreutils.xml index 48572eef0..c5d2a5032 100644 --- a/chapter08/coreutils.xml +++ b/chapter08/coreutils.xml @@ -142,22 +142,10 @@ FORCE_UNSAFE_CONFIGURE=1 ./configure \ Move programs to the locations specified by the FHS: -mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /bin -mv -v /usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} /bin -mv -v /usr/bin/{rmdir,stty,sync,true,uname} /bin -mv -v /usr/bin/chroot /usr/sbin +mv -v /usr/bin/chroot /usr/sbin mv -v /usr/share/man/man1/chroot.1 /usr/share/man/man8/chroot.8 sed -i 's/"1"/"8"/' /usr/share/man/man8/chroot.8 - Some of the scripts in the LFS-Bootscripts package - depend on head, nice, - sleep, and touch. As /usr may not be available during the early and - late stages of booting, those binaries need to be on the root partition to - maintain FHS compliance: - -mv -v /usr/bin/{head,nice,sleep,touch} /bin - diff --git a/chapter08/dbus.xml b/chapter08/dbus.xml index 5f51900cc..94d348d2d 100644 --- a/chapter08/dbus.xml +++ b/chapter08/dbus.xml @@ -97,14 +97,6 @@ make install - The shared library needs to be moved to - /lib, and as a result the - .so file in - /usr/lib will need to be recreated: - -mv -v /usr/lib/libdbus-1.so.* /lib -ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so - Create a symlink so that D-Bus and systemd can use the same machine-id file: diff --git a/chapter08/e2fsprogs.xml b/chapter08/e2fsprogs.xml index 40544e782..d7ff53a82 100644 --- a/chapter08/e2fsprogs.xml +++ b/chapter08/e2fsprogs.xml @@ -53,8 +53,6 @@ cd build Prepare e2fsprogs for compilation: ../configure --prefix=/usr \ - --bindir=/bin \ - --with-root-prefix="" \ --enable-elf-shlibs \ --disable-libblkid \ --disable-libuuid \ @@ -64,21 +62,6 @@ cd build The meaning of the configure options: - - --with-root-prefix="" and - --bindir=/bin - - Certain programs (such as the e2fsck - program) are considered essential programs. When, for example, - /usr is not mounted, these - programs still need to be available. They belong in directories - like /lib and /sbin. If this option is not passed - to configure, the programs are installed into the - /usr directory. - - - --enable-elf-shlibs diff --git a/chapter08/eudev.xml b/chapter08/eudev.xml index 39c86ef1f..0dee78d68 100644 --- a/chapter08/eudev.xml +++ b/chapter08/eudev.xml @@ -53,13 +53,7 @@ Prepare Eudev for compilation: ./configure --prefix=/usr \ - --bindir=/sbin \ - --sbindir=/sbin \ - --libdir=/usr/lib \ --sysconfdir=/etc \ - --libexecdir=/lib \ - --with-rootprefix= \ - --with-rootlibdir=/lib \ --enable-manpages \ --disable-static @@ -70,7 +64,7 @@ Create some directories now that are needed for tests, but will also be used as a part of installation: -mkdir -pv /lib/udev/rules.d +mkdir -pv /usr/lib/udev/rules.d mkdir -pv /etc/udev/rules.d To test the results, issue: @@ -103,7 +97,7 @@ make -f &udev-lfs-version;/Makefile.lfs install Information about hardware devices is maintained in the /etc/udev/hwdb.d and - /lib/udev/hwdb.d directories. + /usr/lib/udev/hwdb.d directories. Eudev needs that information to be compiled into a binary database /etc/udev/hwdb.bin. Create the initial database: @@ -124,13 +118,13 @@ make -f &udev-lfs-version;/Makefile.lfs install Installed directories - udevadm and udevd libudev.so - /etc/udev, /lib/udev, and /usr/share/doc/udev-&udev-lfs-version; + /etc/udev, /usr/lib/udev, and /usr/share/doc/udev-&udev-lfs-version; diff --git a/chapter08/file.xml b/chapter08/file.xml index 326f99eeb..eb9f41a2b 100644 --- a/chapter08/file.xml +++ b/chapter08/file.xml @@ -57,16 +57,6 @@ make install - /bin/more from util-linux will link to - libmagic.so, so the shared - library should be moved to /lib, - and as a result the - .so file in - /usr/lib will need to be recreated: - -mv -v /usr/lib/libmagic.so.* /lib -ln -sfv ../../lib/$(readlink /usr/lib/libmagic.so) /usr/lib/libmagic.so - diff --git a/chapter08/findutils.xml b/chapter08/findutils.xml index f55e5cbb1..092be0c96 100644 --- a/chapter08/findutils.xml +++ b/chapter08/findutils.xml @@ -74,20 +74,6 @@ su tester -c "PATH=$PATH make check" make install - Some of the scripts in the LFS-Bootscripts package - depend on find. As /usr may not be available during the early - stages of booting, this program needs to be on the root partition. The - updatedb script also needs to be modified to correct an - explicit path: - - Some packages in BLFS and beyond expect the - find program in /bin, so make sure it's placed there: - -mv -v /usr/bin/find /bin -sed -i 's|find:=${BINDIR}|find:=/bin|' /usr/bin/updatedb - diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index 5090029a5..6b5163fce 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -124,9 +124,12 @@ su tester -c "PATH=$PATH make -k check" Six tests related to get_time are known to fail. These are apparently related to the en_HK locale. - Additionally the following tests related to the following files + Additionally, the test constexpr-52830 is known to fail. + + - - diff --git a/chapter08/strippingagain.xml b/chapter08/strippingagain.xml index 891d2e000..8f5743b51 100644 --- a/chapter08/strippingagain.xml +++ b/chapter08/strippingagain.xml @@ -33,17 +33,8 @@ -save_lib="ld-&glibc-version;.so libc-&glibc-version;.so libpthread-&glibc-version;.so libthread_db-&libthread_db-version;.so" - -cd /lib - -for LIB in $save_lib; do - objcopy --only-keep-debug $LIB $LIB.dbg - strip --strip-unneeded $LIB - objcopy --add-gnu-debuglink=$LIB.dbg $LIB -done - -save_usrlib="libquadmath.so.&libquadmath-version; libstdc++.so.&libstdcpp-version; +save_usrlib="ld-&glibc-version;.so libc-&glibc-version;.so libpthread-&glibc-version;.so libthread_db-&libthread_db-version;.so + libquadmath.so.&libquadmath-version; libstdc++.so.&libstdcpp-version; libitm.so.&libitm-version; libatomic.so.&libatomic-version;" cd /usr/lib @@ -54,7 +45,7 @@ for LIB in $save_usrlib; do objcopy --add-gnu-debuglink=$LIB.dbg $LIB done -unset LIB save_lib save_usrlib +unset LIB save_usrlib - First, apply a patch to fix some regressions and fix functionality - with future versions of the kernel: + First, apply a patch to fix some build issues: -patch -Np1 -i ../systemd-&systemd-version;-upstream_fixes-3.patch +patch -Np1 -i ../systemd-&systemd-version;-upstream_fixes-1.patch Remove tests that cannot be built in chroot: -sed '181,$ d' -i src/resolve/meson.build +sed '177,$ d' -i src/resolve/meson.build Remove an unneeded group, render, from the default udev @@ -76,15 +75,8 @@ meson --prefix=/usr \ -Ddefault-dnssec=no \ -Dfirstboot=false \ -Dinstall-tests=false \ - -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 \ -Drpmmacrosdir=no \ -Dhomed=false \ @@ -97,14 +89,6 @@ meson --prefix=/usr \ The meaning of the meson options: - - -D*-path=* - - These switches provide the location of binaries needed by - systemd at runtime that have not yet been installed. - - - -Ddefault-dnssec=no @@ -139,24 +123,6 @@ meson --prefix=/usr \ - - -Droot* - - These switches ensure that core programs and - shared libraries are installed in 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 @@ -257,26 +223,27 @@ meson --prefix=/usr \ bootctl, busctl, coredumpctl, halt (symlink to systemctl), hostnamectl, init, journalctl, kernel-install, localectl, loginctl, - machinectl, networkctl, portablectl, poweroff (symlink to + machinectl, networkctl, oomctl, portablectl, poweroff (symlink to systemctl), reboot (symlink to systemctl), resolvconf (symlink to resolvectl), resolvectl, runlevel (symlink to systemctl), shutdown (symlink to systemctl), systemctl, systemd-analyze, systemd-ask-password, systemd-cat, systemd-cgls, systemd-cgtop, - systemd-delta, systemd-detect-virt, systemd-dissect, systemd-escape, - systemd-hwdb, systemd-id128, systemd-inhibit, systemd-machine-id-setup, + systemd-cryptenroll, systemd-delta, systemd-detect-virt, + systemd-dissect, systemd-escape, systemd-hwdb, systemd-id128, + systemd-inhibit, systemd-machine-id-setup, systemd-mount, systemd-notify, systemd-nspawn, systemd-path, systemd-repart, systemd-resolve (symlink to resolvectl), systemd-run, - systemd-socket-activate, systemd-stdio-bridge, systemd-tmpfiles, - systemd-tty-ask-password-agent, systemd-umount (symlink to - systemd-mount), telinit (symlink to systemctl), timedatectl, and - udevadm + systemd-socket-activate, systemd-stdio-bridge, systemd-sysext, + systemd-tmpfiles, systemd-tty-ask-password-agent, + systemd-umount (symlink to systemd-mount), + telinit (symlink to systemctl), timedatectl, and udevadm libnss_myhostname.so.2, libnss_mymachines.so.2, libnss_resolve.so.2, libnss_systemd.so.2, - libsystemd.so, libsystemd-shared-&systemd-version;.so (in /lib/systemd), + libsystemd.so, libsystemd-shared-&systemd-version;.so (in /usr/lib/systemd), and 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, + /etc/xdg/systemd, /usr/lib/systemd, /usr/lib/udev, /usr/include/systemd, /usr/lib/binfmt.d, /usr/lib/environment.d, /usr/lib/kernel, /usr/lib/modules-load.d, /usr/lib/sysctl.d, /usr/lib/systemd, /usr/lib/tmpfiles.d, @@ -423,6 +390,16 @@ meson --prefix=/usr \ + + oomctl + + Controls the systemd Out Of Memory daemon + + oomctl + + + + portablectl @@ -568,6 +545,17 @@ meson --prefix=/usr \ + + systemd-cryptenroll + + Is used to enroll or remove a system from full disk encryption, + as well as set and query private keys and recovery keys + + systemd-cryptenroll + + + + systemd-delta @@ -743,6 +731,17 @@ meson --prefix=/usr \ + + systemd-sysext + + Creates, deletes, and manages system extensions through the + systemd-sysextd daemon + + systemd-sysext + + + + systemd-tmpfiles diff --git a/chapter08/tar.xml b/chapter08/tar.xml index 6f37ce888..e638221c6 100644 --- a/chapter08/tar.xml +++ b/chapter08/tar.xml @@ -46,8 +46,7 @@ Prepare Tar for compilation: FORCE_UNSAFE_CONFIGURE=1 \ -./configure --prefix=/usr \ - --bindir=/bin +./configure --prefix=/usr The meaning of the configure option: diff --git a/chapter08/util-linux.xml b/chapter08/util-linux.xml index a7d3d61f4..310705c1a 100644 --- a/chapter08/util-linux.xml +++ b/chapter08/util-linux.xml @@ -45,6 +45,7 @@ Prepare Util-linux for compilation: ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ + --libdir=/usr/lib \ --docdir=/usr/share/doc/util-linux-&util-linux-version; \ --disable-chfn-chsh \ --disable-login \ @@ -60,6 +61,7 @@ runstatedir=/run ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ + --libdir=/usr/lib \ --docdir=/usr/share/doc/util-linux-&util-linux-version; \ --disable-chfn-chsh \ --disable-login \ diff --git a/chapter08/xz.xml b/chapter08/xz.xml index b8a9f9206..7f723482a 100644 --- a/chapter08/xz.xml +++ b/chapter08/xz.xml @@ -58,13 +58,9 @@ make check - Install the package and make sure that all essential files are in the - correct directory: + Install the package: -make install -mv -v /usr/bin/{lzma,unlzma,lzcat,xz,unxz,xzcat} /bin -mv -v /usr/lib/liblzma.so.* /lib -ln -svf ../../lib/$(readlink /usr/lib/liblzma.so) /usr/lib/liblzma.so +make install diff --git a/chapter08/zlib.xml b/chapter08/zlib.xml index f00988468..86b9ad16e 100644 --- a/chapter08/zlib.xml +++ b/chapter08/zlib.xml @@ -57,14 +57,6 @@ make install - The shared library needs to be moved to - /lib, and as a result the - .so file in - /usr/lib will need to be recreated: - -mv -v /usr/lib/libz.so.* /lib -ln -sfv ../../lib/$(readlink /usr/lib/libz.so) /usr/lib/libz.so - Remove an useless static library: rm -fv /usr/lib/libz.a diff --git a/chapter08/zstd.xml b/chapter08/zstd.xml index 0ec1a3c1b..8edf9ebad 100644 --- a/chapter08/zstd.xml +++ b/chapter08/zstd.xml @@ -54,14 +54,8 @@ make prefix=/usr install - Remove the static library and move the shared library to - /lib. Also, the - .so file in - /usr/lib will need to be recreated: - -rm -v /usr/lib/libzstd.a -mv -v /usr/lib/libzstd.so.* /lib -ln -sfv ../../lib/$(readlink /usr/lib/libzstd.so) /usr/lib/libzstd.so + Remove the static library: +rm -v /usr/lib/libzstd.a -- cgit v1.2.3-54-g00ecf