Incorporates BLFS tools to CLFS. WOrks with method=chroot. Not tested
with method=boot
This commit is contained in:
parent
730436a1f2
commit
269d81c9f5
2 changed files with 67 additions and 56 deletions
|
@ -6,7 +6,8 @@
|
||||||
|
|
||||||
<!-- $Id$ -->
|
<!-- $Id$ -->
|
||||||
|
|
||||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
<xsl:stylesheet
|
||||||
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
xmlns:exsl="http://exslt.org/common"
|
xmlns:exsl="http://exslt.org/common"
|
||||||
extension-element-prefixes="exsl"
|
extension-element-prefixes="exsl"
|
||||||
version="1.0">
|
version="1.0">
|
||||||
|
@ -30,8 +31,8 @@
|
||||||
-->
|
-->
|
||||||
<xsl:param name="bomb-testsuite" select="n"/>
|
<xsl:param name="bomb-testsuite" select="n"/>
|
||||||
|
|
||||||
<!-- Install vim-lang package? -->
|
<!-- Install vim-lang package? OBSOLETE should always be 'n'-->
|
||||||
<xsl:param name="vim-lang" select="y"/>
|
<xsl:param name="vim-lang" select="n"/>
|
||||||
|
|
||||||
<!-- Time zone -->
|
<!-- Time zone -->
|
||||||
<xsl:param name="timezone" select="GMT"/>
|
<xsl:param name="timezone" select="GMT"/>
|
||||||
|
@ -217,16 +218,15 @@
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<!-- Fixing toolchain test suites run XXX more to fix -->
|
<!-- Fixing toolchain test suites run XXX more to fix -->
|
||||||
<xsl:when test="string() = 'make check' or
|
<xsl:when test="contains(string(),'glibc-check-log')">
|
||||||
contains(string(), 'make -k check')">
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$testsuite != '0'">
|
<xsl:when test="$testsuite != '0'">
|
||||||
|
<xsl:value-of select="substring-before(string(),'2>')"/>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$bomb-testsuite = 'n'">
|
<xsl:when test="$bomb-testsuite = 'n'">
|
||||||
<xsl:text>make -k check >> $TEST_LOG 2>&1 || true
</xsl:text>
|
<xsl:text>>> $TEST_LOG 2>&1 || true
</xsl:text>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:apply-templates/>
|
|
||||||
<xsl:text>>> $TEST_LOG 2>&1</xsl:text>
|
<xsl:text>>> $TEST_LOG 2>&1</xsl:text>
|
||||||
<xsl:if test="contains(string(),' -k ')">
|
<xsl:if test="contains(string(),' -k ')">
|
||||||
<xsl:text> || true</xsl:text>
|
<xsl:text> || true</xsl:text>
|
||||||
|
@ -237,15 +237,16 @@
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="contains(string(),'glibc-check-log')">
|
<xsl:when test="string() = 'make check' or
|
||||||
|
contains(string(), 'make -k check')">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$testsuite != '0'">
|
<xsl:when test="$testsuite != '0'">
|
||||||
<xsl:value-of select="substring-before(string(),'>g')"/>
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$bomb-testsuite = 'n'">
|
<xsl:when test="$bomb-testsuite = 'n'">
|
||||||
<xsl:text>>> $TEST_LOG 2>&1 || true
</xsl:text>
|
<xsl:text>make -k check >> $TEST_LOG 2>&1 || true
</xsl:text>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
|
<xsl:apply-templates/>
|
||||||
<xsl:text> >> $TEST_LOG 2>&1</xsl:text>
|
<xsl:text> >> $TEST_LOG 2>&1</xsl:text>
|
||||||
<xsl:if test="contains(string(),' -k ')">
|
<xsl:if test="contains(string(),' -k ')">
|
||||||
<xsl:text> || true</xsl:text>
|
<xsl:text> || true</xsl:text>
|
||||||
|
@ -278,6 +279,13 @@
|
||||||
<xsl:value-of select="substring-after(string(),'make ')"/>
|
<xsl:value-of select="substring-after(string(),'make ')"/>
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:text>
</xsl:text>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
<!-- Avoid calling hostname in chroot -->
|
||||||
|
<xsl:when test="ancestor::note[@os='a00']">
|
||||||
|
<xsl:if test="$method='boot'">
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
<xsl:text>
</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:when>
|
||||||
<!-- The rest of commands -->
|
<!-- The rest of commands -->
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
|
|
|
@ -18,14 +18,14 @@ host_prep_Makefiles() { #
|
||||||
cat << EOF
|
cat << EOF
|
||||||
023-creatingtoolsdir:
|
023-creatingtoolsdir:
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
@mkdir \$(MOUNT_PT)/tools && \\
|
@install -dv \$(MOUNT_PT)/tools && \\
|
||||||
rm -f /tools && \\
|
rm -f /tools && \\
|
||||||
ln -s \$(MOUNT_PT)/tools /
|
ln -s \$(MOUNT_PT)/tools /
|
||||||
@\$(call housekeeping)
|
@\$(call housekeeping)
|
||||||
|
|
||||||
024-creatingcrossdir: 023-creatingtoolsdir
|
024-creatingcrossdir: 023-creatingtoolsdir
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
@mkdir -v \$(MOUNT_PT)/cross-tools && \\
|
@install -dv \$(MOUNT_PT)/cross-tools && \\
|
||||||
rm -f /cross-tools && \\
|
rm -f /cross-tools && \\
|
||||||
ln -s \$(MOUNT_PT)/cross-tools /
|
ln -s \$(MOUNT_PT)/cross-tools /
|
||||||
@\$(call housekeeping)
|
@\$(call housekeeping)
|
||||||
|
@ -34,12 +34,14 @@ cat << EOF
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
@if [ ! -d \$(LUSER_HOME) ]; then \\
|
@if [ ! -d \$(LUSER_HOME) ]; then \\
|
||||||
groupadd \$(LGROUP); \\
|
groupadd \$(LGROUP); \\
|
||||||
useradd -s /bin/bash -g \$(LGROUP) -m -k /dev/null \$(LUSER); \\
|
useradd -s /bin/bash -g \$(LGROUP) -d \$(LUSER_HOME) \$(LUSER); \\
|
||||||
|
mkdir -pv \$(LUSER_HOME); \\
|
||||||
|
chown -v \$(LUSER):\$(LGROUP) \$(LUSER_HOME); \\
|
||||||
else \\
|
else \\
|
||||||
touch luser-exist; \\
|
touch luser-exist; \\
|
||||||
fi;
|
fi
|
||||||
@chown \$(LUSER) \$(MOUNT_PT)/tools && \\
|
@chown -v \$(LUSER) \$(MOUNT_PT)/tools && \\
|
||||||
chown \$(LUSER) \$(MOUNT_PT)/cross-tools && \\
|
chown -v \$(LUSER) \$(MOUNT_PT)/cross-tools && \\
|
||||||
chmod -R a+wt \$(MOUNT_PT)/\$(SCRIPT_ROOT) && \\
|
chmod -R a+wt \$(MOUNT_PT)/\$(SCRIPT_ROOT) && \\
|
||||||
chmod a+wt \$(SRCSDIR)
|
chmod a+wt \$(SRCSDIR)
|
||||||
@\$(call housekeeping)
|
@\$(call housekeeping)
|
||||||
|
@ -48,7 +50,7 @@ cat << EOF
|
||||||
@\$(call echo_message, Building)
|
@\$(call echo_message, Building)
|
||||||
@if [ -f \$(LUSER_HOME)/.bashrc -a ! -f \$(LUSER_HOME)/.bashrc.XXX ]; then \\
|
@if [ -f \$(LUSER_HOME)/.bashrc -a ! -f \$(LUSER_HOME)/.bashrc.XXX ]; then \\
|
||||||
mv \$(LUSER_HOME)/.bashrc \$(LUSER_HOME)/.bashrc.XXX; \\
|
mv \$(LUSER_HOME)/.bashrc \$(LUSER_HOME)/.bashrc.XXX; \\
|
||||||
fi;
|
fi
|
||||||
@if [ -f \$(LUSER_HOME)/.bash_profile -a ! -f \$(LUSER_HOME)/.bash_profile.XXX ]; then \\
|
@if [ -f \$(LUSER_HOME)/.bash_profile -a ! -f \$(LUSER_HOME)/.bash_profile.XXX ]; then \\
|
||||||
mv \$(LUSER_HOME)/.bash_profile \$(LUSER_HOME)/.bash_profile.XXX; \\
|
mv \$(LUSER_HOME)/.bash_profile \$(LUSER_HOME)/.bash_profile.XXX; \\
|
||||||
fi;
|
fi;
|
||||||
|
@ -556,7 +558,7 @@ final_system_Makefiles() { #
|
||||||
CHROOT_Unpack "$pkg_tarball"
|
CHROOT_Unpack "$pkg_tarball"
|
||||||
# If the testsuites must be run, initialize the log file
|
# If the testsuites must be run, initialize the log file
|
||||||
case $name in
|
case $name in
|
||||||
binutils | gcc | glibc | eglibc )
|
binutils | gcc | glibc | eglibc | gmp | mpfr | mpc | isl | cloog )
|
||||||
[[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}"
|
[[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}"
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
|
@ -873,8 +875,6 @@ build_Makefile() { # Construct a Makefile from the book scri
|
||||||
|
|
||||||
# Add the CUSTOM_TOOLS targets, if needed
|
# Add the CUSTOM_TOOLS targets, if needed
|
||||||
[[ "$CUSTOM_TOOLS" = "y" ]] && wrt_CustomTools_target
|
[[ "$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
|
# Add a header, some variables and include the function file
|
||||||
# to the top of the real Makefile.
|
# to the top of the real Makefile.
|
||||||
|
@ -909,7 +909,8 @@ cat << EOF
|
||||||
all: ck_UID mk_SETUP mk_CROSS mk_SUDO mk_SYSTOOLS create-sbu_du-report mk_CUSTOM_TOOLS mk_BLFS_TOOL
|
all: ck_UID mk_SETUP mk_CROSS mk_SUDO mk_SYSTOOLS create-sbu_du-report mk_CUSTOM_TOOLS mk_BLFS_TOOL
|
||||||
@sudo make do-housekeeping
|
@sudo make do-housekeeping
|
||||||
@echo "$VERSION - jhalfs build" > clfs-release && \\
|
@echo "$VERSION - jhalfs build" > clfs-release && \\
|
||||||
sudo mv clfs-release \$(MOUNT_PT)/etc
|
sudo mv clfs-release \$(MOUNT_PT)/etc && \\
|
||||||
|
sudo chown root:root \$(MOUNT_PT)/etc/clfs-release
|
||||||
@\$(call echo_finished,$VERSION)
|
@\$(call echo_finished,$VERSION)
|
||||||
|
|
||||||
ck_UID:
|
ck_UID:
|
||||||
|
@ -945,7 +946,14 @@ mk_SYSTOOLS: mk_SUDO
|
||||||
@( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) CHROOT_JAIL")
|
@( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) CHROOT_JAIL")
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_CUSTOM_TOOLS: create-sbu_du-report
|
mk_BLFS_TOOL: create-sbu_du-report
|
||||||
|
@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
|
||||||
|
\$(call sh_echo_PHASE,Building BLFS_TOOL); \\
|
||||||
|
(sudo \$(CHROOT1) "make -C $BLFS_ROOT/work"); \\
|
||||||
|
fi;
|
||||||
|
@touch \$@
|
||||||
|
|
||||||
|
mk_CUSTOM_TOOLS: mk_BLFS_TOOL
|
||||||
@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
|
@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
|
||||||
\$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
|
\$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
|
||||||
sudo mkdir -p ${BUILDDIR}${TRACKING_DIR}; \\
|
sudo mkdir -p ${BUILDDIR}${TRACKING_DIR}; \\
|
||||||
|
@ -953,14 +961,6 @@ mk_CUSTOM_TOOLS: create-sbu_du-report
|
||||||
fi;
|
fi;
|
||||||
@touch \$@
|
@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 \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) BLFS_TOOL"; \\
|
|
||||||
fi;
|
|
||||||
@touch \$@
|
|
||||||
|
|
||||||
SETUP: $host_prep
|
SETUP: $host_prep
|
||||||
AS_LUSER: $cross_tools $temptools
|
AS_LUSER: $cross_tools $temptools
|
||||||
SUDO: $orphan_scripts
|
SUDO: $orphan_scripts
|
||||||
|
@ -969,7 +969,6 @@ PREP_CHROOT_JAIL: ${chroottools}
|
||||||
CHROOT_JAIL: SHELL=/tools/bin/bash
|
CHROOT_JAIL: SHELL=/tools/bin/bash
|
||||||
CHROOT_JAIL: $testsuitetools $basicsystem $bootscripttools $bootabletools
|
CHROOT_JAIL: $testsuitetools $basicsystem $bootscripttools $bootabletools
|
||||||
CUSTOM_TOOLS: $custom_list
|
CUSTOM_TOOLS: $custom_list
|
||||||
BLFS_TOOL: $blfs_tool
|
|
||||||
|
|
||||||
|
|
||||||
create-sbu_du-report: mk_SYSTOOLS
|
create-sbu_du-report: mk_SYSTOOLS
|
||||||
|
@ -982,7 +981,13 @@ create-sbu_du-report: mk_SYSTOOLS
|
||||||
|
|
||||||
do-housekeeping:
|
do-housekeeping:
|
||||||
@-umount \$(MOUNT_PT)/dev/pts
|
@-umount \$(MOUNT_PT)/dev/pts
|
||||||
@-umount \$(MOUNT_PT)/dev/shm
|
@-if [ -h \$(MOUNT_PT)/dev/shm ]; then \\
|
||||||
|
link=\$\$(readlink \$(MOUNT_PT)/dev/shm); \\
|
||||||
|
umount \$(MOUNT_PT)/\$\$link; \\
|
||||||
|
unset link; \\
|
||||||
|
else \\
|
||||||
|
umount \$(MOUNT_PT)/dev/shm; \\
|
||||||
|
fi
|
||||||
@-umount \$(MOUNT_PT)/dev
|
@-umount \$(MOUNT_PT)/dev
|
||||||
@-umount \$(MOUNT_PT)/sys
|
@-umount \$(MOUNT_PT)/sys
|
||||||
@-umount \$(MOUNT_PT)/proc
|
@-umount \$(MOUNT_PT)/proc
|
||||||
|
@ -1050,7 +1055,14 @@ mk_FINAL:
|
||||||
@( source /root/.bash_profile && make BREAKPOINT=\$(BREAKPOINT) AS_ROOT )
|
@( source /root/.bash_profile && make BREAKPOINT=\$(BREAKPOINT) AS_ROOT )
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_CUSTOM_TOOLS: mk_FINAL
|
mk_BLFS_TOOL: mk_FINAL
|
||||||
|
@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
|
||||||
|
\$(call sh_echo_PHASE,Building BLFS_TOOL); \\
|
||||||
|
( make -C $BLFS_ROOT/work ); \\
|
||||||
|
fi;
|
||||||
|
@touch \$@
|
||||||
|
|
||||||
|
mk_CUSTOM_TOOLS: mk_BLFS_TOOL
|
||||||
@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
|
@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
|
||||||
\$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
|
\$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
|
||||||
mkdir -p ${TRACKING_DIR}; \\
|
mkdir -p ${TRACKING_DIR}; \\
|
||||||
|
@ -1058,21 +1070,12 @@ mk_CUSTOM_TOOLS: mk_FINAL
|
||||||
fi;
|
fi;
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_BLFS_TOOL: mk_CUSTOM_TOOLS
|
|
||||||
@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
|
|
||||||
\$(call sh_echo_PHASE,Building BLFS_TOOL); \\
|
|
||||||
mkdir -p $TRACKING_DIR; \\
|
|
||||||
( source /root/.bash_profile && make BREAKPOINT=\$(BREAKPOINT) BLFS_TOOL ); \\
|
|
||||||
fi
|
|
||||||
@touch \$@
|
|
||||||
|
|
||||||
SETUP: $host_prep
|
SETUP: $host_prep
|
||||||
AS_LUSER: $cross_tools $temptools ${boottools}
|
AS_LUSER: $cross_tools $temptools ${boottools}
|
||||||
SUDO: $orphan_scripts
|
SUDO: $orphan_scripts
|
||||||
AS_ROOT: SHELL=/tools/bin/bash
|
AS_ROOT: SHELL=/tools/bin/bash
|
||||||
AS_ROOT: $testsuitetools $basicsystem $bootscripttools $bootabletools
|
AS_ROOT: $testsuitetools $basicsystem $bootscripttools $bootabletools
|
||||||
CUSTOM_TOOLS: $custom_list
|
CUSTOM_TOOLS: $custom_list
|
||||||
BLFS_TOOL: $blfs_tool
|
|
||||||
|
|
||||||
do-housekeeping:
|
do-housekeeping:
|
||||||
@-rm /tools /cross-tools
|
@-rm /tools /cross-tools
|
||||||
|
|
Reference in a new issue