Commit Graph

517 Commits

Author SHA1 Message Date
Bruce Dubbs
9b01d1b4ba Package updates.
Update to iana-etc-20240318.
Update to zstd-1.5.6.
Update to util-linux-2.40.
Update to shadow-4.15.1.
Update to pkgconf-2.2.0.
Update to linux-6.8.2.
Update to coreutils-9.5.
2024-03-31 17:10:23 -05:00
Xi Ruoyao
ce11e97f01
kernfs: Use a separate devpts filesystem for chroot environment
IIRC we switched from separate devpts to bind mount, and matched the UID
of tester with the host UID owning the TTY, to satisify the Bash test
suite.  But now we are always using UID 101 for tester and expect to
spawn a PTY for Bash test suite (so when building LFS in a TTY owned by
the root user of the host tester won't be UID 0).  Thus we can switch
back to a separate devpts mount which is cleaner and safer.

And we are already using a separate devpts mount in Chapter 11.
2024-02-06 01:08:42 +08:00
Bruce Dubbs
1541b7c29f Minor wording update 2024-02-04 12:13:17 -06:00
Xi Ruoyao
7436c28ae4
If we need to create the link target of /dev/shm, make its mode 1777
To match the behavior of a tmpfs mount.  Otherwise non-root user (for
e.g. the tester user) will get errors using Glibc shm functions.
2024-02-04 22:56:04 +08:00
Xi Ruoyao
8cf42d4c72
Fix and unify the commands creating the link target of /dev/shm
$(realpath /dev/shm) will return the absolute path of the target of
/dev/shm, thus the command will work for both absolute symlink and
relative symlink.
2024-02-04 03:42:36 +08:00
Xi Ruoyao
ee950a5e0d
More <quote> clean up
Use <quote> instead of '"' if possible.  Use <literal>,
<computeroutput>, etc. instead of <quote> if possible.  Replace
<quote>alpha</quote> with a UTF-8 Greek alpha character.

BTW decorate ".link" with <filename class='extension'>.
2024-01-28 20:53:47 +08:00
Xi Ruoyao
81f727aca6
chapter07/python: Work around a puzzling punctuation in quote
Here no file name starts with "python." (including the dot).  Slightly
reword to prevent the punctuation from following the quote or being
quoted.
2024-01-28 17:44:24 +08:00
Pierre Labastie
360fdfca9c Fix punctuation in quotes, and quote signs
- period and comma inside quotes
- " to <quote>
- some " to <literal> when it is a var value
2024-01-26 18:28:53 +01:00
Xi Ruoyao
0d76fa268d
chapter07/python: Update the note about optional modules
"Fatal error" is no longer outputted, but "Python requires OpenSSL
1.1.1 or newer" is bad as well because it's not really "required" (at
least in BLFS definition).
2024-01-24 23:40:27 +08:00
Pierre Labastie
c88ec71538 Put back punctuation inside quotes
Reverts part of 811d59db8b.
Looks like "American English prefers that periods and commas be
placed inside closing quotation marks," according to
https://en.wikipedia.org/wiki/American_English
2024-01-24 14:39:09 +01:00
Pierre Labastie
7152faa5fa Change all xml files to utf-8 encoding 2024-01-18 20:53:23 +01:00
Pierre Labastie
811d59db8b Nitpick on format
- according to our typography, referring to a manual page should be
  <filename>page(x)</filename>
- don't enclose punctuation into quotes
- use <option> for option
2024-01-11 13:52:28 +01:00
Bruce Dubbs
03682b250c Reformat util-linux configure parameters. 2023-12-14 14:16:13 -06:00
Xi Ruoyao
01247ac90a
kernfs: Revise command creating the link target in case /dev/shm is a symlink
When /dev/shm is a symlink we need to create its target or some tests
will fail and Python 3 will be misconfigured.  We wrote it as:

    mkdir -pv $LFS/$(readlink $LFS/dev/shm)

But if $LFS/dev/shm is a relative symlink (say ../run/shm), we end up:

    mkdir -pv /mnt/lfs/../run/shm

This command will create /mnt/run/shm, not $LFS/mnt/shm as we expected.
Twist it a little to make it work for both absolute symlinks and
relative symlinks.
2023-11-20 07:23:36 +08:00
Douglas R. Reno
f16cc36c29 Typo fix 2023-11-15 15:25:51 -06:00
Bruce Dubbs
798e18b09f
Minor grammar corrections.
Mistakenly removed the remote WIP branch while it's not fully merged
yet.  Cherry-pick the discarded commit.

