Merge branch 'trunk' into xry111/clfs-ng

This commit is contained in:
Xi Ruoyao 2022-04-22 12:39:15 +08:00
commit b1df1d79d5
No known key found for this signature in database
GPG Key ID: D95E4716CCBB34DC
13 changed files with 61 additions and 21 deletions

View File

@ -10,6 +10,21 @@
<title>All Packages</title> <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> <para>Download or otherwise obtain the following packages:</para>
<variablelist role="materials"> <variablelist role="materials">
@ -173,15 +188,6 @@
<para>Home page: <ulink url="&expat-home;"/></para> <para>Home page: <ulink url="&expat-home;"/></para>
<para>Download: <ulink url="&expat-url;"/></para> <para>Download: <ulink url="&expat-url;"/></para>
<para>MD5 sum: <literal>&expat-md5;</literal></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> </listitem>
</varlistentry> </varlistentry>

View File

@ -83,8 +83,8 @@ useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput></screen>
<screen><userinput>chown -v lfs $LFS/{usr{,/*},lib*,boot,var,etc,bin,sbin,tools}</userinput></screen> <screen><userinput>chown -v lfs $LFS/{usr{,/*},lib*,boot,var,etc,bin,sbin,tools}</userinput></screen>
<note><para>In some host systems, the following command does not complete <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 properly and suspends the login to the &lfs-user; user to the background.
prompt "lfs:~$" does not appear immediately, entering the If the prompt "lfs:~$" does not appear immediately, entering the
<command>fg</command> command will fix the issue.</para></note> <command>fg</command> command will fix the issue.</para></note>
<para>Next, login as user <systemitem class="username">lfs</systemitem>. <para>Next, login as user <systemitem class="username">lfs</systemitem>.

View File

@ -136,7 +136,7 @@ mount -v -t ext4 <replaceable>/dev/sdx4</replaceable> /mnt/lfs-backup</computero
<warning><para>The following commands are extremely dangerous. If <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 <filename>lfs-target</filename> directory, do not change to the <filename>lfs-target</filename> directory,
it will destroy your entire host system. it will destroy your entire host system.
YOU ARE WARNED.</para></warning> YOU ARE WARNED.</para></warning>

View File

@ -32,7 +32,7 @@
mounted as soon as possible after boot. You may want to check mounted as soon as possible after boot. You may want to check
that they are mounted by issuing <command>mount</command>.</para> that they are mounted by issuing <command>mount</command>.</para>
<para>All commands in this and following chapters are run as root on the <para>All commands in this and following chapters are run as &root; on the
target system, fortunately without access to the host system. target system, fortunately without access to the host system.
Be careful anyway, as if the storage devices of your target system already 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 contain some important data, it's possible to destroy them with badly

View File

@ -73,7 +73,7 @@
<screen><userinput remap="test">chown -Rv tester .</userinput></screen> <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 user that owns the terminal connected to standard input. To satisfy the
requirement, spawn a new pseudo terminal using requirement, spawn a new pseudo terminal using
<application>Expect</application> and run the tests as the <systemitem <application>Expect</application> and run the tests as the <systemitem

View File

@ -129,8 +129,8 @@ FORCE_UNSAFE_CONFIGURE=1 ./configure \
<screen><userinput remap="test">echo "dummy:x:102:tester" &gt;&gt; /etc/group</userinput></screen> <screen><userinput remap="test">echo "dummy:x:102:tester" &gt;&gt; /etc/group</userinput></screen>
<para>Fix some of the permissions so that the non-root user can compile and <para>Fix some of the permissions so that the non-&root; user can
run the tests:</para> compile and run the tests:</para>
<screen><userinput remap="test">chown -Rv tester . </userinput></screen> <screen><userinput remap="test">chown -Rv tester . </userinput></screen>

View File

@ -109,6 +109,27 @@
-i /usr/lib/python3.10/site-packages/pip/_internal/cli/req_command.py -i /usr/lib/python3.10/site-packages/pip/_internal/cli/req_command.py
</userinput></screen> </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> <para>If desired, install the preformatted documentation:</para>

View File

@ -84,7 +84,7 @@
<screen><userinput remap="make">make</userinput></screen> <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 <warning><para>Running the test suite as the
<systemitem class="username">root</systemitem> user can be harmful to <systemitem class="username">root</systemitem> user can be harmful to

View File

@ -249,7 +249,7 @@ File systems ---&gt;
<para>As the cross-built LFS system has a separate /boot partition, <para>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 the files copied below should go there. The easiest way to do that is
to mount <filename class="directory">/boot</filename> before to mount <filename class="directory">/boot</filename> before
proceeding. As the root user:</para> proceeding. As the &root; user:</para>
<screen role="nodump"><userinput>mount /boot</userinput></screen> <screen role="nodump"><userinput>mount /boot</userinput></screen>

View File

@ -46,8 +46,8 @@
<listitem><para>Installing <ulink <listitem><para>Installing <ulink
url='&blfs-book;postlfs/sudo.html'>sudo</ulink> may be useful for url='&blfs-book;postlfs/sudo.html'>sudo</ulink> may be useful for
building packages as a non-root user and easily installing the resulting building packages as a non-&root; user and easily installing the
packages in your new system.</para></listitem> resulting packages in your new system.</para></listitem>
<listitem><para>If you want to access your new system from a remote system <listitem><para>If you want to access your new system from a remote system
within a comfortable GUI environment, install <ulink within a comfortable GUI environment, install <ulink

View File

@ -112,6 +112,9 @@
<!ENTITY savannah-nongnu "https://savannah.nongnu.org"> <!ENTITY savannah-nongnu "https://savannah.nongnu.org">
<!ENTITY github "https://github.com"> <!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"> <!ENTITY % packages-entities SYSTEM "packages.ent">
%packages-entities; %packages-entities;

View File

@ -70,6 +70,7 @@ function find_even_max( $lines, $regex_match, $regex_replace )
function http_get_file( $url ) function http_get_file( $url )
{ {
if ( ! preg_match( "/sourceforge/", $url ) && if ( ! preg_match( "/sourceforge/", $url ) &&
! preg_match( "/mpfr/", $url ) &&
! preg_match( "/psmisc/", $url ) ) ! preg_match( "/psmisc/", $url ) )
{ {
exec( "curl --location --silent --max-time 30 $url", $dir ); exec( "curl --location --silent --max-time 30 $url", $dir );
@ -78,6 +79,14 @@ function http_get_file( $url )
$dir = strip_tags( $s ); $dir = strip_tags( $s );
return explode( "\n", $dir ); 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 else
{ {
exec( "lynx -dump $url 2>/dev/null", $lines ); 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 == "tcl" ) $dirpath = "https://www.tcl.tk/software/tcltk/download.html";
if ( $package == "util-linux" ) $dirpath = max_parent( $dirpath, "v." ); if ( $package == "util-linux" ) $dirpath = max_parent( $dirpath, "v." );
if ( $package == "vim" ) $dirpath = "https://github.com/vim/vim/tags"; 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"; if ( $package == "zstd" ) $dirpath = "https://github.com/facebook/zstd/releases";
// Check for ftp // Check for ftp

View File

@ -514,7 +514,7 @@
<!ENTITY mpfr-version "4.1.0"> <!ENTITY mpfr-version "4.1.0">
<!ENTITY mpfr-size "1,490 KB"> <!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-md5 "bdd3d5efba9c17da8d83a35ec552baef">
<!ENTITY mpfr-home "https://www.mpfr.org/"> <!ENTITY mpfr-home "https://www.mpfr.org/">
<!ENTITY mpfr-fin-du "38 MB"> <!ENTITY mpfr-fin-du "38 MB">