From 8e8be5f129e67b01aff3c958aab56c48aa603101 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Thu, 26 Dec 2024 18:39:39 +0800 Subject: [PATCH 1/4] Use lfs-user entity in commands I still think it's cleaner for jhalfs to just use a different user name (for example "lfs1") if the user lfs already exists. This will allow jhalfs to easily use a different user name. --- chapter04/addinguser.xml | 12 ++++++------ chapter07/changingowner.xml | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/chapter04/addinguser.xml b/chapter04/addinguser.xml index e10a884b3..e33fbbf38 100644 --- a/chapter04/addinguser.xml +++ b/chapter04/addinguser.xml @@ -20,8 +20,8 @@ the installation process. As root, issue the following commands to add the new user: -groupadd lfs -useradd -s /bin/bash -g lfs -m -k /dev/null lfs +groupadd &lfs-user; +useradd -s /bin/bash -g &lfs-user; -m -k /dev/null &lfs-user; This is what the command line options mean: @@ -74,15 +74,15 @@ useradd -s /bin/bash -g lfs -m -k /dev/null lfs have a password), you need to set a password for &lfs-user;. Issue the following command as the &root; user to set the password: -passwd lfs +passwd &lfs-user; Grant lfs full access to all the directories under $LFS by making lfs the owner: -chown -v lfs $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools} +chown -v &lfs-user; $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools} case $(uname -m) in - x86_64) chown -v lfs $LFS/lib64 ;; + x86_64) chown -v &lfs-user; $LFS/lib64 ;; esac In some host systems, the following su command does not complete @@ -94,7 +94,7 @@ esac logging in as &lfs-user; on a virtual console, or with the following substitute/switch user command: -su - lfs +su - &lfs-user; The - instructs su to start a login shell as opposed to a non-login shell. diff --git a/chapter07/changingowner.xml b/chapter07/changingowner.xml index 16c052b39..b2e0ad9d5 100644 --- a/chapter07/changingowner.xml +++ b/chapter07/changingowner.xml @@ -33,9 +33,9 @@ user root by running the following command: -chown --from lfs -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools} +chown --from &lfs-user; -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools} case $(uname -m) in - x86_64) chown --from lfs -R root:root $LFS/lib64 ;; + x86_64) chown --from &lfs-user; -R root:root $LFS/lib64 ;; esac From 6528f7572074201a9cd3152b4e028fc117e138e5 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sun, 29 Dec 2024 15:57:31 +0100 Subject: [PATCH 2/4] Use as elements for lfs user and group The preceding commit uses elements to mark the lfs user and group in commands. Unfortunately, this change the rendering in html, because now lfs appears in an italic font. Using or allows parsing the XML for jhalfs, but does not change the html rendering. --- chapter04/addinguser.xml | 12 ++++++------ chapter07/changingowner.xml | 4 ++-- general.ent | 2 ++ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/chapter04/addinguser.xml b/chapter04/addinguser.xml index e33fbbf38..e1d130b95 100644 --- a/chapter04/addinguser.xml +++ b/chapter04/addinguser.xml @@ -20,8 +20,8 @@ the installation process. As root, issue the following commands to add the new user: -groupadd &lfs-user; -useradd -s /bin/bash -g &lfs-user; -m -k /dev/null &lfs-user; +groupadd &lfs-groupname; +useradd -s /bin/bash -g &lfs-groupname; -m -k /dev/null &lfs-username; This is what the command line options mean: @@ -74,15 +74,15 @@ useradd -s /bin/bash -g &lfs-user; -m -k /dev/null &lfs-user; -passwd &lfs-user; +passwd &lfs-username; Grant lfs full access to all the directories under $LFS by making lfs the owner: -chown -v &lfs-user; $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools} +chown -v &lfs-username; $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools} case $(uname -m) in - x86_64) chown -v &lfs-user; $LFS/lib64 ;; + x86_64) chown -v &lfs-username; $LFS/lib64 ;; esac In some host systems, the following su command does not complete @@ -94,7 +94,7 @@ esac logging in as &lfs-user; on a virtual console, or with the following substitute/switch user command: -su - &lfs-user; +su - &lfs-username; The - instructs su to start a login shell as opposed to a non-login shell. diff --git a/chapter07/changingowner.xml b/chapter07/changingowner.xml index b2e0ad9d5..178c7836e 100644 --- a/chapter07/changingowner.xml +++ b/chapter07/changingowner.xml @@ -33,9 +33,9 @@ user root by running the following command: -chown --from &lfs-user; -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools} +chown --from &lfs-username; -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools} case $(uname -m) in - x86_64) chown --from &lfs-user; -R root:root $LFS/lib64 ;; + x86_64) chown --from &lfs-username; -R root:root $LFS/lib64 ;; esac diff --git a/general.ent b/general.ent index 4e1480324..b3bce5ae8 100644 --- a/general.ent +++ b/general.ent @@ -134,6 +134,8 @@ root"> lfs"> +lfs"> +lfs"> devtmpfs"> /etc/fstab"> /boot"> From d11e5762bc544e1934ba1fc7b662deb8055419c4 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Fri, 3 Jan 2025 12:21:11 +0100 Subject: [PATCH 3/4] pip3 wheel should be remap="make" --- chapter08/flit-core.xml | 2 +- chapter08/jinja2.xml | 2 +- chapter08/setuptools.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/chapter08/flit-core.xml b/chapter08/flit-core.xml index 419efc30f..29194aa63 100644 --- a/chapter08/flit-core.xml +++ b/chapter08/flit-core.xml @@ -42,7 +42,7 @@ Build the package: -pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD +pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD Install the package: diff --git a/chapter08/jinja2.xml b/chapter08/jinja2.xml index c06da9139..efa50a582 100644 --- a/chapter08/jinja2.xml +++ b/chapter08/jinja2.xml @@ -42,7 +42,7 @@ Build the package: -pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD +pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD Install the package: diff --git a/chapter08/setuptools.xml b/chapter08/setuptools.xml index dfb31c5b8..8a404be73 100644 --- a/chapter08/setuptools.xml +++ b/chapter08/setuptools.xml @@ -42,7 +42,7 @@ Build the package: -pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD +pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD Install the package: From 389d8f53dbf434b948726e03b3c93031775bab04 Mon Sep 17 00:00:00 2001 From: "Douglas R. Reno" Date: Fri, 3 Jan 2025 11:59:15 -0600 Subject: [PATCH 4/4] Changelog: mark Python 3.13.1 as a security update --- chapter01/changelog.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 8e43698fc..712ac923d 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -106,7 +106,7 @@ #5559. - [bdubbs] - Update to Python-3.13.1. Fixes + [bdubbs] - Update to Python-3.13.1 (Security Update). Fixes #5605.