diff --git a/Config.in b/Config.in index aee3253..b9692f8 100644 --- a/Config.in +++ b/Config.in @@ -1077,12 +1077,23 @@ menu "System configuration" endmenu #--- System configuration menu "Advanced Features" -depends on !BOOK_BLFS +depends on !BOOK_BLFS && !REBUILD_MAKEFILE config REPORT bool "Create SBU and disk usage report" default y + config SAVE_CH5 + bool "Save Chapter 5 work" + depends on BOOK_LFS || BOOK_LFS_SYSD + default n + help + Save the state of jhalfs at the end of chapter 5: + + if you tick this item, the whole $LFS directory is + saved when chapter 5 is finished. It'll be in an xz + compressed tarball in the $LFS/jhalfs directory + #--- ICA config COMPARE bool "Run comparison analysis on final stage" diff --git a/LFS/master.sh b/LFS/master.sh index cdc05a7..3eab1a4 100644 --- a/LFS/master.sh +++ b/LFS/master.sh @@ -100,7 +100,7 @@ chapter5_Makefiles() { # Initialize the Makefile target: it'll change during chapter # For vanilla lfs, the "changingowner" script should be run as root. So # it belongs to the "SUDO" target, with list in the "runasroot" variable. -# For new lfs, changingowner and kernfs are in "runsaroot", then the following, +# For new lfs, changingowner and kernfs are in "runasroot", then the following, # starting at creatingdirs, are in the "CHROOT" target, in variable "chapter6". # Makefile_target records the variable, not really the target! # We use a case statement on that variable, because instructions in the @@ -441,6 +441,8 @@ build_Makefile() { # chapter4_Makefiles chapter5_Makefiles + # Add the save target, if needed + [[ "$SAVE_CH5" = "y" ]] && wrt_save_target $Makefile_target chapter6_Makefiles # Add the iterations targets, if needed [[ "$COMPARE" = "y" ]] && wrt_compare_targets diff --git a/common/libs/func_compare.sh b/common/libs/func_compare.sh index d5e2f3d..a4718db 100644 --- a/common/libs/func_compare.sh +++ b/common/libs/func_compare.sh @@ -53,7 +53,7 @@ wrt_compare_work() { # local ITERATION=$1 local PREV_IT=$2 local PRUNEPATH="/dev /home /${SCRIPT_ROOT} /lost+found /media /mnt /opt /proc \ -/sources /root /srv /sys /tmp /tools /usr/local /usr/src" +/sources /root /run /srv /sys /tmp /tools /usr/local /usr/src /var" local ROOT_DIR=/ local DEST_TOPDIR=/${SCRIPT_ROOT} diff --git a/common/libs/func_validate_configs.sh b/common/libs/func_validate_configs.sh index 34f6150..0f7a816 100644 --- a/common/libs/func_validate_configs.sh +++ b/common/libs/func_validate_configs.sh @@ -51,7 +51,7 @@ inline_doc local -r LFS_system="HOSTNAME INTERFACE IP_ADDR GATEWAY PREFIX BROADCAST DOMAIN DNS1 DNS2 FONT KEYMAP LOCAL LOG_LEVEL" # Full list of books settings - local -r lfs_PARAM_LIST="$LFS_book $GENERAL_common $LFS_build $LFS_system $ADVANCED_chroot REALSBU $ADVANCED_common" + local -r lfs_PARAM_LIST="$LFS_book $GENERAL_common $LFS_build $LFS_system $ADVANCED_chroot REALSBU SAVE_CH5 $ADVANCED_common" local -r hlfs_PARAM_LIST="$HLFS_book $GENERAL_common $HLFS_build $ADVANCED_chroot $ADVANCED_common" local -r clfs_PARAM_LIST="$CLFS_book $GENERAL_common $CLFS_build $ADVANCED_chroot $ADVANCED_common" local -r clfs2_PARAM_LIST="$CLFS2_book $GENERAL_common $CLFS2_build $ADVANCED_common" diff --git a/jhalfs b/jhalfs index 38dd8b5..2c01ac3 100755 --- a/jhalfs +++ b/jhalfs @@ -178,6 +178,7 @@ SET_BLOWFISH=${SET_BLOWFISH:=n} UNICODE=${UNICODE:=n} LOCAL=${LOCAL:=n} REALSBU=${REALSBU:=n} +SAVE_CH5=${SAVE_CH5:=n} if [[ "${NO_PROGRESS_BAR}" = "y" ]] ; then # shellcheck disable=SC2034 @@ -354,6 +355,11 @@ if [[ "$COMPARE" = "y" ]]; then load_file "${COMMON_DIR}/libs/func_compare.sh" 'Loading compare module' fi # +# save module +if [[ "$SAVE_CH5" = "y" ]]; then + load_file "${COMMON_DIR}/libs/func_save.sh" 'Loading save module' +fi +# # optimize module if [[ "$OPTIMIZE" != "0" ]]; then load_file optimize/optimize_functions 'Loading optimization module'