diff options
-rw-r--r-- | chapter02/stages.xml | 3 | ||||
-rw-r--r-- | chapter03/packages.xml | 24 | ||||
-rw-r--r-- | chapter04/addinguser.xml | 4 | ||||
-rw-r--r-- | chapter07/cleanup.xml | 4 | ||||
-rw-r--r-- | chapter07/introduction.xml | 2 | ||||
-rw-r--r-- | chapter08/bash.xml | 2 | ||||
-rw-r--r-- | chapter08/coreutils.xml | 4 | ||||
-rw-r--r-- | chapter08/meson.xml | 6 | ||||
-rw-r--r-- | chapter08/python.xml | 37 | ||||
-rw-r--r-- | chapter08/util-linux.xml | 2 | ||||
-rw-r--r-- | chapter08/wheel.xml | 29 | ||||
-rw-r--r-- | chapter10/kernel.xml | 4 | ||||
-rw-r--r-- | chapter11/reboot.xml | 4 | ||||
-rw-r--r-- | general.ent | 3 | ||||
-rw-r--r-- | lfs-latest-git.php | 10 | ||||
-rw-r--r-- | packages.ent | 2 |
16 files changed, 102 insertions, 38 deletions
diff --git a/chapter02/stages.xml b/chapter02/stages.xml index 830ec0c1f..7c151975f 100644 --- a/chapter02/stages.xml +++ b/chapter02/stages.xml @@ -71,8 +71,7 @@ <para>A few operations, from <quote>Changing Ownership</quote> to <quote>Entering the Chroot Environment</quote> must be done as the <systemitem class="username">root</systemitem> user, with the LFS - environment variable set for the - <systemitem class="username">root</systemitem>user.</para> + environment variable set for the &root; user.</para> </listitem> <listitem> 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 @@ <title>All Packages</title> + <note> + <para>Read the <ulink url='&secadv;'>security advisories</ulink> + before downloading packages to figure out if a newer version of any + package should be used to avoid security vulnerabilities.</para> + + <para>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.</para> + </note> + <para>Download or otherwise obtain the following packages:</para> <variablelist role="materials"> @@ -173,15 +188,6 @@ <para>Home page: <ulink url="&expat-home;"/></para> <para>Download: <ulink url="&expat-url;"/></para> <para>MD5 sum: <literal>&expat-md5;</literal></para> - <note> - <para>The upstream may remove tarballs of the specific releases of - <application>Expat</application> when these releases contain a - security vulnerability. You should refer to - <ulink url='&lfs-root;lfs/advisories/'>LFS security advisories</ulink> - 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.</para> - </note> </listitem> </varlistentry> diff --git a/chapter04/addinguser.xml b/chapter04/addinguser.xml index 535f20b02..b659b4841 100644 --- a/chapter04/addinguser.xml +++ b/chapter04/addinguser.xml @@ -86,8 +86,8 @@ case $(uname -m) in esac</userinput></screen> <note><para>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 <command>fg</command> command will fix the issue.</para></note> <para>Next, login as user <systemitem class="username">lfs</systemitem>. diff --git a/chapter07/cleanup.xml b/chapter07/cleanup.xml index 651f2e8d6..6ed78fb93 100644 --- a/chapter07/cleanup.xml +++ b/chapter07/cleanup.xml @@ -156,9 +156,9 @@ tar -cJpf $HOME/lfs-temp-tools-&version;.tar.xz .</userinput></screen> restore when they don't need to. --> <warning><para>The following commands are extremely dangerous. If - you run <command>rm -rf ./*</command> as the root user and you + you run <command>rm -rf ./*</command> as the &root; user and you do not change to the $LFS directory or the <envar>LFS</envar> - environment variable is not set for the root user, it will destroy + environment variable is not set for the &root; user, it will destroy your entire host system. YOU ARE WARNED.</para></warning> <screen role="nodump"><computeroutput>cd $LFS diff --git a/chapter07/introduction.xml b/chapter07/introduction.xml index 2b0030d7b..6605ddea4 100644 --- a/chapter07/introduction.xml +++ b/chapter07/introduction.xml @@ -25,7 +25,7 @@ <para>Until <xref linkend="ch-tools-chroot"/>, the commands must be run as <systemitem class="username">root</systemitem>, with the <envar>LFS</envar> variable set. After entering chroot, all commands - are run as root, fortunately without access to the OS of the computer + are run as &root;, fortunately without access to the OS of the computer you built LFS on. Be careful anyway, as it is easy to destroy the whole LFS system with badly formed commands.</para> 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 @@ <screen><userinput remap="test">chown -Rv tester .</userinput></screen> - <para>The testsuite of the package is designed to be run as a non-root + <para>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 <application>Expect</application> and run the tests as the <systemitem diff --git a/chapter08/coreutils.xml b/chapter08/coreutils.xml index 08b090fc0..cc8fc42ad 100644 --- a/chapter08/coreutils.xml +++ b/chapter08/coreutils.xml @@ -119,8 +119,8 @@ FORCE_UNSAFE_CONFIGURE=1 ./configure \ <screen><userinput remap="test">echo "dummy:x:102:tester" >> /etc/group</userinput></screen> - <para>Fix some of the permissions so that the non-root user can compile and - run the tests:</para> + <para>Fix some of the permissions so that the non-&root; user can + compile and run the tests:</para> <screen><userinput remap="test">chown -Rv tester . </userinput></screen> diff --git a/chapter08/meson.xml b/chapter08/meson.xml index 91b4b61bc..d2132b5a1 100644 --- a/chapter08/meson.xml +++ b/chapter08/meson.xml @@ -70,14 +70,16 @@ install -vDm644 data/shell-completions/zsh/_meson /usr/share/zsh/site-functions/ <varlistentry> <term><parameter>-w dist</parameter></term> <listitem> - <para>Put the created wheels into the `dist` directory.</para> + <para>Put the created wheels into the + <filename class='directory'>dist</filename> directory.</para> </listitem> </varlistentry> <varlistentry> <term><parameter>--find-links dist</parameter></term> <listitem> - <para>Install wheels from the 'dist' directory.</para> + <para>Install wheels from the + <filename class='directory'>dist</filename> directory.</para> </listitem> </varlistentry> diff --git a/chapter08/python.xml b/chapter08/python.xml index 76530d782..b7f2da6b9 100644 --- a/chapter08/python.xml +++ b/chapter08/python.xml @@ -93,16 +93,43 @@ <screen><userinput remap="install">make install</userinput></screen> <para>In serveral places we use the <command>pip3</command> command to - install Python 3 programs and modules for all users as root. This conflicts - with the Python developers recommendation to build packages in a virtual - environment as a regular user. To this end, a multi-line warning is - written when using <command>pip3</command> as the root user. If desired, - supress this warning by running the following command:</para> + install Python 3 programs and modules for all users as + <systemitem class='username'>root</systemitem>. This conflicts + with the Python developers recommendation to install packages into a + virtual environment or the home directory of a regular user (by running + <command>pip3</command> as this user). To this end, a multi-line warning + is written when using <command>pip3</command> as the + <systemitem class='username'>root</systemitem> user. The main reason + of this recommendation is for avoiding a conflict with the system + package manager (<command>dpkg</command> for example), but LFS does not + have a system-wide package manager so this is not a problem. If desired, + suppress this warning by running the following command:</para> <screen><userinput remap="install">sed -e '/def warn_if_run_as_root/a\ return' \ -i /usr/lib/python3.10/site-packages/pip/_internal/cli/req_command.py </userinput></screen> + <important> + <para> + In LFS and BLFS we normally build and install Python modules with the + <command>pip3</command> command. Please take care that the + <command>pip3 install</command> commands in both the books should be + run as the &root; user unless it's for a Python virtual environment. + Running a <command>pip3 install</command> as a non-&root; user may seem + to work fine, but it will cause the installed module to be inaccessible + by other users. + </para> + + <para> + <command>pip3 install</command> will not reinstall an already installed + module by default. For using the <command>pip3 install</command> + command to upgrade a module (for example, from meson-0.61.3 to + meson-0.62.0), insert the option <parameter>--upgrade</parameter> into + the command line. If it's really necessary to downgrade a module or + reinstall the same version for some reason, insert + <parameter>--force-reinstall</parameter> into the command line. + </para> + </important> <para>If desired, install the preformatted documentation:</para> 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 @@ <screen><userinput remap="make">make</userinput></screen> - <para>If desired, run the test suite as a non-root user:</para> + <para>If desired, run the test suite as a non-&root; user:</para> <warning><para>Running the test suite as the <systemitem class="username">root</systemitem> user can be harmful to diff --git a/chapter08/wheel.xml b/chapter08/wheel.xml index 78fa94fd8..8e8436ffd 100644 --- a/chapter08/wheel.xml +++ b/chapter08/wheel.xml @@ -14,7 +14,7 @@ <address>&wheel-url;</address> </sect1info> - <title>wheel-&wheel-version;</title> + <title>Wheel-&wheel-version;</title> <indexterm zone="ch-system-wheel"> <primary sortas="a-wheel">wheel</primary> @@ -23,7 +23,7 @@ <sect2 role="package"> <title/> - <para>Wheel is a Python library that implements the reference + <para>Wheel is a Python library that is the reference implementation of the Python wheel packaging standard.</para> <segmentedlist> @@ -50,7 +50,7 @@ <varlistentry> <term><command>install</command></term> <listitem> - <para>Install the package</para> + <para>Install the package.</para> </listitem> </varlistentry> @@ -79,16 +79,33 @@ <title>Contents of Wheel</title> <segmentedlist> - <segtitle>Installed module</segtitle> + <segtitle>Installed program</segtitle> <segtitle>Installed directory</segtitle> <seglistitem> - <seg>wheel.py</seg> + <seg>wheel</seg> <seg>/usr/lib/python&python-minor;/site-packages/wheel</seg> </seglistitem> - </segmentedlist> + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="wheel-wheel"> + <term><command>wheel</command></term> + <listitem> + <para> + is an utility to unpack, pack, or convert wheel packages + </para> + <indexterm zone="ch-system-wheel"> + <primary sortas="b-wheel">wheel</primary> + </indexterm> + </listitem> + </varlistentry> + </variablelist> + </sect2> </sect1> diff --git a/chapter10/kernel.xml b/chapter10/kernel.xml index 713bab93b..f1469f0b4 100644 --- a/chapter10/kernel.xml +++ b/chapter10/kernel.xml @@ -248,8 +248,8 @@ File systems ---> <caution> <para>If the host system has a separate /boot partition, the files copied below should go there. The easiest way to do that is to bind /boot on the - host (outside chroot) to /mnt/lfs/boot before proceeding. As the root - user in the <emphasis>host system</emphasis>:</para> + host (outside chroot) to /mnt/lfs/boot before proceeding. As the + &root; user in the <emphasis>host system</emphasis>:</para> <screen role="nodump"><userinput>mount --bind /boot /mnt/lfs/boot</userinput></screen> </caution> diff --git a/chapter11/reboot.xml b/chapter11/reboot.xml index 9166a8c49..3d7953897 100644 --- a/chapter11/reboot.xml +++ b/chapter11/reboot.xml @@ -46,8 +46,8 @@ <listitem><para>Installing <ulink url='&blfs-book;postlfs/sudo.html'>sudo</ulink> may be useful for - building packages as a non-root user and easily installing the resulting - packages in your new system.</para></listitem> + building packages as a non-&root; user and easily installing the + resulting packages in your new system.</para></listitem> <listitem><para>If you want to access your new system from a remote system within a comfortable GUI environment, install <ulink diff --git a/general.ent b/general.ent index 4f15d3fdd..7da71e60e 100644 --- a/general.ent +++ b/general.ent @@ -112,6 +112,9 @@ <!ENTITY savannah-nongnu "https://savannah.nongnu.org"> <!ENTITY github "https://github.com"> +<!ENTITY root "<systemitem class='username'>root</systemitem>"> +<!ENTITY lfs-user "<systemitem class='username'>lfs</systemitem>"> + <!ENTITY % packages-entities SYSTEM "packages.ent"> %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 37daba503..99c48197b 100644 --- a/packages.ent +++ b/packages.ent @@ -508,7 +508,7 @@ <!ENTITY mpfr-version "4.1.0"> <!ENTITY mpfr-size "1,490 KB"> -<!ENTITY mpfr-url "https://www.mpfr.org/mpfr-&mpfr-version;/mpfr-&mpfr-version;.tar.xz"> +<!ENTITY mpfr-url "https://ftp.gnu.org/gnu/mpfr/mpfr-&mpfr-version;.tar.xz"> <!ENTITY mpfr-md5 "bdd3d5efba9c17da8d83a35ec552baef"> <!ENTITY mpfr-home "https://www.mpfr.org/"> <!ENTITY mpfr-fin-du "38 MB"> |