Author: pierre
Date: Thu Sep 17 08:30:29 2020
New Revision: 4205
Log:
Fix changing the ownership of $BUILDDIR/var/lib to LUSER when it has been
created by func_install_blfs. Fixes ticket #1729
Modified:
jhalfs/trunk/LFS/master.sh
jhalfs/trunk/common/libs/func_install_blfs
Modified: jhalfs/trunk/LFS/master.sh
==============================================================================
--- jhalfs/trunk/LFS/master.sh Tue Sep 15 05:39:59 2020 (r4204)
+++ jhalfs/trunk/LFS/master.sh Thu Sep 17 08:30:29 2020 (r4205)
@@ -70,7 +70,7 @@
cp ${CONFIG} $BUILDDIR/sources/kernel-config ;;
esac
# Grab the name of the target
- # This is only use to check the name in "opt_override" or "BLACKIST"
+ # This is only used to check the name in "opt_override" or "BLACKIST"
name=`echo ${this_script} | sed -e 's@[0-9]\{3,4\}-@@' \
-e 's@-pass[0-9]\{1\}@@' \
-e 's@-libstdc++@@' \
@@ -142,6 +142,8 @@
case "${this_script}" in
*addinguser)
(
+# /var/lib may already exist and be owned by root if blfs tools
+# have been installed.
cat << EOF
@if [ -f luser-id ]; then \\
function useradd() { true; }; \\
@@ -152,6 +154,8 @@
\$(CMDSDIR)/`dirname $file`/\$@ >> \$(LOGDIR)/\$@ 2>&1; \\
\$(PRT_DU) >>logs/\$@
@chown \$(LUSER):\$(LGROUP) envars
+ @[ -d "\$(MOUNT_PT)/var/lib" ] && \\
+ chown \$(LUSER):\$(LGROUP) \$(MOUNT_PT)/var/lib
@chmod -R a+wt $JHALFSDIR
@chmod a+wt \$(SRCSDIR)
EOF
Modified: jhalfs/trunk/common/libs/func_install_blfs
==============================================================================
--- jhalfs/trunk/common/libs/func_install_blfs Tue Sep 15 05:39:59 2020
(r4204)
+++ jhalfs/trunk/common/libs/func_install_blfs Thu Sep 17 08:30:29 2020
(r4205)
@@ -62,8 +62,10 @@
$BUILDDIR$BLFS_ROOT/packages.xml
# But then $BUILDDIR/var/lib/ is owned by root if just created, which
-# prevents $LUSER to create "nss_db". Change ownership here
-sudo chown $LUSER:$LGROUP $BUILDDIR/var/lib
+# prevents $LUSER to create "nss_db". The problem is that $LUSER
+# May not have been created yet. So do not change ownership here
+# and do it in master.sh for chapter 4.
+#sudo chown $LUSER:$LGROUP $BUILDDIR/var/lib
# Because the BLFS Makefile is supposed to be used in chroot (or booted)
# mode, the tracking file has wrong path for DTD. Change it:
--
http://lists.linuxfromscratch.org/listinfo/alfs-log
Unsubscribe: See the above information page