Merge trunk r3767-3773

This commit is contained in:
Pierre Labastie 2014-01-01 09:49:25 +00:00
parent f5337a92d7
commit af63ee2d34
5 changed files with 128 additions and 63 deletions

View file

@ -42,6 +42,7 @@
<xsl:template match="dependency"> <xsl:template match="dependency">
<xsl:variable name="depname"> <xsl:variable name="depname">
<xsl:choose> <xsl:choose>
<xsl:when test="@name='xorg-env'"/>
<xsl:when test="@name='x-window-system'">xinit</xsl:when> <xsl:when test="@name='x-window-system'">xinit</xsl:when>
<xsl:when test="@name='xorg7'">xinit</xsl:when> <xsl:when test="@name='xorg7'">xinit</xsl:when>
<xsl:when test="@name='server-mail'"> <xsl:when test="@name='server-mail'">

View file

@ -200,41 +200,18 @@
</xsl:element> </xsl:element>
</xsl:if> </xsl:if>
<!-- Dependencies --> <!-- Dependencies -->
<!-- If in Xorg or KDE chapter, consider that the preceding package is <!-- If in Xorg (not anymore) or KDE chapter, consider that the preceding
the first dependency (not always noted in the book) --> package is the first dependency (not always noted in the book)-->
<xsl:if test="ancestor::chapter[@id='kde4-core'] or <xsl:if test="ancestor::chapter[@id='kde4-core']">
(ancestor::chapter[@id='x-window-system'] and
preceding-sibling::sect1[@id != 'xorg7'])">
<xsl:text> <xsl:text>
</xsl:text> </xsl:text>
<xsl:choose>
<xsl:when test="contains(preceding-sibling::sect1[1]/@id,
'xorg7-') and
not(contains(preceding-sibling::sect1[1]/@id,
'driver'))">
<xsl:call-template name="expand-deps">
<xsl:with-param name="section">
<xsl:value-of select="preceding-sibling::sect1[1]/@id"/>
</xsl:with-param>
<xsl:with-param name="status" select="'required'"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:element name="dependency"> <xsl:element name="dependency">
<xsl:attribute name="status">required</xsl:attribute> <xsl:attribute name="status">required</xsl:attribute>
<xsl:attribute name="name"> <xsl:attribute name="name">
<xsl:choose> <xsl:value-of select="preceding-sibling::sect1[1]/@id"/>
<xsl:when test="@id='printproto'">xorg-server</xsl:when>
<xsl:otherwise>
<xsl:value-of
select="preceding-sibling::sect1[1]/@id"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute> </xsl:attribute>
<xsl:attribute name="type">ref</xsl:attribute> <xsl:attribute name="type">ref</xsl:attribute>
</xsl:element> </xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:if> </xsl:if>
<xsl:apply-templates select=".//para[@role='required' or <xsl:apply-templates select=".//para[@role='required' or
@role='recommended' or @role='recommended' or

View file

