r3283 - in jhalfs/trunk: . CLFS2 common common/libs

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Mon Dec 11 10:21:18 PST 2006


Author: manuel
Date: 2006-12-11 11:21:16 -0700 (Mon, 11 Dec 2006)
New Revision: 3283

Modified:
   jhalfs/trunk/CLFS2/master.sh
   jhalfs/trunk/Config.in
   jhalfs/trunk/README
   jhalfs/trunk/common/libs/func_blfs_deps
   jhalfs/trunk/common/libs/func_validate_configs.sh
   jhalfs/trunk/common/makefile-functions
Log:
Added BLFS_TOOL support to CLFS2 and some bug fixes.

Modified: jhalfs/trunk/CLFS2/master.sh
===================================================================
--- jhalfs/trunk/CLFS2/master.sh	2006-12-11 15:48:26 UTC (rev 3282)
+++ jhalfs/trunk/CLFS2/master.sh	2006-12-11 18:21:16 UTC (rev 3283)
@@ -408,6 +408,9 @@
   final_system_Makefiles           # $basicsystem
   bootscripts_Makefiles            # $bootscripttools
   bootable_Makefiles               # $bootable
+  # Add the BLFS_TOOL targets, if needed. Clean PREV to prevent that
+  # the first dependency script will depend on *-chowning
+  [[ "$BLFS_TOOL" = "y" ]] && PREV="" && wrt_blfs_tool_targets
 
   # Add a header, some variables and include the function file
   # to the top of the real Makefile.
@@ -418,7 +421,8 @@
 (
 cat << EOF
 
-all:	ck_UID mk_SETUP mk_LUSER mk_ROOT create-sbu_du-report
+all:	ck_UID mk_SETUP mk_LUSER create-sbu_du-report mk_BLFS_TOOL mk_ROOT
+	@sudo make restore-luser-env
 	@sudo make do-housekeeping
 	@\$(call echo_finished,$VERSION)
 
@@ -441,18 +445,27 @@
 	@sudo make restore-luser-env
 	@touch \$@
 
+mk_BLFS_TOOL: create-sbu_du-report
+	@\$(call echo_PHASE,Building BLFS-TOOLS)
+	@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
+	  (sudo \$(SU_LUSER) "mkdir -p $BUILDDIR$TRACKING_DIR"); \\
+	  (sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make SHELL=/bin/bash BLFS_TOOL"); \\
+	fi;
+	@touch \$@
+
 mk_ROOT:
 	@echo "$VERSION-sysroot - jhalfs build" > clfs-release && \\
 	sudo mv clfs-release \$(MOUNT_PT)/etc
 	@sudo make SHELL=/bin/bash ROOT
 	@touch \$@
 
-SETUP:  $host_prep
-LUSER:  $cross_tools $basicsystem $bootscripttools $bootable
-ROOT:   $chowning
+SETUP:     $host_prep
+LUSER:     $cross_tools $basicsystem $bootscripttools $bootable
+BLFS_TOOL: $blfs_tool
+ROOT:      $chowning
 
 
-create-sbu_du-report:  ROOT
+create-sbu_du-report: mk_LUSER
 	@\$(call echo_message, Building)
 	@if [ "\$(ADD_REPORT)" = "y" ]; then \\
 	  ./create-sbu_du-report.sh logs $VERSION; \\

Modified: jhalfs/trunk/Config.in
===================================================================
--- jhalfs/trunk/Config.in	2006-12-11 15:48:26 UTC (rev 3282)
+++ jhalfs/trunk/Config.in	2006-12-11 18:21:16 UTC (rev 3283)
@@ -329,7 +329,7 @@
 	config BLFS_TOOL
 		bool	"Add blfs-tool support"
 		default	n
-		depends on !BOOK_BLFS && !BOOK_CLFS2 && !BOOK_CLFS3
+		depends on !BOOK_BLFS && !BOOK_CLFS3
 		help
 			#--- Activating this option additional packages needed to
 			#    use blfs-tool will be installed.
@@ -338,7 +338,7 @@
 			#    $BUILD_DIR/blfs_root.
 
 			#    After booting the new xLFS system you should to
-			#    create an user account and move the blfs-root
+			#    create an user account and move the /blfs-root
 			#    directory to the user's home, making he the
 			#    directory and files owner, before start
 			#    using blfs-tool.

Modified: jhalfs/trunk/README
===================================================================
--- jhalfs/trunk/README	2006-12-11 15:48:26 UTC (rev 3282)
+++ jhalfs/trunk/README	2006-12-11 18:21:16 UTC (rev 3283)
@@ -86,6 +86,12 @@
      builds you may need to adjust that scripts, that are found into the
      common/blfs-tool-deps directory in the jhalfs sources tree.
 
+     WARNING:: If adding blfs-tool support on a CLFS Sysroot build
+               you MUST to edit the dependencies scripts to fix the
+               installation paths.
+               Be sure to make the adjust carefully or you will end
+               messing your host system.
+
      After booting the new xLFS system some steps are needed to finish
      blfs-tool installation:
 

Modified: jhalfs/trunk/common/libs/func_blfs_deps
===================================================================
--- jhalfs/trunk/common/libs/func_blfs_deps	2006-12-11 15:48:26 UTC (rev 3282)
+++ jhalfs/trunk/common/libs/func_blfs_deps	2006-12-11 18:21:16 UTC (rev 3283)
@@ -144,17 +144,33 @@
     #
     # 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}" "$PREV"
+    if [ "$PROGNAME" = "clfs2" ]; then
+      LUSER_wrt_target "${this_script}" "$PREV"
+    else
+      CHROOT_wrt_target "${this_script}" "$PREV"
+    fi
 
     # Insert instructions for unpacking the package and changing directories
     # DocBook-XML is a zip, the build script will handle that.
-    [[ ! "$name" = "docbook-xml" ]] && CHROOT_Unpack "$pkg_tarball"
+    if [ "$PROGNAME" = "clfs2" ]; then
+      [[ ! "$name" = "docbook-xml" ]] && LUSER_wrt_unpack "$pkg_tarball"
+    else
+      [[ ! "$name" = "docbook-xml" ]] && CHROOT_Unpack "$pkg_tarball"
+    fi
 
     # Run the script.
-    CHROOT_wrt_RunAsRoot "$file"
+    if [ "$PROGNAME" = "clfs2" ]; then
+      LUSER_wrt_RunAsUser "${file}"
+    else
+      CHROOT_wrt_RunAsRoot "$file"
+    fi
 
     # Remove the build directory(ies) except if the package build fails.
-    [[ ! "$name" = "docbook-xml" ]] && CHROOT_wrt_RemoveBuildDirs "$name"
+    if [ "$PROGNAME" = "clfs2" ]; then
+      [[ ! "$name" = "docbook-xml" ]] && LUSER_RemoveBuildDirs "$name"
+    else
+      [[ ! "$name" = "docbook-xml" ]] && CHROOT_wrt_RemoveBuildDirs "$name"
+    fi
 
     # Touch the tracking file.
     case $name in
@@ -162,7 +178,11 @@
       unzip ) pkg_ver=unzip-5.52 ;;
       * )     pkg_ver=$(echo $pkg_tarball | sed -e 's/.tar.*//;s/.tgz//;s/.zip//') ;;
     esac
