r2769 - in jhalfs/branches/experimental: CLFS HLFS LFS common

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sat Jun 10 09:48:26 PDT 2006


Author: manuel
Date: 2006-06-10 10:48:25 -0600 (Sat, 10 Jun 2006)
New Revision: 2769

Modified:
   jhalfs/branches/experimental/CLFS/master.sh
   jhalfs/branches/experimental/HLFS/master.sh
   jhalfs/branches/experimental/LFS/master.sh
   jhalfs/branches/experimental/common/common-functions
   jhalfs/branches/experimental/common/func_compare.sh
   jhalfs/branches/experimental/common/makefile-functions
   jhalfs/branches/experimental/common/progress_bar.sh
Log:
Merged r2754:2768 from trunk.

Modified: jhalfs/branches/experimental/CLFS/master.sh
===================================================================
--- jhalfs/branches/experimental/CLFS/master.sh	2006-06-10 16:43:01 UTC (rev 2768)
+++ jhalfs/branches/experimental/CLFS/master.sh	2006-06-10 16:48:25 UTC (rev 2769)
@@ -20,20 +20,24 @@
 cat << EOF
 023-creatingtoolsdir:
 	@\$(call echo_message, Building)
-	@mkdir -v \$(MOUNT_PT)/tools && \\
-	rm -fv /tools && \\
-	ln -sv \$(MOUNT_PT)/tools /
+	@mkdir \$(MOUNT_PT)/tools && \\
+	rm -f /tools && \\
+	ln -s \$(MOUNT_PT)/tools /
 	@if [ ! -d \$(MOUNT_PT)/sources ]; then \\
 		mkdir \$(MOUNT_PT)/sources; \\
 	fi;
 	@chmod a+wt \$(MOUNT_PT)/sources && \\
-	touch \$@
+	touch \$@ && \\
+	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
+	echo --------------------------------------------------------------------------------\$(WHITE)
 
 024-creatingcrossdir: 023-creatingtoolsdir
 	@mkdir -v \$(MOUNT_PT)/cross-tools && \\
-	rm -fv /cross-tools && \\
-	ln -sv \$(MOUNT_PT)/cross-tools /
-	@touch \$@
+	rm -f /cross-tools && \\
+	ln -s \$(MOUNT_PT)/cross-tools /
+	@touch \$@ && \\
+	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
+	echo --------------------------------------------------------------------------------\$(WHITE)
 
 025-addinguser:  024-creatingcrossdir
 	@\$(call echo_message, Building)
@@ -47,15 +51,17 @@
 	chown lfs \$(MOUNT_PT)/tools && \\
 	chown lfs \$(MOUNT_PT)/cross-tools && \\
 	chown lfs \$(MOUNT_PT)/sources && \\
-	touch \$@
+	touch \$@ && \\
+	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
+	echo --------------------------------------------------------------------------------\$(WHITE)
 
 026-settingenvironment:  025-addinguser
 	@\$(call echo_message, Building)
 	@if [ -f /home/lfs/.bashrc -a ! -f /home/lfs/.bashrc.XXX ]; then \\
-		mv -v /home/lfs/.bashrc /home/lfs/.bashrc.XXX; \\
+		mv /home/lfs/.bashrc /home/lfs/.bashrc.XXX; \\
 	fi;
 	@if [ -f /home/lfs/.bash_profile  -a ! -f /home/lfs/.bash_profile.XXX ]; then \\
-		mv -v /home/lfs/.bash_profile /home/lfs/.bash_profile.XXX; \\
+		mv /home/lfs/.bash_profile /home/lfs/.bash_profile.XXX; \\
 	fi;
 	@echo "set +h" > /home/lfs/.bashrc && \\
 	echo "umask 022" >> /home/lfs/.bashrc && \\
@@ -73,7 +79,9 @@
 	echo "source $JHALFSDIR/envars" >> /home/lfs/.bashrc
 	@chown lfs:lfs /home/lfs/.bashrc && \\
 	touch envars && \\