@ -99,33 +99,73 @@ check_prerequisites() { #
export LC_ALL export LC_ALL
# LFS/HLFS/CLFS prerequisites # LFS/HLFS/CLFS prerequisites
if [ -n "$MIN_Linux_VER" ]; then
check_version "$MIN_Linux_VER" "`uname -r`" "KERNEL" check_version "$MIN_Linux_VER" "`uname -r`" "KERNEL"
fi
if [ -n "$MIN_Bash_VER" ]; then
check_version "$MIN_Bash_VER" "$BASH_VERSION" "BASH" check_version "$MIN_Bash_VER" "$BASH_VERSION" "BASH"
fi
if [ ! -z $MIN_GCC_VER ]; then if [ ! -z $MIN_GCC_VER ]; then
check_version "$MIN_GCC_VER" "`gcc -dumpversion`" "GCC" check_version "$MIN_GCC_VER" "`gcc -dumpversion`" "GCC"
check_version "$MIN_GCC_VER" "`g++ -dumpversion`" "G++" check_version "$MIN_GCC_VER" "`g++ -dumpversion`" "G++"
elif [ ! -z $MIN_Gcc_VER ]; then elif [ ! -z $MIN_Gcc_VER ]; then
check_version "$MIN_Gcc_VER" "`gcc -dumpversion`" "GCC" check_version "$MIN_Gcc_VER" "`gcc -dumpversion`" "GCC"
fi fi
if [ -n "$MIN_Glibc_VER" ]; then
check_version "$MIN_Glibc_VER" "$(ldd --version | head -n1 | awk '{print $NF}')" "GLIBC" check_version "$MIN_Glibc_VER" "$(ldd --version | head -n1 | awk '{print $NF}')" "GLIBC"
fi
if [ -n "$MIN_Binutils_VER" ]; then
check_version "$MIN_Binutils_VER" "$(ld --version | head -n1 | awk '{print $NF}')" "BINUTILS" check_version "$MIN_Binutils_VER" "$(ld --version | head -n1 | awk '{print $NF}')" "BINUTILS"
fi
if [ -n "$MIN_Tar_VER" ]; then
check_version "$MIN_Tar_VER" "$(tar --version | head -n1 | cut -d" " -f4)" "TAR" check_version "$MIN_Tar_VER" "$(tar --version | head -n1 | cut -d" " -f4)" "TAR"
fi
if [ -n "$MIN_Bzip2_VER" ]; then
bzip2Ver="$(bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d" " -f8)" bzip2Ver="$(bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d" " -f8)"
check_version "$MIN_Bzip2_VER" "${bzip2Ver%%,*}" "BZIP2" check_version "$MIN_Bzip2_VER" "${bzip2Ver%%,*}" "BZIP2"
fi
if [ -n "$MIN_Bison_VER" ]; then
check_version "$MIN_Bison_VER" "$(bison --version | head -n1 | cut -d" " -f4)" "BISON" check_version "$MIN_Bison_VER" "$(bison --version | head -n1 | cut -d" " -f4)" "BISON"
check_version "$MIN_Coreutils_VER" "$(chown --version | head -n1 | cut -d")" -f2)" "COREUTILS" fi
if [ -n "$MIN_Coreutils_VER" ]; then
check_version "$MIN_Coreutils_VER" "$(chown --version | head -n1 | cut -d" " -f4)" "COREUTILS"
fi
if [ -n "$MIN_Diffutils_VER" ]; then
check_version "$MIN_Diffutils_VER" "$(diff --version | head -n1 | cut -d" " -f4)" "DIFF" check_version "$MIN_Diffutils_VER" "$(diff --version | head -n1 | cut -d" " -f4)" "DIFF"
fi
if [ -n "$MIN_Findutils_VER" ]; then
check_version "$MIN_Findutils_VER" "$(find --version | head -n1 | cut -d" " -f4)" "FIND" check_version "$MIN_Findutils_VER" "$(find --version | head -n1 | cut -d" " -f4)" "FIND"
fi
if [ -n "$MIN_Gawk_VER" ]; then
check_version "$MIN_Gawk_VER" "$(gawk --version | head -n1 | awk -F'[ ,]+' '{print $3}')" "GAWK" check_version "$MIN_Gawk_VER" "$(gawk --version | head -n1 | awk -F'[ ,]+' '{print $3}')" "GAWK"
fi
if [ -n "$MIN_Grep_VER" ]; then
check_version "$MIN_Grep_VER" "$(grep --version | head -n1 | awk '{print $NF}')" "GREP" check_version "$MIN_Grep_VER" "$(grep --version | head -n1 | awk '{print $NF}')" "GREP"
fi
if [ -n "$MIN_Gzip_VER" ]; then
check_version "$MIN_Gzip_VER" "$(gzip --version 2>&1 | head -n1 | cut -d" " -f2)" "GZIP" check_version "$MIN_Gzip_VER" "$(gzip --version 2>&1 | head -n1 | cut -d" " -f2)" "GZIP"
fi
if [ -n "$MIN_M4_VER" ]; then
check_version "$MIN_M4_VER" "$(m4 --version 2>&1 | head -n1 | awk '{print $NF}')" "M4" check_version "$MIN_M4_VER" "$(m4 --version 2>&1 | head -n1 | awk '{print $NF}')" "M4"
fi
if [ -n "$MIN_Make_VER" ]; then
check_version "$MIN_Make_VER" "$(make --version | head -n1 | cut -d " " -f3 | cut -c1-4)" "MAKE" check_version "$MIN_Make_VER" "$(make --version | head -n1 | cut -d " " -f3 | cut -c1-4)" "MAKE"
fi
if [ -n "$MIN_Patch_VER" ]; then
check_version "$MIN_Patch_VER" "$(patch --version | head -n1 | sed 's/.*patch //')" "PATCH" check_version "$MIN_Patch_VER" "$(patch --version | head -n1 | sed 's/.*patch //')" "PATCH"
fi
if [ -n "$MIN_Perl_VER" ]; then
check_version "$MIN_Perl_VER" "$(perl -V:version | cut -f2 -d\')" "PERL" check_version "$MIN_Perl_VER" "$(perl -V:version | cut -f2 -d\')" "PERL"
fi
if [ -n "$MIN_Sed_VER" ]; then
check_version "$MIN_Sed_VER" "$(sed --version | head -n1 | cut -d" " -f4)" "SED" check_version "$MIN_Sed_VER" "$(sed --version | head -n1 | cut -d" " -f4)" "SED"
fi
if [ -n "$MIN_Texinfo_VER" ]; then
check_version "$MIN_Texinfo_VER" "$(makeinfo --version | head -n1 | awk '{ print$NF }')" "TEXINFO" check_version "$MIN_Texinfo_VER" "$(makeinfo --version | head -n1 | awk '{ print$NF }')" "TEXINFO"
fi
if [ -n "$MIN_Xz_VER" ]; then
check_version "$MIN_Xz_VER" "$(xz --version | head -n1 | cut -d" " -f4)" "XZ" check_version "$MIN_Xz_VER" "$(xz --version | head -n1 | cut -d" " -f4)" "XZ"
fi
} }
#----------------------------# #----------------------------#

