Changeset f4ed135


Ignore:
Timestamp:
08/24/2006 08:38:22 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:
a3b0e38
Parents:
7bf2fdd
Message:

Merged r2954:3058 from experimental.

Files:
3 added
2 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • BLFS/TODO

    r7bf2fdd rf4ed135  
    66#####
    77
    8 For now the code is able to do the first step for the new approach: to create
    9 LFS-like books from BLFS sources, allowing to create linear build scrips and
    10 Makefiles similars to the current ones for {C,H}LFS.
    118
    12 What remains to do:
     9--   Review generated scripts for bugs trying to figure out if are due fails
     10     in the BLFS book XML tagging (that will implied that the book need be
     11     fixed) or are required variations due book layout. If the latter, try
     12     to fix it via XSL, documenting in README.BLFS that issues that can't be
     13     fixed.
    1314
    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
    20 
    21 --   Test the method used to track already installed packages by previous runs.
    22      See if the packages version can be watched also.
    23 
    24 --   Integrate the menuconfig based package selection, trying to make use of the
    25      installed packages traking system.
     15     This is an on-going and never-end task due that, ideally, each commit to
     16     the BLFS book should be revised and validated, but our time is limited.
    2617
    2718--   Bugs hunting.
  • BLFS/gen-makefile.sh

    r7bf2fdd rf4ed135  
    55set -e
    66
    7 
    8 
    97# TEMPORARY VARIABLES.. development use only
    108declare MKFILE=Makefile
    119declare PREV_PACKAGE=""
    1210declare BUILD_SCRIPTS=scripts
    13 declare TRACKING_DIR=/var/lib/jhalfs/BLFS
     11declare TRACKING_DIR=tracking-dir
    1412
    1513HEADER="# This file is automatically generated by jhalfs
     
    5149  local pkg_name=$1
    5250  local pkg_ver=$2
     51  local alsa_ver=$(grep "^alsa[[:space:]]" ../packages | cut -f3)
     52  local kde_core_ver=$(grep "^kde-core[[:space:]]" ../packages | cut -f3)
     53  local xorg7_ver=$(grep "^xorg7[[:space:]]" ../packages | cut -f3)
     54
     55  if [[ -n "$pkg_ver" ]] ; then
     56(
     57cat << EOF
     58        @touch \$(TRACKING_DIR)/${pkg_name#*-?-}-${pkg_ver}
     59EOF
     60) >> $MKFILE.tmp
     61  fi
     62
     63  case $pkg_name in
     64    *-alsa-lib ) #this the unique mandatory package for ALSA support.
     65(
     66cat << EOF
     67        @touch \$(TRACKING_DIR)/alsa-${alsa_ver}
     68EOF
     69) >> $MKFILE.tmp
     70      ;;
     71    *-kdebase )
     72(
     73cat << EOF
     74        @touch \$(TRACKING_DIR)/kde-core-${kde_core_ver}
     75EOF
     76) >> $MKFILE.tmp
     77      ;;
     78    *-xorg7-driver ) # xtrerm2 and rman are optional
     79(
     80cat << EOF
     81        @touch \$(TRACKING_DIR)/xorg7-${xorg7_ver}
     82EOF
     83) >> $MKFILE.tmp
     84      ;;
     85  esac
     86
    5387(
    5488cat << EOF
    5589        @touch  \$@ && \\
    56         touch \$(TRACKING_DIR)/${pkg_name#*-?-}-${pkg_ver} && \\
    5790        sleep .25 && \\
    5891        echo -e "\n\n "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
     
    68101  local script_name=$1
    69102  local pkg_ver=$2
    70  
     103
    71104  echo -n "${tab_}${tab_} entry for <$script_name>"
    72105
     
    91124
    92125#----------------------------#
     126__write_meta_pkg_touch() {   #
     127#----------------------------#
     128  local meta_pkg=$1
     129  local pkg_ver=$(grep "^${meta_pkg}[[:space:]]" ../packages | cut -f3)
     130  local gnome_core_ver=$(grep "^gnome-core[[:space:]]" ../packages | cut -f3)
     131  local kde_full_ver=$(grep "^kde-full[[:space:]]" ../packages | cut -f3)
     132
     133(
     134cat << EOF
     135
     136999-z-$meta_pkg:  $PREV_PACKAGE
     137        @touch \$(TRACKING_DIR)/${meta_pkg}-${pkg_ver}
     138EOF
     139) >> $MKFILE.tmp
     140
     141  case $meta_pkg in
     142    gnome-full )
     143(
     144cat << EOF
     145        @touch \$(TRACKING_DIR)/gnome-core-${gnome_core_ver}
     146EOF
     147) >> $MKFILE.tmp
     148      ;;
     149    kde-koffice )
     150(
     151cat << EOF
     152        @touch \$(TRACKING_DIR)/kde-full-${kde_full_ver}
     153EOF
     154) >> $MKFILE.tmp
     155      ;;
     156  esac
     157
     158(
     159cat << EOF
     160        @touch  \$@
     161EOF
     162) >> $MKFILE.tmp
     163
     164}
     165
     166#----------------------------#
    93167generate_Makefile () {       #
    94168#----------------------------#
     
    104178  for package_script in scripts/* ; do
    105179    this_script=`basename $package_script`
    106     script_ver=$(xmllint --noent ../blfs-xml/book/bookinfo.xml 2>/dev/null | \
    107                 grep -i " ${this_script#*-?-}-version " | \
    108                 cut -d "\"" -f2 )
    109     if [ ! -e $TRACKING_DIR/${this_script#*-?-}-$script_ver ]; then
    110       pkg_list="$pkg_list ${this_script}"
    111      __write_entry "${this_script}" "${script_ver}"
    112       PREV_PACKAGE=${this_script}
    113     fi
     180    pkg_ver=$(grep "^${this_script#*-?-}[[:space:]]" ../packages | cut -f3)
     181    pkg_list="$pkg_list ${this_script}"
     182    __write_entry "${this_script}" "${pkg_ver}"
     183    PREV_PACKAGE=${this_script}
    114184  done
     185
     186  PACKAGE=$(basename $PWD)
     187
     188   # alsa, kde-core and xorg7 are also available dependencies, thus handled
     189   # in another way.
     190  case $PACKAGE in
     191    gnome-core | \
     192    gnome-full | \
     193    kde-full | \
     194    kde-koffice )  pkg_list="$pkg_list 999-z-${PACKAGE}"
     195                  __write_meta_pkg_touch "${PACKAGE}"
     196                  ;;
     197  esac
    115198
    116199
     
    121204$HEADER
    122205
    123 PACKAGE= "`basename $PWD`"
     206PACKAGE= $PACKAGE
    124207TRACKING_DIR= $TRACKING_DIR
    125208
  • BLFS/libs/constants.inc

    r7bf2fdd rf4ed135  
    33# common constants
    44#
    5 # $Id:
     5# $Id$
    66#####
    77
  • BLFS/libs/func_dependencies

    r7bf2fdd rf4ed135  
    4747  #---------------------
    4848  # The BLFS sources directory.
    49   # Note: for book.xsl this value must be set via a sed in ./blfs.
    50   # For consistency, we should to do the same here.
    5149  BLFS_XML=`echo $PKGXML | sed -e 's,/.*,,'`
    5250
     
    7472
    7573    # Meta-packages at target level
    76     # KDE and Gnome-{core,full} could be made via packages.sh, but not sure yet how.
    7774    alsa )
    78       echo -e "alsa-oss\nalsa-firmware\nalsa-tools\nalsa-utils\n \
    79                alsa-plugins\nalsa-lib" > dependencies/alsa.dep
     75      cp ../libs/alsa.dep dependencies/
    8076      ;;
    8177    gnome-core )
     
    9288      ;;
    9389    kde-koffice )
    94       cp ../libs/kde-{core,full}.dep dependencies/
    95       echo -e "koffice\nkde-full\nkde-core" > dependencies/kde-koffice.dep
    96       ;;
    97     xorg7 ) # At atarget level, add also x-config and x-setup
    98       echo -e "x-config\nx-setup\nrman\nxterm2\nxorg7-driver\nxorg7-server\nluit\n \
    99                xorg7-font\nxorg7-data\nxorg7-app\nxbitmaps\nmesalib\nlibdrm\n \
    100                xorg7-lib\nxorg7-util\nxorg7-proto" > dependencies/xorg7.dep
     90      cp ../libs/kde-{core,full,koffice}.dep dependencies/
     91      ;;
     92    xorg7 )
     93      cp ../libs/xorg7.dep dependencies/
    10194      ;;
    10295    * ) # Default
     
    115108  case $TARGET in
    116109    # If there is no usefull XML page, skip it.
    117     alsa | gnome-core | gnome-full | kde-core | kde-full | kde-koffice ) ;;
     110    alsa | gnome-core | gnome-full | kde-core | kde-full | kde-koffice | xorg7) ;;
    118111    * )
    119112      echo -e "    $ENTRY_START$PKGXML$ENTRY_END" >> $TARGET-index.xml.tmp
     
    161154  local saveIFS=$IFS
    162155  local DEP_LV=$DEP_LEVEL
    163   local line line2 DEP
     156  local line line2 DEP pkg_ver inst_ver
    164157
    165158  #------------------
     
    185178  > xincludes/$PKG.xinc.tmp
    186179  for DEP in `cat dependencies/$PKG.dep`; do
    187     # Special packages (a lot of hacks)
     180
     181    # Special packages that need be remaped
    188182    case $DEP in
    189183
     
    198192      kde )                      DEP=kde-core ;;
    199193
    200        # Dummy gnome-core pages
    201       GNOME-desktop-file-utils ) DEP=desktop-file-utils ;;
    202       GNOME-shared-mime-info )   DEP=shared-mime-info ;;
    203 
    204194        # Set values for alternative packages
    205         # X is a meta-package, thus handled in another way.
    206195      LPRng | cups )             DEP=$PRINT_SERVER ;;
    207196      mitkrb | heimdal )         DEP=$KBR5 ;;
    208197      gs | espgs )               DEP=$GHOSTSCRIPT ;;
    209198      server-mail )              DEP=$MAIL_SERVER ;;
     199      x-window-system )
     200        case $X11 in
     201          xorg7 ) DEP=xorg7 ;;
     202              * )
     203                  pkg_ver=$(grep "^${X11}[[:space:]]" ../packages | cut -f3)
     204                  inst_ver=$(grep "^${X11}[[:space:]]" ../packages | cut -f4)
     205                  [ -n "${pkg_ver}" ] && [ "x${pkg_ver}" = "x${inst_ver}" ] && continue
     206                  ;;
     207        esac
     208        ;;
    210209    esac
     210
     211    # If DEP has been previouly installed, skip it
     212    pkg_ver=$(grep "^${DEP}[[:space:]]" ../packages | cut -f3)
     213    inst_ver=$(grep "^${DEP}[[:space:]]" ../packages | cut -f4)
     214    [ -n "${pkg_ver}" ] && [ "x${pkg_ver}" = "x${inst_ver}" ] && continue
    211215
    212216    #------------------
     
    272276        # Skip the creation when all dependencies are circular.
    273277        alsa-lib | cracklib | libexif | unixodbc ) ;;
    274         # Meta-packages at dependency level (ugly *.dep files, but work for now)
    275         alsa ) # When dependency "alsa", use all alsa-* packages
    276           echo -e "alsa-oss\nalsa-firmware\nalsa-tools\nalsa-utils\n \
    277                    alsa-plugins\nalsa-lib" > dependencies/alsa.dep
     278        # Meta-packages at dependency level
     279        alsa )
     280          cp ../libs/alsa.dep dependencies/
    278281          ;;
    279282        kde-core )
    280283          cp ../libs/kde-core.dep dependencies/
    281284          ;;
    282         x-window-system ) # X11 alternatives
     285        x-window-system ) # When X11 is not Xorg7
    283286          echo -e "x-config\nx-setup\n$X11" > dependencies/x-window-system.dep
    284287          ;;
    285288        xorg7 )
    286           echo -e "rman\nxterm2\nxorg7-driver\nxorg7-server\nluit\nxorg7-font\n \
    287                    xorg7-data\nxorg7-app\nxbitmaps\nmesalib\nlibdrm\n \
    288                    xorg7-lib\nxorg7-util\nxorg7-proto" > dependencies/xorg7.dep
     289          cp ../libs/xorg7.dep dependencies/
    289290          ;;
    290291        * ) xsltproc --stringparam dependencies $DEP_LV \
     
    338339  if [[ "$PKG" = "xorg7" ]] ; then
    339340    # Add their XInclude
    340     PKG_XML=`grep "^$PKG[[:space:]]" ../packages | cut -f2`
     341    PKG_XML=${BLFS_XML}/x/installing/xorg7.xml
    341342    echo -e "    $ENTRY_START$PKG_XML$ENTRY_END" >> xincludes/$PKG.xinc.tmp
    342343  fi
  • BLFS/libs/func_packages

    r7bf2fdd rf4ed135  
    66
    77#-----------------------#
     8get_pkg_ver() {         # Find package version for a given package ID
     9#-----------------------#
     10  local pkg_id=$1
     11
     12  case ${pkg_id} in
     13                  # ALSA packages version
     14            alsa* ) pkg_id=alsa ;;
     15
     16                  # KDE packages version
     17          kdevelop ) : ;;
     18        kde*config ) : ;;
     19              kde* ) pkg_id=kde ;;
     20
     21                  # Xorg7 packages version
     22      xorg7-server ) pkg_id=xorg-server ;;
     23            xterm2 ) pkg_id=xterm ;;
     24            xorg7* ) pkg_id=xorg7 ;;
     25
     26                   # Others (ID value don't match entity name)
     27    wireless_tools ) pkg_id=wireless-tools ;;
     28        bind-utils ) pkg_id=bind ;;
     29         html-tidy ) pkg_id=tidy ;;
     30               jdk ) pkg_id=jdk-src ;;
     31          reiserfs ) pkg_id=reiser ;;
     32               xfs ) pkg_id=xfsprogs ;;
     33  esac
     34
     35  xmllint --noent ./${BLFS_XML}/book/bookinfo.xml 2>/dev/null | \
     36  grep -i " ${pkg_id}-version " | cut -d "\"" -f2
     37
     38}
     39
     40#-----------------------#
     41get_installed_ver() {   # Find installed package version for a given package ID
     42#-----------------------#
     43  local pkg_id=$1
     44
     45  find $TRACKING_DIR -name "${pkg_id}-[[:digit:]]*" | sed "s/.*${pkg_id}-//"
     46
     47}
     48
     49#-----------------------#
    850generate_packages()  {  # Master packages file
    951#-----------------------#
    10   local pkg_id file
     52  local pkg_id file pkg_ver
     53  local ALSA_VER GNOME_VER GNOME_MINOR_VER KDE_VER KDE_KOFFICE_VER XORG7_VER
    1154
    1255  > packages.tmp
     
    1457  # Extract Id and path for sect1 files
    1558  for file in `find $BLFS_XML -name "*.xml"` ; do
    16     pkg_id=`grep "sect1 id" $file | sed -e 's/<sect1 id="//;s/".*//'`
    17     [[ ! -z "$pkg_id" ]] && echo -e "$pkg_id\t$file" >> packages.tmp
     59    pkg_id=$(grep "sect1 id" $file | sed -e 's/<sect1 id="//;s/".*//')
     60    pkg_ver=$(get_pkg_ver $pkg_id)
     61    installed_ver=$(get_installed_ver $pkg_id)
     62    [[ ! -z "$pkg_id" ]] && echo -e "$pkg_id\t$file\t$pkg_ver\t$installed_ver" >> packages.tmp
    1863  done
    1964
    2065  # IDs clean-up (unuseful pages or commented-out packages, could be more)
    21   sed -i '/template/d;/ntroduction/d;/preface/d' packages.tmp
    22   sed -i '/courier.xml/d' packages.tmp
    23   sed -i '/nautilus-media.xml/d;/gal.xml/d;/gpdf.xml/d;/gv.xml/d' packages.tmp
     66  sed -i '/template/d;/ntroduction/d;/preface/d;/alsa.xml/d' packages.tmp
     67  sed -i '/obsolete/d;/postlfs-/d;/-client.xml/d;/xorg7.xml/d' packages.tmp
     68  sed -i '/courier.xml/d;/-other\t/d;/others-/d;/other-/d' packages.tmp
     69  sed -i '/fw-firewall\t/d;/gcc2\t/d;/cvsserver\t/d;/svnserver\t/d' packages.tmp
     70  sed -i '/fam\t/d;/libungif\t/d;/ncpfs\t/d;/slrn\t/d;/konq\t/d' packages.tmp
     71  sed -i '/gst-plugins\t/d;/openquicktime\t/d;/compressdoc\t/d' packages.tmp
     72
     73  # Meta-packages version
     74  ALSA_VER=$(get_pkg_ver alsa)
     75  GNOME_VER=$(get_pkg_ver gnome)
     76  GNOME_MINOR_VER=$(get_pkg_ver gnome-minor)
     77  KDE_VER=$(get_pkg_ver kde)
     78  KDE_INST_VER=$(get_installed_ver kde)
     79  KDE_KOFFICE_VER=$(get_pkg_ver koffice)
     80  XORG7_VER=$(get_pkg_ver xorg7)
     81
     82  # Meta-packages installed version
     83  ALSA_INST_VER=$(get_installed_ver alsa)
     84  GNOME_CORE_INST_VER=$(get_installed_ver gnome-core)
     85  GNOME_FULL_INST_VER=$(get_installed_ver gnome-full)
     86  KDE_CORE_INST_VER=$(get_installed_ver kde-core)
     87  KDE_FULL_INST_VER=$(get_installed_ver kde-full)
     88  KDE_KOFFICE_INST_VER=$(get_installed_ver kde-koffice)
     89  XORG7_INST_VER=$(get_installed_ver xorg7)
    2490
    2591  # Add header with meta-packages pseudo Id
    2692{
    2793  cat << EOF
    28 
    29 === GNOME META-PACKAGES ===
    30 # GNOME base packages
    31 gnome-core      $BLFS_XML
    32 # All GNOME packages
    33 gnome-full      $BLFS_XML
    34 
    35 === KDE META-PACKAGES ===
    36 # KDE base packages
    37 kde-core        $BLFS_XML
    38 # All KDE packages
    39 kde-full        $BLFS_XML
    40 # All KDE packages plus Koffice
    41 kde-koffice     $BLFS_XML
    42 
    43 === INDIVIDUAL PACKAGES ===
    44 
     94alsa    $BLFS_XML       $ALSA_VER       $ALSA_INST_VER
     95gnome-core      $BLFS_XML       $GNOME_VER$GNOME_MINOR_VER      $GNOME_CORE_INST_VER
     96gnome-full      $BLFS_XML       $GNOME_VER$GNOME_MINOR_VER      $GNOME_FULL_INST_VER
     97kde-core        $BLFS_XML       $KDE_VER        $KDE_CORE_INST_VER
     98kde-full        $BLFS_XML       $KDE_VER        $KDE_FULL_INST_VER
     99kde-koffice     $BLFS_XML       $KDE_KOFFICE_VER        $KDE_KOFFICE_INST_VER
     100xorg7   $BLFS_XML       $XORG7_VER      $XORG7_INST_VER
    45101EOF
    46 } > packages
     102} >> packages.tmp
    47103
    48104  # Dump packages list
    49   sort packages.tmp >> packages
     105  sort packages.tmp -b --key=2 --field-separator=/ --output=packages
    50106
    51107  # Clean up
     
    68124  done
    69125
     126  # Replace dummy packages with the proper ones
     127  sed -i 's/GNOME-//g' gnome-core.dep.tmp
     128
    70129  tac gnome-core.dep.tmp > libs/gnome-core.dep
    71130  rm gnome-core.dep.tmp
     
    128187  rm kde-full.dep.tmp
    129188}
     189
     190#--------------------------#
     191generate_kde_koffice()  {  # KDE full + Koffice
     192#--------------------------#
     193  echo -e "koffice\nkde-full\nkde-core" > libs/kde-koffice.dep
     194}
     195
     196#--------------------------#
     197generate_alsa()  {         # ALSA packages
     198#--------------------------#
     199  echo -e "alsa-oss\nalsa-firmware\nalsa-tools\nalsa-utils\n\
     200alsa-plugins\nalsa-lib" > libs/alsa.dep
     201}
     202
     203#--------------------------#
     204generate_xorg7()  {        # Xorg7 packages
     205#--------------------------#
     206  echo -e "x-config\nx-setup\nrman\nxterm2\nxorg7-driver\nxorg7-server\nluit\n\
     207xorg7-font\nxorg7-data\nxorg7-app\nxbitmaps\nmesalib\nlibdrm\n\
     208xorg7-lib\nxorg7-util\nxorg7-proto" > libs/xorg7.dep
     209}
  • BLFS/libs/func_parser

    r7bf2fdd rf4ed135  
    144144           -o ./scripts/ ../libs/scripts.xsl \
    145145           $TARGET-index.xml >> xsltproc.log 2>&1
    146   echo -e "done\n"
    147146    # Make the scripts executable.
    148147  chmod -R +x scripts
     148  cd ..
     149  echo -e "done\n"
    149150
    150151}
  • BLFS/libs/scripts.xsl

    r7bf2fdd rf4ed135  
    2727
    2828        <!-- The file names -->
    29       <xsl:variable name="pi-file" select="processing-instruction('dbhtml')"/>
    30       <xsl:variable name="pi-file-value" select="substring-after($pi-file,'filename=')"/>
    31       <xsl:variable name="filename" select="substring-before(substring($pi-file-value,2),'.html')"/>
     29      <xsl:variable name="filename" select="@id"/>
    3230
    3331        <!-- Package name (use "Download FTP" by default. If empty, use "Download HTTP" -->
  • BLFS/update_book.sh

    r7bf2fdd rf4ed135  
    77declare -r SVN="svn://svn.linuxfromscratch.org"
    88
    9 BLFS_XML=$1  # Book directory
    10 DOC_MODE=$2  # Action to take, update or get
     9DOC_MODE=$1  # Action to take, update, get or none
     10BLFS_XML=$2  # Book directory
    1111TREE=$3      # SVN tree for the BLFS book version
    1212
     
    1414[[ -z $DOC_MODE ]] && DOC_MODE=update
    1515[[ -z $TREE ]] && TREE=trunk/BOOK
     16
     17TRACKING_DIR=tracking-dir
    1618
    1719#---------------------
     
    6971}
    7072
    71 BOOK_Source
     73[ "${DOC_MODE}" != "none" ] && BOOK_Source
    7274
    73 echo -en "\n\tGenerating packages file ..."
    74 generate_packages
    75 echo "done."
     75if [ "${DOC_MODE}" = "none" ] ; then
     76  echo -en "\n\tGenerating packages database file ..."
     77  generate_packages
     78  echo "done."
    7679
    77 echo -en "\tGenerating gnome-core dependencies list ..."
    78 generate_gnome_core
    79 echo "done."
     80  echo -en "\tGenerating alsa dependencies list ..."
     81  generate_alsa
     82  echo "done."
    8083
    81 echo -en "\tGenerating gnome-full dependencies list ..."
    82 generate_gnome_full
    83 echo "done."
     84  echo -en "\tGenerating gnome-core dependencies list ..."
     85  generate_gnome_core
     86  echo "done."
    8487
    85 echo -en "\tGenerating kde-core dependencies list ..."
    86 generate_kde_core
    87 echo "done."
     88  echo -en "\tGenerating gnome-full dependencies list ..."
     89  generate_gnome_full
     90  echo "done."
    8891
    89 echo -en "\tGenerating kde-full dependencies list ..."
    90 generate_kde_full
    91 echo -e "done.\n"
     92  echo -en "\tGenerating kde-core dependencies list ..."
     93  generate_kde_core
     94  echo "done."
    9295
     96  echo -en "\tGenerating kde-full dependencies list ..."
     97  generate_kde_full
     98  echo -e "done."
     99
     100  echo -en "\tGenerating kde-koffice dependencies list ..."
     101  generate_kde_koffice
     102  echo -e "done."
     103
     104  echo -en "\tGenerating xorg7 dependencies list ..."
     105  generate_xorg7
     106  echo "done."
     107fi
     108
  • Config.in

    r7bf2fdd rf4ed135  
    295295                        #-- The directory name where BLFS book sources
    296296                        #   will be checkout.
     297
     298        config  TRACKING_DIR
     299                string "Installed packages database directory"
     300                default "/var/lib/jhalfs/BLFS"
     301                depends on BOOK_BLFS
     302                help
     303                        #-- Full path to the directory where the installed
     304                        #   packages database will be created.
     305                        #
     306                        #   Note that the user that will build the packages must
     307                        #   have read and write privileges on that directory.
    297308        #--- End BLFS specific params
    298309
  • README

    r7bf2fdd rf4ed135  
    2222  uClibc rather than glibc.
    2323
    24 2. INSTALLATION::
     242. PREREQUISITES::
     25
     26     To use this tool you MUST:
     27
     28     - have experience building {c,h,b}LFS packages
     29     - know how to edit and write shell scripts
     30     - know how a Makefile works
     31     - be able to trace build failures and to find what is causing it
     32       (user error, package bug, {c,h,b}LFS command bug, or jhalfs code bug)
     33
     34     If you don't have the above skill, please don't use this tool.
     35
     36
     373. INSTALLATION::
    2538     No installation is required. System-wide installation is not allowed
    2639  for now.
    2740
    28 3. CONFIGURATION FILES::
     414. CONFIGURATION FILES::
    2942     Each book in the LFS series has its own set of configurable parameters
    3043  as well as the common parameters file.
     
    4962     This will create a new file named configuration but will not launch jhalfs.
    5063
    51 4. RUNNING::
     645. RUNNING::
    5265     The script master.sh cannot be invoked directly but only via the
    5366  supplied symlinks. After editing the config file for the project you wish
     
    115128
    116129
    117 5. LAYOUT::
     1306. LAYOUT::
    118131
    119132        /CLFS/config
     
    157170
    158171
    159 6. FAQ::
     1727. FAQ::
    160173    Q. "This 'help' file is very sparse"
    161174    A. Yes, it is. This tool, jhalfs, is for those who understand the LFS books
  • README.BLFS

    r7bf2fdd rf4ed135  
    1818
    1919
    20 2. USAGE::
     202. PREREQUISITES::
     21
     22     To use this tool you MUST to:
     23
     24     - have experience building BLFS packages
     25     - know how to edit and write shell scripts
     26     - know how a Makefile works
     27     - be able to trace build failures and to find what is causing it
     28       (user error, package bug, BLFS command bug, or jhalfs code bug)
     29
     30     If you don't have the above skill, please don't use this tool.
     31
     32
     333. USAGE::
    2134
    2235     Due the complexity of the BLFS book, the scripts/Makefile generation is
    2336  done in several steps:
    2437
    25   2.1  INSTALLATION::
    26        Run "make" to launch the menuconfig interface. Select the BLFS book
    27     and it version. Then set the installation directory (default
     38  3.1  INSTALLATION::
     39
     40       Run "make" to launch the jhalfs menuconfig interface. Select the BLFS
     41    book and it version. Then set the installation directory (default
    2842    $HOME/blfs_root) and the BLFS sources directory (default blfs-xml).
    2943
     
    3347       Installed files:
    3448
    35     lib/*              functions, xsl, and auto-generates dependencies tree files
     49    blfs-xml/*         SVN tree of the selected BLFS book version
     50    lib/*              functions libraries, xsl stylesheets, and auto-generated
     51                       meta-packages dependencies tree files
     52    menu/*             lxdialog and menuconfig source code
    3653    README.BLFS        this file
    3754    TODO               developers notes
    38     packages           auto-generated file with packages info
    39     alternatives.conf  configuration files for alternative packages
    40     envars.conf        envars needed when running the build scripts
    41     update_book.sh     update the XML book sources and regenerate packages file
    42                        and GNOME and KDE dependencies tree
    43     blfs-parser.sh     generates linear BLFS books and build scripts
    44     gen-makefile.sh    generates Makefile
    45     progress_bar.sh    the Makefile progress bar
     55    update_book.sh     update the XML book sources and regenerates packages
     56                       database and meta-packages dependencies tree
     57    gen_config.sh      regenerates Config.in
     58    gen_pkg_book.sh    solve dependencies and generates linear BLFS books
     59                       and build scripts
     60    gen-makefile.sh    generates target Makefile
     61    progress_bar.sh    the target Makefile progress bar
     62    Makefile           run gen_config.sh to update Config.in,
     63                       then launch the menuconfig interface, and lastly run
     64                       gen_pkg_book.sh based on configuration settings
     65    Config.in          menuconfig interface input file
     66    packages           auto-generated packages database
     67    envars.conf        envars needed when running the target build scripts
    4668
    4769       From now on, all the work must be done from inside the installation
    4870    root directory.
    4971
    50   2.2  UPDATING BOOK SOURCES::
    51        If using the SVN book version, from time to time you may want to update
    52     the XML sources. To do that run "./update_book.sh"
    53 
    54   2.3  PARSING THE BOOK::
     72  3.2  UPDATING BOOK SOURCES::
     73
     74       If using the development book version, and if you want to update already
     75    installed packages to the new version found in that book, you need to update
     76    the XML sources and packages database.
     77
     78    To do that run "./update_book.sh"
     79
     80  3.3  CONFIGURING AND PARSING THE BOOK:: (obsolete, to be rewritten)
     81
    5582       Next step is to create a book and build scripts in dependencies build order
    5683    for a target package. A target package can be any of the ones listed in the
     
    76103    that uses sudo for commands that need root privileges.
    77104
    78     There is also two other directories that contains files generated while
    79     resolving dependencies trees.
    80 
    81     Now is the time to review the generated book and scripts, making in the
    82     scripts any changes you want to fit your needs. Scripts for additional
    83     packages (i.e., for non-BLFS packages) can be inserted in an easy way.
    84 
    85   2.4  CREATING THE MAKEFILE
     105       There is also two other directories, dependencies and xincludes, that
     106    contains files generated while resolving dependencies trees.
     107
     108  3.4  EDITING BUILD SCRIPTS
     109
     110       Now is the time to review the generated book and scripts, making in the
     111    scripts any changes required to fix generation bugs or to fit your needs.
     112
     113       Scripts for additional packages (i.e., for non-BLFS packages) can be
     114    inserted in an easy way due how the scripts are named. For example, if you
     115    want to install the external dependency "bar" before "foo" package and the
     116    "foo" script is named "064-z-foo", you need to create a "064-y-bar" build
     117    script.
     118
     119      Note that the packages tracking system isn't a packages management tool
     120    and know nothing about packages not in the BLFS book.
     121
     122  3.5  CREATING THE MAKEFILE
    86123       When the build scripts are ready to be run, the Makefile can be
    87124    created. Be sure that you cd into the "package" directory and run
     
    92129
    93130
    94 (Text is needed for the installed packages tracking system and like)
    95 
    96 3. GENERATED BUILD SCRIPTS ISSUES::
     131(Text is needed about meta-packages, the installed packages tracking system
     132and like)
     133
     134(The TRACKING_DIR directory must be created before using this tool running as root
     135
     136install -d -m1777 /var/lib/jhalfs/BLFS )
     137
     1384. GENERATED BUILD SCRIPTS ISSUES::
    97139
    98140      In this section known issues with the generated build scripts are
    99    discussed. They are due build procedures and BLFS layout particularities
    100    than we can't handle. In some cases editing the build scripts is mandatory.
     141   discussed. They are due build procedures and/or BLFS layout particularities
     142   than we can't handle. In several cases editing the build scripts is mandatory.
    101143   You may need also to insert some build script created by you to resolve
    102    unhandled dependencies and/or to remove some script and install the
    103    affected package by hand.
    104 
    105    3.1  BLFS BOOTSCRIPTS
     144   unhandled dependencies and/or to remove some script installing the affected
     145   package by hand.
     146
     147   4.1  BLFS BOOTSCRIPTS
    106148
    107149        For now, bootscripts installation will fail. You will need to edit the
     
    109151     command. That could be fixed in the future, but not sure.
    110152
    111    3.2  PACKAGES CONFIGURATION
     153   4.2  PACKAGES CONFIGURATION
    112154
    113155        For that packages that have a "Configuration" section, you should to
    114156     edit it build script to fit the configuration to your needs.
    115157
    116    3.4  PDL and Perl modules.
     158   4.4  PDL and Perl modules.
    117159
    118160        The generated scripts for that packages are plainly broken and can't
     
    120162     packages by hand.
    121163
    122    3.4  GCC, JDK, Sane, and KDE-multimedia
     164   4.4  GCC, JDK, Sane, and KDE-multimedia
    123165
    124166        On the pages for that packages, the BLFS book actually have instructions
     
    126168     try to fix some of them, but may not be possible.
    127169
    128    3.5  OTHERS
     170   4.5  XORG7
     171
     172        The generated scripts for Xorg7 pseudo-packages don't have support for
     173     $SRC_ARCHIVE nor MD5 checking.
     174
     175        If you has downloaded previously the packages, you must to edit the scripts
     176     to make it to use your local packages.
     177
     178        Also, you will need to edit the scripts to fix the commands that must
     179     be applied only to a concret individual sub-package. For example the "for"
     180     loop to install xotg7-util packages may read like:
     181
     182for package in $(cat $WGET_LST) ; do
     183  packagedir=$(echo $package | sed 's/.tar.bz2//')
     184  tar -xf $package
     185  cd $packagedir
     186  sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl &&
     187  ./configure $XORG_CONFIG --with-config-dir=$XORG_PREFIX/lib/X11/config
     188  sudo sh -c "make install"
     189  ./configure $XORG_CONFIG --with-config-dir=$XORG_PREFIX/lib/X11/config &&
     190  make
     191  sudo sh -c "make install"
     192  ./configure $XORG_CONFIG &&
     193  make
     194  sudo sh -c "make install"
     195  cd ..
     196  rm -rf $packagedir
     197done
     198
     199        After reading the HTML page to know what commands is for what package,
     200     the loop can be changed to read something like:
     201
     202for package in $(cat $WGET_LST) ; do
     203  packagedir=$(echo $package | sed 's/.tar.bz2//')
     204  tar -xf $package
     205  cd $packagedir
     206  if [ ${packagedir} = "xorg-cf-files" ] ; then
     207    sed -i "s@/usr/X11R6@$XORG_PREFIX@" X11.tmpl &&
     208    ./configure $XORG_CONFIG --with-config-dir=$XORG_PREFIX/lib/X11/config
     209    sudo sh -c "make install"
     210  elif [ ${packagedir} = "Imake" ] ; then
     211    ./configure $XORG_CONFIG --with-config-dir=$XORG_PREFIX/lib/X11/config &&
     212    make
     213    sudo sh -c "make install"
     214  else
     215    ./configure $XORG_CONFIG &&
     216    make
     217    sudo sh -c "make install"
     218  fi
     219  cd ..
     220  rm -rf $packagedir
     221done
     222
     223   4.6  PATCHES
     224
     225        By default all required patches will be downloaded from the NET.
     226
     227        If you has downloaded previously the patches, you must to edit the scripts
     228     to make it to use your local patches.
     229
     230        Also, be sure that all scripts have the commands to download/apply the
     231     required patches. Due book layout issues some patches may be missing.
     232
     233   4.7  ROOT COMMANDS
     234
     235        If building as a normal user (the default setting) be sure that all
     236     commands that need root privileges are run using sudo.
     237
     238        Due book layout issues some sudo command may be missing.
     239
     240   4.8  OTHERS
    129241
    130242        May have other issues that we are not aware on them yet. If you find
  • blfs

    r7bf2fdd rf4ed135  
    112112
    113113cp -r BLFS/* $BLFS_ROOT
     114cp -r menu $BLFS_ROOT
    114115cp $COMMON_DIR/progress_bar.sh $BLFS_ROOT
    115 # cp -r menu $BLFS_ROOT
     116cp README.BLFS $BLFS_ROOT
    116117
    117118# Start the work
     
    120121# Clean-up
    121122rm -rf libs/.svn
     123rm -rf menu/.svn
     124rm -rf menu/lxdialog/.svn
    122125
    123 # Fix BLFS_XML harcoded values
    124 sed -i 's,blfs-xml,'$BLFS_XML',' update_book.sh
    125 sed -i 's,blfs-xml,'$BLFS_XML',' libs/book.xsl
    126126
    127 # Fetch book sources and create packages and GNOME/KDE dependencies files
     127# Set some harcoded envars to their proper values
     128sed -i 's,blfs-xml,'$BLFS_XML',' update_book.sh libs/book.xsl
     129sed -i 's,tracking-dir,'$TRACKING_DIR',' update_book.sh gen-makefile.sh
     130
     131# Fetch book sources and create packages and meta-packages dependencies files
    128132if [[ -d $BLFS_XML ]] ; then
    129133  ./update_book.sh
    130134else
    131   ./update_book.sh $BLFS_XML get $TREE
     135  ./update_book.sh get $BLFS_XML $TREE
    132136fi
    133137
    134 # Generate Config.in and run the menuconfig interfaz
    135 # ./gen_config.sh
    136 # make
     138# Run the menuconfig interface
     139make
    137140
  • common/func_validate_configs.sh

    r7bf2fdd rf4ed135  
    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"
     95  local -r  blfs_PARAM_LIST="BRANCH_ID BLFS_ROOT BLFS_XML TRACKING_DIR"
    9696
    9797  local -r ERROR_MSG_pt1='The variable \"${L_arrow}${config_param}${R_arrow}\" value ${L_arrow}${BOLD}${!config_param}${R_arrow} is invalid,'
     
    268268
    269269      # BLFS params. No validation is required/allowed, IMHO
    270       BRANCH_ID | BLFS_ROOT | BLFS_XML)  echo "`eval echo $PARAM_VALS`" ;;
     270      BRANCH_ID | BLFS_ROOT | BLFS_XML )  echo "`eval echo $PARAM_VALS`" ;;
     271      TRACKING_DIR ) validate_dir -z -d -w ;;
    271272
    272273    esac
Note: See TracChangeset for help on using the changeset viewer.