r3193 - jhalfs/trunk

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Wed Oct 18 12:28:51 PDT 2006


Author: manuel
Date: 2006-10-18 13:28:47 -0600 (Wed, 18 Oct 2006)
New Revision: 3193

Modified:
   jhalfs/trunk/Config.in
   jhalfs/trunk/README.CUSTOM
   jhalfs/trunk/TODO
   jhalfs/trunk/jhalfs
Log:
Started support to customize de base system build allowing Makefile regeneration.

Modified: jhalfs/trunk/Config.in
===================================================================
--- jhalfs/trunk/Config.in	2006-10-16 22:59:45 UTC (rev 3192)
+++ jhalfs/trunk/Config.in	2006-10-18 19:28:47 UTC (rev 3193)
@@ -823,3 +823,16 @@
 
 #--- End Advanced Features
 endmenu
+
+config RE_MAKE
+	bool "Rebuild the Makefile (see help)"
+	default n
+	depends on !BOOK_BLFS
+	help
+		#-- Rebuild the Makefile
+		#
+		#   This option alow to rebuild the Makefile after
+		#   customizing the base system build scripts.
+		#
+		#   See README.CUSTOM for more info about this feature.
+

Modified: jhalfs/trunk/README.CUSTOM
===================================================================
--- jhalfs/trunk/README.CUSTOM	2006-10-16 22:59:45 UTC (rev 3192)
+++ jhalfs/trunk/README.CUSTOM	2006-10-18 19:28:47 UTC (rev 3193)
@@ -10,7 +10,40 @@
 Rather than adding numerous package scripts and switches for each request it
 was easier to add a tool for the user(s) to code their own package needs.
 
+  There is two areas that can be customized: how the base system is build
+and what additional configurations and packages requires your hardware to can
+boot and work with. Each one of this areas is handled in a diferent way.
 
+        BASE SYSTEM CUSTOMIZATION
+
+  There is two ways to alter how the base system will be built:
+
+  - Using a working copy of the book sources and editing the XML files.
+    This is the way used by book editors to test packages upgrades,
+    command changes, build order changes. etc.
+
+    This method requires you know very well the book sources and what
+    files need be edited. It will not be discussed here.
+
+  - Editing the generated build scripts to make any change you would.
+    This is the method discussed below.
+
+(TO BE WRITTEN)
+
+
+       ADDING POST-SYSTEM BUILD CONFIGURATION FILES AND EXTRA PACKAGES
+
+  The installation of BLFS packages is handled via blfs-tool and activated
+when you select the appropiate menu option. See README and README.BLFS for
+more info.
+
+  The feature descrbed below was added so users could install remaining
+configuration files, build the packages necessary to access the internet
+or to support specific hardware, or to install basic utilities that need
+have availables from the beginning, and was not intended to replace the BLFS
+install system.
+
+
   LAYOUT
   A new directory has been added to JHALFS tree which will contain the
 configuration scripts and a few examples. A switch has been added to the
@@ -63,11 +96,7 @@
     the cmd
         make mk_CUSTOM_TOOLS
 
-  :::FINAL COMMENT:::
-    This feature was added so users could build the packages necessary to access
-    the internet and was not intended to replace the BLFS install system.
 
-
 #--------- GLIB example -----------
 
   #
@@ -113,7 +142,7 @@
 URL="ftp://arcana.linux.it/pub/gpm/gpm-1.20.1.tar.bz2"
 MD5="2c63e827d755527950d9d13fe3d87692"
 
-  # MD5SUM is not absolutely necessary but JHALFS whines and complains 
+  # MD5SUM is not absolutely necessary but JHALFS whines and complains
   # Add the MD5SUM if you can
 PATCH1=" http://www.linuxfromscratch.org/patches/blfs/svn/gpm-1.20.1-segfault-1.patch"
 PATCH2=" http://www.linuxfromscratch.org/patches/blfs/svn/gpm-1.20.1-silent-1.patch"
@@ -153,8 +182,8 @@
   # There are no referenced to a package or package dir.
   # This method is useful for creating user files/profiles/etc
   # at build time.
