Changeset 1fa0dee


Ignore:
Timestamp:
01/30/2018 01:53:34 PM (6 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
ablfs-more, legacy, trunk
Children:
5afaf7c
Parents:
2140f22
Message:

Prepend JH_ to exported variables in jhalfs-blfs, so that collision with
build system variables is unlikely

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • BLFS/envars.conf

    r2140f22 r1fa0dee  
    1212
    1313#--- The build directory:
    14 #    - If BUILD_SUBDIRS is set, this directory contains sub directories
     14#    - If JH_BUILD_SUBDIRS is set, this directory contains sub directories
    1515#      (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.
    18 export BUILD_ROOT=/sources
    19 export BUILD_SUBDIRS=1
     16#    - If JH_BUILD_SUBDIRS is unset, packages are unpacked, and compiled
     17#      directly in $JH_BUILD_ROOT.
     18export JH_BUILD_ROOT=/sources
     19export JH_BUILD_SUBDIRS=1
    2020
    2121#--- The local repository for packages/file:
    2222#    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.
    28 export SRC_ARCHIVE=/sources
    29 unset  SRC_SUBDIRS
     23#    - into a subdirectory (one for each page of the book) of this directory,
     24#      if JH_SRC_SUBDIRS is set.
     25#    - directly into this directory if JH_SRC_SUBDIRS is unset.
     26#    This directory can be the same as $JH_BUILD_ROOT, provided JH_BUILD_SUBDIRS
     27#    and JH_SRC_SUBDIRS are different.
     28export JH_SRC_ARCHIVE=/sources
     29unset  JH_SRC_SUBDIRS
    3030
    3131#--- Set a well-known working locale when building software
     
    4444# http://www.linuxfromscratch.org/blfs/download.html.
    4545# Note that despite the name of the variable, it can be an http url.
    46 export FTP_SERVER=http://ftp.osuosl.org/pub/blfs/
     46export JH_FTP_SERVER=http://ftp.osuosl.org/pub/blfs/
    4747
    4848#--- Keep the buid directory to examine it:
    49 #    If KEEP_FILES is unset, the extracted tarball is removed after build.
     49#    If JH_KEEP_FILES is unset, the extracted tarball is removed after build.
    5050#    Otherwise, the build tree is kept for later study.
    51 #export KEEP_FILES=1
    52 unset KEEP_FILES
     51#export JH_KEEP_FILES=1
     52unset JH_KEEP_FILES
    5353
    5454### Currently not used in scripts ###
     
    9999# installing.
    100100
    101 export PACK_INSTALL=/blfs_root/packInstall.sh # change as needed
     101export JH_PACK_INSTALL=/blfs_root/packInstall.sh # change as needed
  • BLFS/xsl/scripts.xsl

    r2140f22 r1fa0dee  
    8888                 if using package management (see envars.conf), so
    8989                 "export" it -->
    90             <xsl:text>export PKG_DIR=</xsl:text>
     90            <xsl:text>export JH_PKG_DIR=</xsl:text>
    9191            <xsl:value-of select="$filename"/>
    9292            <xsl:text>
    93 SRC_DIR=${SRC_ARCHIVE}${SRC_SUBDIRS:+/${PKG_DIR}}
    94 BUILD_DIR=${BUILD_ROOT}${BUILD_SUBDIRS:+/${PKG_DIR}}
     93SRC_DIR=${JH_SRC_ARCHIVE}${JH_SRC_SUBDIRS:+/${JH_PKG_DIR}}
     94BUILD_DIR=${JH_BUILD_ROOT}${JH_BUILD_SUBDIRS:+/${JH_PKG_DIR}}
    9595mkdir -p $SRC_DIR
    9696mkdir -p $BUILD_DIR
     
    101101            <!-- Clean-up -->
    102102            <xsl:text>cd $BUILD_DIR
    103 [[ -n "$KEEP_FILES" ]] || </xsl:text>
     103[[ -n "$JH_KEEP_FILES" ]] || </xsl:text>
    104104            <!-- In some case, some files in the build tree are owned
    105105                 by root -->
     
    107107              <xsl:text>sudo </xsl:text>
    108108            </xsl:if>
    109             <xsl:text>rm -rf $UNPACKDIR unpacked&#xA;&#xA;</xsl:text>
     109            <xsl:text>rm -rf $JH_UNPACKDIR unpacked&#xA;&#xA;</xsl:text>
    110110          </xsl:when>
    111111          <!-- Non-package page -->
     
    144144  *.tar.gz|*.tar.bz2|*.tar.xz|*.tgz|*.tar.lzma)
    145145     tar -xvf $SRC_DIR/$PACKAGE &gt; unpacked
    146      UNPACKDIR=`grep '[^./]\+' unpacked | head -n1 | sed 's@^\./@@;s@/.*@@'`
     146     JH_UNPACKDIR=`grep '[^./]\+' unpacked | head -n1 | sed 's@^\./@@;s@/.*@@'`
    147147     ;;
    148148  *.tar.lz)
    149149     bsdtar -xvf $SRC_DIR/$PACKAGE 2&gt; unpacked
    150      UNPACKDIR=`head -n1 unpacked | cut  -d" " -f2 | sed 's@^\./@@;s@/.*@@'`
     150     JH_UNPACKDIR=`head -n1 unpacked | cut  -d" " -f2 | sed 's@^\./@@;s@/.*@@'`
    151151     ;;
    152152  *.zip)
    153153     zipinfo -1 $SRC_DIR/$PACKAGE &gt; unpacked
    154      UNPACKDIR="$(sed 's@/.*@@' unpacked | uniq )"
    155      if test $(wc -w &lt;&lt;&lt; $UNPACKDIR) -eq 1; then
     154     JH_UNPACKDIR="$(sed 's@/.*@@' unpacked | uniq )"
     155     if test $(wc -w &lt;&lt;&lt; $JH_UNPACKDIR) -eq 1; then
    156156       unzip $SRC_DIR/$PACKAGE
    157157     else
    158        UNPACKDIR=${PACKAGE%.zip}
    159        unzip -d $UNPACKDIR $SRC_DIR/$PACKAGE
     158       JH_UNPACKDIR=${PACKAGE%.zip}
     159       unzip -d $JH_UNPACKDIR $SRC_DIR/$PACKAGE
    160160     fi
    161161     ;;
    162162  *)
    163      UNPACKDIR=$PKG_DIR-build
    164      mkdir $UNPACKDIR
    165      cp $SRC_DIR/$PACKAGE $UNPACKDIR
    166      cp $(find . -mindepth 1 -maxdepth 1 -type l) $UNPACKDIR
     163     JH_UNPACKDIR=$JH_PKG_DIR-build
     164     mkdir $JH_UNPACKDIR
     165     cp $SRC_DIR/$PACKAGE $JH_UNPACKDIR
     166     cp $(find . -mindepth 1 -maxdepth 1 -type l) $JH_UNPACKDIR
    167167     ;;
    168168esac
    169 export UNPACKDIR
    170 cd $UNPACKDIR&#xA;
     169export JH_UNPACKDIR
     170cd $JH_UNPACKDIR&#xA;
    171171</xsl:text>
    172172        <xsl:apply-templates select=".//screen | .//para/command"/>
     
    242242    <xsl:value-of select="$varname"/>
    243243    <xsl:text> ]] ; then
    244   if [[ -f $SRC_ARCHIVE/$</xsl:text>
     244  if [[ -f $JH_SRC_ARCHIVE/$</xsl:text>
    245245    <xsl:value-of select="$varname"/>
    246246    <xsl:text> ]] ; then&#xA;</xsl:text>
    247     <xsl:text>    cp $SRC_ARCHIVE/$</xsl:text>
     247    <xsl:text>    cp $JH_SRC_ARCHIVE/$</xsl:text>
    248248    <xsl:value-of select="$varname"/>
    249249    <xsl:text> $</xsl:text>
     
    264264    </xsl:if>
    265265    <!-- The FTP_SERVER mirror as a last resort -->
    266     <xsl:text>    wget -T 30 -t 5 ${FTP_SERVER}svn/</xsl:text>
     266    <xsl:text>    wget -T 30 -t 5 ${JH_FTP_SERVER}svn/</xsl:text>
    267267    <xsl:value-of select="$first_letter"/>
    268268    <xsl:text>/$</xsl:text>
    269269    <xsl:value-of select="$varname"/>
    270     <xsl:text><!--
    271     cp $</xsl:text>
    272     <xsl:value-of select="$varname"/>
    273     <xsl:text> $SRC_ARCHIVE-->
     270    <xsl:text>
    274271  fi
    275272fi
     
    432429            <xsl:if test="$wrap-install = 'y' and
    433430                          ancestor::sect2[@role='installation']">
    434               <xsl:text>if [ -r "$PACK_INSTALL" ]; then
    435   source $PACK_INSTALL
     431              <xsl:text>if [ -r "$JH_PACK_INSTALL" ]; then
     432  source $JH_PACK_INSTALL
    436433  export -f wrapInstall
    437434  export -f packInstall
     
    472469    <xsl:copy-of select="$bootpkg"/>
    473470    <xsl:text>
    474 BOOTSRC_DIR=${SRC_ARCHIVE}${SRC_SUBDIRS:+/${BOOTPKG_DIR}}
    475 BOOTBUILD_DIR=${BUILD_ROOT}${BUILD_SUBDIRS:+/${BOOTPKG_DIR}}
     471BOOTSRC_DIR=${JH_SRC_ARCHIVE}${JH_SRC_SUBDIRS:+/${BOOTPKG_DIR}}
     472BOOTBUILD_DIR=${JH_BUILD_ROOT}${JH_BUILD_SUBDIRS:+/${BOOTPKG_DIR}}
    476473mkdir -p $BOOTSRC_DIR
    477474mkdir -p $BOOTBUILD_DIR
     
    483480BOOTPACKG=$(basename $URL)
    484481if [[ ! -f $BOOTPACKG ]] ; then
    485   if [[ -f $SRC_ARCHIVE/$BOOTPACKG ]] ; then
    486     cp $SRC_ARCHIVE/$BOOTPACKG $BOOTPACKG
     482  if [[ -f $JH_SRC_ARCHIVE/$BOOTPACKG ]] ; then
     483    cp $JH_SRC_ARCHIVE/$BOOTPACKG $BOOTPACKG
    487484  else
    488485    wget -T 30 -t 5 $URL
  • README.BLFS

    r2140f22 r1fa0dee  
    266266       IMPORTANT: Review and edit envars.conf, at least after installing the
    267267    tool. This file is used to set global envars needed by the build scripts.
    268     If you use package management, the variable PACK_INSTALL should point to
    269     where the packInstall.sh script resides.
     268    If you use package management, the variable JH_PACK_INSTALL should point to
     269    the directory where the packInstall.sh script resides.
    270270
    271271  4.4  CREATING THE MAKEFILE::
  • common/libs/func_install_blfs

    r2140f22 r1fa0dee  
    1414cp README.BLFS ${BUILDDIR}${BLFS_ROOT}
    1515if [ "$WRAP_INSTALL" = y ]; then
    16   sed -e 's/PKGDIR/UNPACKDIR/' \
    17       -e 's/PKG_DEST/PKG_DIR/' \
     16  sed -e 's/PKGDIR/JH_UNPACKDIR/' \
     17      -e 's/PKG_DEST/JH_PKG_DIR/' \
    1818      $PKGMNGTDIR/packInstall.sh > ${BUILDDIR}${BLFS_ROOT}/packInstall.sh
    1919fi
     
    145145echo -e '#!/bin/bash\nset -e\n' > $BUILDDIR$BLFS_ROOT/download_script
    146146sed -n -e '/PACKAGE=/,/^fi/{/^fi/a\
    147 cp $PACKAGE $SRC_ARCHIVE
     147cp $PACKAGE $JH_SRC_ARCHIVE
    148148p}' \
    149149       -e '/|[ ]*md5sum/p' \
    150150       -e '/PACKAGE1=/,/^fi/{/^fi/a\
    151 cp $PACKAGE1 $SRC_ARCHIVE
     151cp $PACKAGE1 $JH_SRC_ARCHIVE
    152152p}' \
    153153       -e '/PATCH=/,/^fi/{/^fi/a\
    154 cp $PATCH $SRC_ARCHIVE
     154cp $PATCH $JH_SRC_ARCHIVE
    155155p}' \
    156156       -e '/URL=/,/^fi/{/^fi/a\
    157 cp $BOOTPACKG $SRC_ARCHIVE
     157cp $BOOTPACKG $JH_SRC_ARCHIVE
    158158p}' \
    159159    $BUILDDIR$BLFS_ROOT/scripts/* >> $BUILDDIR$BLFS_ROOT/download_script
     
    165165sudo find . -name unpacked -exec rm \{\} \;
    166166if [ "$GETPKG" = "y" ]; then
    167     FTP_SERVER=$SERVER/pub/blfs/ \
    168     SRC_ARCHIVE=${SRC_ARCHIVE:-/dev/null}     \
     167    JH_FTP_SERVER=$SERVER/pub/blfs/ \
     168    JH_SRC_ARCHIVE=${SRC_ARCHIVE:-/dev/null}     \
    169169    $BUILDDIR$BLFS_ROOT/download_script
    170170else # Save the download script in case the user wants to run it later
  • pkgmngt/packInstall.sh.porg

    r2140f22 r1fa0dee  
    2323    ;;
    2424  icu*) # No version in PCKGVRS! Use version directly from xml book.
    25         # PACK_INSTALL contains the path to this script, which is in the
     25        # JH_PACK_INSTALL contains the path to this script, which is in the
    2626        # parent dir of the book.
    27     local PACKENT=$(dirname $PACK_INSTALL)/blfs-xml/packages.ent
     27    local PACKENT=$(dirname $JH_PACK_INSTALL)/blfs-xml/packages.ent
    2828    local VERSION1=$(sed -n 's/.*icu-major[^0-9]*\([^"]*\).*/\1/p' $PACKENT)
    2929    local VERSION2=$(sed -n 's/.*icu-minor[^0-9]*\([^"]*\).*/\1/p' $PACKENT)
     
    3131    ;;
    3232  exiv*)
    33     local PACKENT=$(dirname $PACK_INSTALL)/blfs-xml/packages.ent
     33    local PACKENT=$(dirname $JH_PACK_INSTALL)/blfs-xml/packages.ent
    3434    VERSION=$(sed -n 's/.*exiv2[^0-9]*\([^"]*\).*/\1/p' $PACKENT)
    3535    ;;
    3636  flashplayer*)
    37     local PACKENT=$(dirname $PACK_INSTALL)/blfs-xml/packages.ent
     37    local PACKENT=$(dirname $JH_PACK_INSTALL)/blfs-xml/packages.ent
    3838    VERSION=$(sed -n 's/.*flashplayer[^0-9]*\([^"]*\).*/\1/p' $PACKENT)
    3939    ;;
    4040  soundtouch*)
    41     local PACKENT=$(dirname $PACK_INSTALL)/blfs-xml/packages.ent
     41    local PACKENT=$(dirname $JH_PACK_INSTALL)/blfs-xml/packages.ent
    4242    VERSION=$(sed -n 's/.*soundtouch[^0-9]*\([^"]*\).*/\1/p' $PACKENT)
    4343    ;;
    4444  xvid*)
    45     local PACKENT=$(dirname $PACK_INSTALL)/blfs-xml/packages.ent
     45    local PACKENT=$(dirname $JH_PACK_INSTALL)/blfs-xml/packages.ent
    4646    VERSION=$(sed -n 's/.*xvid[^0-9]*\([^"]*\).*/\1/p' $PACKENT)
    4747    ;;
    4848  xf86-video-intel)
    49     local PACKENT=$(dirname $PACK_INSTALL)/blfs-xml/x/installing/x7driver-intel.xml
     49    local PACKENT=$(dirname $JH_PACK_INSTALL)/blfs-xml/x/installing/x7driver-intel.xml
    5050    VERSION=$(sed -n '/<!--/!s/.*-version[^;][^0-9]*\([^"]*\).*/\1/p' $PACKENT)
    5151    ;;
Note: See TracChangeset for help on using the changeset viewer.