Changeset 342c862


Ignore:
Timestamp:
02/27/2017 02:09:03 PM (7 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
2.4, ablfs-more, legacy, trunk
Children:
67723e1
Parents:
9575278
Message:

Merge new_feature branch r3884 to3886:

  • Adapt BLFS/envars.conf to modern BLFS books
  • Fix try order for downloading BLFS packages
  • Fixes to use the XORG Legacy page in BLFS
Location:
BLFS
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • BLFS/envars.conf

    r9575278 r342c862  
    1111#======== Common envars ==========
    1212
    13 #--- Set a well-known working locale when building software
    14 export LC_ALL=C
     13#--- The sources directory.
     14#    This directory contains sub directories (one for each package), where
     15#    packages are stored, unpacked, and compiled.
     16export SRC_DIR=/sources
    1517
    1618#--- The local repository for packages/file
    1719#    Any missing file will be downloaded and archived here,
    18 #    if the user has the right priviledges.
     20#    if the user has the right priviledges. Can be the same as SRC_DIR
    1921export SRC_ARCHIVE=/sources
    2022
    21 #--- Server used if the file isn't found in SRC_ARCHIVE.
    22 # As a last resort, the file will dowloaded from upstream, if possible.
     23#--- Set a well-known working locale when building software
     24# Note that an UTF-8 locale may be needed for some packages,
     25# but normally it is set in the package instructions.
     26# Furthermore, LANG may be set in /etc/profile, which is
     27# sourced at the end of this file.
     28export LC_ALL=C
     29
     30#--- Server used if the file isn't found in SRC_ARCHIVE or SRC_DIR,
     31# and cannot be downloaded from upstream.
    2332#
    2433# The server path MUST be set as listed in
    25 # http://www.linuxfromscratch.org/blfs/download.html
    26 export FTP_SERVER=ftp://anduin.linuxfromscratch.org/BLFS/
     34# http://www.linuxfromscratch.org/blfs/download.html.
     35# Note that despite the name of the variable, it can be an http url.
     36export FTP_SERVER=http://ftp.osuosl.org/pub/blfs/
    2737
     38### Currently not used in scripts ###
    2839# Use a server close to you for Xorg (see http://wiki.x.org/wiki/Mirrors)
    29 export FTP_X_SERVER=ftp://mirror.cict.fr/x.org/
    30 
    31 #--- The sources directory.
    32 #    Full path to the top level directory where packages will be stored,
    33 #    unpacked, and compiled.
    34 export SRC_DIR=/sources
    35 
    36 
    37 #======== Xorg7 envars ===========
    38 
    39 #--- Installation prefix
    40 export XORG_PREFIX=/usr
    41 
    42 #--- Configure switches
    43 export XORG_CONFIG="--prefix=$XORG_PREFIX --sysconfdir=/etc \
    44     --localstatedir=/var --disable-static"
    45 
    46 #======== ABOUT GNOME envars =====
    47 
    48 # Refer to `Chapter 30. Right now, the book hard codes --prefix=/usr
    49 # and does not make use of the variables below. If you need another prefix,
    50 # You'll have to modifiy the prefix in the book source and use the variables
    51 # below. But this is not supported in this tool.
    52 
    53 #======== LEGACY GNOME envars ====
    54 
    55 # We use envars.conf instead of /etc/profile.d. But if you
    56 # install into a different prefix, you'll need to update ld.so.conf and
    57 # man-db.conf, too.
    58 
    59 #--- Installation prefix
    60 # export GNOME_PREFIX=/usr
    61 # export GNOME_SYSCONFDIR=/etc/gnome/3.2.2
    62 # export XDG_CONFIG_DIRS=$GNOME_SYSCONFDIR/xdg
    63 # export XDG_DATA_DIRS=/usr/share:/usr/local/share
    64 
    65 #--- If you want to install GNOME on a non standard prefix, uncomment
    66 #    the next export lines and edit it if needed.
    67 #    See also the GNOME Pre-installation Configuration HTML page for
    68 #    aditional required commands.
    69 #export PATH=$PATH:$GNOME_PREFIX/bin
    70 #export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$GNOME_PREFIX/lib/pkgconfig
    71 #export GNOME_LIBCONFIG_PATH=/usr/lib:$GNOME_PREFIX/lib
    72 
    73 #======== KDE envars =============
    74 
    75 # Refer to `Chapter 27. Introduction->KDE Pre-installation Configuration'
    76 # for rationale. We use envars.conf instead of /etc/profile.d. But if you
    77 # install into a different prefix, you'll need to update ld.so.conf and
    78 # man-db.conf, and to create and populate the directories $KDE_PREFIX/share
    79 # and /etc/dbus-1, as instructed.
    80 
    81 #--- Installation prefix
    82 export KDE_PREFIX=/usr
    83 
    84 #--- If you want to install KDE on a non standard prefix, uncomment
    85 #    the next lines and edit them as needed.
    86 #export KDE_PREFIX=/opt/kde
    87 #export KDEDIR=$KDE_PREFIX
    88 
    89 #PATH=$PATH:$KDE_PREFIX/bin
    90 #if [ -z PKG_CONFIG_PATH ]; then
    91 #export   PKG_CONFIG_PATH=$KDE_PREFIX/lib/pkgconfig:$KDE_PREFIX/share/pkgconfig
    92 #else
    93 #  PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$KDE_PREFIX/lib/pkgconfig:$KDE_PREFIX/share/pkgconfig
    94 #fi
    95 # Note: there is a report that setting XDG_... vars for kde may break LXDE
    96 #if [ -z XDG_DATA_DIRS ]; then
    97 #export   XDG_DATA_DIRS=$KDE_PREFIX/share
    98 #else
    99 #  XDG_DATA_DIRS=$XDG_DATA_DIRS:$KDE_PREFIX/share
    100 #fi
    101 #if [ -z XDG_CONFIG_DIRS ]; then
    102 #export   XDG_CONFIG_DIRS=/etc/kde/xdg
    103 #else
    104 #  XDG_CONFIG_DIRS=$XDG_CONFIG_DIRS:/etc/kde/xdg
    105 #fi
    106 
    107 #======== LXQt envars =============
    108 
    109 # Refer to `Chapter 40. LXQt Desktop Pre-Install Instructions'
    110 # We use envars.conf for LXQT_PREFIX, instead of /etc/profile.d. But if you
    111 # install into a different prefix, you'll need to create the relevant
    112 # directory, to create /etc/profiles.d/lxqt.sh, update /etc/ld.so.conf, and
    113 # to create and populate the directories $LXQT_PREFIX/share/icons, as
    114 # instructed.
    115 
    116 #--- Installation prefix
    117 export LXQT_PREFIX=/usr
    118 
    119 #--- If you want to install LXQT on a non standard prefix, uncomment
    120 #    the next line and edit it as needed, or just use the book's
    121 #    /etc/profile.d/lxqt.sh.
    122 # export LXQT_PREFIX=/opt/lxqt
     40# export FTP_X_SERVER=ftp://mirror.cict.fr/x.org/
    12341
    12442#======== Optimizations =============
    12543
    12644# Global optimization settings can be placed here. This settings can be
    127 # overrided by settings in the packages build scripts.
     45# overriden by settings in the packages build scripts.
    12846
    12947# WARNING: The use of build optimizations may be dangerous.
     
    14664#======== Environment settings ========
    14765
    148 # Since the startup files may be changed in the course
    149 # of a build, ensure that environment variables are
    150 # up to date
     66# The prefered way to setup environment variables nowadays
     67# is to set them in /etc/profile{,.d/*.sh}.
     68# It is recommended to source /etc/profile in this file
     69# since a package may add some new variables in there,
     70# which may be needed later in dependant packages.
    15171
    15272if [ -r /etc/profile ]; then source /etc/profile; fi
     73
     74#======== Package management ========
     75
     76# We need the functions in "packInstall.sh" when installing a package,
     77# if package management is requested. Note that we have no way to know
     78# whether package management is requested for a given build.
     79# Furthermore, "sudo -E" exports variables, but not functions from
     80# the environment, and sudo needs to be called before porg, due
     81# to porg limitations. So we just export the location of the file
     82# where the functions are defined, and we'll source it just before
     83# installing.
     84
     85export PACK_INSTALL=/blfs_root/packInstall.sh # change as needed
  • BLFS/gen-special.sh

    r9575278 r342c862  
    4040# Non-versioned packages:
    4141NV_LIST="cacerts xorg-env kde-pre-install-config kf5-intro lxqt-pre-install \
    42 ojdk-conf tex-path"
     42lxqt-post-install ojdk-conf tex-path"
    4343
    4444# Set PATH to be sure to find udevadm
     
    147147# except the first.
    148148  list_cat="$(sed -n '/>cat/,/EOF</p' $file | grep -v 'cat\|EOF' |
    149                  sed 's/^[^ ]*\ *\([^&]*\).*/\1/' | sed 's/-$//')"
     149              awk '{ print $NF }' | sed 's/-&.*//')"
    150150
    151151# Rationale for the sed below: the following for breaks words at spaces (unless
  • BLFS/xsl/make_book.xsl

    r9575278 r342c862  
    308308      </xsl:call-template>
    309309    </xsl:variable>
     310    <xsl:variable name="download-dir">
     311      <xsl:call-template name="download-dir">
     312        <xsl:with-param name="package" select="concat(' ',$package,'-')"/>
     313        <xsl:with-param name="cat-md5"
     314                        select=".//userinput[starts-with(string(),'cat ')]"/>
     315      </xsl:call-template>
     316    </xsl:variable>
    310317    <xsl:variable name="install-instructions">
    311318      <xsl:call-template name="inst-instr">
     
    329336                <xsl:value-of
    330337                   select=".//para[contains(string(),'(HTTP)')]/ulink/@url"/>
     338                <xsl:value-of select="$download-dir"/>
    331339                <xsl:value-of select="$tarball"/>
    332340              </xsl:attribute>
     
    339347                <xsl:value-of
    340348                   select=".//para[contains(string(),'(FTP)')]/ulink/@url"/>
     349                <xsl:value-of select="$download-dir"/>
    341350                <xsl:value-of select="$tarball"/>
    342351              </xsl:attribute>
     
    408417        </xsl:call-template>
    409418      </xsl:when>
     419      <xsl:when test="contains(substring-before($cat-md5,$package),' ')">
     420        <xsl:call-template name="tarball">
     421          <xsl:with-param name="package" select="$package"/>
     422          <xsl:with-param name="cat-md5"
     423                          select="substring-after($cat-md5,' ')"/>
     424        </xsl:call-template>
     425      </xsl:when>
    410426      <xsl:otherwise>
    411427        <xsl:copy-of select="substring-after(
    412                                  substring-before($cat-md5,'&#xA;'),'  ')"/>
     428                                substring-before($cat-md5,'&#xA;'),' ')"/>
     429      </xsl:otherwise>
     430    </xsl:choose>
     431  </xsl:template>
     432<!-- get the download dirname from the text that comes from the .md5 file -->
     433  <xsl:template name="download-dir">
     434    <xsl:param name="package"/>
     435    <xsl:param name="cat-md5"/>
     436    <xsl:choose>
     437      <xsl:when test="not(@id='xorg7-legacy')">
     438        <xsl:copy-of select="''"/>
     439      </xsl:when>
     440      <xsl:when test="contains(substring-before($cat-md5,$package),'&#xA;')">
     441        <xsl:call-template name="download-dir">
     442          <xsl:with-param name="package" select="$package"/>
     443          <xsl:with-param name="cat-md5"
     444                          select="substring-after($cat-md5,'&#xA;')"/>
     445        </xsl:call-template>
     446      </xsl:when>
     447      <xsl:when test="contains(substring-before($cat-md5,$package),' ')">
     448        <xsl:call-template name="download-dir">
     449          <xsl:with-param name="package" select="$package"/>
     450          <xsl:with-param name="cat-md5"
     451                          select="substring-after($cat-md5,' ')"/>
     452        </xsl:call-template>
     453      </xsl:when>
     454      <xsl:otherwise>
     455        <xsl:copy-of select="substring-before($cat-md5,' ')"/>
    413456      </xsl:otherwise>
    414457    </xsl:choose>
  • BLFS/xsl/scripts.xsl

    r9575278 r342c862  
    216216    <xsl:value-of select="$varname"/>
    217217    <xsl:text>&#xA;  else&#xA;</xsl:text>
    218     <!-- The FTP_SERVER mirror -->
     218    <!-- Download from upstream http -->
     219    <xsl:if test="string-length($httpurl) &gt; 10">
     220      <xsl:text>    wget -T 30 -t 5 </xsl:text>
     221      <xsl:value-of select="$httpurl"/>
     222      <xsl:text> ||&#xA;</xsl:text>
     223    </xsl:if>
     224    <!-- Download from upstream ftp -->
     225    <xsl:if test="string-length($ftpurl) &gt; 10">
     226      <xsl:text>    wget -T 30 -t 5 </xsl:text>
     227      <xsl:value-of select="$ftpurl"/>
     228      <xsl:text> ||&#xA;</xsl:text>
     229    </xsl:if>
     230    <!-- The FTP_SERVER mirror as a last resort -->
    219231    <xsl:text>    wget -T 30 -t 5 ${FTP_SERVER}svn/</xsl:text>
    220232    <xsl:value-of select="$first_letter"/>
    221233    <xsl:text>/$</xsl:text>
    222234    <xsl:value-of select="$varname"/>
    223     <xsl:if test="string-length($httpurl) &gt; 10">
    224       <xsl:text> ||
    225     wget -T 30 -t 5 </xsl:text>
    226       <xsl:value-of select="$httpurl"/>
    227     </xsl:if>
    228     <xsl:if test="string-length($ftpurl) &gt; 10">
    229       <xsl:text> ||
    230     wget -T 30 -t 5 </xsl:text>
    231       <xsl:value-of select="$ftpurl"/>
    232     </xsl:if>
    233235    <xsl:text>
    234236    cp $</xsl:text>
Note: See TracChangeset for help on using the changeset viewer.