From 813ab55675c99ee4040c38ee468d4bf9b70bdd19 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Sat, 30 Apr 2022 09:38:48 -0500 Subject: [PATCH 1/6] Package updates and nobody uid change. Change nobody/nogroup uid/git to 65534. Update to meson-0.62.1. Update to libpipeline-1.5.6. Update to elfutils-0.187. Update to Jinja2-3.1.2. Update to vim-8.2.4814. Update to sysvinit-3.03. Update to linux-5.17.5. Update to gcc-11.3.0. Update to coreutils-9.1. Update to bc-5.2.4. --- chapter01/changelog.xml | 49 ++++++++++++++++++++++++++++++++ chapter01/whatsnew.xml | 60 +++++++++++++++++++-------------------- chapter03/patches.xml | 5 ++-- chapter07/createfiles.xml | 8 +++--- chapter08/coreutils.xml | 10 ++----- chapter08/gcc.xml | 13 ++------- packages.ent | 60 +++++++++++++++++++-------------------- patches.ent | 10 +++---- 8 files changed, 126 insertions(+), 89 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index d437be0fc..7fb586b09 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,55 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 2022-05-01 + + + [bdubbs] - Change nobody/nogroup uid/git to 65534. + + + [bdubbs] - Update to meson-0.62.1. Fixes + #5052. + + + [bdubbs] - Update to libpipeline-1.5.6. Fixes + #5053. + + + [bdubbs] - Update to elfutils-0.187. Fixes + #5054. + + + [bdubbs] - Update to Jinja2-3.1.2. Fixes + #5055. + + + [bdubbs] - Update to vim-8.2.4814. Addresses + #4500. + + + [bdubbs] - Update to sysvinit-3.03. Fixes + #5046. + + + [bdubbs] - Update to linux-5.17.5. Fixes + #5050. + + + [bdubbs] - Update to gcc-11.3.0. Fixes + #5051. + + + [bdubbs] - Update to coreutils-9.1. Fixes + #5048. + + + [bdubbs] - Update to bc-5.2.4. Fixes + #5049. + + + + 2022-04-15 diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index 04cc9985e..6ae480aa0 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -35,19 +35,19 @@ - - Bc &bc-version; - - - - D-Bus-&dbus-version; - - + @@ -92,16 +92,16 @@ - - - - - Gzip-&gzip-version; - - - - - + Libtool-&libtool-version; Linux-&linux-version; - @@ -224,13 +224,13 @@ - - - @@ -263,7 +263,7 @@ Zlib-&zlib-version; - diff --git a/chapter03/patches.xml b/chapter03/patches.xml index 83ada1927..bed7d4735 100644 --- a/chapter03/patches.xml +++ b/chapter03/patches.xml @@ -59,14 +59,15 @@ MD5 sum: &coreutils-i18n-patch-md5; - + - + Now prepare Coreutils for compilation: @@ -133,8 +128,9 @@ FORCE_UNSAFE_CONFIGURE=1 ./configure \ su tester -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check" + Remove the temporary group: sed -i '/dummy/d' /etc/group diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index 16bb5f99f..5bf97ea43 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -40,7 +40,7 @@ Installation of GCC - + If building on x86_64, change the default directory name for 64-bit libraries to lib: @@ -135,15 +135,6 @@ su tester -c "PATH=$PATH make -k check" Eight tests related to analyzer are known to fail. - - One test named asan_test.C is known to - fail. - - - In libstdc++, one test named 49745.cc is - known to fail because the header dependencies in glibc have - changed. - In libstdc++, one numpunct test and six tests related to get_time are known to fail. These are all because the locale definitions in glibc have changed but libstdc++ does not currently support those changes. diff --git a/packages.ent b/packages.ent index 60d7a6f61..37daba503 100644 --- a/packages.ent +++ b/packages.ent @@ -58,10 +58,10 @@ - + - + @@ -104,10 +104,10 @@ - - + + - + @@ -148,10 +148,10 @@ - - + + - + @@ -217,11 +217,11 @@ - - + + - - + + @@ -353,10 +353,10 @@ - - + + - + @@ -409,10 +409,10 @@ - - + + - + @@ -427,12 +427,12 @@ - + - + - + - + diff --git a/patches.ent b/patches.ent index dbbfdc2a6..2bd68296b 100644 --- a/patches.ent +++ b/patches.ent @@ -21,13 +21,13 @@ - + - + - + From d77e98c7e85b2d0f955ca845af208a733d301bde Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 2 May 2022 15:08:43 +0800 Subject: [PATCH 2/6] fix a typo in changelog --- chapter01/changelog.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 7fb586b09..fd0608d02 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -44,7 +44,7 @@ 2022-05-01 - [bdubbs] - Change nobody/nogroup uid/git to 65534. + [bdubbs] - Change nobody/nogroup uid/gid to 65534. [bdubbs] - Update to meson-0.62.1. Fixes From 14de4552bfc176646e1365a1bf85035486ced218 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 2 May 2022 15:36:03 +0800 Subject: [PATCH 3/6] explain the usage of 65534 --- chapter07/createfiles.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/chapter07/createfiles.xml b/chapter07/createfiles.xml index 7df2acde6..ca148f966 100644 --- a/chapter07/createfiles.xml +++ b/chapter07/createfiles.xml @@ -169,6 +169,15 @@ EOF freely by the system administrator since well-written programs do not depend on GID numbers, but rather use the group's name. + The ID 65534 is used by the kernel for NFS and separate user + namespaces for unmapped users (those exist on the NFS server or the parent + user namespace, but do not exist on the local machine or in + the separate namespace). We assign + nobody and + nogroup for it to avoid an + unnamed ID. But other distros may treat this ID differently, so any + portable program should not depend on this assignment. + Some tests in need a regular user. We add this user here and delete this account at the end of that chapter. From 8469f02115f88b071736eac9c1fcbdd16bb80cd4 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 2 May 2022 15:39:45 +0800 Subject: [PATCH 4/6] make /etc/group sorted by GID --- chapter07/createfiles.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chapter07/createfiles.xml b/chapter07/createfiles.xml index ca148f966..24557a1ef 100644 --- a/chapter07/createfiles.xml +++ b/chapter07/createfiles.xml @@ -116,8 +116,8 @@ mail:x:34: kvm:x:61: uuidd:x:80: wheel:x:97: -nogroup:x:65534: -users:x:999: +users:x:999: +nogroup:x:65534: EOF cat > /etc/group << "EOF" @@ -153,8 +153,8 @@ systemd-coredump:x:79: uuidd:x:80: systemd-oom:x:81: wheel:x:97: -nogroup:x:65534: -users:x:999: +users:x:999: +nogroup:x:65534: EOF The created groups are not part of any standard—they are groups From 0414633793e568fd49a4b1fbae74fada9ab48838 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 2 May 2022 15:41:52 +0800 Subject: [PATCH 5/6] minor fix for 65534 explanation: it is also used for "unmapped" groups --- chapter07/createfiles.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chapter07/createfiles.xml b/chapter07/createfiles.xml index 24557a1ef..71cb39c1f 100644 --- a/chapter07/createfiles.xml +++ b/chapter07/createfiles.xml @@ -170,9 +170,9 @@ EOF on GID numbers, but rather use the group's name. The ID 65534 is used by the kernel for NFS and separate user - namespaces for unmapped users (those exist on the NFS server or the parent - user namespace, but do not exist on the local machine or in - the separate namespace). We assign + namespaces for unmapped users and groups (those exist on the NFS server + or the parent user namespace, but do not exist on the local + machine or in the separate namespace). We assign nobody and nogroup for it to avoid an unnamed ID. But other distros may treat this ID differently, so any From 7c862eac22b81a8224a9b9c549bb2eebb3f77b7f Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 2 May 2022 16:02:10 +0800 Subject: [PATCH 6/6] GID 5 (for tty) is also special --- chapter07/createfiles.xml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/chapter07/createfiles.xml b/chapter07/createfiles.xml index 71cb39c1f..eda30ed2e 100644 --- a/chapter07/createfiles.xml +++ b/chapter07/createfiles.xml @@ -165,9 +165,14 @@ EOF url="http://refspecs.linuxfoundation.org/lsb.shtml"/>) only recommends that, besides the group root with a Group ID (GID) of 0, a group bin - with a GID of 1 be present. All other group names and GIDs can be chosen - freely by the system administrator since well-written programs do not depend - on GID numbers, but rather use the group's name. + with a GID of 1 be present. The GID of 5 is widely used for + tty group, and the number 5 is + also used in systemd + /etc/fstab for the + devpts filesystem. + All other group names and GIDs can be chosen freely by the system + administrator since well-written programs do not depend on GID numbers, + but rather use the group's name. The ID 65534 is used by the kernel for NFS and separate user namespaces for unmapped users and groups (those exist on the NFS server