-    echo  "\$(tab_)@touch $TRACKING_DIR/$pkg_ver" >>  $MKFILE.tmp
+    if [ "$PROGNAME" = "clfs2" ]; then
+      echo -e "\t at touch \$(MOUNT_PT)$TRACKING_DIR/$pkg_ver" >>  $MKFILE.tmp
+    else
+      echo -e "\t at touch $TRACKING_DIR/$pkg_ver" >>  $MKFILE.tmp
+    fi
 
     # Include a touch of the target name so make can check
     # if it's already been made.

Modified: jhalfs/trunk/common/libs/func_validate_configs.sh
===================================================================
--- jhalfs/trunk/common/libs/func_validate_configs.sh	2006-12-11 15:48:26 UTC (rev 3282)
+++ jhalfs/trunk/common/libs/func_validate_configs.sh	2006-12-11 18:21:16 UTC (rev 3283)
@@ -22,7 +22,7 @@
   # First internal variables, then the ones that change the book's flavour, and lastly system configuration variables
   local -r  hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE MODEL  GRSECURITY_HOST        TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB             CONFIG GETKERNEL         PAGE TIMEZONE LANG LC_ALL LUSER LGROUP BLFS_TOOL              REBUILD_MAKEFILE"
   local -r  clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD ARCH TARGET TARGET32   TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG        LUSER LGROUP BLFS_TOOL              REBUILD_MAKEFILE"
-  local -r clfs2_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE        ARCH TARGET                                    REPORT                                      STRIP FSTAB             CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG        LUSER LGROUP                        REBUILD_MAKEFILE"
+  local -r clfs2_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE        ARCH TARGET                                    REPORT                                      STRIP FSTAB             CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG        LUSER LGROUP BLFS_TOOL              REBUILD_MAKEFILE"
   local -r clfs3_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE        ARCH TARGET MIPS_LEVEL                         REPORT                                      STRIP FSTAB             CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG        LUSER LGROUP                        REBUILD_MAKEFILE"
   local -r   lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE                               TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB             CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG        LUSER LGROUP BLFS_TOOL CUSTOM_TOOLS REBUILD_MAKEFILE"
   local -r  blfs_PARAM_LIST="BRANCH_ID BLFS_ROOT BLFS_XML TRACKING_DIR"

Modified: jhalfs/trunk/common/makefile-functions
===================================================================
--- jhalfs/trunk/common/makefile-functions	2006-12-11 15:48:26 UTC (rev 3282)
+++ jhalfs/trunk/common/makefile-functions	2006-12-11 18:21:16 UTC (rev 3283)
@@ -10,7 +10,6 @@
 YELLOW  = ""
 
 OFF     = ""
-BOLD    = ""
 REVERSE = ""
 
 tab_    = "	"
@@ -140,7 +139,7 @@
   @echo; \
   echo $(BOLD) The report file $(BLUE)$(1)$(BOLD) has been created; \
   echo; \
-  echo ${WHITE}Please send the $(BOLD)$(MOUNT_PT)/jhalfs/$(1)$(WHITE); \
+  echo $(WHITE)Please send the $(BOLD)$(MOUNT_PT)/jhalfs/$(1)$(WHITE); \
   echo file to $(BOLD)manuel at linuxfromscratch.org$(WHITE); \
   echo; \
   echo That will help us to keep more accurate SBU and; \




More information about the alfs-log mailing list