diff --git a/chapter03/packages.xml b/chapter03/packages.xml index 5b1976f47..aa927e60a 100644 --- a/chapter03/packages.xml +++ b/chapter03/packages.xml @@ -10,6 +10,21 @@ All Packages + + Read the security advisories + before downloading packages to figure out if a newer version of any + package should be used to avoid security vulnerabilities. + + The upstreams may remove old releases, especially when these + releases contain a security vulnerability. If one URL below is not + reachable, you should read the security advisories first to figure out + if a newer version (with the vulnerability fixed) should be used. If + not, try to download the removed package from a mirror. Although it's + possible to download an old release from a mirror even if this release + has been removed because of a vulnerability, it's not recommended to + use a release known to be vulnerable for building your system. + + Download or otherwise obtain the following packages: @@ -173,15 +188,6 @@ Home page: Download: MD5 sum: &expat-md5; - - The upstream may remove tarballs of the specific releases of - Expat when these releases contain a - security vulnerability. You should refer to - LFS security advisories - to figure out which version (with the vulnerability fixed) should - be used. You may download the vulnerable version from a mirror, - but it's not recommended. - diff --git a/chapter04/addinguser.xml b/chapter04/addinguser.xml index 5f5ee844d..5bed666a9 100644 --- a/chapter04/addinguser.xml +++ b/chapter04/addinguser.xml @@ -83,8 +83,8 @@ useradd -s /bin/bash -g lfs -m -k /dev/null lfs chown -v lfs $LFS/{usr{,/*},lib*,boot,var,etc,bin,sbin,tools} In some host systems, the following command does not complete - properly and suspends the login to the lfs user to the background. If the - prompt "lfs:~$" does not appear immediately, entering the + properly and suspends the login to the &lfs-user; user to the background. + If the prompt "lfs:~$" does not appear immediately, entering the fg command will fix the issue. Next, login as user lfs. diff --git a/chapter07/cleanup.xml b/chapter07/cleanup.xml index d4eff38ae..db2ee1081 100644 --- a/chapter07/cleanup.xml +++ b/chapter07/cleanup.xml @@ -136,7 +136,7 @@ mount -v -t ext4 /dev/sdx4 /mnt/lfs-backupThe following commands are extremely dangerous. If - you run rm -rf ./* as the root user and you + you run rm -rf ./* as the &root; user and you do not change to the lfs-target directory, it will destroy your entire host system. YOU ARE WARNED. diff --git a/chapter07/introduction.xml b/chapter07/introduction.xml index b6238f85e..d33542bba 100644 --- a/chapter07/introduction.xml +++ b/chapter07/introduction.xml @@ -32,7 +32,7 @@ mounted as soon as possible after boot. You may want to check that they are mounted by issuing mount. - All commands in this and following chapters are run as root on the + All commands in this and following chapters are run as &root; on the target system, fortunately without access to the host system. Be careful anyway, as if the storage devices of your target system already contain some important data, it's possible to destroy them with badly diff --git a/chapter08/bash.xml b/chapter08/bash.xml index 787882b59..4ea981d5b 100644 --- a/chapter08/bash.xml +++ b/chapter08/bash.xml @@ -73,7 +73,7 @@ chown -Rv tester . - The testsuite of the package is designed to be run as a non-root + The testsuite of the package is designed to be run as a non-&root; user that owns the terminal connected to standard input. To satisfy the requirement, spawn a new pseudo terminal using Expect and run the tests as the echo "dummy:x:102:tester" >> /etc/group - Fix some of the permissions so that the non-root user can compile and - run the tests: + Fix some of the permissions so that the non-&root; user can + compile and run the tests: chown -Rv tester . diff --git a/chapter08/python.xml b/chapter08/python.xml index 1af9e0db9..b7f2da6b9 100644 --- a/chapter08/python.xml +++ b/chapter08/python.xml @@ -109,6 +109,27 @@ -i /usr/lib/python3.10/site-packages/pip/_internal/cli/req_command.py + + + In LFS and BLFS we normally build and install Python modules with the + pip3 command. Please take care that the + pip3 install commands in both the books should be + run as the &root; user unless it's for a Python virtual environment. + Running a pip3 install as a non-&root; user may seem + to work fine, but it will cause the installed module to be inaccessible + by other users. + + + + pip3 install will not reinstall an already installed + module by default. For using the pip3 install + command to upgrade a module (for example, from meson-0.61.3 to + meson-0.62.0), insert the option --upgrade into + the command line. If it's really necessary to downgrade a module or + reinstall the same version for some reason, insert + --force-reinstall into the command line. + + If desired, install the preformatted documentation: diff --git a/chapter08/util-linux.xml b/chapter08/util-linux.xml index 7aba82c85..d90936b78 100644 --- a/chapter08/util-linux.xml +++ b/chapter08/util-linux.xml @@ -84,7 +84,7 @@ make - If desired, run the test suite as a non-root user: + If desired, run the test suite as a non-&root; user: Running the test suite as the root user can be harmful to diff --git a/chapter10/kernel.xml b/chapter10/kernel.xml index f3dab4239..2fefe4305 100644 --- a/chapter10/kernel.xml +++ b/chapter10/kernel.xml @@ -249,7 +249,7 @@ File systems ---> As the cross-built LFS system has a separate /boot partition, the files copied below should go there. The easiest way to do that is to mount /boot before - proceeding. As the root user: + proceeding. As the &root; user: mount /boot diff --git a/chapter11/reboot.xml b/chapter11/reboot.xml index a3b9e6c06..bc77ed61a 100644 --- a/chapter11/reboot.xml +++ b/chapter11/reboot.xml @@ -46,8 +46,8 @@ Installing sudo may be useful for - building packages as a non-root user and easily installing the resulting - packages in your new system. + building packages as a non-&root; user and easily installing the + resulting packages in your new system. If you want to access your new system from a remote system within a comfortable GUI environment, install +root"> +lfs"> + %packages-entities; diff --git a/lfs-latest-git.php b/lfs-latest-git.php index df0ddcccc..645f8e70d 100644 --- a/lfs-latest-git.php +++ b/lfs-latest-git.php @@ -70,6 +70,7 @@ function find_even_max( $lines, $regex_match, $regex_replace ) function http_get_file( $url ) { if ( ! preg_match( "/sourceforge/", $url ) && + ! preg_match( "/mpfr/", $url ) && ! preg_match( "/psmisc/", $url ) ) { exec( "curl --location --silent --max-time 30 $url", $dir ); @@ -78,6 +79,14 @@ function http_get_file( $url ) $dir = strip_tags( $s ); return explode( "\n", $dir ); } + else if ( preg_match( "/mpfr/", $url ) ) + { + # There seems to be a problem with the mpfs certificate + exec( "curl --location --silent --insecure --max-time 30 $url", $dir ); + $s = implode( "\n", $dir ); + $dir = strip_tags( $s ); + return explode( "\n", $dir ); + } else { exec( "lynx -dump $url 2>/dev/null", $lines ); @@ -137,6 +146,7 @@ if ( $package == "systemd" ) $dirpath = "https://github.com/systemd/systemd/r if ( $package == "tcl" ) $dirpath = "https://www.tcl.tk/software/tcltk/download.html"; if ( $package == "util-linux" ) $dirpath = max_parent( $dirpath, "v." ); if ( $package == "vim" ) $dirpath = "https://github.com/vim/vim/tags"; +if ( $package == "wheel" ) $dirpath = "https://pypi.org/project/wheel/#files"; if ( $package == "zstd" ) $dirpath = "https://github.com/facebook/zstd/releases"; // Check for ftp diff --git a/packages.ent b/packages.ent index 68134f3d6..922fcc953 100644 --- a/packages.ent +++ b/packages.ent @@ -514,7 +514,7 @@ - +