diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index f0f45fc81..b577d0b47 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -42,6 +42,18 @@ or as appropriate for the entry or if needed the entire day's listitem. --> + + 2020-05-31 + + + [pierre] - Fix bash tests: add a couple of symlinks + from /bin to /tools, create the tester user with the uid of + the tty owner, run the bash tests with su << EOF, and + explicitely defining stdin (with help from thomas and bdubbs). + + + + 2020-05-29 diff --git a/chapter05/createfiles.xml b/chapter05/createfiles.xml index ce1f67ba7..aed8d79da 100644 --- a/chapter05/createfiles.xml +++ b/chapter05/createfiles.xml @@ -160,7 +160,7 @@ EOF user. We add this user here and delete this account at the end of that chapter. -echo "tester:x:101:101::/home/tester:/bin/bash" >> /etc/passwd +echo "tester:x:$(ls -n $(tty) | cut -d" " -f3):101::/home/tester:/bin/bash" >> /etc/passwd echo "tester:x:101:" >> /etc/group install -o tester -d /home/tester diff --git a/chapter06/bash.xml b/chapter06/bash.xml index ae42cf4cb..4d06fc2a3 100644 --- a/chapter06/bash.xml +++ b/chapter06/bash.xml @@ -80,7 +80,9 @@ Now, run the tests as the tester user: -su tester -c "PATH=$PATH make tests" +su tester << EOF +PATH=$PATH make tests < $(tty) +EOF The tester user does not have enough permissions for all the tests to pass. This shows diff --git a/chapter06/coreutils.xml b/chapter06/coreutils.xml index 6a12d4e80..5a4079d78 100644 --- a/chapter06/coreutils.xml +++ b/chapter06/coreutils.xml @@ -116,7 +116,7 @@ FORCE_UNSAFE_CONFIGURE=1 ./configure \ these tests are not skipped we'll add a temporary group and make the user tester a part of it: -echo "dummy:x:1000:tester" >> /etc/group +echo "dummy:x:102:tester" >> /etc/group Fix some of the permissions so that the non-root user can compile and run the tests: diff --git a/general.ent b/general.ent index d6ec5a6b5..2e518c356 100644 --- a/general.ent +++ b/general.ent @@ -1,13 +1,13 @@ - + - + - +