Changeset 2fedf49


Ignore:
Timestamp:
08/14/2006 08:59:05 PM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
experimental
Children:
b928382
Parents:
00f4966
Message:

Merged r2942:2948 from trunk.

Files:
6 edited
1 moved

Legend:

Unmodified
Added
Removed
  • BLFS/TODO

    r00f4966 r2fedf49  
    1212What remains to do:
    1313
    14 1. - To make the top-level blfs script functional. That script should to create
    15        the working directory (selected at command line)
    16      a. Copy all BLFS/* files to it,
    17      b. Fetch the BLFS sources (output directory selected at command line or
    18           based on the book version),
    19      c. Run the packages.sh script.
     14--   To review the XSL code needed to create the build scripts.
     15     A lot of book-versus-scripts and testing is needed.
     16     We need yet to figure out if we can to to handle Perl modules installation
     17     and other pages that have commands to install more that one package
     18     (e.g., Gnat in GCC Java-bin in Java, sane-backends and sane-frontends
     19     in Sane, etc) or not-estandart installations, like Xorg7
    2020
    21 2. - To develop the XSL code needed to create the build scripts.
    22      Almost done. A lot of book-versus-scripts and testing is needed.
    23      We need yet to figure out how to handle Perl modules installation and
    24      other pages that have commands to install more that one package
    25      (e.g., Gnat in GCC Java-bin in Java, sane-backends and sane-frontends
    26      in Sane, etc)
     21--   Test the method used to track already installed packages by previous runs.
     22     See if the packages version can be watched also.
    2723
    28 3. - To develop the code to create the Makefile.
    29      Should be a separate script to be run manually after the user has
    30      review and edited the target build scripts.
    31      Must make the build scripts executables and set the SRC_ARCHIVE and
    32      FTP_SERVER envars.
    33      Work in progress.
     24--   Integrate the menuconfig based package selection, trying to make use of the
     25     installed packages traking system.
    3426
    35 4. - To find a way to track already installed packages by previous runs, to can
    36        skip them when creating the book/scripts/Makefile for a new target.
     27--   Bugs hunting.
    3728
     29--   Improve README.BLFS.
     30
     31--   Develop a script to make cofee.
  • BLFS/envars.conf

    r00f4966 r2fedf49  
    55# $Id$
    66#
    7 # Set default SRC_ARCHIVE and FTP_DIR
     7# Set default envars used in the build scripts
    88#
    99#####
     
    1515export SRC_ARCHIVE=$SRC_ARCHIVE
    1616
    17 # --- Server used if the file isn't found in SRC_ARCHIVE.
     17#--- Server used if the file isn't found in SRC_ARCHIVE.
    1818# As a last resort, the file will dowloaded from upstream, if possible.
    1919#
     
    2121# http://www.linuxfromscratch.org/blfs/download.html
    2222export FTP_SERVER=ftp://anduin.linuxfromscratch.org/BLFS/
     23
     24
     25#--- The sources directory.
     26#    Full path to the top level directory where packages will be stored,
     27#    unpacked, and compiled.
     28export SRC_DIR=$HOME/sources
  • BLFS/gen-makefile.sh

    r00f4966 r2fedf49  
    4141(
    4242cat << EOF
    43         @source ../makefile.conf && ${BUILD_SCRIPTS}/\$@ >logs/\$@ 2>&1
     43        @source ../envars.conf && ${BUILD_SCRIPTS}/\$@ >logs/\$@ 2>&1
    4444EOF
    4545) >> $MKFILE.tmp
  • BLFS/libs/scripts.xsl

    r00f4966 r2fedf49  
    9898            <xsl:text>&#xA;PKG_DIR=</xsl:text>
    9999            <xsl:value-of select="$ftpdir"/>
    100             <xsl:text>&#xA;&#xA;</xsl:text>
     100            <xsl:text>&#xA;SRC_DIR=$SRC_DIR&#xA;&#xA;</xsl:text>
    101101            <!-- Download code and build commands -->
    102102            <xsl:apply-templates select="sect2">
     
    105105            </xsl:apply-templates>
    106106            <!-- Clean-up -->
    107             <xsl:text>cd ~/sources/$PKG_DIR&#xA;</xsl:text>
     107            <xsl:text>cd $SRC_DIR/$PKG_DIR&#xA;</xsl:text>
    108108            <xsl:text>rm -rf $UNPACKDIR unpacked&#xA;&#xA;</xsl:text>
    109109          </xsl:when>
     
    126126    <xsl:choose>
    127127      <xsl:when test="@role = 'package'">
    128         <xsl:text>mkdir -p ~/sources/$PKG_DIR&#xA;</xsl:text>
    129         <xsl:text>cd ~/sources/$PKG_DIR&#xA;</xsl:text>
     128        <xsl:text>mkdir -p $SRC_DIR/$PKG_DIR&#xA;</xsl:text>
     129        <xsl:text>cd $SRC_DIR/$PKG_DIR&#xA;</xsl:text>
    130130        <xsl:apply-templates select="itemizedlist/listitem/para">
    131131          <xsl:with-param name="package" select="$package"/>
  • README.BLFS

    r00f4966 r2fedf49  
    1515  the book.
    1616
    17   NOTE:: The code is yet under development a may contains several bugs
     17  NOTE:: The code is still under development and may contains several bugs
    1818
    1919
     
    3838    packages           auto-generated file with packages info
    3939    alternatives.conf  configuration files for alternative packages
    40     makefile.conf      envars needed when running the generated Makefile
     40    envars.conf        envars needed when running the build scripts
    4141    update_book.sh     update the XML book sources and regenerate packages file
    4242                       and GNOME and KDE dependencies tree
     
    5555       Next step is to create a book and build scripts in dependencies build order
    5656    for a target package. A target package can be any of the ones listed in the
    57     packages file. That is done using the blfs-parser.sh script, but we are triying
     57    packages file. That is done using the blfs-parser.sh script, but we are trying
    5858    to make a menuconfig based system.
    5959
     
    6161
    6262    package name         as listed in packages file
    63     dependencies level   1 for required, 2 for required an recommendedand,
     63    dependencies level   1 for required,
     64                         2 for required an recommended
    6465                         3 for required, recommended, and optional
    65     sudo usage           y if sudo will be used (you will build as normal user)
    66                          n if sudo isn't needed (you will build as root)
     66    sudo usage           y if sudo will be used (you want build as a normal user)
     67                         n if sudo isn't needed (you want build as root)
    6768
    6869       For example:
     
    8384
    8485  2.4  CREATING THE MAKEFILE
    85        When the build scripts will be ready to be run, the Makefile can be
    86   created. Be sure that you are into the "package" directory and run
     86       When the build scripts are ready to be run, the Makefile can be
     87    created. Be sure that you cd into the "package" directory and run
    8788
    88       ../gen_makefile.sh
     89       ../gen_makefile.sh
    8990
    90   Review the Makefile and if all look sane, start the build.
     91    Review the Makefile and if all look sane, start the build.
    9192
    9293
  • blfs

    r00f4966 r2fedf49  
    33
    44set -e
     5
     6# From common/common-functions
     7# VT100 colors
     8declare -r  BLACK=$'\e[1;30m'
     9declare -r  DK_GRAY=$'\e[0;30m'
     10
     11declare -r  RED=$'\e[31m'
     12declare -r  GREEN=$'\e[32m'
     13declare -r  YELLOW=$'\e[33m'
     14declare -r  BLUE=$'\e[34m'
     15declare -r  MAGENTA=$'\e[35m'
     16declare -r  CYAN=$'\e[36m'
     17declare -r  WHITE=$'\e[37m'
     18
     19declare -r  OFF=$'\e[0m'
     20declare -r  BOLD=$'\e[1m'
     21declare -r  REVERSE=$'\e[7m'
     22declare -r  HIDDEN=$'\e[8m'
     23
     24declare -r  tab_=$'\t'
     25declare -r  nl_=$'\n'
     26
     27declare -r   DD_BORDER="${BOLD}==============================================================================${OFF}"
     28declare -r   SD_BORDER="${BOLD}------------------------------------------------------------------------------${OFF}"
     29declare -r STAR_BORDER="${BOLD}******************************************************************************${OFF}"
     30
     31# bold yellow > <  pair
     32declare -r R_arrow=$'\e[1;33m>\e[0m'
     33declare -r L_arrow=$'\e[1;33m<\e[0m'
    534
    635
     
    3564#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    3665
    37 VERBOSITY=1
     66# envars not sourced from configuration file
     67  PROGNAME=$(basename $0)
     68COMMON_DIR="common"
     69 VERBOSITY=1
    3870
    3971[[ $VERBOSITY > 0 ]] && echo -n "Loading config params from <configuration>..."
     
    4274[[ $VERBOSITY > 0 ]] && echo "OK"
    4375
     76[[ $VERBOSITY > 0 ]] && echo -n "Loading function <func_validate_configs.sh>..."
     77source $COMMON_DIR/func_validate_configs.sh
     78[[ $? > 0 ]] && echo " function module did not load.." && exit 2
     79[[ $VERBOSITY > 0 ]] && echo "OK"
     80[[ $VERBOSITY > 0 ]] && echo "${SD_BORDER}${nl_}"
     81
     82# Be sure that we have a configuration file
    4483[[ -z $BOOK_BLFS ]] && echo -e "\nNo BLFS configuration found. Please configure it." && exit 1
    4584
    46 TREE=trunk/BOOK
     85# Set default book version
     86BRANCH_ID=${BRANCH_ID:=development}
    4787
    48 if [[ ! -z ${BRANCH_ID} ]]; then
    49   case $BRANCH_ID in
    50     dev* | SVN | trunk )  TREE=trunk/BOOK ;;
    51               branch-* )  TREE=branches/${BRANCH_ID#branch-}/BOOK ;;
    52                      * )  TREE=tags/${BRANCH_ID}/BOOK ;;
    53   esac
     88# Set the SVN tree
     89case $BRANCH_ID in
     90  dev* | SVN | trunk )  TREE=trunk/BOOK ;;
     91              *EDIT* )  echo " You forgot to set the branch or stable book version."
     92                        echo " Please rerun make and fix the configuration."
     93                        exit 2
     94                        ;;
     95            branch-* )  TREE=branches/${BRANCH_ID#branch-}/BOOK ;;
     96                   * )  TREE=tags/${BRANCH_ID}/BOOK ;;
     97esac
     98
     99# For consistency with other books
     100validate_config
     101echo "${SD_BORDER}${nl_}"
     102echo -n "Are you happy with these settings? yes/no (no): "
     103read ANSWER
     104if [ x$ANSWER != "xyes" ] ; then
     105  echo "${nl_}Fix the configuration options and rerun the script.${nl_}"
     106  exit 1
    54107fi
     108echo "${nl_}${SD_BORDER}${nl_}"
    55109
     110# Install the files
    56111[[ ! -d $BLFS_ROOT ]] && mkdir -p $BLFS_ROOT
    57112
    58113cp -r BLFS/* $BLFS_ROOT
    59 cp common/progress_bar.sh $BLFS_ROOT
     114cp $COMMON_DIR/progress_bar.sh $BLFS_ROOT
    60115# cp -r menu $BLFS_ROOT
    61116
     117# Start the work
    62118cd $BLFS_ROOT
    63119
     120# Clean-up
     121rm -rf libs/.svn
     122
     123# Fix BLFS_XML harcoded values
    64124sed -i 's,blfs-xml,'$BLFS_XML',' update_book.sh
    65125sed -i 's,blfs-xml,'$BLFS_XML',' libs/book.xsl
    66126
    67 ./update_book.sh $BLFS_XML get $TREE
     127# Fetch book sources and create packages and GNOME/KDE dependencies files
     128if [[ -d $BLFS_XML ]] ; then
     129  ./update_book.sh
     130else
     131  ./update_book.sh $BLFS_XML get $TREE
     132fi
     133
     134# Generate Config.in and run the menuconfig interfaz
     135# ./gen_config.sh
    68136# make
    69137
  • common/func_validate_configs.sh

    r00f4966 r2fedf49  
    9393  local -r clfs2_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE         ARCH  TARGET                 OPTIMIZE REPORT                                      STRIP FSTAB             CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG        LUSER LGROUP"
    9494  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"
     95  local -r  blfs_PARAM_LIST="BRANCH_ID BLFS_ROOT BLFS_XML"
    9596
    9697  local -r ERROR_MSG_pt1='The variable \"${L_arrow}${config_param}${R_arrow}\" value ${L_arrow}${BOLD}${!config_param}${R_arrow} is invalid,'
     
    265266               KEYMAP=${save_param}
    266267               ;;
     268
     269      # BLFS params. No validation is required/allowed, IMHO
     270      BRANCH_ID | BLFS_ROOT | BLFS_XML)  echo "`eval echo $PARAM_VALS`" ;;
     271
    267272    esac
    268273  done
Note: See TracChangeset for help on using the changeset viewer.