diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index 03330e3d0..fd43c1222 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,6 @@ +2021-01-13 Xi Ruoyao + * Use /run instead of deprecated /var/run + 2020-10-02 DJ Lucas * make $local_fs a Should-Stop dependency of swap to allow clean install diff --git a/bootscripts/lfs/init.d/cleanfs b/bootscripts/lfs/init.d/cleanfs index 2dee92967..bbca3ddf6 100644 --- a/bootscripts/lfs/init.d/cleanfs +++ b/bootscripts/lfs/init.d/cleanfs @@ -21,8 +21,8 @@ # Default-Start: S # Default-Stop: # Short-Description: Cleans temporary directories early in the boot process. -# Description: Cleans temporary directories /var/run, /var/lock, and -# optionally, /tmp. cleanfs also creates /var/run/utmp +# Description: Cleans temporary directories /run, /var/lock, and +# optionally, /tmp. cleanfs also creates /run/utmp # and any files defined in /etc/sysconfig/createfiles. # X-LFS-Provided-By: LFS ### END INIT INFO @@ -95,11 +95,11 @@ case "${1}" in find . -xdev -mindepth 1 ! -name lost+found -delete || failed=1 fi - > /var/run/utmp + > /run/utmp if grep -q '^utmp:' /etc/group ; then - chmod 664 /var/run/utmp - chgrp utmp /var/run/utmp + chmod 664 /run/utmp + chgrp utmp /run/utmp fi (exit ${failed}) diff --git a/bootscripts/lfs/init.d/rc b/bootscripts/lfs/init.d/rc index f27f5469c..2bc155ed4 100644 --- a/bootscripts/lfs/init.d/rc +++ b/bootscripts/lfs/init.d/rc @@ -142,7 +142,7 @@ fi [ "${interactive}" != "i" ] && interactive="" # Read the state file if it exists from runlevel S -[ -r /var/run/interactive ] && source /var/run/interactive +[ -r /run/interactive ] && source /run/interactive # Attempt to stop all services started by the previous runlevel, # and killed in this runlevel @@ -217,9 +217,9 @@ done # Store interactive variable on switch from runlevel S and remove if not if [ "${runlevel}" == "S" -a "${interactive}" == "i" ]; then - echo "interactive=\"i\"" > /var/run/interactive + echo "interactive=\"i\"" > /run/interactive else - rm -f /var/run/interactive 2> /dev/null + rm -f /run/interactive 2> /dev/null fi # Copy the boot log on initial boot only diff --git a/bootscripts/lfs/lib/services/init-functions b/bootscripts/lfs/lib/services/init-functions index 174657f1f..2e9b15b98 100644 --- a/bootscripts/lfs/lib/services/init-functions +++ b/bootscripts/lfs/lib/services/init-functions @@ -358,8 +358,8 @@ killproc() prefix=`echo "${program}" | sed 's/[^/]*$//'` progname=`echo "${program}" | sed "s@${prefix}@@"` - if [ -e "/var/run/${progname}.pid" ]; then - rm -f "/var/run/${progname}.pid" 2> /dev/null + if [ -e "/run/${progname}.pid" ]; then + rm -f "/run/${progname}.pid" 2> /dev/null fi else if [ -e "${pidfile}" ]; then rm -f "${pidfile}" 2> /dev/null; fi @@ -434,8 +434,8 @@ pidofproc() fi # If a PID file exists with that name, assume that is it. - if [ -e "/var/run/${progname}.pid" ]; then - pidfile="/var/run/${progname}.pid" + if [ -e "/run/${progname}.pid" ]; then + pidfile="/run/${progname}.pid" fi fi @@ -528,9 +528,9 @@ statusproc() /bin/echo -e "${INFO}${base} is running with Process" \ "ID(s) ${pidlist}.${NORMAL}" else - if [ -n "${base}" -a -e "/var/run/${base}.pid" ]; then + if [ -n "${base}" -a -e "/run/${base}.pid" ]; then /bin/echo -e "${WARNING}${1} is not running but" \ - "/var/run/${base}.pid exists.${NORMAL}" + "/run/${base}.pid exists.${NORMAL}" else if [ -n "${pidfile}" -a -e "${pidfile}" ]; then /bin/echo -e "${WARNING}${1} is not running" \ diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 274484cba..590106985 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -44,6 +44,102 @@ or as appropriate for the entry or if needed the entire day's listitem. --> + + + 2021-02-01 + + [bdubbs] - Update to vim-8.2.2433. Addresses + #4500. + + + [bdubbs] - Update to iana-etc-20210115. Addresses + #4722. + + + [bdubbs] - Update to bc-3.2.5. Fixes + #4797. + + + [bdubbs] - Update to e2fsprogs-1.46.0. Fixes + #4796. + + + [bdubbs] - Update to autoconf-2.71. Fixes + #4795. + + + [bdubbs] - Update to tzdata-2021a. Fixes + #4793. + + + [bdubbs] - Update to perl-5.32.1. Fixes + #4792. + + + [bdubbs] - Update to libcap-2.47. Fixes + #4791. + + + [bdubbs] - Update to bison-3.7.5. Fixes + #4790. + + + [bdubbs] - Update to binutils-2.36. Fixes + #4789. + + + [bdubbs] - Update to linux-5.10.12. Fixes + #4786. + + + + + + 2020-01-16 + + + [renodr] - Update to findutils-4.8.0. Fixes + #4785. + + + [renodr] - Update to kmod-28. Fixes + #4784. + + + [renodr] - Update to tar-1.33. Fixes + #4783. + + + [renodr] - Update to linux-5.10.7. Fixes + #4782. + + + [renodr] - Update to meson-0.56.2. Fixes + #4781. + + + [renodr] - Update to tcl-8.6.11. Fixes + #4780. + + + + + + 2021-01-13 + + + [xry111] - Fix util-linux uuidd socket path. + + + [xry111] - Remove various references to deprecated + /var/run, use /run instead. + + + [xry111] - Update to lfs-bootscripts-20210113. + + + + 2021-01-01 diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index 0c5583cfe..701b2e998 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -72,9 +72,9 @@ - + @@ -87,9 +87,9 @@ - + @@ -141,9 +141,9 @@ Kbd-&kbd-version; - + Less-&less-version; @@ -201,9 +201,9 @@ - + @@ -234,12 +234,12 @@ SysVinit-&sysvinit-version; - - + @@ -278,9 +278,9 @@ Added: - + systemd-247-upstream_fixes-1.patch diff --git a/chapter03/patches.xml b/chapter03/patches.xml index 71a5d6969..29e6cb127 100644 --- a/chapter03/patches.xml +++ b/chapter03/patches.xml @@ -84,6 +84,7 @@ + + diff --git a/chapter06/zlib.xml b/chapter06/zlib.xml index 75f22a0df..416531ca0 100644 --- a/chapter06/zlib.xml +++ b/chapter06/zlib.xml @@ -5,7 +5,7 @@ %general-entities; ]> - + @@ -49,20 +49,10 @@ make - To test the results, issue: - -make check - Install the package: - make DESTDIR=$LFS 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 $LFS/usr/lib/libz.so.* $LFS/lib +make DESTDIR=$LFS install +mv -v $LFS/usr/lib/libz.so.* $LFS/lib ln -sfv ../../lib/$(readlink $LFS/usr/lib/libz.so) $LFS/usr/lib/libz.so @@ -124,8 +114,9 @@ rm -rf DESTDIR - - <para>Details on this package are located in <xref linkend="contents-zlib" role="."/></para> + <title/> + <para>Details on this package are located in <xref linkend="contents-zlib" role="."/></para> + </sect2> </sect1> diff --git a/chapter07/createfiles.xml b/chapter07/createfiles.xml index c81ec9b1c..0cacb76cb 100644 --- a/chapter07/createfiles.xml +++ b/chapter07/createfiles.xml @@ -19,7 +19,7 @@ </indexterm> <indexterm zone="ch-tools-createfiles"> - <primary sortas="e-/var/run/utmp">/var/run/utmp</primary> + <primary sortas="e-/run/utmp">/run/utmp</primary> </indexterm> <indexterm zone="ch-tools-createfiles"> @@ -61,7 +61,8 @@ <literal>root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/dev/null:/bin/false daemon:x:6:6:Daemon User:/dev/null:/bin/false -messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false +messagebus:x:18:18:D-Bus Message Daemon User:/run/dbus:/bin/false +uuidd:x:80:80:UUID Generation Daemon User:/dev/null:/bin/false nobody:x:99:99:Unprivileged User:/dev/null:/bin/false</literal> EOF</userinput></screen> @@ -69,7 +70,7 @@ EOF</userinput></screen> <literal>root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/dev/null:/bin/false daemon:x:6:6:Daemon User:/dev/null:/bin/false -messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false +messagebus:x:18:18:D-Bus Message Daemon User:/run/dbus:/bin/false systemd-bus-proxy:x:72:72:systemd Bus Proxy:/:/bin/false systemd-journal-gateway:x:73:73:systemd Journal Gateway:/:/bin/false systemd-journal-remote:x:74:74:systemd Journal Remote:/:/bin/false @@ -78,6 +79,7 @@ systemd-network:x:76:76:systemd Network Management:/:/bin/false systemd-resolve:x:77:77:systemd Resolver:/:/bin/false systemd-timesync:x:78:78:systemd Time Synchronization:/:/bin/false systemd-coredump:x:79:79:systemd Core Dumper:/:/bin/false +uuidd:x:80:80:UUID Generation Daemon User:/dev/null:/bin/false nobody:x:99:99:Unprivileged User:/dev/null:/bin/false</literal> EOF</userinput></screen> @@ -109,6 +111,7 @@ messagebus:x:18: input:x:24: mail:x:34: kvm:x:61: +uuidd:x:80: wheel:x:97: nogroup:x:99: users:x:999:</literal> @@ -145,6 +148,7 @@ systemd-network:x:76: systemd-resolve:x:77: systemd-timesync:x:78: systemd-coredump:x:79: +uuidd:x:80: wheel:x:97: nogroup:x:99: users:x:999:</literal> diff --git a/chapter07/util-linux.xml b/chapter07/util-linux.xml index 5df23f37a..1851cc5fe 100644 --- a/chapter07/util-linux.xml +++ b/chapter07/util-linux.xml @@ -58,7 +58,8 @@ --disable-runuser \ --disable-pylibmount \ --disable-static \ - --without-python</userinput></screen> + --without-python \ + runstatedir=/run</userinput></screen> <variablelist> <title>The meaning of the configure options: @@ -90,6 +91,15 @@ + + runstatedir=/run + + This switch sets the location of the socket used by + uuidd and + libuuid correctly. + + + Compile the package: diff --git a/chapter08/bc.xml b/chapter08/bc.xml index a499937e3..b116fe10e 100644 --- a/chapter08/bc.xml +++ b/chapter08/bc.xml @@ -41,17 +41,21 @@ Installation of Bc + First, fix an error in the configure script:: + +sed -i '612d' configure.sh + Prepare Bc for compilation: -PREFIX=/usr CC=gcc CFLAGS="-std=c99" ./configure.sh -G -O3 +PREFIX=/usr CC=gcc ./configure.sh -G -O3 The meaning of the configure options: - CC=gcc CFLAGS="-std=c99" + CC=gcc" - These parameters specify the compiler and the C standard to use. + These parameters specify the compiler to use. diff --git a/chapter08/gdbm.xml b/chapter08/gdbm.xml index 4596c2fa7..4dff502d6 100644 --- a/chapter08/gdbm.xml +++ b/chapter08/gdbm.xml @@ -75,6 +75,10 @@ make check + + One test, VERSION, is known to fail. + + Install the package: make install diff --git a/chapter08/kmod.xml b/chapter08/kmod.xml index 27155e6ed..126521240 100644 --- a/chapter08/kmod.xml +++ b/chapter08/kmod.xml @@ -48,13 +48,14 @@ --sysconfdir=/etc \ --with-rootlibdir=/lib \ --with-xz \ + --with-zstd \ --with-zlib The meaning of the configure options: - --with-xz, --with-zlib + --with-xz, --with-zlib, --with-zstd These options enable Kmod to handle compressed kernel modules. diff --git a/chapter08/libcap.xml b/chapter08/libcap.xml index 73b21e950..221b95d8d 100644 --- a/chapter08/libcap.xml +++ b/chapter08/libcap.xml @@ -49,7 +49,7 @@ Compile the package: -make lib=lib +make prefix=/usr lib=lib The meaning of the make option: @@ -58,8 +58,8 @@ lib=lib This parameter sets the library directory to - /lib rather than - /lib64 on x86_64. It has no effect on + /usr/lib rather than + /usr/lib64 on x86_64. It has no effect on x86. @@ -69,13 +69,14 @@ make test - Install the package and do some cleanup: + Install the package and make sure the essential libraries are in + the correct directory: -make lib=lib PKGCONFIGDIR=/usr/lib/pkgconfig install +make prefix=/usr lib=lib install for libname in cap psx; do - chmod -v 755 /lib/lib${libname}.so.&libcap-version; - rm -v /lib/lib${libname}.so + mv -v /usr/lib/lib${libname}.so.* /lib ln -sfv ../../lib/lib${libname}.so.2 /usr/lib/lib${libname}.so + chmod -v 755 /lib/lib${libname}.so.&libcap-version; done diff --git a/chapter08/meson.xml b/chapter08/meson.xml index 4076c4c5c..cf23abf29 100644 --- a/chapter08/meson.xml +++ b/chapter08/meson.xml @@ -48,11 +48,12 @@ Installation of Meson + Compile Meson with the following command: python3 setup.py build diff --git a/chapter08/ninja.xml b/chapter08/ninja.xml index 20613c542..90f0fc9ce 100644 --- a/chapter08/ninja.xml +++ b/chapter08/ninja.xml @@ -58,11 +58,7 @@ Using the optional procedure below allows a user to limit the number of parallel processes via an environment variable, - NINJAJOBS. For example, setting: - - + NINJAJOBS. For example, setting: export NINJAJOBS=4 diff --git a/chapter08/python.xml b/chapter08/python.xml index 2bb272ebe..dde51f861 100644 --- a/chapter08/python.xml +++ b/chapter08/python.xml @@ -103,7 +103,7 @@ ln -sfv pip&python-minor; /usr/bin/pip3 The meaning of the install commands: - chmod -v 755 /usr/lib/libpython3.{8.,}so + chmod -v 755 /usr/lib/libpython{&python-minor;,3}.so Fix permissions for libraries to be consistent with other libraries. diff --git a/chapter08/readline.xml b/chapter08/readline.xml index 4077b23b4..a70382b4b 100644 --- a/chapter08/readline.xml +++ b/chapter08/readline.xml @@ -95,10 +95,9 @@ sed -i '/{OLDSUFF}/c:' support/shlib-install make SHLIB_LIBS="-lncursesw" install Now move the dynamic libraries to a more appropriate location - and fix up some permissions and symbolic links: + and fix up symbolic links: mv -v /usr/lib/lib{readline,history}.so.* /lib -chmod -v u+w /lib/lib{readline,history}.so.* ln -sfv ../../lib/$(readlink /usr/lib/libreadline.so) /usr/lib/libreadline.so ln -sfv ../../lib/$(readlink /usr/lib/libhistory.so ) /usr/lib/libhistory.so diff --git a/chapter08/revisedchroot.xml b/chapter08/revisedchroot.xml index 990e9f910..6a45a1f22 100644 --- a/chapter08/revisedchroot.xml +++ b/chapter08/revisedchroot.xml @@ -77,7 +77,7 @@ find &usr-lib-mx32; -name \*.la -delete find /usr -depth -name $(uname -m)-lfs-linux-gnu\* | xargs rm -rf The /tools directory can also - be removed to further gain some place: + be removed to further gain some space: rm -rf /tools diff --git a/chapter08/systemd.xml b/chapter08/systemd.xml index 118586079..e8dfdb0b4 100644 --- a/chapter08/systemd.xml +++ b/chapter08/systemd.xml @@ -66,7 +66,7 @@ render, from the default udev rules: -sed -i 's/GROUP="render", //' rules.d/50-udev-default.rules.in +sed -i 's/GROUP="render"/GROUP="video"/' rules.d/50-udev-default.rules.in Prepare systemd for compilation: @@ -599,7 +599,7 @@ rm -f /usr/bin/xsltproc runlevel Outputs the previous and the current run-level, as noted in the - last run-level record in /var/run/utmp + last run-level record in /run/utmp runlevel diff --git a/chapter08/sysvinit.xml b/chapter08/sysvinit.xml index 4a68cc37b..0a13f78e1 100644 --- a/chapter08/sysvinit.xml +++ b/chapter08/sysvinit.xml @@ -185,7 +185,7 @@ runlevel Reports the previous and the current run-level, as noted in the - last run-level record in /var/run/utmp + last run-level record in /run/utmp runlevel diff --git a/chapter08/tcl.xml b/chapter08/tcl.xml index 71ddf63b7..f9ad17937 100644 --- a/chapter08/tcl.xml +++ b/chapter08/tcl.xml @@ -3,8 +3,8 @@ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ %general-entities; - - + + ]> @@ -57,7 +57,7 @@ First, unpack the documentation by issuing the following command: -tar -xf ../tcl8.6.10-html.tar.gz --strip-components=1 +tar -xf ../tcl&tcl-version;-html.tar.gz --strip-components=1 Prepare Tcl for compilation: diff --git a/chapter08/util-linux.xml b/chapter08/util-linux.xml index d41c519c1..9dfd02b0b 100644 --- a/chapter08/util-linux.xml +++ b/chapter08/util-linux.xml @@ -64,7 +64,8 @@ --disable-static \ --without-python \ --without-systemd \ - --without-systemdsystemunitdir + --without-systemdsystemunitdir \ + runstatedir=/run ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ --docdir=/usr/share/doc/util-linux-&util-linux-version; \ @@ -76,7 +77,8 @@ --disable-runuser \ --disable-pylibmount \ --disable-static \ - --without-python + --without-python \ + runstatedir=/run The --disable and --without options prevent warnings about building components that require packages not in LFS or are diff --git a/chapter08/zstd.xml b/chapter08/zstd.xml index 4e1f88776..a29707280 100644 --- a/chapter08/zstd.xml +++ b/chapter08/zstd.xml @@ -46,7 +46,9 @@ make - This package does not come with a test suite. + To test the results, issue: + +make check Install the package: diff --git a/chapter09/bootscripts.xml b/chapter09/bootscripts.xml index 009590d64..57c6377ff 100644 --- a/chapter09/bootscripts.xml +++ b/chapter09/bootscripts.xml @@ -85,9 +85,9 @@ cleanfs Removes files that should not be preserved between reboots, such - as those in /var/run/ and + as those in /run/ and /var/lock/; it re-creates - /var/run/utmp and removes the possibly present + /run/utmp and removes the possibly present /etc/nologin, /fastboot, and /forcefsck files diff --git a/general.ent b/general.ent index 9447f9dd6..6d8aaa498 100644 --- a/general.ent +++ b/general.ent @@ -1,13 +1,13 @@ - + - + - + diff --git a/lfs-latest.php b/lfs-latest.php index 1cd061946..937fb25d3 100644 --- a/lfs-latest.php +++ b/lfs-latest.php @@ -69,7 +69,8 @@ function find_even_max( $lines, $regex_match, $regex_replace ) function http_get_file( $url ) { - if ( ! preg_match( "/sourceforge/", $url ) ) + if ( ! preg_match( "/sourceforge/", $url ) && + ! preg_match( "/psmisc/", $url ) ) { exec( "curl --location --silent --max-time 30 $url", $dir ); @@ -105,7 +106,7 @@ function get_packages( $package, $dirpath ) global $exceptions; global $regex; -//if ( $package != "zstd" ) return 0; // Debug +//if ( $package != "psmisc" ) return 0; // Debug if ( $package == "bc" ) $dirpath = "https://github.com/gavinhoward/bc/releases"; if ( $package == "check" ) $dirpath = "https://github.com/libcheck/check/releases"; @@ -122,9 +123,7 @@ if ( $package == "meson" ) $dirpath = "https://github.com/mesonbuild/meson/ if ( $package == "mpc" ) $dirpath = "https://ftp.gnu.org/gnu/mpc"; if ( $package == "mpfr" ) $dirpath = "http://mpfr.loria.fr/mpfr-current"; if ( $package == "ninja" ) $dirpath = "https://github.com/ninja-build/ninja/releases"; -//if ( $package == "procps-ng" ) $dirpath = "http://sourceforge.net/projects/procps-ng/files"; if ( $package == "procps-ng" ) $dirpath = "https://gitlab.com/procps-ng/procps/-/tags"; -//if ( $package == "psmisc" ) $dirpath = "http://sourceforge.net/projects/$package/files"; if ( $package == "psmisc" ) $dirpath = "https://gitlab.com/psmisc/psmisc/-/tags"; if ( $package == "Python" ) $dirpath = "https://www.python.org/downloads/source/"; if ( $package == "shadow" ) $dirpath = "https://github.com/shadow-maint/shadow/releases"; @@ -281,10 +280,10 @@ if ( $package == "zstd" ) $dirpath = "https://github.com/facebook/zstd/rel } if ( $package == "procps-ng" ) - return find_max( $lines, "/v\d/", "/^.*v([\d\.]+).*$/" ); + return find_max( $lines, "/v\d/", "/^.*v([\d\.]+) .*$/" ); if ( $package == "psmisc" ) - return find_max( $lines, "/^v/", "/^v([\d\.]+).*$/" ); + return find_max( $lines, "/v\d/", "/^.*v([\d\.]+) .*$/" ); if ( $package == "grub" ) return find_max( $lines, "/grub/", "/^.*grub-(\d\..*).tar.xz.*$/" ); diff --git a/packages.ent b/packages.ent index d2b60f8b9..118d58aba 100644 --- a/packages.ent +++ b/packages.ent @@ -29,10 +29,10 @@ - - + + - + @@ -57,18 +57,18 @@ - - + + - + - - + + - + @@ -77,10 +77,10 @@ - - + + - + @@ -139,10 +139,10 @@ - - + + - + @@ -181,7 +181,7 @@ - + @@ -189,10 +189,10 @@ - - + + - + @@ -319,10 +319,10 @@ - + - + @@ -367,10 +367,10 @@ - - + + - + @@ -383,7 +383,7 @@ - + @@ -391,17 +391,17 @@ - - + + - + - + @@ -425,12 +425,12 @@ - + - + - + - + diff --git a/patches.ent b/patches.ent index c3e7cb5d2..316e85cac 100644 --- a/patches.ent +++ b/patches.ent @@ -53,11 +53,11 @@ --> - +