HLFS: XSL clean-up,
fixed Glibc commads when the testsuite is not run, and export CONFIG_SITE from inside adjusting script instead of exporting target and ldso from inside settingenvironment target.
This commit is contained in:
parent
31eb678487
commit
3d75bc2362
2 changed files with 20 additions and 64 deletions
|
@ -110,7 +110,6 @@
|
||||||
<xsl:if test="@id='ch-system-uclibc'">
|
<xsl:if test="@id='ch-system-uclibc'">
|
||||||
<xsl:text>pushd ../; tar -xvf gettext-&gettext-version;.*; popd; 
</xsl:text>
|
<xsl:text>pushd ../; tar -xvf gettext-&gettext-version;.*; popd; 
</xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
||||||
<!-- SVN toolchain format, from inside ./sources dir unpack binutils and gcc -->
|
<!-- SVN toolchain format, from inside ./sources dir unpack binutils and gcc -->
|
||||||
<xsl:if test="@id='ch-tools-embryo-toolchain' or
|
<xsl:if test="@id='ch-tools-embryo-toolchain' or
|
||||||
@id='ch-tools-cocoon-toolchain' or
|
@id='ch-tools-cocoon-toolchain' or
|
||||||
|
@ -127,21 +126,6 @@
|
||||||
<xsl:text>tar -xvf gcc-testsuite-&gcc-version;.*; 
</xsl:text>
|
<xsl:text>tar -xvf gcc-testsuite-&gcc-version;.*; 
</xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<!-- END SVN toolchain format -->
|
<!-- END SVN toolchain format -->
|
||||||
|
|
||||||
<!-- 2.4-branch toolchain -->
|
|
||||||
<xsl:if test="@id='ch-tools-gcc-pass2' or @id='ch-system-gcc'">
|
|
||||||
<xsl:text>pushd ../; tar -xvf gcc-g++-&gcc-version;.*; popd; 
</xsl:text>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="@id='ch-system-gcc' and $testsuite != '0'">
|
|
||||||
<xsl:text>pushd ../; tar -xvf gcc-testsuite-&gcc-version;.*; popd; 
</xsl:text>
|
|
||||||
</xsl:if>
|
|
||||||
<!-- END 2.4-branch toolchain -->
|
|
||||||
|
|
||||||
<!-- temporary
|
|
||||||
<xsl:if test="@id='bootable-bootscripts'">
|
|
||||||
<xsl:text>pushd ../; tar -xvf blfs-bootscripts-&blfs-bootscripts-version;.* ; popd; 
</xsl:text>
|
|
||||||
</xsl:if>
|
|
||||||
-->
|
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:apply-templates select=".//para/userinput | .//screen"/>
|
<xsl:apply-templates select=".//para/userinput | .//screen"/>
|
||||||
<xsl:text>exit</xsl:text>
|
<xsl:text>exit</xsl:text>
|
||||||
|
@ -183,28 +167,10 @@
|
||||||
|
|
||||||
<xsl:template match="userinput" mode="screen">
|
<xsl:template match="userinput" mode="screen">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<!-- Estandarized package formats -->
|
|
||||||
<xsl:when test="contains(string(),'tar.gz')">
|
|
||||||
<xsl:value-of select="substring-before(string(),'tar.gz')"/>
|
|
||||||
<xsl:text>tar.*</xsl:text>
|
|
||||||
<xsl:value-of select="substring-after(string(),'tar.gz')"/>
|
|
||||||
<xsl:text>
</xsl:text>
|
|
||||||
</xsl:when>
|
|
||||||
<!-- grsecurity kernel in the host? -->
|
<!-- grsecurity kernel in the host? -->
|
||||||
<xsl:when test="ancestor::sect1[@id='ch-system-kernfs'] and
|
<xsl:when test="ancestor::sect1[@id='ch-system-kernfs'] and
|
||||||
contains(string(),'sysctl')
|
contains(string(),'sysctl')
|
||||||
and $grsecurity_host ='n'"/>
|
and $grsecurity_host ='n'"/>
|
||||||
<!-- We need to have /dev/console and /dev/null availables before
|
|
||||||
entering to the chroot -->
|
|
||||||
<xsl:when test="ancestor::sect1[@id='ch-system-devices'] and
|
|
||||||
contains(string(),'600 /dev/console')"/>
|
|
||||||
<!-- Fix MAKEDEV installation in 2.4-branch -->
|
|
||||||
<xsl:when test="ancestor::sect1[@id='ch-system-devices'] and
|
|
||||||
contains(string(),'bzcat MAKEDEV')">
|
|
||||||
<xsl:text>bzcat /sources/</xsl:text>
|
|
||||||
<xsl:value-of select="substring-after(string(),'bzcat ')"/>
|
|
||||||
<xsl:text>
</xsl:text>
|
|
||||||
</xsl:when>
|
|
||||||
<!-- Setting $LANG for /etc/profile -->
|
<!-- Setting $LANG for /etc/profile -->
|
||||||
<xsl:when test="ancestor::sect1[@id='bootable-profile'] and
|
<xsl:when test="ancestor::sect1[@id='bootable-profile'] and
|
||||||
contains(string(),'export LANG=')">
|
contains(string(),'export LANG=')">
|
||||||
|
@ -214,17 +180,6 @@
|
||||||
<xsl:value-of select="substring-after(string(),'CC]')"/>
|
<xsl:value-of select="substring-after(string(),'CC]')"/>
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:text>
</xsl:text>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<!-- Fixing bootscripts installation -->
|
|
||||||
|
|
||||||
<!-- temporary
|
|
||||||
<xsl:when test="ancestor::sect1[@id='bootable-bootscripts'] and
|
|
||||||
string() = 'make install'">
|
|
||||||
<xsl:text>make install
</xsl:text>
|
|
||||||
<xsl:text>cd ../blfs-bootscripts-&blfs-bootscripts-version;
</xsl:text>
|
|
||||||
</xsl:when>
|
|
||||||
-->
|
|
||||||
<!-- Compile the keymap into the kernel has been dissabled -->
|
|
||||||
<xsl:when test="contains(string(),'defkeymap')"/>
|
|
||||||
<!-- Copying the kernel config file -->
|
<!-- Copying the kernel config file -->
|
||||||
<xsl:when test="string() = 'make mrproper'">
|
<xsl:when test="string() = 'make mrproper'">
|
||||||
<xsl:text>make mrproper
</xsl:text>
|
<xsl:text>make mrproper
</xsl:text>
|
||||||
|
@ -232,6 +187,13 @@
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<!-- No interactive commands are needed if the .config file is the proper one -->
|
<!-- No interactive commands are needed if the .config file is the proper one -->
|
||||||
<xsl:when test="string() = 'make menuconfig'"/>
|
<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>" >> ~/.bashrc
</xsl:text>
|
||||||
|
</xsl:when>
|
||||||
<!-- For uClibc we need to cd to the Gettext package -->
|
<!-- For uClibc we need to cd to the Gettext package -->
|
||||||
<xsl:when test="contains(string(),'cd gettext-runtime/')">
|
<xsl:when test="contains(string(),'cd gettext-runtime/')">
|
||||||
<xsl:text>cd ../gettext-*/gettext-runtime</xsl:text>
|
<xsl:text>cd ../gettext-*/gettext-runtime</xsl:text>
|
||||||
|
@ -272,16 +234,11 @@
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<!-- Fixing butterfly and 2.4-branch toolchain plus other packages test suites run -->
|
<!-- Fixing butterfly toolchain test suite run -->
|
||||||
<xsl:when test="string() = 'make -k check'
|
<xsl:when test="ancestor::sect1[@id='ch-system-butterfly-toolchain']
|
||||||
or string() = 'make check'
|
and string() = 'make -k check'">
|
||||||
or string() = 'make tests'">
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="((ancestor::sect1[@id='ch-system-butterfly-toolchain']
|
<xsl:when test="$testsuite != '0'">
|
||||||
or ancestor::sect1[@id='ch-system-gcc'] or
|
|
||||||
ancestor::sect1[@id='ch-system-binutils'])
|
|
||||||
and $testsuite != '0') or
|
|
||||||
$testsuite = '2' or $testsuite = '3'">
|
|
||||||
<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>make -k check >> $TEST_LOG 2>&1 || true
</xsl:text>
|
||||||
|
@ -299,6 +256,15 @@
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<!-- Fixing Glbc test suite -->
|
<!-- 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>
</xsl:text>
|
||||||
|
</xsl:when>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:when>
|
||||||
<xsl:when test="contains(string(),'glibc-check-log')">
|
<xsl:when test="contains(string(),'glibc-check-log')">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$testsuite != '0'">
|
<xsl:when test="$testsuite != '0'">
|
||||||
|
|
|
@ -93,13 +93,6 @@ chapter3_Makefiles() { # Initialization of the system
|
||||||
|
|
||||||
echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter3 ( SETUP ) ${R_arrow}"
|
echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter3 ( SETUP ) ${R_arrow}"
|
||||||
|
|
||||||
# Define a few model dependant variables
|
|
||||||
if [[ ${MODEL} = "uclibc" ]]; then
|
|
||||||
TARGET="pc-linux-gnu"; LOADER="ld-uClibc.so.0"
|
|
||||||
else
|
|
||||||
TARGET="pc-linux-gnu"; LOADER="ld-linux.so.2"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If $LUSER_HOME is already present in the host, we asume that the
|
# 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
|
# hlfs user and group are also presents in the host, and a backup
|
||||||
# of their bash init files is made.
|
# of their bash init files is made.
|
||||||
|
@ -140,9 +133,6 @@ cat << EOF
|
||||||
echo "PATH=/tools/bin:/bin:/usr/bin" >> \$(LUSER_HOME)/.bashrc && \\
|
echo "PATH=/tools/bin:/bin:/usr/bin" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
echo "export HLFS LC_ALL PATH" >> \$(LUSER_HOME)/.bashrc && \\
|
echo "export HLFS LC_ALL PATH" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
echo "" >> \$(LUSER_HOME)/.bashrc && \\
|
echo "" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
echo "target=$(uname -m)-${TARGET}" >> \$(LUSER_HOME)/.bashrc && \\
|
|
||||||
echo "ldso=/tools/lib/${LOADER}" >> \$(LUSER_HOME)/.bashrc && \\
|
|
||||||
echo "export target ldso" >> \$(LUSER_HOME)/.bashrc && \\
|
|
||||||
echo "source $JHALFSDIR/envars" >> \$(LUSER_HOME)/.bashrc && \\
|
echo "source $JHALFSDIR/envars" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
chown \$(LUSER):\$(LGROUP) \$(LUSER_HOME)/.bashrc && \\
|
chown \$(LUSER):\$(LGROUP) \$(LUSER_HOME)/.bashrc && \\
|
||||||
chmod -R a+wt \$(MOUNT_PT) && \\
|
chmod -R a+wt \$(MOUNT_PT) && \\
|
||||||
|
|
Reference in a new issue