[jhalfs] 02/06: Add a custom/examples script for blfs tools configuration

"Git Owner" ([email protected] via alfs-discuss Mailing List) <[email protected]> Sat, 20 Dec 2025 22:23:19 +0000
Newsgroups gmane.linux.lfs.automated
Message-ID <[email protected]>
This is a multi-part message in MIME format...

------------=_1766269412-30781-51246
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch trunk
in repository jhalfs.

commit f76204413c2035b21307599a36631a7249056468
Author: Pierre Labastie <[email protected]>
AuthorDate: Sat Dec 20 18:03:48 2025 +0100

    Add a custom/examples script for blfs tools configuration
    
    This script show how to set up a regular user for using the blfs
    tools after they have been built in a jhalfs LFS build.
---
 custom/examples/950-hostconf | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/custom/examples/950-hostconf b/custom/examples/950-hostconf
new file mode 100644
index 0000000..1879119
--- /dev/null
+++ b/custom/examples/950-hostconf
@@ -0,0 +1,31 @@
+# This is a template for configuring the BLFS tools for a regular
+# user, after installing LFS. Edit and replace the fields between angle
+# brackets <..>
+#
+
+PKG=""
+PKG_VERSION=""
+PKG_FILE=""
+URL=""
+MD5=""
+for i in PATCH{1..10}; do
+   unset $i
+done
+PATCH1=""
+
+( cat << "xEOFx"
+# Replace <user info> with anything qualifying the user (usually firstname and
+# lastname), and <username> with the login name of the user.
+useradd -m -c '<user info>' <username>
+mv /blfs_root /home/<username>
+chown -R <username>:<username> /home/<username>/blfs_root
+chown -R <username>:<username> /var/lib/jhalfs/BLFS
+chown -R <username>:<username> /sources
+sed -i "s@/blfs_root@/home/<username>&@" /home/<username>/blfs_root/configuration
+sed -i "/SUDO/s/.*/SUDO=y/" /home/<username>/blfs_root/configuration
+sed -i "s@/blfs_root@/home/<username>&@" /home/<username>/blfs_root/packages.xml
+sed -i "s@/blfs_root@/home/<username>&@" /var/lib/jhalfs/BLFS/instpkg.xml
+echo <username> ALL=\(ALL:ALL\) NOPASSWD: ALL >/etc/sudoers.d/10-<username>
+chmod o-rw /etc/sudoers.d/10-<username>
+xEOFx
+) > tmp

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

------------=_1766269412-30781-51246
Content-Type: text/plain; charset="UTF-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0

-- 
http://lists.linuxfromscratch.org/sympa/info/alfs-discuss
Unsubscribe: See the above information page
------------=_1766269412-30781-51246--