-	touch \$@
+	touch \$@ && \\
+	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
+	echo --------------------------------------------------------------------------------\$(WHITE)
 EOF
 ) >> $MKFILE.tmp
 
@@ -138,7 +146,7 @@
     [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}"
     #
     # Include a touch of the target name so make can check if it's already been made.
-    echo -e '\t at touch $@' >> $MKFILE.tmp
+    wrt_touch
     #
     #--------------------------------------------------------------------#
     #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
@@ -191,7 +199,7 @@
     [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}"
     #
     # Include a touch of the target name so make can check if it's already been made.
-    echo -e '\t at touch $@' >> $MKFILE.tmp
+    wrt_touch
     #
     #--------------------------------------------------------------------#
     #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
@@ -275,7 +283,7 @@
     [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}"
     #
     # Include a touch of the target name so make can check if it's already been made.
-    echo -e '\t at touch $@' >> $MKFILE.tmp
+    wrt_touch
     #
     #--------------------------------------------------------------------#
     #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
@@ -341,7 +349,7 @@
     [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}"
     #
     # Include a touch of the target name so make can check if it's already been made.
-    echo -e '\t at touch $@' >> $MKFILE.tmp
+    wrt_touch
     #
     #--------------------------------------------------------------------#
     #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
@@ -395,7 +403,7 @@
     wrt_remove_build_dirs "${name}"
     #
     # Include a touch of the target name so make can check if it's already been made.
-    echo -e '\t at touch $@' >> $MKFILE.tmp
+    wrt_touch
     #
     #--------------------------------------------------------------------#
     #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
@@ -450,7 +458,7 @@
     wrt_remove_build_dirs2 "${name}"
     #
     # Include a touch of the target name so make can check if it's already been made.
-    echo -e '\t at touch $@' >> $MKFILE.tmp
+    wrt_touch
     #
     #--------------------------------------------------------------------#
     #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
@@ -560,7 +568,7 @@
     [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}"
     #
     # Include a touch of the target name so make can check if it's already been made.
-    echo -e '\t at touch $@' >> $MKFILE.tmp
+    wrt_touch
     #
     #--------------------------------------------------------------------#
     #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
@@ -673,7 +681,7 @@
     [[ "$vrs" != "" ]] && wrt_remove_build_dirs2 "${name}"
     #
     # Include a touch of the target name so make can check if it's already been made.
-    echo -e '\t at touch $@' >> $MKFILE.tmp
+    wrt_touch
     #
     #--------------------------------------------------------------------#
     #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
@@ -735,7 +743,7 @@
     [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}"
     #
     # Include a touch of the target name so make can check if it's already been made.
-    echo -e '\t at touch $@' >> $MKFILE.tmp
+    wrt_touch
     #
     #--------------------------------------------------------------------#
     #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
@@ -796,7 +804,7 @@
     [[ "$vrs" != "" ]] && wrt_remove_build_dirs2 "${name}"
     #
     # Include a touch of the target name so make can check if it's already been made.
-    echo -e '\t at touch $@' >> $MKFILE.tmp
+    wrt_touch
     #
     #--------------------------------------------------------------------#
     #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
@@ -870,7 +878,7 @@
     [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}"
     #
     # Include a touch of the target name so make can check if it's already been made.
-    echo -e '\t at touch $@' >> $MKFILE.tmp
+    wrt_touch
     #
     #--------------------------------------------------------------------#
     #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
@@ -950,7 +958,7 @@
     [[ "$vrs" != "" ]] && wrt_remove_build_dirs2 "${name}"
     #
     # Include a touch of the target name so make can check if it's already been made.
-    echo -e '\t at touch $@' >> $MKFILE.tmp
+    wrt_touch
     #
     #--------------------------------------------------------------------#
     #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
@@ -1090,21 +1098,23 @@
 restore-lfs-env:
 	@\$(call echo_message, Building)
 	@if [ -f /home/lfs/.bashrc.XXX ]; then \\
