Added HLFS files.

This commit is contained in:
Manuel Canales Esparcia 2006-01-23 20:03:46 +00:00
parent 77349d5ccc
commit aa71d75045
5 changed files with 1822 additions and 0 deletions

230
HLFS/dump-hlfs-scripts.xsl Normal file
View file

@ -0,0 +1,230 @@
<?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 LFS books. -->
<!-- Run optional test suites? -->
<xsl:param name="testsuite" select="0"/>
<!-- Run toolchain test suites? -->
<xsl:param name="toolchaintest" select="1"/>
<!-- Install vim-lang package? -->
<xsl:param name="vim-lang" select="1"/>
<xsl:template match="/">
<xsl:apply-templates select="//sect1"/>
</xsl:template>
<xsl:template match="sect1">
<xsl:if test="count(descendant::screen/userinput) &gt; 0 and
count(descendant::screen/userinput) &gt; count(descendant::screen[@role='nodump'])">
<!-- 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">
<!-- Add a header to each script -->
<xsl:choose>
<xsl:when test="@id='ch-system-changingowner' or
@id='ch-system-creatingdirs' or
@id='ch-system-createfiles'">
<xsl:text>#!/tools/bin/bash&#xA;set -e&#xA;&#xA;</xsl:text>
</xsl:when>
<xsl:when test="@id='ch-tools-stripping' or
@id='ch-system-strippingagain'">
<xsl:text>#!/bin/sh&#xA;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>#!/bin/sh&#xA;set -e&#xA;&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="sect2[@role='installation'] or
@id='ch-tools-adjusting' or
@id='ch-system-readjusting'">
<xsl:text>cd $PKGDIR&#xA;</xsl:text>
<xsl:if test="@id='ch-system-vim' and $vim-lang = '1'">
<xsl:text>tar -xvf ../vim-&vim-version;-lang.* --strip-components=1&#xA;</xsl:text>
</xsl:if>
<xsl:if test="@id='ch-tools-uclibc'">
<xsl:text>pushd ../; tar -xvf gettext-&gettext-version;.*; popd; &#xA;</xsl:text>
</xsl:if>
<xsl:if test="@id='ch-system-uclibc'">
<xsl:text>pushd ../; tar -xvf gettext-&gettext-version;.*; popd; &#xA;</xsl:text>
</xsl:if>
<xsl:if test="@id='ch-system-glibc'">
<xsl:text>tar -xvf ../glibc-libidn-&glibc-version;.*&#xA;</xsl:text>
</xsl:if>
<xsl:if test="@id='ch-tools-glibc'">
<xsl:text>tar -xvf ../glibc-libidn-&glibc-version;.*&#xA;</xsl:text>
</xsl:if>
<xsl:if test="@id='ch-system-gcc'">
<xsl:text>pushd ../; tar -xvf gcc-g++-&gcc-version;.*; popd; &#xA;</xsl:text>
</xsl:if>
<xsl:if test="@id='ch-tools-gcc'">
<xsl:text>pushd ../; tar -xvf gcc-g++-&gcc-version;.*; popd; &#xA;</xsl:text>
</xsl:if>
<xsl:if test="@id='bootable-bootscripts'">
<xsl:text>pushd ../; tar -xvf blfs-bootscripts-&blfs-bootscripts-version;.* ; popd; &#xA;</xsl:text>
</xsl:if>
</xsl:if>
<xsl:apply-templates select=".//para/userinput | .//screen"/>
<xsl:text>exit</xsl:text>
</exsl:document>
</xsl:if>
</xsl:template>
<xsl:template match="screen">
<xsl:if test="child::* = userinput">
<xsl:choose>
<xsl:when test="@role = 'nodump'"/>
<xsl:when test="@condition != $model"/>
<xsl:otherwise>
<xsl:apply-templates select="userinput" mode="screen"/>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template>
<xsl:template match="para/userinput">
<xsl:if test="$testsuite != '0' and
(contains(string(),'test') or contains(string(),'check'))">
<xsl:value-of select="substring-before(string(),'make')"/>
<xsl:text>make -k</xsl:text>
<xsl:value-of select="substring-after(string(),'make')"/>
<xsl:text> || true&#xA;</xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="userinput" mode="screen">
<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>&#xA;</xsl:text>
</xsl:when>
<!-- Avoiding a race condition in a patch -->
<xsl:when test="contains(string(),'debian_fixes')">
<xsl:value-of select="substring-before(string(),'patch')"/>
<xsl:text>patch -Z</xsl:text>
<xsl:value-of select="substring-after(string(),'patch')"/>
<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>
<!-- The Coreutils and Module-Init-Tools test suites are optional -->
<xsl:when test="$testsuite = '0' and
(ancestor::sect1[@id='ch-system-coreutils'] or
ancestor::sect1[@id='ch-system-module-init-tools']) and
(contains(string(),'check') or
contains(string(),'dummy'))"/>
<!-- Fixing toolchain test suites run -->
<xsl:when test="string() = 'make check' or
string() = 'make -k check'">
<xsl:choose>
<xsl:when test="$toolchaintest = '0'"/>
<xsl:otherwise>
<xsl:text>make -k check || true</xsl:text>
<xsl:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="contains(string(),'glibc-check-log')">
<xsl:choose>
<xsl:when test="$toolchaintest = '0'"/>
<xsl:otherwise>
<xsl:value-of select="substring-before(string(),'&#xA;')"/>
<xsl:text> || true&#xA;</xsl:text>
<xsl:value-of select="substring-after(string(),'&#xA;')"/>
<xsl:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="contains(string(),'test_summary') or
contains(string(),'expect -c')">
<xsl:choose>
<xsl:when test="$toolchaintest = '0'"/>
<xsl:otherwise>
<xsl:apply-templates/>
<xsl:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</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>
<!-- Deal with definable values defined inside <replaceable> -->
<xsl:template match="replaceable">
<xsl:choose>
<xsl:when test="ancestor::sect1[@id='ch-system-glibc']">
<xsl:text>$TIMEZONE</xsl:text>
</xsl:when>
<xsl:when test="ancestor::sect1[@id='ch-system-uclibc']">
<xsl:text>$TIMEZONE</xsl:text>
</xsl:when>
<xsl:when test="ancestor::sect1[@id='ch-system-groff']">
<xsl:text>$PAGE</xsl:text>
</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>

