From 1838bc7f42e03668f6be04113621e214080b9699 Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Sun, 12 Nov 2006 13:50:34 +0000 Subject: [PATCH] Changed how create-sbu_du-report target is created. Added blfs-tool support to HLFS. --- CLFS/master.sh | 30 +++++++----------- CLFS2/master.sh | 28 ++++++----------- CLFS3/master.sh | 26 ++++++--------- Config.in | 3 +- HLFS/master.sh | 44 +++++++++++++------------- LFS/master.sh | 59 ++++++++++++----------------------- README | 5 ++- common/libs/func_wrt_Makefile | 5 ++- 8 files changed, 80 insertions(+), 120 deletions(-) diff --git a/CLFS/master.sh b/CLFS/master.sh index b8162c3..9e3f53e 100644 --- a/CLFS/master.sh +++ b/CLFS/master.sh @@ -1099,12 +1099,12 @@ mk_SYSTOOLS: mk_SUDO @( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make CHROOT_JAIL") @touch \$@ -mk_BLFS_TOOL: mk_SYSTOOLS - @\$(call echo_PHASE,Building BLFS-TOOLS); \\ +mk_BLFS_TOOL: create-sbu_du-report + @\$(call echo_PHASE,Building BLFS-TOOLS) @if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\ sudo mkdir -p $BUILDDIR$TRACKING_DIR; \\ sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make BLFS_TOOL"; \\ - fi + fi; @touch \$@ SETUP: $host_prep @@ -1113,6 +1113,15 @@ SUDO: $orphan_scripts CHROOT_JAIL: ${chroottools}${boottools} $testsuitetools $basicsystem $bootscripttools $bootabletools BLFS_TOOL: $blfs_tool + +create-sbu_du-report: mk_SYSTOOLS + @\$(call echo_message, Building) + @if [ "\$(ADD_REPORT)" = "y" ]; then \\ + ./create-sbu_du-report.sh logs $VERSION; \\ + \$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report); \\ + fi; + @touch \$@ + do-housekeeping: @-umount \$(MOUNT_PT)/dev/pts @-umount \$(MOUNT_PT)/dev/shm @@ -1128,21 +1137,6 @@ do-housekeeping: EOF ) >> $MKFILE - # Add SBU-disk_usage report target - echo "create-sbu_du-report:" >> $MKFILE - if [[ "$REPORT" = "y" ]] ; then -( - cat << EOF - @\$(call echo_message, Building) - @./create-sbu_du-report.sh logs $VERSION - @\$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report) - @touch \$@ - -EOF -) >> $MKFILE - else echo -e "\t@true\n" >> $MKFILE; fi - - fi ################### BOOT ##################### diff --git a/CLFS2/master.sh b/CLFS2/master.sh index bb95d18..26028fa 100644 --- a/CLFS2/master.sh +++ b/CLFS2/master.sh @@ -467,11 +467,17 @@ mk_ROOT: @touch \$@ SETUP: $host_prep +LUSER: $cross_tools $basicsystem $bootscripttools $bootable +ROOT: $chowning -LUSER: $cross_tools $basicsystem $bootscripttools $bootable - -ROOT: $chowning +create-sbu_du-report: ROOT + @\$(call echo_message, Building) + @if [ "\$(ADD_REPORT)" = "y" ]; then \\ + ./create-sbu_du-report.sh logs $VERSION; \\ + \$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report); \\ + fi; + @touch \$@ restore-luser-env: @\$(call echo_message, Building) @@ -495,25 +501,9 @@ do-housekeeping: EOF ) >> $MKFILE - # Add SBU-disk_usage report target - echo "create-sbu_du-report:" >> $MKFILE - if [[ "$REPORT" = "y" ]] ; then -( - cat << EOF - @\$(call echo_message, Building) - @./create-sbu_du-report.sh logs $VERSION - @\$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report) - @touch \$@ - - -EOF -) >> $MKFILE - else echo -e "\t@true\n\n" >> $MKFILE; fi - # Bring over the items from the Makefile.tmp cat $MKFILE.tmp >> $MKFILE rm $MKFILE.tmp echo "Creating Makefile... ${BOLD}DONE${OFF}" } - diff --git a/CLFS3/master.sh b/CLFS3/master.sh index 74f750f..ac93a14 100644 --- a/CLFS3/master.sh +++ b/CLFS3/master.sh @@ -460,13 +460,20 @@ mk_ROOT: @sudo make SHELL=/bin/bash ROOT @touch \$@ + SETUP: $host_prep - LUSER: $cross_tools $basicsystem $bootscripttools $bootable - ROOT: $chowning +create-sbu_du-report: ROOT + @\$(call echo_message, Building) + @if [ "\$(ADD_REPORT)" = "y" ]; then \\ + ./create-sbu_du-report.sh logs $VERSION; \\ + \$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report); \\ + fi; + @touch \$@ + restore-luser-env: @\$(call echo_message, Building) @if [ -f /home/\$(LUSER)/.bashrc.XXX ]; then \\ @@ -489,21 +496,6 @@ do-housekeeping: EOF ) >> $MKFILE - # Add SBU-disk_usage report target - echo "create-sbu_du-report:" >> $MKFILE - if [[ "$REPORT" = "y" ]] ; then -( - cat << EOF - @\$(call echo_message, Building) - @./create-sbu_du-report.sh logs $VERSION - @\$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report) - @touch \$@ - - -EOF -) >> $MKFILE - else echo -e "\t@true\n\n" >> $MKFILE; fi - # Bring over the items from the Makefile.tmp cat $MKFILE.tmp >> $MKFILE rm $MKFILE.tmp diff --git a/Config.in b/Config.in index 445a294..5e223e4 100644 --- a/Config.in +++ b/Config.in @@ -290,8 +290,7 @@ menu "--- BOOK Settings" config BLFS_TOOL bool "Add blfs-tool support" default n -# depends on !BOOK_BLFS - depends on BOOK_LFS || BOOK_CLFS + depends on !BOOK_BLFS && !BOOK_CLFS2 && !BOOK_CLFS3 help #--- Activating this option additional packages needed to # use blfs-tool will be installed. diff --git a/HLFS/master.sh b/HLFS/master.sh index 7f9fbb6..4cab21c 100644 --- a/HLFS/master.sh +++ b/HLFS/master.sh @@ -522,7 +522,7 @@ build_Makefile() { # Construct a Makefile from the book scripts ( cat << EOF -all: ck_UID mk_SETUP mk_LUSER mk_SUDO mk_CHROOT mk_BOOT create-sbu_du-report +all: ck_UID mk_SETUP mk_LUSER mk_SUDO mk_CHROOT mk_BOOT create-sbu_du-report mk_BLFS_TOOL @sudo make do-housekeeping @\$(call echo_finished,$VERSION) @@ -566,17 +566,30 @@ mk_BOOT: mk_CHROOT @( sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BOOT") @touch \$@ +mk_BLFS_TOOL: create-sbu_du-report + @\$(call echo_PHASE,Building BLFS-TOOLS) + @if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\ + sudo mkdir -p $BUILDDIR$TRACKING_DIR; \\ + sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BLFS_TOOL"; \\ + fi; + @touch \$@ -SETUP: $chapter3 -LUSER: $chapter5 +SETUP: $chapter3 +LUSER: $chapter5 +SUDO: 060-kernfs 062-changingowner +CHROOT: $chapter6 +BOOT: $chapter7 +BLFS_TOOL: $blfs_tool -SUDO: 060-kernfs 062-changingowner - -CHROOT: $chapter6 - -BOOT: $chapter7 +create-sbu_du-report: mk_BOOT + @\$(call echo_message, Building) + @if [ "\$(ADD_REPORT)" = "y" ]; then \\ + ./create-sbu_du-report.sh logs $VERSION; \\ + \$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report); \\ + fi; + @touch \$@ restore-luser-env: @\$(call echo_message, Building) @@ -608,21 +621,6 @@ do-housekeeping: EOF ) >> $MKFILE - # Add SBU-disk_usage report target - echo "create-sbu_du-report:" >> $MKFILE - if [[ "$REPORT" = "y" ]] ; then -( - cat << EOF - @\$(call echo_message, Building) - @./create-sbu_du-report.sh logs $VERSION - @\$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report) - @touch \$@ - - -EOF -) >> $MKFILE - else echo -e "\t@true\n\n" >> $MKFILE; fi - # Bring over the items from the Makefile.tmp cat $MKFILE.tmp >> $MKFILE rm $MKFILE.tmp diff --git a/LFS/master.sh b/LFS/master.sh index 5ab772f..bae1770 100644 --- a/LFS/master.sh +++ b/LFS/master.sh @@ -458,17 +458,30 @@ mk_BOOT: mk_CHROOT @( sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BOOT") @touch \$@ +mk_BLFS_TOOL: create-sbu_du-report + @\$(call echo_PHASE,Building BLFS-TOOLS) + @if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\ + sudo mkdir -p $BUILDDIR$TRACKING_DIR; \\ + sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BLFS_TOOL"; \\ + fi; + @touch \$@ -SETUP: $chapter4 -LUSER: $chapter5 +SETUP: $chapter4 +LUSER: $chapter5 +SUDO: 057-changingowner 059-kernfs +CHROOT: $chapter6 +BOOT: $chapter789 +BLFS_TOOL: $blfs_tool -SUDO: 057-changingowner 059-kernfs - -CHROOT: $chapter6 - -BOOT: $chapter789 +create-sbu_du-report: mk_BOOT + @\$(call echo_message, Building) + @if [ "\$(ADD_REPORT)" = "y" ]; then \\ + ./create-sbu_du-report.sh logs $VERSION; \\ + \$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report); \\ + fi; + @touch \$@ restore-luser-env: @\$(call echo_message, Building) @@ -499,38 +512,6 @@ do_housekeeping: EOF ) >> $MKFILE - # Add SBU-disk_usage report target - echo "create-sbu_du-report:" >> $MKFILE - if [[ "$REPORT" = "y" ]] ; then -( - cat << EOF - @\$(call echo_message, Building) - @./create-sbu_du-report.sh logs $VERSION - @\$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report) - @touch \$@ - - -EOF -) >> $MKFILE - else echo -e "\t@true\n\n" >> $MKFILE; fi - - # Add BLFS_TOOL targets - echo "mk_BLFS_TOOL:" >> $MKFILE - if [[ "$BLFS_TOOL" = "y" ]] ; then -( - cat << EOF - @\$(call echo_CHROOT_request) - @ sudo mkdir -p $BUILDDIR$TRACKING_DIR - @( sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BLFS_TOOL") - @touch \$@ - -BLFS_TOOL: $blfs_tool - - -EOF -) >> $MKFILE - else echo -e "\t@true\n\n" >> $MKFILE; fi - # Bring over the items from the Makefile.tmp cat $MKFILE.tmp >> $MKFILE rm $MKFILE.tmp diff --git a/README b/README index 732b4b1..4efb9ad 100644 --- a/README +++ b/README @@ -81,7 +81,10 @@ $Id$ 6. BLFS_TOOL SUPPORT:: For books that support it, there is an option to install blfs-tool and its - dependendencies on the final system. + dependendencies on the final system. The pre-made build dependencies + scripts has been written thinking on a LFS build. For CLFS and HLFS + builds you may need to adjust that scripts, that are found into the + common/blfs-tool-deps directory in the jhalfs sources tree. After booting the new xLFS system some steps are needed to finish blfs-tool installation: diff --git a/common/libs/func_wrt_Makefile b/common/libs/func_wrt_Makefile index 94a6fd8..249612a 100644 --- a/common/libs/func_wrt_Makefile +++ b/common/libs/func_wrt_Makefile @@ -21,7 +21,6 @@ PKG_LST = $PKG_LST LUSER = $LUSER LGROUP = $LGROUP SCRIPT_ROOT = $SCRIPT_ROOT -ADD_BLFS_TOOLS = $BLFS_TOOL BASEDIR = \$(MOUNT_PT) SRCSDIR = \$(BASEDIR)/sources @@ -38,6 +37,10 @@ LUSER_HOME = /home/\$(LUSER) 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" +ADD_REPORT = $REPORT +ADD_BLFS_TOOLS = $BLFS_TOOL + + export PATH := \${PATH}:/usr/sbin include makefile-functions