-		mv -fv /home/lfs/.bashrc.XXX /home/lfs/.bashrc; \\
+		mv -f /home/lfs/.bashrc.XXX /home/lfs/.bashrc; \\
 	fi;
 	@if [ -f /home/lfs/.bash_profile.XXX ]; then \\
-		mv -v /home/lfs/.bash_profile.XXX /home/lfs/.bash_profile; \\
+		mv /home/lfs/.bash_profile.XXX /home/lfs/.bash_profile; \\
 	fi;
 	@chown lfs:lfs /home/lfs/.bash* && \\
-	touch \$@
+	touch \$@ && \\
+	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
+	echo --------------------------------------------------------------------------------\$(WHITE)
 
 do-housekeeping:
-	-umount \$(MOUNT_PT)/dev/pts
-	-umount \$(MOUNT_PT)/dev/shm
-	-umount \$(MOUNT_PT)/dev
-	-umount \$(MOUNT_PT)/sys
-	-umount \$(MOUNT_PT)/proc
-	-if [ ! -f user-lfs-exist ]; then \\
+	@-umount \$(MOUNT_PT)/dev/pts
+	@-umount \$(MOUNT_PT)/dev/shm
+	@-umount \$(MOUNT_PT)/dev
+	@-umount \$(MOUNT_PT)/sys
+	@-umount \$(MOUNT_PT)/proc
+	@-if [ ! -f user-lfs-exist ]; then \\
 		userdel lfs; \\
 		rm -rf /home/lfs; \\
 	fi;
@@ -1176,7 +1186,9 @@
 		mv -v /home/lfs/.bash_profile.XXX /home/lfs/.bash_profile; \\
 	fi;
 	@chown lfs:lfs /home/lfs/.bash* && \\
-	touch \$@
+	touch \$@ && \\
+	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
+	echo --------------------------------------------------------------------------------\$(WHITE)
 
 
 EOF

Modified: jhalfs/branches/experimental/HLFS/master.sh
===================================================================
--- jhalfs/branches/experimental/HLFS/master.sh	2006-06-10 16:43:01 UTC (rev 2768)
+++ jhalfs/branches/experimental/HLFS/master.sh	2006-06-10 16:48:25 UTC (rev 2769)
@@ -30,14 +30,16 @@
 cat << EOF
 020-creatingtoolsdir:
 	@\$(call echo_message, Building)
-	@mkdir -v \$(MOUNT_PT)/tools && \\
-	rm -fv /tools && \\
-	ln -sv \$(MOUNT_PT)/tools /
+	@mkdir \$(MOUNT_PT)/tools && \\
+	rm -f /tools && \\
+	ln -s \$(MOUNT_PT)/tools /
 	@if [ ! -d \$(MOUNT_PT)/sources ]; then \\
 		mkdir \$(MOUNT_PT)/sources; \\
 	fi;
 	@chmod a+wt \$(MOUNT_PT)/sources && \\
-	touch \$@
+	touch \$@ && \\
+	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
+	echo --------------------------------------------------------------------------------\$(WHITE)
 
 021-addinguser:  020-creatingtoolsdir
 	@\$(call echo_message, Building)
@@ -49,15 +51,17 @@
 	fi;
 	@chown lfs \$(MOUNT_PT)/tools && \\
 	chown lfs \$(MOUNT_PT)/sources && \\
-	touch \$@
+	touch \$@ && \\
+	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
+	echo --------------------------------------------------------------------------------\$(WHITE)
 
 022-settingenvironment:  021-addinguser
 	@\$(call echo_message, Building)
 	@if [ -f /home/lfs/.bashrc -a ! -f /home/lfs/.bashrc.XXX ]; then \\
-		mv -v /home/lfs/.bashrc /home/lfs/.bashrc.XXX; \\
+		mv /home/lfs/.bashrc /home/lfs/.bashrc.XXX; \\
 	fi;
 	@if [ -f /home/lfs/.bash_profile  -a ! -f /home/lfs/.bash_profile.XXX ]; then \\