View file

@ -63,11 +63,12 @@ if [ "$DEP_TIDY" = y ]; then
else else
LINE_TIDY='#CONFIG_html-tidy is not set' LINE_TIDY='#CONFIG_html-tidy is not set'
fi fi
if [ "$DEP_DBXML" = y ]; then # DocBook is a rec dep of libxslt
LINE_DBXML='CONFIG_DocBook=y' # if [ "$DEP_DBXML" = y ]; then
else # LINE_DBXML='CONFIG_DocBook=y'
LINE_DBXML='#CONFIG_DocBook is not set' # else
fi # LINE_DBXML='#CONFIG_DocBook is not set'
# fi
if [ "$DEP_LYNX" = y ]; then if [ "$DEP_LYNX" = y ]; then
LINE_LYNX='CONFIG_lynx=y' LINE_LYNX='CONFIG_lynx=y'
else else
@ -109,7 +110,6 @@ $LINE_PYTHON
$LINE_LIBXML $LINE_LIBXML
$LINE_LIBXSLT $LINE_LIBXSLT
$LINE_TIDY $LINE_TIDY
$LINE_DBXML
$LINE_OPENSSL $LINE_OPENSSL
$LINE_WGET $LINE_WGET
$LINE_SVN $LINE_SVN
@ -146,8 +146,26 @@ popd
rm -v $BUILDDIR$BLFS_ROOT/download_script rm -v $BUILDDIR$BLFS_ROOT/download_script
# Suppresses unneeded parts of the scriptlets # Suppresses unneeded parts of the scriptlets
if [ "$DEP_LIBXSLT" = y ]; then
# libxslt pulls docbook-xsl in, which populates the catalog with annoying
# **EDITME** references. Fortunately, those lines are regognizable because
# they occur between lines containing '/etc/xml/catalog' at the end of the
# line (without '&&'). I have not found a simple way to delete lines
# between 2 addresses, excluding either the first or the last one. So use
# a loop for accumulating lines and deleting at the end.
# Sorry for sed synthax.
sed -i '\@^[[:space:]]*/etc/xml/catalog$@{
n
:a
\@/etc/xml/catalog$@bb
N
ba
:b
d}' \
$BUILDDIR$BLFS_ROOT/scripts/*docbook-xsl
fi
if [ "$DEP_SUDO" = y ]; then if [ "$DEP_SUDO" = y ]; then
sed -i '/pam.d/i mkdir -p /etc/pam.d' $BUILDDIR$BLFS_ROOT/scripts/*sudo sed -i '/cat.*pam.d/i mkdir -p /etc/pam.d' $BUILDDIR$BLFS_ROOT/scripts/*sudo
fi fi
if [ "$DEP_SVN" = y ]; then if [ "$DEP_SVN" = y ]; then
sed -i -e /javahl/d -e /swig/d $BUILDDIR$BLFS_ROOT/scripts/*subversion sed -i -e /javahl/d -e /swig/d $BUILDDIR$BLFS_ROOT/scripts/*subversion
@ -163,6 +181,9 @@ fi
mkdir -p $BUILDDIR$BLFS_ROOT/work mkdir -p $BUILDDIR$BLFS_ROOT/work
pushd $BUILDDIR$BLFS_ROOT/work pushd $BUILDDIR$BLFS_ROOT/work
../gen-makefile.sh ../gen-makefile.sh
# The generated Makefile updates the tracking file after each package
# installation, using libxslt, which is not installed yet. So move
# updating to the end of the process, adding an 'update' target
sed -i -e '/xsltproc/,+6d' \ sed -i -e '/xsltproc/,+6d' \
-e '/^all/s@$@ update@' \ -e '/^all/s@$@ update@' \
-e 's/touch/@touch/' Makefile -e 's/touch/@touch/' Makefile

View file

@ -2,6 +2,25 @@
# $Id$ # $Id$
set -e set -e
: << inline_doc
Installs a set-up to build BLFS packages.
You can set these variables:
TRACKING_DIR : where the installed package file is kept.
(default /var/lib/jhalfs/BLFS)
BLFS_ROOT : where the installed tools will be installed, relative to $HOME.
Must start with a '/' (default /blfs_root)
BLFS_BRANCH_ID: development, branch-xxx, xxx (where xxx is a valid tag)
(default development)
Examples:
1 - If you plan to use the tools to build BLFS on top of LFS, but you did not
use jhalfs, or forgot to include the jhalfs-blfs tools:
(as root) mkdir -p /var/lib/jhalfs/BLFS && chown -R user /var/lib/jhalfs
(as user) ./install-blfs-tools
2 - To install with only user privileges:
TRACKING_DIR=/home/user/blfs_root/trackdir ./install-blfs-tools
inline_doc
# VT100 colors # VT100 colors
declare -r BLACK=$'\e[1;30m' declare -r BLACK=$'\e[1;30m'
declare -r DK_GRAY=$'\e[0;30m' declare -r DK_GRAY=$'\e[0;30m'
@ -35,8 +54,8 @@ VERBOSITY=1
COMMON_DIR="common" COMMON_DIR="common"
BLFS_TOOL='y' BLFS_TOOL='y'
BUILDDIR=$(cd ~;pwd) BUILDDIR=$(cd ~;pwd)
BLFS_ROOT="/blfs_root" BLFS_ROOT="${BLFS_ROOT:=/blfs_root}"
TRACKING_DIR="/var/lib/jhalfs/BLFS" TRACKING_DIR="${TRACKING_DIR:=/var/lib/jhalfs/BLFS}"
[[ $VERBOSITY > 0 ]] && echo "${SD_BORDER}${nl_}" [[ $VERBOSITY > 0 ]] && echo "${SD_BORDER}${nl_}"
@ -58,7 +77,8 @@ esac
# Check for build prerequisites. # Check for build prerequisites.
echo echo
check_prerequisites check_alfs_tools
check_blfs_tools
echo "${SD_BORDER}${nl_}" echo "${SD_BORDER}${nl_}"
# Install the files # Install the files
@ -81,6 +101,12 @@ rm -rf ${BUILDDIR}${BLFS_ROOT}/menu/lxdialog/.svn
# Set some harcoded envars to their proper values # Set some harcoded envars to their proper values
sed -i s@tracking-dir@$TRACKING_DIR@ \ sed -i s@tracking-dir@$TRACKING_DIR@ \
${BUILDDIR}${BLFS_ROOT}/{Makefile,gen-makefile.sh} ${BUILDDIR}${BLFS_ROOT}/{Makefile,gen-makefile.sh}
# Ensures the tracking directory exists.
# Throws an error if it does not exist and the user does not
# have write permission to create it.
# If it exists, does nothing.
mkdir -p $TRACKING_DIR
[[ $VERBOSITY > 0 ]] && echo "... OK" [[ $VERBOSITY > 0 ]] && echo "... OK"
[[ $VERBOSITY > 0 ]] && echo -n "Downloading and validating the book (may take some time)" [[ $VERBOSITY > 0 ]] && echo -n "Downloading and validating the book (may take some time)"