Remove legacy: remove everything about HLFS

This commit is contained in:
Pierre Labastie 2022-02-28 13:30:53 +01:00
parent 3faf067c44
commit 978286a4b9
14 changed files with 5 additions and 1107 deletions

View file

@ -662,7 +662,6 @@ depends on !BOOK_BLFS
string string
default "lfs" if BOOK_LFS || BOOK_LFS_SYSD default "lfs" if BOOK_LFS || BOOK_LFS_SYSD
default "clfs" if BOOK_CLFS || BOOK_CLFS2 || BOOK_CLFS3 default "clfs" if BOOK_CLFS || BOOK_CLFS2 || BOOK_CLFS3
default "hlfs" if BOOK_HLFS
config LGROUP config LGROUP
string string
@ -776,9 +775,6 @@ depends on !BOOK_BLFS
# be generated. Those which are not wanted will be commented # be generated. Those which are not wanted will be commented
# out. If you select 'n' here, the commented test instructions # out. If you select 'n' here, the commented test instructions
# do not stop on test suite failures. # do not stop on test suite failures.
#
# HLFS and CLFS have no testsuites available in the
# temporary tools phase
menu "Test settings" menu "Test settings"
depends on CONFIG_TESTS depends on CONFIG_TESTS

View file

@ -240,30 +240,6 @@ clean_builddir():
From common/common-functions. From common/common-functions.
Description: Description:
-------------------------------------------------------------------------- --------------------------------------------------------------------------
process_toolchain():
From HLFS/master.sh.
Description: embryo,cocoon and butterfly need special handling
--------------------------------------------------------------------------
chapter3_Makefiles():
From HLFS/master.sh.
Description: Initialization of the system
--------------------------------------------------------------------------
chapter5_Makefiles():
From HLFS/master.sh.
Description: Bootstrap or temptools phase
--------------------------------------------------------------------------
chapter6_Makefiles():
From HLFS/master.sh.
Description: sysroot or chroot build phase
--------------------------------------------------------------------------
chapter7_Makefiles():
From HLFS/master.sh.
Description: Create a bootable system.. kernel, bootscripts..etc
--------------------------------------------------------------------------
build_Makefile():
From HLFS/master.sh.
Description: Construct a Makefile from the book scripts
--------------------------------------------------------------------------
simple_error(): simple_error():
From jhalfs. From jhalfs.
Description: Basic error trap.... JUST DIE Description: Basic error trap.... JUST DIE

View file