-		mv -v /home/lfs/.bash_profile /home/lfs/.bash_profile.XXX; \\
+		mv /home/lfs/.bash_profile /home/lfs/.bash_profile.XXX; \\
 	fi;
 	@echo "set +h" > /home/lfs/.bashrc && \\
 	echo "umask 022" >> /home/lfs/.bashrc && \\
@@ -72,7 +76,9 @@
 	echo "source $JHALFSDIR/envars" >> /home/lfs/.bashrc && \\
 	chown lfs:lfs /home/lfs/.bashrc && \\
 	touch envars && \\
-	touch \$@
+	touch \$@ && \\
+	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
+	echo --------------------------------------------------------------------------------\$(WHITE)
 EOF
 ) >> $MKFILE.tmp
 
@@ -197,7 +203,7 @@
     esac
 
     # Include a touch of the target name so make can check if it's already been made.
-    echo -e '\t at touch $@' >> $MKFILE.tmp
+    wrt_touch
     #
     #--------------------------------------------------------------------#
     #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
@@ -365,7 +371,7 @@
     esac
 
     # Include a touch of the target name so make can check if it's already been made.
-    echo -e '\t at touch $@' >> $MKFILE.tmp
+    wrt_touch
     #
     #--------------------------------------------------------------------#
     #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
@@ -457,7 +463,7 @@
     esac
 
     # Include a touch of the target name so make can check if it's already been made.
-    echo -e '\t at touch $@' >> $MKFILE.tmp
+    wrt_touch
     #
     #--------------------------------------------------------------------#
     #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
@@ -572,21 +578,23 @@
 restore-lfs-env:
 	@\$(call echo_message, Building)
 	@if [ -f /home/lfs/.bashrc.XXX ]; then \\
-		mv -fv /home/lfs/.bashrc.XXX /home/lfs/.bashrc; \\
+		mv -f /home/lfs/.bashrc.XXX /home/lfs/.bashrc; \\
 	fi;
 	@if [ -f /home/lfs/.bash_profile.XXX ]; then \\
-		mv -v /home/lfs/.bash_profile.XXX /home/lfs/.bash_profile; \\
+		mv /home/lfs/.bash_profile.XXX /home/lfs/.bash_profile; \\
 	fi;
 	@chown lfs:lfs /home/lfs/.bash* && \\
-	touch \$@
+	touch \$@ && \\
+	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
+	echo --------------------------------------------------------------------------------\$(WHITE)
 
 do-housekeeping:
-	-umount \$(MOUNT_PT)/dev/pts
-	-umount \$(MOUNT_PT)/dev/shm
-	-umount \$(MOUNT_PT)/dev
-	-umount \$(MOUNT_PT)/sys
-	-umount \$(MOUNT_PT)/proc
-	-if [ ! -f user-lfs-exist ]; then \\
+	@-umount \$(MOUNT_PT)/dev/pts
+	@-umount \$(MOUNT_PT)/dev/shm
+	@-umount \$(MOUNT_PT)/dev
+	@-umount \$(MOUNT_PT)/sys
+	@-umount \$(MOUNT_PT)/proc
+	@-if [ ! -f user-lfs-exist ]; then \\
 		userdel lfs; \\
 		rm -rf /home/lfs; \\
 	fi;

Modified: jhalfs/branches/experimental/LFS/master.sh
===================================================================
--- jhalfs/branches/experimental/LFS/master.sh	2006-06-10 16:43:01 UTC (rev 2768)
+++ jhalfs/branches/experimental/LFS/master.sh	2006-06-10 16:48:25 UTC (rev 2769)
@@ -20,10 +20,12 @@
     cat << EOF
 020-creatingtoolsdir:
 	@\$(call echo_message, Building)
