diff --git a/BLFS/xsl/dependencies.xsl b/BLFS/xsl/dependencies.xsl index b2542a7..7e2619f 100644 --- a/BLFS/xsl/dependencies.xsl +++ b/BLFS/xsl/dependencies.xsl @@ -42,6 +42,7 @@ + xinit xinit diff --git a/BLFS/xsl/gen_pkg_list.xsl b/BLFS/xsl/gen_pkg_list.xsl index 8b529b2..6126db4 100644 --- a/BLFS/xsl/gen_pkg_list.xsl +++ b/BLFS/xsl/gen_pkg_list.xsl @@ -200,41 +200,18 @@ - - + + - - - - - - - - - - - - required - - - xorg-server - - - - - - ref - - - + + required + + + + ref + &1 | head -n1 | cut -d" " -f2)" "GZIP" - check_version "$MIN_M4_VER" "$(m4 --version 2>&1 | head -n1 | awk '{print $NF}')" "M4" - check_version "$MIN_Make_VER" "$(make --version | head -n1 | cut -d " " -f3 | cut -c1-4)" "MAKE" - check_version "$MIN_Patch_VER" "$(patch --version | head -n1 | sed 's/.*patch //')" "PATCH" - check_version "$MIN_Perl_VER" "$(perl -V:version | cut -f2 -d\')" "PERL" - check_version "$MIN_Sed_VER" "$(sed --version | head -n1 | cut -d" " -f4)" "SED" - check_version "$MIN_Texinfo_VER" "$(makeinfo --version | head -n1 | awk '{ print$NF }')" "TEXINFO" - check_version "$MIN_Xz_VER" "$(xz --version | head -n1 | cut -d" " -f4)" "XZ" + 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" + 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" + fi + if [ -n "$MIN_Findutils_VER" ]; then + 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" + fi + if [ -n "$MIN_Grep_VER" ]; then + 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" + fi + if [ -n "$MIN_M4_VER" ]; then + 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" + fi + if [ -n "$MIN_Patch_VER" ]; then + 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" + fi + if [ -n "$MIN_Sed_VER" ]; then + 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" + fi + if [ -n "$MIN_Xz_VER" ]; then + check_version "$MIN_Xz_VER" "$(xz --version | head -n1 | cut -d" " -f4)" "XZ" + fi } #----------------------------# diff --git a/common/libs/func_install_blfs b/common/libs/func_install_blfs index 66a4174..5f094d9 100644 --- a/common/libs/func_install_blfs +++ b/common/libs/func_install_blfs @@ -63,11 +63,12 @@ if [ "$DEP_TIDY" = y ]; then else LINE_TIDY='#CONFIG_html-tidy is not set' fi -if [ "$DEP_DBXML" = y ]; then - LINE_DBXML='CONFIG_DocBook=y' -else - LINE_DBXML='#CONFIG_DocBook is not set' -fi +# DocBook is a rec dep of libxslt +# if [ "$DEP_DBXML" = y ]; then +# LINE_DBXML='CONFIG_DocBook=y' +# else +# LINE_DBXML='#CONFIG_DocBook is not set' +# fi if [ "$DEP_LYNX" = y ]; then LINE_LYNX='CONFIG_lynx=y' else @@ -109,7 +110,6 @@ $LINE_PYTHON $LINE_LIBXML $LINE_LIBXSLT $LINE_TIDY -$LINE_DBXML $LINE_OPENSSL $LINE_WGET $LINE_SVN @@ -146,8 +146,26 @@ popd rm -v $BUILDDIR$BLFS_ROOT/download_script # 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 - 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 if [ "$DEP_SVN" = y ]; then sed -i -e /javahl/d -e /swig/d $BUILDDIR$BLFS_ROOT/scripts/*subversion @@ -163,6 +181,9 @@ fi mkdir -p $BUILDDIR$BLFS_ROOT/work pushd $BUILDDIR$BLFS_ROOT/work ../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' \ -e '/^all/s@$@ update@' \ -e 's/touch/@touch/' Makefile diff --git a/install-blfs-tools.sh b/install-blfs-tools.sh index 44ee05f..9d729c9 100755 --- a/install-blfs-tools.sh +++ b/install-blfs-tools.sh @@ -2,6 +2,25 @@ # $Id$ 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 declare -r BLACK=$'\e[1;30m' declare -r DK_GRAY=$'\e[0;30m' @@ -35,8 +54,8 @@ VERBOSITY=1 COMMON_DIR="common" BLFS_TOOL='y' BUILDDIR=$(cd ~;pwd) -BLFS_ROOT="/blfs_root" -TRACKING_DIR="/var/lib/jhalfs/BLFS" +BLFS_ROOT="${BLFS_ROOT:=/blfs_root}" +TRACKING_DIR="${TRACKING_DIR:=/var/lib/jhalfs/BLFS}" [[ $VERBOSITY > 0 ]] && echo "${SD_BORDER}${nl_}" @@ -58,7 +77,8 @@ esac # Check for build prerequisites. echo - check_prerequisites + check_alfs_tools + check_blfs_tools echo "${SD_BORDER}${nl_}" # Install the files @@ -81,6 +101,12 @@ rm -rf ${BUILDDIR}${BLFS_ROOT}/menu/lxdialog/.svn # Set some harcoded envars to their proper values sed -i s@tracking-dir@$TRACKING_DIR@ \ ${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 -n "Downloading and validating the book (may take some time)"