@ -1,330 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY % general-entities SYSTEM "FAKEDIR/general.ent">
%general-entities;
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
extension-element-prefixes="exsl"
version="1.0">
<!-- XSLT stylesheet to create shell scripts from HLFS books. -->
<!-- What libc implentation must be used? -->
<xsl:param name="model" select="glibc"/>
<!-- What kernel serie must be used? -->
<xsl:param name="kernel" select="2.6"/>
<!-- Is the host kernel using grsecurity? -->
<xsl:param name="grsecurity_host" select="n"/>
<!-- Run test suites?
0 = none
1 = only chapter06 Glibc, GCC and Binutils testsuites
2 = all chapter06 testsuites
3 = alias to 2
-->
<xsl:param name="testsuite" select="1"/>
<!-- Bomb on test suites failures?
n = no, I want to build the full system and review the logs
y = yes, bomb at the first test suite failure to can review the build dir
-->
<xsl:param name="bomb-testsuite" select="n"/>
<!-- Additional features -->
<xsl:param name="features">,ssp,aslr,pax,hardened_tmp,warnings,misc,blowfish,</xsl:param>
<!-- Time zone -->
<xsl:param name="timezone" select="GMT"/>
<!-- Page size -->
<xsl:param name="page" select="letter"/>
<!-- Locale settings -->
<xsl:param name="lang" select="C"/>
<xsl:template match="/">
<xsl:apply-templates select="//sect1"/>
</xsl:template>
<xsl:template match="sect1">
<xsl:if test="(../@id='chapter-temporary-tools' or
../@id='chapter-building-system' or
../@id='chapter-bootable') and
(count(descendant::screen/userinput) &gt; 0 and
count(descendant::screen/userinput) &gt;
count(descendant::screen[@role='nodump'])) and
((@condition=$model or not(@condition)) and
(@vendor=$kernel or not(@vendor)))">
<!-- The dirs names -->
<xsl:variable name="pi-dir" select="../processing-instruction('dbhtml')"/>
<xsl:variable name="pi-dir-value" select="substring-after($pi-dir,'dir=')"/>
<xsl:variable name="quote-dir" select="substring($pi-dir-value,1,1)"/>
<xsl:variable name="dirname" select="substring-before(substring($pi-dir-value,2),$quote-dir)"/>
<!-- The file names -->
<xsl:variable name="pi-file" select="processing-instruction('dbhtml')"/>
<xsl:variable name="pi-file-value" select="substring-after($pi-file,'filename=')"/>
<xsl:variable name="filename" select="substring-before(substring($pi-file-value,2),'.html')"/>
<!-- The build order -->
<xsl:variable name="position" select="position()"/>
<xsl:variable name="order">
<xsl:choose>
<xsl:when test="string-length($position) = 1">
<xsl:text>00</xsl:text>
<xsl:value-of select="$position"/>
</xsl:when>
<xsl:when test="string-length($position) = 2">
<xsl:text>0</xsl:text>
<xsl:value-of select="$position"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$position"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Creating dirs and files -->
<exsl:document href="{$dirname}/{$order}-{$filename}" method="text">
<xsl:choose>
<xsl:when test="@id='ch-system-creatingdirs' or
@id='ch-system-createfiles' or
@id='ch-system-changingowner' or
@id='ch-system-strippingagain' or
@id='ch-system-stripping'">
<xsl:text>#!/tools/bin/bash&#xA;set +h&#xA;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>#!/bin/bash&#xA;set +h&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="not(@id='ch-tools-stripping') and
not(@id='ch-system-strippingagain') and
not(@id='ch-system-stripping')">
<xsl:text>set -e&#xA;</xsl:text>
</xsl:if>
<xsl:text>&#xA;</xsl:text>
<xsl:if test="(sect2[@role='installation'])">
<xsl:text>cd $PKGDIR&#xA;</xsl:text>
<xsl:if test="@id='ch-system-uclibc'">
<xsl:text>pushd ../; tar -xvf gettext-&gettext-version;.*; popd; &#xA;</xsl:text>
</xsl:if>
<!-- SVN toolchain format, from inside ./sources dir unpack binutils and gcc -->
<xsl:if test="@id='ch-tools-embryo-toolchain' or
@id='ch-tools-cocoon-toolchain' or
@id='ch-system-butterfly-toolchain'">
<xsl:text>tar -xvf gcc-core-&gcc-version;.*; &#xA;</xsl:text>
<xsl:text>tar -xvf binutils-&binutils-version;.*; &#xA;</xsl:text>
</xsl:if>
<xsl:if test="@id='ch-tools-cocoon-toolchain' or
@id='ch-system-butterfly-toolchain'">
<xsl:text>tar -xvf gcc-g++-&gcc-version;.*; &#xA;</xsl:text>
</xsl:if>
<!-- ONLY butterfly has a testsuite -->
<xsl:if test="@id='ch-system-butterfly-toolchain' and $testsuite != '0'">
<xsl:text>tar -xvf gcc-testsuite-&gcc-version;.*; &#xA;</xsl:text>
</xsl:if>
<!-- END SVN toolchain format -->
</xsl:if>
<xsl:apply-templates select=".//para/userinput | .//screen"/>
<xsl:if test="not(@id='ch-system-chroot') and
not(@id='ch-system-revisedchroot')">
<xsl:text>echo -e "\n\nTotalseconds: $SECONDS\n"&#xA;</xsl:text>
</xsl:if>
<xsl:text>exit</xsl:text>
</exsl:document>
</xsl:if>
</xsl:template>
<xsl:template match="screen">
<xsl:if test="(@condition=$model or not(@condition)) and
(@vendor=$kernel or not(@vendor)) and
child::* = userinput and (not(@role) or
(@role and contains($features,concat(',',@role,','))))">
<xsl:apply-templates select="userinput" mode="screen"/>
</xsl:if>
</xsl:template>
<xsl:template match="para/userinput">
<xsl:if test="(contains(string(),'test') or
contains(string(),'check')) and
($testsuite = '2' or $testsuite = '3')">
<xsl:choose>
<xsl:when test="$bomb-testsuite = 'n'">
<xsl:value-of select="substring-before(string(),'make')"/>
<xsl:text>make -k</xsl:text>
<xsl:value-of select="substring-after(string(),'make')"/>
<xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
<xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
<xsl:if test="contains(string(),' -k ')">
<xsl:text> || true</xsl:text>
</xsl:if>
<xsl:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template>
<xsl:template match="userinput" mode="screen">
<xsl:choose>
<!-- grsecurity kernel in the host? -->
<xsl:when test="ancestor::sect1[@id='ch-system-kernfs'] and
contains(string(),'sysctl')
and $grsecurity_host ='n'"/>
<!-- Setting $LANG for /etc/profile -->
<xsl:when test="ancestor::sect1[@id='bootable-profile'] and
contains(string(),'export LANG=')">
<xsl:value-of select="substring-before(string(),'export LANG=')"/>
<xsl:text>export LANG=</xsl:text>
<xsl:value-of select="$lang"/>
<xsl:value-of select="substring-after(string(),'CC]')"/>
<xsl:text>&#xA;</xsl:text>
</xsl:when>
<!-- Copying the kernel config file -->
<xsl:when test="string() = 'make mrproper'">
<xsl:text>make mrproper&#xA;</xsl:text>
<xsl:text>cp -v /sources/kernel-config .config&#xA;</xsl:text>
</xsl:when>
<!-- No interactive commands are needed if the .config file is the proper one -->
<xsl:when test="string() = 'make menuconfig'"/>
<!-- For uClibc we need to set CONFIG_SITE -->
<xsl:when test="contains(string(),'CONFIG_SITE')">
<xsl:value-of select="substring-before(string(),'export')"/>
<xsl:text>echo "export</xsl:text>
<xsl:value-of select="substring-after(string(),'export')"/>
<xsl:text>" &gt;&gt; ~/.bashrc&#xA;</xsl:text>
</xsl:when>
<!-- For uClibc we need to cd to the Gettext package -->
<xsl:when test="contains(string(),'cd gettext-runtime/')">
<xsl:text>cd ../gettext-*/gettext-runtime</xsl:text>
<xsl:value-of select="substring-after(string(),'gettext-runtime')"/>
<xsl:text>&#xA;</xsl:text>
</xsl:when>
<!-- The Coreutils and Module-Init-Tools test suites are optional -->
<xsl:when test="(ancestor::sect1[@id='ch-system-coreutils'] or
ancestor::sect1[@id='ch-system-module-init-tools']) and
(contains(string(),'check') or
contains(string(),'distclean') or
contains(string(),'dummy'))">
<xsl:choose>
<xsl:when test="$testsuite = '0' or $testsuite = '1'"/>
<xsl:otherwise>
<xsl:if test="not(contains(string(),'check'))">
<xsl:apply-templates/>
<xsl:text>&#xA;</xsl:text>
</xsl:if>
<xsl:if test="contains(string(),'check')">
<xsl:choose>
<xsl:when test="$bomb-testsuite = 'n'">
<xsl:value-of select="substring-before(string(),'check')"/>
<xsl:text>-k check</xsl:text>
<xsl:value-of select="substring-after(string(),'check')"/>
<xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
<xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
<xsl:if test="contains(string(),' -k ')">
<xsl:text> || true</xsl:text>
</xsl:if>
<xsl:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<!-- Fixing butterfly toolchain test suite run -->
<xsl:when test="ancestor::sect1[@id='ch-system-butterfly-toolchain']
and string() = 'make -k check'">
<xsl:choose>
<xsl:when test="$testsuite != '0'">
<xsl:choose>
<xsl:when test="$bomb-testsuite = 'n'">
<xsl:text>make -k check &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
<xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
<xsl:if test="contains(string(),' -k ')">
<xsl:text> || true</xsl:text>
</xsl:if>
<xsl:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:when>
<!-- Fixing Glbc test suite -->
<xsl:when test="contains(string(),'rm -v configparms') and
contains(string(),'-fno-stack-protector')">
<xsl:choose>
<xsl:when test="$testsuite != '0'">
<xsl:apply-templates/>
<xsl:text>&#xA;</xsl:text>
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:when test="contains(string(),'glibc-check-log')">
<xsl:choose>
<xsl:when test="$testsuite != '0'">
<xsl:value-of select="substring-before(string(),'2&gt;&amp;1')"/>
<xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
</xsl:when>
</xsl:choose>
</xsl:when>
<!-- Fixing Cocoon sanity checks -->
<xsl:when test="contains(string(),'./strcat-overflow')">
<xsl:text>set +e&#xA;</xsl:text>
<xsl:apply-templates/>
<xsl:text>&#xA;set -e&#xA;</xsl:text>
</xsl:when>
<!-- Fixing Butterfly sanity checks -->
<xsl:when test="contains(string(),'./fortify-test')
or contains(string(),'./ssp-test')">
<xsl:text>! </xsl:text>
<xsl:apply-templates/>
<xsl:text>&#xA;</xsl:text>
</xsl:when>
<!-- Don't stop on strip run -->
<xsl:when test="contains(string(),'strip ')">
<xsl:apply-templates/>
<xsl:text> || true&#xA;</xsl:text>
</xsl:when>
<!-- The rest of commands -->
<xsl:otherwise>
<xsl:apply-templates/>
<xsl:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="literal">
<xsl:if test="(@condition=$model or not(@condition)) and
(@vendor=$kernel or not(@vendor))">
<xsl:apply-templates/>
</xsl:if>
</xsl:template>
<xsl:template match="replaceable">
<xsl:choose>
<xsl:when test="ancestor::sect1[@id='ch-system-glibc'] or
ancestor::sect1[@id='ch-system-uclibc']">
<xsl:value-of select="$timezone"/>
</xsl:when>
<xsl:when test="ancestor::sect1[@id='ch-system-groff']">
<xsl:value-of select="$page"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>**EDITME</xsl:text>
<xsl:apply-templates/>
<xsl:text>EDITME**</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>