59
HLFS/hlfs-functions Normal file
View file

@ -0,0 +1,59 @@
BOLD= ""
RED= ""
GREEN= ""
ORANGE= ""
BLUE= ""
WHITE= ""
define echo_message
@echo $(BOLD)
@echo --------------------------------------------------------------------------------
@echo $(BOLD)$(1) target $(BLUE)$@$(BOLD)
@echo --------------------------------------------------------------------------------$(WHITE)
endef
define unpack
@if [ -f $(HLFS)$(SRC)/$(1).bz2 ] ; then \
cd $(HLFS)$(SRC) ; tar -xvjf $(1).bz2 > /tmp/unpacked ; \
else \
cd $(HLFS)$(SRC) ; tar -xvzf $(1).gz > /tmp/unpacked ; \
fi ;
endef
define unpack2
@cd $(HLFS)$(SRC) ; /tools/bin/tar -xvf $(1) > /tmp/unpacked
endef
define echo_finished
@echo $(BOLD)
@echo --------------------------------------------------------------------------------
@echo $(BOLD) Finished the build of $(BLUE)HLFS-$(1)$(BOLD)
@echo --------------------------------------------------------------------------------
@echo -e \\t\\t$(RED)W A R N I N G$(BOLD)
@echo --------------------------------------------------------------------------------
@echo
@echo To be able to boot your new HLFS system you need to follow
@echo the next steps:$(WHITE)
@echo
@echo -e \\t- Enter to the chroot using the command found
@echo -e \\tin chapter06/revisedchroot.html
@echo
@echo -e \\t- Set a password for the root user
@echo
@echo -e \\t- Edit /etc/fstab, /etc/hosts, /etc/sysconfig/clock,
@echo -e \\t/etc/sysconfig/console, /etc/sysconfig/network,
@echo -e \\t/etc/sysconfig//network-devices/ifconfig.eth0/ipv4 and
@echo -e \\tany other configuration file required to suit your needs.
@echo
@echo -e \\t- Set-up Grub. See chapter08/grub.html
@echo
@echo -e \\t- Unmount the filesystems.
@echo
@echo If you are an experienced HLFS user, several of those steps can be
@echo skipped or done in a different way. But then, that is something
@echo that you already know and there is no need to discuss it here.
@echo $(BOLD)
@echo --------------------------------------------------------------------------------
@echo -e \\t\\t$(GREEN)Have a nice day $(ORANGE):-\)$(BOLD)
@echo --------------------------------------------------------------------------------$(WHITE)
endef

