Hi,

When configuring jhalfs, the user is given the possibility
of choosing "Beyond Linux From Scratch" in the
"Use BOOK" menu. That basically disables all the settings you
have when running jhalfs, except the choice of
the Release and of a few directories needed for
blfs-tools. Then `blfs-tool' is run instead of
`jhalfs'. Basically, `blfs-tool' performs a few
checks, and sets up a "blfs_root" directory in
users's $HOME. It then launches make in that
directory.
All the preceding supposes that LFS is already
installed (with the BLFS dependencies, DocBook,
Lynx and friends). It does not much more than
what jhalfs does when ticking "Add blfs-tool support".
The only part which is missing after jhalfs is
moving "blfs_root" to user's $HOME, which is
not mandatory actually.
Furthermore, choosing blindly "Beyond Linux From Scratch" in the
"Use BOOK" menu on a non LFS system is potentially harmfull,
since you might end up installing BLFS packages on your
host system!
So my proposition is to remove altogether the
"Beyond Linux From Scratch" choice and the blfs-root script.
See attached patch.

Regards
Pierre


Index: jhalfs/blfs-tool
===================================================================
--- jhalfs.orig/blfs-tool	2012-02-03 21:31:04.000000000 +0100
+++ /dev/null	1970-01-01 00:00:00.000000000 +0000
@@ -1,182 +0,0 @@
-#!/bin/bash
-# $Id: blfs-tool 3529 2009-07-31 22:58:20Z thomasp $
-
-set -e
-
-# From common/common-functions
-# VT100 colors
-declare -r  BLACK=$'\e[1;30m'
-declare -r  DK_GRAY=$'\e[0;30m'
-
-declare -r  RED=$'\e[31m'
-declare -r  GREEN=$'\e[32m'
-declare -r  YELLOW=$'\e[33m'
-declare -r  BLUE=$'\e[34m'
-declare -r  MAGENTA=$'\e[35m'
-declare -r  CYAN=$'\e[36m'
-declare -r  WHITE=$'\e[37m'
-
-declare -r  OFF=$'\e[0m'
-declare -r  BOLD=$'\e[1m'
-declare -r  REVERSE=$'\e[7m'
-declare -r  HIDDEN=$'\e[8m'
-
-declare -r  tab_=$'\t'
-declare -r  nl_=$'\n'
-
-declare -r   DD_BORDER="${BOLD}==============================================================================${OFF}"
-declare -r   SD_BORDER="${BOLD}------------------------------------------------------------------------------${OFF}"
-declare -r STAR_BORDER="${BOLD}******************************************************************************${OFF}"
-
-# bold yellow > <  pair
-declare -r R_arrow=$'\e[1;33m>\e[0m'
-declare -r L_arrow=$'\e[1;33m<\e[0m'
-
-
-#>>>>>>>>>>>>>>>ERROR TRAPPING >>>>>>>>>>>>>>>>>>>>
-#-----------------------#
-simple_error() {        # Basic error trap.... JUST DIE
-#-----------------------#
-  # If +e then disable text output
-  if [[ "$-" =~ e ]]; then
-    echo -e "\n${RED}ERROR:${GREEN} basic error trapped!${OFF}\n" >&2
-  fi
-}
-
-see_ya() {
-    echo -e "\n${L_arrow}${BOLD}jhalfs-trunk${R_arrow} exit${OFF}\n"
-}
-##### Simple error TRAPS
-# ctrl-c   SIGINT
-# ctrl-y
-# ctrl-z   SIGTSTP
-# SIGHUP   1 HANGUP
-# SIGINT   2 INTRERRUPT FROM KEYBOARD Ctrl-C
-# SIGQUIT  3
-# SIGKILL  9 KILL
-# SIGTERM 15 TERMINATION
-# SIGSTOP 17,18,23 STOP THE PROCESS
-#####
-set -e
-trap see_ya 0
-trap simple_error ERR
-trap 'echo -e "\n\n${RED}INTERRUPT${OFF} trapped\n" &&  exit 2'  1 2 3 15 17 18 23
-#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-# envars not sourced from configuration file
-COMMON_DIR="common"
-VERBOSITY=1
-
-[[ $VERBOSITY > 0 ]] && echo -n "Loading config params from <configuration>..."
-source configuration
-[[ $? > 0 ]] && echo "file:configuration did not load.." && exit 1
-[[ $VERBOSITY > 0 ]] && echo "OK"
-
-[[ $VERBOSITY > 0 ]] && echo -n "Loading function <func_check_version.sh>..."
-source $COMMON_DIR/libs/func_check_version.sh
-[[ $? > 0 ]] && echo " function module did not load.." && exit 2
-[[ $VERBOSITY > 0 ]] && echo "OK"
-
-[[ $VERBOSITY > 0 ]] && echo -n "Loading function <func_validate_configs.sh>..."
-source $COMMON_DIR/libs/func_validate_configs.sh
-[[ $? > 0 ]] && echo " function module did not load.." && exit 2
-[[ $VERBOSITY > 0 ]] && echo "OK"
-[[ $VERBOSITY > 0 ]] && echo "${SD_BORDER}${nl_}"
-
-# Be sure that we have a configuration file
-[[ -z $BOOK_BLFS ]] && echo -e "\nNo BLFS configuration found. Please configure it." && exit 1
-
-# Set default book version
-BRANCH_ID=${BRANCH_ID:=development}
-
-# Set the SVN tree
-case $BRANCH_ID in
-  development )  TREE=trunk/BOOK ;;
-       *EDIT* )  echo " You forgot to set the branch or stable book version."
-                 echo " Please rerun make and fix the configuration."
-                 exit 2 ;;
-     branch-* )  TREE=branches/${BRANCH_ID#branch-}/BOOK ;;
-            * )  TREE=tags/${BRANCH_ID} ;;
-esac
-
-# Check for minimun dependencies versions
-xsltprocVer=`xsltproc -V | head -n1 `
-  libxmlVer=$(echo $xsltprocVer | cut -d " " -f3)
- libxsltVer=$(echo $xsltprocVer | cut -d " " -f5)
-    tidyVer=`tidy -V | cut -d " " -f9`
-
-  # Version numbers are packed strings not xx.yy.zz format.
-check_version "2.06.20"  "${libxmlVer:0:1}.${libxmlVer:1:2}.${libxmlVer:3:2}"     "LIBXML2"
-check_version "1.01.14"  "${libxsltVer:0:1}.${libxsltVer:1:2}.${libxsltVer:3:2}"  "LIBXSLT"
-check_version "2004"     "${tidyVer}"                                             "TIDY"
-
-XML_FILE="<?xml version='1.0' encoding='ISO-8859-1'?>
-<?xml-stylesheet type='text/xsl' href='http://docbook.sourceforge.net/release/xsl/1.69.1/xhtml/docbook.xsl'?>
-<!DOCTYPE article PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN'
-  'http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd'>
-<article>
-  <title>Test file</title>
-  <sect1>
-    <title>Some title</title>
-    <para>Some text</para>
-  </sect1>
-</article>"
-
-if `echo $XML_FILE | xmllint -noout -postvalid - 2>/dev/null` ; then
-  check_version "4.5" "4.5" "DocBook XML DTD"
-else
-  echo "Warning: not found a working DocBook XML DTD 4.5 installation"
-  exit 2
-fi
-
-# if `echo $XML_FILE | xsltproc --noout - 2>/dev/null` ; then
-#   check_version "1.69.1" "1.69.1" "DocBook XSL"
-# else
-#   echo "Warning: not found a working DocBook XSL 1.69.1 installation"
-#   exit 2
-# fi
-
-echo "${SD_BORDER}${nl_}"
-
-# For consistency with other books
-validate_config
-echo "${SD_BORDER}${nl_}"
-echo -n "Are you happy with these settings? yes/no (no): "
-read ANSWER
-if [ x$ANSWER != "xyes" ] ; then
-  echo "${nl_}Rerun make to fix the configuration options.${nl_}"
-  exit 1
-fi
-echo "${nl_}${SD_BORDER}${nl_}"
-
-# Install the files
-[[ ! -d $BLFS_ROOT ]] && mkdir -p $BLFS_ROOT
-
-cp -r BLFS/* $BLFS_ROOT
-cp -r menu $BLFS_ROOT
-cp $COMMON_DIR/progress_bar.sh $BLFS_ROOT
-cp README.BLFS $BLFS_ROOT
-
-# Start the work
-cd $BLFS_ROOT
-
-# Clean-up
-rm -rf libs/.svn
-rm -rf menu/.svn
-rm -rf menu/lxdialog/.svn
-
-
-# Set some harcoded envars to their proper values
-sed -i 's,blfs-xml,'$BLFS_XML',' update_book.sh libs/book.xsl
-sed -i 's,tracking-dir,'$TRACKING_DIR',' update_book.sh gen-makefile.sh
-
-# Fetch book sources and create packages and meta-packages dependencies files
-if [[ -d $BLFS_XML ]] ; then
-  ./update_book.sh
-else
-  ./update_book.sh get $BLFS_XML $TREE
-fi
-
-# Run the menuconfig interface
-make -B
-
Index: jhalfs/Config.in
===================================================================
--- jhalfs.orig/Config.in	2012-02-11 08:29:05.000000000 +0100
+++ jhalfs/Config.in	2012-02-18 12:35:22.000000000 +0100
@@ -22,8 +22,6 @@
 #		config	BOOK_HLFS
 #			bool "Hardened Linux From Scratch"
 
-		config	BOOK_BLFS
-			bool "Beyond Linux From Scratch"
 	endchoice
 
 	config	PROGNAME
@@ -33,12 +31,10 @@
 		default	"clfs2"		if BOOK_CLFS2
 		default	"clfs3"		if BOOK_CLFS3
 		default	"hlfs"		if BOOK_HLFS
-		default	"blfs"		if BOOK_BLFS
 
 	config	RUN_ME
 		string
-		default	"./jhalfs run"	if !BOOK_BLFS
-		default	"./blfs-tool"	if BOOK_BLFS
+		default	"./jhalfs run"
 	#--- End BOOK/script
 
 	#--- Book version
@@ -52,7 +48,6 @@
 
 		config	WORKING_COPY
 			bool	"Working Copy"
-			depends on !BOOK_BLFS
 			help
 				#-- A local working copy
 
@@ -491,7 +486,6 @@
 	config CUSTOM_TOOLS
 		bool	"Add custom tools support"
 		default	n
-		depends on !BOOK_BLFS
 		help
 			#--- Activating this option additional packages you create
 			#    will be installed after finished the xLFS system build.
@@ -502,7 +496,7 @@
 	config BLFS_TOOL
 		bool	"Add blfs-tool support"
 		default	n
-		depends on !BOOK_BLFS && !BOOK_CLFS3
+		depends on !BOOK_CLFS3
 		help
 			#--- Activating this option will install additional
 			#    packages needed to use blfs-tool when booting
@@ -612,9 +606,8 @@
 	#--- BLFS specific params
 	config	BLFS_ROOT
 		string "Directory root"
-		default "$HOME/blfs_root" if BOOK_BLFS
 		default "/blfs_root" if BLFS_TOOL
-		depends on BOOK_BLFS || BLFS_TOOL
+		depends on BLFS_TOOL
 		help
 			#-- Full path to the directory where all required
 			#   files and scripts will be stored.
@@ -622,28 +615,25 @@
 	config	BLFS_XML
 		string "BLFS sources directory"
 		default "blfs-xml"
-		depends on BOOK_BLFS || BLFS_TOOL
+		depends on BLFS_TOOL
 		help
 			#-- The directory name under $BLFS_ROOT where the BLFS
-                        #   book sources will be checkout.
+                        #   book sources will be checked out.
 
 	config	TRACKING_DIR
 		string "Installed packages database directory"
 		default "/var/lib/jhalfs/BLFS"
-		depends on BOOK_BLFS || BLFS_TOOL || CUSTOM_TOOLS
+		depends on BLFS_TOOL || CUSTOM_TOOLS
 		help
 			#-- Full path to the directory where the database of
                         #   installed packages will be created.
 			#
-			#   If you are installing blfs-tool on a running xLFS system
-                        #   you MUST create this directory manually.
-                        #
                         #   If you are installing blfs-tool as part of an xLFS build
                         #   and/or using the customized scripts feature, you will
                         #   need to fix this directory's permissions after booting
                         #   the new system.
 			#
-			#   Note that the user that will build the packages must
+			#   Note that the user who builds the packages must
 			#   have read and write privileges on this directory.
 	#--- End BLFS specific params
 
@@ -651,7 +641,6 @@
 endmenu
 
 menu "--- General Settings"
-	depends on !BOOK_BLFS
 
 	#--- Set User Account
 	config	CONFIG_USER
@@ -797,7 +786,6 @@
 endmenu
 
 menu "--- Build Settings"
-	depends on !BOOK_BLFS
 
 	#--- Test Suites
 	config	CONFIG_TESTS
@@ -1002,7 +990,6 @@
 endmenu
 
 menu "--- Advanced Features"
-	depends on !BOOK_BLFS
 
 	config	REPORT
 		bool "Create SBU and disk usage report"
@@ -1151,7 +1138,6 @@
 config REBUILD_MAKEFILE
 	bool "Rebuild the Makefile (see help)"
 	default n
-	depends on !BOOK_BLFS
 	help
 		#-- Rebuild the Makefile
 		#
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discuss
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to