Compare commits
54 commits
mihari-dev
...
new_featur
Author | SHA1 | Date | |
---|---|---|---|
|
e7f93a02ce | ||
|
95c46b9df5 | ||
|
de10f6c5a5 | ||
|
10bc5b9130 | ||
|
479cb9b70e | ||
|
654a56a4d9 | ||
|
b9cd0ee5f1 | ||
|
580d773239 | ||
|
90f822ab03 | ||
|
3d48216613 | ||
|
085739c3eb | ||
|
2706ad528f | ||
|
89b7cce9ca | ||
|
14bcaee318 | ||
|
76cf25fb34 | ||
|
fc0802bf5f | ||
|
54380e5020 | ||
|
50618eeb88 | ||
|
8010030910 | ||
|
e43d0d0edb | ||
|
7e5ff87dd2 | ||
|
e06a0d35bc | ||
|
d8ddcfb96a | ||
|
deb6b6c8fd | ||
|
5253014591 | ||
|
a9dadcf142 | ||
|
796cd28b08 | ||
|
eb8667a45d | ||
|
50a8ed0de7 | ||
|
45f0437fcf | ||
|
f769d1fca3 | ||
|
6c9002b012 | ||
|
ed4f11f2a7 | ||
|
1cf1ad6fa6 | ||
|
0c5dfcc581 | ||
|
dc315ea7c8 | ||
|
e042e91776 | ||
|
c785566356 | ||
|
c650f9bf2a | ||
|
24e2a6f2f8 | ||
|
7bbcce3ce7 | ||
|
316db22956 | ||
|
013a0bcac8 | ||
|
e234d23768 | ||
|
df42c7cff7 | ||
|
33ff403b33 | ||
|
04952c6322 | ||
|
7bd0866514 | ||
|
99ba6d8548 | ||
|
af20a037df | ||
|
bc5aee2c5f | ||
|
6b6d54d952 | ||
|
77fa8baa59 | ||
|
2453b766d0 |
55 changed files with 3203 additions and 1861 deletions
|
@ -15,21 +15,39 @@ endif
|
||||||
LANG=C
|
LANG=C
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
|
|
||||||
# The right-hand side is updated by jhalfs
|
# Makefile should reside in a directory where there are two subdirectories
|
||||||
TRACKING_DIR = tracking-dir
|
# initially:
|
||||||
TOPDIR=$(shell pwd)
|
TOPDIR = $(shell pwd)
|
||||||
BLFS_XML = $(TOPDIR)/blfs-xml
|
# the stylesheets
|
||||||
XSLDIR = $(TOPDIR)/xsl
|
XSLDIR = $(TOPDIR)/xsl
|
||||||
|
# the menu program sources
|
||||||
|
MENU = $(TOPDIR)/menu
|
||||||
|
|
||||||
|
# Those directories and files will be created and populated by make:
|
||||||
|
# directory of the book sources:
|
||||||
|
BLFS_XML = $(TOPDIR)/blfs-xml
|
||||||
|
# contains the REV used in the preceding call:
|
||||||
|
REVFILE = $(TOPDIR)/revision
|
||||||
|
# the list of packages:
|
||||||
|
PACK_LIST = $(TOPDIR)/packages.xml
|
||||||
|
# the generated menu input:
|
||||||
|
CONFIG_CONFIG_IN = $(TOPDIR)/Config.in
|
||||||
|
# menu output:
|
||||||
|
CONFIG_OUT = $(TOPDIR)/configuration
|
||||||
|
# the linear book:
|
||||||
|
BOOK_XML = $(TOPDIR)/book.xml
|
||||||
|
|
||||||
RENDERTMP = $(BLFS_XML)/tmp
|
RENDERTMP = $(BLFS_XML)/tmp
|
||||||
BLFS_FULL = $(RENDERTMP)/blfs-full.xml
|
BLFS_FULL = $(RENDERTMP)/blfs-full.xml
|
||||||
PACK_LIST = $(TOPDIR)/packages.xml
|
|
||||||
MENU = $(TOPDIR)/menu
|
# The right-hand side is updated by jhalfs:
|
||||||
CONFIG_CONFIG_IN = $(TOPDIR)/Config.in
|
# Where the tracking file resides:
|
||||||
CONFIG_OUT = $(TOPDIR)/configuration
|
TRACKING_DIR = tracking-dir
|
||||||
BOOK_XML = $(TOPDIR)/book.xml
|
|
||||||
|
# Will be created by make, if not existent
|
||||||
TRACKFILE = $(TRACKING_DIR)/instpkg.xml
|
TRACKFILE = $(TRACKING_DIR)/instpkg.xml
|
||||||
|
|
||||||
|
# Initial content of the tracking file
|
||||||
define INITIAL_TRACK
|
define INITIAL_TRACK
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>\n\
|
<?xml version="1.0" encoding="ISO-8859-1"?>\n\
|
||||||
\n\
|
\n\
|
||||||
|
@ -42,9 +60,30 @@ endef
|
||||||
SVN = svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK
|
SVN = svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK
|
||||||
|
|
||||||
ALLXML := $(filter-out $(RENDERTMP)/%, \
|
ALLXML := $(filter-out $(RENDERTMP)/%, \
|
||||||
$(wildcard $(BLFS_XML)/*.xml $(BLFS_XML)/*/*.xml $(BLFS_XML)/*/*/*.xml $(BLFS_XML)/*/*/*/*.xml $(BLFS_XML)/*/*/*/*/*.xml))
|
$(shell if [ -d $(BLFS_XML) ]; then \
|
||||||
|
find $(BLFS_XML) -name \*.xml; \
|
||||||
|
fi))
|
||||||
ALLXSL := $(filter-out $(RENDERTMP)/%, \
|
ALLXSL := $(filter-out $(RENDERTMP)/%, \
|
||||||
$(wildcard $(BLFS_XML)/*.xsl $(BLFS_XML)/*/*.xsl $(BLFS_XML)/*/*/*.xsl $(BLFS_XML)/*/*/*/*.xsl $(BLFS_XML)/*/*/*/*/*.xsl))
|
$(shell if [ -d $(BLFS_XML) ]; then \
|
||||||
|
find $(BLFS_XML) -name \*.xsl; \
|
||||||
|
fi))
|
||||||
|
|
||||||
|
# Try to set the REV variable according to previous runs, except when
|
||||||
|
# set on the command line:
|
||||||
|
REV1 := $(shell if [ -f $(REVFILE) ] ; then cat $(REVFILE); fi)
|
||||||
|
ifneq ($(origin REV),command line)
|
||||||
|
ifdef REV1
|
||||||
|
REV = $(REV1)
|
||||||
|
else
|
||||||
|
REV = not defined
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(REV),sysv)
|
||||||
|
ifneq ($(REV),systemd)
|
||||||
|
$(error The REV variable is $(REV), but can only be 'sysv' or 'systemd')
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
$(BOOK_XML): $(CONFIG_OUT)
|
$(BOOK_XML): $(CONFIG_OUT)
|
||||||
$(Q)$(TOPDIR)/gen_pkg_book.sh $(TOPDIR) $(BLFS_FULL)
|
$(Q)$(TOPDIR)/gen_pkg_book.sh $(TOPDIR) $(BLFS_FULL)
|
||||||
|
@ -96,11 +135,21 @@ $(TRACKING_DIR):
|
||||||
$(XSLDIR)/specialCases.xsl: $(TOPDIR)/gen-special.sh $(BLFS_FULL)
|
$(XSLDIR)/specialCases.xsl: $(TOPDIR)/gen-special.sh $(BLFS_FULL)
|
||||||
$(Q)$(TOPDIR)/gen-special.sh $(BLFS_FULL) $@
|
$(Q)$(TOPDIR)/gen-special.sh $(BLFS_FULL) $@
|
||||||
|
|
||||||
|
ifneq ($(REV),$(REV1))
|
||||||
|
$(BLFS_FULL): FORCE
|
||||||
|
endif
|
||||||
$(BLFS_FULL): $(BLFS_XML) $(BLFS_XML)/general.ent $(ALLXML) $(ALLXSL)
|
$(BLFS_FULL): $(BLFS_XML) $(BLFS_XML)/general.ent $(ALLXML) $(ALLXSL)
|
||||||
@echo "Validating the book..."
|
|
||||||
$(Q)[ -d $(RENDERTMP) ] || mkdir -p $(RENDERTMP)
|
$(Q)[ -d $(RENDERTMP) ] || mkdir -p $(RENDERTMP)
|
||||||
$(Q)xmllint --nonet --noent --xinclude --postvalid \
|
@echo "Adjusting for revision $(REV)..."
|
||||||
-o $@ $(BLFS_XML)/index.xml
|
$(Q)xsltproc --nonet --xinclude \
|
||||||
|
--stringparam profile.revision $(REV) \
|
||||||
|
--output $(RENDERTMP)/blfs-prof.xml \
|
||||||
|
$(BLFS_XML)/stylesheets/lfs-xsl/profile.xsl \
|
||||||
|
$(BLFS_XML)/index.xml
|
||||||
|
@echo "Validating the book..."
|
||||||
|
$(Q)xmllint --nonet --noent --postvalid \
|
||||||
|
-o $@ $(RENDERTMP)/blfs-prof.xml
|
||||||
|
$(Q)echo $(REV) > $(REVFILE)
|
||||||
|
|
||||||
all: update $(BOOK_XML)
|
all: update $(BOOK_XML)
|
||||||
|
|
||||||
|
@ -119,4 +168,5 @@ clean:
|
||||||
rm -rf $(TOPDIR)/dependencies $(TOPDIR)/book-html $(TOPDIR)/scripts
|
rm -rf $(TOPDIR)/dependencies $(TOPDIR)/book-html $(TOPDIR)/scripts
|
||||||
- $(MAKE) -C $(MENU) clean
|
- $(MAKE) -C $(MENU) clean
|
||||||
|
|
||||||
.PHONY: clean all update $(CONFIG_OUT)
|
FORCE:
|
||||||
|
.PHONY: clean all update $(CONFIG_OUT) FORCE
|
||||||
|
|
|
@ -16,5 +16,3 @@
|
||||||
the BLFS book should be revised and validated, but our time is limited.
|
the BLFS book should be revised and validated, but our time is limited.
|
||||||
|
|
||||||
-- Bugs hunting.
|
-- Bugs hunting.
|
||||||
|
|
||||||
-- Find a better way to define circular dependencies.
|
|
161
BLFS/envars.conf
161
BLFS/envars.conf
|
@ -10,121 +10,53 @@
|
||||||
|
|
||||||
#======== Common envars ==========
|
#======== Common envars ==========
|
||||||
|
|
||||||
|
#--- The build directory:
|
||||||
|
# - If BUILD_SUBDIRS is set, this directory contains sub directories
|
||||||
|
# (one for each package), where packages are unpacked, and compiled.
|
||||||
|
# - If BUILD_SUBDIRS is unset, packages are unpacked, and compiled directly
|
||||||
|
# in $BUILD_ROOT.
|
||||||
|
export BUILD_ROOT=/sources
|
||||||
|
export BUILD_SUBDIRS=1
|
||||||
|
|
||||||
|
#--- The local repository for packages/file:
|
||||||
|
# Any missing file will be downloaded and archived either:
|
||||||
|
# - into a subdirectory (one for each page of the book) fo this directory,
|
||||||
|
# if SRC_SUBDIRS is set.
|
||||||
|
# - directly into this directory if SRC_SUBDIRS is unset.
|
||||||
|
# This directory can be the same as $BUILD_ROOT, provided BUILD_SUBDIRS
|
||||||
|
# and SRC_SUBDIRS are different.
|
||||||
|
export SRC_ARCHIVE=/sources
|
||||||
|
unset SRC_SUBDIRS
|
||||||
|
|
||||||
#--- Set a well-known working locale when building software
|
#--- Set a well-known working locale when building software
|
||||||
|
# Note that an UTF-8 locale may be needed for some packages,
|
||||||
|
# but normally it is set in the package instructions.
|
||||||
|
# Furthermore, LANG may be set in /etc/profile, which is
|
||||||
|
# sourced at the end of this file.
|
||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
|
|
||||||
#--- The local repository for packages/file
|
#--- Server used if the file isn't found in SRC_DIR,
|
||||||
# Any missing file will be downloaded and archived here,
|
# and cannot be downloaded from upstream.
|
||||||
# if the user has the right priviledges.
|
|
||||||
export SRC_ARCHIVE=/sources
|
|
||||||
|
|
||||||
#--- Server used if the file isn't found in SRC_ARCHIVE.
|
|
||||||
# As a last resort, the file will dowloaded from upstream, if possible.
|
|
||||||
#
|
#
|
||||||
# The server path MUST be set as listed in
|
# The server path MUST be set as listed in
|
||||||
# http://www.linuxfromscratch.org/blfs/download.html
|
# http://www.linuxfromscratch.org/blfs/download.html.
|
||||||
export FTP_SERVER=ftp://anduin.linuxfromscratch.org/BLFS/
|
# Note that despite the name of the variable, it can be an http url.
|
||||||
|
export FTP_SERVER=http://ftp.osuosl.org/pub/blfs/
|
||||||
|
|
||||||
|
#--- Keep the buid directory to examine it:
|
||||||
|
# If KEEP_FILES is unset, the extracted tarball is removed after build.
|
||||||
|
# Otherwise, the build tree is kept for later study.
|
||||||
|
#export KEEP_FILES=1
|
||||||
|
unset KEEP_FILES
|
||||||
|
|
||||||
|
### Currently not used in scripts ###
|
||||||
# Use a server close to you for Xorg (see http://wiki.x.org/wiki/Mirrors)
|
# Use a server close to you for Xorg (see http://wiki.x.org/wiki/Mirrors)
|
||||||
export FTP_X_SERVER=ftp://mirror.cict.fr/x.org/
|
# export FTP_X_SERVER=ftp://mirror.cict.fr/x.org/
|
||||||
|
|
||||||
#--- The sources directory.
|
|
||||||
# Full path to the top level directory where packages will be stored,
|
|
||||||
# unpacked, and compiled.
|
|
||||||
export SRC_DIR=/sources
|
|
||||||
|
|
||||||
|
|
||||||
#======== Xorg7 envars ===========
|
|
||||||
|
|
||||||
#--- Installation prefix
|
|
||||||
export XORG_PREFIX=/usr
|
|
||||||
|
|
||||||
#--- Configure switches
|
|
||||||
export XORG_CONFIG="--prefix=$XORG_PREFIX --sysconfdir=/etc \
|
|
||||||
--localstatedir=/var --disable-static"
|
|
||||||
|
|
||||||
#======== ABOUT GNOME envars =====
|
|
||||||
|
|
||||||
# Refer to `Chapter 30. Right now, the book hard codes --prefix=/usr
|
|
||||||
# and does not make use of the variables below. If you need another prefix,
|
|
||||||
# You'll have to modifiy the prefix in the book source and use the variables
|
|
||||||
# below. But this is not supported in this tool.
|
|
||||||
|
|
||||||
#======== LEGACY GNOME envars ====
|
|
||||||
|
|
||||||
# We use envars.conf instead of /etc/profile.d. But if you
|
|
||||||
# install into a different prefix, you'll need to update ld.so.conf and
|
|
||||||
# man-db.conf, too.
|
|
||||||
|
|
||||||
#--- Installation prefix
|
|
||||||
# export GNOME_PREFIX=/usr
|
|
||||||
# export GNOME_SYSCONFDIR=/etc/gnome/3.2.2
|
|
||||||
# export XDG_CONFIG_DIRS=$GNOME_SYSCONFDIR/xdg
|
|
||||||
# export XDG_DATA_DIRS=/usr/share:/usr/local/share
|
|
||||||
|
|
||||||
#--- If you want to install GNOME on a non standard prefix, uncomment
|
|
||||||
# the next export lines and edit it if needed.
|
|
||||||
# See also the GNOME Pre-installation Configuration HTML page for
|
|
||||||
# aditional required commands.
|
|
||||||
#export PATH=$PATH:$GNOME_PREFIX/bin
|
|
||||||
#export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$GNOME_PREFIX/lib/pkgconfig
|
|
||||||
#export GNOME_LIBCONFIG_PATH=/usr/lib:$GNOME_PREFIX/lib
|
|
||||||
|
|
||||||
#======== KDE envars =============
|
|
||||||
|
|
||||||
# Refer to `Chapter 27. Introduction->KDE Pre-installation Configuration'
|
|
||||||
# for rationale. We use envars.conf instead of /etc/profile.d. But if you
|
|
||||||
# install into a different prefix, you'll need to update ld.so.conf and
|
|
||||||
# man-db.conf, and to create and populate the directories $KDE_PREFIX/share
|
|
||||||
# and /etc/dbus-1, as instructed.
|
|
||||||
|
|
||||||
#--- Installation prefix
|
|
||||||
export KDE_PREFIX=/usr
|
|
||||||
|
|
||||||
#--- If you want to install KDE on a non standard prefix, uncomment
|
|
||||||
# the next lines and edit them as needed.
|
|
||||||
#export KDE_PREFIX=/opt/kde
|
|
||||||
#export KDEDIR=$KDE_PREFIX
|
|
||||||
|
|
||||||
#PATH=$PATH:$KDE_PREFIX/bin
|
|
||||||
#if [ -z PKG_CONFIG_PATH ]; then
|
|
||||||
#export PKG_CONFIG_PATH=$KDE_PREFIX/lib/pkgconfig:$KDE_PREFIX/share/pkgconfig
|
|
||||||
#else
|
|
||||||
# PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$KDE_PREFIX/lib/pkgconfig:$KDE_PREFIX/share/pkgconfig
|
|
||||||
#fi
|
|
||||||
# Note: there is a report that setting XDG_... vars for kde may break LXDE
|
|
||||||
#if [ -z XDG_DATA_DIRS ]; then
|
|
||||||
#export XDG_DATA_DIRS=$KDE_PREFIX/share
|
|
||||||
#else
|
|
||||||
# XDG_DATA_DIRS=$XDG_DATA_DIRS:$KDE_PREFIX/share
|
|
||||||
#fi
|
|
||||||
#if [ -z XDG_CONFIG_DIRS ]; then
|
|
||||||
#export XDG_CONFIG_DIRS=/etc/kde/xdg
|
|
||||||
#else
|
|
||||||
# XDG_CONFIG_DIRS=$XDG_CONFIG_DIRS:/etc/kde/xdg
|
|
||||||
#fi
|
|
||||||
|
|
||||||
#======== LXQt envars =============
|
|
||||||
|
|
||||||
# Refer to `Chapter 40. LXQt Desktop Pre-Install Instructions'
|
|
||||||
# We use envars.conf for LXQT_PREFIX, instead of /etc/profile.d. But if you
|
|
||||||
# install into a different prefix, you'll need to create the relevant
|
|
||||||
# directory, to create /etc/profiles.d/lxqt.sh, update /etc/ld.so.conf, and
|
|
||||||
# to create and populate the directories $LXQT_PREFIX/share/icons, as
|
|
||||||
# instructed.
|
|
||||||
|
|
||||||
#--- Installation prefix
|
|
||||||
export LXQT_PREFIX=/usr
|
|
||||||
|
|
||||||
#--- If you want to install LXQT on a non standard prefix, uncomment
|
|
||||||
# the next line and edit it as needed, or just use the book's
|
|
||||||
# /etc/profile.d/lxqt.sh.
|
|
||||||
# export LXQT_PREFIX=/opt/lxqt
|
|
||||||
|
|
||||||
#======== Optimizations =============
|
#======== Optimizations =============
|
||||||
|
|
||||||
# Global optimization settings can be placed here. This settings can be
|
# Global optimization settings can be placed here. This settings can be
|
||||||
# overrided by settings in the packages build scripts.
|
# overriden by settings in the packages build scripts.
|
||||||
|
|
||||||
# WARNING: The use of build optimizations may be dangerous.
|
# WARNING: The use of build optimizations may be dangerous.
|
||||||
# You should know what you are doing and be sure that the
|
# You should know what you are doing and be sure that the
|
||||||
|
@ -145,8 +77,23 @@ export MAKEFLAGS="-j5"
|
||||||
|
|
||||||
#======== Environment settings ========
|
#======== Environment settings ========
|
||||||
|
|
||||||
# Since the startup files may be changed in the course
|
# The prefered way to setup environment variables nowadays
|
||||||
# of a build, ensure that environment variables are
|
# is to set them in /etc/profile{,.d/*.sh}.
|
||||||
# up to date
|
# It is recommended to source /etc/profile in this file
|
||||||
|
# since a package may add some new variables in there,
|
||||||
|
# which may be needed later in dependant packages.
|
||||||
|
|
||||||
if [ -r /etc/profile ]; then source /etc/profile; fi
|
if [ -r /etc/profile ]; then source /etc/profile; fi
|
||||||
|
|
||||||
|
#======== Package management ========
|
||||||
|
|
||||||
|
# We need the functions in "packInstall.sh" when installing a package,
|
||||||
|
# if package management is requested. Note that we have no way to know
|
||||||
|
# whether package management is requested for a given build.
|
||||||
|
# Furthermore, "sudo -E" exports variables, but not functions from
|
||||||
|
# the environment, and sudo needs to be called before porg, due
|
||||||
|
# to porg limitations. So we just export the location of the file
|
||||||
|
# where the functions are defined, and we'll source it just before
|
||||||
|
# installing.
|
||||||
|
|
||||||
|
export PACK_INSTALL=/blfs_root/packInstall.sh # change as needed
|
||||||
|
|
|
@ -156,11 +156,19 @@ EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ ! -d ${BUILD_SCRIPTS} ]] ; then
|
if [[ ! -d ${BUILD_SCRIPTS} ]] ; then
|
||||||
echo -e "\n\tThe \'${BUILD_SCRIPTS}\' directory has not been found.\n"
|
echo -e "\n\tThe '${BUILD_SCRIPTS}' directory has not been found.\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Let us make a clean base, but first ensure that we are
|
||||||
|
# not emptying a useful directory.
|
||||||
|
MYDIR=$(pwd)
|
||||||
|
MYDIR=$(basename $MYDIR)
|
||||||
|
if [ "${MYDIR#work}" = "${MYDIR}" ] ; then
|
||||||
|
echo -e \\n\\tDirectory ${BOLD}$MYDIR${OFF} does not begin with \"work\"\\n
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Let us make a clean base:
|
|
||||||
rm -rf *
|
rm -rf *
|
||||||
|
|
||||||
generate_Makefile
|
generate_Makefile
|
||||||
|
|
|
@ -34,12 +34,12 @@ BLFS_DIR=$3
|
||||||
if test -z "${BLFS_DIR}"; then BLFS_DIR=$(cd $(dirname ${BLFS_XML})/.. ; pwd);fi
|
if test -z "${BLFS_DIR}"; then BLFS_DIR=$(cd $(dirname ${BLFS_XML})/.. ; pwd);fi
|
||||||
|
|
||||||
# Packages whose version does not begin with a number
|
# Packages whose version does not begin with a number
|
||||||
EXCEPTIONS=$(grep 'ENTITY.*version[ ]*"[^0-9"&.].*[0-9]' $BLFS_XML |
|
EXCEPTIONS=$(grep 'ENTITY.*version[ ]*"[^0-9"&.].*[0-9]' ${BLFS_DIR}/packages.ent |
|
||||||
sed 's@^[^"]*"\([^"]*\)".*@\1@')
|
sed 's@^[^"]*"\([^"]*\)".*@\1@')
|
||||||
|
|
||||||
# Non-versioned packages:
|
# Non-versioned packages:
|
||||||
NV_LIST="cacerts xorg-env kde-pre-install-config kf5-intro lxqt-pre-install \
|
NV_LIST="cacerts xorg-env kde-pre-install-config kf5-intro lxqt-pre-install \
|
||||||
ojdk-conf tex-path"
|
lxqt-post-install ojdk-conf tex-path"
|
||||||
|
|
||||||
# Set PATH to be sure to find udevadm
|
# Set PATH to be sure to find udevadm
|
||||||
SAVPATH=$PATH
|
SAVPATH=$PATH
|
||||||
|
@ -146,7 +146,7 @@ EOF
|
||||||
# that the preceding package is a dependency of the following,
|
# that the preceding package is a dependency of the following,
|
||||||
# except the first.
|
# except the first.
|
||||||
list_cat="$(sed -n '/>cat/,/EOF</p' $file | grep -v 'cat\|EOF' |
|
list_cat="$(sed -n '/>cat/,/EOF</p' $file | grep -v 'cat\|EOF' |
|
||||||
sed 's/^[^ ]*\ *\([^&]*\).*/\1/' | sed 's/-$//')"
|
awk '{ print $NF }' | sed 's/-&.*//')"
|
||||||
|
|
||||||
# Rationale for the sed below: the following for breaks words at spaces (unless
|
# Rationale for the sed below: the following for breaks words at spaces (unless
|
||||||
# we tweak IFS). So replace spaces with commas in lines so that only newlines
|
# we tweak IFS). So replace spaces with commas in lines so that only newlines
|
||||||
|
|
|
@ -26,6 +26,7 @@ declare BLFS_XML="${TOPDIR}/blfs-xml"
|
||||||
declare -a TARGET
|
declare -a TARGET
|
||||||
declare DEP_LEVEL
|
declare DEP_LEVEL
|
||||||
declare SUDO
|
declare SUDO
|
||||||
|
declare WRAP_INSTALL
|
||||||
|
|
||||||
#--------------------------#
|
#--------------------------#
|
||||||
parse_configuration() { #
|
parse_configuration() { #
|
||||||
|
@ -44,6 +45,7 @@ parse_configuration() { #
|
||||||
# Create global variables for these parameters.
|
# Create global variables for these parameters.
|
||||||
optDependency=* | \
|
optDependency=* | \
|
||||||
MAIL_SERVER=* | \
|
MAIL_SERVER=* | \
|
||||||
|
WRAP_INSTALL=* | \
|
||||||
SUDO=* ) eval ${REPLY} # Define/set a global variable..
|
SUDO=* ) eval ${REPLY} # Define/set a global variable..
|
||||||
continue ;;
|
continue ;;
|
||||||
esac
|
esac
|
||||||
|
@ -62,13 +64,14 @@ parse_configuration() { #
|
||||||
TARGET=(${optTARGET[*]})
|
TARGET=(${optTARGET[*]})
|
||||||
DEP_LEVEL=$optDependency
|
DEP_LEVEL=$optDependency
|
||||||
SUDO=${SUDO:-n}
|
SUDO=${SUDO:-n}
|
||||||
|
WRAP_INSTALL=${WRAP_INSTALL:-n}
|
||||||
}
|
}
|
||||||
|
|
||||||
#--------------------------#
|
#--------------------------#
|
||||||
validate_configuration() { #
|
validate_configuration() { #
|
||||||
#--------------------------#
|
#--------------------------#
|
||||||
local -r dotSTR=".................."
|
local -r dotSTR=".................."
|
||||||
local -r PARAM_LIST="DEP_LEVEL SUDO MAIL_SERVER"
|
local -r PARAM_LIST="DEP_LEVEL SUDO MAIL_SERVER WRAP_INSTALL"
|
||||||
local -r PARAM_VALS='${config_param}${dotSTR:${#config_param}} ${L_arrow}${BOLD}${!config_param}${OFF}${R_arrow}'
|
local -r PARAM_VALS='${config_param}${dotSTR:${#config_param}} ${L_arrow}${BOLD}${!config_param}${OFF}${R_arrow}'
|
||||||
local config_param
|
local config_param
|
||||||
local -i index
|
local -i index
|
||||||
|
@ -179,6 +182,7 @@ echo -en "\n\tGenerating the build scripts ...\n"
|
||||||
rm -rf scripts
|
rm -rf scripts
|
||||||
xsltproc --xinclude --nonet \
|
xsltproc --xinclude --nonet \
|
||||||
--stringparam sudo $SUDO \
|
--stringparam sudo $SUDO \
|
||||||
|
--stringparam wrap-install $WRAP_INSTALL \
|
||||||
-o ./scripts/ ${MakeScripts} \
|
-o ./scripts/ ${MakeScripts} \
|
||||||
${BookXml}
|
${BookXml}
|
||||||
# Make the scripts executable.
|
# Make the scripts executable.
|
||||||
|
|
|
@ -277,15 +277,16 @@ tree_erase() { #
|
||||||
local file=$1
|
local file=$1
|
||||||
local f
|
local f
|
||||||
local -a rootlink
|
local -a rootlink
|
||||||
local -a rootlink2
|
local rootlink2
|
||||||
|
|
||||||
#echo file=$file
|
#echo file=$file
|
||||||
rootlink=($(head -n1 $file))
|
rootlink=($(head -n1 $file))
|
||||||
for f in $(grep '[^0-9 ]' $file | sed 's/.* //'); do
|
for f in $(grep '[^0-9 ]' $file | sed 's/.* //'); do
|
||||||
# echo " f"=$f
|
# echo " f"=$f
|
||||||
if [ -f ${f}.dep ]; then
|
if [ -f ${f}.dep ]; then
|
||||||
rootlink2=($(head -n1 ${f}.dep))
|
rootlink2="$(head -n1 ${f}.dep) "
|
||||||
if [[ "${rootlink2[*]}" =~ "${rootlink[*]}" ]] ; then
|
# See comment above about srootlink
|
||||||
|
if [[ ${rootlink2#"${rootlink[*]} "} != ${rootlink2} ]] ; then
|
||||||
tree_erase ${f}.dep
|
tree_erase ${f}.dep
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -58,6 +58,16 @@ config SUDO
|
||||||
help
|
help
|
||||||
Select if sudo will be used (you build as a normal user)
|
Select if sudo will be used (you build as a normal user)
|
||||||
otherwise sudo is not needed (you build as root)
|
otherwise sudo is not needed (you build as root)
|
||||||
|
|
||||||
|
|
||||||
|
config WRAP_INSTALL
|
||||||
|
bool "Use `porg style' package management"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Select if you want the installation commands to be wrapped
|
||||||
|
between "wrapInstall '" and "' ; packInstall" functions,
|
||||||
|
where wrapInstall is used to set up a LD_PRELOAD library (for
|
||||||
|
example using porg), and packInstall makes the package tarball
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
||||||
<xsl:text>
 </xsl:text>
|
<xsl:text>
 </xsl:text>
|
||||||
<xsl:element name="name">
|
<xsl:element name="name">
|
||||||
<xsl:value-of select="title"/>
|
<xsl:value-of select="normalize-space(title)"/>
|
||||||
</xsl:element>
|
</xsl:element>
|
||||||
<xsl:text>

</xsl:text>
|
<xsl:text>

</xsl:text>
|
||||||
<xsl:apply-templates select="chapter"/>
|
<xsl:apply-templates select="chapter"/>
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
||||||
<xsl:text>
 </xsl:text>
|
<xsl:text>
 </xsl:text>
|
||||||
<xsl:element name="name">
|
<xsl:element name="name">
|
||||||
<xsl:value-of select="title"/>
|
<xsl:value-of select="normalize-space(title)"/>
|
||||||
</xsl:element>
|
</xsl:element>
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:text>
</xsl:text>
|
||||||
<xsl:apply-templates select=".//sect1">
|
<xsl:apply-templates select=".//sect1">
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
<xsl:text> </xsl:text>
|
<xsl:text> </xsl:text>
|
||||||
<package><xsl:text>
 </xsl:text>
|
<package><xsl:text>
 </xsl:text>
|
||||||
<xsl:element name="name">
|
<xsl:element name="name">
|
||||||
<xsl:value-of select="title"/>
|
<xsl:value-of select="normalize-space(title)"/>
|
||||||
</xsl:element>
|
</xsl:element>
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:text>
</xsl:text>
|
||||||
<!-- Do not use .//*, which would include self. -->
|
<!-- Do not use .//*, which would include self. -->
|
||||||
|
@ -247,7 +247,7 @@
|
||||||
<xsl:template match="para" mode="dependency">
|
<xsl:template match="para" mode="dependency">
|
||||||
<xsl:variable name="status" select="./@role"/>
|
<xsl:variable name="status" select="./@role"/>
|
||||||
<!-- First internal dependencies -->
|
<!-- First internal dependencies -->
|
||||||
<xsl:for-each select="./xref">
|
<xsl:for-each select=".//xref">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<!-- Avoid depending of myself -->
|
<!-- Avoid depending of myself -->
|
||||||
<xsl:when test="ancestor::*[@id=current()/@linkend]"/>
|
<xsl:when test="ancestor::*[@id=current()/@linkend]"/>
|
||||||
|
@ -278,7 +278,7 @@
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
<!-- then external dependencies -->
|
<!-- then external dependencies -->
|
||||||
<xsl:for-each select="./ulink">
|
<xsl:for-each select=".//ulink">
|
||||||
<xsl:text>
|
<xsl:text>
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
<xsl:element name="dependency">
|
<xsl:element name="dependency">
|
||||||
|
|
|
@ -8,6 +8,18 @@
|
||||||
<xsl:param name="list" select="''"/>
|
<xsl:param name="list" select="''"/>
|
||||||
<xsl:param name="MTA" select="'sendmail'"/>
|
<xsl:param name="MTA" select="'sendmail'"/>
|
||||||
|
|
||||||
|
<!-- Check whether the book is sysv or systemd -->
|
||||||
|
<xsl:variable name="rev">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="//bookinfo/title/phrase[@revision='systemd']">
|
||||||
|
<xsl:text>systemd</xsl:text>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:text>sysv</xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
<xsl:output
|
<xsl:output
|
||||||
method="xml"
|
method="xml"
|
||||||
encoding="ISO-8859-1"
|
encoding="ISO-8859-1"
|
||||||
|
@ -19,7 +31,14 @@
|
||||||
<preface>
|
<preface>
|
||||||
<?dbhtml filename="preface.html"?>
|
<?dbhtml filename="preface.html"?>
|
||||||
<title>Preface</title>
|
<title>Preface</title>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$rev='sysv'">
|
||||||
<xsl:copy-of select="id('bootscripts')"/>
|
<xsl:copy-of select="id('bootscripts')"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:copy-of select="id('systemd-units')"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
</preface>
|
</preface>
|
||||||
<chapter>
|
<chapter>
|
||||||
<?dbhtml filename="chapter.html"?>
|
<?dbhtml filename="chapter.html"?>
|
||||||
|
@ -112,7 +131,8 @@
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@linkend='bootscripts'">
|
<xsl:when test="@linkend='bootscripts' or
|
||||||
|
@linkend='systemd-units'">
|
||||||
<xsl:copy-of select="."/>
|
<xsl:copy-of select="."/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
|
@ -307,6 +327,13 @@
|
||||||
select=".//userinput[starts-with(string(),'cat ')]"/>
|
select=".//userinput[starts-with(string(),'cat ')]"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
<xsl:variable name="download-dir">
|
||||||
|
<xsl:call-template name="download-dir">
|
||||||
|
<xsl:with-param name="package" select="concat(' ',$package,'-')"/>
|
||||||
|
<xsl:with-param name="cat-md5"
|
||||||
|
select=".//userinput[starts-with(string(),'cat ')]"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
<xsl:variable name="install-instructions">
|
<xsl:variable name="install-instructions">
|
||||||
<xsl:call-template name="inst-instr">
|
<xsl:call-template name="inst-instr">
|
||||||
<xsl:with-param name="inst-instr"
|
<xsl:with-param name="inst-instr"
|
||||||
|
@ -328,6 +355,7 @@
|
||||||
<xsl:attribute name="url">
|
<xsl:attribute name="url">
|
||||||
<xsl:value-of
|
<xsl:value-of
|
||||||
select=".//para[contains(string(),'(HTTP)')]/ulink/@url"/>
|
select=".//para[contains(string(),'(HTTP)')]/ulink/@url"/>
|
||||||
|
<xsl:value-of select="$download-dir"/>
|
||||||
<xsl:value-of select="$tarball"/>
|
<xsl:value-of select="$tarball"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</xsl:element>
|
</xsl:element>
|
||||||
|
@ -338,6 +366,7 @@
|
||||||
<xsl:attribute name="url">
|
<xsl:attribute name="url">
|
||||||
<xsl:value-of
|
<xsl:value-of
|
||||||
select=".//para[contains(string(),'(FTP)')]/ulink/@url"/>
|
select=".//para[contains(string(),'(FTP)')]/ulink/@url"/>
|
||||||
|
<xsl:value-of select="$download-dir"/>
|
||||||
<xsl:value-of select="$tarball"/>
|
<xsl:value-of select="$tarball"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</xsl:element>
|
</xsl:element>
|
||||||
|
@ -407,12 +436,46 @@ END DEBUG -->
|
||||||
select="substring-after($cat-md5,'
')"/>
|
select="substring-after($cat-md5,'
')"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
<xsl:when test="contains(substring-before($cat-md5,$package),' ')">
|
||||||
|
<xsl:call-template name="tarball">
|
||||||
|
<xsl:with-param name="package" select="$package"/>
|
||||||
|
<xsl:with-param name="cat-md5"
|
||||||
|
select="substring-after($cat-md5,' ')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:copy-of select="substring-after(
|
<xsl:copy-of select="substring-after(
|
||||||
substring-before($cat-md5,'
'),' ')"/>
|
substring-before($cat-md5,'
'),' ')"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
<!-- get the download dirname from the text that comes from the .md5 file -->
|
||||||
|
<xsl:template name="download-dir">
|
||||||
|
<xsl:param name="package"/>
|
||||||
|
<xsl:param name="cat-md5"/>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="not(@id='xorg7-legacy')">
|
||||||
|
<xsl:copy-of select="''"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="contains(substring-before($cat-md5,$package),'
')">
|
||||||
|
<xsl:call-template name="download-dir">
|
||||||
|
<xsl:with-param name="package" select="$package"/>
|
||||||
|
<xsl:with-param name="cat-md5"
|
||||||
|
select="substring-after($cat-md5,'
')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="contains(substring-before($cat-md5,$package),' ')">
|
||||||
|
<xsl:call-template name="download-dir">
|
||||||
|
<xsl:with-param name="package" select="$package"/>
|
||||||
|
<xsl:with-param name="cat-md5"
|
||||||
|
select="substring-after($cat-md5,' ')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:copy-of select="substring-before($cat-md5,' ')"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
<!-- same for md5sum -->
|
<!-- same for md5sum -->
|
||||||
<xsl:template name="md5sum">
|
<xsl:template name="md5sum">
|
||||||
<xsl:param name="package"/>
|
<xsl:param name="package"/>
|
||||||
|
|
|
@ -9,6 +9,22 @@
|
||||||
|
|
||||||
<!-- XSLT stylesheet to create shell scripts from "linear build" BLFS books. -->
|
<!-- XSLT stylesheet to create shell scripts from "linear build" BLFS books. -->
|
||||||
|
|
||||||
|
<!-- Check whether the book is sysv or systemd -->
|
||||||
|
<xsl:variable name="rev">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="//bookinfo/title/phrase[@revision='systemd']">
|
||||||
|
systemd
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
sysv
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
|
<!-- Wrap "root" commands inside a wrapper function, allowing
|
||||||
|
"porg style" package management -->
|
||||||
|
<xsl:param name="wrap-install" select="'n'"/>
|
||||||
|
|
||||||
<!-- Build as user (y) or as root (n)? -->
|
<!-- Build as user (y) or as root (n)? -->
|
||||||
<xsl:param name="sudo" select="'y'"/>
|
<xsl:param name="sudo" select="'y'"/>
|
||||||
|
|
||||||
|
@ -20,7 +36,7 @@
|
||||||
|
|
||||||
<xsl:template match="sect1">
|
<xsl:template match="sect1">
|
||||||
|
|
||||||
<xsl:if test="@id != 'bootscripts'">
|
<xsl:if test="@id != 'bootscripts' and @id != 'systemd-units'">
|
||||||
<!-- The file names -->
|
<!-- The file names -->
|
||||||
<xsl:variable name="filename" select="@id"/>
|
<xsl:variable name="filename" select="@id"/>
|
||||||
|
|
||||||
|
@ -57,14 +73,23 @@
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<!-- Package page -->
|
<!-- Package page -->
|
||||||
<xsl:when test="sect2[@role='package']">
|
<xsl:when test="sect2[@role='package']">
|
||||||
<!-- We build in a subdirectory -->
|
<!-- We build in a subdirectory, whose name may be needed
|
||||||
<xsl:text>PKG_DIR=</xsl:text>
|
if using package management (see envars.conf), so
|
||||||
|
"export" it -->
|
||||||
|
<xsl:text>export PKG_DIR=</xsl:text>
|
||||||
<xsl:value-of select="$filename"/>
|
<xsl:value-of select="$filename"/>
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:text>
|
||||||
|
SRC_DIR=${SRC_ARCHIVE}${SRC_SUBDIRS:+/${PKG_DIR}}
|
||||||
|
BUILD_DIR=${BUILD_ROOT}${BUILD_SUBDIRS:+/${PKG_DIR}}
|
||||||
|
mkdir -p $SRC_DIR
|
||||||
|
mkdir -p $BUILD_DIR
|
||||||
|
|
||||||
|
</xsl:text>
|
||||||
<!-- Download code and build commands -->
|
<!-- Download code and build commands -->
|
||||||
<xsl:apply-templates select="sect2"/>
|
<xsl:apply-templates select="sect2"/>
|
||||||
<!-- Clean-up -->
|
<!-- Clean-up -->
|
||||||
<xsl:text>cd $SRC_DIR/$PKG_DIR
</xsl:text>
|
<xsl:text>cd $BUILD_DIR
|
||||||
|
[[ -n "$KEEP_FILES" ]] || </xsl:text>
|
||||||
<!-- In some case, some files in the build tree are owned
|
<!-- In some case, some files in the build tree are owned
|
||||||
by root -->
|
by root -->
|
||||||
<xsl:if test="$sudo='y'">
|
<xsl:if test="$sudo='y'">
|
||||||
|
@ -87,8 +112,8 @@
|
||||||
<xsl:template match="sect2">
|
<xsl:template match="sect2">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@role = 'package'">
|
<xsl:when test="@role = 'package'">
|
||||||
<xsl:text>mkdir -p $SRC_DIR/$PKG_DIR
</xsl:text>
|
<xsl:text>cd $SRC_DIR
|
||||||
<xsl:text>cd $SRC_DIR/$PKG_DIR
</xsl:text>
|
</xsl:text>
|
||||||
<!-- Download information is in bridgehead tags -->
|
<!-- Download information is in bridgehead tags -->
|
||||||
<xsl:apply-templates select="bridgehead[@renderas='sect3']"/>
|
<xsl:apply-templates select="bridgehead[@renderas='sect3']"/>
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:text>
</xsl:text>
|
||||||
|
@ -98,32 +123,39 @@
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="@role = 'installation'">
|
<xsl:when test="@role = 'installation'">
|
||||||
<xsl:text>
|
<xsl:text>
|
||||||
|
cd $BUILD_DIR
|
||||||
find . -maxdepth 1 -mindepth 1 -type d | xargs </xsl:text>
|
find . -maxdepth 1 -mindepth 1 -type d | xargs </xsl:text>
|
||||||
<xsl:if test="$sudo='y'">
|
<xsl:if test="$sudo='y'">
|
||||||
<xsl:text>sudo </xsl:text>
|
<xsl:text>sudo </xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:text>rm -rf
|
<xsl:text>rm -rf
|
||||||
case $PACKAGE in
|
case $PACKAGE in
|
||||||
*.tar.gz|*.tar.bz2|*.tar.xz|*.tgz)
|
*.tar.gz|*.tar.bz2|*.tar.xz|*.tgz|*.tar.lzma)
|
||||||
tar -xvf $PACKAGE > unpacked
|
tar -xvf $SRC_DIR/$PACKAGE > unpacked
|
||||||
UNPACKDIR=`grep '[^./]\+' unpacked | head -n1 | sed 's@^./@@;s@/.*@@'`
|
UNPACKDIR=`grep '[^./]\+' unpacked | head -n1 | sed 's@^\./@@;s@/.*@@'`
|
||||||
|
;;
|
||||||
|
*.tar.lz)
|
||||||
|
bsdtar -xvf $SRC_DIR/$PACKAGE 2> unpacked
|
||||||
|
UNPACKDIR=`head -n1 unpacked | cut -d" " -f2 | sed 's@^\./@@;s@/.*@@'`
|
||||||
;;
|
;;
|
||||||
*.zip)
|
*.zip)
|
||||||
zipinfo -1 $PACKAGE > unpacked
|
zipinfo -1 $SRC_DIR/$PACKAGE > unpacked
|
||||||
UNPACKDIR="$(sed 's@/.*@@' unpacked | uniq )"
|
UNPACKDIR="$(sed 's@/.*@@' unpacked | uniq )"
|
||||||
if test $(wc -w <<< $UNPACKDIR) -eq 1; then
|
if test $(wc -w <<< $UNPACKDIR) -eq 1; then
|
||||||
unzip $PACKAGE
|
unzip $SRC_DIR/$PACKAGE
|
||||||
else
|
else
|
||||||
UNPACKDIR=${PACKAGE%.zip}
|
UNPACKDIR=${PACKAGE%.zip}
|
||||||
unzip -d $UNPACKDIR $PACKAGE
|
unzip -d $UNPACKDIR $SRC_DIR/$PACKAGE
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
UNPACKDIR=$PKG_DIR-build
|
UNPACKDIR=$PKG_DIR-build
|
||||||
mkdir $UNPACKDIR
|
mkdir $UNPACKDIR
|
||||||
cp $PACKAGE $UNPACKDIR
|
cp $SRC_DIR/$PACKAGE $UNPACKDIR
|
||||||
|
cp $(find . -mindepth 1 -maxdepth 1 -type l) $UNPACKDIR
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
export UNPACKDIR
|
||||||
cd $UNPACKDIR

|
cd $UNPACKDIR

|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
<xsl:apply-templates select=".//screen | .//para/command"/>
|
<xsl:apply-templates select=".//screen | .//para/command"/>
|
||||||
|
@ -197,43 +229,37 @@ cd $UNPACKDIR

|
||||||
<xsl:value-of select="$package"/>
|
<xsl:value-of select="$package"/>
|
||||||
<xsl:text>
if [[ ! -f $</xsl:text>
|
<xsl:text>
if [[ ! -f $</xsl:text>
|
||||||
<xsl:value-of select="$varname"/>
|
<xsl:value-of select="$varname"/>
|
||||||
<xsl:text> ]] ; then
</xsl:text>
|
<xsl:text> ]] ; then
|
||||||
<!-- SRC_ARCHIVE may have subdirectories or not -->
|
if [[ -f $SRC_ARCHIVE/$</xsl:text>
|
||||||
<xsl:text> if [[ -f $SRC_ARCHIVE/$PKG_DIR/$</xsl:text>
|
|
||||||
<xsl:value-of select="$varname"/>
|
|
||||||
<xsl:text> ]] ; then
</xsl:text>
|
|
||||||
<xsl:text> cp $SRC_ARCHIVE/$PKG_DIR/$</xsl:text>
|
|
||||||
<xsl:value-of select="$varname"/>
|
|
||||||
<xsl:text> $</xsl:text>
|
|
||||||
<xsl:value-of select="$varname"/>
|
|
||||||
<xsl:text>
</xsl:text>
|
|
||||||
<xsl:text> elif [[ -f $SRC_ARCHIVE/$</xsl:text>
|
|
||||||
<xsl:value-of select="$varname"/>
|
<xsl:value-of select="$varname"/>
|
||||||
<xsl:text> ]] ; then
</xsl:text>
|
<xsl:text> ]] ; then
</xsl:text>
|
||||||
<xsl:text> cp $SRC_ARCHIVE/$</xsl:text>
|
<xsl:text> cp $SRC_ARCHIVE/$</xsl:text>
|
||||||
<xsl:value-of select="$varname"/>
|
<xsl:value-of select="$varname"/>
|
||||||
<xsl:text> $</xsl:text>
|
<xsl:text> $</xsl:text>
|
||||||
<xsl:value-of select="$varname"/>
|
<xsl:value-of select="$varname"/>
|
||||||
<xsl:text>
 else
</xsl:text>
|
<xsl:text>
|
||||||
<!-- The FTP_SERVER mirror -->
|
else
</xsl:text>
|
||||||
|
<!-- Download from upstream http -->
|
||||||
|
<xsl:if test="string-length($httpurl) > 10">
|
||||||
|
<xsl:text> wget -T 30 -t 5 </xsl:text>
|
||||||
|
<xsl:value-of select="$httpurl"/>
|
||||||
|
<xsl:text> ||
</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
<!-- Download from upstream ftp -->
|
||||||
|
<xsl:if test="string-length($ftpurl) > 10">
|
||||||
|
<xsl:text> wget -T 30 -t 5 </xsl:text>
|
||||||
|
<xsl:value-of select="$ftpurl"/>
|
||||||
|
<xsl:text> ||
</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
<!-- The FTP_SERVER mirror as a last resort -->
|
||||||
<xsl:text> wget -T 30 -t 5 ${FTP_SERVER}svn/</xsl:text>
|
<xsl:text> wget -T 30 -t 5 ${FTP_SERVER}svn/</xsl:text>
|
||||||
<xsl:value-of select="$first_letter"/>
|
<xsl:value-of select="$first_letter"/>
|
||||||
<xsl:text>/$</xsl:text>
|
<xsl:text>/$</xsl:text>
|
||||||
<xsl:value-of select="$varname"/>
|
<xsl:value-of select="$varname"/>
|
||||||
<xsl:if test="string-length($httpurl) > 10">
|
<xsl:text><!--
|
||||||
<xsl:text> ||
|
|
||||||
wget -T 30 -t 5 </xsl:text>
|
|
||||||
<xsl:value-of select="$httpurl"/>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="string-length($ftpurl) > 10">
|
|
||||||
<xsl:text> ||
|
|
||||||
wget -T 30 -t 5 </xsl:text>
|
|
||||||
<xsl:value-of select="$ftpurl"/>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:text>
|
|
||||||
cp $</xsl:text>
|
cp $</xsl:text>
|
||||||
<xsl:value-of select="$varname"/>
|
<xsl:value-of select="$varname"/>
|
||||||
<xsl:text> $SRC_ARCHIVE
|
<xsl:text> $SRC_ARCHIVE-->
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
|
@ -243,6 +269,14 @@ fi
|
||||||
<xsl:text>  $</xsl:text>
|
<xsl:text>  $</xsl:text>
|
||||||
<xsl:value-of select="$varname"/>
|
<xsl:value-of select="$varname"/>
|
||||||
<xsl:text>" | md5sum -c -
|
<xsl:text>" | md5sum -c -
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
<!-- link additional packages into $BUILD_DIR, because they are supposed to
|
||||||
|
be there-->
|
||||||
|
<xsl:if test="string($varname) != 'PACKAGE'">
|
||||||
|
<xsl:text>[[ "$SRC_DIR" != "$BUILD_DIR" ]] && ln -sf $SRC_DIR/$</xsl:text>
|
||||||
|
<xsl:value-of select="$varname"/>
|
||||||
|
<xsl:text> $BUILD_DIR
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
@ -380,13 +414,31 @@ fi
|
||||||
<xsl:if test="child::* = userinput and not(@role = 'nodump')">
|
<xsl:if test="child::* = userinput and not(@role = 'nodump')">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@role = 'root'">
|
<xsl:when test="@role = 'root'">
|
||||||
|
<xsl:if test="not(preceding-sibling::screen[1][@role='root'])">
|
||||||
<xsl:if test="$sudo = 'y'">
|
<xsl:if test="$sudo = 'y'">
|
||||||
<xsl:text>sudo -E sh << ROOT_EOF
</xsl:text>
|
<xsl:text>sudo -E sh << ROOT_EOF
</xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
<xsl:if test="$wrap-install = 'y' and
|
||||||
|
ancestor::sect2[@role='installation']">
|
||||||
|
<xsl:text>if [ -r "$PACK_INSTALL" ]; then
|
||||||
|
source $PACK_INSTALL
|
||||||
|
export -f wrapInstall
|
||||||
|
export -f packInstall
|
||||||
|
fi
|
||||||
|
wrapInstall '
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:if>
|
||||||
<xsl:apply-templates mode="root"/>
|
<xsl:apply-templates mode="root"/>
|
||||||
|
<xsl:if test="not(following-sibling::screen[1][@role='root'])">
|
||||||
|
<xsl:if test="$wrap-install = 'y' and
|
||||||
|
ancestor::sect2[@role='installation']">
|
||||||
|
<xsl:text>'
packInstall</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
<xsl:if test="$sudo = 'y'">
|
<xsl:if test="$sudo = 'y'">
|
||||||
<xsl:text>
ROOT_EOF</xsl:text>
|
<xsl:text>
ROOT_EOF</xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
</xsl:if>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:apply-templates select="userinput"/>
|
<xsl:apply-templates select="userinput"/>
|
||||||
|
@ -396,12 +448,20 @@ fi
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="screen" mode="config">
|
<xsl:template name="set-bootpkg-dir">
|
||||||
<xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts']">
|
<xsl:param name="bootpkg" select="'bootscripts'"/>
|
||||||
<xsl:text>[[ ! -d $SRC_DIR/blfs-bootscripts ]] && mkdir $SRC_DIR/blfs-bootscripts
|
<xsl:param name="url" select="''"/>
|
||||||
pushd $SRC_DIR/blfs-bootscripts
|
<xsl:text>[[ ! -d $SRC_DIR/blfs-</xsl:text>
|
||||||
|
<xsl:copy-of select="$bootpkg"/>
|
||||||
|
<xsl:text> ]] && mkdir $SRC_DIR/blfs-</xsl:text>
|
||||||
|
<xsl:copy-of select="$bootpkg"/>
|
||||||
|
<xsl:text>
|
||||||
|
pushd $SRC_DIR/blfs-</xsl:text>
|
||||||
|
<xsl:copy-of select="$bootpkg"/>
|
||||||
|
<xsl:text>
|
||||||
URL=</xsl:text>
|
URL=</xsl:text>
|
||||||
<xsl:value-of select="id('bootscripts')//itemizedlist//ulink/@url"/><xsl:text>
|
<xsl:value-of select="$url"/>
|
||||||
|
<xsl:text>
|
||||||
BOOTPACKG=$(basename $URL)
|
BOOTPACKG=$(basename $URL)
|
||||||
if [[ ! -f $BOOTPACKG ]] ; then
|
if [[ ! -f $BOOTPACKG ]] ; then
|
||||||
if [[ -f $SRC_ARCHIVE/$PKG_DIR/$BOOTPACKG ]] ; then
|
if [[ -f $SRC_ARCHIVE/$PKG_DIR/$BOOTPACKG ]] ; then
|
||||||
|
@ -428,9 +488,26 @@ else
|
||||||
fi
|
fi
|
||||||
cd $BOOTUNPACKDIR
|
cd $BOOTUNPACKDIR
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="screen" mode="config">
|
||||||
|
<xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts']">
|
||||||
|
<xsl:call-template name="set-bootpkg-dir">
|
||||||
|
<xsl:with-param name="bootpkg" select="'bootscripts'"/>
|
||||||
|
<xsl:with-param name="url"
|
||||||
|
select="id('bootscripts')//itemizedlist//ulink/@url"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="preceding-sibling::para[1]/xref[@linkend='systemd-units']">
|
||||||
|
<xsl:call-template name="set-bootpkg-dir">
|
||||||
|
<xsl:with-param name="bootpkg" select="'systemd-units'"/>
|
||||||
|
<xsl:with-param name="url"
|
||||||
|
select="id('systemd-units')//itemizedlist//ulink/@url"/>
|
||||||
|
</xsl:call-template>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:apply-templates select='.'/>
|
<xsl:apply-templates select='.'/>
|
||||||
<xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts']">
|
<xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts' or
|
||||||
|
@linkend='systemd-units']">
|
||||||
<xsl:text>
|
<xsl:text>
|
||||||
popd</xsl:text>
|
popd</xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
@ -462,6 +539,8 @@ popd</xsl:text>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:variable name="APOS">'</xsl:variable>
|
||||||
|
|
||||||
<xsl:template name="output-root">
|
<xsl:template name="output-root">
|
||||||
<xsl:param name="out-string" select="''"/>
|
<xsl:param name="out-string" select="''"/>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
|
@ -509,6 +588,19 @@ popd</xsl:text>
|
||||||
select="substring-after($out-string,'\')"/>
|
select="substring-after($out-string,'\')"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
<xsl:when test="contains($out-string,string($APOS))
|
||||||
|
and $wrap-install = 'y'
|
||||||
|
and ancestor::sect2[@role='installation']">
|
||||||
|
<xsl:call-template name="output-root">
|
||||||
|
<xsl:with-param name="out-string"
|
||||||
|
select="substring-before($out-string,string($APOS))"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:text>'\''</xsl:text>
|
||||||
|
<xsl:call-template name="output-root">
|
||||||
|
<xsl:with-param name="out-string"
|
||||||
|
select="substring-after($out-string,string($APOS))"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="$out-string"/>
|
<xsl:value-of select="$out-string"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
|
|
187
CHEATSHEET
Normal file
187
CHEATSHEET
Normal file
|
@ -0,0 +1,187 @@
|
||||||
|
$Id$
|
||||||
|
This file contains examples of menu settings for various tasks.
|
||||||
|
------------------------------
|
||||||
|
LFS book, System V, stable (8.0) version.
|
||||||
|
Download the files to /usr/src (verify you have write access)
|
||||||
|
Build in /mnt/lfs (verify you have write access too)
|
||||||
|
Clean the build directory before beginning
|
||||||
|
Build a kernel, whose configuration is in /home/user/config-4.9.9-lfs-1
|
||||||
|
An fstab for the future system si located in /home/user/fstablfs
|
||||||
|
Run only the critical testsuites
|
||||||
|
Settings for a French user
|
||||||
|
Run four make jobs in parallel
|
||||||
|
-----------------------------
|
||||||
|
BOOK Settings --->
|
||||||
|
Use BOOK (Linux From Scratch System V) --->
|
||||||
|
Release (Branch or stable book) --->
|
||||||
|
Branch (preceded by "branch-"), stable Version, or tag (8.0)
|
||||||
|
[ ] Add blfs-tool support (NEW)
|
||||||
|
[ ] Add custom tools support (NEW)
|
||||||
|
|
||||||
|
General Settings --->
|
||||||
|
[ ] Change the default user/group and homedir for this build (NEW)
|
||||||
|
Build Directory (/mnt/lfs)
|
||||||
|
[*] Retrieve source files
|
||||||
|
Package Archive Directory (/usr/src)
|
||||||
|
[ ] Retry on 'connection refused' failure (NEW)
|
||||||
|
Number of retry attempts on download failures (20) (NEW)
|
||||||
|
Download timeout (in seconds) (30) (NEW)
|
||||||
|
FTP mirror (http://ftp.osuosl.org) (NEW)
|
||||||
|
[*] Run the makefile
|
||||||
|
[*] Rebuild files
|
||||||
|
|
||||||
|
Build Settings --->
|
||||||
|
[*] Run testsuites
|
||||||
|
Tests level (Only final critical testsuites) --->
|
||||||
|
Flavour (Don't stop on testsuite failures) --->
|
||||||
|
[ ] Package management
|
||||||
|
[ ] Create a log of installed files for each package
|
||||||
|
[*] Use a custom fstab file
|
||||||
|
Fstab file (optional) ($HOME/fstablfs)
|
||||||
|
[*] Build the kernel
|
||||||
|
Kernel config file ($HOME/config-4.9.9-lfs-1)
|
||||||
|
[ ] Strip Installed Binaries/Libraries
|
||||||
|
[ ] Install vim-lang package
|
||||||
|
[ ] DO NOT use/display progress_bar
|
||||||
|
TimeZone (Europe/Paris)
|
||||||
|
Language (fr_FR.UTF-8)
|
||||||
|
[ ] Install the full set of locales
|
||||||
|
Groff page size (A4) --->
|
||||||
|
|
||||||
|
Advanced Features --->
|
||||||
|
[*] Create SBU and disk usage report
|
||||||
|
[ ] Run comparison analysis on final stage
|
||||||
|
[*] Optimization and parallelization
|
||||||
|
Optimization settings --->
|
||||||
|
Number of parallel `make' jobs (4)
|
||||||
|
Optimization level (Both temp tools and final system) --->
|
||||||
|
Internal Settings (WARNING: for jhalfs developers only) --->
|
||||||
|
|
||||||
|
[ ] Rebuild the Makefile (see help)
|
||||||
|
|
||||||
|
------------------------------
|
||||||
|
------------------------------
|
||||||
|
LFS book, systemd, XML source of the LFS book in /usr/src/lfsbook
|
||||||
|
Download the files to /usr/src (verify you have write access)
|
||||||
|
Build in /mnt/lfs (verify you have write access too)
|
||||||
|
Clean the build directory before beginning
|
||||||
|
Build a kernel, whose configuration is in /home/user/config-4.10.3-lfs-systemd
|
||||||
|
An fstab for the future system si located in /home/user/fstablfs
|
||||||
|
Run all the testsuites
|
||||||
|
Settings for an user in California
|
||||||
|
Run four make jobs in parallel
|
||||||
|
-----------------------------
|
||||||
|
BOOK Settings --->
|
||||||
|
Use BOOK (Linux From Scratch systemd) --->
|
||||||
|
Release (Working Copy) --->
|
||||||
|
Loc of working copy (mandatory) (/usr/src/lfsbook)
|
||||||
|
[ ] Add blfs-tool support (NEW)
|
||||||
|
[ ] Add custom tools support (NEW)
|
||||||
|
|
||||||
|
General Settings --->
|
||||||
|
[ ] Change the default user/group and homedir for this build (NEW)
|
||||||
|
Build Directory (/mnt/lfs)
|
||||||
|
[*] Retrieve source files
|
||||||
|
Package Archive Directory (/usr/src)
|
||||||
|
[ ] Retry on 'connection refused' failure (NEW)
|
||||||
|
Number of retry attempts on download failures (20) (NEW)
|
||||||
|
Download timeout (in seconds) (30) (NEW)
|
||||||
|
FTP mirror (http://ftp.osuosl.org) (NEW)
|
||||||
|
[*] Run the makefile
|
||||||
|
[*] Rebuild files
|
||||||
|
|
||||||
|
Build Settings --->
|
||||||
|
[*] Run testsuites
|
||||||
|
Tests level (Both temporary tools and final system testsuites) --->
|
||||||
|
Flavour (Don't stop on testsuite failures) --->
|
||||||
|
[ ] Package management
|
||||||
|
[ ] Create a log of installed files for each package
|
||||||
|
[*] Use a custom fstab file
|
||||||
|
Fstab file (optional) ($HOME/fstablfs)
|
||||||
|
[*] Build the kernel
|
||||||
|
Kernel config file ($HOME/config-4.10.3-lfs-systemd
|
||||||
|
[ ] Strip Installed Binaries/Libraries
|
||||||
|
[ ] Install vim-lang package
|
||||||
|
[ ] DO NOT use/display progress_bar
|
||||||
|
TimeZone (America/Los_Angeles)
|
||||||
|
Language (en_US.UTF-8)
|
||||||
|
[ ] Install the full set of locales
|
||||||
|
Groff page size (letter) --->
|
||||||
|
|
||||||
|
Advanced Features --->
|
||||||
|
[*] Create SBU and disk usage report
|
||||||
|
[ ] Run comparison analysis on final stage
|
||||||
|
[*] Optimization and parallelization
|
||||||
|
Optimization settings --->
|
||||||
|
Number of parallel `make' jobs (4)
|
||||||
|
Optimization level (Both temp tools and final system) --->
|
||||||
|
Internal Settings (WARNING: for jhalfs developers only) --->
|
||||||
|
|
||||||
|
[ ] Rebuild the Makefile (see help)
|
||||||
|
|
||||||
|
------------------------------
|
||||||
|
------------------------------
|
||||||
|
CLFS book, systemd, stable version (as of April 2017)
|
||||||
|
X86 multilib
|
||||||
|
Download the files to /usr/src (verify you have write access)
|
||||||
|
Build in /mnt/clfs (verify you have write access too)
|
||||||
|
Clean the build directory before beginning
|
||||||
|
Use "boot" method, with a temporary kernel in /home/user/config-boot
|
||||||
|
Build a kernel, whose configuration is in /home/user/config-4.10.3-clfs-systemd
|
||||||
|
An fstab for the future system si located in /home/user/fstablfs
|
||||||
|
Run all the testsuites for final system
|
||||||
|
Settings for an user in Sidney (Australia)
|
||||||
|
Run four make jobs in parallel
|
||||||
|
-----------------------------
|
||||||
|
BOOK Settings --->
|
||||||
|
Use BOOK (Cross-Compiled Linux From Scratch) --->
|
||||||
|
Release (Branch or stable book) --->
|
||||||
|
Branch (preceded by "branch-"), stable Version, or tag (3.0.0-systemd)
|
||||||
|
Target architecture (x86) --->
|
||||||
|
Library (multilib) --->
|
||||||
|
Build method (boot) --->
|
||||||
|
BOOT kernel config file (mandatory) ($HOME/config-boot)
|
||||||
|
[ ] Add blfs-tool support (NEW)
|
||||||
|
[ ] Add custom tools support (NEW)
|
||||||
|
|
||||||
|
General Settings --->
|
||||||
|
[ ] Change the default user/group and homedir for this build (NEW)
|
||||||
|
Build Directory (/mnt/clfs)
|
||||||
|
[*] Retrieve source files
|
||||||
|
Package Archive Directory (/usr/src)
|
||||||
|
[ ] Retry on 'connection refused' failure (NEW)
|
||||||
|
Number of retry attempts on download failures (20) (NEW)
|
||||||
|
Download timeout (in seconds) (30) (NEW)
|
||||||
|
FTP mirror (http://ftp.osuosl.org) (NEW)
|
||||||
|
[*] Run the makefile
|
||||||
|
[*] Rebuild files
|
||||||
|
|
||||||
|
Build Settings --->
|
||||||
|
[*] Run testsuites
|
||||||
|
Tests level (All final system testsuites) --->
|
||||||
|
Flavour (Don't stop on testsuite failures) --->
|
||||||
|
[ ] Create a log of installed files for each package
|
||||||
|
[*] Use a custom fstab file
|
||||||
|
Fstab file (optional) ($HOME/fstablfs)
|
||||||
|
[*] Build the kernel
|
||||||
|
Kernel config file ($HOME/config-4.10.3-clfs-systemd
|
||||||
|
[ ] Strip Installed Binaries/Libraries
|
||||||
|
[ ] Install vim-lang package
|
||||||
|
[ ] DO NOT use/display progress_bar
|
||||||
|
TimeZone (Australia/Sydney)
|
||||||
|
Language (en_AU.UTF-8)
|
||||||
|
[ ] Install the full set of locales
|
||||||
|
Groff page size (A4) --->
|
||||||
|
|
||||||
|
Advanced Features --->
|
||||||
|
[*] Create SBU and disk usage report
|
||||||
|
[ ] Run comparison analysis on final stage
|
||||||
|
[*] Optimization and parallelization
|
||||||
|
Optimization settings --->
|
||||||
|
Number of parallel `make' jobs (4)
|
||||||
|
Optimization level (Cross tools (only MAKEFLAGS), temp tools and final system) --->
|
||||||
|
Internal Settings (WARNING: for jhalfs developers only) --->
|
||||||
|
|
||||||
|
[ ] Rebuild the Makefile (see help)
|
||||||
|
--------------------------------
|
||||||
|
|
|
@ -63,6 +63,7 @@ cat << EOF
|
||||||
echo "" >> \$(LUSER_HOME)/.bashrc && \\
|
echo "" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
echo "unset CFLAGS" >> \$(LUSER_HOME)/.bashrc && \\
|
echo "unset CFLAGS" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
echo "unset CXXFLAGS" >> \$(LUSER_HOME)/.bashrc && \\
|
echo "unset CXXFLAGS" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
|
echo "unset PKG_CONFIG_PATH" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
echo "" >> \$(LUSER_HOME)/.bashrc && \\
|
echo "" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
EOF
|
EOF
|
||||||
) >> $MKFILE.tmp
|
) >> $MKFILE.tmp
|
||||||
|
@ -377,10 +378,13 @@ boot_Makefiles() { #
|
||||||
*grub | *aboot | *colo | *silo | *arcload | *lilo | *introduction ) continue ;;
|
*grub | *aboot | *colo | *silo | *arcload | *lilo | *introduction ) continue ;;
|
||||||
*how-to-view*) continue ;;
|
*how-to-view*) continue ;;
|
||||||
*whatnext*) continue ;;
|
*whatnext*) continue ;;
|
||||||
*fstab) [[ ! -z ${FSTAB} ]] && cp ${FSTAB} $BUILDDIR/sources/fstab ;;
|
*fstab) [[ -z "${FSTAB}" ]] ||
|
||||||
|
[[ ${FSTAB} == $BUILDDIR/sources/fstab ]] ||
|
||||||
|
cp ${FSTAB} $BUILDDIR/sources/fstab ;;
|
||||||
*kernel) # if there is no kernel config file do not build the kernel
|
*kernel) # if there is no kernel config file do not build the kernel
|
||||||
[[ -z $CONFIG ]] && continue
|
[[ -z $BOOT_CONFIG ]] && continue
|
||||||
# Copy the config file to /sources with a standardized name
|
# Copy the config file to /sources with a standardized name
|
||||||
|
[[ ${BOOT_CONFIG} == $BUILDDIR/sources/bootkernel-config ]] ||
|
||||||
cp $BOOT_CONFIG $BUILDDIR/sources/bootkernel-config
|
cp $BOOT_CONFIG $BUILDDIR/sources/bootkernel-config
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -495,7 +499,7 @@ boot_Makefiles() { #
|
||||||
*changingowner) wrt_RunAsRoot "${file}" ;;
|
*changingowner) wrt_RunAsRoot "${file}" ;;
|
||||||
*devices) wrt_RunAsRoot "${file}" ;;
|
*devices) wrt_RunAsRoot "${file}" ;;
|
||||||
*fstab)
|
*fstab)
|
||||||
if [[ -n "$FSTAB" ]]; then
|
if [[ -n "${FSTAB}" ]]; then
|
||||||
LUSER_wrt_CopyFstab
|
LUSER_wrt_CopyFstab
|
||||||
else
|
else
|
||||||
LUSER_wrt_RunAsUser "${file}"
|
LUSER_wrt_RunAsUser "${file}"
|
||||||
|
@ -730,10 +734,12 @@ bootscripts_Makefiles() { #
|
||||||
this_script=`basename $file`
|
this_script=`basename $file`
|
||||||
|
|
||||||
case $this_script in
|
case $this_script in
|
||||||
*udev) continue ;; # This is not a script but a commentary, we want udev-rules
|
*udev) continue ;; # This is not a script but a comment, we want udev-rules
|
||||||
*console*) continue ;; # Use the files that came with the bootscripts
|
*console*) continue ;; # Use the files that came with the bootscripts
|
||||||
# fstab is now here (for 3.x.y)
|
# fstab is now here (for 3.x.y)
|
||||||
*fstab) [[ ! -z ${FSTAB} ]] && cp ${FSTAB} $BUILDDIR/sources/fstab ;;
|
*fstab) [[ -z "${FSTAB}" ]] ||
|
||||||
|
[[ ${FSTAB} == $BUILDDIR/sources/fstab ]] ||
|
||||||
|
cp ${FSTAB} $BUILDDIR/sources/fstab ;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -906,10 +912,13 @@ bootable_Makefiles() { #
|
||||||
# A little housekeeping on the scripts
|
# A little housekeeping on the scripts
|
||||||
case $this_script in
|
case $this_script in
|
||||||
*grub | *aboot | *colo | *silo | *arcload | *lilo | *reboot* ) continue ;;
|
*grub | *aboot | *colo | *silo | *arcload | *lilo | *reboot* ) continue ;;
|
||||||
*fstab) [[ ! -z ${FSTAB} ]] && cp ${FSTAB} $BUILDDIR/sources/fstab ;;
|
*fstab) [[ -z "${FSTAB}" ]] ||
|
||||||
|
[[ ${FSTAB} == $BUILDDIR/sources/fstab ]] ||
|
||||||
|
cp ${FSTAB} $BUILDDIR/sources/fstab ;;
|
||||||
*kernel) # if there is no kernel config file do not build the kernel
|
*kernel) # if there is no kernel config file do not build the kernel
|
||||||
[[ -z $CONFIG ]] && continue
|
[[ -z $CONFIG ]] && continue
|
||||||
# Copy the config file to /sources with a standardized name
|
# Copy the config file to /sources with a standardized name
|
||||||
|
[[ $CONFIG == $BUILDDIR/sources/kernel-config ]] ||
|
||||||
cp $CONFIG $BUILDDIR/sources/kernel-config
|
cp $CONFIG $BUILDDIR/sources/kernel-config
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -45,6 +45,7 @@ cat << EOF
|
||||||
echo "" >> \$(LUSER_HOME)/.bashrc && \\
|
echo "" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
echo "unset CFLAGS" >> \$(LUSER_HOME)/.bashrc && \\
|
echo "unset CFLAGS" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
echo "unset CXXFLAGS" >> \$(LUSER_HOME)/.bashrc && \\
|
echo "unset CXXFLAGS" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
|
echo "unset PKG_CONFIG_PATH" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
echo "" >> \$(LUSER_HOME)/.bashrc && \\
|
echo "" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
echo "export CLFS_HOST=\"${CLFS_HOST}\"" >> \$(LUSER_HOME)/.bashrc && \\
|
echo "export CLFS_HOST=\"${CLFS_HOST}\"" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
echo "export CLFS_TARGET=\"${TARGET}\"" >> \$(LUSER_HOME)/.bashrc && \\
|
echo "export CLFS_TARGET=\"${TARGET}\"" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
|
|
|
@ -45,6 +45,7 @@ cat << EOF
|
||||||
echo "" >> \$(LUSER_HOME)/.bashrc && \\
|
echo "" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
echo "unset CFLAGS" >> \$(LUSER_HOME)/.bashrc && \\
|
echo "unset CFLAGS" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
echo "unset CXXFLAGS" >> \$(LUSER_HOME)/.bashrc && \\
|
echo "unset CXXFLAGS" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
|
echo "unset PKG_CONFIG_PATH" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
echo "" >> \$(LUSER_HOME)/.bashrc && \\
|
echo "" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
echo "export CLFS_HOST=\"${CLFS_HOST}\"" >> \$(LUSER_HOME)/.bashrc && \\
|
echo "export CLFS_HOST=\"${CLFS_HOST}\"" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
echo "export CLFS_TARGET=\"${TARGET}\"" >> \$(LUSER_HOME)/.bashrc && \\
|
echo "export CLFS_TARGET=\"${TARGET}\"" >> \$(LUSER_HOME)/.bashrc && \\
|
||||||
|
|
538
Config.in
538
Config.in
|
@ -1,86 +1,126 @@
|
||||||
menu "--- BOOK Settings"
|
menu "BOOK Settings"
|
||||||
|
|
||||||
#--- BOOK/script
|
#--- BOOK/script
|
||||||
choice
|
choice
|
||||||
prompt "Use BOOK"
|
prompt "Use BOOK"
|
||||||
default BOOK_LFS
|
default BOOK_LFS
|
||||||
help
|
help
|
||||||
#-- Select the BOOK/Build style you wish to configure.
|
Select the book where build instructions are retrieved.
|
||||||
|
|
||||||
config BOOK_LFS
|
config BOOK_LFS
|
||||||
bool "Linux From Scratch"
|
bool "Linux From Scratch System V"
|
||||||
|
help
|
||||||
|
Set up the tools to build LFS with Sys V init.
|
||||||
|
|
||||||
|
config BOOK_LFS_SYSD
|
||||||
|
bool "Linux From Scratch systemd"
|
||||||
|
help
|
||||||
|
Set up the tools to build LFS with systemd init.
|
||||||
|
|
||||||
config BOOK_CLFS
|
config BOOK_CLFS
|
||||||
bool "Cross-Compiled Linux From Scratch"
|
bool "Cross-Compiled Linux From Scratch"
|
||||||
|
help
|
||||||
|
Set up the tools to build CLFS.
|
||||||
|
|
||||||
config BOOK_CLFS2
|
config BOOK_CLFS2
|
||||||
bool "Cross-Compiled Linux From Scratch (Sysroot method)"
|
bool "Cross-Compiled Linux From Scratch (Sysroot method)"
|
||||||
|
help
|
||||||
|
Set up the tools to build CLFS by the sysroot method.
|
||||||
|
|
||||||
config BOOK_CLFS3
|
config BOOK_CLFS3
|
||||||
bool "Cross-Compiled Linux From Scratch (Embedded Systems)"
|
bool "Cross-Compiled Linux From Scratch (Embedded Systems)"
|
||||||
|
help
|
||||||
|
Set up the tools to build CLFS with tools for embedded systems.
|
||||||
|
|
||||||
# config BOOK_HLFS
|
config BOOK_BLFS
|
||||||
# bool "Hardened Linux From Scratch"
|
bool "Beyond Linux From Scratch (see help)"
|
||||||
|
help
|
||||||
|
if the (C)LFS system has already been built, install the tools
|
||||||
|
to build BLFS packages.
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
|
choice
|
||||||
|
depends BOOK_BLFS
|
||||||
|
prompt "Init system"
|
||||||
|
|
||||||
|
config BLFS_SYSV
|
||||||
|
bool "BLFS Sys V"
|
||||||
|
help
|
||||||
|
Extract the Sys V flavour of the BLFS book
|
||||||
|
|
||||||
|
config BLFS_SYSD
|
||||||
|
bool "BLFS systemd"
|
||||||
|
help
|
||||||
|
Extract the systemd flavour of the BLFS book
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config INITSYS
|
||||||
|
string
|
||||||
|
default "sysv" if BOOK_LFS || BLFS_SYSV
|
||||||
|
default "systemd" if BOOK_LFS_SYSD || BLFS_SYSD
|
||||||
|
|
||||||
config PROGNAME
|
config PROGNAME
|
||||||
string
|
string
|
||||||
default "lfs" if BOOK_LFS
|
default "lfs" if BOOK_LFS || BOOK_LFS_SYSD
|
||||||
default "clfs" if BOOK_CLFS
|
default "clfs" if BOOK_CLFS
|
||||||
default "clfs2" if BOOK_CLFS2
|
default "clfs2" if BOOK_CLFS2
|
||||||
default "clfs3" if BOOK_CLFS3
|
default "clfs3" if BOOK_CLFS3
|
||||||
default "hlfs" if BOOK_HLFS
|
|
||||||
|
|
||||||
config RUN_ME
|
config RUN_ME
|
||||||
string
|
string
|
||||||
default "./jhalfs run"
|
default "./jhalfs run" if BOOK_LFS || BOOK_LFS_SYSD || BOOK_CLFS || \
|
||||||
|
BOOK_CLFS2 || BOOK_CLFS_3
|
||||||
|
default "./install-blfs-tools.sh auto" if BOOK_BLFS
|
||||||
#--- End BOOK/script
|
#--- End BOOK/script
|
||||||
|
|
||||||
#--- Book version
|
#--- Book version
|
||||||
choice
|
choice
|
||||||
prompt "Release"
|
prompt "Release"
|
||||||
default relSVN if BOOK_LFS || BOOK_HLFS
|
default relSVN if BOOK_LFS || BOOK_LFS_SYSD || BOOK_BLFS
|
||||||
default relGIT if BOOK_CLFS || BOOK_CLFS2 || BOOK_CLFS3
|
default relGIT if BOOK_CLFS || BOOK_CLFS2 || BOOK_CLFS3
|
||||||
|
|
||||||
config relSVN
|
config relSVN
|
||||||
bool "SVN"
|
bool "SVN"
|
||||||
depends on BOOK_LFS || BOOK_HLFS
|
depends on BOOK_LFS || BOOK_BLFS || BOOK_LFS_SYSD
|
||||||
help
|
help
|
||||||
#-- Current development version as in trunk
|
Current development version as in trunk
|
||||||
|
|
||||||
config relGIT
|
config relGIT
|
||||||
bool "GIT"
|
bool "GIT"
|
||||||
depends on BOOK_CLFS || BOOK_CLFS2 || BOOK_CLFS3
|
depends on BOOK_CLFS || BOOK_CLFS2 || BOOK_CLFS3
|
||||||
help
|
help
|
||||||
#-- Current development git master branch
|
Current development git master branch
|
||||||
|
|
||||||
config WORKING_COPY
|
config WORKING_COPY
|
||||||
bool "Working Copy"
|
bool "Working Copy"
|
||||||
help
|
help
|
||||||
#-- A local working copy
|
A local working copy
|
||||||
|
|
||||||
config BRANCH
|
config BRANCH
|
||||||
bool "Branch or stable book" if !BOOK_CLFS2 && !BOOK_CLFS3
|
bool "Branch or stable book" if !BOOK_CLFS2 && !BOOK_CLFS3
|
||||||
help
|
help
|
||||||
#-- A supported SVN/GIT branch or stable released book
|
A supported SVN/GIT branch or stable released book
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
config BRANCH_ID
|
config BRANCH_ID
|
||||||
string "Stable Version or branch (preceded by branch-)"
|
string "Branch (preceded by \"branch-\"), stable Version, or tag"
|
||||||
default "**EDIT ME**"
|
default "**EDIT ME**"
|
||||||
depends BRANCH
|
depends BRANCH
|
||||||
help
|
help
|
||||||
#-- A list of valid branches and stable book IDs is available here:
|
A list of valid branches and stable book IDs is available at
|
||||||
# http://wiki.linuxfromscratch.org/alfs/wiki/SupportedBooks
|
http://wiki.linuxfromscratch.org/alfs/wiki/SupportedBooks
|
||||||
# Enter branch-XXX for branch XXX, and just YYY for tag YYY or
|
|
||||||
# stable YYY version
|
Enter "branch-XXX" for branch XXX, or just "YYY" for stable (or tag)
|
||||||
|
YYY version.
|
||||||
|
|
||||||
config BOOK
|
config BOOK
|
||||||
string "Loc of working copy (mandatory)"
|
string "Loc of working copy (mandatory)"
|
||||||
default "**EDIT ME**"
|
default "**EDIT ME**"
|
||||||
depends WORKING_COPY
|
depends WORKING_COPY
|
||||||
help
|
help
|
||||||
#-- The full path to a local copy of the book XML sources
|
The full path to a local copy of the book XML sources
|
||||||
#
|
|
||||||
#--- End BOOK version
|
#--- End BOOK version
|
||||||
|
|
||||||
#--- CLFS specific params
|
#--- CLFS specific params
|
||||||
|
@ -89,7 +129,7 @@ menu "--- BOOK Settings"
|
||||||
default ARCH_X86
|
default ARCH_X86
|
||||||
depends BOOK_CLFS || BOOK_CLFS2 || BOOK_CLFS3
|
depends BOOK_CLFS || BOOK_CLFS2 || BOOK_CLFS3
|
||||||
help
|
help
|
||||||
#-- Choose the target system base architecture
|
Choose the target system base architecture
|
||||||
|
|
||||||
config ARCH_X86
|
config ARCH_X86
|
||||||
bool "x86"
|
bool "x86"
|
||||||
|
@ -118,8 +158,8 @@ menu "--- BOOK Settings"
|
||||||
depends BOOK_CLFS3 && ARCH_MIPS
|
depends BOOK_CLFS3 && ARCH_MIPS
|
||||||
default PLATFORM_GENERIC
|
default PLATFORM_GENERIC
|
||||||
help
|
help
|
||||||
# Choose a destination platform
|
Choose a destination platform
|
||||||
# Platform specific files will be included
|
Platform specific files will be included
|
||||||
|
|
||||||
config PLATFORM_GENERIC
|
config PLATFORM_GENERIC
|
||||||
bool "Generic platform"
|
bool "Generic platform"
|
||||||
|
@ -133,7 +173,7 @@ menu "--- BOOK Settings"
|
||||||
depends (BOOK_CLFS && !ARCH_ALPHA) || (BOOK_CLFS3 && ARCH_MIPS)
|
depends (BOOK_CLFS && !ARCH_ALPHA) || (BOOK_CLFS3 && ARCH_MIPS)
|
||||||
default DATA_32
|
default DATA_32
|
||||||
help
|
help
|
||||||
#-- Choose the target system libraries type
|
Choose the target system libraries type
|
||||||
|
|
||||||
config DATA_32
|
config DATA_32
|
||||||
bool "32-bit"
|
bool "32-bit"
|
||||||
|
@ -149,7 +189,7 @@ menu "--- BOOK Settings"
|
||||||
prompt "Processor type"
|
prompt "Processor type"
|
||||||
depends (BOOK_CLFS || BOOK_CLFS2 || BOOK_CLFS3) && ((ARCH_X86 && !(DATA_64 || DATA_MULTI)) || ARCH_MIPS || ARCH_HPPA || ARCH_ALPHA || (ARCH_SPARC && (DATA_64 || DATA_MULTI)) || (ARCH_ARM && BOOK_CLFS3))
|
depends (BOOK_CLFS || BOOK_CLFS2 || BOOK_CLFS3) && ((ARCH_X86 && !(DATA_64 || DATA_MULTI)) || ARCH_MIPS || ARCH_HPPA || ARCH_ALPHA || (ARCH_SPARC && (DATA_64 || DATA_MULTI)) || (ARCH_ARM && BOOK_CLFS3))
|
||||||
help
|
help
|
||||||
#-- Choose the target system processor
|
Choose the target system processor
|
||||||
|
|
||||||
config PROC_i486
|
config PROC_i486
|
||||||
bool "486 Compatibles" if ARCH_X86
|
bool "486 Compatibles" if ARCH_X86
|
||||||
|
@ -220,7 +260,7 @@ menu "--- BOOK Settings"
|
||||||
depends BOOK_CLFS3 && ARCH_MIPS && DATA_64
|
depends BOOK_CLFS3 && ARCH_MIPS && DATA_64
|
||||||
default ABI_64
|
default ABI_64
|
||||||
help
|
help
|
||||||
#-- Choose the target system ABI to use
|
Choose the target system ABI to use
|
||||||
|
|
||||||
config ABI_32
|
config ABI_32
|
||||||
bool "o32"
|
bool "o32"
|
||||||
|
@ -350,8 +390,9 @@ menu "--- BOOK Settings"
|
||||||
prompt "Build method"
|
prompt "Build method"
|
||||||
depends BOOK_CLFS
|
depends BOOK_CLFS
|
||||||
help
|
help
|
||||||
#-- What build method should be used: a chroot jail or minimal boot system
|
What build method should be used: a chroot jail or minimal boot
|
||||||
# Review the Cross-LFS book chap6 "TO BOOT OR CHROOT" for a full explanation.
|
system. Review the Cross-LFS book chap6 "TO BOOT OR CHROOT" for
|
||||||
|
a full explanation.
|
||||||
|
|
||||||
config BUILD_CHROOT
|
config BUILD_CHROOT
|
||||||
bool "chroot"
|
bool "chroot"
|
||||||
|
@ -370,131 +411,34 @@ menu "--- BOOK Settings"
|
||||||
default "***EDIT ME***"
|
default "***EDIT ME***"
|
||||||
depends on BUILD_BOOT
|
depends on BUILD_BOOT
|
||||||
help
|
help
|
||||||
#-- If METHOD=boot, location of boot-kernel config file
|
If METHOD=boot, location of boot-kernel config file
|
||||||
# The config file will be copied to ${BUILD_DIR}/sources
|
The config file will be copied to ${BUILD_DIR}/sources
|
||||||
# and renamed 'bootkernel-config'
|
and renamed 'bootkernel-config'
|
||||||
#
|
NOTE: this setting is required
|
||||||
# NOTE: this setting is required
|
|
||||||
#--- End CLFS specific params
|
#--- End CLFS specific params
|
||||||
|
|
||||||
#--- HLFS specific params
|
|
||||||
config GRSECURITY_HOST
|
|
||||||
bool "Building on grsecurity enabled host?"
|
|
||||||
default n
|
|
||||||
depends on BOOK_HLFS
|
|
||||||
help
|
|
||||||
#-- If your build system has grsecurity patches applied
|
|
||||||
# you MUST enable this switch.
|
|
||||||
|
|
||||||
choice
|
|
||||||
prompt "Library"
|
|
||||||
depends on BOOK_HLFS
|
|
||||||
help
|
|
||||||
#-- Which library model to use: uClibc/glibc
|
|
||||||
|
|
||||||
config LIB_GLIBC
|
|
||||||
bool "glibc"
|
|
||||||
|
|
||||||
config LIB_UCLIBC
|
|
||||||
bool "uClibc"
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
config MODEL
|
|
||||||
depends on BOOK_HLFS
|
|
||||||
string
|
|
||||||
default "glibc" if LIB_GLIBC
|
|
||||||
default "uclibc" if LIB_UCLIBC
|
|
||||||
|
|
||||||
choice
|
|
||||||
prompt "Kernel series"
|
|
||||||
depends on BOOK_HLFS
|
|
||||||
help
|
|
||||||
#-- Which kernel series to use: 2.6/2.4
|
|
||||||
|
|
||||||
config KERNEL_26
|
|
||||||
bool "2.6 kernel series"
|
|
||||||
|
|
||||||
config KERNEL_24
|
|
||||||
bool "2.4 kernel series"
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
config KERNEL
|
|
||||||
depends on BOOK_HLFS
|
|
||||||
string
|
|
||||||
default "2.6" if KERNEL_26
|
|
||||||
default "2.4" if KERNEL_24
|
|
||||||
|
|
||||||
#--- Custom Tools support
|
|
||||||
config CUSTOM_TOOLS
|
|
||||||
bool "Add custom tools support"
|
|
||||||
default n
|
|
||||||
help
|
|
||||||
#--- Activating this option additional packages you create
|
|
||||||
# will be installed after finished the xLFS system build.
|
|
||||||
#
|
|
||||||
#--- End Custom Tools support
|
|
||||||
|
|
||||||
#--- blfs-tool Support
|
#--- blfs-tool Support
|
||||||
config BLFS_TOOL
|
config BLFS_TOOL
|
||||||
bool "Add blfs-tool support"
|
bool "Add blfs-tool support"
|
||||||
default n
|
default n
|
||||||
depends on !BOOK_CLFS3
|
depends on !BOOK_CLFS3 && !BOOK_BLFS
|
||||||
help
|
help
|
||||||
#--- Activating this option will install additional
|
Activating this option will install additional packages needed
|
||||||
# packages needed to use blfs-tool when booting
|
to use blfs tools after booting the new system.
|
||||||
# the new system.
|
The blfs-tool files will be installed under $BUILD_DIR/blfs_root
|
||||||
#
|
(see below).
|
||||||
# The blfs-tool files will be installed under
|
After booting the new xLFS system, but before using the blfs tools,
|
||||||
# $BUILD_DIR/blfs_root.
|
you should create a user account, move the /blfs_root directory
|
||||||
|
to that user's home, and change its ownership to that of the user.
|
||||||
|
Also, be sure to give the user read and write access on the
|
||||||
|
$TRACKING_DIR directory and the files that it contains.
|
||||||
|
Don't forget to configure sudo properly on the new system.
|
||||||
|
|
||||||
# After booting the new xLFS system, but before using
|
config DUMMY # Avoid indenting the items below
|
||||||
# blfs-tool, you should create a user account and
|
bool
|
||||||
# move the /blfs-root directory to the user's home,
|
|
||||||
# making them the directory and files owner.
|
|
||||||
#
|
|
||||||
# Also, be sure to give the user read and write
|
|
||||||
# privileges on the $TRACKING_DIR directory and
|
|
||||||
# the files that it contains.
|
|
||||||
#
|
|
||||||
# Don't forget to configure sudo properly.
|
|
||||||
|
|
||||||
choice
|
|
||||||
prompt "BLFS Release"
|
|
||||||
default BLFS_SVN
|
|
||||||
depends on BLFS_TOOL
|
|
||||||
config BLFS_SVN
|
|
||||||
bool "BLFS SVN"
|
|
||||||
help
|
|
||||||
#-- Current development version as in trunk
|
|
||||||
|
|
||||||
config BLFS_WORKING_COPY
|
|
||||||
bool "BLFS working copy"
|
|
||||||
help
|
|
||||||
#-- A local working copy of the BLFS book.
|
|
||||||
|
|
||||||
config BLFS_BRANCH
|
|
||||||
bool "BLFS Branch or stable book"
|
|
||||||
help
|
|
||||||
#-- A supported SVN branch or stable book release
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
config BLFS_WC_LOCATION
|
|
||||||
string "Location of the local BLFS working copy (mandatory)"
|
|
||||||
default "**EDIT ME**"
|
|
||||||
depends on BLFS_WORKING_COPY
|
|
||||||
help
|
|
||||||
#-- Full path to the BLFS book working copy"
|
|
||||||
|
|
||||||
config BLFS_BRANCH_ID
|
|
||||||
string "BLFS Book Version (mandatory)"
|
|
||||||
default "**EDIT ME**"
|
|
||||||
depends on BLFS_BRANCH
|
|
||||||
help
|
|
||||||
#-- A list of valid branches and stable book IDs is available here.
|
|
||||||
# http://wiki.linuxfromscratch.org/alfs/wiki/SupportedBooks
|
|
||||||
|
|
||||||
|
if BLFS_TOOL
|
||||||
menu "blfs-tool dependencies"
|
menu "blfs-tool dependencies"
|
||||||
depends on BLFS_TOOL
|
|
||||||
|
|
||||||
config DEP_LIBXML
|
config DEP_LIBXML
|
||||||
bool "libxml2 (required)"
|
bool "libxml2 (required)"
|
||||||
|
@ -504,18 +448,10 @@ menu "--- BOOK Settings"
|
||||||
bool "libxslt (required)"
|
bool "libxslt (required)"
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config DEP_TIDY
|
|
||||||
bool "tidy (required)"
|
|
||||||
default y
|
|
||||||
|
|
||||||
config DEP_DBXML
|
config DEP_DBXML
|
||||||
bool "DocBook XML DTD (required)"
|
bool "DocBook XML DTD (required)"
|
||||||
default y
|
default y
|
||||||
|
|
||||||
#config DEP_DBXSL
|
|
||||||
#bool "DocBook XSL (required)"
|
|
||||||
#default y
|
|
||||||
|
|
||||||
config DEP_LYNX
|
config DEP_LYNX
|
||||||
bool "lynx (optional, for reading the generated book)"
|
bool "lynx (optional, for reading the generated book)"
|
||||||
default y
|
default y
|
||||||
|
@ -532,78 +468,139 @@ menu "--- BOOK Settings"
|
||||||
bool "GPM (optional, see help)"
|
bool "GPM (optional, see help)"
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
#-- if you install gpm, it will be started
|
if you install gpm, it will be started
|
||||||
# automatically on boot. You'll have to edit
|
automatically on boot. You'll have to edit
|
||||||
# /etc/sysconfig/mouse for your system
|
/etc/sysconfig/mouse for your system
|
||||||
|
|
||||||
config DEP_SVN
|
config DEP_SVN
|
||||||
bool "SVN client (optional, see help)"
|
bool "SVN client (optional, see help)"
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
#-- Subversion is needed for updating the book
|
Subversion is needed for updating the book
|
||||||
# sources. If you want ssl support, select
|
sources. If you want ssl support, select
|
||||||
# OPENSSL below.
|
OPENSSL below.
|
||||||
|
|
||||||
config DEP_OPENSSL
|
config DEP_OPENSSL
|
||||||
bool "OPENSSL (optional, see help)"
|
bool "OPENSSL (optional, see help)"
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
#-- selecting OPENSSL here allows to build
|
selecting OPENSSL here allows to build
|
||||||
# subversion with ssl support, avoiding a later
|
subversion with ssl support, avoiding a later
|
||||||
# recompilation
|
recompilation
|
||||||
|
|
||||||
config DEP_PYTHON
|
config DEP_PYTHON
|
||||||
bool "PYTHON 2 (optional, see help)"
|
bool "PYTHON 2 (optional, see help)"
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
#-- selecting PYTHON 2 here allows to build
|
selecting PYTHON 2 here allows to build
|
||||||
# the libxml2 and libxslt python modules,
|
the libxml2 and libxslt python modules,
|
||||||
# avoiding a later recompilation
|
avoiding a later recompilation
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "BLFS Release"
|
||||||
|
default BLFS_SVN
|
||||||
|
|
||||||
|
config BLFS_SVN
|
||||||
|
bool "BLFS SVN"
|
||||||
|
help
|
||||||
|
Current development version as in trunk
|
||||||
|
|
||||||
|
config BLFS_WORKING_COPY
|
||||||
|
bool "BLFS working copy"
|
||||||
|
help
|
||||||
|
A local working copy of the BLFS book.
|
||||||
|
|
||||||
|
config BLFS_BRANCH
|
||||||
|
bool "BLFS Branch or stable book"
|
||||||
|
help
|
||||||
|
A supported SVN branch or stable book release
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config BLFS_WC_LOCATION
|
||||||
|
string "Location of the local BLFS working copy (mandatory)"
|
||||||
|
default "**EDIT ME**"
|
||||||
|
depends on BLFS_WORKING_COPY
|
||||||
|
help
|
||||||
|
Full path to the BLFS book working copy"
|
||||||
|
|
||||||
|
config BLFS_BRANCH_ID
|
||||||
|
string "BLFS Book Version (mandatory)"
|
||||||
|
default "**EDIT ME**"
|
||||||
|
depends on BLFS_BRANCH
|
||||||
|
help
|
||||||
|
A list of valid branches and stable book IDs is available at
|
||||||
|
http://wiki.linuxfromscratch.org/alfs/wiki/SupportedBooks.
|
||||||
|
endif
|
||||||
#--- End blfs-tool Support
|
#--- End blfs-tool Support
|
||||||
|
|
||||||
#--- BLFS specific params
|
#--- BLFS params (Used for installing the tools, either after a jhalfs run
|
||||||
|
# or directly)
|
||||||
config BLFS_ROOT
|
config BLFS_ROOT
|
||||||
string "Directory root"
|
string "Root of the tools directory (see help)"
|
||||||
default "/blfs_root"
|
default "/blfs_root"
|
||||||
depends on BLFS_TOOL
|
depends on BLFS_TOOL || BOOK_BLFS
|
||||||
help
|
help
|
||||||
#-- Full path to the directory where all required
|
Path to the directory where all required files and scripts
|
||||||
# files and scripts will be stored.
|
will be stored.
|
||||||
|
|
||||||
|
This path must begin with a slash, and:
|
||||||
|
- is relative to the user's HOME directory when installing the
|
||||||
|
blfs tools on an already existing LFS system.
|
||||||
|
- is relative to the root of the build directory (`/' in chroot)
|
||||||
|
when adding the tools after a jhalfs run
|
||||||
|
|
||||||
|
CAUTION: this directory will be removed if it already exists.
|
||||||
|
|
||||||
config BLFS_XML
|
config BLFS_XML
|
||||||
string "BLFS sources directory"
|
string "BLFS sources directory (internal parameter)"
|
||||||
default "blfs-xml"
|
default "blfs-xml"
|
||||||
depends BLFS_TOOL
|
depends BLFS_TOOL || BOOK_BLFS
|
||||||
help
|
help
|
||||||
#-- The directory name under $BLFS_ROOT where the BLFS
|
The directory name under $BLFS_ROOT where the BLFS
|
||||||
# book sources will be checkout.
|
book sources will be copied or checked out. Do not change that
|
||||||
|
unless you know what you are doing...
|
||||||
|
# End of BLFS parameters
|
||||||
|
|
||||||
|
#--- Custom Tools support
|
||||||
|
config CUSTOM_TOOLS
|
||||||
|
depends !BOOK_BLFS
|
||||||
|
bool "Add custom tools support"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Activating this option additional packages you create
|
||||||
|
will be installed after finished the xLFS system build.
|
||||||
|
#--- End Custom Tools support
|
||||||
|
|
||||||
|
#--- This direcotry is needed for blfs tools installation and custom tools
|
||||||
|
# As well.
|
||||||
config TRACKING_DIR
|
config TRACKING_DIR
|
||||||
string "Installed packages database directory"
|
string "Installed packages database directory"
|
||||||
default "/var/lib/jhalfs/BLFS"
|
default "/var/lib/jhalfs/BLFS"
|
||||||
depends on BLFS_TOOL || CUSTOM_TOOLS
|
depends on BOOK_BLFS || BLFS_TOOL || CUSTOM_TOOLS
|
||||||
help
|
help
|
||||||
#-- Full path to the directory where the database of
|
Full path to the directory where the database of
|
||||||
# installed packages will be created.
|
installed packages will be created.
|
||||||
#
|
|
||||||
# If you are installing blfs-tool on a running xLFS system
|
If the blfs tools are installed on a running xLFS system,
|
||||||
# you MUST create this directory manually.
|
the user must have enough privileges to create this directory.
|
||||||
#
|
It may be necessary to create the /var/lib/jhalfs directory as
|
||||||
# If you are installing blfs-tool as part of an xLFS build
|
root, and make it writable by the user before running this tool.
|
||||||
# and/or using the customized scripts feature, you will
|
|
||||||
# need to fix this directory's permissions after booting
|
If you are installing the blfs tools as part of an xLFS build
|
||||||
# the new system.
|
and/or using the customized scripts feature, you will
|
||||||
#
|
need to fix this directory's permissions after booting
|
||||||
# Note that the user that will build the packages must
|
the new system.
|
||||||
# have read and write privileges on this directory.
|
|
||||||
#--- End BLFS specific params
|
Note that the user that will build the packages must
|
||||||
|
have read and write access to this directory.
|
||||||
|
|
||||||
#--- End BOOK Settings
|
#--- End BOOK Settings
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu "--- General Settings"
|
menu "General Settings"
|
||||||
|
depends !BOOK_BLFS
|
||||||
|
|
||||||
#--- Set User Account
|
#--- Set User Account
|
||||||
config CONFIG_USER
|
config CONFIG_USER
|
||||||
|
@ -624,7 +621,7 @@ menu "--- General Settings"
|
||||||
|
|
||||||
config DEF_USER
|
config DEF_USER
|
||||||
string
|
string
|
||||||
default "lfs" if BOOK_LFS
|
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
|
default "hlfs" if BOOK_HLFS
|
||||||
|
|
||||||
|
@ -722,7 +719,7 @@ menu "--- General Settings"
|
||||||
|
|
||||||
config SERVER
|
config SERVER
|
||||||
string "FTP mirror"
|
string "FTP mirror"
|
||||||
default "ftp://ftp.lfs-matrix.net"
|
default "http://ftp.osuosl.org"
|
||||||
depends GETPKG
|
depends GETPKG
|
||||||
help
|
help
|
||||||
#-- FTP mirror to download packages and patches if not found
|
#-- FTP mirror to download packages and patches if not found
|
||||||
|
@ -743,12 +740,12 @@ menu "--- General Settings"
|
||||||
#-- Clean the build directory before performing any other task.
|
#-- Clean the build directory before performing any other task.
|
||||||
# The directory is cleaned only if it was populated by a
|
# The directory is cleaned only if it was populated by a
|
||||||
# previous JHALFS run.
|
# previous JHALFS run.
|
||||||
#
|
|
||||||
|
|
||||||
#--- End General Settings
|
#--- End General Settings
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu "--- Build Settings"
|
menu "Build Settings"
|
||||||
|
depends !BOOK_BLFS
|
||||||
|
|
||||||
#--- Test Suites
|
#--- Test Suites
|
||||||
config CONFIG_TESTS
|
config CONFIG_TESTS
|
||||||
|
@ -760,13 +757,12 @@ menu "--- Build Settings"
|
||||||
#
|
#
|
||||||
# You will have to select between:
|
# You will have to select between:
|
||||||
#
|
#
|
||||||
# - Only final system Glibc, GCC and Binutils testsuites
|
# - Only critical final system testsuites
|
||||||
# - All final system testsuites
|
# - All final system testsuites
|
||||||
# - Both temporary tools and final system testsuites
|
# - Both temporary tools and final system testsuites
|
||||||
#
|
#
|
||||||
# HLFS and CLFS have no testsuites available in the
|
# HLFS and CLFS have no testsuites available in the
|
||||||
# temporary tools phase
|
# temporary tools phase
|
||||||
|
|
||||||
# You will be prompted also about the "flavour" of the
|
# You will be prompted also about the "flavour" of the
|
||||||
# testsuites run:
|
# testsuites run:
|
||||||
#
|
#
|
||||||
|
@ -774,19 +770,38 @@ menu "--- Build Settings"
|
||||||
# - Abort the build at the first test suite failure
|
# - Abort the build at the first test suite failure
|
||||||
#
|
#
|
||||||
|
|
||||||
|
menu "Test settings"
|
||||||
|
depends CONFIG_TESTS
|
||||||
choice
|
choice
|
||||||
prompt "Tests level"
|
prompt "Tests level"
|
||||||
depends CONFIG_TESTS
|
|
||||||
default TST_1
|
default TST_1
|
||||||
|
|
||||||
config TST_1
|
config TST_1
|
||||||
bool "Only final critical testsuites" if !BOOK_CLFS2 && !BOOK_CLFS3
|
bool "Only final system critical testsuites"
|
||||||
|
help
|
||||||
|
#-- Critical tests:
|
||||||
|
# Only Glibc, Binutils, GMP, MPFR, MPC and GCC
|
||||||
|
# testsuites for final system
|
||||||
|
|
||||||
config TST_2
|
config TST_2
|
||||||
bool "All final system testsuites"
|
bool "All final system testsuites"
|
||||||
|
|
||||||
config TST_3
|
config TST_3
|
||||||
bool "Both temporary tools and final system testsuites" if !BOOK_HLFS && !BOOK_CLFS
|
bool "All testsuites" if !BOOK_HLFS && !BOOK_CLFS
|
||||||
|
help
|
||||||
|
#-- All tests:
|
||||||
|
# Runs all the testsuites for both temporary tools
|
||||||
|
# and final system
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Flavour"
|
||||||
|
|
||||||
|
config NO_BOMB
|
||||||
|
bool "Don't stop on test failures"
|
||||||
|
|
||||||
|
config BOMB
|
||||||
|
bool "Abort the build on the first test failure"
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
config TEST
|
config TEST
|
||||||
|
@ -796,36 +811,34 @@ menu "--- Build Settings"
|
||||||
default "2" if TST_2
|
default "2" if TST_2
|
||||||
default "3" if TST_3
|
default "3" if TST_3
|
||||||
|
|
||||||
choice
|
|
||||||
prompt "Flavour"
|
|
||||||
depends CONFIG_TESTS
|
|
||||||
|
|
||||||
config NO_BOMB
|
|
||||||
bool "Don't stop on testsuite failures"
|
|
||||||
|
|
||||||
config BOMB
|
|
||||||
bool "Abort the build on the first testsuite failure"
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
config BOMB_TEST
|
config BOMB_TEST
|
||||||
bool
|
bool
|
||||||
default n if NO_BOMB
|
default n if NO_BOMB
|
||||||
default y if BOMB
|
default y if BOMB
|
||||||
|
|
||||||
#--- End Test Suites
|
#--- End Test Suites
|
||||||
|
endmenu # test settings
|
||||||
|
|
||||||
#--- Package Management
|
#--- Package Management
|
||||||
config PKGMNGT
|
config PKGMNGT
|
||||||
bool "Package management"
|
bool "Package management"
|
||||||
depends BOOK_LFS
|
depends BOOK_LFS || BOOK_LFS_SYSD
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
#-- Use package management
|
#-- Use package management
|
||||||
#
|
#
|
||||||
# If set, the packages in the final phase are built
|
# If set, you'll have to choose between
|
||||||
|
# two package management styles:
|
||||||
|
# - Build and install:
|
||||||
|
# the packages in the final phase are built
|
||||||
# in a separate directory, PKG_DEST.
|
# in a separate directory, PKG_DEST.
|
||||||
# You should provide a bash function for packing
|
# You should provide a bash function for
|
||||||
# and installing the package.
|
# packaing and installing the package.
|
||||||
|
# - Preload a library before install:
|
||||||
|
# Run the install instructions inside a
|
||||||
|
# wrapper command, which monitors the
|
||||||
|
# installed files.
|
||||||
|
#
|
||||||
# Also, you have to provide the instructions
|
# Also, you have to provide the instructions
|
||||||
# to build the package manager during the
|
# to build the package manager during the
|
||||||
# temporary tools phase, in the form of a
|
# temporary tools phase, in the form of a
|
||||||
|
@ -833,7 +846,22 @@ menu "--- Build Settings"
|
||||||
# sect1. See README.PACKAGE_MANAGEMENT
|
# sect1. See README.PACKAGE_MANAGEMENT
|
||||||
#
|
#
|
||||||
# For now, this only works with LFS
|
# For now, this only works with LFS
|
||||||
|
choice
|
||||||
|
depends PKGMNGT
|
||||||
|
prompt "Package management style"
|
||||||
|
default PKG_PACK
|
||||||
|
|
||||||
|
config PKG_PACK
|
||||||
|
bool "Build and pack (pacman or dpkg style)"
|
||||||
|
|
||||||
|
config LIB_LOAD
|
||||||
|
bool "Preload a library before installing (porg style)"
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config WRAP_INSTALL
|
||||||
|
bool
|
||||||
|
default y if LIB_LOAD
|
||||||
|
default n if PKG_PACK
|
||||||
#--- End package management
|
#--- End package management
|
||||||
|
|
||||||
#--- Installed files logs
|
#--- Installed files logs
|
||||||
|
@ -846,6 +874,24 @@ menu "--- Build Settings"
|
||||||
|
|
||||||
#--- End Installed files logs
|
#--- End Installed files logs
|
||||||
|
|
||||||
|
config STRIP
|
||||||
|
bool "Strip Installed Binaries/Libraries"
|
||||||
|
default n
|
||||||
|
depends on !BOOK_CLFS3
|
||||||
|
|
||||||
|
config NO_PROGRESS_BAR
|
||||||
|
bool "DO NOT use/display progress_bar "
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
#-- Do not use the progress bar routine. On slower machines
|
||||||
|
# this function consumes precious CPU cycles.
|
||||||
|
|
||||||
|
#--- End Build Settings
|
||||||
|
endmenu
|
||||||
|
|
||||||
|
menu "System configuration
|
||||||
|
depends !BOOK_BLFS
|
||||||
|
|
||||||
#--- FSTAB
|
#--- FSTAB
|
||||||
config HAVE_FSTAB
|
config HAVE_FSTAB
|
||||||
bool "Use a custom fstab file"
|
bool "Use a custom fstab file"
|
||||||
|
@ -883,11 +929,6 @@ menu "--- Build Settings"
|
||||||
# and renamed 'kernel-config'
|
# and renamed 'kernel-config'
|
||||||
#--- End Kernel
|
#--- End Kernel
|
||||||
|
|
||||||
config STRIP
|
|
||||||
bool "Strip Installed Binaries/Libraries"
|
|
||||||
default y
|
|
||||||
depends on !BOOK_CLFS3
|
|
||||||
|
|
||||||
config VIMLANG
|
config VIMLANG
|
||||||
bool "Install vim-lang package"
|
bool "Install vim-lang package"
|
||||||
default n
|
default n
|
||||||
|
@ -897,13 +938,6 @@ menu "--- Build Settings"
|
||||||
# NOTE: This option is obsolete with the 7.3 release of Vim
|
# NOTE: This option is obsolete with the 7.3 release of Vim
|
||||||
# which is included in all recent releases of LFS.
|
# which is included in all recent releases of LFS.
|
||||||
|
|
||||||
config NO_PROGRESS_BAR
|
|
||||||
bool "DO NOT use/display progress_bar "
|
|
||||||
default n
|
|
||||||
help
|
|
||||||
#-- Do not use the progress bar routine. On slower machines
|
|
||||||
# this function consumes precious CPU cycles.
|
|
||||||
|
|
||||||
config TIMEZONE
|
config TIMEZONE
|
||||||
string "TimeZone"
|
string "TimeZone"
|
||||||
default "GMT"
|
default "GMT"
|
||||||
|
@ -949,12 +983,59 @@ menu "--- Build Settings"
|
||||||
default "A4" if PAGE_A4
|
default "A4" if PAGE_A4
|
||||||
#--- End Groff page
|
#--- End Groff page
|
||||||
|
|
||||||
#--- End Build Settings
|
config HOSTNAME
|
||||||
endmenu
|
string "Hostname"
|
||||||
|
default "**EDITME**"
|
||||||
|
|
||||||
menu "--- Advanced Features"
|
menu "Network configuration"
|
||||||
|
config INTERFACE
|
||||||
|
string "netword card name"
|
||||||
|
default "eth0"
|
||||||
|
config IP_ADDR
|
||||||
|
string "Static IP address"
|
||||||
|
default "10.0.2.9"
|
||||||
|
config GATEWAY
|
||||||
|
string "Gateway"
|
||||||
|
default "10.0.2.2"
|
||||||
|
config PREFIX
|
||||||
|
string "Subnet prefix"
|
||||||
|
default "24"
|
||||||
|
config BROADCAST
|
||||||
|
string "Broadcast address"
|
||||||
|
default "10.0.2.255"
|
||||||
|
config DOMAIN
|
||||||
|
string "Domain name"
|
||||||
|
default "lfs.org"
|
||||||
|
config DNS1
|
||||||
|
string "Primary Name server"
|
||||||
|
default "10.0.2.3"
|
||||||
|
config DNS2
|
||||||
|
string "Secondary Name server"
|
||||||
|
default "8.8.8.8"
|
||||||
|
endmenu # Network configuration
|
||||||
|
|
||||||
|
menu "Console configuration"
|
||||||
|
config FONT
|
||||||
|
string "Console font"
|
||||||
|
default "lat0-16"
|
||||||
|
config FONTMAP
|
||||||
|
string "Font map (-m option to setfont)"
|
||||||
|
default "8859-1"
|
||||||
|
config UNICODE
|
||||||
|
bool "Unicode mode"
|
||||||
|
default y
|
||||||
|
config KEYMAP
|
||||||
|
string "Keymap name"
|
||||||
|
default "us"
|
||||||
|
endmenu # Console configuration
|
||||||
|
|
||||||
|
endmenu #--- System configuration
|
||||||
|
|
||||||
|
menu "Advanced Features"
|
||||||
|
depends !BOOK_BLFS
|
||||||
|
|
||||||
config REPORT
|
config REPORT
|
||||||
|
depends !PKGMNGT
|
||||||
bool "Create SBU and disk usage report"
|
bool "Create SBU and disk usage report"
|
||||||
default y
|
default y
|
||||||
|
|
||||||
|
@ -1109,6 +1190,7 @@ endif
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
config REBUILD_MAKEFILE
|
config REBUILD_MAKEFILE
|
||||||
|
depends !BOOK_BLFS
|
||||||
bool "Rebuild the Makefile (see help)"
|
bool "Rebuild the Makefile (see help)"
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
|
|
399
LFS/lfs.xsl
399
LFS/lfs.xsl
|
@ -8,15 +8,28 @@
|
||||||
extension-element-prefixes="exsl"
|
extension-element-prefixes="exsl"
|
||||||
version="1.0">
|
version="1.0">
|
||||||
|
|
||||||
|
<!-- Parameters -->
|
||||||
|
|
||||||
|
<!-- which revision attribute to include: can only be sysv or systemd,
|
||||||
|
but we leave checking to the caller-->
|
||||||
|
<xsl:param name="revision" select="'sysv'"/>
|
||||||
|
|
||||||
<!-- use package management ?
|
<!-- use package management ?
|
||||||
n = no, original behavior
|
n = no, original behavior
|
||||||
y = yes, add PKG_DEST to scripts in install commands of chapter06-08
|
y = yes, add PKG_DEST to scripts in install commands of chapter06-08
|
||||||
-->
|
-->
|
||||||
<xsl:param name="pkgmngt" select="n"/>
|
<xsl:param name="pkgmngt" select="'n'"/>
|
||||||
|
|
||||||
|
<!-- Package management with "porg style" ?
|
||||||
|
n = no, same as pkgmngt description above
|
||||||
|
y = yes, wrap install commands of chapter06-08 into a bash function.
|
||||||
|
note that pkgmngt must be 'y' in this case
|
||||||
|
-->
|
||||||
|
<xsl:param name="wrap-install" select='"n"'/>
|
||||||
|
|
||||||
<!-- Run test suites?
|
<!-- Run test suites?
|
||||||
0 = none
|
0 = none
|
||||||
1 = only chapter06 Glibc, GCC and Binutils testsuites
|
1 = only chapter06 critical testsuites
|
||||||
2 = all chapter06 testsuites
|
2 = all chapter06 testsuites
|
||||||
3 = all chapter05 and chapter06 testsuites
|
3 = all chapter05 and chapter06 testsuites
|
||||||
-->
|
-->
|
||||||
|
@ -26,37 +39,58 @@
|
||||||
n = no, I want to build the full system and review the logs
|
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
|
y = yes, bomb at the first test suite failure to can review the build dir
|
||||||
-->
|
-->
|
||||||
<xsl:param name="bomb-testsuite" select="n"/>
|
<xsl:param name="bomb-testsuite" select="'n'"/>
|
||||||
|
|
||||||
<!-- Install vim-lang package? OBSOLETE should always be 'n'-->
|
<!-- Install vim-lang package? OBSOLETE should always be 'n'-->
|
||||||
<xsl:param name="vim-lang" select="n"/>
|
<xsl:param name="vim-lang" select="'n'"/>
|
||||||
|
|
||||||
<!-- Time zone -->
|
<!-- Time zone -->
|
||||||
<xsl:param name="timezone" select="GMT"/>
|
<xsl:param name="timezone" select="'GMT'"/>
|
||||||
|
|
||||||
<!-- Page size -->
|
<!-- Page size -->
|
||||||
<xsl:param name="page" select="letter"/>
|
<xsl:param name="page" select="'letter'"/>
|
||||||
|
|
||||||
<!-- Locale settings -->
|
<!-- Locale settings -->
|
||||||
<xsl:param name="lang" select="C"/>
|
<xsl:param name="lang" select="'C'"/>
|
||||||
|
|
||||||
<!-- Install the whole set of locales -->
|
<!-- Install the whole set of locales -->
|
||||||
<xsl:param name='full-locale' select='n'/>
|
<xsl:param name='full-locale' select='"n"'/>
|
||||||
|
|
||||||
|
<!-- Hostname -->
|
||||||
|
<xsl:param name='hostname' select='"HOSTNAME"'/>
|
||||||
|
|
||||||
|
<!-- Network parameters: interface, ip, gateway, prefix, broadcast, domain
|
||||||
|
and nameservers -->
|
||||||
|
<xsl:param name='interface' select="'eth0'"/>
|
||||||
|
<xsl:param name='ip' select='"10.0.2.9"'/>
|
||||||
|
<xsl:param name='gateway' select='"10.0.2.2"'/>
|
||||||
|
<xsl:param name='prefix' select='24'/>
|
||||||
|
<xsl:param name='broadcast' select='"10.0.2.255"'/>
|
||||||
|
<xsl:param name='domain' select='"lfs.org"'/>
|
||||||
|
<xsl:param name='nameserver1' select='"10.0.2.3"'/>
|
||||||
|
<xsl:param name='nameserver2' select='"8.8.8.8"'/>
|
||||||
|
|
||||||
|
<!-- End parameters -->
|
||||||
|
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
<xsl:apply-templates select="//sect1"/>
|
<xsl:apply-templates select="//sect1[not(@revision) or
|
||||||
|
@revision=$revision]"/>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="sect1">
|
<xsl:template match="sect1">
|
||||||
|
<!-- Since this xsl:if tag encloses the whole template, it would
|
||||||
|
be much better to transpose this condition to the select part
|
||||||
|
of the "calling" apply-template. But that would change the numbering,
|
||||||
|
so that it would be difficult to compare to previous versions. So for
|
||||||
|
version 2.4, let us keep this -->
|
||||||
<xsl:if test="(../@id='chapter-temporary-tools' or
|
<xsl:if test="(../@id='chapter-temporary-tools' or
|
||||||
../@id='chapter-building-system' or
|
../@id='chapter-building-system' or
|
||||||
../@id='chapter-bootscripts' or
|
../@id='chapter-bootscripts' or
|
||||||
../@id='chapter-bootable') and
|
../@id='chapter-bootable') and
|
||||||
count(descendant::screen/userinput) > 0 and
|
(sect2[not(@revision) or @revision=$revision]//..|.)/
|
||||||
count(descendant::screen/userinput) >
|
screen[(not(@role) or @role != 'nodump') and
|
||||||
count(descendant::screen[@role='nodump']) and
|
(not(@revision) or @revision=$revision)]/
|
||||||
count(descendant::screen/userinput) >
|
userinput[not(starts-with(string(),'chroot'))]">
|
||||||
count(descendant::screen/userinput[starts-with(string(),'chroot')])">
|
|
||||||
<!-- The last condition is a hack to allow previous versions of the
|
<!-- The last condition is a hack to allow previous versions of the
|
||||||
book where the chroot commands did not have role="nodump".
|
book where the chroot commands did not have role="nodump".
|
||||||
It only works if the chroot command is the only one on the page -->
|
It only works if the chroot command is the only one on the page -->
|
||||||
|
@ -123,9 +157,12 @@
|
||||||
<xsl:if test="sect2[@role='installation']">
|
<xsl:if test="sect2[@role='installation']">
|
||||||
<xsl:text>cd $PKGDIR
</xsl:text>
|
<xsl:text>cd $PKGDIR
</xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:apply-templates select="sect2|
|
<xsl:apply-templates select="sect2[not(@revision) or
|
||||||
screen[not(@role) or
|
@revision=$revision] |
|
||||||
@role!='nodump']/userinput"/>
|
screen[(not(@role) or
|
||||||
|
@role!='nodump') and
|
||||||
|
(not(@revision) or
|
||||||
|
@revision=$revision)]/userinput"/>
|
||||||
<xsl:if test="@id='ch-system-creatingdirs' and $pkgmngt='y'">
|
<xsl:if test="@id='ch-system-creatingdirs' and $pkgmngt='y'">
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates
|
||||||
select="document('packageManager.xml')//sect1[
|
select="document('packageManager.xml')//sect1[
|
||||||
|
@ -148,8 +185,10 @@
|
||||||
|
|
||||||
<xsl:template match="sect2">
|
<xsl:template match="sect2">
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates
|
||||||
select=".//screen[not(@role) or
|
select=".//screen[(not(@role) or
|
||||||
@role != 'nodump']/userinput[
|
@role != 'nodump') and
|
||||||
|
(not(@revision) or
|
||||||
|
@revision=$revision)]/userinput[
|
||||||
@remap = 'pre' or
|
@remap = 'pre' or
|
||||||
@remap = 'configure' or
|
@remap = 'configure' or
|
||||||
@remap = 'make' or
|
@remap = 'make' or
|
||||||
|
@ -162,6 +201,12 @@
|
||||||
descendant::screen[not(@role) or
|
descendant::screen[not(@role) or
|
||||||
@role != 'nodump']/userinput[
|
@role != 'nodump']/userinput[
|
||||||
@remap='install']">
|
@remap='install']">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$wrap-install='y'">
|
||||||
|
<xsl:text>wrapInstall '
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
<xsl:text>mkdir -pv $PKG_DEST/{boot,etc,lib,bin,sbin}
|
<xsl:text>mkdir -pv $PKG_DEST/{boot,etc,lib,bin,sbin}
|
||||||
mkdir -pv $PKG_DEST/usr/{lib,bin,sbin,include}
|
mkdir -pv $PKG_DEST/usr/{lib,bin,sbin,include}
|
||||||
mkdir -pv $PKG_DEST/usr/share/{doc,info,man}
|
mkdir -pv $PKG_DEST/usr/share/{doc,info,man}
|
||||||
|
@ -171,21 +216,53 @@ case $(uname -m) in
|
||||||
x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
|
x86_64) ln -sv lib $PKG_DEST/lib64 && ln -sv lib $PKG_DEST/usr/lib64 ;;
|
||||||
esac
|
esac
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="../@id = 'ch-system-glibc' and
|
<xsl:if test="../@id = 'ch-system-glibc' and
|
||||||
@role='installation' and
|
@role='installation' and
|
||||||
$pkgmngt = 'y'">
|
$pkgmngt = 'y' and
|
||||||
|
$wrap-install = 'n'">
|
||||||
<xsl:text>mkdir -pv $PKG_DEST/usr/include/{rpc,rpcsvc}
|
<xsl:text>mkdir -pv $PKG_DEST/usr/include/{rpc,rpcsvc}
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates
|
||||||
select=".//screen[not(@role) or
|
select=".//screen[(not(@role) or
|
||||||
@role != 'nodump']/userinput[@remap = 'install']"/>
|
@role != 'nodump') and
|
||||||
|
(not(@revision) or
|
||||||
|
@revision=$revision)]/userinput[@remap = 'install']"/>
|
||||||
<xsl:if test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
|
<xsl:if test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
|
||||||
$pkgmngt = 'y' and
|
$pkgmngt = 'y' and
|
||||||
descendant::screen[not(@role) or
|
descendant::screen[not(@role) or
|
||||||
@role != 'nodump']/userinput[
|
@role != 'nodump']/userinput[
|
||||||
@remap='install']">
|
@remap='install']">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$wrap-install='y'">
|
||||||
|
<xsl:if test="../@id = 'ch-system-man-pages'">
|
||||||
|
<!-- these files are provided by the shadow package -->
|
||||||
|
<xsl:text>rm -fv /usr/share/man/{man3/getspnam.3,man5/passwd.5}
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
<!-- Attr man/man2 pages are already installed by man-pages. As of
|
||||||
|
March 2013, they are the same pages.
|
||||||
|
November 2015: now they are more accurate
|
||||||
|
in man-pages, and the man5 section is also in man-pages... -->
|
||||||
|
<xsl:if test="../@id = 'ch-system-attr'">
|
||||||
|
<xsl:text>rm -fv /usr/share/man/man2/*
|
||||||
|
rm -fv /usr/share/man/man5/*
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
<!-- nologin is installed by util-linux. remove it from shadow -->
|
||||||
|
<xsl:if test="../@id = 'ch-system-shadow'">
|
||||||
|
<xsl:text>rm -fv /usr/share/man/man8/nologin.8
|
||||||
|
rm -fv /sbin/nologin
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:text>'
|
||||||
|
packInstall
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
<xsl:if test="../@id = 'ch-system-man-pages'">
|
<xsl:if test="../@id = 'ch-system-man-pages'">
|
||||||
<!-- these files are provided by the shadow package -->
|
<!-- these files are provided by the shadow package -->
|
||||||
<xsl:text>rm -fv $PKG_DEST/usr/share/man/{man3/getspnam.3,man5/passwd.5}
|
<xsl:text>rm -fv $PKG_DEST/usr/share/man/{man3/getspnam.3,man5/passwd.5}
|
||||||
|
@ -223,6 +300,8 @@ done
|
||||||
packInstall
|
packInstall
|
||||||
rm -rf $PKG_DEST
|
rm -rf $PKG_DEST
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="$testsuite='3' and
|
<xsl:if test="$testsuite='3' and
|
||||||
../@id='ch-tools-glibc' and
|
../@id='ch-tools-glibc' and
|
||||||
|
@ -255,8 +334,10 @@ fi
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates
|
||||||
select=".//screen[
|
select=".//screen[
|
||||||
not(@role) or
|
(not(@role) or
|
||||||
@role != 'nodump'
|
@role != 'nodump') and
|
||||||
|
(not(@revision) or
|
||||||
|
@revision=$revision)
|
||||||
]/userinput[
|
]/userinput[
|
||||||
not(@remap) or
|
not(@remap) or
|
||||||
@remap='adjust' or
|
@remap='adjust' or
|
||||||
|
@ -291,7 +372,7 @@ cd $PKGDIR
|
||||||
mode="pkgmngt"/>
|
mode="pkgmngt"/>
|
||||||
<xsl:if test="$dirname = 'chapter06'">
|
<xsl:if test="$dirname = 'chapter06'">
|
||||||
<xsl:text>packInstall
|
<xsl:text>packInstall
|
||||||
rm -rf $PKG_DEST
|
rm -rf "$PKG_DEST"
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates
|
||||||
|
@ -434,7 +515,26 @@ exit
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise><!--pkgmngt = 'y'-->
|
<xsl:when test="$wrap-install='y'">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="./literal">
|
||||||
|
<xsl:call-template name="output-wrap">
|
||||||
|
<xsl:with-param name="commands" select="text()[1]"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:apply-templates select="literal"/>
|
||||||
|
<xsl:call-template name="output-wrap">
|
||||||
|
<xsl:with-param name="commands" select="text()[2]"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:call-template name="output-wrap">
|
||||||
|
<xsl:with-param name="commands" select="string()"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
<xsl:text>
</xsl:text>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise><!--pkgmngt = 'y' and wrap-install='n'-->
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="./literal">
|
<xsl:when test="./literal">
|
||||||
<xsl:call-template name="outputpkgdest">
|
<xsl:call-template name="outputpkgdest">
|
||||||
|
@ -458,7 +558,7 @@ exit
|
||||||
tzdata. -->
|
tzdata. -->
|
||||||
<xsl:when test="contains(string(),'tzdata') and $pkgmngt='y'">
|
<xsl:when test="contains(string(),'tzdata') and $pkgmngt='y'">
|
||||||
<xsl:text>
|
<xsl:text>
|
||||||
OLD_PKG_DEST=$PKG_DEST
|
OLD_PKG_DEST="$PKG_DEST"
|
||||||
OLD_PKGDIR=$PKGDIR
|
OLD_PKGDIR=$PKGDIR
|
||||||
PKG_DEST=$(dirname $OLD_PKG_DEST)/001-tzdata
|
PKG_DEST=$(dirname $OLD_PKG_DEST)/001-tzdata
|
||||||
PKGDIR=$(dirname $PKGDIR)/tzdata-</xsl:text>
|
PKGDIR=$(dirname $PKGDIR)/tzdata-</xsl:text>
|
||||||
|
@ -467,12 +567,28 @@ PKGDIR=$(dirname $PKGDIR)/tzdata-</xsl:text>
|
||||||
'.tar')"/>
|
'.tar')"/>
|
||||||
<xsl:text>
|
<xsl:text>
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$wrap-install='n'">
|
||||||
<xsl:copy-of select="substring-before(string(),'ZONEINFO=')"/>
|
<xsl:copy-of select="substring-before(string(),'ZONEINFO=')"/>
|
||||||
<xsl:text>ZONEINFO=$PKG_DEST</xsl:text>
|
<xsl:text>ZONEINFO=$PKG_DEST</xsl:text>
|
||||||
<xsl:copy-of select="substring-after(string(),'ZONEINFO=')"/>
|
<xsl:copy-of select="substring-after(string(),'ZONEINFO=')"/>
|
||||||
<xsl:text>
|
<xsl:text>
|
||||||
packInstall
|
packInstall
|
||||||
rm -rf $PKG_DEST
|
rm -rf $PKG_DEST
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise><!-- wrap-install='y' -->
|
||||||
|
<xsl:copy-of select="substring-before(string(),'ZONEINFO=')"/>
|
||||||
|
<xsl:text>
|
||||||
|
wrapInstall '
|
||||||
|
ZONEINFO=</xsl:text>
|
||||||
|
<xsl:copy-of select="substring-after(string(),'ZONEINFO=')"/>
|
||||||
|
<xsl:text>'
|
||||||
|
packInstall
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
<xsl:text>
|
||||||
PKG_DEST=$OLD_PKG_DEST
|
PKG_DEST=$OLD_PKG_DEST
|
||||||
unset OLD_PKG_DEST
|
unset OLD_PKG_DEST
|
||||||
PKGDIR=$OLD_PKGDIR
|
PKGDIR=$OLD_PKGDIR
|
||||||
|
@ -499,6 +615,34 @@ unset OLD_PKGDIR
|
||||||
<xsl:when test="contains(string(.),'<ll>_<CC>')">
|
<xsl:when test="contains(string(.),'<ll>_<CC>')">
|
||||||
<xsl:value-of select="$lang"/>
|
<xsl:value-of select="$lang"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
<xsl:when test="contains(string(.),'Domain')">
|
||||||
|
<xsl:value-of select="$domain"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="contains(string(.),'primary')">
|
||||||
|
<xsl:value-of select="$nameserver1"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="contains(string(.),'secondary')">
|
||||||
|
<xsl:value-of select="$nameserver2"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="contains(string(.),'192.168.1.1')">
|
||||||
|
<xsl:value-of select="$ip"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="contains(string(.),'192.168.0.2')">
|
||||||
|
<xsl:value-of select="$ip"/>
|
||||||
|
</xsl:when>
|
||||||
|
<!-- Only adapted to LFS-20170310 and later -->
|
||||||
|
<xsl:when test="contains(string(.),'HOSTNAME')">
|
||||||
|
<xsl:value-of select="$hostname"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="contains(string(.),'FQDN')">
|
||||||
|
<xsl:value-of select="$hostname"/>
|
||||||
|
<xsl:text>.</xsl:text>
|
||||||
|
<xsl:value-of select="$domain"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="contains(string(.),'alias')"/>
|
||||||
|
<xsl:when test="contains(string(.),'<lfs>')">
|
||||||
|
<xsl:value-of select="$hostname"/>
|
||||||
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:text>**EDITME</xsl:text>
|
<xsl:text>**EDITME</xsl:text>
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
|
@ -507,6 +651,185 @@ unset OLD_PKGDIR
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="literal">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="contains(string(),'ONBOOT')">
|
||||||
|
<xsl:call-template name="outputnet">
|
||||||
|
<xsl:with-param name="netstring" select="string()"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="contains(string(),'[Match]')">
|
||||||
|
<xsl:call-template name="outputsysdnet">
|
||||||
|
<xsl:with-param name="netstring" select="string()"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template name="outputnet">
|
||||||
|
<xsl:param name="netstring" select="''"/>
|
||||||
|
<!-- We suppose that book example has the following values:
|
||||||
|
- interface: eth0
|
||||||
|
- ip: 192.168.1.2
|
||||||
|
- gateway: 192.168.1.1
|
||||||
|
- prefix: 24
|
||||||
|
- broadcast: 192.168.1.255
|
||||||
|
Change below if book changes -->
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="contains($netstring,'eth0')">
|
||||||
|
<xsl:call-template name="outputnet">
|
||||||
|
<xsl:with-param name="netstring"
|
||||||
|
select="substring-before($netstring,'eth0')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:value-of select="$interface"/>
|
||||||
|
<xsl:call-template name="outputnet">
|
||||||
|
<xsl:with-param name="netstring"
|
||||||
|
select="substring-after($netstring,'eth0')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="contains($netstring,'192.168.1.1')">
|
||||||
|
<xsl:call-template name="outputnet">
|
||||||
|
<xsl:with-param name="netstring"
|
||||||
|
select="substring-before($netstring,'192.168.1.1')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:value-of select="$gateway"/>
|
||||||
|
<xsl:call-template name="outputnet">
|
||||||
|
<xsl:with-param name="netstring"
|
||||||
|
select="substring-after($netstring,'192.168.1.1')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<!-- must test this before the following, because 192.168.1.255 contains
|
||||||
|
192.168.1.2! -->
|
||||||
|
<xsl:when test="contains($netstring,'192.168.1.255')">
|
||||||
|
<xsl:call-template name="outputnet">
|
||||||
|
<xsl:with-param name="netstring"
|
||||||
|
select="substring-before($netstring,'192.168.1.255')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:value-of select="$broadcast"/>
|
||||||
|
<xsl:call-template name="outputnet">
|
||||||
|
<xsl:with-param name="netstring"
|
||||||
|
select="substring-after($netstring,'192.168.1.255')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="contains($netstring,'192.168.1.2')">
|
||||||
|
<xsl:call-template name="outputnet">
|
||||||
|
<xsl:with-param name="netstring"
|
||||||
|
select="substring-before($netstring,'192.168.1.2')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:value-of select="$ip"/>
|
||||||
|
<xsl:call-template name="outputnet">
|
||||||
|
<xsl:with-param name="netstring"
|
||||||
|
select="substring-after($netstring,'192.168.1.2')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="contains($netstring,'24')">
|
||||||
|
<xsl:call-template name="outputnet">
|
||||||
|
<xsl:with-param name="netstring"
|
||||||
|
select="substring-before($netstring,'24')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:value-of select="$prefix"/>
|
||||||
|
<xsl:call-template name="outputnet">
|
||||||
|
<xsl:with-param name="netstring"
|
||||||
|
select="substring-after($netstring,'24')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$netstring"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template name="outputsysdnet">
|
||||||
|
<xsl:param name="netstring" select="''"/>
|
||||||
|
<!-- We suppose that book example has the following values:
|
||||||
|
- interface: eth0
|
||||||
|
- ip: 192.168.0.2
|
||||||
|
- gateway: 192.168.0.1
|
||||||
|
- prefix: 24
|
||||||
|
- DNS: 192.168.0.1
|
||||||
|
- Domain: <Your Domain Name>
|
||||||
|
and gateway comes before DNS. Change below if book changes -->
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="contains($netstring,'eth0')">
|
||||||
|
<xsl:call-template name="outputsysdnet">
|
||||||
|
<xsl:with-param name="netstring"
|
||||||
|
select="substring-before($netstring,'eth0')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:value-of select="$interface"/>
|
||||||
|
<xsl:call-template name="outputsysdnet">
|
||||||
|
<xsl:with-param name="netstring"
|
||||||
|
select="substring-after($netstring,'eth0')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="contains($netstring,'192.168.0.1') and
|
||||||
|
contains($netstring,'Gateway')">
|
||||||
|
<xsl:call-template name="outputsysdnet">
|
||||||
|
<xsl:with-param name="netstring"
|
||||||
|
select="substring-before($netstring,'192.168.0.1')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:value-of select="$gateway"/>
|
||||||
|
<xsl:call-template name="outputsysdnet">
|
||||||
|
<xsl:with-param name="netstring"
|
||||||
|
select="substring-after($netstring,'192.168.0.1')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="contains($netstring,'192.168.0.1') and
|
||||||
|
not(contains($netstring,'Gateway'))">
|
||||||
|
<xsl:call-template name="outputsysdnet">
|
||||||
|
<xsl:with-param name="netstring"
|
||||||
|
select="substring-before($netstring,'192.168.0.1')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:value-of select="$nameserver1"/>
|
||||||
|
<xsl:text>
|
||||||
|
DNS=</xsl:text>
|
||||||
|
<xsl:value-of select="$nameserver2"/>
|
||||||
|
<xsl:call-template name="outputsysdnet">
|
||||||
|
<xsl:with-param name="netstring"
|
||||||
|
select="substring-after($netstring,'192.168.0.1')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="contains($netstring,'192.168.0.2')">
|
||||||
|
<xsl:call-template name="outputsysdnet">
|
||||||
|
<xsl:with-param name="netstring"
|
||||||
|
select="substring-before($netstring,'192.168.0.2')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:value-of select="$ip"/>
|
||||||
|
<xsl:call-template name="outputsysdnet">
|
||||||
|
<xsl:with-param name="netstring"
|
||||||
|
select="substring-after($netstring,'192.168.0.2')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="contains($netstring,'24')">
|
||||||
|
<xsl:call-template name="outputsysdnet">
|
||||||
|
<xsl:with-param name="netstring"
|
||||||
|
select="substring-before($netstring,'24')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:value-of select="$prefix"/>
|
||||||
|
<xsl:call-template name="outputsysdnet">
|
||||||
|
<xsl:with-param name="netstring"
|
||||||
|
select="substring-after($netstring,'24')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="contains($netstring,'<Your Domain Name>')">
|
||||||
|
<xsl:call-template name="outputsysdnet">
|
||||||
|
<xsl:with-param name="netstring"
|
||||||
|
select="substring-before($netstring,'<Your Domain Name>')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:value-of select="$domain"/>
|
||||||
|
<xsl:call-template name="outputsysdnet">
|
||||||
|
<xsl:with-param name="netstring"
|
||||||
|
select="substring-after($netstring,'<Your Domain Name>')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$netstring"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template name="outputpkgdest">
|
<xsl:template name="outputpkgdest">
|
||||||
<xsl:param name="outputstring" select="foo"/>
|
<xsl:param name="outputstring" select="foo"/>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
|
@ -605,4 +928,26 @@ unset OLD_PKGDIR
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:variable name="APOS">'</xsl:variable>
|
||||||
|
<xsl:template name="output-wrap">
|
||||||
|
<xsl:param name="commands" select="''"/>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="contains($commands,string($APOS))">
|
||||||
|
<xsl:call-template name="output-wrap">
|
||||||
|
<xsl:with-param name="commands"
|
||||||
|
select="substring-before($commands,string($APOS))"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:text>'\''</xsl:text>
|
||||||
|
<xsl:call-template name="output-wrap">
|
||||||
|
<xsl:with-param name="commands"
|
||||||
|
select="substring-after($commands,string($APOS))"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$commands"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
|
|
@ -312,8 +312,11 @@ chapter78_Makefiles() {
|
||||||
# If no .config file is supplied, the kernel build is skipped
|
# If no .config file is supplied, the kernel build is skipped
|
||||||
case ${this_script} in
|
case ${this_script} in
|
||||||
*grub) continue ;;
|
*grub) continue ;;
|
||||||
*fstab) [[ ! -z ${FSTAB} ]] && cp ${FSTAB} $BUILDDIR/sources/fstab ;;
|
*fstab) [[ -z "${FSTAB}" ]] ||
|
||||||
|
[[ ${FSTAB} == $BUILDDIR/sources/fstab ]] ||
|
||||||
|
cp ${FSTAB} $BUILDDIR/sources/fstab ;;
|
||||||
*kernel) [[ -z ${CONFIG} ]] && continue
|
*kernel) [[ -z ${CONFIG} ]] && continue
|
||||||
|
[[ ${CONFIG} == $BUILDDIR/sources/kernel-config ]] ||
|
||||||
cp ${CONFIG} $BUILDDIR/sources/kernel-config ;;
|
cp ${CONFIG} $BUILDDIR/sources/kernel-config ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -363,7 +366,7 @@ chapter78_Makefiles() {
|
||||||
|
|
||||||
# Check if we have a real /etc/fstab file
|
# Check if we have a real /etc/fstab file
|
||||||
case "${this_script}" in
|
case "${this_script}" in
|
||||||
*fstab) if [[ -n $FSTAB ]]; then
|
*fstab) if [[ -n "$FSTAB" ]]; then
|
||||||
CHROOT_wrt_CopyFstab
|
CHROOT_wrt_CopyFstab
|
||||||
else
|
else
|
||||||
CHROOT_wrt_RunAsRoot "$file"
|
CHROOT_wrt_RunAsRoot "$file"
|
||||||
|
@ -450,6 +453,25 @@ build_Makefile() { #
|
||||||
|
|
||||||
all: ck_UID mk_SETUP mk_LUSER mk_SUDO mk_CHROOT mk_BOOT create-sbu_du-report mk_BLFS_TOOL mk_CUSTOM_TOOLS
|
all: ck_UID mk_SETUP mk_LUSER mk_SUDO mk_CHROOT mk_BOOT create-sbu_du-report mk_BLFS_TOOL mk_CUSTOM_TOOLS
|
||||||
@sudo make do_housekeeping
|
@sudo make do_housekeeping
|
||||||
|
EOF
|
||||||
|
) >> $MKFILE
|
||||||
|
if [ "$INITSYS" = systemd ]; then
|
||||||
|
(
|
||||||
|
cat << EOF
|
||||||
|
@/bin/echo -e -n \\
|
||||||
|
NAME=\\"Linux From Scratch\\"\\\\n\\
|
||||||
|
VERSION=\\"$VERSION\\"\\\\n\\
|
||||||
|
ID=lfs\\\\n\\
|
||||||
|
PRETTY_NAME=\\"Linux From Scratch $VERSION\\"\\\\n\\
|
||||||
|
VERSION_CODENAME=\\"$(whoami)-jhalfs\\"\\\\n\\
|
||||||
|
> os-release && \\
|
||||||
|
sudo mv os-release \$(MOUNT_PT)/etc && \\
|
||||||
|
sudo chown root:root \$(MOUNT_PT)/etc/os-release
|
||||||
|
EOF
|
||||||
|
) >> $MKFILE
|
||||||
|
fi
|
||||||
|
(
|
||||||
|
cat << EOF
|
||||||
@echo $VERSION > lfs-release && \\
|
@echo $VERSION > lfs-release && \\
|
||||||
sudo mv lfs-release \$(MOUNT_PT)/etc && \\
|
sudo mv lfs-release \$(MOUNT_PT)/etc && \\
|
||||||
sudo chown root:root \$(MOUNT_PT)/etc/lfs-release
|
sudo chown root:root \$(MOUNT_PT)/etc/lfs-release
|
||||||
|
|
292
README
292
README
|
@ -2,70 +2,162 @@ $Id$
|
||||||
|
|
||||||
1. INTRODUCTION::
|
1. INTRODUCTION::
|
||||||
|
|
||||||
This collection of scripts, known as jhalfs, strives to create
|
The scripts in this directory implement an automation of the building
|
||||||
accurate makefiles from the Linux From Scratch book series XML files.
|
of a GNU/LInux system, as described in the Linux From Scratch book series.
|
||||||
This software is an evolution of the original "jhalfs-0.2" code developed
|
The name of the project is jhalfs: in that name, "alfs" stands for
|
||||||
by Jeremy Huntwork.
|
"automated linux from scratch", and the initials "jh" have been kept since
|
||||||
|
the original "jhalfs-0.2" code developed by Jeremy Huntwork.
|
||||||
The usage of this script assumes you have read and are familiar with
|
|
||||||
the book(s) and, therefore, the configuration variables found in menuconfig
|
|
||||||
interface will have meaning to you.
|
|
||||||
|
|
||||||
The list of supported books can be found at
|
The list of supported books can be found at
|
||||||
http://wiki.linuxfromscratch.org/alfs/wiki/SupportedBooks
|
http://wiki.linuxfromscratch.org/alfs/wiki/SupportedBooks.
|
||||||
|
|
||||||
NOTES::
|
The documentation is split among various README.* files. Here is a list
|
||||||
*. The resulting Makefile takes considerable time to run to completion.
|
of what is in which:
|
||||||
Lay in a supply of caffeine beverages.
|
- README (this file): instructions to use the LFS book. This should be
|
||||||
|
enough if you just want to build a base system as per the LFS book. It is
|
||||||
|
also a required reading for all the other projects.
|
||||||
|
- README.CLFS: supplementary instructions to use the CLFS book series.
|
||||||
|
- README.BLFS: instructions to install an automated build infrastructure
|
||||||
|
for the BLFS book. There are two ways to do so: (i) install the
|
||||||
|
tools at the end of an LFS build (CLFS is not supported in that case), or
|
||||||
|
(ii) install the tools on an already running system. Both methods are
|
||||||
|
described in that file.
|
||||||
|
- README.CUSTOM: instructions to run custom commands either during the xLFS
|
||||||
|
build, at the end of a xLFS build. Note that you will not find
|
||||||
|
instructions on how to write those commands, but some examples are
|
||||||
|
available.
|
||||||
|
- README.PACKAGE_MANAGEMENT: instructions to use package management during
|
||||||
|
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.
|
||||||
|
|
||||||
*. It is recommended that you temporarily unpack your linux kernel,
|
Other sources of information are the context help in the menu interface,
|
||||||
run <make menuconfig>, configure the kernel as per the book and save
|
and the xLFS books themselves.
|
||||||
the resulting .config file. This suggestion also applies to the
|
|
||||||
configuration of the uClibc package when building a HLFS system using
|
|
||||||
uClibc rather than glibc.
|
|
||||||
|
|
||||||
*. Read carefully this file and the other README.* files before start
|
|
||||||
using the tool.
|
|
||||||
|
|
||||||
2. PREREQUISITES::
|
2. PREREQUISITES::
|
||||||
|
|
||||||
To use this tool you MUST:
|
As said elsewhere, it is strongly advised that you first build manually
|
||||||
|
a complete system before attempting to automate the build.
|
||||||
- have experience building {c,h,b}LFS packages
|
|
||||||
- know how to edit and write shell scripts
|
|
||||||
- know how a Makefile works
|
|
||||||
- be able to trace build failures and to find what is causing it
|
|
||||||
(user error, package bug, {c,h,b}LFS command bug, or jhalfs code bug)
|
|
||||||
|
|
||||||
If you do not have the above skills, please don't use this tool.
|
|
||||||
|
|
||||||
|
Of course the "Host System Requirements" should be fulfilled. The needed
|
||||||
|
supplementary packages are detailed at the bottom of the page:
|
||||||
|
http://www.linuxfromscratch.org/alfs/download.html
|
||||||
|
|
||||||
3. INSTALLATION::
|
3. INSTALLATION::
|
||||||
|
|
||||||
No installation is required. System-wide installation is not allowed.
|
No installation is required. You may want to move the files in this
|
||||||
|
directory to a convenient location, and then follow the instructions below.
|
||||||
|
|
||||||
4. CONFIGURATION::
|
4. CONFIGURATION::
|
||||||
|
|
||||||
We have installed the familiar menu based configuration tool driven by
|
4.1. CONFIGURATION OF THE TOOLS:
|
||||||
GNU make. see the section RUNNING, for details
|
There is no configuration of the tools themselves. The various
|
||||||
|
parameters for the build are set through a menu driven interface. See
|
||||||
|
the section RUNNING below for details.
|
||||||
|
|
||||||
|
4.2. PRELIMINARY TASKS:
|
||||||
|
This tool has no support at all for creating a partition and a mount
|
||||||
|
point for the built system. You should follow the book up to the section
|
||||||
|
"Mounting the new partition". Note that the default name for the
|
||||||
|
partition mount point is "/mnt/build_dir", instead of /mnt/{c,}lfs.
|
||||||
|
You can change that default to anything you'd like in the menu, so you
|
||||||
|
may name it /mnt/lfs, or whatever you like. One important point is that
|
||||||
|
the user you are logged in as (and not the (c)lfs user) should have write
|
||||||
|
permission to the mounted directory. We'll use the name /mnt/build_dir
|
||||||
|
in the sequel.
|
||||||
|
|
||||||
|
The tool can download the needed packages for you, or you may download
|
||||||
|
them yourself. The tool may optionally use a package archive directory
|
||||||
|
where the downloaded packages are stored. That directory name may be made
|
||||||
|
available to the tool in two ways: (i) export the SRC_ARCHIVE variable,
|
||||||
|
for example SRC_ARCHIVE=/usr/src, (ii) enter the name at the "Package
|
||||||
|
Archive Directory" menu prompt. Note that the user should have write
|
||||||
|
permission to that directory. If a needed package is found in that
|
||||||
|
directory, it is copied to /mnt/build_dir/sources, if not, it is
|
||||||
|
downloaded to that directory and copied to /mnt/build_dir/sources,
|
||||||
|
except if found in /mnt/build_dir/sources, in which case, it is just
|
||||||
|
copied to $SRC_ARCHIVE. If you want the tool to download packages and you
|
||||||
|
do not want to archive them, just unset SRC_ARCHIVE, and keep the
|
||||||
|
default entry for "Package Archive Directory". If you choose to download
|
||||||
|
the packages by yourself, you should download (or copy) them to
|
||||||
|
/mnt/build_dir/sources directly.
|
||||||
|
|
||||||
|
If you want to build the kernel as part of the automated build, select
|
||||||
|
"Build the kernel" in the menu. Then, a configuration file must be
|
||||||
|
provided. In order to do so, it is recommended to download the kernel
|
||||||
|
tarball, unpack it, run <make menuconfig>, configure the kernel as per
|
||||||
|
the book, and save the resulting .config file to a location where it can
|
||||||
|
be retrieved later on (a convenient location and name is
|
||||||
|
$SRC_ARCHIVE/config-<arch>-<kernel version>-<config details>).
|
||||||
|
|
||||||
|
Another file you may provide is the fstab file. To use it, select
|
||||||
|
"Use a custom fstab file" in the menu interface, and enter the name of
|
||||||
|
the file where asked. As for the kernel configuration, this file has to
|
||||||
|
be prepared before running the menu. A convenient location and name is
|
||||||
|
$SRC_ARCHIVE/fstablfs.
|
||||||
|
|
||||||
|
At a more advanced level, you may want to supply custom commands
|
||||||
|
to be run at the end of (C)LFS build. Scripts containing those commands
|
||||||
|
are located in the ./custom/config directory. Examples are given in
|
||||||
|
./custom/examples. A template is provided as ./custom/template. See
|
||||||
|
README.CUSTOM for more details.
|
||||||
|
|
||||||
5. RUNNING::
|
5. RUNNING::
|
||||||
|
|
||||||
The command <make> will launch a menu based configuration program. You will
|
The command <make> will launch a menu based configuration program. The
|
||||||
recognize the layout from building the kernel or uClibc/BusyBox. The
|
|
||||||
underlying menu code was borrowed from BusyBox and slightly modified for
|
underlying menu code was borrowed from BusyBox and slightly modified for
|
||||||
our use.
|
our use.
|
||||||
|
|
||||||
Help on parameter function is available from the on-line help. Please
|
Help on parameter function is available from the on-line help. Please
|
||||||
make use of that feature for additional information not in this file.
|
make use of that feature: it may contain additional information not
|
||||||
|
duplicated in this file.
|
||||||
|
|
||||||
Once you have set the parameters you wish and have saved your work the
|
You should first choose which book and flavour you want to build. Note
|
||||||
jhalfs script is launch. The script verify first that the host can run
|
that when you choose the BLFS book, the tool will just install the BLFS
|
||||||
it and build the xLFS system, then validate the configuration and present
|
tool to your system. You'll have to run that installed tool to build
|
||||||
you with your selections which you may accept or reject.
|
packages in BLFS. See README.BLFS to know how. If you choose any other
|
||||||
|
book, you'll have to configure the settings and the build parameters
|
||||||
|
from the menu. Note that you may choose to install the blfs tools onto
|
||||||
|
the newly built system. It is not the same thing as choosing
|
||||||
|
the BLFS book in the menu, which will install the blfs tools on the
|
||||||
|
currently running system.
|
||||||
|
|
||||||
If you accepted the displayed settings jhalfs will proceed to create the
|
The "General Settings" menu is where the "Build Directory" name is to be
|
||||||
Makefile, optionally download packages.
|
entered. Other entries in that menu select what the tool should do. The
|
||||||
|
"Run the Makefile" entry selects whether the tool will start the build
|
||||||
|
automatically after generating the needed files. The "Rebuild files" selects
|
||||||
|
whether to clean the build directory before doing anything else. To protect
|
||||||
|
against removing important files, this can only be done in an empty directory,
|
||||||
|
or a directory previously populated by the tool.
|
||||||
|
|
||||||
|
The "Build Settings" menu is where various options for the build can be
|
||||||
|
selected. Two options, "Use a custom fstab file" and "Build the kernel",
|
||||||
|
have been described above. "Do not use/display progress_bar", if set, will
|
||||||
|
prevent a progress bar to be displayed during the build. That may be useful
|
||||||
|
on slow machine. The other options should be self explanatory, using either
|
||||||
|
the online help or book reading.
|
||||||
|
|
||||||
|
The "Advanced Features" menu is for various maintenance tasks, like
|
||||||
|
testing the build instructions or reporting build statistics. One useful
|
||||||
|
option is "Optimization and parallelisation". It is not recommended to use
|
||||||
|
it for setting compiler optimization flags, although it is possible, but
|
||||||
|
if you select it, you'll be able to select the number of parallel `make'
|
||||||
|
jobs, which allows much faster builds on modern multicore CPUs.
|
||||||
|
|
||||||
|
Once you have set the parameters and saved the configuration, the script
|
||||||
|
is launched. Its aim is to extract instructions from the selected book
|
||||||
|
to generate scripts, and to generate a Makefile, which allows running
|
||||||
|
the scripts in the right order. The script verifies first that the host
|
||||||
|
can run itself and build the xLFS system, then validates the configuration
|
||||||
|
and lists the parameters. At this point, you may choose to quit or to
|
||||||
|
continue with the listed parameters. The script will then proceed to
|
||||||
|
generate the Makefile and the build scripts, optionally download
|
||||||
|
packages, and eventually verify the host prerequisite. If you have
|
||||||
|
selected "Run the makefile", the command <make> is launched in the
|
||||||
|
adequate directory, and the build begins. If not, you'll have to run
|
||||||
|
"make" manually, for example: "make -C /mnt/build_dir/jhalfs", if you
|
||||||
|
have used the default parameters (see the layout under $BUILDDIR in the
|
||||||
|
Q&A below).
|
||||||
|
|
||||||
IMPORTANT::
|
IMPORTANT::
|
||||||
You must be logged as a normal user with sudo privileges to run
|
You must be logged as a normal user with sudo privileges to run
|
||||||
|
@ -76,55 +168,9 @@ $Id$
|
||||||
|
|
||||||
NOTE::
|
NOTE::
|
||||||
If you run the jhalfs script directly the only function you can select
|
If you run the jhalfs script directly the only function you can select
|
||||||
is to display the version number running <./jhalfs -v>
|
is to display the version number by running <./jhalfs -v>
|
||||||
|
|
||||||
6. BLFS_TOOL SUPPORT::
|
6. LAYOUT::
|
||||||
|
|
||||||
For books that support it (TODO: which ones?), there is an option
|
|
||||||
to install an automated framework for building BLFS packages. Let
|
|
||||||
us call it blfs-tool for now. When you tick `BOOK Settings/Add
|
|
||||||
blfs-tool support' in jhalfs configuration menu, the tools are
|
|
||||||
installed in $BLFS_ROOT (default /blfs_root) on the xLFS system,
|
|
||||||
and a few dependencies (which you may select) are built at the
|
|
||||||
end of the jhalfs run, before the custom tools. As of March 8, 2012,
|
|
||||||
works only with LFS. The instructions for building the dependencies
|
|
||||||
are taken from the BLFS book.
|
|
||||||
|
|
||||||
(TODO: is this relevant to present CLFS?)
|
|
||||||
WARNING:: If you add blfs-tool support on a CLFS Sysroot build
|
|
||||||
you MUST edit the scripts to fix the installation paths.
|
|
||||||
|
|
||||||
After booting the new xLFS system some steps are needed to finish
|
|
||||||
the installation of the automated tools:
|
|
||||||
|
|
||||||
- A user account must be created. You must be logged on that user
|
|
||||||
account to use blfs-tool. This is not strictly necessary,
|
|
||||||
since the packages can be built as root, too, but it is
|
|
||||||
never a good idea to build packages as root.
|
|
||||||
|
|
||||||
- Move /blfs-root to that user's home and change ownership of the
|
|
||||||
directory and files to the user.
|
|
||||||
|
|
||||||
- Give the user read and write privileges over the $TRACKING_DIR
|
|
||||||
directory and the files that it contains.
|
|
||||||
|
|
||||||
- Configure sudo, adding the needed privileges for the user. For
|
|
||||||
newer sudo version, do not forget to add a line Defaults secure_path=
|
|
||||||
containing /sbin and /usr/sbin (in /etc/sudoers), otherwise some
|
|
||||||
executables are not found.
|
|
||||||
|
|
||||||
- Although it is not strictly necessary, it is recommended to install
|
|
||||||
the bash shell startup files (as per `3.After LFS Configuration
|
|
||||||
Issues' of the BLFS book), as some instructions in BLFS rely on
|
|
||||||
their being present.
|
|
||||||
|
|
||||||
We assume that blfs-tool will be used on a running fresh xLFS system.
|
|
||||||
To use it to build BLFS packages from the chroot jail is also possible,
|
|
||||||
but not supported.
|
|
||||||
|
|
||||||
To know how to use blfs-tool, see README.BLFS.
|
|
||||||
|
|
||||||
7. LAYOUT::
|
|
||||||
|
|
||||||
/BLFS (see README.BLFS)
|
/BLFS (see README.BLFS)
|
||||||
|
|
||||||
|
@ -187,27 +233,22 @@ $Id$
|
||||||
jhalfs
|
jhalfs
|
||||||
blfs-tool
|
blfs-tool
|
||||||
|
|
||||||
8. FAQ::
|
7. FAQ::
|
||||||
Q. "This 'help' file is very sparse"
|
Q. "It doesn't work"
|
||||||
A. Yes, it is. This tool, jhalfs, is for those who understand the LFS books
|
A. There are several reasons why it may be so. One possibility is the
|
||||||
and wish to automate the build. 99% of any problems that arise can be
|
following:jhalfs was designed to work against the development versions
|
||||||
solved by reading the book(s).
|
of the LFS series of books. Consequently changes in a book(s) sometimes
|
||||||
|
breaks older versions of jhalfs. Before you start pulling out your hair
|
||||||
Q. "It doesn't work!"
|
download the latest version of jhalfs to see if that solves your
|
||||||
A. Yes it does, try >> make
|
problem. Note that it may be the other way around. If you want to build
|
||||||
Remember you must have 'sudo' privileges.
|
an old version of the book, you may have to downgrade you jahlfs
|
||||||
|
version.
|
||||||
Q. "It still doesn't work"
|
|
||||||
A. jhalfs was designed to work against the development versions of the LFS
|
|
||||||
series of books. Consequently changes in a book(s) sometimes breaks older
|
|
||||||
versions of jhalfs. Before you start pulling out your hair download the
|
|
||||||
latest version of jhalfs to see if that solves your problem.
|
|
||||||
|
|
||||||
Q. "How do I specify the build location?"
|
Q. "How do I specify the build location?"
|
||||||
A. The original LFS document worked against the well known location /mnt/lfs.
|
A. The original LFS document worked against the well known location
|
||||||
This script automates the build of all of the LFS series of books and uses
|
/mnt/lfs. This script automates the build of all of the LFS series of
|
||||||
a generic location $BUILDDIR with a default value of /mnt/build_dir.
|
books and uses a generic location $BUILDDIR with a default value of
|
||||||
You may change this value to suit your needs.
|
/mnt/build_dir. You may change this value to suit your needs.
|
||||||
|
|
||||||
The layout below $BUILDDIR is as follows.
|
The layout below $BUILDDIR is as follows.
|
||||||
$BUILDDIR/
|
$BUILDDIR/
|
||||||
|
@ -238,13 +279,16 @@ $Id$
|
||||||
|
|
||||||
Q. "Why have 2 copies of the files?"
|
Q. "Why have 2 copies of the files?"
|
||||||
A. The package files must be visible during the chroot phase and this is a
|
A. The package files must be visible during the chroot phase and this is a
|
||||||
simple and reliable method of doing so. This method also handles the CLFS
|
simple and reliable method of doing so. This method also handles the
|
||||||
boot build method where the final build may be done on a separate machine.
|
CLFS boot build method where the final build may be done on a separate
|
||||||
|
machine.
|
||||||
|
|
||||||
Q. "What is the function of "User account" and "Group account" menu settings?"
|
Q. "What is the function of "User account" and "Group account" menu
|
||||||
A. If you are running jhalfs from a low or non-privileged account you may not
|
settings?"
|
||||||
have the priv to create/delete the user needed to build temporary tools.
|
A. If you are running jhalfs from a low or non-privileged account you may
|
||||||
These settings allow you to use your own user and group name to do that
|
not have the priv to create/delete the user needed to build temporary
|
||||||
|
tools.
|
||||||
|
These settings allow you to use your own user and group name to do those
|
||||||
build steps.
|
build steps.
|
||||||
|
|
||||||
These variables are adjustable also when invoking make:
|
These variables are adjustable also when invoking make:
|
||||||
|
@ -254,21 +298,22 @@ $Id$
|
||||||
The only changes to your account will be the creation of a NEW .bashrc
|
The only changes to your account will be the creation of a NEW .bashrc
|
||||||
after saving your original to .bashrc.XXX
|
after saving your original to .bashrc.XXX
|
||||||
|
|
||||||
Q. "When I try to build CLFS the Makefile fails at the mid-point"
|
Q. "When I try to build CLFS the Makefile fails at mid-point"
|
||||||
A. There could be numerous reasons for the failure but the most likely reason
|
A. There could be numerous reasons for the failure but the most likely
|
||||||
is you are doing a cross-build using the 'chroot' method and the target is
|
reason is you are doing a cross-build using the 'chroot' method and the
|
||||||
not compatible with the host. If you choose to build using the chroot
|
target is not compatible with the host. If you choose to build using
|
||||||
method a test is performed at the end of the temptools phase. If the test
|
the chroot method a test is performed at the end of the temptools
|
||||||
succeeds the build continues inside a chroot jail. However if the test fails
|
phase. If the test succeeds the build continues inside a chroot jail.
|
||||||
it means the host and target are not compatible an you should use the
|
However if the test fails, it means the host and target are not
|
||||||
'boot' method to create your target code.
|
compatible an you should use the 'boot' method to create your target
|
||||||
|
code.
|
||||||
As an extreme example: You can build a sparc target on a x86 platform but
|
As an extreme example: You can build a sparc target on a x86 platform but
|
||||||
only the temptools phase. You must select the 'boot' method and not the
|
only the temptools phase. You must select the 'boot' method and not the
|
||||||
'chroot.' You must transfer the toolchain to a sparc platform, reboot the
|
'chroot.' You must transfer the toolchain to a sparc platform, reboot the
|
||||||
sparc box and continue the build.
|
sparc box and continue the build.
|
||||||
Of all the LFS series of books Cross-LFS requires the greatest
|
Of all the LFS series of books Cross-LFS requires the greatest
|
||||||
understanding of host/target hardware combination. Please read the book
|
understanding of host/target hardware combination. Please read the book
|
||||||
carefully and don't skip the easy parts (there are none..)
|
carefully and don't skip the easy parts (there are none...)
|
||||||
|
|
||||||
Q. "How could I stop the build at a predefined chosen point?"
|
Q. "How could I stop the build at a predefined chosen point?"
|
||||||
A. Launch the Makefile manually passing the last numbered target to be build
|
A. Launch the Makefile manually passing the last numbered target to be build
|
||||||
|
@ -286,3 +331,4 @@ $Id$
|
||||||
Authors:
|
Authors:
|
||||||
George Boudreau
|
George Boudreau
|
||||||
Manuel Canales Esparcia
|
Manuel Canales Esparcia
|
||||||
|
Pierre Labastie
|
||||||
|
|
262
README.BLFS
262
README.BLFS
|
@ -2,10 +2,6 @@ $Id$
|
||||||
|
|
||||||
1. INTRODUCTION::
|
1. INTRODUCTION::
|
||||||
|
|
||||||
If you want to add blfs-tool support into an xLFS base system build,
|
|
||||||
read the "BLFS_TOOL SUPPORT" section found in the README and be sure
|
|
||||||
to follow the after-booting installation intructions.
|
|
||||||
|
|
||||||
To automate package builds from the BLFS book instructions is a huge
|
To automate package builds from the BLFS book instructions is a huge
|
||||||
task. Some of the issues are: the BLFS book isn't linear; some package
|
task. Some of the issues are: the BLFS book isn't linear; some package
|
||||||
pages use a custom layout; there are circular dependencies; several
|
pages use a custom layout; there are circular dependencies; several
|
||||||
|
@ -20,55 +16,88 @@ $Id$
|
||||||
|
|
||||||
2. PREREQUISITES::
|
2. PREREQUISITES::
|
||||||
|
|
||||||
To use this tool you MUST:
|
In addition to a full LFS system, the following packages and their
|
||||||
|
dependencies are needed by this tool:
|
||||||
|
- required: libxml2, libxslt, DocBook XML DTD
|
||||||
|
- recommended: wget (to download the package tarballs) and sudo (to build
|
||||||
|
as a user)
|
||||||
|
- optional: lynx (allows to read the generated linearized book), GPM (to
|
||||||
|
cut and paste commands from the book), subversion (to update the book
|
||||||
|
sources), openssl (used by wget for all https:// sites)
|
||||||
|
Note that the optional dependencies are recommended for ease of use of the
|
||||||
|
tool.
|
||||||
|
|
||||||
- have experience building BLFS packages
|
You should also have the following personal skills:
|
||||||
- know how to edit and write shell scripts
|
- Ability to write and debug shell scripts: as said in the introduction,
|
||||||
- know how a Makefile works
|
not all the generated scripts can be used directly. They need to be
|
||||||
- be able to trace build failures and to find what is causing it
|
edited to produce an error free build.
|
||||||
(user error, package bug, BLFS command bug, or jhalfs code bug)
|
- Ability to debug build failures, like missing dependencies or
|
||||||
|
installation directories not known to the system (when you install in
|
||||||
|
/opt for example).
|
||||||
|
- Ability to choose the tools you need to configure and administrate
|
||||||
|
your system: in the BLFS book, nothing is mandatory, nothing is
|
||||||
|
useless. You are on your own in choosing what to build, but wrong
|
||||||
|
decisions may lead to a non functional system...
|
||||||
|
|
||||||
If you do not have the above skills, please don't use this tool.
|
3. INSTALL::
|
||||||
|
|
||||||
|
There are two ways to install the BLFS tools on an LFS system, described
|
||||||
|
in paragraphs 3.1 and 3.2, respectively:
|
||||||
|
|
||||||
3. USAGE::
|
3.1 INSTALLATION ON A RUNNING SYSTEM
|
||||||
|
|
||||||
Due to the complexity of the BLFS book, the scripts and Makefile
|
Select "Use Book --> Beyond Linux From Scratch" in the jhalfs menu:
|
||||||
generation is done in several steps:
|
The tools are installed in $HOME$BLFS_ROOT (the default for $BLFS_ROOT
|
||||||
|
is /blfs_root). The BLFS book is downloaded or copied to its directory.
|
||||||
|
The tracking directory (see below) is initialized but not created: before
|
||||||
|
the installation, you should ensure the tracking directory (default location
|
||||||
|
/var/lib/jhalfs/BLFS) exists and is writable by the user. After the
|
||||||
|
intallation, you should perform the following additional steps:
|
||||||
|
|
||||||
3.1 INSTALLED PACKAGES TRACKING SYSTEM::
|
- Configure sudo, adding the needed privileges for the user. For
|
||||||
|
newer sudo version, do not forget to add a line `Defaults secure_path='
|
||||||
|
containing /sbin and /usr/sbin (in /etc/sudoers), otherwise some
|
||||||
|
executables are not found.
|
||||||
|
|
||||||
This tool includes a very simple tracking system to log which packages
|
- Although it is not strictly necessary, it is recommended to install
|
||||||
have been installed using the tool. It is used to skip installed packages
|
the bash shell startup files (as per `3.After LFS Configuration
|
||||||
from target selection menu and to test if an installed package has been
|
Issues' of the BLFS book), as some instructions in BLFS rely on
|
||||||
updated in the BLFS book. Do not rely on this feature as a package
|
their being present.
|
||||||
management tool.
|
|
||||||
|
|
||||||
The tracking system itself is an XML file: instpkg.xml. It is
|
3.2 INSTALLATION ON A JUST BUILT xLFS SYSTEM
|
||||||
initialized when <make> is first run in blfs_root. It resides in a
|
|
||||||
directory, which is created when needed during the process of building
|
|
||||||
custom tools or blfs dependencies, right after xLFS. You can specify
|
|
||||||
that directory location in the blfs-tools submenu of jhalfs. You may
|
|
||||||
need to update permissions and/or ownership of this directory before
|
|
||||||
using the blfs tool (see README in jhalfs).
|
|
||||||
|
|
||||||
The default location of the tracking directory is /var/lib/jhalfs/BLFS.
|
For books that support it (only LFS for jhalfs version 2.4),
|
||||||
NB : after the initial build, that directory is only used to contain
|
there is an option to install the BLFS tools right after building
|
||||||
instpkg.xml, unless custom tools have been built. In the latter case,
|
the xLFS system: just tick `BOOK Settings/Add blfs-tool support' in
|
||||||
it also contains empty files whose name are $PKG-$VERSION for each
|
jhalfs configuration menu. The tools are installed in $BLFS_ROOT
|
||||||
versionned package built. The information about those packages is
|
(default /blfs_root) on the xLFS system, and the dependencies are built
|
||||||
included into instpkg.xml the next time the tool is run.
|
at the end of the jhalfs run, before the custom tools.
|
||||||
|
|
||||||
3.2 BLFS_TOOL INSTALLATION::
|
(TODO: blfs-tools have not been tested with current (version 3.0) of CLFS,
|
||||||
|
and certainly need some adaptation to run)
|
||||||
|
|
||||||
3.2.1 Normal install
|
After booting the new xLFS system some steps are needed to finish
|
||||||
The tools are installed just after the building of xLFS, if the
|
the installation of the automated tools:
|
||||||
appropriate options have been selected in the building menu, as per
|
|
||||||
jhalfs README. If you forgot to select the options and xLFS has been
|
- A user account must be created. You must be logged on that user
|
||||||
built, it is possible to go back to selecting the appropriate
|
account to use blfs-tool. This is not strictly necessary,
|
||||||
BLFS tools options in the jhalfs menu, then tick `Run makefile'
|
since the packages can be built as root, too, but it is
|
||||||
and not `Rebuild files'. You obtain a /blfs_root directory in the
|
never a good idea to build packages as root.
|
||||||
root directory of the new xLFS system, which contains the followings:
|
|
||||||
|
- Move /blfs-root to that user's home and change ownership of the
|
||||||
|
directory and files to the user.
|
||||||
|
|
||||||
|
- Give the user read and write privileges over the $TRACKING_DIR
|
||||||
|
directory and the files that it contains.
|
||||||
|
|
||||||
|
- Configure sudo and add the bash shell startup files, as described
|
||||||
|
above
|
||||||
|
|
||||||
|
We assume that the BLFS tools will be used on a booted xLFS system.
|
||||||
|
Using them to build BLFS packages in a chroot jail is also possible,
|
||||||
|
but not supported.
|
||||||
|
|
||||||
|
3.3 DIRECTORY LAYOUT IN THE $BLFS_ROOT DIRECTORY
|
||||||
|
|
||||||
blfs-xml/* SVN tree of the selected BLFS book version
|
blfs-xml/* SVN tree of the selected BLFS book version
|
||||||
lib/constants.inc functions libraries
|
lib/constants.inc functions libraries
|
||||||
|
@ -82,8 +111,7 @@ $Id$
|
||||||
/make_book.xsl XSL stylesheet to generate the linear book.xml
|
/make_book.xsl XSL stylesheet to generate the linear book.xml
|
||||||
/scripts.xsl XSL stylesheet to generate the scriptlets from
|
/scripts.xsl XSL stylesheet to generate the scriptlets from
|
||||||
book.xml
|
book.xml
|
||||||
/bump.xsl XSL stylesheet to generate to update the tracking
|
/bump.xsl XSL stylesheet to update the tracking file
|
||||||
file
|
|
||||||
README.BLFS this file
|
README.BLFS this file
|
||||||
TODO developers notes (well, not updated often)
|
TODO developers notes (well, not updated often)
|
||||||
gen_pkg_book.sh resolves dependencies and generates linear BLFS
|
gen_pkg_book.sh resolves dependencies and generates linear BLFS
|
||||||
|
@ -99,16 +127,7 @@ $Id$
|
||||||
database and the tracking file.
|
database and the tracking file.
|
||||||
envars.conf envars needed when running the target build scripts
|
envars.conf envars needed when running the target build scripts
|
||||||
|
|
||||||
3.2.2 Install to an already running LFS/BLFS system
|
Working files: several files are generated when first running the tool
|
||||||
If you forgot to install the tools when building xLFS, or want to try
|
|
||||||
the tools, you can just run the install-blfs-tools.sh script. It will
|
|
||||||
create the above hierarchy in your home directory and intialize the
|
|
||||||
tracking file. You have first to make sure that the tracking dir exists
|
|
||||||
and is writable by the user. You may also populate it with (empty) files
|
|
||||||
whose names are of the form package-version, for installed packages, so
|
|
||||||
that they are included into the tracking file.
|
|
||||||
3.3.3 Working files
|
|
||||||
Several files are generated during the process:
|
|
||||||
|
|
||||||
packages.xml auto-generated packages database
|
packages.xml auto-generated packages database
|
||||||
Config.in input file for the menu driven choices
|
Config.in input file for the menu driven choices
|
||||||
|
@ -118,13 +137,38 @@ $Id$
|
||||||
book-html/* the linearized book rendered in html
|
book-html/* the linearized book rendered in html
|
||||||
scripts/* the scriptlets
|
scripts/* the scriptlets
|
||||||
|
|
||||||
|
3.4 INSTALLED PACKAGES TRACKING SYSTEM:
|
||||||
|
|
||||||
|
This tool includes a very simple tracking system to log which packages
|
||||||
|
have been installed using the tool. It is used to skip installed packages
|
||||||
|
from target selection menu and to test if an installed package has been
|
||||||
|
updated in the BLFS book. Do not rely on this feature as a package
|
||||||
|
management tool.
|
||||||
|
|
||||||
|
The tracking system itself is an XML file: instpkg.xml. It is
|
||||||
|
initialized when <make> is first run in blfs_root. It resides in a
|
||||||
|
directory, which is created when needed during the process of building
|
||||||
|
custom tools or blfs dependencies, right after xLFS. You can specify
|
||||||
|
that directory location in the blfs-tools sub-menu of jhalfs. You may
|
||||||
|
need to update permissions and/or ownership of this directory before
|
||||||
|
using the blfs tool (see README in jhalfs).
|
||||||
|
|
||||||
|
The default location of the tracking directory is /var/lib/jhalfs/BLFS.
|
||||||
|
NB : after the initial build, that directory is only used to contain
|
||||||
|
instpkg.xml, unless custom tools have been built. In the latter case,
|
||||||
|
it also contains empty files whose name are "$PKG-$VERSION" for each
|
||||||
|
versionned package built. The information about those packages is
|
||||||
|
included into instpkg.xml the next time the tool is run.
|
||||||
|
|
||||||
|
4. USAGE::
|
||||||
|
|
||||||
From now on, all the work must be done from inside the installation
|
From now on, all the work must be done from inside the installation
|
||||||
root directory.
|
root directory.
|
||||||
|
|
||||||
You may move that directory to the $HOME of a non root user, or build
|
Due to the complexity of the BLFS book, the scripts and Makefile
|
||||||
as root from that directory.
|
generation is done in several steps:
|
||||||
|
|
||||||
3.3 UPDATING BOOK SOURCES::
|
4.1 UPDATING BOOK SOURCES::
|
||||||
|
|
||||||
If you are using the development book version and you want to update
|
If you are using the development book version and you want to update
|
||||||
installed packages to the latest version found in that book, you need to
|
installed packages to the latest version found in that book, you need to
|
||||||
|
@ -142,7 +186,7 @@ $Id$
|
||||||
with a new version in the book will be available for target selection
|
with a new version in the book will be available for target selection
|
||||||
and used to solve dependencies.
|
and used to solve dependencies.
|
||||||
|
|
||||||
3.4 CONFIGURING AND PARSING THE BOOK::
|
4.2 CONFIGURING AND PARSING THE BOOK::
|
||||||
|
|
||||||
The next step is to create a book and build scripts in dependency
|
The next step is to create a book and build scripts in dependency
|
||||||
build order for one or several packages.
|
build order for one or several packages.
|
||||||
|
@ -159,23 +203,16 @@ $Id$
|
||||||
as in the previous version of this tool. But we suggest to not select
|
as in the previous version of this tool. But we suggest to not select
|
||||||
too many at a time to be able to sort issues!
|
too many at a time to be able to sort issues!
|
||||||
|
|
||||||
When you are done with the menu, a few checks occur, and the book is
|
When you are done with the menu, a few checks occur, and the dependency
|
||||||
generated. When circular dependencies are found, a 3 line message is
|
chain is generated. Each dependency appears with its priority (required,
|
||||||
printed:
|
recommended, optional, or external), and it's level. There is a root level
|
||||||
A is a dependency of B
|
1. The selected packages have level 2. The dependencies of selected packages
|
||||||
C is a dependency of A
|
have level 3, the dependencies of the dependencies have level 4, and so on.
|
||||||
A is a dependency of C
|
When circular dependencies are found, they appear with a priority of
|
||||||
and a question:
|
"circular". This means that two (or more) dependency chains arrive at the
|
||||||
Do you want to build A first?
|
same package. The algorithm chooses the chain with the highest priority and
|
||||||
This means that the system has found the dependency chain: B->A->C->A.
|
reorders dependencies to remove the other chain(s). This is not always the
|
||||||
You have therefore to choose whether A is built before C, or
|
solution an user would prefer, but we have found no way to do it better.
|
||||||
C before A: the system cannot make that choice (well, maybe in a few
|
|
||||||
year, with an AI system able to understand the book). If you answer no,
|
|
||||||
C is built first. If you answer yes, C is put in place of A as a dependency
|
|
||||||
of B, then the tree dependency restarts from there, that is with the
|
|
||||||
layout B->C->... You may then hit the case B->C->A->C, for which you
|
|
||||||
should answer no, unless you want to enter an infinite (human driven)
|
|
||||||
loop;-)
|
|
||||||
|
|
||||||
You end up with a book.xml file which contains the linearized book,
|
You end up with a book.xml file which contains the linearized book,
|
||||||
and a rendered HTML, in the directory book-html, which you can browse with
|
and a rendered HTML, in the directory book-html, which you can browse with
|
||||||
|
@ -187,7 +224,7 @@ $Id$
|
||||||
There is also another directory, "dependencies" that contains files
|
There is also another directory, "dependencies" that contains files
|
||||||
generated while resolving dependencies.
|
generated while resolving dependencies.
|
||||||
|
|
||||||
3.5 EDITING BUILD SCRIPTS::
|
4.3 EDITING BUILD SCRIPTS::
|
||||||
|
|
||||||
Now it is time to review the generated book and scripts, making any
|
Now it is time to review the generated book and scripts, making any
|
||||||
changes to the scripts necessary to fix generation bugs or to suit your
|
changes to the scripts necessary to fix generation bugs or to suit your
|
||||||
|
@ -204,7 +241,7 @@ $Id$
|
||||||
Also, review and edit envars.conf. This file is used to set global envars
|
Also, review and edit envars.conf. This file is used to set global envars
|
||||||
needed by the build scripts.
|
needed by the build scripts.
|
||||||
|
|
||||||
3.6 CREATING THE MAKEFILE::
|
4.4 CREATING THE MAKEFILE::
|
||||||
|
|
||||||
When the build scripts are ready to be run, the Makefile can be
|
When the build scripts are ready to be run, the Makefile can be
|
||||||
created. Create an empty directory (for example "mkdir work") and cd
|
created. Create an empty directory (for example "mkdir work") and cd
|
||||||
|
@ -213,67 +250,70 @@ $Id$
|
||||||
Review the Makefile, and, if all looks sane, start the build by running
|
Review the Makefile, and, if all looks sane, start the build by running
|
||||||
"make".
|
"make".
|
||||||
|
|
||||||
4. GENERATED BUILD SCRIPTS ISSUES::
|
5. GENERATED BUILD SCRIPTS ISSUES::
|
||||||
|
|
||||||
In this section, known issues with the generated build scripts are
|
In this section, known issues with the generated build scripts are
|
||||||
discussed. They are due to build procedures and/or BLFS layout
|
discussed. They are due to build procedures and/or BLFS layout
|
||||||
particularities that we can't handle. In several cases, editing the
|
particularities that we can't handle. In several cases, editing the
|
||||||
build scripts is mandatory.
|
build scripts is mandatory.
|
||||||
You may also need to insert some build scripts created by you to resolve
|
You may also need to insert some build scripts created by you to resolve
|
||||||
unhandled dependencies and/or to remove some script installing the affected
|
unhandled dependencies and/or to remove some script installing an unneeded
|
||||||
package by hand.
|
package (unneeded packages may be pulled in the dependency chain, if
|
||||||
|
they occur as an "or" with another package).
|
||||||
|
When there are circular dependencies (only one known in BLFS 8.0 for
|
||||||
|
recommended dependencies), you may need to move around scripts so that they
|
||||||
|
run in the order script-A script-B script-A. This involves copying script-A
|
||||||
|
to another name (using the xxx-a- fields), and possibly renaming the xxx-a-
|
||||||
|
fields of each involved script.
|
||||||
|
|
||||||
4.1 BLFS BOOTSCRIPTS::
|
5.1 BLFS BOOTSCRIPTS::
|
||||||
|
|
||||||
Normally, bootscript installation should work. On the other hand, the
|
Normally, bootscript installation should work. On the other hand, the
|
||||||
book does not give instruction for running them, so you might have to
|
book does not give instruction for running them, so you might have to
|
||||||
manually insert /etc/init.d/rc.d/<initscript> at some place during the build.
|
manually insert "/etc/init.d/rc.d/<initscript> start" at some place during
|
||||||
|
the build.
|
||||||
|
|
||||||
4.2 PACKAGE CONFIGURATION::
|
5.2 PACKAGE CONFIGURATION::
|
||||||
|
|
||||||
For those packages that have a "Configuration" section, you should
|
For those packages that have a "Configuration" section, you should
|
||||||
edit the build script to fit the needs of your system. Sometimes, the
|
edit the build script to fit the needs of your system. Sometimes, the
|
||||||
bash startup files are modified (see for example the instructions for
|
bash startup files are modified. The shipped 'envars.conf' contains a
|
||||||
llvm). The shipped 'envars.conf' contains a line 'source /etc/profile',
|
line 'source /etc/profile', which ensures that the proper environment
|
||||||
which ensures that the proper environment variables are used.
|
variables are used.
|
||||||
|
|
||||||
4.3 GCC, JDK, Sane, and KDE-multimedia, freetype2, MesaLib and others
|
5.3 PAGES WITH TWO OR MORE PACKAGES::
|
||||||
|
|
||||||
|
For example: sane, poppler, audacious, freetts, which, etc.
|
||||||
|
|
||||||
On the pages for those packages, the BLFS book actually has instructions
|
On the pages for those packages, the BLFS book actually has instructions
|
||||||
to download and install two or more packages. You must edit the scripts to
|
to download and install two or more packages. You must edit the scripts to
|
||||||
fix this.
|
fix this. A common pitfall is that the variable PACKAGE may be used for
|
||||||
|
several tarballs. Be sure to save the PACKAGE variable to some other
|
||||||
|
name (for example PKG1, PKG2, etc) after each download. The unpacking
|
||||||
|
instructions may need to be repeated for each tarball in turn.
|
||||||
|
|
||||||
We will try to fix some of them, but this may not be possible.
|
5.4 XORG7
|
||||||
|
|
||||||
4.4 XORG7
|
The book has special page layouts for the Xorg7 packages. The tool
|
||||||
|
breaks those pages into individual pages for each packages in the linear
|
||||||
|
book. Also, the menu gives the choice to select each package individually.
|
||||||
|
|
||||||
The generated scripts for Xorg7 packages have $SRC_ARCHIVE
|
To build the whole Xorg7 chapter, select twm. The (recommended)
|
||||||
support for individual packages, but not for patches nor *.wget and *.md5
|
dependency chain brings in the whole set of Xorg packages.
|
||||||
files.
|
|
||||||
|
|
||||||
If you have previously downloaded the patches, you must edit
|
5.5 PATCHES
|
||||||
the scripts to use your local packages.
|
|
||||||
|
|
||||||
The *.wget and *.md5 files should be downladed always from inside
|
|
||||||
the scripts to be sure that the most current individual packages are
|
|
||||||
used. Thus don't reuse previously existing ones.
|
|
||||||
|
|
||||||
In the script for xorg7-font, be sure to move the fonts directories
|
|
||||||
symlinks creation to after the "for ... done" loop.
|
|
||||||
|
|
||||||
|
|
||||||
4.5 PATCHES
|
|
||||||
|
|
||||||
Please, make sure that all scripts have the commands to download/apply
|
Please, make sure that all scripts have the commands to download/apply
|
||||||
the required patches. Due to book layout issues, some patches may be
|
the required patches. Due to book layout issues, some patches may be
|
||||||
missing.
|
missing (as of BLFS 8.0, all the patches seem to be downloaded).
|
||||||
|
|
||||||
4.6 ROOT COMMANDS
|
5.6 ROOT COMMANDS
|
||||||
|
|
||||||
If building as a normal user (the default setting), be sure that all
|
If building as a normal user (the default setting), be sure that all
|
||||||
commands that require root privileges are run using sudo. Also make sure
|
commands that require root privileges are run using sudo. Also make sure
|
||||||
necessary root privilege commands are visible in your PATH. Or use
|
necessary root privilege commands are visible in your PATH. Or use
|
||||||
the `Defaults secure_path=' in /etc/sudoers.
|
the `Defaults secure_path=' in /etc/sudoers.
|
||||||
|
|
||||||
For commands necessitating root privileges, the generated scripts wrap
|
For commands necessitating root privileges, the generated scripts wrap
|
||||||
them with the construct:
|
them with the construct:
|
||||||
sudo -E sh << ROOT_EOF
|
sudo -E sh << ROOT_EOF
|
||||||
|
@ -288,9 +328,15 @@ $Id$
|
||||||
Although this construct is rather strong, it can fail in some corner
|
Although this construct is rather strong, it can fail in some corner
|
||||||
cases, so carefully review those instructions.
|
cases, so carefully review those instructions.
|
||||||
|
|
||||||
|
WARNING: One variable from the environment is not passed through the
|
||||||
|
-E switch, namely PATH. This is because "sudo" always reset the PATH to
|
||||||
|
the default "secure_path". If you need to have the same PATH as the user
|
||||||
|
"root" would have, you may want to add "source /etc/profile" at the
|
||||||
|
beginning of the commands to be executed as root.
|
||||||
|
|
||||||
Due to book layout issues, some sudo commands may be missing.
|
Due to book layout issues, some sudo commands may be missing.
|
||||||
|
|
||||||
4.7 OTHERS
|
5.7 OTHERS
|
||||||
|
|
||||||
There may be other issues that we are not aware of. If you find
|
There may be other issues that we are not aware of. If you find
|
||||||
any, please report it to <alfs-discuss@linuxfromscratch.org>.
|
any, please report it to <alfs-discuss@linuxfromscratch.org>.
|
||||||
|
|
|
@ -5,21 +5,20 @@
|
||||||
|
|
||||||
|
|
||||||
Normally JHALFS creates a Makefile containing only those scripts found in
|
Normally JHALFS creates a Makefile containing only those scripts found in
|
||||||
the {B,C,H}LFS books. An automated construction tool cannot predict the
|
the {,B,C,H}LFS books. An automated construction tool cannot predict the
|
||||||
needs of every individual and requests are made "Can you add xxxx package".
|
needs of every individual and requests are made "Can you add xxxx package".
|
||||||
Rather than adding numerous package scripts and switches for each request it
|
Rather than adding numerous package scripts and switches for each request it
|
||||||
was easier to add a tool for the user(s) to code their own package needs.
|
was easier to add a tool for the user(s) to code their own package needs.
|
||||||
|
|
||||||
There is two areas that can be customized: how the base system is build
|
There are two areas that can be customized: how the base system is built
|
||||||
and what additional configurations and packages requires your hardware to can
|
and what additional configurations and packages your hardware requires to be
|
||||||
boot and work with. Each one of this areas is handled in a different way.
|
able to boot and run. Each of those areas are handled in a different way.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BASE SYSTEM CUSTOMIZATION
|
BASE SYSTEM CUSTOMIZATION
|
||||||
|
|
||||||
There is two ways to alter how the base system will be built:
|
There are two ways to alter how the base system will be built:
|
||||||
|
|
||||||
- Using a working copy of the book sources and editing the XML files.
|
- Using a working copy of the book sources and editing the XML files.
|
||||||
This is the way used by book editors to test packages upgrades,
|
This is the way used by book editors to test packages upgrades,
|
||||||
|
@ -28,22 +27,22 @@ boot and work with. Each one of this areas is handled in a different way.
|
||||||
This method requires you know very well the book sources and what
|
This method requires you know very well the book sources and what
|
||||||
files need be edited. It will not be discussed here.
|
files need be edited. It will not be discussed here.
|
||||||
|
|
||||||
- Editing the generated build scripts to make any change you would.
|
- Editing the generated build scripts to make any change you want.
|
||||||
This is the method discussed below.
|
This is the method discussed below.
|
||||||
|
|
||||||
|
|
||||||
EDITING THE BASE SCRIPTS
|
EDITING THE BASE SCRIPTS
|
||||||
|
|
||||||
First step is to generate the build scripts with book defaults. To do that,
|
To begin with, the build scripts should be generated with book defaults. To
|
||||||
configure jhalfs activating any option you want included, but do not select
|
do that, configure jhalfs activating any option you want included, but do not
|
||||||
"Run the Makefile" option.
|
select "Run the Makefile" option.
|
||||||
|
|
||||||
Under the ${BUILD_DIR}/${SCRIPT_ROOT}/${PROGNAME}-commands directory
|
Under the ${BUILD_DIR}/${SCRIPT_ROOT}/${PROGNAME}-commands directory
|
||||||
(using the defaults values to do an LFS build, that directory name is
|
(using the defaults values to do an LFS build, that directory name is
|
||||||
/mnt/build_dir/jhalfs/lfs-commands) you will find the default build scripts.
|
/mnt/build_dir/jhalfs/lfs-commands) you will find the default build scripts.
|
||||||
|
|
||||||
If all you want is modify, add, or remove some command from a package
|
If all you want is modify, add, or remove some command from a package
|
||||||
installation, for example to change it ./configure line, just edit the related
|
installation, for example to change its ./configure line, just edit the related
|
||||||
script. If changing or adding a patch, be sure to copy the new patch to the
|
script. If changing or adding a patch, be sure to copy the new patch to the
|
||||||
${BUILD_DIR}/sources directory. When done, run 'make' from inside the
|
${BUILD_DIR}/sources directory. When done, run 'make' from inside the
|
||||||
${BUILD_DIR}/${SCRIPT_ROOT} directory.
|
${BUILD_DIR}/${SCRIPT_ROOT} directory.
|
||||||
|
@ -53,39 +52,38 @@ ${BUILD_DIR}/${SCRIPT_ROOT} directory.
|
||||||
|
|
||||||
To remove a package from the system, just remove its script(s).
|
To remove a package from the system, just remove its script(s).
|
||||||
|
|
||||||
To change the version of some package to build a newest or oldest one than the
|
To change the version of some package, or to build a newer or older version
|
||||||
one found in the book, edit ${BUILD_DIR}/${SCRIPT_ROOT}/pkg_tarball_list to
|
than that in the book, edit ${BUILD_DIR}/${SCRIPT_ROOT}/pkg_tarball_list to
|
||||||
change it tarball name and place the new tarball in the ${BUILD_DIR}/sources
|
change its tarball name and place the new tarball in the ${BUILD_DIR}/sources
|
||||||
directory,
|
directory.
|
||||||
|
|
||||||
To replace a package by an equivalent one, rename the replaced package script
|
To replace a package by an equivalent one, rename the replaced package script
|
||||||
to reflect the new package name (for example, 102-man-db -> 102-man), edit the
|
to reflect the new package name (for example, 102-man-db -> 102-man), edit the
|
||||||
script to made the required commands changes, place the new tarball in the
|
script to made the required commands changes, place the new tarball in the
|
||||||
${BUILD_DIR}/sources directory, and edit ${BUILD_DIR}/${SCRIPT_ROOT}/pkg_tarball_list
|
${BUILD_DIR}/sources directory, and edit ${BUILD_DIR}/${SCRIPT_ROOT}/pkg_tarball_list
|
||||||
file to replace the removed package tarball name by the new package tarball name.
|
file to replace the removed package tarball name by the new package tarball
|
||||||
|
name.
|
||||||
|
|
||||||
To change the build order, rename the scripts changing the first 3-digits
|
To change the build order, rename the scripts changing the first 3-digits
|
||||||
string until have it ordered in the way you want.
|
string until they are sorted in the way you want.
|
||||||
|
|
||||||
To insert a new package, for example to build Cracklib to can build Shadow
|
To insert a new package, for example to build Cracklib in order to build
|
||||||
with Cracklib support, first you should decide before what default package it
|
Shadow with Cracklib support, you should first decide before what package it
|
||||||
need be installed, in this example before 107-shadow. Then create a new script
|
needs to be installed, in this example 107-shadow. Then create a new script
|
||||||
containing the needed commands, using an existing one as template, and name it with
|
containing the needed commands, using an existing one as template, and name it
|
||||||
the same 3-digits string used for that mentioned default package, but adding
|
with the same 3-digits string used for that mentioned default package, but
|
||||||
another 1-digit string. In our example, the new script to build Cracklib just
|
adding another 1-digit string. In our example, the new script to build Cracklib
|
||||||
before Shadow will be named 107-1-cracklib. This naming schema allow to insert
|
before Shadow will be named 107-1-cracklib. This naming scheme allows inserting
|
||||||
up to 10 scripts before each one of the default scripts. Place the tarball for
|
up to 10 scripts before each of the existing scripts. Place the tarball for
|
||||||
the new package and required patches, if any, if ${BUILD_DIR}/sources and edit
|
the new package and required patches, if any, in ${BUILD_DIR}/sources and edit
|
||||||
${BUILD_DIR}/${SCRIPT_ROOT}/pkg_tarball_list to add the tarball name for that
|
${BUILD_DIR}/${SCRIPT_ROOT}/pkg_tarball_list to add the tarball name for that
|
||||||
package.
|
package.
|
||||||
|
|
||||||
When ready, launch again the jhalfs configuration interface. Be sure that
|
When ready, launch again the jhalfs configuration interface. Make sure that
|
||||||
are selected exactly the same options than when generating the default build
|
exactly the same options are selected as when generating the default build
|
||||||
scripts. Be sure that "Rebuild files" is unselected and select "Run the Makefile"
|
scripts. Be sure that "Rebuild files" is unselected and select "Run the
|
||||||
if you want. Then select "Rebuild the Makefile". This will create a new Makefile
|
Makefile" if you want. Then select "Rebuild the Makefile". This will create a
|
||||||
based on the changes you made to the build scripts.
|
new Makefile based on the changes you made to the build scripts.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ADDING POST-SYSTEM BUILD CONFIGURATION FILES AND EXTRA PACKAGES
|
ADDING POST-SYSTEM BUILD CONFIGURATION FILES AND EXTRA PACKAGES
|
||||||
|
@ -96,8 +94,8 @@ more info.
|
||||||
|
|
||||||
The feature described below was added so users could install remaining
|
The feature described below was added so users could install remaining
|
||||||
configuration files, build the packages necessary to access the Internet
|
configuration files, build the packages necessary to access the Internet
|
||||||
or to support specific hardware, or to install basic utilities that need
|
or to support specific hardware, or to install basic utilities that are
|
||||||
have available from the beginning, and was not intended to replace the BLFS
|
needed from the beginning, and was not intended to replace the BLFS
|
||||||
install system.
|
install system.
|
||||||
|
|
||||||
:::NOTICE:::
|
:::NOTICE:::
|
||||||
|
@ -108,9 +106,9 @@ add should honour the DESTDIR=${CLFS} switch or equivalent.
|
||||||
|
|
||||||
|
|
||||||
LAYOUT
|
LAYOUT
|
||||||
A new directory has been added to JHALFS tree which will contain the
|
A new directory has been added to JHALFS tree which contains the
|
||||||
configuration scripts and a few examples. A switch has been added to the
|
configuration scripts and a few examples. A switch has been added to the
|
||||||
configuration file which enables/disables the inclusion of personal scripts.
|
configuration file which enables/disables the inclusion of custom scripts.
|
||||||
|
|
||||||
custom
|
custom
|
||||||
/config <-- where to put your scripts.
|
/config <-- where to put your scripts.
|
||||||
|
@ -121,7 +119,7 @@ configuration file which enables/disables the inclusion of personal scripts.
|
||||||
|
|
||||||
|
|
||||||
NOTE::: You are responsible for including all dependencies and ensuring they
|
NOTE::: You are responsible for including all dependencies and ensuring they
|
||||||
are built in the proper order.
|
are built in the right order.
|
||||||
|
|
||||||
1. To add a package to the final JHALFS Makefile you must first create a file
|
1. To add a package to the final JHALFS Makefile you must first create a file
|
||||||
in the custom/config directory.
|
in the custom/config directory.
|
||||||
|
@ -200,7 +198,7 @@ xEOFx
|
||||||
|
|
||||||
PKG="gpm"
|
PKG="gpm"
|
||||||
PKG_VERSION="1.20.1"
|
PKG_VERSION="1.20.1"
|
||||||
PKG_FILE="gmp-1.20.1.tar.bz2"
|
PKG_FILE="gpm-1.20.1.tar.bz2"
|
||||||
URL="ftp://arcana.linux.it/pub/gpm/gpm-1.20.1.tar.bz2"
|
URL="ftp://arcana.linux.it/pub/gpm/gpm-1.20.1.tar.bz2"
|
||||||
MD5="2c63e827d755527950d9d13fe3d87692"
|
MD5="2c63e827d755527950d9d13fe3d87692"
|
||||||
for i in PATCH{1..10}; do
|
for i in PATCH{1..10}; do
|
||||||
|
|
|
@ -2,10 +2,5 @@ $Id$
|
||||||
|
|
||||||
|
|
||||||
::::NOTICE::::
|
::::NOTICE::::
|
||||||
|
HLFS has not be updated for a very long time. Since then, jhalfs has evolved
|
||||||
Hardened Linux From Scratch is a highly volatile project. Extreme design
|
and is now incompatible with HLFS.
|
||||||
changes can occur and the build could be broken for extended periods of
|
|
||||||
time.
|
|
||||||
|
|
||||||
As of July 26.2007, the Glibc-based systems builds should work.
|
|
||||||
uClibc-based system still fail due book issues.
|
|
||||||
|
|
|
@ -1,28 +1,54 @@
|
||||||
TITLE : Package management in jhalfs
|
TITLE : Package management in jhalfs
|
||||||
BY : Pierre Labastie (work in progress)
|
BY : Pierre Labastie (work in progress)
|
||||||
|
$Id$
|
||||||
|
|
||||||
1. INTRODUCTION:
|
1. INTRODUCTION:
|
||||||
|
|
||||||
There are several hints discussing package management for LFS, but
|
There are several hints discussing package management for LFS, but
|
||||||
nothing under jhalfs. There used to be a patch for PACO that I cannot
|
nothing under jhalfs. There used to be a patch for PACO that I cannot
|
||||||
find now. This is a modification, which allows to use a package manager
|
find now. So there was a need for such a tool, and an infrastructure,
|
||||||
inside jhalfs. I hope it is flexible enough to support several package
|
which allows using a package manager inside jhalfs, has been developped.
|
||||||
managers. My implementation uses dpkg, from Debian, in a very crude way.
|
I hope it is flexible enough to support several package managers, at least
|
||||||
Debian has a sophisticated package management system, which I have not
|
among those who use DESTDIR install and/or LD_PRELOAD during install.
|
||||||
tried to use here. For example, it should be usable with Pacman from
|
It has been tested with dpkg from Debian, pacman from Arch Linux,
|
||||||
Arch Linux (http://www.archlinux.org), as far as I remember from my old
|
and porg. Sample configuration files are given for those three packages.
|
||||||
days with DIYL. I am sorry to say I have (almost) no experience with
|
I am sorry to say I have (almost) no experience with rpm, so I cannot
|
||||||
rpm, so I cannot tell whether it would fit.
|
tell whether it would fit.
|
||||||
|
|
||||||
2. OVERVIEW OF THE SYSTEM:
|
2. OVERVIEW OF THE SYSTEM:
|
||||||
|
|
||||||
For now, package management is only available for LFS. I plan to
|
For now, package management is only available for LFS. The `porg style'
|
||||||
upgrade BLFS tools, but nothing usable right now. I have not attempted
|
(see below) package management has been ported to BLFS, but not the distro
|
||||||
to adapt this tool for the other flavours of LFS.
|
style one (the book layout makes it rather difficult). I have not attempted
|
||||||
This system performs basically a "DESTDIR install" for all pages
|
to adapt this tool for the other flavours of LFS (TODO).
|
||||||
in chapter 6, 7 and 8 of the book. The name of the DESTDIR directory is the
|
|
||||||
same as the one of the executed script. The path to this directory is
|
This tool comes in two flavours:
|
||||||
available to the scriplets through the PKG_DEST variable.
|
- for distros package managers (e.g dpkg or pacman), it basically performs
|
||||||
|
a "DESTDIR install" for all pages in chapter 6, 7 and 8 of the book. The
|
||||||
|
name of the DESTDIR directory is the same as the one of the executed
|
||||||
|
script. The path to this directory is available to the scriplets through
|
||||||
|
the PKG_DEST variable. The details of the DESTDIR part are given below.
|
||||||
|
After the package is installed in $PKG_DEST, a function "packInstall" is
|
||||||
|
called, which is supposed to create a binary package (e.g. make a .deb
|
||||||
|
file), store it to a repository and install it to the system.
|
||||||
|
- for porg style package manager, the install instructions are wrapped
|
||||||
|
between pairs of single quotes ('). This allows passing those instructions
|
||||||
|
to a function ("wrapInstall"), which may itself call porg or another
|
||||||
|
(e.g. fakeroot, not tested) instruction wrapper. Note that if the
|
||||||
|
instructions contain single quote charaters, they are changed to '\'',
|
||||||
|
which pass them literally. At the end of the installation, a function
|
||||||
|
"packInstall" is called, with a slighly different aim compared to the
|
||||||
|
DESTDIR one: it is used to make a tarball of the installed files (e.g.
|
||||||
|
using "porgball") and store them into some repository. But there is no
|
||||||
|
need to install them to the system, since this has already been done.
|
||||||
|
|
||||||
|
Note that with carefully crafted "packInstall" and "wrapInstall"
|
||||||
|
functions, a combination of the two methods could be used, for example for
|
||||||
|
DESTDIR installs using fakeroot. This is work in progress and not fully
|
||||||
|
implemented yet.
|
||||||
|
|
||||||
|
3. DETAILS:
|
||||||
|
|
||||||
The XSL stylesheet used for generating the scriptlets, automatically
|
The XSL stylesheet used for generating the scriptlets, automatically
|
||||||
adds DESTDIR install instructions when "package management" is selected.
|
adds DESTDIR install instructions when "package management" is selected.
|
||||||
Also all the paths beginning with " /" or ">/" (absolute paths) are prepended
|
Also all the paths beginning with " /" or ">/" (absolute paths) are prepended
|
||||||
|
@ -34,6 +60,7 @@ BY : Pierre Labastie (work in progress)
|
||||||
creates a reasonable subset of the FHS hierarchy into the destination
|
creates a reasonable subset of the FHS hierarchy into the destination
|
||||||
directory. Empty directories are then removed before packing the
|
directory. Empty directories are then removed before packing the
|
||||||
binary package.
|
binary package.
|
||||||
|
|
||||||
In order to use the package manager, it has to be installed at the end of
|
In order to use the package manager, it has to be installed at the end of
|
||||||
chapter 5 (temporary installation in /tools) and chapter 6 (final install).
|
chapter 5 (temporary installation in /tools) and chapter 6 (final install).
|
||||||
Furthermore, the administrative files and directories have to be created
|
Furthermore, the administrative files and directories have to be created
|
||||||
|
@ -42,18 +69,21 @@ BY : Pierre Labastie (work in progress)
|
||||||
the necessary instructions and enough information to download the tarball.
|
the necessary instructions and enough information to download the tarball.
|
||||||
This file should reside in the `pkgmngt' directory and be named
|
This file should reside in the `pkgmngt' directory and be named
|
||||||
`packageManager.xml'. A template named `packageManager.xml.template' is
|
`packageManager.xml'. A template named `packageManager.xml.template' is
|
||||||
provided in the `pkgmngt' subdirectory. There are also two XML files for
|
provided in the `pkgmngt' subdirectory. There are also three XML files for
|
||||||
dpkg and pacman, respectively `packageManager.xml.dpkg' and
|
dpkg, pacman, and porg, respectively `packageManager.xml.dpkg',
|
||||||
`packageManager.xml.pacman', that you can copy to `packageManager.xml'.
|
`packageManager.xml.pacman', and `packageManager.xml.porg', that you can
|
||||||
|
copy to `packageManager.xml' and modify to suit your needs.
|
||||||
They are not updated often, so the versions used can be rather old.
|
They are not updated often, so the versions used can be rather old.
|
||||||
The last thing to do is to tell how to use the package manager. When
|
|
||||||
the binary package is ready, the scriptlets call a shell function named
|
The last thing to do is to tell how to use the package manager. The user
|
||||||
`packInstall', which should pack the binary package and install it on the
|
has to provide two functions, "wrapInstall" and "packInstall", as described
|
||||||
system. Note that nothing has been done to manage configuration files,
|
above. Please note that nothing has been done to manage configuration files,
|
||||||
which are ususally treated specially by package managers: depending on
|
which are ususally treated specially by package managers: depending on
|
||||||
the book layout, it is sometimes possible to create those files afterwards,
|
the book layout, it is sometimes possible to create those files afterwards,
|
||||||
and sometimes not, which means that you have to check them after each
|
and sometimes not, which means that you have to check them after each
|
||||||
upgrade. The user has to write his own `packInstall' function. The shell
|
upgrade. Both functions should be defined in a file named `packInstall.sh',
|
||||||
function should be defined in a file named `packInstall.sh', residing in
|
residing in the `pkgmngt' directory. A template is provided (actually a copy
|
||||||
the `pkgmngt' directory. A template is provided, as well as two example
|
of the file for dpkg), as well as three example scripts for dpkg, pacman,
|
||||||
scripts for dpkg and pacman.
|
and porg. Pacman Note: due to the way pacman checks the available space on
|
||||||
|
disk, the root directory in chroot must be a mount point, otherwise the
|
||||||
|
installation of packages fails.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
|
||||||
<!-- $Id:$ -->
|
<!-- $Id$ -->
|
||||||
<!-- Extracts minimal versions from LFS book host requirements,
|
<!-- Extracts minimal versions from LFS book host requirements,
|
||||||
and generates a script containing statements of the
|
and generates a script containing statements of the
|
||||||
form MIN_prog_VERSION=xx.yy.zz.
|
form MIN_prog_VERSION=xx.yy.zz.
|
||||||
|
|
|
@ -8,9 +8,18 @@ get_book() { #
|
||||||
cd $JHALFSDIR
|
cd $JHALFSDIR
|
||||||
|
|
||||||
if [ -z $WORKING_COPY ] ; then
|
if [ -z $WORKING_COPY ] ; then
|
||||||
# Check for Subversion instead of just letting the script hit 'svn' and fail.
|
# Check for Subversion or git instead of just letting the script fail.
|
||||||
|
case $PROGNAME in
|
||||||
|
lfs | hlfs)
|
||||||
test `type -p svn` || eval "echo \"This feature requires Subversion.\"
|
test `type -p svn` || eval "echo \"This feature requires Subversion.\"
|
||||||
exit 1"
|
exit 1"
|
||||||
|
;;
|
||||||
|
clfs*)
|
||||||
|
test `type -p git` || eval "echo \"This feature requires Git.\"
|
||||||
|
exit 1"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
echo -n "Downloading the $PROGNAME document, $LFSVRS version... "
|
echo -n "Downloading the $PROGNAME document, $LFSVRS version... "
|
||||||
|
|
||||||
case $PROGNAME in
|
case $PROGNAME in
|
||||||
|
@ -23,20 +32,27 @@ get_book() { #
|
||||||
# Grab a fresh book if it's missing, otherwise, update it from the
|
# Grab a fresh book if it's missing, otherwise, update it from the
|
||||||
# repo. If we've already extracted the commands, move on to getting the
|
# repo. If we've already extracted the commands, move on to getting the
|
||||||
# sources.
|
# sources.
|
||||||
if [ $PROGNAME == "lfs" ] || [ $PROGNAME == "hlfs" ] && [ ! -d ${PROGNAME}-${LFSVRS}/.svn ]; then
|
if [ $PROGNAME == "lfs" ] || [ $PROGNAME == "hlfs" ] &&
|
||||||
|
[ ! -d ${PROGNAME}-${LFSVRS}/.svn ]; then
|
||||||
svn co $SVN/${svn_root}/${TREE} ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1
|
svn co $SVN/${svn_root}/${TREE} ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1
|
||||||
elif [ $PROGNAME == "clfs" ] || [ $PROGNAME == "clfs2" ] || [ $PROGNAME == "clfs3" ] && [ ! -d ${PROGNAME}-${LFSVRS}/.git ]; then
|
elif [ $PROGNAME == "clfs" ] || [ $PROGNAME == "clfs2" ] ||
|
||||||
|
[ $PROGNAME == "clfs3" ] && [ ! -d ${PROGNAME}-${LFSVRS}/.git ]; then
|
||||||
echo $TREE
|
echo $TREE
|
||||||
git clone $GIT ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1
|
git clone $GIT ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1
|
||||||
if [ ! $TREE == "development" ]; then
|
if [ ! $TREE == "development" ]; then
|
||||||
cd ${PROGNAME}-$LFSVRS
|
pushd ${PROGNAME}-$LFSVRS > /dev/null
|
||||||
echo "Checking out $LFSVRS at $PWD in $TREE"
|
echo "Checking out $LFSVRS at $PWD in $TREE"
|
||||||
git checkout ${TREE} >>$LOGDIR/$LOG 2>&1
|
git checkout ${TREE} >>$LOGDIR/$LOG 2>&1
|
||||||
|
popd > /dev/null
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
cd ${PROGNAME}-$LFSVRS
|
cd ${PROGNAME}-$LFSVRS
|
||||||
case $PROGNAME in
|
case $PROGNAME in
|
||||||
clfs*) git pull >>$LOGDIR/$LOG 2>&1
|
clfs*)
|
||||||
|
# If the repo is in "detached head" state, git pull fails, so get
|
||||||
|
# back first to master:
|
||||||
|
git checkout master >>$LOGDIR/$LOG 2>&1
|
||||||
|
git pull >>$LOGDIR/$LOG 2>&1
|
||||||
if [ ! $TREE == "development" ]; then
|
if [ ! $TREE == "development" ]; then
|
||||||
git checkout ${TREE} >>$LOGDIR/$LOG 2>&1
|
git checkout ${TREE} >>$LOGDIR/$LOG 2>&1
|
||||||
fi
|
fi
|
||||||
|
@ -47,7 +63,7 @@ get_book() { #
|
||||||
fi
|
fi
|
||||||
echo -ne "done\n"
|
echo -ne "done\n"
|
||||||
|
|
||||||
else
|
else # Working copy
|
||||||
echo -ne "Using $BOOK as book's sources ...\n"
|
echo -ne "Using $BOOK as book's sources ...\n"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -60,6 +76,13 @@ extract_commands() { #
|
||||||
case $PROGNAME in
|
case $PROGNAME in
|
||||||
clfs*)
|
clfs*)
|
||||||
VERSION=$(xmllint --noent $BOOK/BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
VERSION=$(xmllint --noent $BOOK/BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
||||||
|
lfs)
|
||||||
|
if [ "$INITSYS" = "sysv" ] ; then
|
||||||
|
VERSION=$(grep 'ENTITY version ' $BOOK/general.ent| cut -d\" -f2)
|
||||||
|
else
|
||||||
|
VERSION=$(grep 'ENTITY versiond' $BOOK/general.ent| cut -d\" -f2)
|
||||||
|
fi
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
VERSION=$(xmllint --noent $BOOK/prologue/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
VERSION=$(xmllint --noent $BOOK/prologue/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
||||||
esac
|
esac
|
||||||
|
@ -84,7 +107,9 @@ extract_commands() { #
|
||||||
--stringparam sparc $SPARC64_PROC \
|
--stringparam sparc $SPARC64_PROC \
|
||||||
--stringparam x86 $TARGET \
|
--stringparam x86 $TARGET \
|
||||||
--stringparam mips $TARGET \
|
--stringparam mips $TARGET \
|
||||||
-o ./${PROGNAME}-commands/ $XSL $BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
|
-o ./${PROGNAME}-commands/ \
|
||||||
|
$XSL \
|
||||||
|
$BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
clfs2)
|
clfs2)
|
||||||
|
@ -95,7 +120,9 @@ extract_commands() { #
|
||||||
--stringparam timezone $TIMEZONE \
|
--stringparam timezone $TIMEZONE \
|
||||||
--stringparam page $PAGE \
|
--stringparam page $PAGE \
|
||||||
--stringparam lang $LANG \
|
--stringparam lang $LANG \
|
||||||
-o ./${PROGNAME}-commands/ $XSL $BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
|
--output ./${PROGNAME}-commands/ \
|
||||||
|
$XSL \
|
||||||
|
$BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
clfs3)
|
clfs3)
|
||||||
|
@ -106,7 +133,9 @@ extract_commands() { #
|
||||||
--stringparam timezone $TIMEZONE \
|
--stringparam timezone $TIMEZONE \
|
||||||
--stringparam page $PAGE \
|
--stringparam page $PAGE \
|
||||||
--stringparam lang $LANG \
|
--stringparam lang $LANG \
|
||||||
-o ./${PROGNAME}-commands/ $XSL $BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
|
--output ./${PROGNAME}-commands/ \
|
||||||
|
$XSL \
|
||||||
|
$BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
hlfs)
|
hlfs)
|
||||||
|
@ -117,12 +146,15 @@ extract_commands() { #
|
||||||
--stringparam kernel $KERNEL \
|
--stringparam kernel $KERNEL \
|
||||||
--stringparam testsuite $TEST \
|
--stringparam testsuite $TEST \
|
||||||
--stringparam bomb-testsuite $BOMB_TEST \
|
--stringparam bomb-testsuite $BOMB_TEST \
|
||||||
--stringparam features x$SSP$ASLR$PAX$HARDENED_TMP$WARNINGS$MISC$BLOWFISH \
|
--stringparam features \
|
||||||
|
x$SSP$ASLR$PAX$HARDENED_TMP$WARNINGS$MISC$BLOWFISH \
|
||||||
--stringparam timezone $TIMEZONE \
|
--stringparam timezone $TIMEZONE \
|
||||||
--stringparam page $PAGE \
|
--stringparam page $PAGE \
|
||||||
--stringparam lang $LANG \
|
--stringparam lang $LANG \
|
||||||
--stringparam grsecurity_host $GRSECURITY_HOST \
|
--stringparam grsecurity_host $GRSECURITY_HOST \
|
||||||
-o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1
|
--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... "
|
||||||
|
@ -131,8 +163,10 @@ extract_commands() { #
|
||||||
bash process-scripts.sh >> $LOGDIR/$LOG 2>&1
|
bash process-scripts.sh >> $LOGDIR/$LOG 2>&1
|
||||||
fi
|
fi
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|
||||||
xsltproc --nonet \
|
xsltproc --nonet \
|
||||||
--xinclude \
|
--xinclude \
|
||||||
|
--stringparam revision $INITSYS \
|
||||||
--stringparam testsuite $TEST \
|
--stringparam testsuite $TEST \
|
||||||
--stringparam bomb-testsuite $BOMB_TEST \
|
--stringparam bomb-testsuite $BOMB_TEST \
|
||||||
--stringparam vim-lang $VIMLANG \
|
--stringparam vim-lang $VIMLANG \
|
||||||
|
@ -141,7 +175,19 @@ extract_commands() { #
|
||||||
--stringparam page $PAGE \
|
--stringparam page $PAGE \
|
||||||
--stringparam lang $LANG \
|
--stringparam lang $LANG \
|
||||||
--stringparam pkgmngt $PKGMNGT \
|
--stringparam pkgmngt $PKGMNGT \
|
||||||
-o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1
|
--stringparam wrap-install $WRAP_INSTALL \
|
||||||
|
--stringparam hostname $HOSTNAME \
|
||||||
|
--stringparam interface $INTERFACE \
|
||||||
|
--stringparam ip $IP_ADDR \
|
||||||
|
--stringparam gateway $GATEWAY \
|
||||||
|
--stringparam prefix $PREFIX \
|
||||||
|
--stringparam broadcast $BROADCAST \
|
||||||
|
--stringparam domain $DOMAIN \
|
||||||
|
--stringparam nameserver1 $DNS1 \
|
||||||
|
--stringparam nameserver2 $DNS2 \
|
||||||
|
--output ./${PROGNAME}-commands/ \
|
||||||
|
$XSL \
|
||||||
|
$BOOK/index.xml >> $LOGDIR/$LOG 2>&1
|
||||||
;;
|
;;
|
||||||
*) echo -n " ${L_arrow}${PROGNAME}${R_arrow} book invalid, terminate build... "
|
*) echo -n " ${L_arrow}${PROGNAME}${R_arrow} book invalid, terminate build... "
|
||||||
exit 1 ;;
|
exit 1 ;;
|
||||||
|
@ -172,20 +218,25 @@ create_package_list() { #
|
||||||
echo -n "... "
|
echo -n "... "
|
||||||
case ${PROGNAME} in
|
case ${PROGNAME} in
|
||||||
clfs*)
|
clfs*)
|
||||||
xsltproc --nonet --xinclude -o pkg_tarball_list packages.xsl \
|
xsltproc --nonet --xinclude \
|
||||||
|
-o pkg_tarball_list \
|
||||||
|
packages.xsl \
|
||||||
$BOOK/BOOK/materials/${ARCH}-chapter.xml >>$LOGDIR/$LOG 2>&1
|
$BOOK/BOOK/materials/${ARCH}-chapter.xml >>$LOGDIR/$LOG 2>&1
|
||||||
;;
|
;;
|
||||||
hlfs)
|
hlfs)
|
||||||
xsltproc --nonet --xinclude \
|
xsltproc --nonet --xinclude \
|
||||||
--stringparam model $MODEL \
|
--stringparam model $MODEL \
|
||||||
--stringparam kernel $KERNEL \
|
--stringparam kernel $KERNEL \
|
||||||
-o pkg_tarball_list packages.xsl \
|
--output pkg_tarball_list \
|
||||||
|
packages.xsl \
|
||||||
$BOOK/chapter04/chapter04.xml >>$LOGDIR/$LOG 2>&1
|
$BOOK/chapter04/chapter04.xml >>$LOGDIR/$LOG 2>&1
|
||||||
;;
|
;;
|
||||||
lfs)
|
lfs)
|
||||||
xsltproc --nonet --xinclude \
|
xsltproc --nonet --xinclude \
|
||||||
--stringparam pkgmngt $PKGMNGT \
|
--stringparam pkgmngt $PKGMNGT \
|
||||||
-o pkg_tarball_list packages.xsl \
|
--stringparam revision $INITSYS \
|
||||||
|
--output pkg_tarball_list \
|
||||||
|
packages.xsl \
|
||||||
$BOOK/chapter03/chapter03.xml >>$LOGDIR/$LOG 2>&1
|
$BOOK/chapter03/chapter03.xml >>$LOGDIR/$LOG 2>&1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -88,12 +88,9 @@ inline_doc
|
||||||
check_prerequisites() { #
|
check_prerequisites() { #
|
||||||
#----------------------------#
|
#----------------------------#
|
||||||
|
|
||||||
case $PROGNAME in
|
HOSTREQS=$(find $BOOK -name hostreqs.xml)
|
||||||
clfs | clfs2 | clfs3) HOSTREQS="BOOK/prologue/common/hostreqs.xml" ;;
|
|
||||||
*) HOSTREQS="prologue/hostreqs.xml" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
eval $(xsltproc $COMMON_DIR/hostreqs.xsl $BOOK/$HOSTREQS)
|
eval $(xsltproc $COMMON_DIR/hostreqs.xsl $HOSTREQS)
|
||||||
# Avoid translation of version strings
|
# Avoid translation of version strings
|
||||||
local LC_ALL=C
|
local LC_ALL=C
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
|
@ -236,17 +233,14 @@ inline_doc
|
||||||
check_blfs_tools() { #
|
check_blfs_tools() { #
|
||||||
#----------------------------#
|
#----------------------------#
|
||||||
: << inline_doc
|
: << inline_doc
|
||||||
In addition to the tools needed for the LFS part, tidy and docbook-xml
|
In addition to the tools needed for the LFS part, docbook-xml
|
||||||
are needed for installing the BLFS tools
|
is needed for installing the BLFS tools
|
||||||
inline_doc
|
inline_doc
|
||||||
|
|
||||||
# Avoid translation of version strings
|
# Avoid translation of version strings
|
||||||
local LC_ALL=C
|
local LC_ALL=C
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
|
|
||||||
tidyVer=$(tidy -V | cut -d " " -f9)
|
|
||||||
check_version "2004" "${tidyVer}" "TIDY"
|
|
||||||
|
|
||||||
# Minimal docbook-xml code for testing
|
# Minimal docbook-xml code for testing
|
||||||
XML_FILE="<?xml version='1.0' encoding='ISO-8859-1'?>
|
XML_FILE="<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||||
<?xml-stylesheet type='text/xsl' href='http://docbook.sourceforge.net/release/xsl/1.69.1/xhtml/docbook.xsl'?>
|
<?xml-stylesheet type='text/xsl' href='http://docbook.sourceforge.net/release/xsl/1.69.1/xhtml/docbook.xsl'?>
|
||||||
|
|
|
@ -153,7 +153,8 @@ create_urls() { #
|
||||||
xsltproc --nonet --xinclude \
|
xsltproc --nonet --xinclude \
|
||||||
--stringparam server $SERVER \
|
--stringparam server $SERVER \
|
||||||
--stringparam family clfs \
|
--stringparam family clfs \
|
||||||
-o $BUILDDIR/sources/urls.lst urls.xsl \
|
-o $BUILDDIR/sources/urls.lst \
|
||||||
|
urls.xsl \
|
||||||
$BOOK/BOOK/materials/$ARCH-chapter.xml >>$LOGDIR/$LOG 2>&1
|
$BOOK/BOOK/materials/$ARCH-chapter.xml >>$LOGDIR/$LOG 2>&1
|
||||||
echo " ...OK"
|
echo " ...OK"
|
||||||
;;
|
;;
|
||||||
|
@ -164,7 +165,8 @@ create_urls() { #
|
||||||
--stringparam family lfs \
|
--stringparam family lfs \
|
||||||
--stringparam model $MODEL \
|
--stringparam model $MODEL \
|
||||||
--stringparam kernel $KERNEL \
|
--stringparam kernel $KERNEL \
|
||||||
-o $BUILDDIR/sources/urls.lst urls.xsl \
|
-o $BUILDDIR/sources/urls.lst \
|
||||||
|
urls.xsl \
|
||||||
$BOOK/chapter04/chapter04.xml >>$LOGDIR/$LOG 2>&1
|
$BOOK/chapter04/chapter04.xml >>$LOGDIR/$LOG 2>&1
|
||||||
echo " ...OK"
|
echo " ...OK"
|
||||||
;;
|
;;
|
||||||
|
@ -174,7 +176,9 @@ create_urls() { #
|
||||||
--stringparam server $SERVER \
|
--stringparam server $SERVER \
|
||||||
--stringparam family lfs \
|
--stringparam family lfs \
|
||||||
--stringparam pkgmngt $PKGMNGT \
|
--stringparam pkgmngt $PKGMNGT \
|
||||||
-o ../sources/urls.lst urls.xsl \
|
--stringparam revision $INITSYS \
|
||||||
|
--output ../sources/urls.lst \
|
||||||
|
urls.xsl \
|
||||||
$BOOK/chapter03/chapter03.xml >>$LOGDIR/$LOG 2>&1
|
$BOOK/chapter03/chapter03.xml >>$LOGDIR/$LOG 2>&1
|
||||||
echo " ...OK"
|
echo " ...OK"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -12,6 +12,11 @@ cp -r BLFS/* ${BUILDDIR}${BLFS_ROOT}
|
||||||
cp -r menu ${BUILDDIR}${BLFS_ROOT}
|
cp -r menu ${BUILDDIR}${BLFS_ROOT}
|
||||||
cp $COMMON_DIR/progress_bar.sh ${BUILDDIR}${BLFS_ROOT}
|
cp $COMMON_DIR/progress_bar.sh ${BUILDDIR}${BLFS_ROOT}
|
||||||
cp README.BLFS ${BUILDDIR}${BLFS_ROOT}
|
cp README.BLFS ${BUILDDIR}${BLFS_ROOT}
|
||||||
|
if [ "$WRAP_INSTALL" = y ]; then
|
||||||
|
sed -e 's/PKGDIR/UNPACKDIR/' \
|
||||||
|
-e 's/PKG_DEST/PKG_DIR/' \
|
||||||
|
$PKGMNGTDIR/packInstall.sh > ${BUILDDIR}${BLFS_ROOT}/packInstall.sh
|
||||||
|
fi
|
||||||
|
|
||||||
# Clean-up
|
# Clean-up
|
||||||
make -C ${BUILDDIR}${BLFS_ROOT}/menu clean
|
make -C ${BUILDDIR}${BLFS_ROOT}/menu clean
|
||||||
|
@ -40,7 +45,9 @@ fi
|
||||||
# package database.
|
# package database.
|
||||||
# sudo is needed if $BUILDDIR/var/lib is owned by root and /var/lib/jhalfs
|
# sudo is needed if $BUILDDIR/var/lib is owned by root and /var/lib/jhalfs
|
||||||
# has to be created
|
# has to be created
|
||||||
sudo make -j1 -C $BUILDDIR$BLFS_ROOT TRACKING_DIR=$BUILDDIR$TRACKING_DIR \
|
sudo make -j1 -C $BUILDDIR$BLFS_ROOT \
|
||||||
|
REV=$INITSYS \
|
||||||
|
TRACKING_DIR=$BUILDDIR$TRACKING_DIR \
|
||||||
$BUILDDIR$BLFS_ROOT/packages.xml
|
$BUILDDIR$BLFS_ROOT/packages.xml
|
||||||
|
|
||||||
# Because the BLFS Makefile is supposed to be used in chroot (or booted)
|
# Because the BLFS Makefile is supposed to be used in chroot (or booted)
|
||||||
|
@ -58,11 +65,6 @@ if [ "$DEP_LIBXSLT" = y ]; then
|
||||||
else
|
else
|
||||||
LINE_LIBXSLT='#CONFIG_libxslt is not set'
|
LINE_LIBXSLT='#CONFIG_libxslt is not set'
|
||||||
fi
|
fi
|
||||||
if [ "$DEP_TIDY" = y ]; then
|
|
||||||
LINE_TIDY='CONFIG_html-tidy=y'
|
|
||||||
else
|
|
||||||
LINE_TIDY='#CONFIG_html-tidy is not set'
|
|
||||||
fi
|
|
||||||
# DocBook is a rec dep of libxslt
|
# DocBook is a rec dep of libxslt
|
||||||
# if [ "$DEP_DBXML" = y ]; then
|
# if [ "$DEP_DBXML" = y ]; then
|
||||||
# LINE_DBXML='CONFIG_DocBook=y'
|
# LINE_DBXML='CONFIG_DocBook=y'
|
||||||
|
@ -110,7 +112,6 @@ $LINE_OPENSSL
|
||||||
$LINE_PYTHON
|
$LINE_PYTHON
|
||||||
$LINE_LIBXML
|
$LINE_LIBXML
|
||||||
$LINE_LIBXSLT
|
$LINE_LIBXSLT
|
||||||
$LINE_TIDY
|
|
||||||
$LINE_WGET
|
$LINE_WGET
|
||||||
$LINE_SVN
|
$LINE_SVN
|
||||||
$LINE_GPM
|
$LINE_GPM
|
||||||
|
@ -119,6 +120,7 @@ $LINE_SUDO
|
||||||
MAIL_SERVER=sendmail
|
MAIL_SERVER=sendmail
|
||||||
optDependency=2
|
optDependency=2
|
||||||
SUDO=n
|
SUDO=n
|
||||||
|
WRAP_INSTALL=$WRAP_INSTALL
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Generates the scripts for the blfs tools dependencies (in ./scripts)
|
# Generates the scripts for the blfs tools dependencies (in ./scripts)
|
||||||
|
@ -128,19 +130,21 @@ yes "yes" | $BUILDDIR$BLFS_ROOT/gen_pkg_book.sh $BUILDDIR$BLFS_ROOT
|
||||||
sudo rm -rf $BUILDDIR$BLFS_ROOT/scripts
|
sudo rm -rf $BUILDDIR$BLFS_ROOT/scripts
|
||||||
mv scripts $BUILDDIR$BLFS_ROOT
|
mv scripts $BUILDDIR$BLFS_ROOT
|
||||||
|
|
||||||
# The book instructions for CA certificates contains downloading
|
|
||||||
# instructions, which should not be used here, so:
|
|
||||||
if test -f $BUILDDIR$BLFS_ROOT/scripts/*cacerts; then
|
|
||||||
sed -i '/URL=/,/^wget/d' $BUILDDIR$BLFS_ROOT/scripts/*cacerts
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Generates a list containing download and copying instructions for tarballs
|
# Generates a list containing download and copying instructions for tarballs
|
||||||
echo -e '#!/bin/bash\nset -e\n' > $BUILDDIR$BLFS_ROOT/download_script
|
echo -e '#!/bin/bash\nset -e\n' > $BUILDDIR$BLFS_ROOT/download_script
|
||||||
sed -n -e '/PACKAGE=/,/^fi/p' \
|
sed -n -e '/PACKAGE=/,/^fi/{/^fi/a\
|
||||||
|
cp $PACKAGE $SRC_ARCHIVE
|
||||||
|
p}' \
|
||||||
-e '/|[ ]*md5sum/p' \
|
-e '/|[ ]*md5sum/p' \
|
||||||
-e '/PACKAGE1=/,/^fi/p' \
|
-e '/PACKAGE1=/,/^fi/{/^fi/a\
|
||||||
-e '/PATCH=/,/^fi/p' \
|
cp $PACKAGE1 $SRC_ARCHIVE
|
||||||
-e '/URL=/,/^fi/p' \
|
p}' \
|
||||||
|
-e '/PATCH=/,/^fi/{/^fi/a\
|
||||||
|
cp $PACKAGE1 $SRC_ARCHIVE
|
||||||
|
p}' \
|
||||||
|
-e '/URL=/,/^fi/{/^fi/a\
|
||||||
|
cp $PACKAGE1 $SRC_ARCHIVE
|
||||||
|
p}' \
|
||||||
$BUILDDIR$BLFS_ROOT/scripts/* >> $BUILDDIR$BLFS_ROOT/download_script
|
$BUILDDIR$BLFS_ROOT/scripts/* >> $BUILDDIR$BLFS_ROOT/download_script
|
||||||
chmod u+x $BUILDDIR$BLFS_ROOT/download_script
|
chmod u+x $BUILDDIR$BLFS_ROOT/download_script
|
||||||
|
|
||||||
|
@ -148,7 +152,13 @@ chmod u+x $BUILDDIR$BLFS_ROOT/download_script
|
||||||
pushd $BUILDDIR/sources
|
pushd $BUILDDIR/sources
|
||||||
# Remove `unpacked' files if some have been left
|
# Remove `unpacked' files if some have been left
|
||||||
sudo find . -name unpacked -exec rm \{\} \;
|
sudo find . -name unpacked -exec rm \{\} \;
|
||||||
FTP_SERVER=$SERVER/pub/blfs/ SRC_ARCHIVE=$SRC_ARCHIVE $BUILDDIR$BLFS_ROOT/download_script
|
if [ "$GETPKG" = "y" ]; then
|
||||||
|
FTP_SERVER=$SERVER/pub/blfs/ \
|
||||||
|
SRC_ARCHIVE=${SRC_ARCHIVE:-/dev/null} \
|
||||||
|
$BUILDDIR$BLFS_ROOT/download_script
|
||||||
|
else # Save the download script in case the user wants to run it later
|
||||||
|
cp $BUILDDIR$BLFS_ROOT/download_script .
|
||||||
|
fi
|
||||||
popd
|
popd
|
||||||
rm -v $BUILDDIR$BLFS_ROOT/download_script
|
rm -v $BUILDDIR$BLFS_ROOT/download_script
|
||||||
|
|
||||||
|
@ -179,9 +189,8 @@ if [ "$DEP_SVN" = y ]; then
|
||||||
fi
|
fi
|
||||||
if [ "$DEP_LYNX" = y ]; then
|
if [ "$DEP_LYNX" = y ]; then
|
||||||
if [ "$DEP_OPENSSL" = y -o "$DEP_WGET" = y ]; then
|
if [ "$DEP_OPENSSL" = y -o "$DEP_WGET" = y ]; then
|
||||||
sed -i -e 's/configure/& --with-ssl/' \
|
sed -e 's/configure/& --with-ssl/' \
|
||||||
-e '/make$/i echo "#define USE_OPENSSL_INCL 1" >> lynx_cfg.h &&' \
|
-i $BUILDDIR$BLFS_ROOT/scripts/*lynx
|
||||||
$BUILDDIR$BLFS_ROOT/scripts/*lynx
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# At last generates the build Makefile
|
# At last generates the build Makefile
|
||||||
|
|
|
@ -31,7 +31,7 @@ inline_doc
|
||||||
local -r ADVANCED_common="REPORT REBUILD_MAKEFILE"
|
local -r ADVANCED_common="REPORT REBUILD_MAKEFILE"
|
||||||
|
|
||||||
# BOOK Settings by book
|
# BOOK Settings by book
|
||||||
local -r LFS_book="$BOOK_common 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 \
|
#local -r HLFS_added="SET_SSP SET_ASLR SET_PAX SET_HARDENED_TMP SET_WARNINGS \
|
||||||
# SET_MISC SET_BLOWFISH"
|
# SET_MISC SET_BLOWFISH"
|
||||||
local -r HLFS_added=""
|
local -r HLFS_added=""
|
||||||
|
@ -41,14 +41,17 @@ inline_doc
|
||||||
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 VIMLANG $BUILD_common PKGMNGT FULL_LOCALE"
|
local -r LFS_build="$BUILD_chroot VIMLANG $BUILD_common PKGMNGT FULL_LOCALE WRAP_INSTALL"
|
||||||
local -r HLFS_build="$BUILD_chroot $BUILD_common"
|
local -r HLFS_build="$BUILD_chroot $BUILD_common"
|
||||||
local -r CLFS_build="$BUILD_chroot VIMLANG $BUILD_common"
|
local -r CLFS_build="$BUILD_chroot VIMLANG $BUILD_common"
|
||||||
local -r CLFS2_build="STRIP VIMLANG $BUILD_common"
|
local -r CLFS2_build="STRIP VIMLANG $BUILD_common"
|
||||||
local -r CLFS3_build=" $BUILD_common"
|
local -r CLFS3_build=" $BUILD_common"
|
||||||
|
|
||||||
|
# System Settings by book (only LFS for now)
|
||||||
|
local -r LFS_system="HOSTNAME INTERFACE IP_ADDR GATEWAY PREFIX BROADCAST DOMAIN DNS1 DNS2 FONT CONSOLE_MAP UNICODE KEYMAP"
|
||||||
|
|
||||||
# Full list of books settings
|
# Full list of books settings
|
||||||
local -r lfs_PARAM_LIST="$LFS_book $GENERAL_common $LFS_build $ADVANCED_chroot $ADVANCED_common"
|
local -r lfs_PARAM_LIST="$LFS_book $GENERAL_common $LFS_build $LFS_system $ADVANCED_chroot $ADVANCED_common"
|
||||||
local -r hlfs_PARAM_LIST="$HLFS_book $GENERAL_common $HLFS_build $ADVANCED_chroot $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"
|
||||||
|
@ -58,7 +61,7 @@ inline_doc
|
||||||
# Additional variables
|
# Additional variables
|
||||||
local -r blfs_tool_PARAM_LIST="\
|
local -r blfs_tool_PARAM_LIST="\
|
||||||
BLFS_TREE BLFS_BRANCH_ID BLFS_ROOT BLFS_XML TRACKING_DIR \
|
BLFS_TREE BLFS_BRANCH_ID BLFS_ROOT BLFS_XML TRACKING_DIR \
|
||||||
DEP_LIBXML DEP_LIBXSLT DEP_TIDY DEP_DBXML DEP_LYNX DEP_SUDO DEP_WGET \
|
DEP_LIBXML DEP_LIBXSLT DEP_DBXML DEP_LYNX DEP_SUDO DEP_WGET \
|
||||||
DEP_SVN DEP_GPM DEP_OPENSSL DEP_PYTHON"
|
DEP_SVN DEP_GPM DEP_OPENSSL DEP_PYTHON"
|
||||||
local -r custom_tool_PARAM_LIST="TRACKING_DIR"
|
local -r custom_tool_PARAM_LIST="TRACKING_DIR"
|
||||||
|
|
||||||
|
@ -80,6 +83,15 @@ inline_doc
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This function is only used when testing package management files.
|
||||||
|
write_pkg_and_die() {
|
||||||
|
echo -e "\n${DD_BORDER}"
|
||||||
|
echo "Package management is requested but" >&2
|
||||||
|
echo -e $* >&2
|
||||||
|
echo -e "${DD_BORDER}\n"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
validate_file() {
|
validate_file() {
|
||||||
# For parameters ending with a '+' failure causes a warning message only
|
# For parameters ending with a '+' failure causes a warning message only
|
||||||
echo -n "`eval echo $PARAM_VALS`"
|
echo -n "`eval echo $PARAM_VALS`"
|
||||||
|
@ -184,6 +196,35 @@ inline_doc
|
||||||
echo
|
echo
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
# Treatment of HOSTNAME
|
||||||
|
HOSTNAME) echo -e "`eval echo $PARAM_VALS`"
|
||||||
|
[[ "${!config_param}" = "**EDIT ME**" ]] && write_error_and_die
|
||||||
|
;;
|
||||||
|
|
||||||
|
# Case of PKGMNGT: two files, packageManager.xml and packInstall.sh
|
||||||
|
# must exist in $PKGMNGTDIR if PKGMNGT='y':
|
||||||
|
PKGMNGT) echo -e "`eval echo $PARAM_VALS`"
|
||||||
|
if [ "$PKGMNGT" = y ]; then
|
||||||
|
if [ ! -e "$PKGMNGTDIR/packageManager.xml" ]; then
|
||||||
|
write_pkg_and_die $PKGMNGTDIR/packageManager.xml does not exist
|
||||||
|
fi
|
||||||
|
if [ ! -e "$PKGMNGTDIR/packInstall.sh" ]; then
|
||||||
|
write_pkg_and_die $PKGMNGTDIR/packInstall.sh does not exist
|
||||||
|
fi
|
||||||
|
if [ ! -s "$PKGMNGTDIR/packageManager.xml" ]; then
|
||||||
|
write_pkg_and_die $PKGMNGTDIR/packageManager.xml has zero size
|
||||||
|
fi
|
||||||
|
if [ ! -s "$PKGMNGTDIR/packInstall.sh" ]; then
|
||||||
|
write_pkg_and_die $PKGMNGTDIR/packInstall.sh has zero size
|
||||||
|
fi
|
||||||
|
if [ ! -r "$PKGMNGTDIR/packageManager.xml" ]; then
|
||||||
|
write_pkg_and_die $PKGMNGTDIR/packageManager.xml is not readable
|
||||||
|
fi
|
||||||
|
if [ ! -r "$PKGMNGTDIR/packInstall.sh" ]; then
|
||||||
|
write_pkg_and_die $PKGMNGTDIR/packInstall.sh is not readable
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
# Display non-validated envars found in ${PROGNAME}_PARAM_LIST
|
# Display non-validated envars found in ${PROGNAME}_PARAM_LIST
|
||||||
* ) echo -e "`eval echo $PARAM_VALS`" ;;
|
* ) echo -e "`eval echo $PARAM_VALS`" ;;
|
||||||
|
|
||||||
|
|
|
@ -115,6 +115,7 @@ define get_pkg_root2
|
||||||
echo "export PKG_DEST=$(SRC)/$@" >> envars; \
|
echo "export PKG_DEST=$(SRC)/$@" >> envars; \
|
||||||
echo "source packInstall.sh" >> envars; \
|
echo "source packInstall.sh" >> envars; \
|
||||||
echo "export -f packInstall" >> envars; \
|
echo "export -f packInstall" >> envars; \
|
||||||
|
echo "export -f wrapInstall" >> envars; \
|
||||||
fi;
|
fi;
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
|
@ -8,13 +8,16 @@
|
||||||
<xsl:output method="text"/>
|
<xsl:output method="text"/>
|
||||||
|
|
||||||
<!-- The libc model used for HLFS -->
|
<!-- The libc model used for HLFS -->
|
||||||
<xsl:param name="model" select="glibc"/>
|
<xsl:param name="model" select="'glibc'"/>
|
||||||
|
|
||||||
<!-- The kernel series used for HLFS -->
|
<!-- The kernel series used for HLFS -->
|
||||||
<xsl:param name="kernel" select="2.6"/>
|
<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'"/>
|
||||||
|
|
||||||
|
<!-- The system for LFS: sysv of systemd -->
|
||||||
|
<xsl:param name="revision" select="'sysv'"/>
|
||||||
|
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
<xsl:apply-templates select="//para"/>
|
<xsl:apply-templates select="//para"/>
|
||||||
|
@ -28,6 +31,8 @@
|
||||||
<xsl:if test="contains(string(),'Download:') and
|
<xsl:if test="contains(string(),'Download:') and
|
||||||
(ancestor::varlistentry[@condition=$model]
|
(ancestor::varlistentry[@condition=$model]
|
||||||
or not(ancestor::varlistentry[@condition])) and
|
or not(ancestor::varlistentry[@condition])) and
|
||||||
|
(ancestor::varlistentry[@revision=$revision]
|
||||||
|
or not(ancestor::varlistentry[@revision])) and
|
||||||
(ancestor::varlistentry[@vendor=$kernel]
|
(ancestor::varlistentry[@vendor=$kernel]
|
||||||
or not(ancestor::varlistentry[@vendor]))">
|
or not(ancestor::varlistentry[@vendor]))">
|
||||||
<xsl:call-template name="package_name">
|
<xsl:call-template name="package_name">
|
||||||
|
|
|
@ -14,16 +14,20 @@
|
||||||
<xsl:param name="family">lfs</xsl:param>
|
<xsl:param name="family">lfs</xsl:param>
|
||||||
|
|
||||||
<!-- The libc model used for HLFS -->
|
<!-- The libc model used for HLFS -->
|
||||||
<xsl:param name="model" select="glibc"/>
|
<xsl:param name="model" select="'glibc'"/>
|
||||||
|
|
||||||
<!-- The kernel series used for HLFS -->
|
<!-- The kernel series used for HLFS -->
|
||||||
<xsl:param name="kernel" select="2.6"/>
|
<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'"/>
|
||||||
|
|
||||||
|
<!-- The system for LFS: sysv of systemd -->
|
||||||
|
<xsl:param name="revision" select="'sysv'"/>
|
||||||
|
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
<xsl:apply-templates select="//ulink"/>
|
<xsl:apply-templates select="//varlistentry[@revision=$revision
|
||||||
|
or not(@revision)]//ulink"/>
|
||||||
<xsl:if test="$pkgmngt='y'">
|
<xsl:if test="$pkgmngt='y'">
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates
|
||||||
select="document('packageManager.xml')//ulink"/>
|
select="document('packageManager.xml')//ulink"/>
|
||||||
|
@ -101,6 +105,9 @@
|
||||||
<xsl:when test="contains($dirname, 'udev')">
|
<xsl:when test="contains($dirname, 'udev')">
|
||||||
<xsl:text>udev/</xsl:text>
|
<xsl:text>udev/</xsl:text>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
<xsl:when test="contains($dirname, 'iputils')">
|
||||||
|
<xsl:text>iputils/</xsl:text>
|
||||||
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="$dirname"/>
|
<xsl:value-of select="$dirname"/>
|
||||||
<xsl:text>/</xsl:text>
|
<xsl:text>/</xsl:text>
|
||||||
|
|
25
custom/examples/940-libffi
Normal file
25
custom/examples/940-libffi
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
PKG="libffi"
|
||||||
|
PKG_VERSION="3.2.1"
|
||||||
|
PKG_FILE="libffi-3.2.1.tar.gz"
|
||||||
|
URL="http://sourceware.org/pub/libffi/${PKG_FILE}"
|
||||||
|
MD5="83b89587607e3eb65c70d361f13bab43"
|
||||||
|
for i in PATCH{1..10}; do
|
||||||
|
unset $i
|
||||||
|
done
|
||||||
|
|
||||||
|
( cat << "xEOFx"
|
||||||
|
sed -e '/^includesdir/ s/$(libdir).*$/$(includedir)/' \
|
||||||
|
-i include/Makefile.in &&
|
||||||
|
|
||||||
|
sed -e '/^includedir/ s/=.*$/=@includedir@/' \
|
||||||
|
-e 's/^Cflags: -I${includedir}/Cflags:/' \
|
||||||
|
-i libffi.pc.in &&
|
||||||
|
|
||||||
|
./configure --prefix=/usr --disable-static &&
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
xEOFx
|
||||||
|
) > tmp
|
31
custom/examples/941-pcre
Normal file
31
custom/examples/941-pcre
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
PKG="pcre"
|
||||||
|
PKG_VERSION="8.37"
|
||||||
|
PKG_FILE="pcre-8.37.tar.bz2"
|
||||||
|
URL="ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/${PKG_FILE}"
|
||||||
|
MD5="ed91be292cb01d21bc7e526816c26981"
|
||||||
|
for i in PATCH{1..10}; do
|
||||||
|
unset $i
|
||||||
|
done
|
||||||
|
PATCH1="http://www.linuxfromscratch.org/patches/blfs/7.8/pcre-8.37-upstream_fixes-1.patch 718c4314fba52ed559c75ff7660cc391"
|
||||||
|
|
||||||
|
( cat << "xEOFx"
|
||||||
|
patch -Np1 -i ../pcre-8.37-upstream_fixes-1.patch &&
|
||||||
|
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--docdir=/usr/share/doc/pcre-8.37 \
|
||||||
|
--enable-unicode-properties \
|
||||||
|
--enable-pcre16 \
|
||||||
|
--enable-pcre32 \
|
||||||
|
--enable-pcregrep-libz \
|
||||||
|
--enable-pcregrep-libbz2 \
|
||||||
|
--enable-pcretest-libreadline \
|
||||||
|
--disable-static &&
|
||||||
|
make
|
||||||
|
make install &&
|
||||||
|
mv -v /usr/lib/libpcre.so.* /lib &&
|
||||||
|
ln -sfv ../../lib/$(readlink /usr/lib/libpcre.so) /usr/lib/libpcre.so
|
||||||
|
xEOFx
|
||||||
|
) > tmp
|
25
custom/examples/945-python3
Normal file
25
custom/examples/945-python3
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
PKG="python3"
|
||||||
|
PKG_VERSION="3.4.3"
|
||||||
|
PKG_FILE="Python-3.4.3.tar.xz"
|
||||||
|
URL="https://www.python.org/ftp/python/3.4.3/${PKG_FILE}"
|
||||||
|
MD5="7d092d1bba6e17f0d9bd21b49e441dd5"
|
||||||
|
for i in PATCH{1..10}; do
|
||||||
|
unset $i
|
||||||
|
done
|
||||||
|
|
||||||
|
( cat << "xEOFx"
|
||||||
|
CXX="/usr/bin/g++" \
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--enable-shared \
|
||||||
|
--with-system-expat \
|
||||||
|
--with-system-ffi \
|
||||||
|
--without-ensurepip &&
|
||||||
|
make
|
||||||
|
make install &&
|
||||||
|
chmod -v 755 /usr/lib/libpython3.4m.so &&
|
||||||
|
chmod -v 755 /usr/lib/libpython3.so
|
||||||
|
xEOFx
|
||||||
|
) > tmp
|
|
@ -1,22 +0,0 @@
|
||||||
#
|
|
||||||
# $Id$
|
|
||||||
#
|
|
||||||
PKG="bc"
|
|
||||||
PKG_VERSION="1.06"
|
|
||||||
PKG_FILE="bc-1.06.tar.gz"
|
|
||||||
URL="http://ftp.gnu.org/gnu/bc/${PKG_FILE}"
|
|
||||||
MD5="d44b5dddebd8a7a7309aea6c36fda117"
|
|
||||||
for i in PATCH{1..10}; do
|
|
||||||
unset $i
|
|
||||||
done
|
|
||||||
|
|
||||||
( cat << "xEOFx"
|
|
||||||
sed -i '/PROTO.*readline/d' bc/scan.l &&
|
|
||||||
sed -i '/flex -I8/s/8//' configure &&
|
|
||||||
sed -i '/stdlib/a #include <string.h>' lib/number.c &&
|
|
||||||
sed -i 's/program.*save/static &/' bc/load.c &&
|
|
||||||
./configure --prefix=/usr --with-readline &&
|
|
||||||
make
|
|
||||||
make install
|
|
||||||
xEOFx
|
|
||||||
) > tmp
|
|
|
@ -2,21 +2,17 @@
|
||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
PKG="glib"
|
PKG="glib"
|
||||||
PKG_VERSION="1.2.10"
|
PKG_VERSION="2.44.1"
|
||||||
PKG_FILE="glib-1.2.10.tar.gz"
|
PKG_FILE="glib-2.44.1.tar.xz"
|
||||||
URL="http://gd.tuwien.ac.at/graphics/gimp/gtk/v1.2/${PKG_FILE}"
|
URL="http://ftp.gnome.org/pub/gnome/sources/glib/2.44/${PKG_FILE}"
|
||||||
MD5="6fe30dad87c77b91b632def29dd69ef9"
|
MD5="83efba4722a9674b97437d1d99af79db"
|
||||||
for i in PATCH{1..10}; do
|
for i in PATCH{1..10}; do
|
||||||
unset $i
|
unset $i
|
||||||
done
|
done
|
||||||
PATCH1="http://www.linuxfromscratch.org/patches/blfs/svn/glib-1.2.10-gcc34-1.patch 0077a1cce5e8a2231ac5a9b08c6263ba"
|
|
||||||
|
|
||||||
|
|
||||||
( cat << "xEOFx"
|
( cat << "xEOFx"
|
||||||
patch -Np1 -i ../glib-1.2.10-gcc34-1.patch &&
|
./configure --prefix=/usr --with-pcre=system &&
|
||||||
./configure --prefix=/usr &&
|
|
||||||
make
|
make
|
||||||
make install &&
|
make install
|
||||||
chmod -v 755 /usr/lib/libgmodule-1.2.so.0.0.10
|
|
||||||
xEOFx
|
xEOFx
|
||||||
) > tmp
|
) > tmp
|
||||||
|
|
|
@ -2,17 +2,21 @@
|
||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
PKG="mc"
|
PKG="mc"
|
||||||
PKG_VERSION="4.6.1"
|
PKG_VERSION="4.8.14"
|
||||||
PKG_FILE="mc-4.6.1.tar.gz"
|
PKG_FILE="mc-4.8.14.tar.xz"
|
||||||
URL="http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/${PKG_FILE}"
|
URL="http://ftp.midnight-commander.org/${PKG_FILE}"
|
||||||
MD5="18b20db6e40480a53bac2870c56fc3c4"
|
MD5="fbdaddb9edcf8925dcf3231331a8720b"
|
||||||
for i in PATCH{1..10}; do
|
for i in PATCH{1..10}; do
|
||||||
unset $i
|
unset $i
|
||||||
done
|
done
|
||||||
|
|
||||||
( cat << "xEOFx"
|
( cat << "xEOFx"
|
||||||
./configure --prefix=/usr &&
|
./configure --prefix=/usr \
|
||||||
|
--sysconfdir=/etc \
|
||||||
|
--with-screen=ncurses \
|
||||||
|
--enable-charset &&
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
|
cp -v doc/keybind-migration.txt /usr/share/mc
|
||||||
xEOFx
|
xEOFx
|
||||||
) > tmp
|
) > tmp
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
PKG="ppp"
|
PKG="ppp"
|
||||||
PKG_VERSION="2.4.4"
|
PKG_VERSION="2.4.7"
|
||||||
PKG_FILE="ppp-${PKG_VERSION}.tar.gz"
|
PKG_FILE="ppp-${PKG_VERSION}.tar.gz"
|
||||||
URL="http://samba.org/ftp/ppp/${PKG_FILE}"
|
URL="http://samba.org/ftp/ppp/${PKG_FILE}"
|
||||||
MD5="183800762e266132218b204dfb428d29"
|
MD5="78818f40e6d33a1d1de68a1551f6595a"
|
||||||
for i in PATCH{1..10}; do
|
for i in PATCH{1..10}; do
|
||||||
unset $i
|
unset $i
|
||||||
done
|
done
|
||||||
|
|
|
@ -8,28 +8,30 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
PKG="openssl"
|
PKG="openssl"
|
||||||
PKG_VERSION="0.9.8d"
|
PKG_VERSION="1.0.2d"
|
||||||
PKG_FILE="openssl-${PKG_VERSION}.tar.gz"
|
PKG_FILE="openssl-${PKG_VERSION}.tar.gz"
|
||||||
URL="ftp://ftp.openssl.org/source/${PKG_FILE}"
|
URL="ftp://ftp.openssl.org/source/${PKG_FILE}"
|
||||||
MD5="8ed1853538e1d05a1f5ada61ebf8bffa"
|
MD5="38dd619b2e77cbac69b99f52a053d25a"
|
||||||
for i in PATCH{1..10}; do
|
for i in PATCH{1..10}; do
|
||||||
unset $i
|
unset $i
|
||||||
done
|
done
|
||||||
PATCH1=" http://www.linuxfromscratch.org/patches/blfs/svn/openssl-0.9.8d-fix_manpages-1.patch"
|
|
||||||
|
|
||||||
( cat << "xEOFx"
|
( cat << "xEOFx"
|
||||||
|
|
||||||
sed -i -e 's/mcpu/march/' config
|
./config --prefix=/usr \
|
||||||
patch -Np1 -i ../openssl-0.9.8d-fix_manpages-1.patch &&
|
--openssldir=/etc/ssl \
|
||||||
./config --openssldir=/etc/ssl --prefix=/usr shared &&
|
--libdir=lib \
|
||||||
make MANDIR=/usr/share/man
|
shared \
|
||||||
|
zlib-dynamic &&
|
||||||
make MANDIR=/usr/share/man install &&
|
make
|
||||||
cp -v -r certs /etc/ssl &&
|
|
||||||
install -v -d -m755 /usr/share/doc/openssl-0.9.8d &&
|
|
||||||
cp -v -r doc/{HOWTO,README,*.{txt,html,gif}} \
|
|
||||||
/usr/share/doc/openssl-0.9.8d
|
|
||||||
|
|
||||||
|
#sed -i 's# libcrypto.a##;s# libssl.a##' Makefile
|
||||||
|
make MANDIR=/usr/share/man MANSUFFIX=ssl install &&
|
||||||
|
install -dv -m755 /usr/share/doc/openssl-1.0.2d &&
|
||||||
|
cp -vfr doc/* /usr/share/doc/openssl-1.0.2d
|
||||||
|
|
||||||
|
#
|
||||||
|
# Note: certificates not installed by this.
|
||||||
|
#
|
||||||
xEOFx
|
xEOFx
|
||||||
) > tmp
|
) > tmp
|
||||||
|
|
|
@ -2,27 +2,33 @@
|
||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
PKG="gpm"
|
PKG="gpm"
|
||||||
PKG_VERSION="1.20.1"
|
PKG_VERSION="1.20.7"
|
||||||
PKG_FILE="gpm-${PKG_VERSION}.tar.bz2"
|
PKG_FILE="gpm-${PKG_VERSION}.tar.bz2"
|
||||||
URL="ftp://arcana.linux.it/pub/gpm/${PKG_FILE}"
|
URL="http://www.nico.schottelius.org/software/gpm/archives/${PKG_FILE}"
|
||||||
MD5="2c63e827d755527950d9d13fe3d87692"
|
MD5="bf84143905a6a903dbd4d4b911a2a2b8"
|
||||||
for i in PATCH{1..10}; do
|
for i in PATCH{1..10}; do
|
||||||
unset $i
|
unset $i
|
||||||
done
|
done
|
||||||
PATCH1=" http://www.linuxfromscratch.org/patches/blfs/svn/gpm-1.20.1-segfault-1.patch"
|
|
||||||
PATCH2=" http://www.linuxfromscratch.org/patches/blfs/svn/gpm-1.20.1-silent-1.patch"
|
|
||||||
|
|
||||||
|
|
||||||
( cat << "xEOFx"
|
( cat << "xEOFx"
|
||||||
|
|
||||||
patch -Np1 -i ../gpm-1.20.1-segfault-1.patch &&
|
./autogen.sh &&
|
||||||
patch -Np1 -i ../gpm-1.20.1-silent-1.patch &&
|
|
||||||
./configure --prefix=/usr --sysconfdir=/etc &&
|
./configure --prefix=/usr --sysconfdir=/etc &&
|
||||||
LDFLAGS="-lm" make
|
make
|
||||||
|
|
||||||
make install &&
|
make install &&
|
||||||
cp -v conf/gpm-root.conf /etc &&
|
|
||||||
ldconfig
|
install-info --dir-file=/usr/share/info/dir \
|
||||||
|
/usr/share/info/gpm.info &&
|
||||||
|
|
||||||
|
ln -sfv libgpm.so.2.1.0 /usr/lib/libgpm.so &&
|
||||||
|
install -v -m644 conf/gpm-root.conf /etc &&
|
||||||
|
|
||||||
|
install -v -m755 -d /usr/share/doc/gpm-${PKG_FILE}/support &&
|
||||||
|
install -v -m644 doc/support/* \
|
||||||
|
/usr/share/doc/gpm-${PKG_FILE}/support &&
|
||||||
|
install -v -m644 doc/{FAQ,HACK_GPM,README*} \
|
||||||
|
/usr/share/doc/gpm-${PKG_FILE}
|
||||||
|
|
||||||
# The normal cmd to install the boot script for gpm
|
# The normal cmd to install the boot script for gpm
|
||||||
# --- PUT THIS CMD INSIDE 999-blfs_bootscripts
|
# --- PUT THIS CMD INSIDE 999-blfs_bootscripts
|
||||||
|
@ -31,7 +37,7 @@ ldconfig
|
||||||
cat > /etc/sysconfig/mouse << "EOF"
|
cat > /etc/sysconfig/mouse << "EOF"
|
||||||
# Begin /etc/sysconfig/mouse
|
# Begin /etc/sysconfig/mouse
|
||||||
|
|
||||||
MDEVICE="/dev/psaux"
|
MDEVICE="/dev/input/mice"
|
||||||
PROTOCOL="imps2"
|
PROTOCOL="imps2"
|
||||||
GPMOPTS=""
|
GPMOPTS=""
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
PKG="lynx"
|
PKG="lynx"
|
||||||
PKG_VERSION="2.8.6"
|
PKG_VERSION="2.8.8rel.2"
|
||||||
PKG_FILE="lynx${PKG_VERSION}.tar.bz2"
|
PKG_FILE="lynx${PKG_VERSION}.tar.bz2"
|
||||||
URL="ftp://lynx.isc.org/lynx2.8.6/${PKG_FILE}"
|
URL="ftp://lynx.isc.org/${PKG_FILE}"
|
||||||
MD5="dc80497b7dda6a28fd80404684d27548"
|
MD5="b231c2aa34dfe7ca25681ef4e55ee7e8"
|
||||||
for i in PATCH{1..10}; do
|
for i in PATCH{1..10}; do
|
||||||
unset $i
|
unset $i
|
||||||
done
|
done
|
||||||
|
@ -17,16 +17,19 @@ done
|
||||||
|
|
||||||
./configure --prefix=/usr \
|
./configure --prefix=/usr \
|
||||||
--sysconfdir=/etc/lynx \
|
--sysconfdir=/etc/lynx \
|
||||||
--datadir=/usr/share/doc/lynx-2.8.6 \
|
--datadir=/usr/share/doc/lynx-2.8.8rel.2 \
|
||||||
--with-zlib \
|
--with-zlib \
|
||||||
--with-bzlib \
|
--with-bzlib \
|
||||||
--with-screen=ncursesw \
|
--with-screen=ncursesw \
|
||||||
--enable-locale-charset &&
|
--enable-locale-charset &&
|
||||||
|
|
||||||
make
|
make
|
||||||
|
|
||||||
make install-full &&
|
make install-full &&
|
||||||
chgrp -v -R root /usr/share/doc/lynx-2.8.6/lynx_doc
|
chgrp -v -R root /usr/share/doc/lynx-2.8.8rel.2/lynx_doc
|
||||||
|
|
||||||
|
sed -i 's/#\(LOCALE_CHARSET\):FALSE/\1:TRUE/' /etc/lynx/lynx.cfg
|
||||||
|
sed -i 's/#\(DEFAULT_EDITOR\):/\1:vi/' /etc/lynx/lynx.cfg
|
||||||
|
sed -i 's/#\(PERSISTENT_COOKIES\):FALSE/\1:TRUE/' /etc/lynx/lynx.cfg
|
||||||
|
|
||||||
xEOFx
|
xEOFx
|
||||||
) > tmp
|
) > tmp
|
||||||
|
|
31
custom/examples/964-dhcpcd
Normal file
31
custom/examples/964-dhcpcd
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# dhcpcd is an implementation of the DHCP client specified in RFC2131.
|
||||||
|
# This is useful for connecting your computer to a network which uses
|
||||||
|
# DHCP to assign network addresses.
|
||||||
|
#
|
||||||
|
|
||||||
|
PKG="dhcpcd"
|
||||||
|
PKG_VERSION="6.9.3"
|
||||||
|
PKG_FILE="dhcpcd-${PKG_VERSION}.tar.xz"
|
||||||
|
URL="http://roy.marples.name/downloads/dhcpcd/${PKG_FILE}"
|
||||||
|
MD5="8357d023c4687d27bc6ea7964236b2a6"
|
||||||
|
for i in PATCH{1..10}; do
|
||||||
|
unset $i
|
||||||
|
done
|
||||||
|
|
||||||
|
( cat << "xEOFx"
|
||||||
|
|
||||||
|
./configure --libexecdir=/lib/dhcpcd \
|
||||||
|
--dbdir=/var/lib/dhcpcd &&
|
||||||
|
make
|
||||||
|
|
||||||
|
make install
|
||||||
|
|
||||||
|
# Add the following to boot scripts.
|
||||||
|
#make install-service-dhcpcd
|
||||||
|
|
||||||
|
# more configuration?
|
||||||
|
xEOFx
|
||||||
|
) > tmp
|
|
@ -1,27 +0,0 @@
|
||||||
#
|
|
||||||
# $Id$
|
|
||||||
#
|
|
||||||
# dhcpcd is an implementation of the DHCP client specified in RFC2131.
|
|
||||||
# This is useful for connecting your computer to a network which uses
|
|
||||||
# DHCP to assign network addresses.
|
|
||||||
#
|
|
||||||
|
|
||||||
PKG="dhcpcd"
|
|
||||||
PKG_VERSION="2.0.8"
|
|
||||||
PKG_FILE="dhcpcd-${PKG_VERSION}.tar.bz2"
|
|
||||||
URL="ftp://ftp.osuosl.org/pub/gentoo/distfiles/${PKG_FILE}"
|
|
||||||
MD5="ec91c33b6d9cb46a42f9564e573fd249"
|
|
||||||
for i in PATCH{1..10}; do
|
|
||||||
unset $i
|
|
||||||
done
|
|
||||||
|
|
||||||
( cat << "xEOFx"
|
|
||||||
|
|
||||||
./configure --prefix="" --mandir=/usr/share/man &&
|
|
||||||
make
|
|
||||||
|
|
||||||
make install &&
|
|
||||||
chmod -v 754 /etc/dhcpc/dhcpcd.exe
|
|
||||||
|
|
||||||
xEOFx
|
|
||||||
) > tmp
|
|
|
@ -1,25 +0,0 @@
|
||||||
#
|
|
||||||
# $Id$
|
|
||||||
#
|
|
||||||
# Program for ejecting removable media under software control.
|
|
||||||
# Can also control the auto-eject feature of some drives and
|
|
||||||
# can be used to switch CDs on an IDE/ATAPI CD changer.
|
|
||||||
#
|
|
||||||
|
|
||||||
PKG="eject"
|
|
||||||
PKG_VERSION="2.10"
|
|
||||||
PKG_FILE="eject-${PKG_VERSION}.tar.gz"
|
|
||||||
URL="ftp://sunsite.unc.edu/pub/Linux/utils/disk-management/${PKG_FILE}"
|
|
||||||
MD5="82e3a7a4d7e3323018c6938015ff25f7"
|
|
||||||
PATCH1=""
|
|
||||||
|
|
||||||
( cat << "xEOFx"
|
|
||||||
|
|
||||||
./configure --prefix=/usr \
|
|
||||||
--enable-default-device=/dev/cdrom \
|
|
||||||
--disable-nls
|
|
||||||
make
|
|
||||||
make install
|
|
||||||
|
|
||||||
xEOFx
|
|
||||||
) > tmp
|
|
|
@ -5,29 +5,20 @@
|
||||||
# disassembler as well.
|
# disassembler as well.
|
||||||
|
|
||||||
PKG="nasm"
|
PKG="nasm"
|
||||||
PKG_VERSION="0.98.39"
|
PKG_VERSION="2.11.08"
|
||||||
PKG_FILE="nasm-${PKG_VERSION}.tar.bz2"
|
PKG_FILE="nasm-${PKG_VERSION}.tar.xz"
|
||||||
URL="http://downloads.sourceforge.net/nasm/${PKG_FILE}"
|
URL="http://www.nasm.us/pub/nasm/releasebuilds/2.11.08/${PKG_FILE}"
|
||||||
MD5="2032ad44c7359f7a9a166a40a633e772"
|
MD5="0d461a085b088a14dd6628c53be1ce28"
|
||||||
for i in PATCH{1..10}; do
|
for i in PATCH{1..10}; do
|
||||||
unset $i
|
unset $i
|
||||||
done
|
done
|
||||||
PATCH1="http://www.linuxfromscratch.org/patches/blfs/svn/nasm-0.98.39-security_fix-1.patch"
|
|
||||||
|
|
||||||
( cat << "xEOFx"
|
( cat << "xEOFx"
|
||||||
|
|
||||||
patch -Np1 -i ../nasm-0.98.39-security_fix-1.patch &&
|
|
||||||
./configure --prefix=/usr &&
|
./configure --prefix=/usr &&
|
||||||
make
|
make
|
||||||
make -C rdoff/doc
|
|
||||||
make -C rdoff/doc html
|
|
||||||
|
|
||||||
make install &&
|
make install
|
||||||
make install_rdf &&
|
|
||||||
install -v -m644 rdoff/doc/rdoff.info /usr/share/info &&
|
|
||||||
install -v -m755 -d /usr/share/doc/nasm/html &&
|
|
||||||
install -v -m644 rdoff/doc/v1-v2.txt /usr/share/doc/nasm &&
|
|
||||||
cp -v -R rdoff/doc/rdoff /usr/share/doc/nasm/html
|
|
||||||
|
|
||||||
xEOFx
|
xEOFx
|
||||||
) > tmp
|
) > tmp
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
PKG="blfs-bootscripts"
|
PKG="blfs-bootscripts"
|
||||||
PKG_VERSION="20060910"
|
PKG_VERSION="20150924"
|
||||||
PKG_FILE="blfs-bootscripts-${PKG_VERSION}.tar.bz2"
|
PKG_FILE="blfs-bootscripts-${PKG_VERSION}.tar.bz2"
|
||||||
URL="http://www.linuxfromscratch.org/blfs/downloads/svn/${PKG_FILE}"
|
URL="http://anduin.linuxfromscratch.org/sources/BLFS/conglomeration/blfs-bootscripts/${PKG_FILE}"
|
||||||
MD5="e1715c58dc694bf474c4468e6bade3ad"
|
MD5="97a371743223ac3815bf491863a39c7d"
|
||||||
for i in PATCH{1..10}; do
|
for i in PATCH{1..10}; do
|
||||||
unset $i
|
unset $i
|
||||||
done
|
done
|
||||||
|
|
|
@ -11,13 +11,17 @@ BLFS_ROOT : where the installed tools will be installed, relative to $HOME.
|
||||||
Must start with a '/' (default /blfs_root)
|
Must start with a '/' (default /blfs_root)
|
||||||
BLFS_BRANCH_ID: development, branch-xxx, xxx (where xxx is a valid tag)
|
BLFS_BRANCH_ID: development, branch-xxx, xxx (where xxx is a valid tag)
|
||||||
(default development)
|
(default development)
|
||||||
|
INITSYS : which book do you want? 'sysv' or 'systemd' (default sysv)
|
||||||
Examples:
|
Examples:
|
||||||
1 - If you plan to use the tools to build BLFS on top of LFS, but you did not
|
1 - If you plan to use the tools to build BLFS on top of LFS, but you did not
|
||||||
use jhalfs, or forgot to include the jhalfs-blfs tools:
|
use jhalfs, or forgot to include the jhalfs-blfs tools:
|
||||||
(as root) mkdir -p /var/lib/jhalfs/BLFS && chown -R <user> /var/lib/jhalfs
|
(as root) mkdir -p /var/lib/jhalfs/BLFS && chown -R <user> /var/lib/jhalfs
|
||||||
(as user) ./install-blfs-tools.sh
|
(as user) INITSYS=<your system> ./install-blfs-tools.sh
|
||||||
2 - To install with only user privileges:
|
2 - To install with only user privileges (default to sysv):
|
||||||
TRACKING_DIR=$HOME/blfs_root/trackdir ./install-blfs-tools.sh
|
TRACKING_DIR=$HOME/blfs_root/trackdir ./install-blfs-tools.sh
|
||||||
|
|
||||||
|
This script can also be called automatically after running make in this
|
||||||
|
directory. The parameters will then be taken from the configuration file.
|
||||||
inline_doc
|
inline_doc
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,19 +48,63 @@ declare -r nl_=$'\n'
|
||||||
declare -r DD_BORDER="${BOLD}==============================================================================${OFF}"
|
declare -r DD_BORDER="${BOLD}==============================================================================${OFF}"
|
||||||
declare -r SD_BORDER="${BOLD}------------------------------------------------------------------------------${OFF}"
|
declare -r SD_BORDER="${BOLD}------------------------------------------------------------------------------${OFF}"
|
||||||
declare -r STAR_BORDER="${BOLD}******************************************************************************${OFF}"
|
declare -r STAR_BORDER="${BOLD}******************************************************************************${OFF}"
|
||||||
|
declare -r dotSTR=".................." # Format display of parameters and versions
|
||||||
|
|
||||||
# bold yellow > < pair
|
# bold yellow > < pair
|
||||||
declare -r R_arrow=$'\e[1;33m>\e[0m'
|
declare -r R_arrow=$'\e[1;33m>\e[0m'
|
||||||
declare -r L_arrow=$'\e[1;33m<\e[0m'
|
declare -r L_arrow=$'\e[1;33m<\e[0m'
|
||||||
|
|
||||||
VERBOSITY=1
|
VERBOSITY=1
|
||||||
|
|
||||||
|
# Take parameters from "configuration" if $1="auto"
|
||||||
|
if [ "$1" = auto ]; then
|
||||||
|
[[ $VERBOSITY > 0 ]] && echo -n "Loading configuration ... "
|
||||||
|
source configuration
|
||||||
|
[[ $? > 0 ]] && echo -e "\nconfiguration could not be loaded" && exit 2
|
||||||
|
[[ $VERBOSITY > 0 ]] && echo "OK"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$BOOK_BLFS" = y ]; then
|
||||||
|
## Read variables and sanity checks
|
||||||
|
[[ "$relSVN" = y ]] && BLFS_BRANCH_ID=development
|
||||||
|
[[ "$BRANCH" = y ]] && BLFS_BRANCH_ID=$BRANCH_ID
|
||||||
|
[[ "$WORKING_COPY" = y ]] && BLFS_BOOK=$BOOK
|
||||||
|
[[ "$BRANCH_ID" = "**EDIT ME**" ]] &&
|
||||||
|
echo You have not set the book version or branch && exit 1
|
||||||
|
[[ "$BOOK" = "**EDIT ME**" ]] &&
|
||||||
|
echo You have not set the working copy location && exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
COMMON_DIR="common"
|
COMMON_DIR="common"
|
||||||
|
# blfs-tool envars
|
||||||
BLFS_TOOL='y'
|
BLFS_TOOL='y'
|
||||||
BUILDDIR=$(cd ~;pwd)
|
BUILDDIR=$(cd ~;pwd)
|
||||||
BLFS_ROOT="${BLFS_ROOT:=/blfs_root}"
|
BLFS_ROOT="${BLFS_ROOT:=/blfs_root}"
|
||||||
TRACKING_DIR="${TRACKING_DIR:=/var/lib/jhalfs/BLFS}"
|
TRACKING_DIR="${TRACKING_DIR:=/var/lib/jhalfs/BLFS}"
|
||||||
|
INITSYS="${INITSYS:=sysv}"
|
||||||
|
BLFS_BRANCH_ID=${BLFS_BRANCH_ID:=development}
|
||||||
|
BLFS_XML=${BLFS_XML:=blfs-xml}
|
||||||
|
|
||||||
|
# Validate the configuration:
|
||||||
|
PARAMS="BLFS_ROOT TRACKING_DIR INITSYS BLFS_XML"
|
||||||
|
if [ "$WORKING_COPY" = y ]; then
|
||||||
|
PARAMS="$PARAMS WORKING_COPY BOOK"
|
||||||
|
else
|
||||||
|
PARAMS="$PARAMS BLFS_BRANCH_ID"
|
||||||
|
fi
|
||||||
|
# Format for displaying parameters:
|
||||||
|
declare -r PARAM_VALS='${config_param}${dotSTR:${#config_param}} ${L_arrow}${BOLD}${!config_param}${OFF}${R_arrow}'
|
||||||
|
|
||||||
|
for config_param in $PARAMS; do
|
||||||
|
echo -e "`eval echo $PARAM_VALS`"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "${SD_BORDER}${nl_}"
|
||||||
|
echo -n "Are you happy with these settings? yes/no (no): "
|
||||||
|
read ANSWER
|
||||||
|
if [ x$ANSWER != "xyes" ] ; then
|
||||||
|
echo "${nl_}Rerun make and fix your settings.${nl_}"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
[[ $VERBOSITY > 0 ]] && echo "${SD_BORDER}${nl_}"
|
[[ $VERBOSITY > 0 ]] && echo "${SD_BORDER}${nl_}"
|
||||||
|
|
||||||
#*******************************************************************#
|
#*******************************************************************#
|
||||||
|
@ -67,8 +115,6 @@ source $COMMON_DIR/libs/func_check_version.sh
|
||||||
|
|
||||||
[[ $VERBOSITY > 0 ]] && echo "${SD_BORDER}${nl_}"
|
[[ $VERBOSITY > 0 ]] && echo "${SD_BORDER}${nl_}"
|
||||||
|
|
||||||
# blfs-tool envars
|
|
||||||
BLFS_BRANCH_ID=${BLFS_BRANCH_ID:=development}
|
|
||||||
case $BLFS_BRANCH_ID in
|
case $BLFS_BRANCH_ID in
|
||||||
development ) BLFS_TREE=trunk/BOOK ;;
|
development ) BLFS_TREE=trunk/BOOK ;;
|
||||||
branch-* ) BLFS_TREE=branches/${BLFS_BRANCH_ID#branch-} ;;
|
branch-* ) BLFS_TREE=branches/${BLFS_BRANCH_ID#branch-} ;;
|
||||||
|
@ -76,7 +122,6 @@ case $BLFS_BRANCH_ID in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Check for build prerequisites.
|
# Check for build prerequisites.
|
||||||
declare -r dotSTR=".................." # needed for proper display of versions
|
|
||||||
echo
|
echo
|
||||||
check_alfs_tools
|
check_alfs_tools
|
||||||
check_blfs_tools
|
check_blfs_tools
|
||||||
|
@ -85,21 +130,22 @@ echo "${SD_BORDER}${nl_}"
|
||||||
# Install the files
|
# Install the files
|
||||||
[[ $VERBOSITY > 0 ]] && echo -n Populating the ${BUILDDIR}${BLFS_ROOT} directory
|
[[ $VERBOSITY > 0 ]] && echo -n Populating the ${BUILDDIR}${BLFS_ROOT} directory
|
||||||
[[ ! -d ${BUILDDIR}${BLFS_ROOT} ]] && mkdir -pv ${BUILDDIR}${BLFS_ROOT}
|
[[ ! -d ${BUILDDIR}${BLFS_ROOT} ]] && mkdir -pv ${BUILDDIR}${BLFS_ROOT}
|
||||||
|
rm -rf ${BUILDDIR}${BLFS_ROOT}/*
|
||||||
cp -r BLFS/* ${BUILDDIR}${BLFS_ROOT}
|
cp -r BLFS/* ${BUILDDIR}${BLFS_ROOT}
|
||||||
cp -r menu ${BUILDDIR}${BLFS_ROOT}
|
cp -r menu ${BUILDDIR}${BLFS_ROOT}
|
||||||
cp $COMMON_DIR/progress_bar.sh ${BUILDDIR}${BLFS_ROOT}
|
cp $COMMON_DIR/progress_bar.sh ${BUILDDIR}${BLFS_ROOT}
|
||||||
cp README.BLFS ${BUILDDIR}${BLFS_ROOT}
|
cp README.BLFS ${BUILDDIR}${BLFS_ROOT}
|
||||||
[[ $VERBOSITY > 0 ]] && echo "... OK"
|
[[ $VERBOSITY > 0 ]] && echo "... OK"
|
||||||
[[ $VERBOSITY > 0 ]] && echo -n Cleaning the ${BUILDDIR}${BLFS_ROOT} directory
|
|
||||||
|
|
||||||
# Clean-up
|
# Clean-up
|
||||||
|
[[ $VERBOSITY > 0 ]] && echo Cleaning the ${BUILDDIR}${BLFS_ROOT} directory
|
||||||
make -C ${BUILDDIR}${BLFS_ROOT}/menu clean
|
make -C ${BUILDDIR}${BLFS_ROOT}/menu clean
|
||||||
rm -rf ${BUILDDIR}${BLFS_ROOT}/libs/.svn
|
rm -rf ${BUILDDIR}${BLFS_ROOT}/libs/.svn
|
||||||
rm -rf ${BUILDDIR}${BLFS_ROOT}/xsl/.svn
|
rm -rf ${BUILDDIR}${BLFS_ROOT}/xsl/.svn
|
||||||
rm -rf ${BUILDDIR}${BLFS_ROOT}/menu/.svn
|
rm -rf ${BUILDDIR}${BLFS_ROOT}/menu/.svn
|
||||||
rm -rf ${BUILDDIR}${BLFS_ROOT}/menu/lxdialog/.svn
|
rm -rf ${BUILDDIR}${BLFS_ROOT}/menu/lxdialog/.svn
|
||||||
# We do not want to keep an old version of the book:
|
# We do not want to keep an old version of the book:
|
||||||
rm -rf ${BUILDDIR}${BLFS_ROOT}/blfs-xml
|
rm -rf ${BUILDDIR}${BLFS_ROOT}/$BLFS_XML
|
||||||
|
|
||||||
# Set some harcoded envars to their proper values
|
# Set some harcoded envars to their proper values
|
||||||
sed -i s@tracking-dir@$TRACKING_DIR@ \
|
sed -i s@tracking-dir@$TRACKING_DIR@ \
|
||||||
|
@ -112,9 +158,17 @@ sed -i s@tracking-dir@$TRACKING_DIR@ \
|
||||||
mkdir -p $TRACKING_DIR
|
mkdir -p $TRACKING_DIR
|
||||||
[[ $VERBOSITY > 0 ]] && echo "... OK"
|
[[ $VERBOSITY > 0 ]] && echo "... OK"
|
||||||
|
|
||||||
[[ $VERBOSITY > 0 ]] && echo -n "Downloading and validating the book (may take some time)"
|
[[ $VERBOSITY > 0 ]] &&
|
||||||
|
echo "Retrieving and validating the book (may take some time)"
|
||||||
|
|
||||||
|
[[ -z "$BLFS_BOOK" ]] ||
|
||||||
|
[[ $BLFS_BOOK = $BUILDDIR$BLFS_ROOT/$BLFS_XML ]] ||
|
||||||
|
cp -a $BLFS_BOOK $BUILDDIR$BLFS_ROOT/$BLFS_XML
|
||||||
|
|
||||||
make -j1 -C $BUILDDIR$BLFS_ROOT \
|
make -j1 -C $BUILDDIR$BLFS_ROOT \
|
||||||
TRACKING_DIR=$TRACKING_DIR \
|
TRACKING_DIR=$TRACKING_DIR \
|
||||||
|
REV=$INITSYS \
|
||||||
|
BLFS_XML=$BUILDDIR$BLFS_ROOT/$BLFS_XML \
|
||||||
SVN=svn://svn.linuxfromscratch.org/BLFS/$BLFS_TREE \
|
SVN=svn://svn.linuxfromscratch.org/BLFS/$BLFS_TREE \
|
||||||
$BUILDDIR$BLFS_ROOT/packages.xml
|
$BUILDDIR$BLFS_ROOT/packages.xml
|
||||||
[[ $VERBOSITY > 0 ]] && echo "... OK"
|
[[ $VERBOSITY > 0 ]] && echo "... OK"
|
||||||
|
|
23
jhalfs
23
jhalfs
|
@ -50,7 +50,7 @@ simple_error() { # Basic error trap.... JUST DIE
|
||||||
}
|
}
|
||||||
|
|
||||||
see_ya() {
|
see_ya() {
|
||||||
echo -e "\n${L_arrow}${BOLD}jhalfs-trunk${R_arrow} exit${OFF}\n"
|
echo -e "\n${L_arrow}${BOLD}jhalfs${R_arrow} exit${OFF}\n"
|
||||||
}
|
}
|
||||||
##### Simple error TRAPS
|
##### Simple error TRAPS
|
||||||
# ctrl-c SIGINT
|
# ctrl-c SIGINT
|
||||||
|
@ -70,20 +70,21 @@ trap 'echo -e "\n\n${RED}INTERRUPT${OFF} trapped\n" && exit 2' 1 2 3 15 17 18
|
||||||
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||||
|
|
||||||
version="
|
version="
|
||||||
${BOLD} \"jhalfs-trunk\"${OFF} builder tool (development) \$Rev$
|
${BOLD} \"jhalfs\"${OFF} builder tool (development) \$Rev$
|
||||||
\$Date$
|
\$Date$
|
||||||
|
|
||||||
Written by George Boudreau and Manuel Canales Esparcia,
|
Written by George Boudreau, Manuel Canales Esparcia, Pierre Labastie,
|
||||||
plus several contributions.
|
plus several contributions.
|
||||||
|
|
||||||
Based on an idea from Jeremy Huntwork
|
Based on an idea from Jeremy Huntwork
|
||||||
|
|
||||||
This set of files are published under the
|
This set of files are published under the
|
||||||
${BOLD}Gnu General Public License, Version 2.${OFF}
|
${BOLD}Gnu General Public License, Version 2.${OFF}
|
||||||
|
See the ${BOLD}LICENCE${OFF} file in this directory.
|
||||||
"
|
"
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
-v ) echo "$version" && exit 1 ;;
|
-v ) echo "$version" && exit ;;
|
||||||
run ) : ;;
|
run ) : ;;
|
||||||
* )
|
* )
|
||||||
echo "${nl_}${tab_}${BOLD}${RED}This script cannot be called directly: EXITING ${OFF}${nl_}"
|
echo "${nl_}${tab_}${BOLD}${RED}This script cannot be called directly: EXITING ${OFF}${nl_}"
|
||||||
|
@ -123,6 +124,7 @@ COMPARE=${COMPARE:-n}
|
||||||
RUN_FARCE=${RUN_FARCE:-n}
|
RUN_FARCE=${RUN_FARCE:-n}
|
||||||
RUN_ICA=${RUN_ICA:-n}
|
RUN_ICA=${RUN_ICA:-n}
|
||||||
PKGMNGT=${PKGMNGT:-n}
|
PKGMNGT=${PKGMNGT:-n}
|
||||||
|
WRAP_INSTALL=${WRAP_INSTALL:-n}
|
||||||
BOMB_TEST=${BOMB_TEST:-n}
|
BOMB_TEST=${BOMB_TEST:-n}
|
||||||
STRIP=${STRIP:=n}
|
STRIP=${STRIP:=n}
|
||||||
REPORT=${REPORT:=n}
|
REPORT=${REPORT:=n}
|
||||||
|
@ -140,6 +142,7 @@ SET_HARDENED_TMP=${SET_HARDENED_TMP:=n}
|
||||||
SET_WARNINGS=${SET_WARNINGS:=n}
|
SET_WARNINGS=${SET_WARNINGS:=n}
|
||||||
SET_MISC=${SET_MISC:=n}
|
SET_MISC=${SET_MISC:=n}
|
||||||
SET_BLOWFISH=${SET_BLOWFISH:=n}
|
SET_BLOWFISH=${SET_BLOWFISH:=n}
|
||||||
|
UNICODE=${UNICODE:=n}
|
||||||
|
|
||||||
if [[ "${NO_PROGRESS_BAR}" = "y" ]] ; then
|
if [[ "${NO_PROGRESS_BAR}" = "y" ]] ; then
|
||||||
NO_PROGRESS="#"
|
NO_PROGRESS="#"
|
||||||
|
@ -382,9 +385,10 @@ if [[ "$REBUILD_MAKEFILE" = "n" ]] ; then
|
||||||
#
|
#
|
||||||
|
|
||||||
# Copy packageManager.xml, if needed
|
# Copy packageManager.xml, if needed
|
||||||
[[ "$PKGMNGT" = "y" ]] && [[ "$PROGNAME" = "lfs" ]] &&
|
[[ "$PKGMNGT" = "y" ]] && [[ "$PROGNAME" = "lfs" ]] && {
|
||||||
cp $PKGMNGTDIR/packageManager.xml $JHALFSDIR/ &&
|
cp $PKGMNGTDIR/packageManager.xml $JHALFSDIR/
|
||||||
cp $PKGMNGTDIR/packInstall.sh $JHALFSDIR/
|
cp $PKGMNGTDIR/packInstall.sh $JHALFSDIR/
|
||||||
|
}
|
||||||
#
|
#
|
||||||
# Copy urls.xsl, if needed
|
# Copy urls.xsl, if needed
|
||||||
[[ "$GETPKG" = "y" ]] && cp $COMMON_DIR/urls.xsl $JHALFSDIR/
|
[[ "$GETPKG" = "y" ]] && cp $COMMON_DIR/urls.xsl $JHALFSDIR/
|
||||||
|
@ -440,6 +444,13 @@ if [[ "$REBUILD_MAKEFILE" = "y" ]] ; then
|
||||||
case $PROGNAME in
|
case $PROGNAME in
|
||||||
clfs* )
|
clfs* )
|
||||||
VERSION=$(xmllint --noent $JHALFSDIR/$BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
VERSION=$(xmllint --noent $JHALFSDIR/$BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
||||||
|
lfs)
|
||||||
|
if [[ "$INITSYS" = "sysv" ]] ; then
|
||||||
|
VERSION=$(grep 'ENTITY version ' $JHALFSDIR/$BOOK/general.ent| cut -d\" -f2)
|
||||||
|
else
|
||||||
|
VERSION=$(grep 'ENTITY versiond' $JHALFSDIR/$BOOK/general.ent| cut -d\" -f2)
|
||||||
|
fi
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
VERSION=$(xmllint --noent $JHALFSDIR/$BOOK/prologue/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
VERSION=$(xmllint --noent $JHALFSDIR/$BOOK/prologue/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
||||||
esac
|
esac
|
||||||
|
|
12
menu/mconf.c
12
menu/mconf.c
|
@ -473,7 +473,8 @@ static void build_conf(struct menu *menu)
|
||||||
struct symbol *sym;
|
struct symbol *sym;
|
||||||
struct property *prop;
|
struct property *prop;
|
||||||
struct menu *child;
|
struct menu *child;
|
||||||
int type, tmp, doint = 2;
|
/* int type, tmp, doint = 2; */
|
||||||
|
int type, doint = 2;
|
||||||
tristate val;
|
tristate val;
|
||||||
char ch;
|
char ch;
|
||||||
|
|
||||||
|
@ -595,11 +596,14 @@ static void build_conf(struct menu *menu)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
cprint_tag("s%p", menu);
|
cprint_tag("s%p", menu);
|
||||||
tmp = cprint_name("(%s)", sym_get_string_value(sym));
|
/* tmp = cprint_name("(%s)", sym_get_string_value(sym));
|
||||||
tmp = indent - tmp + 4;
|
tmp = indent - tmp + 4;
|
||||||
if (tmp < 0)
|
if (tmp < 0)
|
||||||
tmp = 0;
|
tmp = 0; */
|
||||||
cprint_name("%*c%s%s", tmp, ' ', menu_get_prompt(menu),
|
cprint_name(" %*c%s (%s)%s",
|
||||||
|
indent+1, ' ',
|
||||||
|
menu_get_prompt(menu),
|
||||||
|
sym_get_string_value(sym),
|
||||||
(sym_has_value(sym) || !sym_is_changable(sym)) ?
|
(sym_has_value(sym) || !sym_is_changable(sym)) ?
|
||||||
"" : " (NEW)");
|
"" : " (NEW)");
|
||||||
goto conf_childs;
|
goto conf_childs;
|
||||||
|
|
104
pkgmngt/packInstall.sh.porg
Normal file
104
pkgmngt/packInstall.sh.porg
Normal file
|
@ -0,0 +1,104 @@
|
||||||
|
# $Id:$
|
||||||
|
# functions for recording installation of a package and make a tarball,
|
||||||
|
# or using fakeroot type commands for install, then packing and installing
|
||||||
|
# the package.
|
||||||
|
# We only have access to variables PKGDIR and PKG_DEST. Other variables could
|
||||||
|
# be set in the environment
|
||||||
|
|
||||||
|
extract_version() {
|
||||||
|
local VERSION
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
expect*|tcl*|tk*|mozjs*)
|
||||||
|
VERSION=$(echo $1 | sed 's/^[^0-9]*//')
|
||||||
|
;;
|
||||||
|
vim*|unzip*|zip*)
|
||||||
|
VERSION=$(echo $1 | sed 's/^[^0-9]*\([0-9]\)\([0-9]\)/\1.\2/')
|
||||||
|
;;
|
||||||
|
wireless_tools*|LVM2*)
|
||||||
|
VERSION=$(echo $1 | sed 's/^[^.]*\.//')
|
||||||
|
;;
|
||||||
|
x264*)
|
||||||
|
VERSION=$(echo $1 | sed 's/.*shot-//')
|
||||||
|
;;
|
||||||
|
icu*) # No version in PCKGVRS! Use version directly from xml book.
|
||||||
|
# PACK_INSTALL contains the path to this script, which is in the
|
||||||
|
# parent dir of the book.
|
||||||
|
local PACKENT=$(dirname $PACK_INSTALL)/blfs-xml/packages.ent
|
||||||
|
local VERSION1=$(sed -n 's/.*icu-major[^0-9]*\([^"]*\).*/\1/p' $PACKENT)
|
||||||
|
local VERSION2=$(sed -n 's/.*icu-minor[^0-9]*\([^"]*\).*/\1/p' $PACKENT)
|
||||||
|
VERSION=$VERSION1.$VERSION2
|
||||||
|
;;
|
||||||
|
soundtouch*)
|
||||||
|
local PACKENT=$(dirname $PACK_INSTALL)/blfs-xml/packages.ent
|
||||||
|
VERSION=$(sed -n 's/.*soundtouch[^0-9]*\([^"]*\).*/\1/p' $PACKENT)
|
||||||
|
;;
|
||||||
|
xf86-video-intel)
|
||||||
|
local PACKENT=$(dirname $PACK_INSTALL)/blfs-xml/x/installing/x7driver-intel.xml
|
||||||
|
VERSION=$(sed -n '/<!--/!s/.*-version[^;][^0-9]*\([^"]*\).*/\1/p' $PACKENT)
|
||||||
|
;;
|
||||||
|
jdk8*)
|
||||||
|
VERSION=1.8.0.$(echo $1 | sed 's/.*u\([0-9]\+\).*/\1/')
|
||||||
|
;;
|
||||||
|
docbook-xml)
|
||||||
|
VERSION=4.5
|
||||||
|
;;
|
||||||
|
cacerts*)
|
||||||
|
VERSION=0.1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
VERSION=$(echo $1 | sed 's/^.*[-_]\([0-9]\)/\1/' | sed 's/_/./g')
|
||||||
|
;;
|
||||||
|
# the last sed above is because some package managers do not want a '_'
|
||||||
|
# in version.
|
||||||
|
esac
|
||||||
|
echo ${VERSION,,} # convert to lowercase, in case there is a capital letter
|
||||||
|
# in version
|
||||||
|
}
|
||||||
|
|
||||||
|
# Export the previous function, since it is used by the others
|
||||||
|
export -f extract_version
|
||||||
|
# The other "official" functions, wrapInstall and packInstall, are exported
|
||||||
|
# by "envars" (in LFS), and the scripts (in BLFS).
|
||||||
|
|
||||||
|
wrapInstall() {
|
||||||
|
# a bash command is passed as an argument (that may be a compound command).
|
||||||
|
# It is executed by this function, after various set-ups...
|
||||||
|
|
||||||
|
# Note that PKGDIR is changed to UNPACKDIR
|
||||||
|
# and PKG_DEST is changed to PKG_DIR in BLFS tools.
|
||||||
|
# The sed for PACKAGE is therefore not needed in BLFS,
|
||||||
|
# but it does not hurt, either.
|
||||||
|
local PCKGVRS=$(basename $PKGDIR)
|
||||||
|
local TGTPKG=$(basename $PKG_DEST)
|
||||||
|
local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3\}-//' |
|
||||||
|
sed 's/^[0-9]\{1\}-//')
|
||||||
|
# Porg converts package names to lowercase anyway, so do the conversion
|
||||||
|
# ourselves
|
||||||
|
PACKAGE=${PACKAGE,,}
|
||||||
|
# version is only accessible from PKGDIR name. Since the format of the
|
||||||
|
# name is not normalized, several hacks are necessary (now in function
|
||||||
|
# extract_version)...
|
||||||
|
VERSION=$(extract_version $PCKGVRS)
|
||||||
|
porg -lp ${PACKAGE}-${VERSION} sh << PORG_EOF
|
||||||
|
$*
|
||||||
|
PORG_EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
#----------------
|
||||||
|
packInstall() {
|
||||||
|
|
||||||
|
# With porg, we need only the package name to make the tarball
|
||||||
|
local TGTPKG=$(basename $PKG_DEST)
|
||||||
|
local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3\}-//' |
|
||||||
|
sed 's/^[0-9]\{1\}-//')
|
||||||
|
local PCKGVRS=$(basename $PKGDIR)
|
||||||
|
# Porg converts package names to lowercase anyway, so do the conversion
|
||||||
|
# ourselves
|
||||||
|
PACKAGE=${PACKAGE,,}
|
||||||
|
# Building the binary package
|
||||||
|
porgball ${PACKAGE}
|
||||||
|
# The package is in the current directory
|
||||||
|
VERSION=$(extract_version $PCKGVRS)
|
||||||
|
mv -v ${PACKAGE}-${VERSION}.porg* /var/lib/packages
|
||||||
|
}
|
|
@ -31,7 +31,7 @@ esac
|
||||||
pushd $PKG_DEST
|
pushd $PKG_DEST
|
||||||
rm -fv ./usr/share/info/dir # recommended since this directory is already there
|
rm -fv ./usr/share/info/dir # recommended since this directory is already there
|
||||||
# on the system
|
# on the system
|
||||||
# The next lines are specific to dpkg, but usually all pacakge managers
|
# The next lines are specific to dpkg, but usually all package managers
|
||||||
# need some information on the version and the package.
|
# need some information on the version and the package.
|
||||||
mkdir DEBIAN
|
mkdir DEBIAN
|
||||||
cat > DEBIAN/control <<EOF
|
cat > DEBIAN/control <<EOF
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
<!ENTITY before "Must be installed before">
|
<!ENTITY before "Must be installed before">
|
||||||
<!ENTITY external "Optional dependencies">
|
<!ENTITY external "Optional dependencies">
|
||||||
<!ENTITY debian-pool "http://ftp2.fr.debian.org/debian/pool/main/">
|
<!ENTITY debian-pool "http://ftp2.fr.debian.org/debian/pool/main/">
|
||||||
<!ENTITY dpkg-version "1.18.3">
|
<!ENTITY dpkg-version "1.18.23">
|
||||||
<!ENTITY dpkg-size "4,258 KB">
|
<!ENTITY dpkg-size "4,411 KB">
|
||||||
<!ENTITY dpkg-url "&debian-pool;d/dpkg/dpkg_&dpkg-version;.tar.xz">
|
<!ENTITY dpkg-url "&debian-pool;d/dpkg/dpkg_&dpkg-version;.tar.xz">
|
||||||
<!ENTITY dpkg-md5 "a5ca138121cc37c8fb0083462a3b4d47">
|
<!ENTITY dpkg-md5 "2195338c1792b0678575309a099d2da8">
|
||||||
<!ENTITY dpkg-home "http://wiki.debian.org/Teams/Dpkg">
|
<!ENTITY dpkg-home "http://wiki.debian.org/Teams/Dpkg">
|
||||||
<!ENTITY dpkg-ch5-du "56 MB">
|
<!ENTITY dpkg-ch5-du "56 MB">
|
||||||
<!ENTITY dpkg-ch5-sbu "0.2 SBU">
|
<!ENTITY dpkg-ch5-sbu "0.2 SBU">
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
--disable-nls --disable-dselect \
|
--disable-nls --disable-dselect \
|
||||||
--disable-start-stop-daemon \
|
--disable-start-stop-daemon \
|
||||||
--disable-update-alternatives \
|
--disable-update-alternatives \
|
||||||
--without-zlib --with-liblzma=static --without-selinux</userinput></screen>
|
--without-zlib --with-liblzma=static --without-libselinux</userinput></screen>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<title>The meaning of the configure options:</title>
|
<title>The meaning of the configure options:</title>
|
||||||
|
@ -157,10 +157,10 @@
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><parameter>--without-selinux</parameter></term>
|
<term><parameter>--without-libselinux</parameter></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Disable building for <application>selinux</application>, which
|
<para>Disable building for <application>selinux</application>, which
|
||||||
is not used woth LFS/BLFS.</para>
|
is not used with LFS/BLFS.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ touch /var/log/dpkg.log</userinput></screen>
|
||||||
--disable-dselect \
|
--disable-dselect \
|
||||||
--disable-start-stop-daemon \
|
--disable-start-stop-daemon \
|
||||||
--disable-update-alternatives \
|
--disable-update-alternatives \
|
||||||
--without-selinux</userinput></screen>
|
--without-libselinux</userinput></screen>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<title>The meaning of the configure options:</title>
|
<title>The meaning of the configure options:</title>
|
||||||
|
@ -304,7 +304,7 @@ touch /var/log/dpkg.log</userinput></screen>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><parameter>--without-selinux</parameter></term>
|
<term><parameter>--without-libselinux</parameter></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Selinux is not used in LFS.</para>
|
<para>Selinux is not used in LFS.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
|
@ -22,7 +22,7 @@ Do not change anything, except the url and the md5 checksum. -->
|
||||||
<para>MD5 sum: <literal>e9aa6dec29920eba8ef706ea5823bad7</literal></para>
|
<para>MD5 sum: <literal>e9aa6dec29920eba8ef706ea5823bad7</literal></para>
|
||||||
<para>Download: <ulink url="http://www.libarchive.org/downloads/libarchive-3.1.2.tar.gz"/></para>
|
<para>Download: <ulink url="http://www.libarchive.org/downloads/libarchive-3.1.2.tar.gz"/></para>
|
||||||
<para>MD5 sum: <literal>efad5a503f66329bb9d2f4308b5de98a</literal></para>
|
<para>MD5 sum: <literal>efad5a503f66329bb9d2f4308b5de98a</literal></para>
|
||||||
<para>Download: <ulink url="ftp://ftp.archlinux.org/other/pacman/pacman-4.1.2.tar.gz"/></para>
|
<para>Download: <ulink url="https://sources.archlinux.org/other/pacman/pacman-4.1.2.tar.gz"/></para>
|
||||||
<para>MD5 sum: <literal>063c8b0ff6bdf903dc235445525627cd</literal></para>
|
<para>MD5 sum: <literal>063c8b0ff6bdf903dc235445525627cd</literal></para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ instruction contains file="name.html" -->
|
||||||
<sect2 role="installation">
|
<sect2 role="installation">
|
||||||
<screen><userinput remap="configure">./configure --prefix=/tools \
|
<screen><userinput remap="configure">./configure --prefix=/tools \
|
||||||
--without-bz2lib \
|
--without-bz2lib \
|
||||||
|
--without-xml2 \
|
||||||
--enable-bsdtar=static \
|
--enable-bsdtar=static \
|
||||||
--enable-bsdcpio=static</userinput></screen>
|
--enable-bsdcpio=static</userinput></screen>
|
||||||
<screen><userinput remap="make">make</userinput></screen>
|
<screen><userinput remap="make">make</userinput></screen>
|
||||||
|
@ -75,6 +76,7 @@ put line breaks before and after your instructions. <userinput> without
|
||||||
remap attribute are considered configuration instructions and executed last. You
|
remap attribute are considered configuration instructions and executed last. You
|
||||||
can also use remap="adjust" for the same purpose. -->
|
can also use remap="adjust" for the same purpose. -->
|
||||||
<screen><userinput remap="configure">./configure --prefix=/tools \
|
<screen><userinput remap="configure">./configure --prefix=/tools \
|
||||||
|
--without-openssl \
|
||||||
PKG_CONFIG_PATH=/tools/lib/pkgconfig \
|
PKG_CONFIG_PATH=/tools/lib/pkgconfig \
|
||||||
DUPATH=/tools/bin/du</userinput></screen>
|
DUPATH=/tools/bin/du</userinput></screen>
|
||||||
|
|
||||||
|
|
80
pkgmngt/packageManager.xml.porg
Normal file
80
pkgmngt/packageManager.xml.porg
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||||
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" >
|
||||||
|
|
||||||
|
<article>
|
||||||
|
|
||||||
|
<sect1 id="package">
|
||||||
|
<title>Package Information</title>
|
||||||
|
<para>Download: <ulink url="https://sourceforge.net/projects/porg/files/porg-0.10.tar.gz"/></para>
|
||||||
|
<para>MD5 sum: <literal>2eceb8a73bb188dbb06b12d90cabdbb4</literal></para>
|
||||||
|
</sect1>
|
||||||
|
|
||||||
|
<sect1 id="ch-tools-pkgmngt" role="wrap">
|
||||||
|
<?dbhtml filename="porg.html"?>
|
||||||
|
<title>Porg in tools</title>
|
||||||
|
<sect2 role="installation">
|
||||||
|
<title>Instructions</title>
|
||||||
|
<screen><userinput remap="configure">./configure --prefix=/tools \
|
||||||
|
--disable-grop \
|
||||||
|
--with-porg-logdir=/tools/var/porg</userinput></screen>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<parameter>--disable-grop</parameter> is needed to prevent the sytem from
|
||||||
|
trying to build the graphical interface, and
|
||||||
|
<parameter>--with-porg-logdir=...</parameter> is needed because
|
||||||
|
<command>make install</command> insists on creating a directory in
|
||||||
|
<filename class="directory">/var</filename>, where we do not want
|
||||||
|
to write.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<screen><userinput remap="make">make</userinput></screen>
|
||||||
|
|
||||||
|
<screen><userinput remap="install">make install</userinput></screen>
|
||||||
|
|
||||||
|
<screen><userinput>cat >> /tools/etc/porgrc << EOF
|
||||||
|
# Porg logdir on LFS system
|
||||||
|
LOGDIR=/var/lib/porg
|
||||||
|
EOF
|
||||||
|
sed -e '/EXCLUDE/{s/^#//;s@$@:/sources:/home@}' \
|
||||||
|
-i /tools/etc/porgrc</userinput></screen>
|
||||||
|
|
||||||
|
</sect2>
|
||||||
|
|
||||||
|
</sect1>
|
||||||
|
|
||||||
|
<sect1 id="ch-pkgmngt-creatingdirs">
|
||||||
|
|
||||||
|
<title>Directories</title>
|
||||||
|
<screen><userinput>mkdir -pv /var/lib/porg
|
||||||
|
mkdir -pv /var/lib/packages</userinput></screen>
|
||||||
|
|
||||||
|
</sect1>
|
||||||
|
<sect1 id="ch-pkgmngt-createfiles">
|
||||||
|
<title>Files</title>
|
||||||
|
<para><command>porgball</command> needs <filename>porgrc</filename>
|
||||||
|
in <filename class="directory">/etc</filename>:</para>
|
||||||
|
<screen><userinput>cp /tools/etc/porgrc /etc</userinput></screen>
|
||||||
|
</sect1>
|
||||||
|
|
||||||
|
<sect1 id="ch-system-pkgmngt" role="wrap">
|
||||||
|
<?dbhtml filename="porg.html"?>
|
||||||
|
<title>Final Porg</title>
|
||||||
|
<sect2 role="installation">
|
||||||
|
<title>Instructions</title>
|
||||||
|
|
||||||
|
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||||
|
--disable-grop \
|
||||||
|
--sysconfdir=/etc \
|
||||||
|
--with-porg-logdir=/var/lib/porg</userinput></screen>
|
||||||
|
|
||||||
|
<screen><userinput remap="make">make</userinput></screen>
|
||||||
|
|
||||||
|
<screen><userinput remap="install">porg -lD "make install"</userinput></screen>
|
||||||
|
|
||||||
|
<screen><userinput>sed -e '/EXCLUDE/{s/^#//;s@$@:/sources:/home@}' \
|
||||||
|
-i /etc/porgrc</userinput></screen>
|
||||||
|
</sect2>
|
||||||
|
|
||||||
|
</sect1>
|
||||||
|
</article>
|
Reference in a new issue