-	@mkdir -v \$(MOUNT_PT)/tools && \\
-	rm -fv /tools && \\
-	ln -sv \$(MOUNT_PT)/tools / && \\
-	touch \$@
+	@mkdir \$(MOUNT_PT)/tools && \\
+	rm -f /tools && \\
+	ln -s \$(MOUNT_PT)/tools / && \\
+	touch \$@ && \\
+	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
+	echo --------------------------------------------------------------------------------\$(WHITE)
 
 021-addinguser:  020-creatingtoolsdir
 	@\$(call echo_message, Building)
@@ -35,15 +37,17 @@
 	fi;
 	@chown lfs \$(MOUNT_PT)/tools && \\
 	chmod a+wt \$(MOUNT_PT)/sources && \\
-	touch \$@
+	touch \$@ && \\
+	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
+	echo --------------------------------------------------------------------------------\$(WHITE)
 
 022-settingenvironment:  021-addinguser
 	@\$(call echo_message, Building)
 	@if [ -f /home/lfs/.bashrc -a ! -f /home/lfs/.bashrc.XXX ]; then \\
-		mv -v /home/lfs/.bashrc /home/lfs/.bashrc.XXX; \\
+		mv /home/lfs/.bashrc /home/lfs/.bashrc.XXX; \\
 	fi;
 	@if [ -f /home/lfs/.bash_profile  -a ! -f /home/lfs/.bash_profile.XXX ]; then \\
-		mv -v /home/lfs/.bash_profile /home/lfs/.bash_profile.XXX; \\
+		mv /home/lfs/.bash_profile /home/lfs/.bash_profile.XXX; \\
 	fi;
 	@echo "set +h" > /home/lfs/.bashrc && \\
 	echo "umask 022" >> /home/lfs/.bashrc && \\
@@ -54,7 +58,9 @@
 	echo "source $JHALFSDIR/envars" >> /home/lfs/.bashrc && \\
 	chown lfs:lfs /home/lfs/.bashrc && \\
 	touch envars && \\
-	touch \$@
+	touch \$@ && \\
+	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
+	echo --------------------------------------------------------------------------------\$(WHITE)
 EOF
 ) >> $MKFILE.tmp
 }
@@ -134,7 +140,7 @@
 
     # Include a touch of the target name so make can check
     # if it's already been made.
-    echo -e '\t at touch $@' >> $MKFILE.tmp
+    wrt_touch
     #
     #--------------------------------------------------------------------#
     #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
@@ -246,7 +252,7 @@
 
     # Include a touch of the target name so make can check
     # if it's already been made.
-    echo -e '\t at touch $@' >> $MKFILE.tmp
+    wrt_touch
     #
     #--------------------------------------------------------------------#
     #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
@@ -328,7 +334,7 @@
 
     # Include a touch of the target name so make can check
     # if it's already been made.
-    echo -e '\t at touch $@' >> $MKFILE.tmp
+    wrt_touch
     #
     #--------------------------------------------------------------------#
     #              >>>>>>>> END OF Makefile ENTRY <<<<<<<<               #
@@ -406,6 +412,8 @@
 
 clean:  clean-chapter789 clean-chapter6 clean-chapter5 clean-chapter4
 
+restart: restart_code all
+
 clean-chapter4:
 	-if [ ! -f user-lfs-exist ]; then \\
 		userdel lfs; \\
@@ -438,25 +446,67 @@
 restore-lfs-env:
 	@\$(call echo_message, Building)
 	@if [ -f /home/lfs/.bashrc.XXX ]; then \\
-		mv -fv /home/lfs/.bashrc.XXX /home/lfs/.bashrc; \\
+		mv -f /home/lfs/.bashrc.XXX /home/lfs/.bashrc; \\
 	fi;
 	@if [ -f /home/lfs/.bash_profile.XXX ]; then \\
-		mv -v /home/lfs/.bash_profile.XXX /home/lfs/.bash_profile; \\
+		mv /home/lfs/.bash_profile.XXX /home/lfs/.bash_profile; \\
 	fi;
 	@chown lfs:lfs /home/lfs/.bash* && \\
-	touch \$@
+	touch \$@ && \\
+	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
+	echo --------------------------------------------------------------------------------\$(WHITE)
 
 do_housekeeping:
