Changeset 39dc04a
- Timestamp:
- 03/15/2017 09:06:17 PM (7 years ago)
- Branches:
- 2.4, ablfs-more, legacy, trunk
- Children:
- 8dc4646
- Parents:
- e5d44f5
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
BLFS/envars.conf
re5d44f5 r39dc04a 11 11 #======== Common envars ========== 12 12 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. 18 export BUILD_ROOT=/sources 19 export BUILD_SUBDIRS=1 17 20 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. 21 28 export SRC_ARCHIVE=/sources 29 unset SRC_SUBDIRS 22 30 23 31 #--- Set a well-known working locale when building software … … 28 36 export LC_ALL=C 29 37 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, 31 39 # and cannot be downloaded from upstream. 32 40 # … … 35 43 # Note that despite the name of the variable, it can be an http url. 36 44 export 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 50 unset KEEP_FILES 37 51 38 52 ### Currently not used in scripts ### -
BLFS/xsl/scripts.xsl
re5d44f5 r39dc04a 73 73 <xsl:text>PKG_DIR=</xsl:text> 74 74 <xsl:value-of select="$filename"/> 75 <xsl:text>
</xsl:text> 75 <xsl:text> 76 SRC_DIR=${SRC_ARCHIVE}${SRC_SUBDIRS:+/${PKG_DIR}} 77 BUILD_DIR=${BUILD_ROOT}${BUILD_SUBDIRS:+/${PKG_DIR}} 78 mkdir -p $SRC_DIR 79 mkdir -p $BUILD_DIR 80 81 </xsl:text> 76 82 <!-- Download code and build commands --> 77 83 <xsl:apply-templates select="sect2"/> 78 84 <!-- Clean-up --> 79 <xsl:text>cd $SRC_DIR/$PKG_DIR
</xsl:text> 85 <xsl:text>cd $BUILD_DIR 86 [[ -n "$KEEP_FILES" ]] || </xsl:text> 80 87 <!-- In some case, some files in the build tree are owned 81 88 by root --> … … 100 107 <xsl:choose> 101 108 <xsl:when test="@role = 'package'"> 102 <xsl:text> mkdir -p $SRC_DIR/$PKG_DIR
</xsl:text>103 <xsl:text>cd $SRC_DIR/$PKG_DIR
</xsl:text>109 <xsl:text>cd $SRC_DIR 110 </xsl:text> 104 111 <!-- Download information is in bridgehead tags --> 105 112 <xsl:apply-templates select="bridgehead[@renderas='sect3']"/> … … 111 118 <xsl:when test="@role = 'installation'"> 112 119 <xsl:text> 120 cd $BUILD_DIR 113 121 find . -maxdepth 1 -mindepth 1 -type d | xargs </xsl:text> 114 122 <xsl:if test="$sudo='y'"> … … 118 126 case $PACKAGE in 119 127 *.tar.gz|*.tar.bz2|*.tar.xz|*.tgz|*.tar.lzma) 120 tar -xvf $ PACKAGE > unpacked128 tar -xvf $SRC_DIR/$PACKAGE > unpacked 121 129 UNPACKDIR=`grep '[^./]\+' unpacked | head -n1 | sed 's@^\./@@;s@/.*@@'` 122 130 ;; 123 131 *.tar.lz) 124 bsdtar -xvf $ PACKAGE 2> unpacked132 bsdtar -xvf $SRC_DIR/$PACKAGE 2> unpacked 125 133 UNPACKDIR=`head -n1 unpacked | cut -d" " -f2 | sed 's@^\./@@;s@/.*@@'` 126 134 ;; 127 135 *.zip) 128 zipinfo -1 $ PACKAGE > unpacked136 zipinfo -1 $SRC_DIR/$PACKAGE > unpacked 129 137 UNPACKDIR="$(sed 's@/.*@@' unpacked | uniq )" 130 138 if test $(wc -w <<< $UNPACKDIR) -eq 1; then 131 unzip $ PACKAGE139 unzip $SRC_DIR/$PACKAGE 132 140 else 133 141 UNPACKDIR=${PACKAGE%.zip} 134 unzip -d $UNPACKDIR $ PACKAGE142 unzip -d $UNPACKDIR $SRC_DIR/$PACKAGE 135 143 fi 136 144 ;; … … 215 223 <xsl:value-of select="$varname"/> 216 224 <xsl:text> ]] ; then
</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... 218 228 <xsl:text> if [[ -f $SRC_ARCHIVE/$PKG_DIR/$</xsl:text> 219 229 <xsl:value-of select="$varname"/> … … 231 241 <xsl:text> $</xsl:text> 232 242 <xsl:value-of select="$varname"/> 233 <xsl:text>
 else
</xsl:text> 243 <xsl:text>
 else
</xsl:text> --> 234 244 <!-- Download from upstream http --> 235 245 <xsl:if test="string-length($httpurl) > 10"> 236 <xsl:text> 246 <xsl:text> wget -T 30 -t 5 </xsl:text> 237 247 <xsl:value-of select="$httpurl"/> 238 248 <xsl:text> ||
</xsl:text> … … 240 250 <!-- Download from upstream ftp --> 241 251 <xsl:if test="string-length($ftpurl) > 10"> 242 <xsl:text> 252 <xsl:text> wget -T 30 -t 5 </xsl:text> 243 253 <xsl:value-of select="$ftpurl"/> 244 254 <xsl:text> ||
</xsl:text> 245 255 </xsl:if> 246 256 <!-- The FTP_SERVER mirror as a last resort --> 247 <xsl:text> 257 <xsl:text> wget -T 30 -t 5 ${FTP_SERVER}svn/</xsl:text> 248 258 <xsl:value-of select="$first_letter"/> 249 259 <xsl:text>/$</xsl:text> 250 260 <xsl:value-of select="$varname"/> 251 261 <xsl:text> 252 cp $</xsl:text>262 <!-- cp $</xsl:text> 253 263 <xsl:value-of select="$varname"/> 254 264 <xsl:text> $SRC_ARCHIVE 255 fi 265 fi--> 256 266 fi 257 267 </xsl:text> … … 262 272 <xsl:value-of select="$varname"/> 263 273 <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" ]] && ln -sf $SRC_DIR/$</xsl:text> 281 <xsl:value-of select="$varname"/> 282 <xsl:text> $BUILD_DIR 264 283 </xsl:text> 265 284 </xsl:if> -
Config.in
re5d44f5 r39dc04a 40 40 endchoice 41 41 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 42 58 config INITSYS 43 59 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 46 62 47 63 config PROGNAME -
install-blfs-tools.sh
re5d44f5 r39dc04a 12 12 BLFS_BRANCH_ID: development, branch-xxx, xxx (where xxx is a valid tag) 13 13 (default development) 14 INIT _SYSTEM: which book do you want? 'sysv' or 'systemd' (default sysv)14 INITSYS : which book do you want? 'sysv' or 'systemd' (default sysv) 15 15 Examples: 16 16 1 - If you plan to use the tools to build BLFS on top of LFS, but you did not 17 17 use jhalfs, or forgot to include the jhalfs-blfs tools: 18 18 (as root) mkdir -p /var/lib/jhalfs/BLFS && chown -R <user> /var/lib/jhalfs 19 (as user) INIT _SYSTEM=<your system> ./install-blfs-tools.sh19 (as user) INITSYS=<your system> ./install-blfs-tools.sh 20 20 2 - To install with only user privileges (default to sysv): 21 21 TRACKING_DIR=$HOME/blfs_root/trackdir ./install-blfs-tools.sh … … 81 81 BLFS_ROOT="${BLFS_ROOT:=/blfs_root}" 82 82 TRACKING_DIR="${TRACKING_DIR:=/var/lib/jhalfs/BLFS}" 83 INIT _SYSTEM="${INIT_SYSTEM:=sysv}"83 INITSYS="${INITSYS:=sysv}" 84 84 BLFS_BRANCH_ID=${BLFS_BRANCH_ID:=development} 85 85 BLFS_XML=${BLFS_XML:=blfs-xml} 86 86 87 87 # Validate the configuration: 88 PARAMS="BLFS_ROOT TRACKING_DIR INIT _SYSTEMBLFS_XML"88 PARAMS="BLFS_ROOT TRACKING_DIR INITSYS BLFS_XML" 89 89 if [ "$WORKING_COPY" = y ]; then 90 90 PARAMS="$PARAMS WORKING_COPY BOOK" … … 168 168 make -j1 -C $BUILDDIR$BLFS_ROOT \ 169 169 TRACKING_DIR=$TRACKING_DIR \ 170 REV=$INIT _SYSTEM\170 REV=$INITSYS \ 171 171 BLFS_XML=$BUILDDIR$BLFS_ROOT/$BLFS_XML \ 172 172 SVN=svn://svn.linuxfromscratch.org/BLFS/$BLFS_TREE \
Note:
See TracChangeset
for help on using the changeset viewer.