Changeset 39dc04a


Ignore:
Timestamp:
03/15/2017 09:06:17 PM (7 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
2.4, ablfs-more, legacy, trunk
Children:
8dc4646
Parents:
e5d44f5
Message:

Merge new_features rev 3918

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • BLFS/envars.conf

    re5d44f5 r39dc04a  
    1111#======== Common envars ==========
    1212
    13 #--- The sources directory.
    14 #    This directory contains sub directories (one for each package), where
    15 #    packages are stored, unpacked, and compiled.
    16 export SRC_DIR=/sources
     13#--- The build directory:
     14#    - If BUILD_SUBDIRS is set, this directory contains sub directories
     15#      (one for each package), where packages are unpacked, and compiled.
     16#    - If BUILD_SUBDIRS is unset, packages are unpacked, and compiled directly
     17#      in $BUILD_ROOT.
     18export BUILD_ROOT=/sources
     19export BUILD_SUBDIRS=1
    1720
    18 #--- The local repository for packages/file
    19 #    Any missing file will be downloaded and archived here,
    20 #    if the user has the right priviledges. Can be the same as SRC_DIR
     21#--- The local repository for packages/file:
     22#    Any missing file will be downloaded and archived either:
     23#    - into a subdirectory (one for each page of the book) fo this directory,
     24#      if SRC_SUBDIRS is set.
     25#    - directly into this directory if SRC_SUBDIRS is unset.
     26#    This directory can be the same as $BUILD_ROOT, provided BUILD_SUBDIRS
     27#    and SRC_SUBDIRS are different.
    2128export SRC_ARCHIVE=/sources
     29unset  SRC_SUBDIRS
    2230
    2331#--- Set a well-known working locale when building software
     
    2836export LC_ALL=C
    2937
    30 #--- Server used if the file isn't found in SRC_ARCHIVE or SRC_DIR,
     38#--- Server used if the file isn't found in SRC_DIR,
    3139# and cannot be downloaded from upstream.
    3240#
     
    3543# Note that despite the name of the variable, it can be an http url.
    3644export FTP_SERVER=http://ftp.osuosl.org/pub/blfs/
     45
     46#--- Keep the buid directory to examine it:
     47#    If KEEP_FILES is unset, the extracted tarball is removed after build.
     48#    Otherwise, the build tree is kept for later study.
     49#export KEEP_FILES=1
     50unset KEEP_FILES
    3751
    3852### Currently not used in scripts ###
  • BLFS/xsl/scripts.xsl

    re5d44f5 r39dc04a  
    7373            <xsl:text>PKG_DIR=</xsl:text>
    7474            <xsl:value-of select="$filename"/>
    75             <xsl:text>&#xA;</xsl:text>
     75            <xsl:text>
     76SRC_DIR=${SRC_ARCHIVE}${SRC_SUBDIRS:+/${PKG_DIR}}
     77BUILD_DIR=${BUILD_ROOT}${BUILD_SUBDIRS:+/${PKG_DIR}}
     78mkdir -p $SRC_DIR
     79mkdir -p $BUILD_DIR
     80
     81</xsl:text>
    7682            <!-- Download code and build commands -->
    7783            <xsl:apply-templates select="sect2"/>
    7884            <!-- Clean-up -->
    79             <xsl:text>cd $SRC_DIR/$PKG_DIR&#xA;</xsl:text>
     85            <xsl:text>cd $BUILD_DIR
     86[[ -n "$KEEP_FILES" ]] || </xsl:text>
    8087            <!-- In some case, some files in the build tree are owned
    8188                 by root -->
     
    100107    <xsl:choose>
    101108      <xsl:when test="@role = 'package'">
    102         <xsl:text>mkdir -p $SRC_DIR/$PKG_DIR&#xA;</xsl:text>
    103         <xsl:text>cd $SRC_DIR/$PKG_DIR&#xA;</xsl:text>
     109        <xsl:text>cd $SRC_DIR
     110</xsl:text>
    104111        <!-- Download information is in bridgehead tags -->
    105112        <xsl:apply-templates select="bridgehead[@renderas='sect3']"/>
     
    111118      <xsl:when test="@role = 'installation'">
    112119        <xsl:text>
     120cd $BUILD_DIR
    113121find . -maxdepth 1 -mindepth 1 -type d | xargs </xsl:text>
    114122        <xsl:if test="$sudo='y'">
     
    118126case $PACKAGE in
    119127  *.tar.gz|*.tar.bz2|*.tar.xz|*.tgz|*.tar.lzma)
    120      tar -xvf $PACKAGE &gt; unpacked
     128     tar -xvf $SRC_DIR/$PACKAGE &gt; unpacked
    121129     UNPACKDIR=`grep '[^./]\+' unpacked | head -n1 | sed 's@^\./@@;s@/.*@@'`
    122130     ;;
    123131  *.tar.lz)
    124      bsdtar -xvf $PACKAGE 2&gt; unpacked
     132     bsdtar -xvf $SRC_DIR/$PACKAGE 2&gt; unpacked
    125133     UNPACKDIR=`head -n1 unpacked | cut  -d" " -f2 | sed 's@^\./@@;s@/.*@@'`
    126134     ;;
    127135  *.zip)
    128      zipinfo -1 $PACKAGE &gt; unpacked
     136     zipinfo -1 $SRC_DIR/$PACKAGE &gt; unpacked
    129137     UNPACKDIR="$(sed 's@/.*@@' unpacked | uniq )"
    130138     if test $(wc -w &lt;&lt;&lt; $UNPACKDIR) -eq 1; then
    131        unzip $PACKAGE
     139       unzip $SRC_DIR/$PACKAGE
    132140     else
    133141       UNPACKDIR=${PACKAGE%.zip}
    134        unzip -d $UNPACKDIR $PACKAGE
     142       unzip -d $UNPACKDIR $SRC_DIR/$PACKAGE
    135143     fi
    136144     ;;
     
    215223    <xsl:value-of select="$varname"/>
    216224    <xsl:text> ]] ; then&#xA;</xsl:text>
    217     <!-- SRC_ARCHIVE may have subdirectories or not -->
     225    <!-- This whole code becomes obsolete because now, it is there or we
     226         download; keeping for now, and we may want to grab it from
     227         SRC_ARCHIVE when SRC_SUBDIRS is set...
    218228    <xsl:text>  if [[ -f $SRC_ARCHIVE/$PKG_DIR/$</xsl:text>
    219229    <xsl:value-of select="$varname"/>
     
    231241    <xsl:text> $</xsl:text>
    232242    <xsl:value-of select="$varname"/>
    233     <xsl:text>&#xA;  else&#xA;</xsl:text>
     243    <xsl:text>&#xA;  else&#xA;</xsl:text> -->
    234244    <!-- Download from upstream http -->
    235245    <xsl:if test="string-length($httpurl) &gt; 10">
    236       <xsl:text>    wget -T 30 -t 5 </xsl:text>
     246      <xsl:text>  wget -T 30 -t 5 </xsl:text>
    237247      <xsl:value-of select="$httpurl"/>
    238248      <xsl:text> ||&#xA;</xsl:text>
     
    240250    <!-- Download from upstream ftp -->
    241251    <xsl:if test="string-length($ftpurl) &gt; 10">
    242       <xsl:text>    wget -T 30 -t 5 </xsl:text>
     252      <xsl:text>  wget -T 30 -t 5 </xsl:text>
    243253      <xsl:value-of select="$ftpurl"/>
    244254      <xsl:text> ||&#xA;</xsl:text>
    245255    </xsl:if>
    246256    <!-- The FTP_SERVER mirror as a last resort -->
    247     <xsl:text>    wget -T 30 -t 5 ${FTP_SERVER}svn/</xsl:text>
     257    <xsl:text>  wget -T 30 -t 5 ${FTP_SERVER}svn/</xsl:text>
    248258    <xsl:value-of select="$first_letter"/>
    249259    <xsl:text>/$</xsl:text>
    250260    <xsl:value-of select="$varname"/>
    251261    <xsl:text>
    252     cp $</xsl:text>
     262<!--    cp $</xsl:text>
    253263    <xsl:value-of select="$varname"/>
    254264    <xsl:text> $SRC_ARCHIVE
    255   fi
     265  fi-->
    256266fi
    257267</xsl:text>
     
    262272      <xsl:value-of select="$varname"/>
    263273      <xsl:text>" | md5sum -c -
     274</xsl:text>
     275    </xsl:if>
     276<!-- link additional packages into $BUILD_DIR, because they are supposed to
     277     be there-->
     278    <xsl:if test="string($varname) != 'PACKAGE'">
     279      <xsl:text>
     280[[ "$SRC_DIR" != "$BUILD_DIR" ]] &amp;&amp; ln -sf $SRC_DIR/$</xsl:text>
     281      <xsl:value-of select="$varname"/>
     282      <xsl:text> $BUILD_DIR
    264283</xsl:text>
    265284    </xsl:if>
  • Config.in

    re5d44f5 r39dc04a  
    4040    endchoice
    4141
     42    choice
     43    depends BOOK_BLFS
     44    prompt "Init system"
     45
     46        config BLFS_SYSV
     47        bool "BLFS Sys V"
     48        help
     49            Extract the Sys V flavour of the BLFS book
     50
     51        config BLFS_SYSD
     52        bool "BLFS systemd"
     53        help
     54            Extract the systemd flavour of the BLFS book
     55
     56    endchoice
     57
    4258    config    INITSYS
    4359        string
    44         default "sysv"         if BOOK_LFS
    45         default "systemd"      if BOOK_LFS_SYSD
     60        default "sysv"         if BOOK_LFS || BLFS_SYSV
     61        default "systemd"      if BOOK_LFS_SYSD || BLFS_SYSD
    4662
    4763    config    PROGNAME
  • install-blfs-tools.sh

    re5d44f5 r39dc04a  
    1212BLFS_BRANCH_ID: development, branch-xxx, xxx (where xxx is a valid tag)
    1313                (default development)
    14 INIT_SYSTEM   : which book do you want? 'sysv' or 'systemd' (default sysv)
     14INITSYS   : which book do you want? 'sysv' or 'systemd' (default sysv)
    1515Examples:
    16161 - If you plan to use the tools to build BLFS on top of LFS, but you did not
    1717use jhalfs, or forgot to include the jhalfs-blfs tools:
    1818(as root) mkdir -p /var/lib/jhalfs/BLFS && chown -R <user> /var/lib/jhalfs
    19 (as user) INIT_SYSTEM=<your system> ./install-blfs-tools.sh
     19(as user) INITSYS=<your system> ./install-blfs-tools.sh
    20202 - To install with only user privileges (default to sysv):
    2121TRACKING_DIR=$HOME/blfs_root/trackdir ./install-blfs-tools.sh
     
    8181BLFS_ROOT="${BLFS_ROOT:=/blfs_root}"
    8282TRACKING_DIR="${TRACKING_DIR:=/var/lib/jhalfs/BLFS}"
    83 INIT_SYSTEM="${INIT_SYSTEM:=sysv}"
     83INITSYS="${INITSYS:=sysv}"
    8484BLFS_BRANCH_ID=${BLFS_BRANCH_ID:=development}
    8585BLFS_XML=${BLFS_XML:=blfs-xml}
    8686
    8787# Validate the configuration:
    88 PARAMS="BLFS_ROOT TRACKING_DIR INIT_SYSTEM BLFS_XML"
     88PARAMS="BLFS_ROOT TRACKING_DIR INITSYS BLFS_XML"
    8989if [ "$WORKING_COPY" = y ]; then
    9090  PARAMS="$PARAMS WORKING_COPY BOOK"
     
    168168make -j1 -C $BUILDDIR$BLFS_ROOT \
    169169     TRACKING_DIR=$TRACKING_DIR \
    170      REV=$INIT_SYSTEM            \
     170     REV=$INITSYS            \
    171171     BLFS_XML=$BUILDDIR$BLFS_ROOT/$BLFS_XML      \
    172172     SVN=svn://svn.linuxfromscratch.org/BLFS/$BLFS_TREE \
Note: See TracChangeset for help on using the changeset viewer.