-	-umount \$(MOUNT_PT)/sys
-	-umount \$(MOUNT_PT)/proc
-	-umount \$(MOUNT_PT)/dev/shm
-	-umount \$(MOUNT_PT)/dev/pts
-	-umount \$(MOUNT_PT)/dev
-	-if [ ! -f user-lfs-exist ]; then \\
+	@-umount \$(MOUNT_PT)/sys
+	@-umount \$(MOUNT_PT)/proc
+	@-umount \$(MOUNT_PT)/dev/shm
+	@-umount \$(MOUNT_PT)/dev/pts
+	@-umount \$(MOUNT_PT)/dev
+	@-if [ ! -f user-lfs-exist ]; then \\
 		userdel lfs; \\
 		rm -rf /home/lfs; \\
 	fi;
 
+restart_code:
+	@echo ">>> This feature is experimental, BUGS may exist"
+
+	@if [ ! -L /tools ]; then \\
+	  echo -e "\\nERROR::\\n /tools is NOT a symlink.. /tools must point to \$(MOUNT_PT)/tools\\n" && false;\\
+	fi;
+
+	@if [ ! -e /tools ]; then \\
+	  echo -e "\\nERROR::\\nThe target /tools points to does not exist.\\nVerify the target.. \$(MOUNT_PT)/tools\\n" && false;\\
+	fi;
+
+	@if ! stat -c %N /tools | grep "\$(MOUNT_PT)/tools" >/dev/null ; then \\
+	  echo -e "\\nERROR::\\nThe symlink \\"/tools\\" does not point to \\"\$(MOUNT_PT)/tools\\".\\nCorrect the problem and rerun\\n" && false;\\
+	fi;
+
+	@if [ -f ???-kernfs ]; then \\
+	  mkdir -pv \$(MOUNT_PT)/{dev,proc,sys};\\
+	  if [ ! -e \$(MOUNT_PT)/dev/console ]; then \\
+	    mknod -m 600 \$(MOUNT_PT)/dev/console c 5 1;\\
+	  fi;\\
+	  if [ ! -e \$(MOUNT_PT)/dev/null ]; then \\
+	    mknod -m 666 \$(MOUNT_PT)/dev/null c 1 3;\\
+	  fi;\\
+	  if !  mount -l | grep bind >/dev/null ; then \\
+	    mount --bind /dev \$(MOUNT_PT)/dev;\\
+	  fi;\\
+	  if ! mount -l | grep "\$(MOUNT_PT)/dev/pts" >/dev/null ; then \\
+	    mount -vt devpts devpts \$(MOUNT_PT)/dev/pts;\\
+	  fi;\\
+	  if ! mount -l | grep "\$(MOUNT_PT)/dev/shm" >/dev/null ; then \\
+	    mount -vt tmpfs shm \$(MOUNT_PT)/dev/shm;\\
+	  fi;\\
+	  if ! mount -l | grep "\$(MOUNT_PT)/proc" >/dev/null ; then \\
+	    mount -vt proc proc \$(MOUNT_PT)/proc;\\
+	  fi;\\
+	  if ! mount -l | grep "$\(MOUNT_PT)/sys" >/dev/null ; then \\
+	    mount -vt sysfs sysfs \$(MOUNT_PT)/sys;\\
+	  fi;\\
+	fi;
+
 EOF
 ) >> $MKFILE
 