View file

@ -0,0 +1,25 @@
<?xml version='1.0' encoding='ISO-8859-1'?>
<!-- Get list of patch files from the BLFS Book -->
<!-- $LastChangedBy: bdubbs $ -->
<!-- $Date$ -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text"/>
<!-- No text needed -->
<xsl:template match="//text()">
<xsl:text/>
</xsl:template>
<!-- Just grab the url from the ulink tags that have .patch in the name -->
<xsl:template match="//ulink">
<xsl:if test="contains(@url, '.patch') or contains(@url, '.patch.gz') and contains(@url, 'linuxfromscratch')">
<xsl:value-of select="@url"/>
<xsl:text>&#x0a;</xsl:text>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

1426
HLFS/jhahlfs Normal file

File diff suppressed because it is too large Load diff

82
HLFS/jhahlfs.conf Normal file
View file

@ -0,0 +1,82 @@
#####
#
# Configuration file for the jhahlfs build script
#
#####
declare -r SVN="svn://svn.linuxfromscratch.org"
declare -r HTTP=http://ftp.lfs-matrix.net/pub/lfs/conglomeration
declare -r LOG=000-jhahlfs.log
#--- Mount point for the build
BUILDDIR=/mnt/hlfs
#--- Download the source packages 0(no)/1(yes)
HPKG=0
#--- Run the makefile at the end 0(no)/1(yes)
RUNMAKE=0
#--- Run test suites 0(no)/1(yes)
TEST=0
#--- Run the toolchain tests 0(no)/1(yes)
TOOLCHAINTEST=0
#--- Run the stripping phases 0(no)/1(yes)
STRIP=1
#--- page definition for groff letter/A4
PAGE=letter
#--- set default timezone.
TIMEZONE=America/Toronto
#--- install the optional vim-lang package 0(no)/1(yes)
VIMLANG=0
#--- Location of fstab file (if empty, a template is created)
FSTAB=
#--- Location of kernel config file (if the kernel is to be compiled)
CONFIG=
#--- Which library model to use uclibc/glibc
MODEL=glibc
#--- The host system has grsecurity options enabled 0(no)/1(yes)
GRSECURITY_HOST=0
#--- Language information, /etc/profile see <locale -a> for values
LC_ALL=en_CA
LANG=en_CA
#--- Include the keymap in the kernel if defined
KEYMAP=/usr/share/kbd/keymaps/i386/qwerty/us.map.gz
#--- Book's sources directory
# If you have previously checked out the book from the repository
BOOK=
#==== INTERNAL VARIABLES ====
# Don't edit it unless you know what you are doing
#--- Default stylesheet
XSL=dump-hlfs-scripts.xsl
#--- Files that will be copied to $JHAHLFSDIR
FILES="hlfs-functions dump-hlfs-scripts.xsl hlfs-patcheslist_.xsl"
#--- Working directories
JHAHLFSDIR=$BUILDDIR/jhahlfs
LOGDIR=$JHAHLFSDIR/logs
MKFILE=$JHAHLFSDIR/Makefile
#--- FTP/HTTP mirror used as fallback (full path)
SERVER=ftp://anduin.linuxfromscratch.org/LFS/conglomeration
#--- Book version
HLFSVRS=development