diff --git a/chapter07/kernfs.xml b/chapter07/kernfs.xml index 00a971b59..067a614f4 100644 --- a/chapter07/kernfs.xml +++ b/chapter07/kernfs.xml @@ -63,11 +63,14 @@ Now mount the remaining virtual kernel file systems: -mount -v --bind /dev/pts $LFS/dev/pts + + +mount -vt devpts devpts -o gid=5,mode=0620 $LFS/dev/pts mount -vt proc proc $LFS/proc mount -vt sysfs sysfs $LFS/sys mount -vt tmpfs tmpfs $LFS/run - + In some host systems, /dev/shm is a - symbolic link to /run/shm. + symbolic link to a directory, typically + /run/shm. The /run tmpfs was mounted above so in this case only a - directory needs to be created. + directory needs to be created with the correct permissions. In other host systems /dev/shm is a mount point for a tmpfs. In that case the mount of /dev above will only create @@ -107,7 +111,7 @@ mount -vt tmpfs tmpfs $LFS/run we must explicitly mount a tmpfs: if [ -h $LFS/dev/shm ]; then - (cd $LFS/dev; mkdir $(readlink shm)) + install -v -d -m 1777 $LFS$(realpath /dev/shm) else mount -vt tmpfs -o nosuid,nodev tmpfs $LFS/dev/shm fi diff --git a/chapter08/bash.xml b/chapter08/bash.xml index 4b5b47e62..1490e7791 100644 --- a/chapter08/bash.xml +++ b/chapter08/bash.xml @@ -83,7 +83,7 @@ Expect and run the tests as the tester user: -su -s /usr/bin/expect tester << EOF +su -s /usr/bin/expect tester << "EOF" set timeout -1 spawn make tests expect eof diff --git a/chapter08/expect.xml b/chapter08/expect.xml index 1974d50f1..a3e8f0981 100644 --- a/chapter08/expect.xml +++ b/chapter08/expect.xml @@ -48,6 +48,25 @@ Installation of Expect + Expect needs PTYs to work. Verify that the PTYs are working + properly inside the chroot environment by performing a simple + test: + +python3 -c 'from pty import spawn; spawn(["echo", "ok"])' + + This command should output ok. + If, instead, the output includes OSError: out of pty + devices, then the environment is not set up for proper + PTY operation. You need to exit from the chroot environment, read + again, and ensure the + devpts file system (and + other virtual kernel file systems) mounted correctly. Then reenter + the chroot environment following . + This issue needs to be resolved before continuing, or the test suites + requring Expect (for example the test suites of Bash, Binutils, GCC, + GDBM, and of course Expect itself) will fail catastrophically, and other + subtle breakages may also happen. + &update-config-text; tar -C tclconfig &update-config-arg; @@ -86,27 +105,10 @@ make - - The test suite for Expect is considered critical. - Do not skip it under any circumstances. - - To test the results, issue: make test - If any test fails with the message - The system has no more ptys. Ask your system - administrator to create more, it indicates - you've not mounted the - devpts file system - correctly. You need to exit from the chroot environment, read - again, and ensure the - devpts file system (and - other virtual kernel file systems) mounted correctly. Then reenter - the chroot environment following . - This issue needs to be resolved before continuing. - Install the package: make install diff --git a/chapter08/glibc.xml b/chapter08/glibc.xml index e09fe4900..64ed3b630 100644 --- a/chapter08/glibc.xml +++ b/chapter08/glibc.xml @@ -309,10 +309,11 @@ install -vm755 dest/usr/lib/*.so.* /usr/lib - Then continue to run the make install command - and the sed command against - /usr/bin/ldd. Once they are finished, reboot - the system immediately. + Then continue to run the make install command, + the sed command against + /usr/bin/ldd, and the commands to install + the locales. Once they are finished, reboot the system + immediately. diff --git a/chapter11/afterlfs.xml b/chapter11/afterlfs.xml index ff8bae006..633a782df 100644 --- a/chapter11/afterlfs.xml +++ b/chapter11/afterlfs.xml @@ -130,7 +130,7 @@ mounttype proc proc proc mounttype sys sysfs sysfs mounttype run tmpfs run if [ -h $LFS/dev/shm ]; then - mkdir -pv $LFS/$(readlink $LFS/dev/shm) + install -v -d -m 1777 $LFS$(realpath /dev/shm) else mounttype dev/shm tmpfs tmpfs -o nosuid,nodev fi diff --git a/lfs-latest-git.php b/lfs-latest-git.php index 162d8d6c8..c2414789a 100644 --- a/lfs-latest-git.php +++ b/lfs-latest-git.php @@ -152,6 +152,7 @@ if ( $package == "tcl" ) $dirpath = "https://www.tcl.tk/software/tcltk/do 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 == "xz" ) $dirpath = github("tukaani-project/xz"); if ( $package == "zlib" ) $dirpath = "https://www.zlib.net"; if ( $package == "zstd" ) $dirpath = github("facebook/zstd");