View file

@ -1,657 +0,0 @@
#!/bin/bash
set -e # Enable error trapping
###################################
### FUNCTIONS ###
###################################
#----------------------------#
process_toolchain() { # embryo,cocoon and butterfly need special handling
#----------------------------#
local toolchain=$1
local this_file=$2
local tc_phase
local binutil_tarball
local gcc_core_tarball
local TC_MountPT
local remove_existing
tc_phase=`echo $toolchain | sed -e 's@[0-9]\{3\}-@@' -e 's@-toolchain@@' -e 's,'$N',,'`
case $tc_phase in
embryo | \
cocoon) # Vars for LUSER phase
remove_existing="remove_existing_dirs"
TC_MountPT="\$(MOUNT_PT)\$(SRC)"
;;
butterfly) # Vars for CHROOT phase
remove_existing="remove_existing_dirs2"
TC_MountPT="\$(SRC)"
;;
esac
#
# Safe method to remove existing toolchain dirs
binutil_tarball=$(get_package_tarball_name "binutils")
gcc_core_tarball=$(get_package_tarball_name "gcc-core")
(
cat << EOF
@\$(call ${remove_existing},$binutil_tarball)
@\$(call ${remove_existing},$gcc_core_tarball)
EOF
) >> $MKFILE.tmp
#
# Manually remove the toolchain directories..
(
cat << EOF
@rm -rf ${TC_MountPT}/${tc_phase}-toolchain && \\
rm -rf ${TC_MountPT}/${tc_phase}-build
EOF
) >> $MKFILE.tmp
(
cat << EOF
@echo "export PKGDIR=${TC_MountPT}" > envars
EOF
) >> $MKFILE.tmp
case ${tc_phase} in
butterfly)
[[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${toolchain}"
CHROOT_wrt_RunAsRoot "$this_file"
;;
*) LUSER_wrt_RunAsUser "$this_file"
;;
esac
#
(
cat << EOF
@\$(call ${remove_existing},$binutil_tarball)
@\$(call ${remove_existing},$gcc_core_tarball)
EOF
) >> $MKFILE.tmp
#
# Manually remove the toolchain directories..
(
cat << EOF
@rm -rf ${TC_MountPT}/${tc_phase}-toolchain && \\
rm -rf ${TC_MountPT}/${tc_phase}-build
EOF
) >> $MKFILE.tmp
}
#----------------------------#
chapter3_Makefiles() { # Initialization of the system
#----------------------------#
echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter3 ( SETUP ) ${R_arrow}"
# If $LUSER_HOME is already present in the host, we asume that the
# hlfs user and group are also presents in the host, and a backup
# of their bash init files is made.
(
cat << EOF
020-creatingtoolsdir:
@\$(call echo_message, Building)
@mkdir \$(MOUNT_PT)/tools && \\
rm -f /tools && \\
ln -s \$(MOUNT_PT)/tools /
@\$(call housekeeping)
021-addinguser: 020-creatingtoolsdir
@\$(call echo_message, Building)
@if [ ! -d \$(LUSER_HOME) ]; then \\
groupadd \$(LGROUP); \\
useradd -s /bin/bash -g \$(LGROUP) -m -k /dev/null \$(LUSER); \\
else \\
touch luser-exist; \\
fi;
@chown \$(LUSER) \$(MOUNT_PT)/tools && \\
chmod -R a+wt \$(MOUNT_PT)/\$(SCRIPT_ROOT) && \\
chmod a+wt \$(SRCSDIR)
@\$(call housekeeping)
022-settingenvironment: 021-addinguser
@\$(call echo_message, Building)
@if [ -f \$(LUSER_HOME)/.bashrc -a ! -f \$(LUSER_HOME)/.bashrc.XXX ]; then \\
mv \$(LUSER_HOME)/.bashrc \$(LUSER_HOME)/.bashrc.XXX; \\
fi;
@if [ -f \$(LUSER_HOME)/.bash_profile -a ! -f \$(LUSER_HOME)/.bash_profile.XXX ]; then \\
mv \$(LUSER_HOME)/.bash_profile \$(LUSER_HOME)/.bash_profile.XXX; \\
fi;
@echo "set +h" > \$(LUSER_HOME)/.bashrc && \\
echo "umask 022" >> \$(LUSER_HOME)/.bashrc && \\
echo "HLFS=\$(MOUNT_PT)" >> \$(LUSER_HOME)/.bashrc && \\
echo "LC_ALL=POSIX" >> \$(LUSER_HOME)/.bashrc && \\
echo "PATH=/tools/bin:/bin:/usr/bin" >> \$(LUSER_HOME)/.bashrc && \\
echo "export HLFS LC_ALL PATH" >> \$(LUSER_HOME)/.bashrc && \\
echo "" >> \$(LUSER_HOME)/.bashrc && \\
echo "source $JHALFSDIR/envars" >> \$(LUSER_HOME)/.bashrc && \\
chown \$(LUSER):\$(LGROUP) \$(LUSER_HOME)/.bashrc && \\
chmod -R a+wt \$(MOUNT_PT) && \\
touch envars && \\
chown \$(LUSER) envars
@\$(call housekeeping)
EOF
) >> $MKFILE.tmp
chapter3=" 020-creatingtoolsdir 021-addinguser 022-settingenvironment"
}
#----------------------------#
chapter5_Makefiles() { # Bootstrap or temptools phase
#----------------------------#
local file
local this_script
echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter5 ( LUSER ) ${R_arrow}"
for file in chapter05/* ; do
# Keep the script file name
this_script=`basename $file`
# Skip this script depending on jhalfs.conf flags set.
case $this_script in
# If no testsuites will be run, then TCL, Expect and DejaGNU aren't needed
*tcl* ) [[ "$TEST" = "0" ]] && continue; ;;
*expect* ) [[ "$TEST" = "0" ]] && continue; ;;
*dejagnu* ) [[ "$TEST" = "0" ]] && continue; ;;
# Test if the stripping phase must be skipped
*stripping* ) [[ "$STRIP" = "n" ]] && continue ;;
*) ;;
esac
# First append each name of the script files to a list (this will become
# the names of the targets in the Makefile
chapter5="$chapter5 $this_script"
# Grab the name of the target
name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' -e 's@-pass[0-9]\{1\}@@'`
# Adjust 'name'
case $name in
uclibc) name="uClibc" ;;
esac
# Set the dependency for the first target.
if [ -z $PREV ] ; then PREV=022-settingenvironment ; fi
#--------------------------------------------------------------------#
# >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
#--------------------------------------------------------------------#
#
# Drop in the name of the target on a new line, and the previous target
# as a dependency. Also call the echo_message function.
# This is a very special script and requires manual processing
# NO Optimization allowed
if [[ ${name} = "embryo-toolchain" ]] || \
[[ ${name} = "cocoon-toolchain" ]]; then
LUSER_wrt_target "$this_script" "$PREV"
process_toolchain "${this_script}" "${file}"
wrt_touch
PREV=$this_script
continue
fi
#
LUSER_wrt_target "$this_script" "$PREV"
# Find the version of the command files, if it corresponds with the building of
# a specific package. Fix GCC tarball name for 2.4-branch.
case $name in
gcc ) pkg_tarball=$(get_package_tarball_name gcc-core) ;;
* ) pkg_tarball=$(get_package_tarball_name $name) ;;
esac
# If $pkg_tarball isn't empty, we've got a package...
if [ "$pkg_tarball" != "" ] ; then
# Insert instructions for unpacking the package and to set the PKGDIR variable.
LUSER_wrt_unpack "$pkg_tarball"
# If using optimizations, write the instructions
[[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
fi
# Insert date and disk usage at the top of the log file, the script run
# and date and disk usage again at the bottom of the log file.
LUSER_wrt_RunAsUser "${file}"
# Remove the build directory(ies) except if the package build fails
# (so we can review config.cache, config.log, etc.)
if [ "$pkg_tarball" != "" ] ; then
LUSER_RemoveBuildDirs "$name"
fi
# Include a touch of the target name so make can check if it's already been made.
wrt_touch
#
#--------------------------------------------------------------------#
# >>>>>>>> END OF Makefile ENTRY <<<<<<<< #
#--------------------------------------------------------------------#
# Keep the script file name for Makefile dependencies.
PREV=$this_script
done # end for file in chapter05/*
}
#----------------------------#
chapter6_Makefiles() { # sysroot or chroot build phase
#----------------------------#
local file
local this_script
# Set envars and scripts for iteration targets
if [[ -z "$1" ]] ; then
local N=""
else
local N=-build_$1
local chapter6=""
mkdir chapter06$N
cp chapter06/* chapter06$N
for script in chapter06$N/* ; do
# Overwrite existing symlinks, files, and dirs
sed -e 's/ln -s /ln -sf /g' \
-e 's/^mv /&-f /g' \
-e 's/mkdir -v/&p/g' -i ${script}
# Rename the scripts
mv ${script} ${script}$N
done
# Remove Bzip2 binaries before make install
sed -e 's@make install@rm -vf /usr/bin/bz*\n&@' -i chapter06$N/*-bzip2$N
# Fix how Module-Init-Tools do the install target
sed -e 's@make install@make INSTALL=install install@' -i chapter06$N/*-module-init-tools$N
# Don't readd already existing groups
sed -e '/groupadd/d' -i chapter06$N/*-udev$N
fi
echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter6$N ( CHROOT ) ${R_arrow}"
for file in chapter06$N/* ; do
# Keep the script file name
this_script=`basename $file`
# Skip this script depending on jhalfs.conf flags set.
case $this_script in
# We'll run the chroot commands differently than the others, so skip them in the
# dependencies and target creation.
*chroot* ) continue ;;
# Test if the stripping phase must be skipped
*-stripping* ) [[ "$STRIP" = "n" ]] && continue ;;
# Skip linux-headers in iterative builds
*linux-headers*) [[ -n "$N" ]] && continue ;;
esac
# Grab the name of the target
name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' -e 's,'$N',,'`
case $name in
uclibc) name="uClibc" ;;
esac
# Find the version of the command files, if it corresponds with the building of
# a specific package. Fix GCC tarball name for 2.4-branch.
case $name in
gcc ) pkg_tarball=$(get_package_tarball_name gcc-core) ;;
* ) pkg_tarball=$(get_package_tarball_name $name) ;;
esac
if [[ "$pkg_tarball" = "" ]] && [[ -n "$N" ]] ; then
case "${this_script}" in
*stripping*) ;;
*) continue ;;
esac
fi
# Append each name of the script files to a list (this will become
# the names of the targets in the Makefile
case "${this_script}" in
*kernfs* ) runasroot=" ${this_script}" ;;
* ) chapter6="$chapter6 ${this_script}" ;;
esac
#--------------------------------------------------------------------#
# >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
#--------------------------------------------------------------------#
#
# Drop in the name of the target on a new line, and the previous target
# as a dependency. Also call the echo_message function.
if [[ ${name} = "butterfly-toolchain" ]]; then
CHROOT_wrt_target "${this_script}" "$PREV"
# Touch timestamp file if installed files logs will be created.
# But only for the firt build when running iterative builds.
if [ "${INSTALL_LOG}" = "y" ] && [ "x${N}" = "x" ] ; then
CHROOT_wrt_TouchTimestamp
fi
process_toolchain "${this_script}" "${file}"
if [ "${INSTALL_LOG}" = "y" ] && [ "x${N}" = "x" ] ; then
CHROOT_wrt_LogNewFiles "$name"
fi
wrt_touch
PREV=$this_script
continue
fi
# kernfs is run in SUDO target
case "${this_script}" in
*kernfs* ) LUSER_wrt_target "${this_script}" "$PREV" ;;
* ) CHROOT_wrt_target "${this_script}" "$PREV" ;;
esac
# If $pkg_tarball isn't empty, we've got a package...
# Insert instructions for unpacking the package and changing directories
if [ "$pkg_tarball" != "" ] ; then
# Touch timestamp file if installed files logs will be created.
# But only for the firt build when running iterative builds.
if [ "${INSTALL_LOG}" = "y" ] && [ "x${N}" = "x" ] ; then
CHROOT_wrt_TouchTimestamp
fi
CHROOT_Unpack "$pkg_tarball"
# If the testsuites must be run, initialize the log file
# butterfly-toolchain tests are enabled in 'process_tookchain' function
# 2.4-branch toolchain is ernabled here.
case $name in
glibc | gcc | binutils)
[[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}" ;;
* ) [[ "$TEST" > "1" ]] && CHROOT_wrt_test_log "${this_script}" ;;
esac
# If using optimizations, write the instructions
[[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
fi
# In kernfs we need to set HLFS and not to use chroot.
case "${this_script}" in
*kernfs* ) wrt_RunAsRoot "${file}" ;;
* ) CHROOT_wrt_RunAsRoot "${file}" ;;
esac
#
# Write installed files log and remove the build directory(ies)
# except if the package build fails.
if [ "$pkg_tarball" != "" ] ; then
CHROOT_wrt_RemoveBuildDirs "$name"
if [ "${INSTALL_LOG}" = "y" ] && [ "x${N}" = "x" ] ; then
CHROOT_wrt_LogNewFiles "$name"
fi
fi
#
# Include a touch of the target name so make can check if it's already been made.
wrt_touch
#
#--------------------------------------------------------------------#
# >>>>>>>> END OF Makefile ENTRY <<<<<<<< #
#--------------------------------------------------------------------#
# Keep the script file name for Makefile dependencies.
PREV=${this_script}
# Set system_build envar for iteration targets
system_build=$chapter6
done # end for file in chapter06/*
}
#----------------------------#
chapter7_Makefiles() { # Create a bootable system.. kernel, bootscripts..etc
#----------------------------#
local file
local this_script
echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter7 ( BOOT ) ${R_arrow}"
for file in chapter07/*; do
# Keep the script file name
this_script=`basename $file`
case $this_script in
*grub) continue ;; # Grub must be configured manually.
*console) continue ;; # Use the file generated by lfs-bootscripts
*fstab) [[ ! -z ${FSTAB} ]] && cp ${FSTAB} $BUILDDIR/sources/fstab
;;
*kernel) # If no .config file is supplied, the kernel build is skipped
[[ -z $CONFIG ]] && continue
cp $CONFIG $BUILDDIR/sources/kernel-config
;;
esac
# First append then name of the script file to a list (this will become
# the names of the targets in the Makefile
chapter7="$chapter7 $this_script"
#--------------------------------------------------------------------#
# >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
#--------------------------------------------------------------------#
#
# Drop in the name of the target on a new line, and the previous target
# as a dependency. Also call the echo_message function.
CHROOT_wrt_target "$this_script" "$PREV"
case "${this_script}" in
*bootscripts*)
if [ "${INSTALL_LOG}" = "y" ] ; then
CHROOT_wrt_TouchTimestamp
fi
CHROOT_Unpack $(get_package_tarball_name "lfs-bootscripts")
blfs_bootscripts=$(get_package_tarball_name "blfs-bootscripts" | sed -e 's/.tar.*//' )
echo -e "\t@echo \"\$(MOUNT_PT)\$(SRC)/$blfs_bootscripts\" >> sources-dir" >> $MKFILE.tmp
;;
*kernel)
name="linux"
pkg_tarball=$(get_package_tarball_name $name)
if [ "${INSTALL_LOG}" = "y" ] ; then
CHROOT_wrt_TouchTimestamp
fi
CHROOT_Unpack "$pkg_tarball"
;;
esac
case "${this_script}" in
*fstab*) # Check if we have a real /etc/fstab file
if [[ -n "$FSTAB" ]] ; then
CHROOT_wrt_CopyFstab
else
CHROOT_wrt_RunAsRoot "$file"
fi
;;
*) # All other scripts
CHROOT_wrt_RunAsRoot "${file}"
;;
esac
# Remove the build directory except if the package build fails.
case "${this_script}" in
*bootscripts*)
(
cat << EOF
@ROOT=\`head -n1 \$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\
rm -r \$(SRC)/\$\$ROOT
@rm -rf \`cat sources-dir\` && \\
rm sources-dir
EOF
) >> $MKFILE.tmp
if [ "${INSTALL_LOG}" = "y" ] ; then
CHROOT_wrt_LogNewFiles "$name"
fi
;;
*kernel) CHROOT_wrt_RemoveBuildDirs "dummy"
if [ "${INSTALL_LOG}" = "y" ] ; then
CHROOT_wrt_LogNewFiles "$name"
fi ;;
esac
# Include a touch of the target name so make can check if it's already been made.
wrt_touch
#
#--------------------------------------------------------------------#
# >>>>>>>> END OF Makefile ENTRY <<<<<<<< #
#--------------------------------------------------------------------#
# Keep the script file name for Makefile dependencies.
PREV=$this_script
done # for file in chapter07/*
}
#----------------------------#
build_Makefile() { # Construct a Makefile from the book scripts
#----------------------------#
echo "Creating Makefile... ${BOLD}START${OFF}"
cd $JHALFSDIR/${PROGNAME}-commands
# Start with a clean Makefile.tmp file
>$MKFILE.tmp
chapter3_Makefiles
chapter5_Makefiles
chapter6_Makefiles
# Add the iterations targets, if needed
[[ "$COMPARE" = "y" ]] && wrt_compare_targets
chapter7_Makefiles
# Add the CUSTOM_TOOLS targets, if needed
[[ "$CUSTOM_TOOLS" = "y" ]] && wrt_CustomTools_target
# Add the BLFS_TOOL targets, if needed
[[ "$BLFS_TOOL" = "y" ]] && wrt_blfs_tool_targets
# Add a header, some variables and include the function file
# to the top of the real Makefile.
wrt_Makefile_header
# Add chroot commands
CHROOT_LOC="`whereis -b chroot | cut -d " " -f2`"
i=1
for file in chapter06/*chroot* ; do
chroot=`cat $file | \
sed -e "s@chroot@$CHROOT_LOC@" \
-e '/#!\/bin\/bash/d' \
-e '/^export/d' \
-e '/^logout/d' \
-e 's@ \\\@ @g' | \
tr -d '\n' | \
sed -e 's/ */ /g' \
-e 's|\\$|&&|g' \
-e 's|exit||g' \
-e 's|$| -c|' \
-e 's|"$$HLFS"|$(MOUNT_PT)|'\
-e 's|set -e||' \
-e 's|set +h||'`
echo -e "CHROOT$i= $chroot\n" >> $MKFILE
i=`expr $i + 1`
done
# Drop in the main target 'all:' and the chapter targets with each sub-target
# as a dependency.
(
cat << EOF
all: ck_UID mk_SETUP mk_LUSER mk_SUDO mk_CHROOT mk_BOOT create-sbu_du-report mk_CUSTOM_TOOLS mk_BLFS_TOOL
@sudo make do-housekeeping
@echo "$VERSION - jhalfs build" > hlfs-release && \\
sudo install -m444 hlfs-release \$(MOUNT_PT)/etc/hlfs-release
@\$(call echo_finished,$VERSION)
ck_UID:
@if [ \`id -u\` = "0" ]; then \\
echo "--------------------------------------------------"; \\
echo "You cannot run this makefile from the root account"; \\
echo "--------------------------------------------------"; \\
exit 1; \\
fi
mk_SETUP:
@\$(call echo_SU_request)
@sudo make BREAKPOINT=\$(BREAKPOINT) SETUP
@touch \$@
mk_LUSER: mk_SETUP
@\$(call echo_SULUSER_request)
@(sudo \$(SU_LUSER) "source .bashrc && cd \$(MOUNT_PT)/\$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) LUSER" )
@sudo make restore-luser-env
@touch \$@
mk_SUDO: mk_LUSER
@sudo make SUDO
@touch \$@
mk_CHROOT: mk_SUDO
@if [ ! -e \$(MOUNT_PT)/dev ]; then \\
mkdir \$(MOUNT_PT)/dev && \\
sudo mknod -m 666 \$(MOUNT_PT)/dev/null c 1 3 && \\
sudo mknod -m 600 \$(MOUNT_PT)/dev/console c 5 1 && \\
sudo chown -R 0:0 \$(MOUNT_PT)/dev; \\
fi;
@\$(call echo_CHROOT_request)
@( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) CHROOT")
@touch \$@
mk_BOOT: mk_CHROOT
@\$(call echo_CHROOT_request)
@( sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) BOOT")
@touch \$@
mk_CUSTOM_TOOLS: create-sbu_du-report
@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
\$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
sudo mkdir -p ${BUILDDIR}${TRACKING_DIR}; \\
(sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) CUSTOM_TOOLS"); \\
fi;
@touch \$@
mk_BLFS_TOOL: mk_CUSTOM_TOOLS
@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
\$(call sh_echo_PHASE,Building BLFS_TOOL); \\
sudo mkdir -p $BUILDDIR$TRACKING_DIR; \\
(sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) BLFS_TOOL"); \\
fi;
@touch \$@
SETUP: $chapter3
LUSER: $chapter5
SUDO: $runasroot
CHROOT: SHELL=/tools/bin/bash
CHROOT: $chapter6
BOOT: $chapter7
CUSTOM_TOOLS: $custom_list
BLFS_TOOL: $blfs_tool
create-sbu_du-report: mk_BOOT
@\$(call echo_message, Building)
@if [ "\$(ADD_REPORT)" = "y" ]; then \\
./create-sbu_du-report.sh logs $VERSION $(date --iso-8601); \\
\$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report); \\
fi;
@touch \$@
restore-luser-env:
@\$(call echo_message, Building)
@if [ -f \$(LUSER_HOME)/.bashrc.XXX ]; then \\
mv -f \$(LUSER_HOME)/.bashrc.XXX \$(LUSER_HOME)/.bashrc; \\
fi;
@if [ -f \$(LUSER_HOME)/.bash_profile.XXX ]; then \\
mv \$(LUSER_HOME)/.bash_profile.XXX \$(LUSER_HOME)/.bash_profile; \\
fi;
@chown \$(LUSER):\$(LGROUP) \$(LUSER_HOME)/.bash* && \\
touch \$@ && \\
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
echo --------------------------------------------------------------------------------\$(WHITE)
do-housekeeping:
@-umount \$(MOUNT_PT)/dev/pts
@-umount \$(MOUNT_PT)/dev/shm
@-umount \$(MOUNT_PT)/dev
@-umount \$(MOUNT_PT)/sys
@-umount \$(MOUNT_PT)/proc
@-rm /tools
@-if [ ! -f luser-exist ]; then \\
userdel \$(LUSER); \\
rm -rf \$(LUSER_HOME); \\
fi;
EOF
) >> $MKFILE
# Bring over the items from the Makefile.tmp
cat $MKFILE.tmp >> $MKFILE
rm $MKFILE.tmp
echo "Creating Makefile... ${BOLD}DONE${OFF}"
}

6
README
View file

@ -26,8 +26,6 @@
available. available.
- README.PACKAGE_MANAGEMENT: instructions to use package management during - README.PACKAGE_MANAGEMENT: instructions to use package management during
the build (only for LFS, patches welcome for CLFS...) the build (only for LFS, patches welcome for CLFS...)
- README.HLFS: very short file explaining why you cannot use HLFS with the
present tool version.
Other sources of information are the context help in the menu interface, Other sources of information are the context help in the menu interface,
and the xLFS books themselves. and the xLFS books themselves.
@ -181,9 +179,6 @@
/CLFS3/master.sh /CLFS3/master.sh
/clfs3.xsl /clfs3.xsl
/HLFS/master.sh
/hlfs.xsl
/LFS/master.sh /LFS/master.sh
/lfs.xsl /lfs.xsl
@ -219,7 +214,6 @@
README README
README.BLFS README.BLFS
README.CLFS README.CLFS
README.HLFS
README.CUSTOM README.CUSTOM
TODO TODO
LICENSE LICENSE

View file

@ -1,3 +0,0 @@
::::NOTICE::::
HLFS has not be updated for a very long time. Since then, jhalfs has evolved
and is now incompatible with HLFS.

View file

@ -100,24 +100,6 @@ extract_commands() { #
$BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1 $BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
;; ;;
hlfs)
echo -n " ${L_arrow}${BOLD}$MODEL + $KERNEL${R_arrow} HLFS flavour... "
xsltproc --nonet \
--xinclude \
--stringparam model "$MODEL" \
--stringparam kernel "$KERNEL" \
--stringparam testsuite "$TEST" \
--stringparam bomb-testsuite "$BOMB_TEST" \
--stringparam features \
x$SSP$ASLR$PAX$HARDENED_TMP$WARNINGS$MISC$BLOWFISH \
--stringparam timezone "$TIMEZONE" \
--stringparam page "$PAGE" \
--stringparam lang "$LANG" \
--stringparam grsecurity_host "$GRSECURITY_HOST" \
--output ./${PROGNAME}-commands/ \
$XSL \
$BOOK/index.xml >>$LOGDIR/$LOG 2>&1
;;
lfs) lfs)
echo -n " ${L_arrow}${BOLD}LFS${R_arrow} build... " echo -n " ${L_arrow}${BOLD}LFS${R_arrow} build... "
# The scripts pages are xincluded by the book, so must # The scripts pages are xincluded by the book, so must
@ -231,14 +213,6 @@ create_package_list() { #
packages.xsl \ packages.xsl \
$BOOK/BOOK/materials/${ARCH}-chapter.xml >>$LOGDIR/$LOG 2>&1 $BOOK/BOOK/materials/${ARCH}-chapter.xml >>$LOGDIR/$LOG 2>&1
;; ;;
hlfs)
xsltproc --nonet --xinclude \
--stringparam model "$MODEL" \
--stringparam kernel "$KERNEL" \
--output pkg_tarball_list \
packages.xsl \
$BOOK/chapter04/chapter04.xml >>$LOGDIR/$LOG 2>&1
;;
lfs) lfs)
# lfs does not use the package list anymore # lfs does not use the package list anymore
;; ;;
@ -263,11 +237,6 @@ create_chroot_scripts() { #
-o chroot-scripts/ chroot.xsl \ -o chroot-scripts/ chroot.xsl \
$BOOK/BOOK/${ARCH}-index.xml >> $LOGDIR/$LOG 2>&1 $BOOK/BOOK/${ARCH}-index.xml >> $LOGDIR/$LOG 2>&1
;; ;;
hlfs)
xsltproc --nonet --xinclude \
-o chroot-scripts/ chroot.xsl \
$BOOK/index.xml >> $LOGDIR/$LOG 2>&1
;;
lfs) lfs)
xsltproc --nonet --xinclude \ xsltproc --nonet --xinclude \
-o chroot-scripts/ chroot.xsl \ -o chroot-scripts/ chroot.xsl \
@ -294,11 +263,6 @@ create_kernfs_scripts() { #
-o kernfs-scripts/ kernfs.xsl \ -o kernfs-scripts/ kernfs.xsl \
$BOOK/BOOK/${ARCH}-index.xml >> $LOGDIR/$LOG 2>&1 $BOOK/BOOK/${ARCH}-index.xml >> $LOGDIR/$LOG 2>&1
;; ;;
hlfs)
xsltproc --nonet --xinclude \
-o kernfs-scripts/ kernfs.xsl \
$BOOK/index.xml >> $LOGDIR/$LOG 2>&1
;;
lfs) lfs)
xsltproc --nonet \ xsltproc --nonet \
-o kernfs-scripts/devices.sh kernfs.xsl \ -o kernfs-scripts/devices.sh kernfs.xsl \

View file

@ -92,7 +92,7 @@ check_prerequisites() { #
local LC_ALL=C local LC_ALL=C
export LC_ALL export LC_ALL
# LFS/HLFS/CLFS prerequisites # LFS/CLFS prerequisites
if [ -n "$MIN_Linux_VER" ]; then if [ -n "$MIN_Linux_VER" ]; then
check_version "$MIN_Linux_VER" "`uname -r`" "KERNEL" check_version "$MIN_Linux_VER" "`uname -r`" "KERNEL"
fi fi

View file

@ -146,18 +146,6 @@ create_urls() { #
$BOOK/BOOK/materials/$ARCH-chapter.xml >>$LOGDIR/$LOG 2>&1 $BOOK/BOOK/materials/$ARCH-chapter.xml >>$LOGDIR/$LOG 2>&1
echo " ...OK" echo " ...OK"
;; ;;
hlfs)
echo -n "Creating HLFS <${MODEL}> + <${KERNEL}> specific URLs file"
xsltproc --nonet --xinclude \
--stringparam server "$SERVER" \
--stringparam family lfs \
--stringparam model "$MODEL" \
--stringparam kernel "$KERNEL" \
-o $BUILDDIR/sources/urls.lst \
urls.xsl \
$BOOK/chapter04/chapter04.xml >>$LOGDIR/$LOG 2>&1
echo " ...OK"
;;
lfs) lfs)
echo -n "Creating LFS specific URLs file" echo -n "Creating LFS specific URLs file"
xsltproc --nonet --xinclude \ xsltproc --nonet --xinclude \

View file

@ -10,7 +10,7 @@ validate_config() { # Are the config values sane (within reason)
input vars: none input vars: none
externals: color constants externals: color constants
PROGNAME (lfs,hlfs,clfs,clfs2,clfs3,blfs) PROGNAME (lfs,clfs,clfs2,clfs3,blfs)
modifies: none modifies: none
returns: nothing returns: nothing
on error: write text to console and dies on error: write text to console and dies
@ -30,17 +30,12 @@ inline_doc
# BOOK Settings by book # BOOK Settings by book
local -r LFS_book="$BOOK_common INITSYS BLFS_TOOL" local -r LFS_book="$BOOK_common INITSYS BLFS_TOOL"
#local -r HLFS_added="SET_SSP SET_ASLR SET_PAX SET_HARDENED_TMP SET_WARNINGS \
# SET_MISC SET_BLOWFISH"
local -r HLFS_added=""
local -r HLFS_book="$BOOK_common BLFS_TOOL MODEL KERNEL GRSECURITY_HOST $HLFS_added"
local -r CLFS_book="$BOOK_common BLFS_TOOL METHOD $BOOK_clfsX TARGET32 BOOT_CONFIG" local -r CLFS_book="$BOOK_common BLFS_TOOL METHOD $BOOK_clfsX TARGET32 BOOT_CONFIG"
local -r CLFS2_book="$BOOK_common BLFS_TOOL $BOOK_clfsX" local -r CLFS2_book="$BOOK_common BLFS_TOOL $BOOK_clfsX"
local -r CLFS3_book="$BOOK_common $BOOK_clfsX PLATFORM MIPS_LEVEL" local -r CLFS3_book="$BOOK_common $BOOK_clfsX PLATFORM MIPS_LEVEL"
# Build Settings by book # Build Settings by book
local -r LFS_build="$BUILD_chroot NCURSES5 DEL_LA_FILES $BUILD_common PKGMNGT FULL_LOCALE WRAP_INSTALL" local -r LFS_build="$BUILD_chroot NCURSES5 DEL_LA_FILES $BUILD_common PKGMNGT FULL_LOCALE WRAP_INSTALL"
local -r HLFS_build="$BUILD_chroot $BUILD_common"
local -r CLFS_build="$BUILD_chroot $BUILD_common" local -r CLFS_build="$BUILD_chroot $BUILD_common"
local -r CLFS2_build="STRIP $BUILD_common" local -r CLFS2_build="STRIP $BUILD_common"
local -r CLFS3_build=" $BUILD_common" local -r CLFS3_build=" $BUILD_common"
@ -50,7 +45,6 @@ inline_doc
# Full list of books settings # Full list of books settings
local -r lfs_PARAM_LIST="$LFS_book $GENERAL_common $LFS_build $LFS_system $ADVANCED_chroot N_PARALLEL REALSBU SAVE_CH5 $ADVANCED_common" local -r lfs_PARAM_LIST="$LFS_book $GENERAL_common $LFS_build $LFS_system $ADVANCED_chroot N_PARALLEL REALSBU SAVE_CH5 $ADVANCED_common"
local -r hlfs_PARAM_LIST="$HLFS_book $GENERAL_common $HLFS_build $ADVANCED_chroot $ADVANCED_common"
local -r clfs_PARAM_LIST="$CLFS_book $GENERAL_common $CLFS_build $ADVANCED_chroot $ADVANCED_common" local -r clfs_PARAM_LIST="$CLFS_book $GENERAL_common $CLFS_build $ADVANCED_chroot $ADVANCED_common"
local -r clfs2_PARAM_LIST="$CLFS2_book $GENERAL_common $CLFS2_build $ADVANCED_common" local -r clfs2_PARAM_LIST="$CLFS2_book $GENERAL_common $CLFS2_build $ADVANCED_common"
local -r clfs3_PARAM_LIST="$CLFS3_book $GENERAL_common $CLFS3_build $ADVANCED_common" local -r clfs3_PARAM_LIST="$CLFS3_book $GENERAL_common $CLFS3_build $ADVANCED_common"

View file

@ -82,7 +82,7 @@ get_package_tarball_name() { #
fi fi
;; ;;
linux-headers) linux-headers)
if [[ "${PROGNAME}" = "lfs" ]] || [[ "${PROGNAME}" = "hlfs" ]] || [[ "${PROGNAME}" = "clfs" ]]; then if [[ "${PROGNAME}" = "lfs" ]] || [[ "${PROGNAME}" = "clfs" ]]; then
# Uses kernel headers directly # Uses kernel headers directly
echo $(grep "^linux-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 ) echo $(grep "^linux-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
else else
@ -320,7 +320,6 @@ wrt_RunAsRoot() { # Some scripts must be run as root..
clfs ) MOUNT_ENV="CLFS" ;; clfs ) MOUNT_ENV="CLFS" ;;
clfs2 ) MOUNT_ENV="CLFS" ;; clfs2 ) MOUNT_ENV="CLFS" ;;
clfs3 ) MOUNT_ENV="CLFS" ;; clfs3 ) MOUNT_ENV="CLFS" ;;
hlfs ) MOUNT_ENV="HLFS" ;;
*) echo "undefined progname $PROGNAME"; exit 1 ;; *) echo "undefined progname $PROGNAME"; exit 1 ;;
esac esac

View file

@ -5,12 +5,6 @@
<xsl:output method="text"/> <xsl:output method="text"/>
<!-- The libc model used for HLFS -->
<xsl:param name="model" select="'glibc'"/>
<!-- The kernel series used for HLFS -->
<xsl:param name="kernel" select="'2.6'"/>
<!-- Should we include a package manager? --> <!-- Should we include a package manager? -->
<xsl:param name="pkgmngt" select="'n'"/> <xsl:param name="pkgmngt" select="'n'"/>
@ -19,9 +13,7 @@
<xsl:template match="/"> <xsl:template match="/">
<xsl:apply-templates <xsl:apply-templates
select="//varlistentry[(@condition=$model or not(@condition)) and select="//varlistentry[(@revision=$revision or not(@revision)) and
(@revision=$revision or not(@revision)) and
(@vendor=$kernel or not(@vendor))]
//para[contains(string(),'Download:')]"/> //para[contains(string(),'Download:')]"/>
<xsl:if test="$pkgmngt='y'"> <xsl:if test="$pkgmngt='y'">
<xsl:apply-templates <xsl:apply-templates

View file

@ -11,12 +11,6 @@
<!-- The book family (lfs or clfs). Needed to use the proper FTP path. --> <!-- The book family (lfs or clfs). Needed to use the proper FTP path. -->
<xsl:param name="family">lfs</xsl:param> <xsl:param name="family">lfs</xsl:param>
<!-- The libc model used for HLFS -->
<xsl:param name="model" select="'glibc'"/>
<!-- The kernel series used for HLFS -->
<xsl:param name="kernel" select="'2.6'"/>
<!-- Do we use a package manager? --> <!-- Do we use a package manager? -->
<xsl:param name="pkgmngt" select="'n'"/> <xsl:param name="pkgmngt" select="'n'"/>
@ -36,11 +30,7 @@
<!-- If some package doesn't have the predefined strings in their <!-- If some package doesn't have the predefined strings in their
name, the next test must be fixed to match it also. Skip possible name, the next test must be fixed to match it also. Skip possible
duplicated URLs due that may be splitted for PDF output --> duplicated URLs due that may be splitted for PDF output -->
<xsl:if test="(ancestor::varlistentry[@condition=$model] <xsl:if test="(contains(@url, '.bz2') or contains(@url, '.tar.gz') or
or not(ancestor::varlistentry[@condition])) and
(ancestor::varlistentry[@vendor=$kernel]
or not(ancestor::varlistentry[@vendor])) and
(contains(@url, '.bz2') or contains(@url, '.tar.gz') or
contains(@url, '.tgz') or contains(@url, '.patch') or contains(@url, '.tgz') or contains(@url, '.patch') or
contains(@url, '.xz') or contains(@url, '.lzma')) and contains(@url, '.xz') or contains(@url, '.lzma')) and
not(ancestor-or-self::*/@condition = 'pdf')"> not(ancestor-or-self::*/@condition = 'pdf')">

5
jhalfs
View file

@ -224,10 +224,6 @@ case $BRANCH_ID in
LFSVRS=${BRANCH_ID} LFSVRS=${BRANCH_ID}
TREE=${BRANCH_ID} TREE=${BRANCH_ID}
;; ;;
hlfs )
LFSVRS=${BRANCH_ID}
TREE=tags/${BRANCH_ID}/BOOK
;;
clfs* ) clfs* )
LFSVRS=${BRANCH_ID} LFSVRS=${BRANCH_ID}
TREE=clfs-${BRANCH_ID} TREE=clfs-${BRANCH_ID}
@ -394,7 +390,6 @@ if [[ "$REBUILD_MAKEFILE" = "n" ]] ; then
# Fix the XSL book parser # Fix the XSL book parser
case $PROGNAME in case $PROGNAME in
clfs* ) sed 's,FAKEDIR,'"${BOOK}/BOOK"',' "${PACKAGE_DIR}/${XSL}" > "${JHALFSDIR}/${XSL}" ;; clfs* ) sed 's,FAKEDIR,'"${BOOK}/BOOK"',' "${PACKAGE_DIR}/${XSL}" > "${JHALFSDIR}/${XSL}" ;;
lfs | hlfs ) sed 's,FAKEDIR,'"$BOOK"',' "${PACKAGE_DIR}/${XSL}" > "${JHALFSDIR}/${XSL}" ;;
* ) ;; * ) ;;
esac esac
export XSL=$JHALFSDIR/${XSL} export XSL=$JHALFSDIR/${XSL}