(cherry picked from commit 2f3f0e9e813f60a88e9f557842a7b9a50cdec50b)
2023-11-14 00:31:08 +08:00
Xi Ruoyao
95ebbb42b7
chroot: Set MAKEFLAGS and TESTSUITEFLAGS for parallelism 2023-11-13 21:14:19 +08:00
Xi Ruoyao
0d8322dbe6
createfiles: Remove doubled punctuation 2023-10-02 11:44:21 +08:00
Bruce Dubbs
25b3c0f720 Package updates and one fix.
Disable building nscd in glibc.
Update to iana-etc-20230929.
Update to vim-9.0.1968.
Update to openssl-3.1.3.
Update to meson-1.2.2.
Update to man-db-2.12.0.
Update to linux-6.5.5.
Update to kmod-31.
Update to kbd-2.6.3.
Update to gettext-0.22.2.
Update to bc-6.7.0.
2023-10-01 13:37:57 -05:00
Xi Ruoyao
6e11fe2728
createfiles: Add Y2038 info about the traditional {b,u,w}tmp and lastlog files
And utmp does not exist on systemd-based LFS.
2023-09-30 16:12:56 +08:00
Pierre Labastie
e0a942748e Make /dev/shm mount and umount verbose
Almost all commands in lfs are verbose. Don't know why these ones
were not.
2023-09-12 19:02:18 +02:00
Xi Ruoyao
6c51e5ce7b
perl: Move some explanations from Chapter 8 to Chapter 7
Explain switches once they show up first time.
2023-09-09 14:46:02 +08:00
Bruce Dubbs
3864d235cf Package updates and misc upates/typos.
Update to vim-1837.$
Update to zlib-1.3.$
Update to wheel-0.41.2 (Python Module).$
Update to util-linux-2.39.2.$
Update to sysvinit-3.08.$
Update to shadow-4.14.0.$
Update to Python-3.11.5.$
Update to procps-ng-4.0.4.$
Update to pkgconf-2.0.2.$
Update to mpfr-4.2.1.$
Update to kbd-2.6.2.$
Update to gzip-1.13.$
Update to coreutils-9.4.$
Specify the 'nobody-group' for systemd.$
Remove unused usb group.$
2023-09-02 08:54:55 -05:00
Bruce Dubbs
1fde5b2617 Package updates.
Update to util-linux-2.39.
Update to linux-6.3.3.
Update to libcap-2.69.
Update to grep-3.11.
Update to flit_core-3.9.0.
Update to eudev-3.2.12.
2023-05-18 13:36:37 -05:00
Bruce Dubbs
efd83dba4f Package updates.
Update to vim-9.0.1452.
Update to iana-etc-20230405.
Update to zstd-1.5.5.
Update to Python-3.11.3.
Update to meson-1.1.0.
Update to man-pages-6.04.
Update to linux-6.2.11.
2023-04-14 15:00:26 -05:00
David Bryant
7ae2811988 Standardize spelling of "userspace". 2022-12-24 10:00:23 -06:00
David Bryant
da6e70fffe Edited Pierre's recent additons,to improve English idiom. Also corrected
capitalization of a title.
2022-11-26 12:26:21 -06:00
Pierre Labastie
295e337887 Add note and warning about /usr/lib64 2022-11-26 09:27:58 +01:00
Xi Ruoyao
940769457b
kernfs: reword the description of bind mount
"Duplicated copy" is wrong IMO.  If you copy A to B, B won't be changed
when you modify A.  But if you bind mount A to B, B will reflect any
change made to A.

Again copy something from mount(2):

    A bind mount makes a file or a directory subtree visible at another
    point within the single directory hierarchy.
2022-11-18 13:13:37 +08:00
Xi Ruoyao
2f9498afa4
kernfs: remove a false note
Things are a little tricky:

1. If the host is "modern" (any desktop distro after 2013), the kernel
   supports devtmpfs and the host udev will do adjustments to the
   devtmpfs.  All instances of devtmpfs shares the same content so we'll
   see the work of both the kernel and the host udev in chroot.
2. If the host is old but the kernel supports devtmpfs (i. e. the host
   is not using devtmpfs for its /dev), when we mount devtmpfs on
   $LFS/dev we'll see the work of the kernel in chroot, but not the work
   of udev.  **Building LFS does not need any work of udev.**
3. If the host is very old and the kernel does not support devtmpfs at
   all, we can't mount devtmpfs.

Mounting a devtmpfs will work for 1 and 2, while bind mounting will work
for 1, 2, and 3.  So we use bind mounting here.

I don't want to squash all these details into the book, so just remove
the false statement here.
2022-11-18 12:52:09 +08:00
Xi Ruoyao
f714a8fa3b
chroot: reword how chroot works
Technically chroot command "tells" bash nothing.  It basically calls
chroot("$LFS"), then chdir("/"), then
execve(["/usr/bin/env", "-i", ...]).  The kernel also does not tell bash
something like "hey, the root is now $LFS" but just executes (almost) all
system calls from bash as-if $LFS is /.

The man page of chroot says:

DESCRIPTION
       Run COMMAND with root directory set to NEWROOT.

