r3198 - in jhalfs/trunk: CLFS CLFS2 HLFS LFS common

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Wed Nov 1 07:41:56 PST 2006


Author: manuel
Date: 2006-11-01 08:41:52 -0700 (Wed, 01 Nov 2006)
New Revision: 3198

Modified:
   jhalfs/trunk/CLFS/master.sh
   jhalfs/trunk/CLFS2/master.sh
   jhalfs/trunk/HLFS/master.sh
   jhalfs/trunk/LFS/master.sh
   jhalfs/trunk/common/common-functions
Log:
Fixed du bug related to lost+found permissions.
Using PRT_DU and PRT_DU_CHR in all places.
Using logs/$@ in all places.
Fixed du meassurament in LFS build for changingowner and kernfs scripts.

Modified: jhalfs/trunk/CLFS/master.sh
===================================================================
--- jhalfs/trunk/CLFS/master.sh	2006-11-01 12:28:32 UTC (rev 3197)
+++ jhalfs/trunk/CLFS/master.sh	2006-11-01 15:41:52 UTC (rev 3198)
@@ -1146,8 +1146,8 @@
 
 SU_LUSER     = su - \$(LUSER) -c
 LUSER_HOME   = /home/\$(LUSER)
-PRT_DU       = echo -e "\nKB: \`du -skx --exclude=jhalfs \$(MOUNT_PT)\`\n"
-PRT_DU_CR    = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) / \`\n"
+PRT_DU       = echo -e "\nKB: \`du -skx --exclude=jhalfs --exclude=lost+found \$(MOUNT_PT)\`\n"
+PRT_DU_CR    = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found / \`\n"
 
 export PATH := \${PATH}:/usr/sbin
 

Modified: jhalfs/trunk/CLFS2/master.sh
===================================================================
--- jhalfs/trunk/CLFS2/master.sh	2006-11-01 12:28:32 UTC (rev 3197)
+++ jhalfs/trunk/CLFS2/master.sh	2006-11-01 15:41:52 UTC (rev 3198)
@@ -450,7 +450,7 @@
 TESTLOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/test-logs
 
 SU_LUSER   = su - \$(LUSER) -c
-PRT_DU     = echo -e "\nKB: \`du -skx --exclude=jhalfs \$(MOUNT_PT)\`\n"
+PRT_DU     = echo -e "\nKB: \`du -skx --exclude=jhalfs --exclude=lost+found \$(MOUNT_PT)\`\n"
 LUSER_HOME = /home/\$(LUSER)
 
 export PATH := \${PATH}:/usr/sbin

Modified: jhalfs/trunk/HLFS/master.sh
===================================================================
--- jhalfs/trunk/HLFS/master.sh	2006-11-01 12:28:32 UTC (rev 3197)
+++ jhalfs/trunk/HLFS/master.sh	2006-11-01 15:41:52 UTC (rev 3198)
@@ -518,8 +518,8 @@
 
 SU_LUSER     = su - \$(LUSER) -c
 LUSER_HOME   = /home/\$(LUSER)
-PRT_DU       = echo -e "\nKB: \`du -skx --exclude=jhalfs \$(MOUNT_PT)\`\n"
-PRT_DU_CR    = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) / \`\n"
+PRT_DU       = echo -e "\nKB: \`du -skx --exclude=jhalfs --exclude=lost+found \$(MOUNT_PT)\`\n"
+PRT_DU_CR    = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found / \`\n"
 
 export PATH := \${PATH}:/usr/sbin
 

Modified: jhalfs/trunk/LFS/master.sh
===================================================================
--- jhalfs/trunk/LFS/master.sh	2006-11-01 12:28:32 UTC (rev 3197)
+++ jhalfs/trunk/LFS/master.sh	2006-11-01 15:41:52 UTC (rev 3198)
@@ -225,7 +225,12 @@
     #
     # Drop in the name of the target on a new line, and the previous target
     # as a dependency. Also call the echo_message function.
-    CHROOT_wrt_target "${this_script}${N}" "$PREV"
+    # In the mount of kernel filesystems we need to set LFS
+    # and not to use chroot.
+    case "${this_script}" in
+      *kernfs)  LUSER_wrt_target  "${this_script}" "$PREV" ;;
+      *)        CHROOT_wrt_target "${this_script}${N}" "$PREV" ;;
+    esac
 
     # If $pkg_tarball isn't empty, we've got a package...
     # Insert instructions for unpacking the package and changing directories
@@ -402,8 +407,8 @@
 
 SU_LUSER     = su - \$(LUSER) -c
 LUSER_HOME   = /home/\$(LUSER)
-PRT_DU       = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) \$(MOUNT_PT) \`\n"
-PRT_DU_CR    = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) / \`\n"
+PRT_DU       = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found \$(MOUNT_PT) \`\n"
+PRT_DU_CR    = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found / \`\n"
 
 export PATH := \${PATH}:/usr/sbin
 

Modified: jhalfs/trunk/common/common-functions
===================================================================
--- jhalfs/trunk/common/common-functions	2006-11-01 12:28:32 UTC (rev 3197)
+++ jhalfs/trunk/common/common-functions	2006-11-01 15:41:52 UTC (rev 3198)
@@ -66,7 +66,7 @@
 #----------------------------------#
 wrt_RunAsRoot() {                  # Some scripts must be run as root..
 #----------------------------------#
-  local ENV_MOUNT
+  local MOUNT_ENV
   local this_script=$1
   local file=$2
 
@@ -82,7 +82,7 @@
 (
 cat << EOF
 	@( time { export ${MOUNT_ENV}=\$(MOUNT_PT) && ${PROGNAME}-commands/`dirname $file`/\$@ >>logs/\$@ 2>&1 ; } ) 2>>logs/\$@ && \\
-	\$(PRT_DU_CR) >>logs/\$@
+	\$(PRT_DU) >>logs/\$@
 EOF
 ) >> $MKFILE.tmp
 }
@@ -97,8 +97,8 @@
   local file=$1
 (
 cat << EOF
-	@( time { source envars && \$(CMDSDIR)/$file >>logs/$this_script 2>&1 ; } ) 2>>logs/$this_script && \\
-	\$(PRT_DU_CR) >>logs/$this_script
+	@( time { source envars && \$(CMDSDIR)/$file >>logs/\$@ 2>&1 ; } ) 2>>logs/\$@ && \\
+	\$(PRT_DU_CR) >>logs/\$@
 EOF
 ) >> $MKFILE.tmp
 }
@@ -139,7 +139,8 @@
 $i:  $PREV
 	@\$(call echo_message, Building)
 	@./progress_bar.sh \$@ \$\$PPID &
-	@echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) \$(MOUNT_PT)\`\n" >logs/\$@
+	@echo -e "\n\`date\`\n" >logs/\$@ &
+	@\$(PRT_DU) >>logs/\$@
 EOF
 ) >> $MKFILE.tmp
 }
@@ -228,7 +229,7 @@
   local PREV=$2
   case $i in
     iteration* ) local LOGFILE="${this_script}.log" ;;
-             * ) local LOGFILE="${this_script}"      ;;
+             * ) local LOGFILE="\$@"      ;;
   esac
 (
 cat << EOF
@@ -236,7 +237,8 @@
 $i:  $PREV
 	@\$(call echo_message, Building)
 	@./progress_bar.sh \$@ \$\$PPID &
-	@echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) / \`\n" >logs/$LOGFILE
+	@echo -e "\n\`date\`\n" >logs/$LOGFILE &
+	@\$(PRT_DU_CR) >>logs/$LOGFILE
 EOF
 ) >> $MKFILE.tmp
 }
@@ -283,8 +285,8 @@
   local file=$1
 (
 cat << EOF
-	@( time { source envars && \$(crCMDSDIR)/$file >>logs/$this_script 2>&1 ; } ) 2>>logs/$this_script && \\
-	\$(PRT_DU_CR) >>logs/$this_script
+	@( time { source envars && \$(crCMDSDIR)/$file >>logs/\$@ 2>&1 ; } ) 2>>logs/\$@ && \\
+	\$(PRT_DU_CR) >>logs/\$@
 EOF
 ) >> $MKFILE.tmp
 
@@ -296,7 +298,7 @@
 #----------------------------------#
 (
 cat << EOF
-	@( time { cp -v /sources/fstab /etc/fstab >>logs/${this_script} 2>&1 ; } ) 2>>logs/${this_script}
+	@( time { cp -v /sources/fstab /etc/fstab >>logs/\$@ 2>&1 ; } ) 2>>logs/\$@
 EOF
 ) >> $MKFILE.tmp
 }




More information about the alfs-log mailing list