Compare commits
25 Commits
mihari-dev
...
0.2
Author | SHA1 | Date |
---|---|---|
Jeremy Huntwork | 7a188359e0 | |
Jeremy Huntwork | 0d5eabf34b | |
Manuel Canales Esparcia | aecc799c07 | |
Jeremy Huntwork | dc1a4e5823 | |
Jeremy Huntwork | c197d9d748 | |
Jeremy Huntwork | 61784cd7f2 | |
Manuel Canales Esparcia | 1db9dcac6d | |
Manuel Canales Esparcia | b6ca3232fb | |
Manuel Canales Esparcia | 171c81e985 | |
Manuel Canales Esparcia | 8fa84cf91b | |
Manuel Canales Esparcia | 2c0c4f2ea1 | |
Manuel Canales Esparcia | c5631746c0 | |
Manuel Canales Esparcia | 478880ce1d | |
Manuel Canales Esparcia | eb81473807 | |
Manuel Canales Esparcia | fc159995d6 | |
Manuel Canales Esparcia | 4b7dde9ba4 | |
Manuel Canales Esparcia | 7178cdc1b7 | |
Jeremy Huntwork | 316b8d79e5 | |
Jeremy Huntwork | 7f49a8c0a0 | |
Manuel Canales Esparcia | 7ad4ef58e9 | |
Manuel Canales Esparcia | 0b02bb13aa | |
Manuel Canales Esparcia | 98d09b095e | |
Manuel Canales Esparcia | 1b6959eaf7 | |
Jeremy Huntwork | 42ddaf8260 | |
Jeremy Huntwork | 01d3d405c6 |
2
INSTALL
2
INSTALL
|
@ -17,7 +17,7 @@ make install
|
|||
|
||||
That will install the jhalfs script under /usr/bin, the
|
||||
configuration file under /etc/jhalfs, and the style sheet,
|
||||
functions and README files under /usr/share/jhalfs.
|
||||
functions, README, and LICENSE files under /usr/share/jhalfs.
|
||||
|
||||
To customize the installation locations, the following environment
|
||||
variables can be used:
|
||||
|
|
7
Makefile
7
Makefile
|
@ -1,12 +1,13 @@
|
|||
# Makefile to install jhalfs system-wide
|
||||
|
||||
# Where the files will be installed
|
||||
BIN=/usr/bin
|
||||
PREFIX=/usr
|
||||
BIN=$(PREFIX)/bin
|
||||
CONFIG=/etc/jhalfs
|
||||
DATA=/usr/share/jhalfs
|
||||
DATA=$(PREFIX)/share/jhalfs
|
||||
|
||||
# List of additional files
|
||||
DATAFILES=functions dump-lfs-scripts.xsl README
|
||||
DATAFILES=functions dump-lfs-scripts.xsl README LICENSE
|
||||
|
||||
install:
|
||||
install -v -d $(BIN)
|
||||
|
|
2
README
2
README
|
@ -1,4 +1,4 @@
|
|||
jhalfs 0.2
|
||||
jhalfs 0.2-pre1
|
||||
|
||||
The purpose of jhalfs is to provide a pure automated build of Linux From
|
||||
Scratch. It does this by extracting the necessary commands and information
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
<?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"
|
||||
|
@ -12,6 +17,9 @@
|
|||
<!-- 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>
|
||||
|
@ -65,6 +73,9 @@
|
|||
@id='ch-tools-adjusting' or
|
||||
@id='ch-system-readjusting'">
|
||||
<xsl:text>cd $PKGDIR
</xsl:text>
|
||||
<xsl:if test="@id='ch-system-vim' and $vim-lang = '1'">
|
||||
<xsl:text>tar -xvf ../vim-&vim-version;-lang.* --strip-components=1
</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select=".//para/userinput | .//screen"/>
|
||||
<xsl:text>exit</xsl:text>
|
||||
|
@ -115,9 +126,10 @@
|
|||
<xsl:text>make mrproper
</xsl:text>
|
||||
<xsl:text>cp -v ../kernel-config .config
</xsl:text>
|
||||
</xsl:when>
|
||||
<!-- The Coreutils test suite is optional -->
|
||||
<!-- The Coreutils and Module-Init-Tools test suites are optional -->
|
||||
<xsl:when test="$testsuite = '0' and
|
||||
ancestor::sect1[@id='ch-system-coreutils'] 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 -->
|
||||
|
|
22
functions
22
functions
|
@ -1,14 +1,14 @@
|
|||
BRW= "[0;1m"
|
||||
RED= "[0;31m"
|
||||
BOLD= "[0;1m"
|
||||
RED= "[1;31m"
|
||||
GREEN= "[0;32m"
|
||||
ORANGE= "[0;33m"
|
||||
BLUE= "[1;34m"
|
||||
WHITE= "[00m"
|
||||
|
||||
define echo_message
|
||||
@echo $(BRW)
|
||||
@echo $(BOLD)
|
||||
@echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@echo $(BRW)$(1) target $(BLUE)$@$(BRW)
|
||||
@echo $(BOLD)$(1) target $(BLUE)$@$(BOLD)
|
||||
@echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~$(WHITE)
|
||||
endef
|
||||
|
||||
|
@ -25,11 +25,11 @@ define unpack2
|
|||
endef
|
||||
|
||||
define echo_finished
|
||||
@echo $(BRW)
|
||||
@echo $(BOLD)
|
||||
@echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@echo $(BRW)Finished the build of $(BLUE)LFS-$(1)$(BRW)
|
||||
@echo $(BOLD) Finished the build of $(BLUE)LFS-$(1)$(BOLD)
|
||||
@echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@echo -e \\t\\t$(RED)W A R N I N G$(BRW)
|
||||
@echo -e \\t\\t$(RED)W A R N I N G$(BOLD)
|
||||
@echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@echo
|
||||
@echo To be able to boot your new LFS system you need to follow
|
||||
|
@ -42,8 +42,8 @@ define echo_finished
|
|||
@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/ifconfig.eth0/ipv4 and any other configuration
|
||||
@echo -e \\tfile required to suit your needs.
|
||||
@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
|
||||
|
@ -52,8 +52,8 @@ define echo_finished
|
|||
@echo If you are an experienced LFS 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 $(BRW)
|
||||
@echo $(BOLD)
|
||||
@echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@echo -e \\t\\t$(GREEN)Have a nice day $(ORANGE):-\)$(BRW)
|
||||
@echo -e \\t\\t$(GREEN)Have a nice day $(ORANGE):-\)$(BOLD)
|
||||
@echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~$(WHITE)
|
||||
endef
|
||||
|
|
215
jhalfs
215
jhalfs
|
@ -7,7 +7,7 @@ source jhalfs.conf
|
|||
|
||||
|
||||
version="
|
||||
jhalfs development \$Date$
|
||||
jhalfs 0.2-pre1 \$Date$
|
||||
|
||||
Written by Jeremy Huntwork and Manuel Canales Esparcia.
|
||||
|
||||
|
@ -27,6 +27,11 @@ Options:
|
|||
jhalfs produces will be in the directory
|
||||
DIR/jhalfs. Default is \"/mnt/lfs\".
|
||||
|
||||
--rebuild clean the build directory before to perfom
|
||||
any other task. The directory is cleaned
|
||||
only if it was populated by a previous
|
||||
jhalfs run.
|
||||
|
||||
-P, --get-packages download the packages and patches. This
|
||||
assumes that the server declared in the
|
||||
jhalfs.conf file has the proper packages
|
||||
|
@ -39,7 +44,7 @@ Options:
|
|||
-W, --working-copy DIR use the local working copy placed in DIR
|
||||
as the LFS book
|
||||
|
||||
-L, --LFS-version VER ckeckout VER version of the LFS book.
|
||||
-L, --LFS-version VER checkout VER version of the LFS book.
|
||||
Supported versions at this time are:
|
||||
|
||||
dev* | trunk | SVN aliases for Development LFS
|
||||
|
@ -51,6 +56,9 @@ Options:
|
|||
also disables the build of TCL, Expect
|
||||
and DejaGNU
|
||||
|
||||
--no-strip don't run the strip command on both the
|
||||
temporary system and the final system
|
||||
|
||||
--timezone TIMEZONE set TIMEZONE as the local timezone. If not
|
||||
specified, \"Europe/London\" will be used.
|
||||
|
||||
|
@ -63,6 +71,8 @@ Options:
|
|||
LFS system. If not specified, a default
|
||||
/etc/fstab file with dummy values is
|
||||
created.
|
||||
|
||||
--no-vim-lang don't install the optional vim-lang package
|
||||
|
||||
-C, --kernel-config FILE use the kernel configuration file specified
|
||||
in FILE to build the kernel. If the file is
|
||||
|
@ -76,6 +86,18 @@ Options:
|
|||
help="\
|
||||
Try '$0 --help' for more information."
|
||||
|
||||
no_empty_builddir="\
|
||||
echo \"\" >&2
|
||||
echo \" W A R N I N G\" >&2
|
||||
echo \"\" >&2
|
||||
echo \"Looks like the \$BUILDDIR directory contains subdirectories\" >&2
|
||||
echo \"from a previous LFS build.\" >&2
|
||||
echo \"\" >&2
|
||||
echo \"Please format the partition mounted on \$BUILDDIR or set\" >&2
|
||||
echo \"a diferent build directory before running jhalfs.\" >&2
|
||||
echo \"\" >&2
|
||||
exit 1"
|
||||
|
||||
exit_missing_arg="\
|
||||
echo \"Option '\$1' requires an argument\" >&2
|
||||
echo \"\$help\" >&2
|
||||
|
@ -85,7 +107,6 @@ no_dl_client="\
|
|||
echo \"Could not find a way to download the LFS sources.\" >&2
|
||||
echo \"Attempting to continue.\" >&2"
|
||||
|
||||
|
||||
HEADER="# This file is automatically generated by jhalfs
|
||||
# DO NOT EDIT THIS FILE MANUALLY
|
||||
#
|
||||
|
@ -97,6 +118,33 @@ HEADER="# This file is automatically generated by jhalfs
|
|||
###################################
|
||||
|
||||
|
||||
#----------------------------#
|
||||
clean_builddir() {
|
||||
#----------------------------#
|
||||
# Test if the clean must be done.
|
||||
if [ "$CLEAN" = "1" ] ; then
|
||||
# Test to make sure we're running the clean as root
|
||||
if [ "$UID" != "0" ] ; then
|
||||
echo "You must be logged in as root to clean the build directory."
|
||||
exit 1
|
||||
fi
|
||||
# Test to make sure that the build directory was populated by jhalfs
|
||||
if [ ! -d $JHALFSDIR ] || [ ! -d $BUILDDIR/sources ] ; then
|
||||
echo "Look like $BUILDDIR was not populated by a previous jhalfs run."
|
||||
exit 1
|
||||
else
|
||||
# Clean the build directory
|
||||
echo -ne "Cleaning $BUILDDIR...\n"
|
||||
rm -rf $BUILDDIR/{bin,boot,dev,etc,home,lib,media,mnt,opt,proc,root,sbin,srv,sys,tmp,tools,usr,var}
|
||||
echo -ne "Cleaning $JHALFSDIR...\n"
|
||||
rm -rf $JHALFSDIR/{0*,1*,envars,sources-dir,commands,logs,Makefile,dump-lfs-scripts.xsl,functions,packages,patches}
|
||||
echo -ne "Cleaning remainig extracted sources in $BUILDDIR/sources...\n"
|
||||
rm -rf `find $BUILDDIR/sources/* -maxdepth 0 -type d`
|
||||
echo -ne "done\n"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
#----------------------------#
|
||||
get_book() {
|
||||
#----------------------------#
|
||||
|
@ -105,12 +153,6 @@ get_book() {
|
|||
exit 1"
|
||||
cd $JHALFSDIR
|
||||
|
||||
# Test to make sure the LFS version is set
|
||||
if [ -z $LFSVRS ] ; then LFSVRS=development ; fi
|
||||
|
||||
# Set the book's sources directory
|
||||
if [ -z $BOOK ] ; then BOOK=lfs-$LFSVRS ; fi
|
||||
|
||||
if [ -z $WC ] ; then
|
||||
echo -n "Downloading the LFS Book, version $LFSVRS... "
|
||||
|
||||
|
@ -122,27 +164,39 @@ get_book() {
|
|||
if svn up | grep -q At && test -d $JHALFSDIR/commands && \
|
||||
test -f $JHALFSDIR/packages && test -f $JHALFSDIR/patches ; then
|
||||
echo -ne "done\n"
|
||||
# Set the canonical book version
|
||||
cd $JHALFSDIR
|
||||
VERSION=`grep "ENTITY version " $BOOK/general.ent | sed 's@<!ENTITY version "@@;s@">@@'`
|
||||
get_sources
|
||||
else
|
||||
echo -ne "done\n"
|
||||
# Set the canonical book version
|
||||
cd $JHALFSDIR
|
||||
VERSION=`grep "ENTITY version " $BOOK/general.ent | sed 's@<!ENTITY version "@@;s@">@@'`
|
||||
extract_commands
|
||||
fi
|
||||
else
|
||||
if [ $LFSVRS = development ] ; then
|
||||
svn co $SVN/LFS/trunk/BOOK lfs-$LFSVRS >>$LOGDIR/$LOG 2>&1
|
||||
else
|
||||
svn co $SVN/LFS/branches/$LFSVRS/BOOK lfs-$LFSVRS >>$LOGDIR/$LOG 2>&1
|
||||
fi
|
||||
case $LFSVRS in
|
||||
development)
|
||||
svn co $SVN/LFS/trunk/BOOK lfs-$LFSVRS >>$LOGDIR/$LOG 2>&1 ;;
|
||||
alphabetical)
|
||||
svn co $SVN/LFS/branches/$LFSVRS/BOOK lfs-$LFSVRS >>$LOGDIR/$LOG 2>&1 ;;
|
||||
6.1.1)
|
||||
svn co $SVN/LFS/tags/$LFSVRS/BOOK lfs-$LFSVRS >>$LOGDIR/$LOG 2>&1 ;;
|
||||
esac
|
||||
echo -ne "done\n"
|
||||
# Set the canonical book version
|
||||
cd $JHALFSDIR
|
||||
VERSION=`grep "ENTITY version " $BOOK/general.ent | sed 's@<!ENTITY version "@@;s@">@@'`
|
||||
extract_commands
|
||||
fi
|
||||
else
|
||||
echo -ne "Using $BOOK as book's sources ...\n"
|
||||
# Set the canonical book version
|
||||
cd $JHALFSDIR
|
||||
VERSION=`grep "ENTITY version " $BOOK/general.ent | sed 's@<!ENTITY version "@@;s@">@@'`
|
||||
extract_commands
|
||||
fi
|
||||
# Set the canonical book version
|
||||
cd $JHALFSDIR
|
||||
VERSION=`grep "ENTITY version " $BOOK/general.ent | sed -e 's@<!ENTITY version "@@' -e 's@">@@'`
|
||||
}
|
||||
|
||||
#----------------------------#
|
||||
|
@ -159,8 +213,8 @@ extract_commands() {
|
|||
|
||||
# Dump the commands in shell script form from the LFS book.
|
||||
xsltproc --nonet --xinclude --stringparam testsuite $TEST \
|
||||
--stringparam toolchaintest $TOOLCHAINTEST -o ./commands/ \
|
||||
$XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1
|
||||
--stringparam toolchaintest $TOOLCHAINTEST --stringparam vim-lang $VIMLANG \
|
||||
-o ./commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1
|
||||
|
||||
# Make the scripts executable.
|
||||
chmod -R +x $JHALFSDIR/commands
|
||||
|
@ -170,8 +224,20 @@ extract_commands() {
|
|||
for i in patches packages ; do rm -f $i ; done
|
||||
grep "\-version" $BOOK/general.ent | sed -e 's@<!ENTITY @@' -e 's@">@"@' \
|
||||
-e '/generic/d' >> packages
|
||||
echo `grep "glibc" packages | sed 's@glibc@glibc-linuxthreads@'` >> packages
|
||||
# Download the vim-lang package if it must be installed
|
||||
if [ "$VIMLANG" = "1" ] ; then
|
||||
echo `grep "vim" packages | sed 's@vim@&-lang@'` >> packages
|
||||
fi
|
||||
echo `grep "udev-config-file" $BOOK/general.ent | sed -e 's@<!ENTITY @@' -e 's@">@"@'` >> packages
|
||||
# This two packages are needed only for 6.1.1
|
||||
if [ "$LFSVRS" = "6.1.1" ] ; then
|
||||
echo `grep "glibc" packages | sed 's@glibc@&-linuxthreads@'` >> packages
|
||||
# Download the module-init-tools-testsuite package only
|
||||
# if the test suite will be run.
|
||||
if [ "$TEST" = "1" ] ; then
|
||||
echo `grep "module" packages | sed 's@tools@&-testsuite@'` >> packages
|
||||
fi
|
||||
fi
|
||||
# If we are buildind the UTF-8 branch, the glibc-libidn package is required
|
||||
if grep -q "man-db-version" $BOOK/general.ent ; then
|
||||
echo `grep "glibc" packages | sed 's@glibc@glibc-libidn@'` >> packages
|
||||
|
@ -188,9 +254,10 @@ download() {
|
|||
#----------------------------#
|
||||
cd $BUILDDIR/sources
|
||||
|
||||
# Hackish fix for the bash-doc and glibc-{linuxthreads,libidn} packages that
|
||||
# doesn't conform to norms in the URL scheme.
|
||||
DIR=`echo $1 | sed -e 's@-doc@@' -e 's@-linuxthreads@@' -e 's@-libidn@@'`
|
||||
# Hackish fix for the bash-doc, glibc-{linuxthreads,libidn} and
|
||||
# module-init-tools-testsuite packages that doesn't conform to
|
||||
# norms in the URL scheme.
|
||||
DIR=`echo $1 | sed 's@-doc@@;s@-linuxthreads@@;s@-libidn@@;s@-testsuite@@'`
|
||||
|
||||
# Find the md5 sum for this package.
|
||||
if [ $2 != MD5SUMS ] ; then MD5=`grep " $2" MD5SUMS` ; fi
|
||||
|
@ -223,6 +290,9 @@ download() {
|
|||
if [ $2 != MD5SUMS ] && ! echo "$MD5" | md5sum -c - ; then
|
||||
exit 1
|
||||
fi
|
||||
if [ $2 != MD5SUMS ] ; then
|
||||
echo `grep "$MD5" MD5SUMS` >> MD5SUMS-$VERSION
|
||||
fi
|
||||
}
|
||||
|
||||
#----------------------------#
|
||||
|
@ -241,6 +311,7 @@ get_sources() {
|
|||
if [ ! -d $BUILDDIR/sources ] ; then mkdir $BUILDDIR/sources ; fi
|
||||
cd $BUILDDIR/sources
|
||||
if [ -f MD5SUMS ] ; then rm MD5SUMS ; fi
|
||||
if [ -f MD5SUMS-$VERSION ] ; then rm MD5SUMS-$VERSION ; fi
|
||||
|
||||
download "" MD5SUMS
|
||||
|
||||
|
@ -256,6 +327,9 @@ get_sources() {
|
|||
VRS=`echo $i | sed -e 's/.* //' -e 's/"//g'`
|
||||
if [ "$PKG" = "tcl" ] ; then
|
||||
FILE="$PKG$VRS-src.tar.bz2"
|
||||
elif [ "$PKG" = "vim-lang" ] ; then
|
||||
PKG="vim"
|
||||
FILE="vim-$VRS-lang.tar.bz2"
|
||||
elif [ "$PKG" = "udev-config" ] ; then
|
||||
PKG="udev"
|
||||
FILE="$VRS"
|
||||
|
@ -291,24 +365,39 @@ _IS_() # Function to test build scripts names
|
|||
#----------------------------#
|
||||
chapter4_Makefiles() {
|
||||
#----------------------------#
|
||||
|
||||
# If /home/lfs is already present in the host, we asume that the
|
||||
# lfs 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 -v \$(LFS)/tools && \\
|
||||
rm -fv /tools && \\
|
||||
ln -sv \$(LFS)/tools / && \\
|
||||
touch \$@
|
||||
|
||||
021-addinguser: 020-creatingtoolsdir
|
||||
@\$(call echo_message, Building)
|
||||
@groupadd lfs && \\
|
||||
useradd -s /bin/bash -g lfs -m -k /dev/null lfs && \\
|
||||
chown lfs \$(LFS)/tools && \\
|
||||
@if [ ! -d /home/lfs ]; then \\
|
||||
groupadd lfs; \\
|
||||
useradd -s /bin/bash -g lfs -m -k /dev/null lfs; \\
|
||||
else \\
|
||||
touch user-lfs-exist; \\
|
||||
fi;
|
||||
@chown lfs \$(LFS)/tools && \\
|
||||
chown lfs \$(LFS)/sources && \\
|
||||
touch \$@
|
||||
|
||||
022-settingenvironment: 021-addinguser
|
||||
@\$(call echo_message, Building)
|
||||
@if [ -f /home/lfs/.bashrc -a ! -f /home/lfs/.bashrc.XXX ]; then \\
|
||||
mv -v /home/lfs/.bashrc /home/lfs/.bashrc.XXX; \\
|
||||
fi;
|
||||
@if [ -f /home/lfs/.bash_profile -a ! -f /home/lfs/.bash_profile.XXX ]; then \\
|
||||
mv -v /home/lfs/.bash_profile /home/lfs/.bash_profile.XXX; \\
|
||||
fi;
|
||||
@echo "set +h" > /home/lfs/.bashrc && \\
|
||||
echo "umask 022" >> /home/lfs/.bashrc && \\
|
||||
echo "LFS=/mnt/lfs" >> /home/lfs/.bashrc && \\
|
||||
|
@ -337,6 +426,11 @@ chapter5_Makefiles() {
|
|||
fi
|
||||
fi
|
||||
|
||||
# Test if the stripping phase must be skipped
|
||||
if [ "$STRIP" = "0" ] && [[ `_IS_ $i stripping` ]] ; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# First append each name of the script files to a list (this will become
|
||||
# the names of the targets in the Makefile
|
||||
chapter5="$chapter5 $i"
|
||||
|
@ -493,6 +587,11 @@ chapter6_Makefiles() {
|
|||
continue
|
||||
fi
|
||||
|
||||
# Test if the stripping phase must be skipped
|
||||
if [ "$STRIP" = "0" ] && [[ `_IS_ $i stripping` ]] ; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# First append each name of the script files to a list (this will become
|
||||
# the names of the targets in the Makefile
|
||||
chapter6="$chapter6 $i"
|
||||
|
@ -772,28 +871,30 @@ all: chapter4 chapter5 chapter6 chapter789
|
|||
|
||||
chapter4: 020-creatingtoolsdir 021-addinguser 022-settingenvironment
|
||||
|
||||
chapter5: chapter4 $chapter5
|
||||
chapter5: chapter4 $chapter5 restore-lfs-env
|
||||
|
||||
chapter6: chapter5 $chapter6
|
||||
|
||||
chapter789: chapter6 $chapter789
|
||||
|
||||
clean-all: clean
|
||||
rm -rf ./*
|
||||
rm -rf ./{commands,logs,Makefile,dump-lfs-scripts.xsl,functions,packages,patches}
|
||||
|
||||
clean: clean-chapter789 clean-chapter6 clean-chapter5 clean-chapter4
|
||||
|
||||
clean-chapter4:
|
||||
-userdel lfs
|
||||
rm -rf /home/lfs
|
||||
-if [ ! -f user-lfs-exist ]; then \\
|
||||
userdel lfs; \\
|
||||
rm -rf /home/lfs; \\
|
||||
fi;
|
||||
rm -rf \$(LFS)/tools
|
||||
rm -f /tools
|
||||
rm -f envars
|
||||
rm -f envars user-lfs-exist
|
||||
rm -f 02* logs/02*.log
|
||||
|
||||
clean-chapter5:
|
||||
rm -rf \$(LFS)/tools/*
|
||||
rm -f $chapter5
|
||||
rm -f $chapter5 restore-lfs-env sources-dir
|
||||
cd logs && rm -f $chapter5 && cd ..
|
||||
|
||||
clean-chapter6:
|
||||
|
@ -810,6 +911,16 @@ clean-chapter789:
|
|||
rm -f $chapter789
|
||||
cd logs && rm -f $chapter789 && cd ..
|
||||
|
||||
restore-lfs-env:
|
||||
@\$(call echo_message, Building)
|
||||
@if [ -f /home/lfs/.bashrc.XXX ]; then \\
|
||||
mv -fv /home/lfs/.bashrc.XXX /home/lfs/.bashrc; \\
|
||||
fi;
|
||||
@if [ -f /home/lfs/.bash_profile.XXX ]; then \\
|
||||
mv -v /home/lfs/.bash_profile.XXX /home/lfs/.bash_profile; \\
|
||||
fi;
|
||||
@chown lfs:lfs /home/lfs/.bash* && \\
|
||||
touch \$@
|
||||
|
||||
EOF
|
||||
) >> $MKFILE
|
||||
|
@ -866,9 +977,13 @@ while test $# -gt 0 ; do
|
|||
dev* | SVN | trunk )
|
||||
LFSVRS=development
|
||||
;;
|
||||
testing | 6.1.1 )
|
||||
6.1.1 )
|
||||
LFSVRS=6.1.1
|
||||
;;
|
||||
|
||||
alpha*)
|
||||
LFSVRS=alphabetical
|
||||
;;
|
||||
* )
|
||||
echo "$1 is an unsupported version at this time."
|
||||
exit 1
|
||||
|
@ -880,8 +995,13 @@ while test $# -gt 0 ; do
|
|||
test $# = 1 && eval "$exit_missing_arg"
|
||||
shift
|
||||
BUILDDIR=$1
|
||||
JHALFSDIR=$BUILDDIR/jhalfs
|
||||
LOGDIR=$JHALFSDIR/logs
|
||||
MKFILE=$JHALFSDIR/Makefile
|
||||
;;
|
||||
|
||||
--rebuild ) CLEAN=1 ;;
|
||||
|
||||
--download-client | -D )
|
||||
test $# = 1 && eval "$exit_missing_arg"
|
||||
shift
|
||||
|
@ -908,6 +1028,10 @@ while test $# -gt 0 ; do
|
|||
--run-make | -M ) RUNMAKE=1 ;;
|
||||
|
||||
--no-toolchain-test ) TOOLCHAINTEST=0 ;;
|
||||
|
||||
--no-strip ) STRIP=0 ;;
|
||||
|
||||
--no-vim-lang ) VIMLANG=0 ;;
|
||||
|
||||
--page_size )
|
||||
test $# = 1 && eval "$exit_missing_arg"
|
||||
|
@ -966,6 +1090,23 @@ while test $# -gt 0 ; do
|
|||
shift
|
||||
done
|
||||
|
||||
# Prevents setting "-d /" by mistake.
|
||||
|
||||
if [ $BUILDDIR = / ] ; then
|
||||
echo -ne "\nThe root directory can't be used to build LFS.\n\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# If $BUILDDIR have subdirectories like tools/ or bin/, stop the run
|
||||
# and notify the user about that.
|
||||
|
||||
if [ -d $BUILDDIR/tools -o -d $BUILDDIR/bin ] && [ -z $CLEAN ] ; then
|
||||
eval "$no_empty_builddir"
|
||||
fi
|
||||
|
||||
# If requested, clean the build directory
|
||||
clean_builddir
|
||||
|
||||
# Find the download client to use, if not already specified.
|
||||
|
||||
if [ -z $DL ] ; then
|
||||
|
@ -978,8 +1119,14 @@ if [ -z $DL ] ; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if [ -z $BOOK ] ; then
|
||||
BOOK=lfs-$LFSVRS
|
||||
fi
|
||||
|
||||
[[ ! -d $JHALFSDIR ]] && mkdir -pv $JHALFSDIR
|
||||
[[ "$PWD" != "$JHALFSDIR" ]] && cp -v $FILES $JHALFSDIR/
|
||||
[[ "$PWD" != "$JHALFSDIR" ]] && cp -v $FILES $JHALFSDIR/ && \
|
||||
sed 's,FAKEDIR,'$BOOK',' $XSL > $JHALFSDIR/dump-lfs-scripts.xsl && \
|
||||
export XSL=$JHALFSDIR/dump-lfs-scripts.xsl
|
||||
[[ ! -d $LOGDIR ]] && mkdir -v $LOGDIR
|
||||
>$LOGDIR/$LOG
|
||||
|
||||
|
|
|
@ -7,10 +7,10 @@ Description: Allow jhalfs to work with a md5sum program
|
|||
that doesn't accept '-' as a filename, like the one shipped with
|
||||
Debian 3.1 stable.
|
||||
|
||||
--- jhalfs.orig 2005-11-01 07:10:00.104763416 -0500
|
||||
+++ jhalfs 2005-11-01 07:10:02.472416413 -0500
|
||||
@@ -192,9 +192,12 @@
|
||||
DIR=`echo $1 | sed -e 's@-doc@@' -e 's@-linuxthreads@@' -e 's@-libidn@@'`
|
||||
--- jhalfs.orig 2005-12-01 00:57:13.000000000 +0000
|
||||
+++ jhalfs 2005-12-01 00:57:26.000000000 +0000
|
||||
@@ -260,9 +260,12 @@
|
||||
DIR=`echo $1 | sed 's@-doc@@;s@-linuxthreads@@;s@-libidn@@;s@-testsuite@@'`
|
||||
|
||||
# Find the md5 sum for this package.
|
||||
- if [ $2 != MD5SUMS ] ; then MD5=`grep " $2" MD5SUMS` ; fi
|
||||
|
@ -24,7 +24,7 @@ Debian 3.1 stable.
|
|||
case $DL in
|
||||
wget )
|
||||
wget $HTTP/$DIR/$2
|
||||
@@ -206,7 +209,7 @@
|
||||
@@ -274,7 +277,7 @@
|
||||
echo "$DL not supported at this time."
|
||||
;;
|
||||
esac
|
||||
|
@ -33,7 +33,7 @@ Debian 3.1 stable.
|
|||
case $DL in
|
||||
wget )
|
||||
wget -c $HTTP/$DIR/$2
|
||||
@@ -219,8 +222,11 @@
|
||||
@@ -287,8 +290,11 @@
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
@ -45,5 +45,5 @@ Debian 3.1 stable.
|
|||
+ exit 1
|
||||
+ fi
|
||||
fi
|
||||
}
|
||||
|
||||
if [ $2 != MD5SUMS ] ; then
|
||||
echo `grep "$MD5" MD5SUMS` >> MD5SUMS-$VERSION
|
||||
|
|
43
jhalfs.conf
43
jhalfs.conf
|
@ -5,21 +5,12 @@
|
|||
#####
|
||||
|
||||
declare -r SVN="svn://svn.linuxfromscratch.org"
|
||||
declare -r HTTP=http://ftp.lfs-matrix.net/pub/lfs/lfs-packages/conglomeration
|
||||
declare -r XSL=dump-lfs-scripts.xsl
|
||||
declare -r HTTP=http://ftp.lfs-matrix.net/pub/lfs/conglomeration
|
||||
declare -r LOG=000-jhalfs.log
|
||||
|
||||
#--- Files that will be copied to $JHALFSDIR
|
||||
FILES="functions dump-lfs-scripts.xsl"
|
||||
|
||||
#--- Mount point for the build
|
||||
BUILDDIR=/mnt/lfs
|
||||
|
||||
#--- Working directories
|
||||
JHALFSDIR=$BUILDDIR/jhalfs
|
||||
LOGDIR=$JHALFSDIR/logs
|
||||
MKFILE=$JHALFSDIR/Makefile
|
||||
|
||||
#--- Download the source packages 0(no)/1(yes)
|
||||
HPKG=0
|
||||
|
||||
|
@ -32,12 +23,44 @@ TEST=0
|
|||
#--- Run the toolchain tests 0(no)/1(yes)
|
||||
TOOLCHAINTEST=1
|
||||
|
||||
#--- Run the stripping phases 0(no)/1(yes)
|
||||
STRIP=1
|
||||
|
||||
#--- page definition for groff letter/A4
|
||||
PAGE=letter
|
||||
|
||||
#--- set default timezone.
|
||||
TIMEZONE=Europe/London
|
||||
|
||||
#--- install the optional vim-lang package 0(no)/1(yes)
|
||||
VIMLANG=1
|
||||
|
||||
#--- Location of fstab file (if empty, a template is created)
|
||||
FSTAB=
|
||||
|
||||
#--- Location of kernel config file (if the kernel is to be compiled)
|
||||
CONFIG=
|
||||
|
||||
|
||||
|
||||
#==== INTERNAL VARIABLES ====
|
||||
# Don't edit it unless you know what you are doing
|
||||
|
||||
#--- Default stylesheet
|
||||
XSL=dump-lfs-scripts.xsl
|
||||
|
||||
#--- Files that will be copied to $JHALFSDIR
|
||||
FILES="functions"
|
||||
|
||||
#--- Working directories
|
||||
JHALFSDIR=$BUILDDIR/jhalfs
|
||||
LOGDIR=$JHALFSDIR/logs
|
||||
MKFILE=$JHALFSDIR/Makefile
|
||||
|
||||
#--- Book version
|
||||
LFSVRS=development
|
||||
|
||||
#--- Book's sources directory
|
||||
# Uncomment this variable if you have previously checked
|
||||
# out the book from the repository
|
||||
# BOOK=/path/to/book
|
||||
|
|
Loading…
Reference in New Issue