Added BLFS_TOOL support to CLFS2 and some bug fixes.
This commit is contained in:
parent
de22e8004a
commit
cd4466fbd9
6 changed files with 53 additions and 15 deletions
|
@ -408,6 +408,9 @@ build_Makefile() { # Construct a Makefile from the book scripts
|
|||
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 @@ build_Makefile() { # Construct a Makefile from the book scripts
|
|||
(
|
||||
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,6 +445,14 @@ mk_LUSER: mk_SETUP
|
|||
@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
|
||||
|
@ -449,10 +461,11 @@ mk_ROOT:
|
|||
|
||||
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; \\
|
||||
|
|
|
@ -329,7 +329,7 @@ menu "--- BOOK Settings"
|
|||
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 @@ menu "--- BOOK Settings"
|
|||
# $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.
|
||||
|
|
6
README
6
README
|
@ -86,6 +86,12 @@ $Id$
|
|||
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:
|
||||
|
||||
|
|
|
@ -144,17 +144,33 @@ wrt_blfs_tool_targets() { #
|
|||
#
|
||||
# Drop in the name of the target on a new line, and the previous target
|
||||
# as a dependency. Also call the echo_message function.
|
||||
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.
|
||||
if [ "$PROGNAME" = "clfs2" ]; then
|
||||
[[ ! "$name" = "docbook-xml" ]] && LUSER_wrt_unpack "$pkg_tarball"
|
||||
else
|
||||
[[ ! "$name" = "docbook-xml" ]] && CHROOT_Unpack "$pkg_tarball"
|
||||
fi
|
||||
|
||||
# Run the script.
|
||||
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.
|
||||
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 @@ wrt_blfs_tool_targets() { #
|
|||
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@touch \$(MOUNT_PT)$TRACKING_DIR/$pkg_ver" >> $MKFILE.tmp
|
||||
else
|
||||
echo -e "\t@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.
|
||||
|
|
|
@ -22,7 +22,7 @@ inline_doc
|
|||
# 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"
|
||||
|
|
|
@ -10,7 +10,6 @@ WHITE = "[00m"
|
|||
YELLOW = "[1;33m"
|
||||
|
||||
OFF = "[0m"
|
||||
BOLD = "[1m"
|
||||
REVERSE = "[7m"
|
||||
|
||||
tab_ = " "
|
||||
|
@ -140,7 +139,7 @@ define echo_report
|
|||
@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@linuxfromscratch.org$(WHITE); \
|
||||
echo; \
|
||||
echo That will help us to keep more accurate SBU and; \
|
||||
|
|
Reference in a new issue