diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 43fbbd6b7..5e6eae470 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -45,6 +45,23 @@ 2020-05-28 + + [bdubbs] - Add an unprivileged user, tester, at the + beginning of Chapter 6 for running some tests. This + user is then removed at the end of the chapter. + + + [bdubbs] - Update to zstd-1.4.5. Fixes + #4660. + + + [bdubbs] - Update to util-linux-2.35.2. Fixes + #4659. + + + [bdubbs] - Update to bison-3.6.2. Fixes + #4657. + [pierre] - Update to linux-5.6.15. Fixes #4658. @@ -66,8 +83,8 @@ [pierre] - Bash: do not use "su -c command" to change user - to nobody: it removes the controlling terminal and makes some - tests fail. Use "su << EOF" instead. + to nobody: it removes the controlling terminal and makes some + tests fail. Use "su << EOF" instead. [pierre] - Mount /dev/pts with "--bind", so that "tty" diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index 1076ba6a1..7b009d1e3 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -242,9 +242,9 @@ Tzdata-&tzdata-version; - + Vim-&vim-version; @@ -257,9 +257,9 @@ - + + The tester user does not have enough permissions for all the tests to pass. This shows up in some diff output in four test results. diff --git a/chapter06/coreutils.xml b/chapter06/coreutils.xml index 50907ae11..e3ab4a679 100644 --- a/chapter06/coreutils.xml +++ b/chapter06/coreutils.xml @@ -108,35 +108,35 @@ FORCE_UNSAFE_CONFIGURE=1 ./configure \ Now the test suite is ready to be run. First, run the tests that are meant to be run as user root: -make NON_ROOT_USERNAME=nobody check-root +make NON_ROOT_USERNAME=tester check-root We're going to run the remainder of the tests as the - nobody user. Certain tests, + tester user. Certain tests, however, require that the user be a member of more than one group. So that these tests are not skipped we'll add a temporary group and make the - user nobody a part of it: + user tester a part of it: -echo "dummy:x:1000:nobody" >> /etc/group +echo "tester:x:1000:nogroup" >> /etc/group Fix some of the permissions so that the non-root user can compile and run the tests: -chown -Rv nobody . +chown -Rv tester . Now run the tests. Make sure the PATH in the su environment includes /tools/bin. -su nobody -s /bin/bash -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check" +su tester -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check" + Remove the temporary group: sed -i '/dummy/d' /etc/group - +--> Install the package: make install diff --git a/chapter06/createfiles.xml b/chapter06/createfiles.xml index 8cb6175cb..8e7b78410 100644 --- a/chapter06/createfiles.xml +++ b/chapter06/createfiles.xml @@ -342,6 +342,12 @@ EOF administrator since well-written programs do not depend on GID numbers, but rather use the group's name. + Some tests later in the chapter need a regular user. We add this + user here and delete this account at the end of the chapter. + +echo "tester:x:101:101::/tmp:/bin/bash" >> /etc/passwd +echo "tester:x:101:dummy" >> /etc/group + To remove the I have no name! prompt, start a new shell. Since a full Glibc was installed in and the diff --git a/chapter06/gcc.xml b/chapter06/gcc.xml index 550ee44fe..2c41fee2e 100644 --- a/chapter06/gcc.xml +++ b/chapter06/gcc.xml @@ -115,8 +115,8 @@ cd build Test the results as a non-privileged user, but do not stop at errors: -chown -Rv nobody . -su nobody -s /bin/bash -c "PATH=$PATH make -k check" +chown -Rv tester . +su tester -c "PATH=$PATH make -k check" To receive a summary of the test suite results, run: @@ -156,7 +156,7 @@ su nobody -s /bin/bash -c "PATH=$PATH make -k check" rm -rf /usr/lib/gcc/$(gcc -dumpmachine)/&gcc-version;/include-fixed/bits/ The GCC build directory is owned by - nobody now and the ownership of the installed header + tester now and the ownership of the installed header directory (and its content) will be incorrect. Change the ownership to root user and group: diff --git a/chapter06/revisedchroot.xml b/chapter06/revisedchroot.xml index eb40fb7ce..c39084882 100644 --- a/chapter06/revisedchroot.xml +++ b/chapter06/revisedchroot.xml @@ -70,4 +70,8 @@ rm -f /usr/lib/libz.a url="&blfs-book;/introduction/la-files.html">BLFS section "About Libtool Archive (.la) files". + Finally, remove the temporary 'tester' usr account created at the + beginning of this chapter. + +sed -i '/tester/d' /etc/passwd /etc/group diff --git a/chapter06/util-linux.xml b/chapter06/util-linux.xml index 6a6a5bcc5..036f5db82 100644 --- a/chapter06/util-linux.xml +++ b/chapter06/util-linux.xml @@ -115,8 +115,8 @@ rm -vf /usr/lib/pkgconfig/{blkid,fdisk,mount,uuid}.pc bash tests/run.sh --srcdir=$PWD --builddir=$PWD -chown -Rv nobody . -su nobody -s /bin/bash -c "PATH=$PATH make -k check" +chown -Rv tester . +su tester -c "make -k check" Install the package: diff --git a/chapter06/vim.xml b/chapter06/vim.xml index 2f91d5c33..263122bd7 100644 --- a/chapter06/vim.xml +++ b/chapter06/vim.xml @@ -67,15 +67,15 @@ make To prepare the tests, ensure that the - nobody user can write + tester user can write to the sources tree: -chown -Rv nobody . +chown -Rv tester . Now run the tests as the nobody user: + class="username">tester user: -su nobody -s /bin/bash -c "LANG=en_US.UTF-8 make -j1 test" &> vim-test.log +su tester -c "LANG=en_US.UTF-8 make -j1 test" &> vim-test.log diff --git a/packages.ent b/packages.ent index d95edb03f..1bdc09625 100644 --- a/packages.ent +++ b/packages.ent @@ -70,10 +70,10 @@ - - + + - + @@ -428,7 +428,7 @@ - + @@ -690,10 +690,10 @@ - - + + - + @@ -737,10 +737,10 @@ - - + + - +