Merge trunk r3762 to r3765
This commit is contained in:
parent
5130b3ac7d
commit
dda2496778
6 changed files with 76 additions and 74 deletions
|
@ -73,10 +73,12 @@ if [ "${CLEAN}" = "y" ]; then
|
|||
fi
|
||||
sudo rm -rf $BUILDDIR/{bin,boot,dev,etc,home,lib{,64},media,mnt,run}
|
||||
sudo rm -rf $BUILDDIR/{opt,root,sbin,srv,tmp,tools,cross-tools,usr,var}
|
||||
if [[ "${BLFS_TOOL}" = "y" ]] ; then
|
||||
sudo rm -rf $BUILDDIR/$BLFS_ROOT
|
||||
fi
|
||||
echo "done"
|
||||
if [[ "${BLFS_TOOL}" = "y" ]] ; then
|
||||
echo -n "Cleaning $BUILDDIR/$BLFS_ROOT ..."
|
||||
sudo rm -rf $BUILDDIR/$BLFS_ROOT
|
||||
echo "done"
|
||||
fi
|
||||
echo -n "Cleaning $JHALFSDIR ..."
|
||||
sudo rm -rf $JHALFSDIR
|
||||
echo "done"
|
||||
|
|
|
@ -34,11 +34,11 @@ inline_doc
|
|||
local IFS
|
||||
|
||||
write_error_and_die() {
|
||||
echo -e "\n\t\t$TXT version -->${tst_version}<-- is too old.
|
||||
echo -e "\n\t\t$TXT is missing or version -->${tst_version}<-- is too old.
|
||||
This script requires ${ref_version} or greater\n"
|
||||
# Ask the user instead of bomb, to make happy that packages which version
|
||||
# ouput don't follow our expectations
|
||||
echo "If you are sure that you have instaled a proper version of ${BOLD}$TXT${OFF}"
|
||||
echo "If you are sure that you have installed a proper version of ${BOLD}$TXT${OFF}"
|
||||
echo "but jhalfs has failed to detect it, press 'c' and 'ENTER' keys to continue,"
|
||||
echo -n "otherwise press 'ENTER' key to stop jhalfs. "
|
||||
read ANSWER
|
||||
|
@ -88,11 +88,10 @@ inline_doc
|
|||
check_prerequisites() { #
|
||||
#----------------------------#
|
||||
|
||||
# Maybe we should check xsltproc first?
|
||||
case $PROGNAME in
|
||||
clfs | clfs2 | clfs3) HOSTREQS="BOOK/prologue/common/hostreqs.xml" ;;
|
||||
*) HOSTREQS="prologue/hostreqs.xml" ;;
|
||||
esac
|
||||
case $PROGNAME in
|
||||
clfs | clfs2 | clfs3) HOSTREQS="BOOK/prologue/common/hostreqs.xml" ;;
|
||||
*) HOSTREQS="prologue/hostreqs.xml" ;;
|
||||
esac
|
||||
|
||||
eval $(xsltproc $COMMON_DIR/hostreqs.xsl $BOOK/$HOSTREQS)
|
||||
# Avoid translation of version strings
|
||||
|
@ -127,18 +126,30 @@ check_prerequisites() { #
|
|||
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_alfs_tools() { #
|
||||
#----------------------------#
|
||||
: << inline_doc
|
||||
Those tools are needed for the proper operation of jhalfs
|
||||
inline_doc
|
||||
|
||||
# Avoid translation of version strings
|
||||
local LC_ALL=C
|
||||
export LC_ALL
|
||||
|
||||
# Check for minimum sudo version
|
||||
if [ -z $MIN_Sudo_VER ]; then MIN_Sudo_VER=1.7.0; fi
|
||||
SUDO_LOC="$(whereis -b sudo | cut -d" " -f2)"
|
||||
if [ -x $SUDO_LOC ]; then
|
||||
sudoVer="$(sudo -V | head -n1 | cut -d" " -f3)"
|
||||
check_version "$MIN_Sudo_VER" "${sudoVer}" "SUDO"
|
||||
check_version "1.7.0" "${sudoVer}" "SUDO"
|
||||
else
|
||||
echo "${nl_}\"${RED}sudo${OFF}\" ${BOLD}must be installed on your system for jhalfs to run"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check for minimum wget version
|
||||
# Check for wget presence (using a dummy version)
|
||||
WGET_LOC="$(whereis -b wget | cut -d" " -f2)"
|
||||
if [ -x $WGET_LOC ]; then
|
||||
wgetVer="$(wget --version | head -n1 | cut -d" " -f3)"
|
||||
|
@ -148,47 +159,53 @@ check_prerequisites() { #
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Before checking libmxl2 and libxslt version information, ensure tools needed from those
|
||||
# packages are actually available. Avoids a small cosmetic bug of book version information
|
||||
# not being retrieved if xmllint is unavailable, especially when on recent non-LFS hosts.
|
||||
# Before checking libxml2 and libxslt version information, ensure tools
|
||||
# needed from those packages are actually available. Avoids a small
|
||||
# cosmetic bug of book version information not being retrieved if
|
||||
# xmllint is unavailable, especially when on recent non-LFS hosts.
|
||||
|
||||
XMLLINT_LOC="$(whereis -b xmllint | cut -d" " -f2)"
|
||||
XSLTPROC_LOC="$(whereis -b xsltproc | cut -d" " -f2)"
|
||||
XML_NOTE_MSG="${nl_} ${BOLD} This can happen when running jhalfs on non-LFS hosts. ${OFF}"
|
||||
|
||||
if [ ! -x $XMLLINT_LOC ]; then
|
||||
echo "${nl_}\"${RED}xmllint${OFF}\" ${BOLD}must be installed on your system for jhalfs to run"
|
||||
echo ${XML_NOTE_MSG}
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -x $XSLTPROC_LOC ]; then
|
||||
|
||||
# Check for minimum libxml2 and libxslt versions
|
||||
xsltprocVer=$(xsltproc -V | head -n1 )
|
||||
libxmlVer=$(echo $xsltprocVer | cut -d " " -f3)
|
||||
libxsltVer=$(echo $xsltprocVer | cut -d " " -f5)
|
||||
# Check for minimum libxml2 and libxslt versions
|
||||
xsltprocVer=$(xsltproc -V | head -n1 )
|
||||
libxmlVer=$(echo $xsltprocVer | cut -d " " -f3)
|
||||
libxsltVer=$(echo $xsltprocVer | cut -d " " -f5)
|
||||
|
||||
# Version numbers are packed strings not xx.yy.zz format.
|
||||
check_version "2.06.20" "${libxmlVer:0:1}.${libxmlVer:1:2}.${libxmlVer:3:2}" "LIBXML2"
|
||||
check_version "1.01.14" "${libxsltVer:0:1}.${libxsltVer:1:2}.${libxsltVer:3:2}" "LIBXSLT"
|
||||
# Version numbers are packed strings not xx.yy.zz format.
|
||||
check_version "2.06.20" "${libxmlVer:0:1}.${libxmlVer:1:2}.${libxmlVer:3:2}" "LIBXML2"
|
||||
check_version "1.01.14" "${libxsltVer:0:1}.${libxsltVer:1:2}.${libxsltVer:3:2}" "LIBXSLT"
|
||||
|
||||
else
|
||||
echo "${nl_}\"${RED}xsltproc${OFF}\" ${BOLD}must be installed on your system for jhalfs to run"
|
||||
echo ${XML_NOTE_MSG}
|
||||
exit 1
|
||||
fi
|
||||
# The next versions checks are required only when BLFS_TOOL is set and
|
||||
# this dependencies has not be selected for installation
|
||||
if [[ "$BLFS_TOOL" = "y" ]] ; then
|
||||
}
|
||||
|
||||
if [[ -z "$DEP_TIDY" ]] ; then
|
||||
tidyVer=$(tidy -V | cut -d " " -f9)
|
||||
check_version "2004" "${tidyVer}" "TIDY"
|
||||
fi
|
||||
#----------------------------#
|
||||
check_blfs_tools() { #
|
||||
#----------------------------#
|
||||
: << inline_doc
|
||||
In addition to the tools needed for the LFS part, tidy and docbook-xml
|
||||
are needed for installing the BLFS tools
|
||||
inline_doc
|
||||
|
||||
# Check if the proper DocBook-XML-DTD and DocBook-XSL are correctly installed
|
||||
XML_FILE="<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||
# Avoid translation of version strings
|
||||
local LC_ALL=C
|
||||
export LC_ALL
|
||||
|
||||
tidyVer=$(tidy -V | cut -d " " -f9)
|
||||
check_version "2004" "${tidyVer}" "TIDY"
|
||||
|
||||
# Minimal docbook-xml code for testing
|
||||
XML_FILE="<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||
<?xml-stylesheet type='text/xsl' href='http://docbook.sourceforge.net/release/xsl/1.69.1/xhtml/docbook.xsl'?>
|
||||
<!DOCTYPE article PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN'
|
||||
'http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd'>
|
||||
|
@ -200,24 +217,10 @@ XML_FILE="<?xml version='1.0' encoding='ISO-8859-1'?>
|
|||
</sect1>
|
||||
</article>"
|
||||
|
||||
if [[ -z "$DEP_DBXML" ]] ; then
|
||||
if `echo $XML_FILE | xmllint -noout -postvalid - 2>/dev/null` ; then
|
||||
check_version "4.5" "4.5" "DocBook XML DTD"
|
||||
else
|
||||
echo "Warning: not found a working DocBook XML DTD 4.5 installation"
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
|
||||
# if [[ -z "$DEP_DBXSL" ]] ; then
|
||||
# if `echo $XML_FILE | xsltproc --noout - 2>/dev/null` ; then
|
||||
# check_version "1.69.1" "1.69.1" "DocBook XSL"
|
||||
# else
|
||||
# echo "Warning: not found a working DocBook XSL 1.69.1 installation"
|
||||
# exit 2
|
||||
# fi
|
||||
# fi
|
||||
|
||||
fi # end BLFS_TOOL=Y
|
||||
|
||||
if `echo $XML_FILE | xmllint -nonet -noout -postvalid - 2>/dev/null` ; then
|
||||
check_version "4.5" "4.5" "DocBook XML DTD"
|
||||
else
|
||||
echo "Error: you need docbook for installing BLFS tools"
|
||||
exit 2
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -28,9 +28,13 @@ sed -i s@trunk/BOOK@$BLFS_TREE@ \
|
|||
|
||||
# If we have a working copy, copy it:
|
||||
if [[ "$BLFS_WORKING_COPY" = "y" ]]; then
|
||||
echo "copying the local BLFS working copy (may take some time)"
|
||||
# -r: recursive; -u: only if newer; -T: otherwise, would copy to a subdirectory
|
||||
# of blfs-xml, if blfs-xml already exists
|
||||
cp -ruT $BLFS_WC_LOCATION ${BUILDDIR}${BLFS_ROOT}/blfs-xml
|
||||
# of blfs-xml, if blfs-xml already exists; --preserve=timestamps: if the local
|
||||
# book has already been validated, tmp is posterior to the others, and
|
||||
# validation will not be done again.
|
||||
cp -ruT --preserve=timestamps $BLFS_WC_LOCATION \
|
||||
${BUILDDIR}${BLFS_ROOT}/blfs-xml
|
||||
fi
|
||||
# Downloads the book if necessary, initialize the tracking file and the
|
||||
# package database.
|
||||
|
@ -138,28 +142,15 @@ pushd $BUILDDIR/sources
|
|||
# Remove `unpacked' files if some have been left
|
||||
sudo find . -name unpacked -exec rm \{\} \;
|
||||
FTP_SERVER=$SERVER/pub/blfs/ SRC_ARCHIVE=$SRC_ARCHIVE $BUILDDIR$BLFS_ROOT/download_script
|
||||
# The blfs-bootscripts package is at the wrong location
|
||||
mkdir -p blfs-bootscripts
|
||||
cp blfs-bootscripts*tar* blfs-bootscripts
|
||||
popd
|
||||
rm -v $BUILDDIR$BLFS_ROOT/download_script
|
||||
|
||||
# Suppresses unneeded parts of the scriptlets
|
||||
if [ "$DEP_WGET" = y ] && ! [ "$DEP_OPENSSL" = y ]; then
|
||||
sed -i s'/-ssl=.*/out-ssl/' $BUILDDIR$BLFS_ROOT/scripts/*wget
|
||||
fi
|
||||
if [ "$DEP_SUDO" = y ]; then
|
||||
sed -i '/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
|
||||
sed -i -e '/pushd/,/popd/d' -e /tea/d $BUILDDIR$BLFS_ROOT/scripts/*sqlite
|
||||
fi
|
||||
if [ "$DEP_PYTHON" = y ]; then
|
||||
sed -i -e '/^make.*Doc/d' -e '/^chmod/{n;N;d}' $BUILDDIR$BLFS_ROOT/scripts/*python2
|
||||
fi
|
||||
if [ "$DEP_OPENSSL" = y ]; then
|
||||
sed -i 's/^make$/make -j1/' $BUILDDIR$BLFS_ROOT/scripts/*openssl
|
||||
fi
|
||||
if [ "$DEP_LYNX" = y ]; then
|
||||
if [ "$DEP_OPENSSL" = y -o "$DEP_WGET" = y ]; then
|
||||
|
|
11
jhalfs
11
jhalfs
|
@ -245,11 +245,19 @@ source $COMMON_DIR/libs/func_custom_pkgs
|
|||
[[ $VERBOSITY > 0 ]] && echo "OK"
|
||||
|
||||
|
||||
[[ $VERBOSITY > 0 ]] && echo "${SD_BORDER}${nl_}"
|
||||
|
||||
[[ $VERBOSITY > 0 ]] && echo Checking tools required for jhalfs
|
||||
check_alfs_tools
|
||||
|
||||
[[ $VERBOSITY > 0 ]] && echo "${SD_BORDER}${nl_}"
|
||||
|
||||
# blfs-tool envars
|
||||
BLFS_TOOL=${BLFS_TOOL:-n}
|
||||
if [[ "${BLFS_TOOL}" = "y" ]] ; then
|
||||
[[ $VERBOSITY > 0 ]] && echo Checking supplementary tools for installing BLFS
|
||||
check_blfs_tools
|
||||
[[ $VERBOSITY > 0 ]] && echo "${SD_BORDER}${nl_}"
|
||||
BLFS_SVN=${BLFS_SVN:-n}
|
||||
BLFS_WORKING_COPY=${BLFS_WORKING_COPY:-n}
|
||||
BLFS_BRANCH=${BLFS_BRANCH:-n}
|
||||
|
@ -400,8 +408,7 @@ if [[ "$REBUILD_MAKEFILE" = "n" ]] ; then
|
|||
#
|
||||
# Install blfs-tool, if requested.
|
||||
if [[ "${BLFS_TOOL}" = "y" ]] ; then
|
||||
echo Downloading and validating the BLFS book
|
||||
echo '(may take some time...)'
|
||||
echo Installing BLFS book and tools
|
||||
install_blfs_tools 2>&1 | tee -a $LOGDIR/$LOG
|
||||
[[ ${PIPESTATUS[0]} != 0 ]] && exit 1
|
||||
fi
|
||||
|
|
|
@ -22,7 +22,7 @@ BLACK_LIST="$BLACK_LIST libee"
|
|||
#
|
||||
# Not set here combined modes of form defOpt_myMode.
|
||||
# Combined modes of form modeA_modeB can be set here.
|
||||
DEF_OPT_MODE=O2pipe
|
||||
DEF_OPT_MODE=noOpt
|
||||
|
||||
|
||||
#--- Active optimization variables
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
gcc noOpt
|
||||
grub noOpt
|
||||
zlib defOpt_fPIC
|
||||
|
|
Reference in a new issue