Changeset 7b6ecc5


Ignore:
Timestamp:
10/18/2006 07:28:47 PM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
Children:
a16f769
Parents:
e7655b2
Message:

Started support to customize de base system build allowing Makefile regeneration.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Config.in

    re7655b2 r7b6ecc5  
    824824#--- End Advanced Features
    825825endmenu
     826
     827config RE_MAKE
     828        bool "Rebuild the Makefile (see help)"
     829        default n
     830        depends on !BOOK_BLFS
     831        help
     832                #-- Rebuild the Makefile
     833                #
     834                #   This option alow to rebuild the Makefile after
     835                #   customizing the base system build scripts.
     836                #
     837                #   See README.CUSTOM for more info about this feature.
     838
  • README.CUSTOM

    re7655b2 r7b6ecc5  
    1010Rather than adding numerous package scripts and switches for each request it
    1111was easier to add a tool for the user(s) to code their own package needs.
     12
     13  There is two areas that can be customized: how the base system is build
     14and what additional configurations and packages requires your hardware to can
     15boot and work with. Each one of this areas is handled in a diferent way.
     16
     17        BASE SYSTEM CUSTOMIZATION
     18
     19  There is two ways to alter how the base system will be built:
     20
     21  - Using a working copy of the book sources and editing the XML files.
     22    This is the way used by book editors to test packages upgrades,
     23    command changes, build order changes. etc.
     24
     25    This method requires you know very well the book sources and what
     26    files need be edited. It will not be discussed here.
     27
     28  - Editing the generated build scripts to make any change you would.
     29    This is the method discussed below.
     30
     31(TO BE WRITTEN)
     32
     33
     34       ADDING POST-SYSTEM BUILD CONFIGURATION FILES AND EXTRA PACKAGES
     35
     36  The installation of BLFS packages is handled via blfs-tool and activated
     37when you select the appropiate menu option. See README and README.BLFS for
     38more info.
     39
     40  The feature descrbed below was added so users could install remaining
     41configuration files, build the packages necessary to access the internet
     42or to support specific hardware, or to install basic utilities that need
     43have availables from the beginning, and was not intended to replace the BLFS
     44install system.
    1245
    1346
     
    6497        make mk_CUSTOM_TOOLS
    6598
    66   :::FINAL COMMENT:::
    67     This feature was added so users could build the packages necessary to access
    68     the internet and was not intended to replace the BLFS install system.
    69 
    7099
    71100#--------- GLIB example -----------
     
    114143MD5="2c63e827d755527950d9d13fe3d87692"
    115144
    116   # MD5SUM is not absolutely necessary but JHALFS whines and complains 
     145  # MD5SUM is not absolutely necessary but JHALFS whines and complains
    117146  # Add the MD5SUM if you can
    118147PATCH1=" http://www.linuxfromscratch.org/patches/blfs/svn/gpm-1.20.1-segfault-1.patch"
     
    154183  # This method is useful for creating user files/profiles/etc
    155184  # at build time.
    156    
     185
    157186
    158187PKG=""
  • TODO

    re7655b2 r7b6ecc5  
    1818
    1919  - To add support for copying to the final system pre-generated
    20     configuration files created by the user, if that can be implemented.
     20    configuration files created by the user.
     21    Work in progress via CUSTOM_TOOLS
    2122
    2223
     
    3536      scripts are manually added to the *-commands/*/ dirs.
    3637
     38    Work in progress via RE_MAKE
     39
  • jhalfs

    re7655b2 r7b6ecc5  
    109109GRSECURITY_HOST=${GRSECURITY_HOST:-n}
    110110CUSTOM_TOOLS=${CUSTOM_TOOLS:-n}
     111RE_MAKE=${RE_MAKE:-n}
    111112
    112113# Book surces envars
     
    317318#
    318319
    319 # If $BUILDDIR has subdirectories like tools/ or bin/, stop the run
    320 # and notify the user about that.
    321 if [ -d $BUILDDIR/tools -o -d $BUILDDIR/bin ] && [ -z $CLEAN ] ; then
    322   eval "$no_empty_builddir"
    323 fi
    324 
    325 # If requested, clean the build directory
    326 clean_builddir
    327 
    328 if [[ ! -d $JHALFSDIR ]]; then
    329   mkdir -p $JHALFSDIR
    330 fi
    331 #
    332 # Create $BUILDDIR/sources even though it could be created by get_sources()
    333 if [[ ! -d $BUILDDIR/sources ]]; then
    334   mkdir -p $BUILDDIR/sources
    335 fi
    336 #
    337 # Create the log directory
    338 if [[ ! -d $LOGDIR ]]; then
    339   mkdir $LOGDIR
    340 fi
    341 >$LOGDIR/$LOG
    342 #
    343 [[ "$TEST" != "0" ]] && [[ ! -d $TESTLOGDIR ]] && install -d -m 1777 $TESTLOGDIR
    344 #
    345 cp $COMMON_DIR/{makefile-functions,progress_bar.sh} $JHALFSDIR/
    346 #
    347 [[ "$OPTIMIZE" != "0" ]] && cp optimize/opt_override $JHALFSDIR/
    348 #
    349 if [[ "$COMPARE" = "y" ]]; then
    350   mkdir -p $JHALFSDIR/extras
    351   cp extras/* $JHALFSDIR/extras
    352 fi
    353 #
    354 if [[ -n "$FILES" ]]; then
    355   # pushd/popd necessary to deal with multiple files
    356   pushd $PACKAGE_DIR 1> /dev/null
    357     cp $FILES $JHALFSDIR/
    358   popd 1> /dev/null
    359 fi
    360 #
    361 if [[ "${PROGNAME}" = "lfs" ]]; then
    362   if [[ "${CUSTOM_TOOLS}" = "y" ]]; then
    363     echo "Copying custom tool scripts to $JHALFSDIR"
    364     mkdir -p $JHALFSDIR/custom-commands/config
    365     mkdir -p $JHALFSDIR/custom-commands/scripts
    366    cp -Rf custom/* $JHALFSDIR/custom-commands
    367   fi
    368 fi
    369 
    370 #
    371 if [[ "$REPORT" = "y" ]]; then
    372   cp $COMMON_DIR/create-sbu_du-report.sh  $JHALFSDIR/
    373   # After being sure that all looks sane, dump the settings to a file
    374   # This file will be used to create the REPORT header
    375   validate_config > $JHALFSDIR/jhalfs.config
    376 fi
    377 #
    378 [[ "$GETPKG" = "y" ]] && cp $COMMON_DIR/urls.xsl  $JHALFSDIR/
    379 #
    380 cp $COMMON_DIR/packages.xsl  $JHALFSDIR/
    381 #
    382 sed 's,FAKEDIR,'$BOOK',' $PACKAGE_DIR/$XSL > $JHALFSDIR/${XSL}
    383 export XSL=$JHALFSDIR/${XSL}
    384 
    385 # Install blfs-tool, if requested.
    386 if [[ "${BLFS_TOOL}" = "y" ]] ; then
    387   # Install the files
    388   [[ ! -d ${BUILDDIR}${BLFS_ROOT} ]] && mkdir -p ${BUILDDIR}${BLFS_ROOT}
    389   cp -r BLFS/* ${BUILDDIR}${BLFS_ROOT}
    390   cp -r menu ${BUILDDIR}${BLFS_ROOT}
    391   cp $COMMON_DIR/progress_bar.sh ${BUILDDIR}${BLFS_ROOT}
    392   cp README.BLFS ${BUILDDIR}${BLFS_ROOT}
    393   # Clean-up
    394   rm -rf ${BUILDDIR}${BLFS_ROOT}/libs/.svn
    395   rm -rf ${BUILDDIR}${BLFS_ROOT}/menu/.svn
    396   rm -rf ${BUILDDIR}${BLFS_ROOT}/menu/lxdialog/.svn
    397   # Set some harcoded envars to their proper values
    398   sed -i 's,blfs-xml,'$BLFS_XML',' ${BUILDDIR}${BLFS_ROOT}/{update_book.sh,libs/book.xsl}
    399   sed -i 's,tracking-dir,'$TRACKING_DIR',' ${BUILDDIR}${BLFS_ROOT}/{update_book.sh,gen-makefile.sh}
    400   # Copy the dependencies build scripts
    401   cp -r $COMMON_DIR/blfs-tool-deps $JHALFSDIR/
    402   rm -rf $JHALFSDIR/blfs-tool-deps/.svn
    403 fi
    404 
    405 get_book
    406 echo "${SD_BORDER}${nl_}"
    407 
    408 # Get the BLFS book, if requested.
    409 if [[ "${BLFS_TOOL}" = "y" ]] ; then
    410   echo -n "Downloading the BLFS document, $BLFS_BRANCH_ID version... "
    411   if [[ ! -d ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML} ]] ; then
    412     mkdir -p ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML}
    413     svn co $SVN_2/BLFS/$BLFS_TREE ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML} >>$LOGDIR/$LOG 2>&1
    414   else
    415     pushd ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML} 1> /dev/null
    416       svn up >>$LOGDIR/$LOG 2>&1
     320if [[ "$RE_MAKE" = "n" ]] ; then
     321
     322  # If $BUILDDIR has subdirectories like tools/ or bin/, stop the run
     323  # and notify the user about that.
     324  if [ -d $BUILDDIR/tools -o -d $BUILDDIR/bin ] && [ -z $CLEAN ] ; then
     325    eval "$no_empty_builddir"
     326  fi
     327
     328  # If requested, clean the build directory
     329  clean_builddir
     330
     331  if [[ ! -d $JHALFSDIR ]]; then
     332    mkdir -p $JHALFSDIR
     333  fi
     334  #
     335  # Create $BUILDDIR/sources even though it could be created by get_sources()
     336  if [[ ! -d $BUILDDIR/sources ]]; then
     337    mkdir -p $BUILDDIR/sources
     338  fi
     339  #
     340  # Create the log directory
     341  if [[ ! -d $LOGDIR ]]; then
     342    mkdir $LOGDIR
     343  fi
     344  >$LOGDIR/$LOG
     345  #
     346  [[ "$TEST" != "0" ]] && [[ ! -d $TESTLOGDIR ]] && install -d -m 1777 $TESTLOGDIR
     347  #
     348  cp $COMMON_DIR/{makefile-functions,progress_bar.sh} $JHALFSDIR/
     349  #
     350  [[ "$OPTIMIZE" != "0" ]] && cp optimize/opt_override $JHALFSDIR/
     351  #
     352  if [[ "$COMPARE" = "y" ]]; then
     353    mkdir -p $JHALFSDIR/extras
     354    cp extras/* $JHALFSDIR/extras
     355  fi
     356  #
     357  if [[ -n "$FILES" ]]; then
     358    # pushd/popd necessary to deal with multiple files
     359    pushd $PACKAGE_DIR 1> /dev/null
     360      cp $FILES $JHALFSDIR/
    417361    popd 1> /dev/null
    418362  fi
    419   echo -ne "done\n"
     363  #
     364  if [[ "${PROGNAME}" = "lfs" ]]; then
     365    if [[ "${CUSTOM_TOOLS}" = "y" ]]; then
     366      echo "Copying custom tool scripts to $JHALFSDIR"
     367      mkdir -p $JHALFSDIR/custom-commands/config
     368      mkdir -p $JHALFSDIR/custom-commands/scripts
     369    cp -Rf custom/* $JHALFSDIR/custom-commands
     370    fi
     371  fi
     372
     373  #
     374  if [[ "$REPORT" = "y" ]]; then
     375    cp $COMMON_DIR/create-sbu_du-report.sh  $JHALFSDIR/
     376    # After being sure that all looks sane, dump the settings to a file
     377    # This file will be used to create the REPORT header
     378    validate_config > $JHALFSDIR/jhalfs.config
     379  fi
     380  #
     381  [[ "$GETPKG" = "y" ]] && cp $COMMON_DIR/urls.xsl  $JHALFSDIR/
     382  #
     383  cp $COMMON_DIR/packages.xsl  $JHALFSDIR/
     384  #
     385  sed 's,FAKEDIR,'$BOOK',' $PACKAGE_DIR/$XSL > $JHALFSDIR/${XSL}
     386  export XSL=$JHALFSDIR/${XSL}
     387
     388  # Install blfs-tool, if requested.
     389  if [[ "${BLFS_TOOL}" = "y" ]] ; then
     390    # Install the files
     391    [[ ! -d ${BUILDDIR}${BLFS_ROOT} ]] && mkdir -p ${BUILDDIR}${BLFS_ROOT}
     392    cp -r BLFS/* ${BUILDDIR}${BLFS_ROOT}
     393    cp -r menu ${BUILDDIR}${BLFS_ROOT}
     394    cp $COMMON_DIR/progress_bar.sh ${BUILDDIR}${BLFS_ROOT}
     395    cp README.BLFS ${BUILDDIR}${BLFS_ROOT}
     396    # Clean-up
     397    rm -rf ${BUILDDIR}${BLFS_ROOT}/libs/.svn
     398    rm -rf ${BUILDDIR}${BLFS_ROOT}/menu/.svn
     399    rm -rf ${BUILDDIR}${BLFS_ROOT}/menu/lxdialog/.svn
     400    # Set some harcoded envars to their proper values
     401    sed -i 's,blfs-xml,'$BLFS_XML',' ${BUILDDIR}${BLFS_ROOT}/{update_book.sh,libs/book.xsl}
     402    sed -i 's,tracking-dir,'$TRACKING_DIR',' ${BUILDDIR}${BLFS_ROOT}/{update_book.sh,gen-makefile.sh}
     403    # Copy the dependencies build scripts
     404    cp -r $COMMON_DIR/blfs-tool-deps $JHALFSDIR/
     405    rm -rf $JHALFSDIR/blfs-tool-deps/.svn
     406  fi
     407
     408  get_book
    420409  echo "${SD_BORDER}${nl_}"
     410
     411  # Get the BLFS book, if requested.
     412  if [[ "${BLFS_TOOL}" = "y" ]] ; then
     413    echo -n "Downloading the BLFS document, $BLFS_BRANCH_ID version... "
     414    if [[ ! -d ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML} ]] ; then
     415      mkdir -p ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML}
     416      svn co $SVN_2/BLFS/$BLFS_TREE ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML} >>$LOGDIR/$LOG 2>&1
     417    else
     418      pushd ${BUILDDIR}${BLFS_ROOT}/${BLFS_XML} 1> /dev/null
     419        svn up >>$LOGDIR/$LOG 2>&1
     420      popd 1> /dev/null
     421    fi
     422    echo -ne "done\n"
     423    echo "${SD_BORDER}${nl_}"
     424  fi
     425
    421426fi
    422427
Note: See TracChangeset for help on using the changeset viewer.