Just use the same grammar construction here.
2022-11-18 12:40:53 +08:00
David Bryant
ebecd08c05 Corrected grammar, spelling, and idiom in chapter 7. 2022-11-16 13:16:35 -06:00
Xi Ruoyao
2bf32ffa3a
kernfs: "device nodes" are in /dev, not "devices"
You cannot throw a NVIDIA GTX 690 into /dev :).
2022-10-01 15:27:19 +08:00
Xi Ruoyao
00588180ee
kernfs: modernize the explanation for bind mounting /dev
If you are using a "modern" distro (with devtmpfs and a modern udev
implementation), a bind mounting is actually not needed because you can
mount devtmpfs anyway.  The only reason for bind mounting is to be
compatible with old host distros where /dev is a directory containing
many static device nodes, or is a tmpfs (not same as devtmpfs) popluated
by bootscript or an old udev (modern udev implementations, including
eudev and systemd-udev used by LFS, strictly requires a devtmpfs on
/dev).

So update the explanation to match the status quo.
2022-10-01 15:14:22 +08:00
Xi Ruoyao
a8f3814a7b
kernfs: technically, they are not needed for chroot
Chroot command itself does not require kernel VFS mounted. You can mount
/proc, /sys, and /run after entering chroot with
"mount -v -t proc proc /proc" etc.  For /dev, if the host kernel
supports devtmpfs, you can also mount /dev in chroot with
"mount -v -t devtmpfs devtmpfs /dev".  Even if the host does not support
devtmpfs, it's still possible to mount /proc in chroot, then use
"mount --bind /proc/1/dev /dev".

It's just LFS editors decide to mount them before chroot.  So reword
some untrue assertions.
2022-10-01 13:35:59 +08:00
David Bryant
36cb08fbf0 Tweaked English idiom and edited for style. 2022-09-30 15:49:41 -05:00
David Bryant
29526d35ef Made grammatical corrections and stylistic changes to chapter 7.3.
Added clarification; the virtual file systems expose certain information
to programs in user space; chroot won't work without them.
2022-09-30 12:27:55 -05:00
David Bryant
52ddd6c033 Clarify some things in Intro to chroot; simplify some verbiage. 2022-09-30 11:24:14 -05:00
Bruce Dubbs
01ecba7b30 Fix unmounting instruction in 7.13.2. Backup 2022-09-22 10:44:47 -05:00
Bruce Dubbs
16cd09633e Adjust instructions for /dev/shm when creating virtual filesystems.
Some host create /dev/shm as a tmpfs.  Some have is as
a symlink to a location in another directory.  This
change handles both cases.

The change to the sysV bootscripts now creates /dev/shm
as a separate tmpfs from /run.  This makes LFS sysV and
systemd versions treat /dev/shm the same.
2022-09-20 12:20:58 -05:00
Xi Ruoyao
3d65730e22
cleanup: rephrase description for .la removal
Don't emphasis "static library" at all, to prevent anyone from thinking
"I need to use static libraries so I'll keep these .la files".  And warn
that .la files are known to break BLFS packages.
2022-09-19 14:12:17 +08:00
Xi Ruoyao
2e9e5b43c5
add <literal> to make commands for temp /etc/hosts and final /etc/pip3.conf looking better 2022-09-14 11:52:01 +08:00
Xi Ruoyao
fb66c4c583
some http -> https changes 2022-09-05 09:52:05 +08:00
Xi Ruoyao
b5a316b060
texinfo: remove unneeded sed
It works out of box with glibc-2.35.  I think this issue is already
fixed at glibc side, by the commit:

commit 0b5ca7c3e551e5502f3be3b06453324fe8604e82
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Tue Sep 21 07:47:45 2021 -0700

    regex: copy back from Gnulib

    Copy regex-related files back from Gnulib, to fix a problem with
    static checking of regex calls noted by Martin Sebor.  This merges the
    following changes:

    * New macro __attribute_nonnull__ in misc/sys/cdefs.h, for use later
    when copying other files back from Gnulib.

    ... ... (unrelated things trimmed)
2022-07-02 11:31:13 +08:00
Xi Ruoyao
9b73f94474
revise the note about "already created" directories
Q: Why not just move the note after the creation of root-level
directories?
A: Root-level directories may be already created as well: if a
root-level directory is a mount point it should have been created in
section "Mounting the New Partition".

Reported-by: Vladimir Pertsev <info@linuxfromscratch.ru>
2022-05-30 18:30:50 +08:00
Xi Ruoyao
7c862eac22
GID 5 (for tty) is also special 2022-05-02 16:02:10 +08:00
Xi Ruoyao
0414633793
minor fix for 65534 explanation: it is also used for "unmapped" groups 2022-05-02 15:42:52 +08:00
Xi Ruoyao
8469f02115
make /etc/group sorted by GID 2022-05-02 15:39:45 +08:00
Xi Ruoyao
14de4552bf
explain the usage of 65534 2022-05-02 15:36:03 +08:00
Bruce Dubbs
8cab730a5b Merge branch 'trunk' of git.linuxfromscratch.org:lfs into trunk 2022-04-30 09:40:46 -05:00