Modified: jhalfs/branches/experimental/common/common-functions
===================================================================
--- jhalfs/branches/experimental/common/common-functions	2006-06-10 16:43:01 UTC (rev 2768)
+++ jhalfs/branches/experimental/common/common-functions	2006-06-10 16:48:25 UTC (rev 2769)
@@ -218,8 +218,8 @@
 	ROOT=\`tar -tf \$\$PKG_PATH | head -n1 | sed -e 's@^./@@;s@/.*@@'\` && \\
 	[[ -n \$\$ROOT ]] && \\
 	rm -rf \$(MOUNT_PT)\$(SRC)/\$\$ROOT && \\
-	if [ -e \$(MOUNT_PT)\$(SRC)/${PKG_NAME%%-*}-build ]; then \\
-		rm -rf \$(MOUNT_PT)\$(SRC)/${PKG_NAME%%-*}-build; \\
+	if [ -e \$(MOUNT_PT)\$(SRC)/${PKG_NAME%-*}-build ]; then \\
+		rm -rf \$(MOUNT_PT)\$(SRC)/${PKG_NAME%-*}-build; \\
 	fi;
 EOF
 ) >> $MKFILE.tmp
@@ -235,8 +235,8 @@
 	ROOT=\`tar -tf \$\$PKG_PATH | head -n1 | sed -e 's@^./@@;s@/.*@@'\` && \\
 	[[ -n \$\$ROOT ]] && \\
 	rm -rf \$(SRC)/\$\$ROOT && \\
-	if [ -e \$(SRC)/${PKG_NAME%%-*}-build ]; then \\
-		rm -rf \$(SRC)/${PKG_NAME%%-*}-build; \\
+	if [ -e \$(SRC)/${PKG_NAME%-*}-build ]; then \\
+		rm -rf \$(SRC)/${PKG_NAME%-*}-build; \\
 	fi;
 EOF
 ) >> $MKFILE.tmp
@@ -465,6 +465,20 @@
 
 
 #----------------------------------#
+wrt_touch() {                      #
+#----------------------------------#
+(
+cat << EOF
+	@touch  \$@ && \\
+	sleep .25 && \\
+	echo -e "\n\n "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
+	echo --------------------------------------------------------------------------------\$(WHITE)
+EOF
+) >> $MKFILE.tmp
+}
+
+
+#----------------------------------#
 wrt_report() {                     #
 #----------------------------------#
 (

Modified: jhalfs/branches/experimental/common/func_compare.sh
===================================================================
--- jhalfs/branches/experimental/common/func_compare.sh	2006-06-10 16:43:01 UTC (rev 2768)
+++ jhalfs/branches/experimental/common/func_compare.sh	2006-06-10 16:48:25 UTC (rev 2769)
@@ -101,7 +101,7 @@
 }
 
 #----------------------------------#
-wrt_logs() {             #
+wrt_logs() {                       #
 #----------------------------------#
   local ITERATION=iteration-$1
 
@@ -111,7 +111,9 @@
 	mkdir $ITERATION && \\
 	mv ${LOGS} $ITERATION && \\
 	popd 1> /dev/null
-	@touch \$@
+	@touch \$@ && \\
+	echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
+	echo --------------------------------------------------------------------------------\$(WHITE)
 EOF
 ) >> $MKFILE.tmp
 }

Modified: jhalfs/branches/experimental/common/makefile-functions
===================================================================
--- jhalfs/branches/experimental/common/makefile-functions	2006-06-10 16:43:01 UTC (rev 2768)
+++ jhalfs/branches/experimental/common/makefile-functions	2006-06-10 16:48:25 UTC (rev 2769)
@@ -12,7 +12,7 @@
   @echo $(BOLD)
   @echo --------------------------------------------------------------------------------
   @echo $(BOLD)$(1) target $(BLUE)$@$(BOLD)
-  @echo --------------------------------------------------------------------------------$(WHITE)
+  @echo $(WHITE)
 endef
 
 define unpack
@@ -56,16 +56,22 @@
   @echo -e \\tin the section -Entering the Chroot Environment-
   @echo -e \\texcept if building CLFS with METHOO=boot.
   @echo
-  @echo -e \\t- Set a password for the root user
+  @echo -e \\t- Set a password for the root user.
   @echo
   @echo -e \\t- Edit /etc/fstab, /etc/hosts, /etc/sysconfig/clock,
   @echo -e \\t/etc/sysconfig/console, /etc/sysconfig/network,
   @echo -e \\t/etc/sysconfig//network-devices/ifconfig.eth0/ipv4 and
   @echo -e \\tany other configuration file required to suit your needs.
   @echo
-  @echo -e \\t- Set-up the boot loader. See the relevant book section.
+  @echo -e \\t- Exit from the chroot.
   @echo
-  @echo -e \\t- Unmount the filesystems.
+  @echo -e \\t- Set-up the boot loader, except if building CLFS with METHOO=boot.
+  @echo -e \\tYou can set-up the host bootloader or the new boot-loader
+  @echo -e \\tinstalled on the new system.
+  @echo -e \\tIf the last, you must to mount the virtual filesystems, re-enter
+  @echo -e \\tto the chroot and be sure that /dev is populated with the
+  @echo -e \\trequired devices before configure the boot-loader. When ready,
+  @echo -e \\texit from the chroot and umount the filesystems
   @echo
   @echo If you are an experienced LFS user, several of those steps can be
   @echo skipped or done in a different way. But then, that is something

Modified: jhalfs/branches/experimental/common/progress_bar.sh
===================================================================
--- jhalfs/branches/experimental/common/progress_bar.sh	2006-06-10 16:43:01 UTC (rev 2768)
+++ jhalfs/branches/experimental/common/progress_bar.sh	2006-06-10 16:48:25 UTC (rev 2769)
@@ -4,12 +4,57 @@
 
 set -e
 
+# Be sure that we know the taget name
 [[ -z $1 ]] && exit
+TARGET=$1  # Remember the target build we are looking for
 
-if [ ! -f $1 ] ; then
-  while fuser -v . 2>&1 | grep make >/dev/null ; do
-    echo -n "."
-    sleep 1
-    [[ -f $1 ]] && exit
-  done
-fi
+declare -r  CSI=$'\e['  # DEC terminology, Control Sequence Introducer
+declare -r  CURSOR_OFF=${CSI}$'?25l'
+declare -r  CURSOR_ON=${CSI}$'?25h'
+declare -r  ERASE_LINE=${CSI}$'2K'
+declare -r  FRAME_OPEN=${CSI}$'2G['
+declare -r  FRAME_CLOSE=${CSI}$'63G]'
+declare -r  TS_POSITION=${CSI}$'65G'
+declare -a  RESET_LINE=${CURSOR_OFF}${ERASE_LINE}${FRAME_OPEN}${FRAME_CLOSE}
+
+declare -a  GRAPHIC_STR="| / - \\ + "
+declare -i  SEC=0  # Seconds accumulator
+declare -i  PREV_SEC=0
+
+
+write_or_exit() {
+    # make has been killed or failed or run to completion, leave
+  if ! fuser -v . 2>&1 | grep make >/dev/null ; then
+     echo -n "${CURSOR_ON}" && exit
+  fi
+    # Target build complete, leave.
+  [[ -f ${TARGET} ]] && echo -n "${CURSOR_ON}" && exit
+    # It is safe to write to the screen
+  echo -n "$1"
+}
+
+  # initialize screen
+write_or_exit "${RESET_LINE}${TS_POSITION}0 min. 0 sec. "
+
+  # loop forever..
+while true ; do
+
+      # Loop through the animation string
+    for GRAPHIC_CHAR in ${GRAPHIC_STR} ; do
+      write_or_exit "${CSI}$((SEC + 3))G${GRAPHIC_CHAR}"
+      sleep .12 # This value MUST be less than .2 seconds.
+    done
+
+      # A BASH internal variable, the number of seconds the script
+      # has been running. modulo convert to 0-59
+    SEC=$(($SECONDS % 60))
+
+      # Detect rollover of the seconds.
+    (( PREV_SEC > SEC )) && write_or_exit "${RESET_LINE}"
+    (( PREV_SEC = SEC ))
+
+      # Display the accumulated time. div minutes.. modulo seconds.
+    write_or_exit "${TS_POSITION}$(($SECONDS / 60)) min. $SEC sec. "
+done
+
+exit




More information about the alfs-log mailing list