Changed how create-sbu_du-report target is created.
Added blfs-tool support to HLFS.
This commit is contained in:
parent
1f81129de6
commit
1838bc7f42
8 changed files with 80 additions and 120 deletions
|
@ -1099,12 +1099,12 @@ mk_SYSTOOLS: mk_SUDO
|
||||||
@( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make CHROOT_JAIL")
|
@( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make CHROOT_JAIL")
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_BLFS_TOOL: mk_SYSTOOLS
|
mk_BLFS_TOOL: create-sbu_du-report
|
||||||
@\$(call echo_PHASE,Building BLFS-TOOLS); \\
|
@\$(call echo_PHASE,Building BLFS-TOOLS)
|
||||||
@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
|
@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
|
||||||
sudo mkdir -p $BUILDDIR$TRACKING_DIR; \\
|
sudo mkdir -p $BUILDDIR$TRACKING_DIR; \\
|
||||||
sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make BLFS_TOOL"; \\
|
sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make BLFS_TOOL"; \\
|
||||||
fi
|
fi;
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
SETUP: $host_prep
|
SETUP: $host_prep
|
||||||
|
@ -1113,6 +1113,15 @@ SUDO: $orphan_scripts
|
||||||
CHROOT_JAIL: ${chroottools}${boottools} $testsuitetools $basicsystem $bootscripttools $bootabletools
|
CHROOT_JAIL: ${chroottools}${boottools} $testsuitetools $basicsystem $bootscripttools $bootabletools
|
||||||
BLFS_TOOL: $blfs_tool
|
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:
|
do-housekeeping:
|
||||||
@-umount \$(MOUNT_PT)/dev/pts
|
@-umount \$(MOUNT_PT)/dev/pts
|
||||||
@-umount \$(MOUNT_PT)/dev/shm
|
@-umount \$(MOUNT_PT)/dev/shm
|
||||||
|
@ -1128,21 +1137,6 @@ do-housekeeping:
|
||||||
EOF
|
EOF
|
||||||
) >> $MKFILE
|
) >> $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
|
fi
|
||||||
|
|
||||||
################### BOOT #####################
|
################### BOOT #####################
|
||||||
|
|
|
@ -467,11 +467,17 @@ mk_ROOT:
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
SETUP: $host_prep
|
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:
|
restore-luser-env:
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
|
@ -495,25 +501,9 @@ do-housekeeping:
|
||||||
EOF
|
EOF
|
||||||
) >> $MKFILE
|
) >> $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
|
# Bring over the items from the Makefile.tmp
|
||||||
cat $MKFILE.tmp >> $MKFILE
|
cat $MKFILE.tmp >> $MKFILE
|
||||||
rm $MKFILE.tmp
|
rm $MKFILE.tmp
|
||||||
echo "Creating Makefile... ${BOLD}DONE${OFF}"
|
echo "Creating Makefile... ${BOLD}DONE${OFF}"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -460,13 +460,20 @@ mk_ROOT:
|
||||||
@sudo make SHELL=/bin/bash ROOT
|
@sudo make SHELL=/bin/bash ROOT
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
|
|
||||||
SETUP: $host_prep
|
SETUP: $host_prep
|
||||||
|
|
||||||
LUSER: $cross_tools $basicsystem $bootscripttools $bootable
|
LUSER: $cross_tools $basicsystem $bootscripttools $bootable
|
||||||
|
|
||||||
ROOT: $chowning
|
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:
|
restore-luser-env:
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
@if [ -f /home/\$(LUSER)/.bashrc.XXX ]; then \\
|
@if [ -f /home/\$(LUSER)/.bashrc.XXX ]; then \\
|
||||||
|
@ -489,21 +496,6 @@ do-housekeeping:
|
||||||
EOF
|
EOF
|
||||||
) >> $MKFILE
|
) >> $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
|
# Bring over the items from the Makefile.tmp
|
||||||
cat $MKFILE.tmp >> $MKFILE
|
cat $MKFILE.tmp >> $MKFILE
|
||||||
rm $MKFILE.tmp
|
rm $MKFILE.tmp
|
||||||
|
|
|
@ -290,8 +290,7 @@ menu "--- BOOK Settings"
|
||||||
config BLFS_TOOL
|
config BLFS_TOOL
|
||||||
bool "Add blfs-tool support"
|
bool "Add blfs-tool support"
|
||||||
default n
|
default n
|
||||||
# depends on !BOOK_BLFS
|
depends on !BOOK_BLFS && !BOOK_CLFS2 && !BOOK_CLFS3
|
||||||
depends on BOOK_LFS || BOOK_CLFS
|
|
||||||
help
|
help
|
||||||
#--- Activating this option additional packages needed to
|
#--- Activating this option additional packages needed to
|
||||||
# use blfs-tool will be installed.
|
# use blfs-tool will be installed.
|
||||||
|
|
|
@ -522,7 +522,7 @@ build_Makefile() { # Construct a Makefile from the book scripts
|
||||||
(
|
(
|
||||||
cat << EOF
|
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
|
@sudo make do-housekeeping
|
||||||
@\$(call echo_finished,$VERSION)
|
@\$(call echo_finished,$VERSION)
|
||||||
|
|
||||||
|
@ -566,17 +566,30 @@ mk_BOOT: mk_CHROOT
|
||||||
@( sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BOOT")
|
@( sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BOOT")
|
||||||
@touch \$@
|
@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:
|
restore-luser-env:
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
|
@ -608,21 +621,6 @@ do-housekeeping:
|
||||||
EOF
|
EOF
|
||||||
) >> $MKFILE
|
) >> $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
|
# Bring over the items from the Makefile.tmp
|
||||||
cat $MKFILE.tmp >> $MKFILE
|
cat $MKFILE.tmp >> $MKFILE
|
||||||
rm $MKFILE.tmp
|
rm $MKFILE.tmp
|
||||||
|
|
|
@ -458,17 +458,30 @@ mk_BOOT: mk_CHROOT
|
||||||
@( sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BOOT")
|
@( sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BOOT")
|
||||||
@touch \$@
|
@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:
|
restore-luser-env:
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
|
@ -499,38 +512,6 @@ do_housekeeping:
|
||||||
EOF
|
EOF
|
||||||
) >> $MKFILE
|
) >> $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
|
# Bring over the items from the Makefile.tmp
|
||||||
cat $MKFILE.tmp >> $MKFILE
|
cat $MKFILE.tmp >> $MKFILE
|
||||||
rm $MKFILE.tmp
|
rm $MKFILE.tmp
|
||||||
|
|
5
README
5
README
|
@ -81,7 +81,10 @@ $Id$
|
||||||
6. BLFS_TOOL SUPPORT::
|
6. BLFS_TOOL SUPPORT::
|
||||||
|
|
||||||
For books that support it, there is an option to install blfs-tool and its
|
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
|
After booting the new xLFS system some steps are needed to finish
|
||||||
blfs-tool installation:
|
blfs-tool installation:
|
||||||
|
|
|
@ -21,7 +21,6 @@ PKG_LST = $PKG_LST
|
||||||
LUSER = $LUSER
|
LUSER = $LUSER
|
||||||
LGROUP = $LGROUP
|
LGROUP = $LGROUP
|
||||||
SCRIPT_ROOT = $SCRIPT_ROOT
|
SCRIPT_ROOT = $SCRIPT_ROOT
|
||||||
ADD_BLFS_TOOLS = $BLFS_TOOL
|
|
||||||
|
|
||||||
BASEDIR = \$(MOUNT_PT)
|
BASEDIR = \$(MOUNT_PT)
|
||||||
SRCSDIR = \$(BASEDIR)/sources
|
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 = 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"
|
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
|
export PATH := \${PATH}:/usr/sbin
|
||||||
|
|
||||||
include makefile-functions
|
include makefile-functions
|
||||||
|
|
Reference in a new issue