-   
 
+
 PKG=""
 PKG_VERSION=""
 PKG_FILE=""

Modified: jhalfs/trunk/TODO
===================================================================
--- jhalfs/trunk/TODO	2006-10-16 22:59:45 UTC (rev 3192)
+++ jhalfs/trunk/TODO	2006-10-18 19:28:47 UTC (rev 3193)
@@ -17,7 +17,8 @@
   - To develop a new "restart" Makefile target code.
 
   - To add support for copying to the final system pre-generated
-    configuration files created by the user, if that can be implemented.
+    configuration files created by the user.
+    Work in progress via CUSTOM_TOOLS
 
 
 BLFS MODULE (See BLFS/TODO)
@@ -34,3 +35,5 @@
       That requires a way to can regenerate the Makefile if additional
       scripts are manually added to the *-commands/*/ dirs.
 
+    Work in progress via RE_MAKE
+

Modified: jhalfs/trunk/jhalfs
===================================================================
--- jhalfs/trunk/jhalfs	2006-10-16 22:59:45 UTC (rev 3192)
+++ jhalfs/trunk/jhalfs	2006-10-18 19:28:47 UTC (rev 3193)
@@ -108,6 +108,7 @@
 VIMLANG=${VIMLANG:-n}
 GRSECURITY_HOST=${GRSECURITY_HOST:-n}
 CUSTOM_TOOLS=${CUSTOM_TOOLS:-n}
+RE_MAKE=${RE_MAKE:-n}
 
 # Book surces envars
 BRANCH_ID=${BRANCH_ID:=development}
@@ -316,108 +317,112 @@
 fi
 #
 
-# If $BUILDDIR has subdirectories like tools/ or bin/, stop the run
-# and notify the user about that.
-if [ -d $BUILDDIR/tools -o -d $BUILDDIR/bin ] && [ -z $CLEAN ] ; then
-  eval "$no_empty_builddir"
-fi
+if [[ "$RE_MAKE" = "n" ]] ; then
 
-# If requested, clean the build directory
-clean_builddir
+  # If $BUILDDIR has subdirectories like tools/ or bin/, stop the run
+  # and notify the user about that.
+  if [ -d $BUILDDIR/tools -o -d $BUILDDIR/bin ] && [ -z $CLEAN ] ; then
+    eval "$no_empty_builddir"
+  fi
 
-if [[ ! -d $JHALFSDIR ]]; then
-  mkdir -p $JHALFSDIR
-fi
-#
-# Create $BUILDDIR/sources even though it could be created by get_sources()
-if [[ ! -d $BUILDDIR/sources ]]; then
-  mkdir -p $BUILDDIR/sources
-fi
-#
-# Create the log directory
-if [[ ! -d $LOGDIR ]]; then
-  mkdir $LOGDIR
-fi
->$LOGDIR/$LOG
-#
-[[ "$TEST" != "0" ]] && [[ ! -d $TESTLOGDIR ]] && install -d -m 1777 $TESTLOGDIR
-#
-cp $COMMON_DIR/{makefile-functions,progress_bar.sh} $JHALFSDIR/
-#
-[[ "$OPTIMIZE" != "0" ]] && cp optimize/opt_override $JHALFSDIR/
-#
-if [[ "$COMPARE" = "y" ]]; then
-  mkdir -p $JHALFSDIR/extras
-  cp extras/* $JHALFSDIR/extras
-fi
-#
-if [[ -n "$FILES" ]]; then
-  # pushd/popd necessary to deal with multiple files
-  pushd $PACKAGE_DIR 1> /dev/null
-    cp $FILES $JHALFSDIR/
-  popd 1> /dev/null
-fi
-#
-if [[ "${PROGNAME}" = "lfs" ]]; then
-  if [[ "${CUSTOM_TOOLS}" = "y" ]]; then
-    echo "Copying custom tool scripts to $JHALFSDIR"
-    mkdir -p $JHALFSDIR/custom-commands/config
-    mkdir -p $JHALFSDIR/custom-commands/scripts
-   cp -Rf custom/* $JHALFSDIR/custom-commands
+  # If requested, clean the build directory
+  clean_builddir
+
+  if [[ ! -d $JHALFSDIR ]]; then
+    mkdir -p $JHALFSDIR
   fi
-fi
+  #
+  # Create $BUILDDIR/sources even though it could be created by get_sources()
+  if [[ ! -d $BUILDDIR/sources ]]; then
+    mkdir -p $BUILDDIR/sources
+  fi
+  #
+  # Create the log directory
+  if [[ ! -d $LOGDIR ]]; then
+    mkdir $LOGDIR
+  fi
+  >$LOGDIR/$LOG
+  #
+  [[ "$TEST" != "0" ]] && [[ ! -d $TESTLOGDIR ]] && install -d -m 1777 $TESTLOGDIR
+  #
+  cp $COMMON_DIR/{makefile-functions,progress_bar.sh} $JHALFSDIR/
+  #
+  [[ "$OPTIMIZE" != "0" ]] && cp optimize/opt_override $JHALFSDIR/
+  #
+  if [[ "$COMPARE" = "y" ]]; then
+    mkdir -p $JHALFSDIR/extras
+    cp extras/* $JHALFSDIR/extras
+  fi
+  #
+  if [[ -n "$FILES" ]]; then
+    # pushd/popd necessary to deal with multiple files
+    pushd $PACKAGE_DIR 1> /dev/null
+      cp $FILES $JHALFSDIR/
+    popd 1> /dev/null
+  fi
+  #
+  if [[ "${PROGNAME}" = "lfs" ]]; then
+    if [[ "${CUSTOM_TOOLS}" = "y" ]]; then
+      echo "Copying custom tool scripts to $JHALFSDIR"
+      mkdir -p $JHALFSDIR/custom-commands/config
+      mkdir -p $JHALFSDIR/custom-commands/scripts
+    cp -Rf custom/* $JHALFSDIR/custom-commands
+    fi
+  fi
 
-#
-if [[ "$REPORT" = "y" ]]; then
-  cp $COMMON_DIR/create-sbu_du-report.sh  $JHALFSDIR/
-  # After being sure that all looks sane, dump the settings to a file
-  # This file will be used to create the REPORT header
-  validate_config > $JHALFSDIR/jhalfs.config
-fi
-#
-[[ "$GETPKG" = "y" ]] && cp $COMMON_DIR/urls.xsl  $JHALFSDIR/
-#
-cp $COMMON_DIR/packages.xsl  $JHALFSDIR/
-#
-sed 's,FAKEDIR,'$BOOK',' $PACKAGE_DIR/$XSL > $JHALFSDIR/${XSL}
-export XSL=$JHALFSDIR/${XSL}
+  #
+  if [[ "$REPORT" = "y" ]]; then
+    cp $COMMON_DIR/create-sbu_du-report.sh  $JHALFSDIR/
+    # After being sure that all looks sane, dump the settings to a file
+    # This file will be used to create the REPORT header
+    validate_config > $JHALFSDIR/jhalfs.config
+  fi
+  #
+  [[ "$GETPKG" = "y" ]] && cp $COMMON_DIR/urls.xsl  $JHALFSDIR/
+  #
+  cp $COMMON_DIR/packages.xsl  $JHALFSDIR/
+  #
+  sed 's,FAKEDIR,'$BOOK',' $PACKAGE_DIR/$XSL > $JHALFSDIR/${XSL}
+  export XSL=$JHALFSDIR/${XSL}
 
-# Install blfs-tool, if requested.
-if [[ "${BLFS_TOOL}" = "y" ]] ; then
-  # Install the files
-  [[ ! -d ${BUILDDIR}${BLFS_ROOT} ]] && mkdir -p ${BUILDDIR}${BLFS_ROOT}
-  cp -r BLFS/* ${BUILDDIR}${BLFS_ROOT}
-  cp -r menu ${BUILDDIR}${BLFS_ROOT}
-  cp $COMMON_DIR/progress_bar.sh ${BUILDDIR}${BLFS_ROOT}
-  cp README.BLFS ${BUILDDIR}${BLFS_ROOT}
-  # Clean-up
-  rm -rf ${BUILDDIR}${BLFS_ROOT}/libs/.svn
-  rm -rf ${BUILDDIR}${BLFS_ROOT}/menu/.svn
-  rm -rf ${BUILDDIR}${BLFS_ROOT}/menu/lxdialog/.svn
-  # Set some harcoded envars to their proper values
-  sed -i 's,blfs-xml,'$BLFS_XML',' ${BUILDDIR}${BLFS_ROOT}/{update_book.sh,libs/book.xsl}
-  sed -i 's,tracking-dir,'$TRACKING_DIR',' ${BUILDDIR}${BLFS_ROOT}/{update_book.sh,gen-makefile.sh}
-  # Copy the dependencies build scripts
-  cp -r $COMMON_DIR/blfs-tool-deps $JHALFSDIR/
-  rm -rf $JHALFSDIR/blfs-tool-deps/.svn
-fi
+  # Install blfs-tool, if requested.
+  if [[ "${BLFS_TOOL}" = "y" ]] ; then
+    # Install the files
+    [[ ! -d ${BUILDDIR}${BLFS_ROOT} ]] && mkdir -p ${BUILDDIR}${BLFS_ROOT}
+    cp -r BLFS/* ${BUILDDIR}${BLFS_ROOT}
+    cp -r menu ${BUILDDIR}${BLFS_ROOT}
+    cp $COMMON_DIR/progress_bar.sh ${BUILDDIR}${BLFS_ROOT}
+    cp README.BLFS ${BUILDDIR}${BLFS_ROOT}
+    # Clean-up
+    rm -rf ${BUILDDIR}${BLFS_ROOT}/libs/.svn
+    rm -rf ${BUILDDIR}${BLFS_ROOT}/menu/.svn
+    rm -rf ${BUILDDIR}${BLFS_ROOT}/menu/lxdialog/.svn
+    # Set some harcoded envars to their proper values
+    sed -i 's,blfs-xml,'$BLFS_XML',' ${BUILDDIR}${BLFS_ROOT}/{update_book.sh,libs/book.xsl}
+    sed -i 's,tracking-dir,'$TRACKING_DIR',' ${BUILDDIR}${BLFS_ROOT}/{update_book.sh,gen-makefile.sh}
+    # Copy the dependencies build scripts
+    cp -r $COMMON_DIR/blfs-tool-deps $JHALFSDIR/
+    rm -rf $JHALFSDIR/blfs-tool-deps/.svn
+  fi
 
-get_book
-echo "${SD_BORDER}${nl_}"
+  get_book
+  echo "${SD_BORDER}${nl_}"
 
-# Get the BLFS book, if requested.
-if [[ "${BLFS_TOOL}" = "y" ]] ; then
-  echo -n "Downloading the BLFS document, $BLFS_BRANCH_ID version... "
-  if [[ ! -d ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML} ]] ; then
-    mkdir -p ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML}
-    svn co $SVN_2/BLFS/$BLFS_TREE ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML} >>$LOGDIR/$LOG 2>&1
-  else
-    pushd ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML} 1> /dev/null
-      svn up >>$LOGDIR/$LOG 2>&1
-    popd 1> /dev/null
+  # Get the BLFS book, if requested.
+  if [[ "${BLFS_TOOL}" = "y" ]] ; then
+    echo -n "Downloading the BLFS document, $BLFS_BRANCH_ID version... "
+    if [[ ! -d ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML} ]] ; then
+      mkdir -p ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML}
+      svn co $SVN_2/BLFS/$BLFS_TREE ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML} >>$LOGDIR/$LOG 2>&1
+    else
+      pushd ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML} 1> /dev/null
+        svn up >>$LOGDIR/$LOG 2>&1
+      popd 1> /dev/null
+    fi
+    echo -ne "done\n"
+    echo "${SD_BORDER}${nl_}"
   fi
-  echo -ne "done\n"
-  echo "${SD_BORDER}${nl_}"
+
 fi
 
 build_Makefile




More information about the alfs-log mailing list