Merge remote-tracking branch 'upstream/trunk' into mihari-dev
This commit is contained in:
commit
41e5e3f5d8
25 changed files with 745 additions and 319 deletions
|
@ -116,7 +116,7 @@ EOF
|
||||||
# So we have to read that command too, since it may be assumed
|
# So we have to read that command too, since it may be assumed
|
||||||
# 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\|#' |
|
||||||
awk '{ print $NF }' | 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
|
||||||
|
@ -169,6 +169,24 @@ EOF
|
||||||
cat >>$SPECIAL_FILE << EOF
|
cat >>$SPECIAL_FILE << EOF
|
||||||
<!-- End dependencies -->
|
<!-- End dependencies -->
|
||||||
</module>
|
</module>
|
||||||
|
EOF
|
||||||
|
# cat >> tmpfile << EOF
|
||||||
|
# <xsl:element name="dependency">
|
||||||
|
# <xsl:attribute name="status">
|
||||||
|
# <xsl:value-of select="\$status"/>
|
||||||
|
# </xsl:attribute>
|
||||||
|
# <xsl:attribute name="build">
|
||||||
|
# <xsl:value-of select="\$build"/>
|
||||||
|
# </xsl:attribute>
|
||||||
|
# <xsl:attribute name="name">$packname</xsl:attribute>
|
||||||
|
# <xsl:attribute name="type">ref</xsl:attribute>
|
||||||
|
# </xsl:element>
|
||||||
|
#EOF
|
||||||
|
precpack=$packname
|
||||||
|
done
|
||||||
|
cat >>$SPECIAL_FILE << EOF
|
||||||
|
</package>
|
||||||
|
</xsl:when>
|
||||||
EOF
|
EOF
|
||||||
cat >> tmpfile << EOF
|
cat >> tmpfile << EOF
|
||||||
<xsl:element name="dependency">
|
<xsl:element name="dependency">
|
||||||
|
@ -181,13 +199,6 @@ EOF
|
||||||
<xsl:attribute name="name">$packname</xsl:attribute>
|
<xsl:attribute name="name">$packname</xsl:attribute>
|
||||||
<xsl:attribute name="type">ref</xsl:attribute>
|
<xsl:attribute name="type">ref</xsl:attribute>
|
||||||
</xsl:element>
|
</xsl:element>
|
||||||
EOF
|
|
||||||
done
|
|
||||||
cat >>$SPECIAL_FILE << EOF
|
|
||||||
</package>
|
|
||||||
</xsl:when>
|
|
||||||
EOF
|
|
||||||
cat >> tmpfile << EOF
|
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
EOF
|
EOF
|
||||||
done
|
done
|
||||||
|
|
|
@ -28,6 +28,7 @@ declare BookXml="${TOPDIR}/book.xml"
|
||||||
declare MakeBook="${TOPDIR}/xsl/make_book.xsl"
|
declare MakeBook="${TOPDIR}/xsl/make_book.xsl"
|
||||||
declare GetVersion="${TOPDIR}/xsl/get_version.xsl"
|
declare GetVersion="${TOPDIR}/xsl/get_version.xsl"
|
||||||
declare MakeScripts="${TOPDIR}/xsl/scripts.xsl"
|
declare MakeScripts="${TOPDIR}/xsl/scripts.xsl"
|
||||||
|
declare ListLFS="${TOPDIR}/xsl/list_lfs.xsl"
|
||||||
declare BookHtml="${TOPDIR}/book-html"
|
declare BookHtml="${TOPDIR}/book-html"
|
||||||
declare BLFS_XML="${TOPDIR}/blfs-xml"
|
declare BLFS_XML="${TOPDIR}/blfs-xml"
|
||||||
declare -a TARGET
|
declare -a TARGET
|
||||||
|
@ -38,6 +39,7 @@ declare WRAP_INSTALL
|
||||||
declare PACK_INSTALL
|
declare PACK_INSTALL
|
||||||
declare DEL_LA_FILES
|
declare DEL_LA_FILES
|
||||||
declare STATS
|
declare STATS
|
||||||
|
declare DEP_CHECK
|
||||||
declare SRC_ARCHIVE
|
declare SRC_ARCHIVE
|
||||||
declare SRC_SUBDIRS
|
declare SRC_SUBDIRS
|
||||||
declare BUILD_ROOT
|
declare BUILD_ROOT
|
||||||
|
@ -69,6 +71,7 @@ parse_configuration() { #
|
||||||
PACK_INSTALL=* | \
|
PACK_INSTALL=* | \
|
||||||
DEL_LA_FILES=* | \
|
DEL_LA_FILES=* | \
|
||||||
STATS=* | \
|
STATS=* | \
|
||||||
|
DEP_CHECK=* | \
|
||||||
LANGUAGE=* | \
|
LANGUAGE=* | \
|
||||||
SUDO=* | \
|
SUDO=* | \
|
||||||
SRC_ARCHIVE=* | \
|
SRC_ARCHIVE=* | \
|
||||||
|
@ -108,7 +111,7 @@ parse_configuration() { #
|
||||||
validate_configuration() { #
|
validate_configuration() { #
|
||||||
#--------------------------#
|
#--------------------------#
|
||||||
local -r dotSTR=".................."
|
local -r dotSTR=".................."
|
||||||
local -r PARAM_LIST="DEP_LEVEL SUDO LANGUAGE MAIL_SERVER WRAP_INSTALL PACK_INSTALL DEL_LA_FILES STATS SRC_ARCHIVE SRC_SUBDIRS BUILD_ROOT BUILD_SUBDIRS KEEP_FILES JOBS CFG_CFLAGS CFG_CXXFLAGS CFG_LDFLAGS"
|
local -r PARAM_LIST="DEP_LEVEL SUDO LANGUAGE MAIL_SERVER WRAP_INSTALL PACK_INSTALL DEL_LA_FILES STATS DEP_CHECK SRC_ARCHIVE SRC_SUBDIRS BUILD_ROOT BUILD_SUBDIRS KEEP_FILES JOBS CFG_CFLAGS CFG_CXXFLAGS CFG_LDFLAGS"
|
||||||
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
|
||||||
|
@ -294,4 +297,50 @@ xsltproc --xinclude --nonet \
|
||||||
chmod -R +x scripts
|
chmod -R +x scripts
|
||||||
echo -e "done\n"
|
echo -e "done\n"
|
||||||
|
|
||||||
|
if [ -n "$DEP_CHECK" ]; then
|
||||||
|
if (( ${#TARGET[*]} != 1 )); then
|
||||||
|
printf "\nWARNING: If dependencies are checked, only one package\n"
|
||||||
|
printf " shoud be selected. Not generating check code.\n"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
LIST_LFS="$(xsltproc $ListLFS $LFS_FULL)"
|
||||||
|
LIST_NEEDED="$(echo $FULL_LIST)"
|
||||||
|
LIST_INSTALLED="$(porg -a | sed 's/-[[:digit:]].*//')"
|
||||||
|
LIST_UNNEEDED=
|
||||||
|
for p in $LIST_INSTALLED; do
|
||||||
|
case " $LIST_LFS " in *" $p "*) continue ;; esac
|
||||||
|
case " $LIST_NEEDED " in *" $p "*) continue ;; esac
|
||||||
|
LIST_UNNEEDED="$LIST_UNNEEDED $p"
|
||||||
|
done
|
||||||
|
cat >head.tmp <<EOF
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Remove all unneeded packages
|
||||||
|
VERSIONED_LIST=
|
||||||
|
for p in $LIST_UNNEEDED; do
|
||||||
|
VERSIONED_LIST="\$VERSIONED_LIST \$(porg \$p)"
|
||||||
|
sudo porg -rb \$p
|
||||||
|
done
|
||||||
|
|
||||||
|
# Function to restore packages
|
||||||
|
restore_pack () {
|
||||||
|
for p in \$VERSIONED_LIST; do
|
||||||
|
sudo porgball -e -l /var/lib/packages/\${p}.porg.tar.gz
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
trap restore_pack ERR
|
||||||
|
|
||||||
|
EOF
|
||||||
|
cat >tail.tmp <<EOF
|
||||||
|
restore_pack
|
||||||
|
exit
|
||||||
|
EOF
|
||||||
|
|
||||||
|
sed -e "1,2d" -e '$d' scripts/*${TARGET} >script.tmp
|
||||||
|
cat head.tmp script.tmp tail.tmp >scripts/*${TARGET}
|
||||||
|
rm *.tmp
|
||||||
|
fi
|
||||||
#clean_configuration
|
#clean_configuration
|
||||||
|
|
|
@ -522,7 +522,13 @@ while read prio_of_dep build_of_dep id_of_dep; do
|
||||||
# The parent has the same link without the last entry.
|
# The parent has the same link without the last entry.
|
||||||
# We do not need otherlink anymore so just destroy the last element
|
# We do not need otherlink anymore so just destroy the last element
|
||||||
unset otherlink[-1]
|
unset otherlink[-1]
|
||||||
parentNode=$(grep ^"${otherlink[*]}"\$ -l *)
|
# We cannot use grep -l, because we need to restrict to the first line,
|
||||||
|
# since the prio line may match
|
||||||
|
for f in *.tree; do
|
||||||
|
if head -n1 $f | grep -q ^"${otherlink[*]}"\$; then
|
||||||
|
parentNode=$f; break
|
||||||
|
fi
|
||||||
|
done
|
||||||
return $p2
|
return $p2
|
||||||
fi
|
fi
|
||||||
else # not circular: prune tree (but not .dep, since it may happen that
|
else # not circular: prune tree (but not .dep, since it may happen that
|
||||||
|
|
|
@ -104,6 +104,27 @@ menu "Build settings"
|
||||||
set this option to y. Due to the book layout, several scripts
|
set this option to y. Due to the book layout, several scripts
|
||||||
are not functional in this case. Please review them.
|
are not functional in this case. Please review them.
|
||||||
|
|
||||||
|
config DEP_CHECK
|
||||||
|
bool "Check dependencies of the requested package(s)"
|
||||||
|
default n
|
||||||
|
depends on WRAP_INSTALL
|
||||||
|
help
|
||||||
|
Setting this option does not work if more than one package
|
||||||
|
is selected. It will do the following:
|
||||||
|
- Build the dependency tree and generate a build ordered list
|
||||||
|
disregarding already installed packages
|
||||||
|
- Generate the scripts for the dependencies not already
|
||||||
|
installed (as usual)
|
||||||
|
- Generate a stript that:
|
||||||
|
+ removes all unneeded packages using porg
|
||||||
|
(at this point the blfs_tools cannot be used anymore,
|
||||||
|
and your system may be non functional, so use a console
|
||||||
|
for that, not a graphical environment)
|
||||||
|
+ installs the package
|
||||||
|
+ restores all the previously removed packages
|
||||||
|
Note that this script may not be the last one, if there are runtime
|
||||||
|
dependencies
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu "Build Layout"
|
menu "Build Layout"
|
||||||
|
|
25
BLFS/xsl/list_lfs.xsl
Normal file
25
BLFS/xsl/list_lfs.xsl
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<xsl:output method="text"/>
|
||||||
|
|
||||||
|
<xsl:template match="/">
|
||||||
|
<xsl:text>bootscripts </xsl:text>
|
||||||
|
<xsl:text>lfs-bootscripts </xsl:text>
|
||||||
|
<xsl:text>kernel </xsl:text>
|
||||||
|
<xsl:text>porg </xsl:text>
|
||||||
|
<xsl:text>tzdata </xsl:text>
|
||||||
|
<!-- the next two packages are not in LFS, but jhalfs needs them -->
|
||||||
|
<xsl:text>sudo </xsl:text>
|
||||||
|
<xsl:text>wget </xsl:text>
|
||||||
|
<xsl:apply-templates select=".//chapter[@id='chapter-building-system']/sect1/sect1info/productname"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="productname">
|
||||||
|
<xsl:copy-of select="text()"/>
|
||||||
|
<xsl:text> </xsl:text>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
|
@ -16,6 +16,7 @@
|
||||||
contains(string($current-instr),'tracker-miner') or
|
contains(string($current-instr),'tracker-miner') or
|
||||||
contains(string($current-instr),'gtweak') or
|
contains(string($current-instr),'gtweak') or
|
||||||
contains(string($current-instr),'query-immodules') or
|
contains(string($current-instr),'query-immodules') or
|
||||||
|
contains(string($current-instr),'chgrp -v mail') or
|
||||||
contains(string($current-instr),'gnome-control-center')">
|
contains(string($current-instr),'gnome-control-center')">
|
||||||
]>
|
]>
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,33 @@
|
||||||
<xsl:when test="string()='<loginname>'">
|
<xsl:when test="string()='<loginname>'">
|
||||||
<xsl:text>$USER</xsl:text>
|
<xsl:text>$USER</xsl:text>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
<!-- for xorg environment. Note that libreoffice too uses <PREFIX> -->
|
||||||
|
<xsl:when test="string()='<PREFIX>' and
|
||||||
|
ancestor::sect1[@id='xorg-env']">
|
||||||
|
<xsl:text>/usr</xsl:text>
|
||||||
|
</xsl:when>
|
||||||
|
<!-- for libreoffice. Note that xorg environment too uses <PREFIX> -->
|
||||||
|
<xsl:when test="string()='<PREFIX>' and
|
||||||
|
ancestor::sect1[@id='libreoffice']">
|
||||||
|
<xsl:text>/opt/</xsl:text>
|
||||||
|
<xsl:value-of select="ancestor::sect1/@xreflabel"/>
|
||||||
|
</xsl:when>
|
||||||
|
<!-- for abiword -->
|
||||||
|
<xsl:when test="string()='<lang>'">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="starts-with($language,'en_US')">
|
||||||
|
<!-- normal.awt for en_US is already there, copy
|
||||||
|
the one for en_GB (could be any other) -->
|
||||||
|
<xsl:text>en_GB</xsl:text>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<!-- in general, there are normal.awt-ll_CC files-->
|
||||||
|
<xsl:copy-of select="$lang-ll"/>
|
||||||
|
<xsl:text>_</xsl:text>
|
||||||
|
<xsl:copy-of select="$lang-CC"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:text>**EDITME</xsl:text>
|
<xsl:text>**EDITME</xsl:text>
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
|
|
|
@ -302,7 +302,7 @@ cd $SRC_DIR</xsl:text>
|
||||||
<xsl:apply-templates select="bridgehead[@renderas='sect3']"/>
|
<xsl:apply-templates select="bridgehead[@renderas='sect3']"/>
|
||||||
</xsl:when><!-- @role="package" -->
|
</xsl:when><!-- @role="package" -->
|
||||||
|
|
||||||
<xsl:when test="@role = 'qt4-prefix' or @role = 'qt5-prefix'">
|
<xsl:when test="@role = 'qt5-prefix' or @role = 'qt6-prefix'">
|
||||||
<xsl:apply-templates select=".//screen[./userinput]"/>
|
<xsl:apply-templates select=".//screen[./userinput]"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
|
||||||
|
@ -441,10 +441,6 @@ echo Start Time: ${SECONDS} >> $INFOLOG
|
||||||
</xsl:with-param>
|
</xsl:with-param>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<xsl:variable name="first_letter"
|
|
||||||
select="translate(substring($package,1,1),
|
|
||||||
'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
|
|
||||||
'abcdefghijklmnopqrstuvwxyz')"/>
|
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:text>
</xsl:text>
|
||||||
<xsl:value-of select="$varname"/>
|
<xsl:value-of select="$varname"/>
|
||||||
<xsl:text>=</xsl:text>
|
<xsl:text>=</xsl:text>
|
||||||
|
@ -460,24 +456,9 @@ echo Start Time: ${SECONDS} >> $INFOLOG
|
||||||
<xsl:text>" "$</xsl:text>
|
<xsl:text>" "$</xsl:text>
|
||||||
<xsl:value-of select="$varname"/>
|
<xsl:value-of select="$varname"/>
|
||||||
<xsl:text>"
|
<xsl:text>"
|
||||||
else
</xsl:text>
|
else<!-- Download from upstream http -->
|
||||||
<!-- Download from upstream http -->
|
wget -T 30 -t 5 "</xsl:text>
|
||||||
<xsl:if test="string-length($httpurl) > 10">
|
|
||||||
<xsl:text> wget -T 30 -t 5 "</xsl:text>
|
|
||||||
<xsl:value-of select="$httpurl"/>
|
<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 "${JH_FTP_SERVER}svn/</xsl:text>
|
|
||||||
<xsl:value-of select="$first_letter"/>
|
|
||||||
<xsl:text>/$</xsl:text>
|
|
||||||
<xsl:value-of select="$varname"/>
|
|
||||||
<xsl:text>"
|
<xsl:text>"
|
||||||
fi
|
fi
|
||||||
fi</xsl:text>
|
fi</xsl:text>
|
||||||
|
@ -722,9 +703,13 @@ cd $BOOTUNPACKDIR</xsl:text>
|
||||||
<xsl:template match="screen" mode="config">
|
<xsl:template match="screen" mode="config">
|
||||||
<xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts']">
|
<xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts']">
|
||||||
<!-- if the preceding "screen" tag is role="root", and we are role="root"
|
<!-- if the preceding "screen" tag is role="root", and we are role="root"
|
||||||
the end-root has not been called. So do it -->
|
the end-root has not been called, except if the preceding "screen"
|
||||||
|
tag is itself preceded by a <para> containing and <xref> to
|
||||||
|
bootscripts. So close it only if needed -->
|
||||||
<xsl:if
|
<xsl:if
|
||||||
test="preceding-sibling::screen[1][@role='root'] and @role='root'">
|
test="preceding-sibling::screen[1][@role='root'] and
|
||||||
|
@role='root' and
|
||||||
|
not(preceding-sibling::screen[1]/preceding-sibling::para[1]/xref[@linkend='bootscripts'])">
|
||||||
<xsl:call-template name="end-root"/>
|
<xsl:call-template name="end-root"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:call-template name="set-bootpkg-dir">
|
<xsl:call-template name="set-bootpkg-dir">
|
||||||
|
@ -733,17 +718,21 @@ cd $BOOTUNPACKDIR</xsl:text>
|
||||||
select="id('bootscripts')//itemizedlist//ulink/@url"/>
|
select="id('bootscripts')//itemizedlist//ulink/@url"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<!-- if the preceding "screen" tag is role="root", and we are role="root"
|
<!-- if the preceding "screen" tag is role="root", and we are role="root"
|
||||||
the begin-root will not be called. So do it -->
|
the begin-root will not be called. So do it.-->
|
||||||
<xsl:if
|
<xsl:if
|
||||||
test="preceding-sibling::screen[1][@role='root'] and @role='root'">
|
test="preceding-sibling::screen[1][@role='root'] and
|
||||||
|
@role='root'">
|
||||||
<xsl:call-template name="begin-root"/>
|
<xsl:call-template name="begin-root"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="preceding-sibling::para[1]/xref[@linkend='systemd-units']">
|
<xsl:if test="preceding-sibling::para[1]/xref[@linkend='systemd-units']">
|
||||||
<!-- if the preceding "screen" tag is role="root", and we are role="root"
|
<!-- if the preceding "screen" tag is role="root", and we are role="root"
|
||||||
the end-root has not been called. So do it -->
|
the end-root has not been called. So do it, except if it was already a
|
||||||
|
unit install -->
|
||||||
<xsl:if
|
<xsl:if
|
||||||
test="preceding-sibling::screen[1][@role='root'] and @role='root'">
|
test="preceding-sibling::screen[1][@role='root'] and
|
||||||
|
@role='root' and
|
||||||
|
not(preceding-sibling::screen[1]/preceding-sibling::para[1]/xref[@linkend='systemd-units'])">
|
||||||
<xsl:call-template name="end-root"/>
|
<xsl:call-template name="end-root"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:call-template name="set-bootpkg-dir">
|
<xsl:call-template name="set-bootpkg-dir">
|
||||||
|
@ -752,9 +741,10 @@ cd $BOOTUNPACKDIR</xsl:text>
|
||||||
select="id('systemd-units')//itemizedlist//ulink/@url"/>
|
select="id('systemd-units')//itemizedlist//ulink/@url"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<!-- if the preceding "screen" tag is role="root", and we are role="root"
|
<!-- if the preceding "screen" tag is role="root", and we are role="root"
|
||||||
the begin-root will not be called. So do it -->
|
the begin-root will not be called. So do it. -->
|
||||||
<xsl:if
|
<xsl:if
|
||||||
test="preceding-sibling::screen[1][@role='root'] and @role='root'">
|
test="preceding-sibling::screen[1][@role='root'] and
|
||||||
|
@role='root'">
|
||||||
<xsl:call-template name="begin-root"/>
|
<xsl:call-template name="begin-root"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
@ -762,7 +752,7 @@ cd $BOOTUNPACKDIR</xsl:text>
|
||||||
<xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts' or
|
<xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts' or
|
||||||
@linkend='systemd-units']">
|
@linkend='systemd-units']">
|
||||||
<!-- if the next "screen" tag is role="root", and we are role="root"
|
<!-- if the next "screen" tag is role="root", and we are role="root"
|
||||||
the end-root has not been called. So do it -->
|
the end-root has not been called. -->
|
||||||
<xsl:if
|
<xsl:if
|
||||||
test="following-sibling::screen[1][@role='root'] and @role='root'">
|
test="following-sibling::screen[1][@role='root'] and @role='root'">
|
||||||
<xsl:call-template name="end-root"/>
|
<xsl:call-template name="end-root"/>
|
||||||
|
@ -770,9 +760,12 @@ cd $BOOTUNPACKDIR</xsl:text>
|
||||||
<xsl:text>
|
<xsl:text>
|
||||||
popd</xsl:text>
|
popd</xsl:text>
|
||||||
<!-- if the next "screen" tag is role="root", and we are role="root"
|
<!-- if the next "screen" tag is role="root", and we are role="root"
|
||||||
the begin-root will not be called. So do it -->
|
the begin-root will not be called. So do it, except if the next
|
||||||
|
<screen> is itself a unit or bootscript install -->
|
||||||
<xsl:if
|
<xsl:if
|
||||||
test="following-sibling::screen[1][@role='root'] and @role='root'">
|
test="following-sibling::screen[1][@role='root'] and
|
||||||
|
@role='root' and
|
||||||
|
not(following-sibling::screen[1]/preceding-sibling::para[1]/xref[@linkend='bootscripts' or @linkend='systemd-units'])">
|
||||||
<xsl:call-template name="begin-root"/>
|
<xsl:call-template name="begin-root"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
@ -918,28 +911,22 @@ echo Size after install: $(sudo du -skx --exclude home $BUILD_DIR) >> $INFOLOG
|
||||||
<xsl:template match="userinput" mode="destdir">
|
<xsl:template match="userinput" mode="destdir">
|
||||||
<xsl:text>
|
<xsl:text>
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
<xsl:choose>
|
<xsl:for-each select="./literal">
|
||||||
<xsl:when test="./literal">
|
|
||||||
<xsl:call-template name="outputpkgdest">
|
<xsl:call-template name="outputpkgdest">
|
||||||
<xsl:with-param name="outputstring" select="text()[1]"/>
|
<xsl:with-param name="outputstring" select="preceding-sibling::text()[1]"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
<xsl:apply-templates select="literal"/>
|
<xsl:apply-templates select="."/>
|
||||||
|
</xsl:for-each>
|
||||||
<xsl:call-template name="outputpkgdest">
|
<xsl:call-template name="outputpkgdest">
|
||||||
<xsl:with-param name="outputstring" select="text()[2]"/>
|
<xsl:with-param name="outputstring" select="text()[last()]"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:call-template name="outputpkgdest">
|
|
||||||
<xsl:with-param name="outputstring" select="string()"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:template>
|
</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>
|
||||||
<xsl:when test="contains($outputstring,'make ')">
|
<xsl:when test="contains(normalize-space($outputstring),' make ') or
|
||||||
|
starts-with($outputstring, 'make ')">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="not(starts-with($outputstring,'make'))">
|
<xsl:when test="not(starts-with($outputstring,'make'))">
|
||||||
<xsl:call-template name="outputpkgdest">
|
<xsl:call-template name="outputpkgdest">
|
||||||
|
|
201
Config.in
201
Config.in
|
@ -1,3 +1,11 @@
|
||||||
|
# Check for "nproc" presence:
|
||||||
|
config HAVE_NPROC
|
||||||
|
def_bool $(shell,if nproc &>/dev/null; then echo y; else echo n; fi)
|
||||||
|
|
||||||
|
# Check for "cpuset controller in cgroup v2" presence:
|
||||||
|
config HAVE_CGROUP
|
||||||
|
def_bool $(shell,if grep -q cpuset /sys/fs/cgroup/cgroup.controllers 2>/dev/null; then echo y; else echo n; fi)
|
||||||
|
|
||||||
menu "BOOK Settings"
|
menu "BOOK Settings"
|
||||||
|
|
||||||
#--- BOOK/script
|
#--- BOOK/script
|
||||||
|
@ -421,16 +429,6 @@ depends on !BOOK_BLFS
|
||||||
#-- Number of seconds to wait for a download to start before
|
#-- Number of seconds to wait for a download to start before
|
||||||
# timing out.
|
# timing out.
|
||||||
|
|
||||||
config SERVER
|
|
||||||
string "FTP mirror"
|
|
||||||
default "http://ftp.osuosl.org"
|
|
||||||
depends on GETPKG
|
|
||||||
help
|
|
||||||
#-- FTP mirror to download packages and patches if not found
|
|
||||||
# in $SRC_ARCHIVE
|
|
||||||
# As a last resort, the files will downloaded from upstream,
|
|
||||||
# if possible.
|
|
||||||
|
|
||||||
config RUNMAKE
|
config RUNMAKE
|
||||||
bool "Run the makefile"
|
bool "Run the makefile"
|
||||||
default n
|
default n
|
||||||
|
@ -451,6 +449,62 @@ endmenu
|
||||||
menu "Build Settings"
|
menu "Build Settings"
|
||||||
depends on !BOOK_BLFS
|
depends on !BOOK_BLFS
|
||||||
|
|
||||||
|
#--- Parallelism
|
||||||
|
menu "Parallelism settings"
|
||||||
|
if HAVE_NPROC
|
||||||
|
config ALL_CORES
|
||||||
|
bool "Use all cores"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
If you answer y, MAKEFLAGS will be set to "-j$(nproc)" at the
|
||||||
|
beginning of each package script, and book instructions will not
|
||||||
|
be changed otherwise. This will run the scripts with the same
|
||||||
|
settings as in the book since version r12.0-87 included. Before
|
||||||
|
that version, this will run the builds with all cores, but some
|
||||||
|
test suites may still be run sequentially. You'll be asked for
|
||||||
|
a CPU set to use, so that the number of jobs can still be limited
|
||||||
|
in this way (useful for measuring SBU values at -j4, for
|
||||||
|
example).
|
||||||
|
If you answer n, then jhalfs will fall back to a static number
|
||||||
|
of cores, defined below.
|
||||||
|
|
||||||
|
if ALL_CORES && HAVE_CGROUP
|
||||||
|
config CPUSET
|
||||||
|
string "set of cpus to use, or 'all' for all cpus"
|
||||||
|
default "all"
|
||||||
|
help
|
||||||
|
See "List format" in cpuset(7). Choosing cpus depend
|
||||||
|
on the topology of your processors. Sometimes two
|
||||||
|
hyperthreads on the same core are numbered consecutively.
|
||||||
|
For example for using all cores and no hyperthreading on
|
||||||
|
a Haswell, use "0,2,4,6". Other brands may have a different
|
||||||
|
topology, and may require e.g. "0-3" to use the first 4 cores.
|
||||||
|
If not sure, keep the default.
|
||||||
|
endif
|
||||||
|
|
||||||
|
endif # HAVE_NPROC
|
||||||
|
if !HAVE_NPROC
|
||||||
|
config ALL_CORES
|
||||||
|
bool
|
||||||
|
default n
|
||||||
|
endif
|
||||||
|
|
||||||
|
config N_PARALLEL
|
||||||
|
int "Number of parallel `make' jobs"
|
||||||
|
depends on !ALL_CORES
|
||||||
|
default 1
|
||||||
|
help
|
||||||
|
#-- The usual recommandation is (number of CPU cores)+1
|
||||||
|
# Do not set for meaningful SBU calculations.
|
||||||
|
|
||||||
|
config REALSBU
|
||||||
|
bool "Build Binutils pass1 without parallelism (Real SBU)"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
#-- Use -j1 in make invokation for Binutils pass1 to
|
||||||
|
# get a valid SBU value.
|
||||||
|
endmenu # parallelism
|
||||||
|
|
||||||
#--- Test Suites
|
#--- Test Suites
|
||||||
config CONFIG_TESTS
|
config CONFIG_TESTS
|
||||||
bool "Run testsuites"
|
bool "Run testsuites"
|
||||||
|
@ -467,9 +521,8 @@ depends on !BOOK_BLFS
|
||||||
# out. If you select 'n' here, the commented test instructions
|
# out. If you select 'n' here, the commented test instructions
|
||||||
# do not stop on test suite failures.
|
# do not stop on test suite failures.
|
||||||
|
|
||||||
menu "Test settings"
|
|
||||||
depends on CONFIG_TESTS
|
|
||||||
choice
|
choice
|
||||||
|
depends on CONFIG_TESTS
|
||||||
prompt "Tests level"
|
prompt "Tests level"
|
||||||
default TST_1
|
default TST_1
|
||||||
|
|
||||||
|
@ -490,8 +543,6 @@ depends on !BOOK_BLFS
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
endmenu # test settings
|
|
||||||
|
|
||||||
config TEST
|
config TEST
|
||||||
int
|
int
|
||||||
default "0" if !CONFIG_TESTS
|
default "0" if !CONFIG_TESTS
|
||||||
|
@ -556,13 +607,6 @@ depends on !BOOK_BLFS
|
||||||
bool "Strip Installed Binaries/Libraries"
|
bool "Strip Installed Binaries/Libraries"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config DEL_LA_FILES
|
|
||||||
bool "Remove libtool .la files"
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
#-- Remove files libxxx.la installed by libtool. For a rationale
|
|
||||||
# see https://blog.flameeyes.eu/tags/lafiles/
|
|
||||||
|
|
||||||
config NO_PROGRESS_BAR
|
config NO_PROGRESS_BAR
|
||||||
bool "DO NOT use/display progress_bar"
|
bool "DO NOT use/display progress_bar"
|
||||||
default n
|
default n
|
||||||
|
@ -611,6 +655,13 @@ menu "System configuration"
|
||||||
#-- Fully qualified path to a kernel config file
|
#-- Fully qualified path to a 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 'kernel-config'
|
# and renamed 'kernel-config'
|
||||||
|
#
|
||||||
|
# Important: if the config file is out of date (missing
|
||||||
|
# option), the kernel build will timeout instead of
|
||||||
|
# waiting forever for an input. This will generate error
|
||||||
|
# 124. In this case, update your config file,
|
||||||
|
# copy it to $BUILD_DIR/sources/kernel-config, and
|
||||||
|
# restart the build.
|
||||||
#--- End Kernel
|
#--- End Kernel
|
||||||
|
|
||||||
config NCURSES5
|
config NCURSES5
|
||||||
|
@ -763,20 +814,59 @@ endmenu #--- System configuration
|
||||||
menu "Advanced Features"
|
menu "Advanced Features"
|
||||||
depends on !BOOK_BLFS
|
depends on !BOOK_BLFS
|
||||||
|
|
||||||
|
#--- Optimizations
|
||||||
|
config CONFIG_OPTIMIZE
|
||||||
|
bool "Optimization"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
# Opens a menu for various optimization settings:
|
||||||
|
# Actual optimization flags MUST be defined in ./optimize/*
|
||||||
|
# before activating this option.
|
||||||
|
#
|
||||||
|
# WARNING: The use of build optimizations may lead to build issues.
|
||||||
|
# If the system doesn't work as expected, please rebuild
|
||||||
|
# without optimizations before asking for support.
|
||||||
|
menu "Optimization settings"
|
||||||
|
depends on CONFIG_OPTIMIZE
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Optimization level"
|
||||||
|
default OPT_1
|
||||||
|
help
|
||||||
|
#-- Optimization values are set in optimize/* files
|
||||||
|
|
||||||
|
config OPT_1
|
||||||
|
bool "Final system only"
|
||||||
|
|
||||||
|
config OPT_2
|
||||||
|
bool "Both temp tools and final system"
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
endmenu # Optimization settings
|
||||||
|
config OPTIMIZE
|
||||||
|
int
|
||||||
|
default "0" if !CONFIG_OPTIMIZE
|
||||||
|
default "1" if OPT_1
|
||||||
|
default "2" if OPT_2
|
||||||
|
|
||||||
|
#--- End Optimizations
|
||||||
|
|
||||||
config REPORT
|
config REPORT
|
||||||
bool "Create SBU and disk usage report"
|
bool "Create SBU and disk usage report"
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config SAVE_CH5
|
config SAVE_CH5
|
||||||
bool "Save Chapter 5 work"
|
bool "Save temporary system work"
|
||||||
depends on BOOK_LFS || BOOK_LFS_SYSD
|
depends on BOOK_LFS || BOOK_LFS_SYSD
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
Save the state of jhalfs at the end of chapter 5:
|
Save the state of jhalfs after finishing building the temporary
|
||||||
|
system
|
||||||
|
|
||||||
if you tick this item, the whole $LFS directory is
|
if you tick this item, the whole $LFS directory is
|
||||||
saved when chapter 5 is finished. It'll be in an xz
|
saved when chapter 7 is finished. It'll be in a .tar
|
||||||
compressed tarball in the $LFS/jhalfs directory
|
file in the $BUILD_DIR/jhalfs directory
|
||||||
|
|
||||||
#--- ICA
|
#--- ICA
|
||||||
config COMPARE
|
config COMPARE
|
||||||
|
@ -809,59 +899,6 @@ depends on !BOOK_BLFS
|
||||||
|
|
||||||
#--- End ICA
|
#--- End ICA
|
||||||
|
|
||||||
#--- Optimizations
|
|
||||||
config CONFIG_OPTIMIZE
|
|
||||||
bool "Optimization and parallelization"
|
|
||||||
default n
|
|
||||||
help
|
|
||||||
# Opens a menu for various optimization settings:
|
|
||||||
# Actual optimization flags MUST be defined in ./optimize/*
|
|
||||||
# before activating this option.
|
|
||||||
#
|
|
||||||
# WARNING: The use of build optimizations may lead to build issues.
|
|
||||||
# If the system doesn't work as expected, please rebuild
|
|
||||||
# without optimizations before asking for support.
|
|
||||||
menu "Parallelization and Optimization settings"
|
|
||||||
depends on CONFIG_OPTIMIZE
|
|
||||||
|
|
||||||
config N_PARALLEL
|
|
||||||
int "Number of parallel `make' jobs"
|
|
||||||
default 1
|
|
||||||
help
|
|
||||||
#-- The usual recommandation is (number of CPU cores)+1
|
|
||||||
# Do not set for meaningful SBU calculations.
|
|
||||||
|
|
||||||
choice
|
|
||||||
prompt "Optimization level"
|
|
||||||
default OPT_1
|
|
||||||
help
|
|
||||||
#-- Optimization values are set in optimize/* files
|
|
||||||
|
|
||||||
config OPT_1
|
|
||||||
bool "Final system only"
|
|
||||||
|
|
||||||
config OPT_2
|
|
||||||
bool "Both temp tools and final system"
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
config REALSBU
|
|
||||||
bool "Build Binutls pass1 without optimization (Real SBU)"
|
|
||||||
depends on OPT_2
|
|
||||||
default n
|
|
||||||
help
|
|
||||||
#-- Use -j1 in make invokation for Binutils pass1 to
|
|
||||||
# get a valid SBU value.
|
|
||||||
|
|
||||||
endmenu # Optimization settings
|
|
||||||
config OPTIMIZE
|
|
||||||
int
|
|
||||||
default "0" if !CONFIG_OPTIMIZE
|
|
||||||
default "1" if OPT_1
|
|
||||||
default "2" if OPT_2
|
|
||||||
|
|
||||||
#--- End Optimizations
|
|
||||||
|
|
||||||
#-- Internal Settings
|
#-- Internal Settings
|
||||||
menu "Internal Settings (WARNING: for jhalfs developers only)"
|
menu "Internal Settings (WARNING: for jhalfs developers only)"
|
||||||
|
|
||||||
|
@ -913,6 +950,14 @@ depends on !BOOK_BLFS
|
||||||
string "Package contents list"
|
string "Package contents list"
|
||||||
default "unpacked"
|
default "unpacked"
|
||||||
|
|
||||||
|
config DEL_LA_FILES
|
||||||
|
bool "Remove libtool .la files"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
#-- Remove files libxxx.la installed by libtool. Only set to
|
||||||
|
# "n" if you know what you are doing. For a rationale
|
||||||
|
# see https://blog.flameeyes.eu/tags/lafiles/
|
||||||
|
|
||||||
#--- End Internal Settings
|
#--- End Internal Settings
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
|
23
LFS/lfs.xsl
23
LFS/lfs.xsl
|
@ -28,6 +28,12 @@
|
||||||
-->
|
-->
|
||||||
<xsl:param name="testsuite" select="1"/>
|
<xsl:param name="testsuite" select="1"/>
|
||||||
|
|
||||||
|
<!-- Parallelism (LFS >= 12.1) -->
|
||||||
|
<xsl:param name="jobs" select="1"/>
|
||||||
|
|
||||||
|
<!-- value of jobs for binutils-pass1 -->
|
||||||
|
<xsl:param name="jobs-bp1" select="1"/>
|
||||||
|
|
||||||
<!-- Install non wide character ncurses 5? -->
|
<!-- Install non wide character ncurses 5? -->
|
||||||
<xsl:param name="ncurses5" select="'n'"/>
|
<xsl:param name="ncurses5" select="'n'"/>
|
||||||
|
|
||||||
|
@ -415,6 +421,8 @@ echo -e "\n\nTotalseconds: $SECONDS\n"
|
||||||
<xsl:text>make mrproper
</xsl:text>
|
<xsl:text>make mrproper
</xsl:text>
|
||||||
<xsl:if test="ancestor::sect1[@id='ch-bootable-kernel']">
|
<xsl:if test="ancestor::sect1[@id='ch-bootable-kernel']">
|
||||||
<xsl:text>cp -v ../kernel-config .config
</xsl:text>
|
<xsl:text>cp -v ../kernel-config .config
</xsl:text>
|
||||||
|
<xsl:text>timeout 60 make oldconfig ||\
</xsl:text>
|
||||||
|
<xsl:text>{ echo kernel config is not up to date; exit 124; }
</xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<!-- test instructions -->
|
<!-- test instructions -->
|
||||||
|
@ -615,6 +623,9 @@ unset OLD_PKGDIR
|
||||||
<xsl:when test="contains(string(.),'<lfs>')">
|
<xsl:when test="contains(string(.),'<lfs>')">
|
||||||
<xsl:value-of select="$hostname"/>
|
<xsl:value-of select="$hostname"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
<xsl:when test="contains(string(.),'$(nproc)')">
|
||||||
|
<xsl:value-of select="$jobs"/>
|
||||||
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:text>**EDITME</xsl:text>
|
<xsl:text>**EDITME</xsl:text>
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
|
@ -1241,6 +1252,18 @@ tar -xf $PACKAGE
|
||||||
cd $PKGDIR
|
cd $PKGDIR
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
<xsl:text>
|
||||||
|
export MAKEFLAGS="-j</xsl:text>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="@id='ch-tools-binutils-pass1'">
|
||||||
|
<xsl:value-of select="$jobs-bp1"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$jobs"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
<xsl:text>"
|
||||||
|
</xsl:text>
|
||||||
<xsl:text>SECONDS=${PREV_SEC}
|
<xsl:text>SECONDS=${PREV_SEC}
|
||||||
|
|
||||||
# Start of LFS book script
|
# Start of LFS book script
|
||||||
|
|
|
@ -127,14 +127,17 @@ chapter_targets() { #
|
||||||
|
|
||||||
# If using optimizations, write the instructions
|
# If using optimizations, write the instructions
|
||||||
case "${OPTIMIZE}$1${nb_chaps}${this_script}${REALSBU}" in
|
case "${OPTIMIZE}$1${nb_chaps}${this_script}${REALSBU}" in
|
||||||
0* | *binutils-pass1y | 15* | 167* | 177*)
|
0* | *binutils-pass1y | 15* | 167* | 177*) ;;
|
||||||
wrt_makeflags "$name" "-j1" "1" ;;
|
*kernel*) ;; # No CFLAGS for kernel
|
||||||
*kernel*) # No CFLAGS for kernel
|
*) wrt_optimize "$name" ;;
|
||||||
wrt_makeflags "$name" "$JH_MAKEFLAGS" "$N_PARALLEL" ;;
|
|
||||||
*) wrt_optimize "$name" &&
|
|
||||||
wrt_makeflags "$name" "$JH_MAKEFLAGS" "$N_PARALLEL" ;;
|
|
||||||
esac
|
esac
|
||||||
|
# There is no need to tweak MAKEFLAGS anymore, this is done
|
||||||
|
# by lfs.xsl. But still, NINJAJOBS needs to be set if
|
||||||
|
# N_PARALLEL is defined.
|
||||||
|
if [ -n "N_PARALLEL" ]; then
|
||||||
|
wrt_makeflags "$name" "$JH_MAKEFLAGS" "$N_PARALLEL"
|
||||||
fi
|
fi
|
||||||
|
fi # end of package specific instructions
|
||||||
|
|
||||||
# Some scriptlet have a special treatment; otherwise standard
|
# Some scriptlet have a special treatment; otherwise standard
|
||||||
case "${this_script}" in
|
case "${this_script}" in
|
||||||
|
@ -286,6 +289,17 @@ build_Makefile() { #
|
||||||
i=`expr $i + 1`
|
i=`expr $i + 1`
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# If CPUSET is defined and not equal to "all", then we define a first target
|
||||||
|
# that calls a script which re-enters make calling target all
|
||||||
|
if [ -n "$CPUSET" ] && [ "$CPUSET" != all ]; then
|
||||||
|
(
|
||||||
|
cat << EOF
|
||||||
|
|
||||||
|
all-with-cpuset:
|
||||||
|
@CPUSPEC="\$(CPUSET)" ./run-in-cgroup.sh \$(MAKE) all
|
||||||
|
EOF
|
||||||
|
) >> $MKFILE
|
||||||
|
fi
|
||||||
# Drop in the main target 'all:' and the chapter targets with each sub-target
|
# Drop in the main target 'all:' and the chapter targets with each sub-target
|
||||||
# as a dependency. Also prevent running targets in parallel.
|
# as a dependency. Also prevent running targets in parallel.
|
||||||
(
|
(
|
||||||
|
@ -368,24 +382,24 @@ mk_SUDO: mk_LUSER
|
||||||
@sudo make BREAKPOINT=\$(BREAKPOINT) SUDO
|
@sudo make BREAKPOINT=\$(BREAKPOINT) SUDO
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_CHROOT: mk_SUDO
|
mk_CHROOT: mk_SUDO devices
|
||||||
@\$(call echo_CHROOT_request)
|
@\$(call echo_CHROOT_request)
|
||||||
@( sudo \$(CHROOT1) -c "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) CHROOT")
|
@( sudo \$(CHROOT1) -c "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) CHROOT")
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_BOOT: mk_CHROOT
|
mk_BOOT: mk_CHROOT devices
|
||||||
@\$(call echo_CHROOT_request)
|
@\$(call echo_CHROOT_request)
|
||||||
@( sudo \$(CHROOT1) -c "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) BOOT")
|
@( sudo \$(CHROOT1) -c "cd \$(SCRIPT_ROOT) && make BREAKPOINT=\$(BREAKPOINT) BOOT")
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_BLFS_TOOL: create-sbu_du-report
|
mk_BLFS_TOOL: create-sbu_du-report devices
|
||||||
@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
|
@if [ "\$(ADD_BLFS_TOOLS)" = "y" ]; then \\
|
||||||
\$(call sh_echo_PHASE,Building BLFS_TOOL); \\
|
\$(call sh_echo_PHASE,Building BLFS_TOOL); \\
|
||||||
(sudo \$(CHROOT1) -c "make -C $BLFS_ROOT/work"); \\
|
(sudo \$(CHROOT1) -c "make -C $BLFS_ROOT/work"); \\
|
||||||
fi;
|
fi;
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
mk_CUSTOM_TOOLS: mk_BLFS_TOOL
|
mk_CUSTOM_TOOLS: mk_BLFS_TOOL devices
|
||||||
@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
|
@if [ "\$(ADD_CUSTOM_TOOLS)" = "y" ]; then \\
|
||||||
\$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
|
\$(call sh_echo_PHASE,Building CUSTOM_TOOLS); \\
|
||||||
sudo mkdir -p ${BUILDDIR}${TRACKING_DIR}; \\
|
sudo mkdir -p ${BUILDDIR}${TRACKING_DIR}; \\
|
||||||
|
@ -437,11 +451,11 @@ fi
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
|
||||||
chroot1: devices
|
chroot1: devices
|
||||||
sudo \$(CHROOT1)
|
-sudo \$(CHROOT1)
|
||||||
\$(MAKE) teardown
|
\$(MAKE) teardown
|
||||||
|
|
||||||
chroot: devices
|
chroot: devices
|
||||||
sudo \$(CHROOT1)
|
-sudo \$(CHROOT1)
|
||||||
\$(MAKE) teardown
|
\$(MAKE) teardown
|
||||||
|
|
||||||
SETUP: $SETUP_TGT
|
SETUP: $SETUP_TGT
|
||||||
|
|
289
README
289
README
|
@ -7,35 +7,38 @@
|
||||||
the original "jhalfs-0.2" code developed by Jeremy Huntwork.
|
the original "jhalfs-0.2" code developed by Jeremy Huntwork.
|
||||||
|
|
||||||
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 (maybe outdated,
|
||||||
|
current develoment books and latest version are always supported).
|
||||||
|
|
||||||
The documentation is split among various README.* files. Here is a list
|
The documentation is split among various README.* files. Here is a list
|
||||||
of what is in which:
|
of what is in which:
|
||||||
- README (this file): instructions to use the LFS book. This should be
|
- 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
|
enough if you just want to build a base system as per the LFS book. It
|
||||||
also a required reading for all the other projects.
|
is also a required reading for all the other projects.
|
||||||
- README.BLFS: instructions to install an automated build infrastructure
|
- README.BLFS: instructions to install an automated build infrastructure
|
||||||
for the BLFS book. There are two ways to do so: (i) install the
|
for the BLFS book. There are two ways to do so: (i) install the
|
||||||
tools at the end of an LFS build, or
|
tools at the end of an LFS build, or
|
||||||
(ii) install the tools on an already running system. Both methods are
|
(ii) install the tools on an already running system. Both methods are
|
||||||
described in that file.
|
described in that file.
|
||||||
- README.CUSTOM: instructions to run custom commands either during the xLFS
|
- README.CUSTOM: instructions to run custom commands either during the LFS
|
||||||
build, at the end of a xLFS build. Note that you will not find
|
build, or at the end of a LFS build. Note that you will not find
|
||||||
instructions on how to write those commands, but some examples are
|
instructions on how to write those commands, but some examples are
|
||||||
available.
|
available.
|
||||||
- README.PACKAGE_MANAGEMENT: instructions to use package management during
|
- README.PACKAGE_MANAGEMENT: instructions to use package management during
|
||||||
the build
|
the build (Note: the only package manager that is regularly tested is
|
||||||
|
porg)
|
||||||
|
|
||||||
Other sources of information are the context help in the menu interface,
|
Other sources of information are the context help in the menu interface,
|
||||||
and the xLFS books themselves.
|
and the LFS books themselves (both required readings of course!).
|
||||||
|
|
||||||
2. PREREQUISITES::
|
2. PREREQUISITES::
|
||||||
|
|
||||||
As said elsewhere, it is strongly advised that you first build manually
|
It is strongly advised that you first build manually a complete system
|
||||||
a complete system before attempting to automate the build.
|
before attempting to automate the build.
|
||||||
|
|
||||||
Of course the "Host System Requirements" should be fulfilled. The needed
|
Of course the "Host System Requirements" should be fulfilled. Some
|
||||||
supplementary packages are detailed at the bottom of the page:
|
supplementary packages are needed for using jhalfs. They are detailed
|
||||||
|
at the bottom of the page:
|
||||||
https://www.linuxfromscratch.org/alfs/download.html. In short, you need
|
https://www.linuxfromscratch.org/alfs/download.html. In short, you need
|
||||||
wget, sudo, libxml2, libxslt, docbook-4.5-xml, and docbook-xsl-nons.
|
wget, sudo, libxml2, libxslt, docbook-4.5-xml, and docbook-xsl-nons.
|
||||||
|
|
||||||
|
@ -55,44 +58,37 @@
|
||||||
This tool has no support at all for creating a partition and a mount
|
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
|
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
|
"Mounting the new partition". Note that the default name for the
|
||||||
partition mount point is "/mnt/build_dir", instead of /mnt/{c,}lfs.
|
partition mount point is "/mnt/build_dir", instead of /mnt/lfs.
|
||||||
You can change that default to anything you'd like in the menu, so you
|
You can change that default to anything you'd like in the menu, so you
|
||||||
may name it /mnt/lfs, or whatever you like. We'll use the name
|
may name it /mnt/lfs if you prefer . We'll use the name /mnt/build_dir
|
||||||
/mnt/build_dir in the sequel.
|
in the sequel.
|
||||||
|
|
||||||
The tool can download the needed packages for you, or you may download
|
For downloading packages, you can use the tool or download them
|
||||||
them yourself. The tool may optionally use a package archive directory
|
yourself. Even if using the tool, it is recommended to set up a source
|
||||||
where the downloaded packages are stored. That directory name may be made
|
repository where you store already downloaded packages. The tool will
|
||||||
available to the tool in two ways: (i) export the SRC_ARCHIVE variable,
|
automatically search a package in this repository before downloading it
|
||||||
for example SRC_ARCHIVE=/usr/src, (ii) enter the name at the "Package
|
if it is not found there. This repository cannot be the same as
|
||||||
Archive Directory" menu prompt. Note that the user should have write
|
/mnt/build_dir/sources. As an example, we'll use /usr/src. You should
|
||||||
permission to that directory. If a needed package is found in that
|
arrange for the user running the tool to have write access to this
|
||||||
directory, it is copied to /mnt/build_dir/sources, if not, it is
|
directory.
|
||||||
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
|
If you want to build the kernel as part of the automated build,
|
||||||
"Build the kernel" in the menu. Then, a configuration file must be
|
a configuration file must be provided. In order to do so, it is
|
||||||
provided. In order to do so, it is recommended to download the kernel
|
recommended to download the kernel tarball, unpack it, run
|
||||||
tarball, unpack it, run <make menuconfig> (or any other *config),
|
<make menuconfig> (or any other *config), configure the kernel as per
|
||||||
configure the kernel as per
|
|
||||||
the book, and save the resulting .config file to a location where it can
|
the book, and save the resulting .config file to a location where it can
|
||||||
be retrieved later on (a convenient location and name is
|
be retrieved later on. It is suggested to put it into the source
|
||||||
$SRC_ARCHIVE/config-<arch>-<kernel version>-<config details>).
|
repository, with a versioned name, e.g.
|
||||||
|
/usr/src/config-<arch>-<kernel version>-<config details>.
|
||||||
|
|
||||||
Another file you may provide is the fstab file. To use it, select
|
Another file you may provide is the fstab file. As for the kernel
|
||||||
"Use a custom fstab file" in the menu interface, and enter the name of
|
configuration, this file has to be prepared before running the menu.
|
||||||
the file where asked. As for the kernel configuration, this file has to
|
You can copy-paste the file from the "Creating the /etc/fstab File"
|
||||||
be prepared before running the menu. A convenient location and name is
|
page, then edit to suit the future lfs system layout, then save the
|
||||||
$SRC_ARCHIVE/fstablfs.
|
file. A convenient location and name is /usr/src/fstablfs.
|
||||||
|
|
||||||
At a more advanced level, you may want to supply custom commands
|
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
|
to be run at the end of LFS build. Scripts containing those commands
|
||||||
are located in the ./custom/config directory. Examples are given in
|
are located in the ./custom/config directory. Examples are given in
|
||||||
./custom/examples. A template is provided as ./custom/template. See
|
./custom/examples. A template is provided as ./custom/template. See
|
||||||
README.CUSTOM for more details.
|
README.CUSTOM for more details.
|
||||||
|
@ -103,48 +99,170 @@
|
||||||
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
|
||||||
the Makefile. Furthermore, you are supposed to have enough privilege
|
the Makefile. Furthermore, you are supposed to have enough privilege
|
||||||
to become any user. If you are not bothered about security issues,
|
to become any user. If you are not bothered about security issues,
|
||||||
the entry for the user "jhalfs_user" in /etc/sudoers could be
|
the entry for the user running the tool in /etc/sudoers could be
|
||||||
jhalfs_user ALL=(ALL) NOPASSWD:ALL
|
<user> ALL=(ALL) NOPASSWD:ALL
|
||||||
|
|
||||||
The command <make> will launch a menu based configuration program. The
|
The command <make> will launch a menu based configuration program,
|
||||||
underlying menu code was borrowed from BusyBox and slightly modified for
|
similar to the kernel "menuconfig" configuration tool.
|
||||||
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 (type the
|
||||||
make use of that feature: it may contain additional information not
|
character `?' after highlighting the parameter). Please do use the help:
|
||||||
duplicated in this file.
|
it may contain additional information not duplicated in this file.
|
||||||
|
|
||||||
You should first choose which book and flavour you want to build. Note
|
MENU "BOOK Settings"
|
||||||
that when you choose the BLFS book, the tool will just install the BLFS
|
|
||||||
tool to your system. You'll have to run that installed tool to build
|
|
||||||
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.
|
|
||||||
|
|
||||||
The "General Settings" menu is where the "Build Directory" name is to be
|
Use BOOK: You have three choices: LFS System V, LFS systemd, BLFS.
|
||||||
entered. Other entries in that menu select what the tool should do. The
|
The BLFS part is described in README.BLFS
|
||||||
"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
|
Book version: You have two choices: "Branch" or "Working Copy"
|
||||||
selected. Two options, "Use a custom fstab file" and "Build the kernel",
|
Branch will have the tool clone the book's git repository. The
|
||||||
have been described above. "Do not use/display progress_bar", if set, will
|
choice of the branch (actually any git commit) or of the file
|
||||||
prevent a progress bar to be displayed during the build. That may be useful
|
location for the working copy is done in the next menu entry.
|
||||||
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
|
Multilib: Four choices: Normal LFS, Multilib with i686 libraries,
|
||||||
testing the build instructions or reporting build statistics. One useful
|
multilib with x32 libraries, multilib with all libraries.
|
||||||
option is "Optimization and parallelisation". It is not recommended to use
|
It is recommended to use "Normal LFS" unless you know what you
|
||||||
it for setting compiler optimization flags, although it is possible, but
|
are doing
|
||||||
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.
|
Build method: two choices: chroot (as in book), boot
|
||||||
|
Presently, the "boot" method is not implemented, so keep the default.
|
||||||
|
|
||||||
|
Add blfs-tools support (see README.BLFS)
|
||||||
|
This will 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.
|
||||||
|
|
||||||
|
Add custom tools support (see README.CUSTOM)
|
||||||
|
|
||||||
|
MENU "General Settings"
|
||||||
|
|
||||||
|
Build Directory: the name of the root of the LFS system
|
||||||
|
This is the equivalent of the LFS variable in the book. Set it
|
||||||
|
to "/mnt/lfs" if you have followed the book for creating the LFS
|
||||||
|
partition and mount point.
|
||||||
|
|
||||||
|
Retrieve source files: Say y to have jhalfs download the packages
|
||||||
|
If you say no, you must download the packages yourself and put
|
||||||
|
them into the /mnt/build_dir/sources directory. Follow book's
|
||||||
|
chapter 3 instructions.
|
||||||
|
If you say yes, you'll be asked several other questions:
|
||||||
|
- Package Archive Directory: Repository of downloaded packages
|
||||||
|
This directory, which is on the host and should be writable
|
||||||
|
by the user running the tool, is for storing downloaded packages.
|
||||||
|
If you keep the default "$SRC_ARCHIVE", you can set this variable
|
||||||
|
to the absolute path of the repository and export it. Or if the
|
||||||
|
variable is not set, jhalfs downloads the sources directly to
|
||||||
|
/mnt/build_dir/sources.
|
||||||
|
Instead of using the SRC_ARCHIVE envar, you can also enter the
|
||||||
|
path of the repository directory into this field.
|
||||||
|
- Retry on 'connection refused' failure: self explanatory
|
||||||
|
- Number of retry attempts on download failures: self explanatory
|
||||||
|
- Download timeout (in seconds): self explanatory
|
||||||
|
|
||||||
|
Run the makefile: start the build immediately after running the tool
|
||||||
|
This is not the preferred method: it is recommended to rather
|
||||||
|
run "make -C /mnt/build_dir/jhalfs" after the tool has finished
|
||||||
|
setting up the build. But this may be handy if you are sure everything
|
||||||
|
is well, and want to leave the tool and the build run without
|
||||||
|
supervision.
|
||||||
|
|
||||||
|
Rebuild files: clean up the /mnt/build_dir directory
|
||||||
|
Say n if you want to rerun the tool (to update generated scripts
|
||||||
|
for example) without removing what has already been done. Otherwise,
|
||||||
|
say y. Note that there are some guards against removing a directory
|
||||||
|
containing useful things, but double check that the /mnt/build_dir
|
||||||
|
directory is really what you want to erase.
|
||||||
|
|
||||||
|
MENU "Build Settings"
|
||||||
|
|
||||||
|
MENU Parallelism settings
|
||||||
|
- Use all cores:
|
||||||
|
If you say y, MAKEFLAGS will be set to "-j$(nproc)" at the
|
||||||
|
beginning of each script. Other envars are supposed to be passed
|
||||||
|
from the environment, as done in new books. Note that for old books,
|
||||||
|
this means the scripts using make or ninja will be run with all
|
||||||
|
cores, but not when this needs to set special envars like
|
||||||
|
TESTSUITEFLAGS. You can still define the number of cores used
|
||||||
|
in next field.
|
||||||
|
If you say n, you'll be asked for a static number of threads
|
||||||
|
to use.
|
||||||
|
- set of cpus to use, or 'all' for all cpus (only if using all cores):
|
||||||
|
You can define here the cores you want to use. See help for
|
||||||
|
details. This is the preferred way of reducing the number of cores
|
||||||
|
rather than using a static thread number.
|
||||||
|
- Number of parallel `make' jobs (only if not using all cores):
|
||||||
|
Every occurrence of $(nproc) in new books will be replaced with
|
||||||
|
the number entered here. Also MAKEFLAGS will be set to "-jN" (where
|
||||||
|
N is the number entered) at the beginning of each scripts. Furthermore
|
||||||
|
NINJAJOBS will be set to N in the environment. This allows to run all
|
||||||
|
books with N threads, except for paarts that need other envars to be
|
||||||
|
set
|
||||||
|
- Build Binutils pass1 without parallelism (Real SBU)
|
||||||
|
The standard SBU is defined as the time to run the binutils-pass1
|
||||||
|
build with only one thread. Saying y here allows to get a value for
|
||||||
|
it. If you say n, the value is not meaningful for SBU measurements.
|
||||||
|
|
||||||
|
Run testsuites: say y to run the test suites
|
||||||
|
You'll have the choice between running all the test suites, or only
|
||||||
|
those deemed critical (binutils, gmp, mpfr, mpc, and gcc).
|
||||||
|
|
||||||
|
Package management: see README.PACKAGE_MANAGEMENT
|
||||||
|
|
||||||
|
Create a log of installed files for each package: self explanatory
|
||||||
|
|
||||||
|
Strip Installed Binaries/Libraries: use the book instructions for
|
||||||
|
stripping
|
||||||
|
|
||||||
|
DO NOT use/display progress_bar (self explanatory)
|
||||||
|
|
||||||
|
MENU System configuration
|
||||||
|
|
||||||
|
Use a custom fstab file:
|
||||||
|
If you say y, you'll have to provide a file containing the fstab
|
||||||
|
for the LFS system. See above "preliminary tasks".
|
||||||
|
|
||||||
|
Build the kernel:
|
||||||
|
If you say y, you'll be asked for a file containing the kernel
|
||||||
|
configuration. See above "preliminary tasks".
|
||||||
|
|
||||||
|
Install non-wide-character ncurses (rarely used nowadays):
|
||||||
|
If you say y, the system will use instructions in the note on the
|
||||||
|
ncurses page to install those libraries.
|
||||||
|
|
||||||
|
TimeZone: set to the result of "tzselect"
|
||||||
|
|
||||||
|
Language: set to the result of the instructions on "The Bash Shell
|
||||||
|
Startup Files" page.
|
||||||
|
|
||||||
|
Install the full set of locales: installs all the locales known to
|
||||||
|
glibc.
|
||||||
|
|
||||||
|
Groff page size: choice between "A4" and "Letter".
|
||||||
|
|
||||||
|
Hostname: self explanatory
|
||||||
|
|
||||||
|
Network configuration: various fields for setting network. Look at
|
||||||
|
chapter 9 for background.
|
||||||
|
|
||||||
|
Console configuration: various fields for setting console, as described
|
||||||
|
in chapter 9.
|
||||||
|
|
||||||
|
MENU Advanced features:
|
||||||
|
|
||||||
|
Optimization: Optimization settings are done by editing files in the
|
||||||
|
"optimize" directory. The menu just allows you to choose between applying
|
||||||
|
optimizations only to the final chapter or to all the book. Say n for
|
||||||
|
a normal build
|
||||||
|
|
||||||
|
Create SBU and disk usage report: self explanatory
|
||||||
|
|
||||||
|
Save temporary system work: self explanatory (see help)
|
||||||
|
|
||||||
|
Run comparison analysis on final stage: build the system several times
|
||||||
|
using the preceding one, to test whether it is able to rebuild itself
|
||||||
|
identically. Don't use normally...
|
||||||
|
|
||||||
|
Internal Settings (WARNING: for jhalfs developers only): says it all
|
||||||
|
|
||||||
Once you have set the parameters and saved the configuration, the script
|
Once you have set the parameters and saved the configuration, the script
|
||||||
is launched. Its aim is to extract instructions from the selected book
|
is launched. Its aim is to extract instructions from the selected book
|
||||||
|
@ -275,21 +393,6 @@
|
||||||
boot build method where the final build may be done on a separate
|
boot build method where the final build may be done on a separate
|
||||||
machine.
|
machine.
|
||||||
|
|
||||||
Q. "What is the function of "User account" and "Group account" menu
|
|
||||||
settings?"
|
|
||||||
A. If you are running jhalfs from a low or non-privileged account you may
|
|
||||||
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.
|
|
||||||
|
|
||||||
These variables are adjustable also when invoking make:
|
|
||||||
|
|
||||||
cd $BUILDDIR; make LUSER=myaccount LGROUP=mygroup
|
|
||||||
|
|
||||||
The only changes to your account will be the creation of a NEW .bashrc
|
|
||||||
after saving your original to .bashrc.XXX
|
|
||||||
|
|
||||||
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
|
||||||
as the break point. For example:
|
as the break point. For example:
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
extension-element-prefixes="exsl"
|
extension-element-prefixes="exsl"
|
||||||
version="1.0">
|
version="1.0">
|
||||||
|
|
||||||
|
<xsl:param name="jobs_2" select="1"/>
|
||||||
|
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
<xsl:apply-templates select="//sect1"/>
|
<xsl:apply-templates select="//sect1"/>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
@ -55,6 +57,13 @@
|
||||||
<xsl:template name="extract-chroot">
|
<xsl:template name="extract-chroot">
|
||||||
<xsl:param name="instructions" select="''"/>
|
<xsl:param name="instructions" select="''"/>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
|
<xsl:when test="contains($instructions, '$(nproc || echo 1)')">
|
||||||
|
<xsl:call-template name="extract-chroot">
|
||||||
|
<xsl:with-param
|
||||||
|
name="instructions"
|
||||||
|
select="concat(substring-before($instructions, '$(nproc || echo 1)'), $jobs_2, substring-after($instructions, '$(nproc || echo 1)'))"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
<xsl:when test="not(starts-with($instructions,'
chroot')) and
|
<xsl:when test="not(starts-with($instructions,'
chroot')) and
|
||||||
contains($instructions, '
chroot')">
|
contains($instructions, '
chroot')">
|
||||||
<xsl:call-template name="extract-chroot">
|
<xsl:call-template name="extract-chroot">
|
||||||
|
|
|
@ -16,9 +16,69 @@
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="userinput">
|
<xsl:template match="userinput">
|
||||||
<xsl:apply-templates/>
|
<xsl:call-template name="check-mount">
|
||||||
|
<xsl:with-param name="mytext" select="string()"/>
|
||||||
|
</xsl:call-template>
|
||||||
<xsl:text>
|
<xsl:text>
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template name="check-mount">
|
||||||
|
<xsl:param name="mytext" select="''"/>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="contains($mytext,'
')">
|
||||||
|
<xsl:call-template name="check-mount">
|
||||||
|
<xsl:with-param name="mytext"
|
||||||
|
select="substring-before($mytext,'
')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:text>
</xsl:text>
|
||||||
|
<xsl:call-template name="check-mount">
|
||||||
|
<xsl:with-param name="mytext"
|
||||||
|
select="substring-after($mytext,'
')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="starts-with(normalize-space($mytext),'mountpoint')">
|
||||||
|
<xsl:copy-of select="$mytext"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="starts-with(normalize-space($mytext),'mount')">
|
||||||
|
<xsl:variable name="mountpoint">
|
||||||
|
<xsl:call-template name="last-arg">
|
||||||
|
<xsl:with-param name="myline" select="$mytext"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:text>mountpoint -q </xsl:text>
|
||||||
|
<xsl:copy-of select="$mountpoint"/>
|
||||||
|
<xsl:text> || </xsl:text>
|
||||||
|
<xsl:copy-of select="$mytext"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="starts-with(normalize-space($mytext),'umount')">
|
||||||
|
<xsl:variable name="mountpoint">
|
||||||
|
<xsl:call-template name="last-arg">
|
||||||
|
<xsl:with-param name="myline" select="$mytext"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:text>mountpoint -q </xsl:text>
|
||||||
|
<xsl:copy-of select="$mountpoint"/>
|
||||||
|
<xsl:text> && </xsl:text>
|
||||||
|
<xsl:copy-of select="$mytext"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:copy-of select="$mytext"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template name="last-arg">
|
||||||
|
<xsl:param name="myline" select="''"/>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="contains($myline,' ')">
|
||||||
|
<xsl:call-template name="last-arg">
|
||||||
|
<xsl:with-param name="myline" select="substring-after($myline,' ')"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:copy-of select="$myline"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
|
|
@ -63,6 +63,13 @@ extract_commands() { #
|
||||||
fi
|
fi
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|
||||||
|
if [ "$ALL_CORES" = "y" ]; then
|
||||||
|
JOBS="\$(nproc)"
|
||||||
|
else
|
||||||
|
JOBS="$N_PARALLEL"
|
||||||
|
fi
|
||||||
|
if [ "$REALSBU" = y ]; then JOBSBP1=1; else JOBSBP1="$JOBS"; fi
|
||||||
|
|
||||||
# First profile the book, for revision and arch. Note that
|
# First profile the book, for revision and arch. Note that
|
||||||
# MULTIBLIB is set to "default" if pure 64 bit book. In this case,
|
# MULTIBLIB is set to "default" if pure 64 bit book. In this case,
|
||||||
# profiling on arch is useless, but does not hurt either.
|
# profiling on arch is useless, but does not hurt either.
|
||||||
|
@ -102,6 +109,8 @@ extract_commands() { #
|
||||||
--stringparam local "$LOCAL" \
|
--stringparam local "$LOCAL" \
|
||||||
--stringparam log-level "$LOG_LEVEL" \
|
--stringparam log-level "$LOG_LEVEL" \
|
||||||
--stringparam script-root "$SCRIPT_ROOT" \
|
--stringparam script-root "$SCRIPT_ROOT" \
|
||||||
|
--stringparam jobs "$JOBS" \
|
||||||
|
--stringparam jobs-bp1 "$JOBSBP1" \
|
||||||
--output "./${COMMANDS}/" \
|
--output "./${COMMANDS}/" \
|
||||||
$XSL \
|
$XSL \
|
||||||
prbook.xml >> $LOGDIR/$LOG 2>&1
|
prbook.xml >> $LOGDIR/$LOG 2>&1
|
||||||
|
@ -141,6 +150,7 @@ create_chroot_scripts() { #
|
||||||
if [ ! -z $ARCH ] ; then echo -n " $ARCH" ; fi
|
if [ ! -z $ARCH ] ; then echo -n " $ARCH" ; fi
|
||||||
echo -n "... "
|
echo -n "... "
|
||||||
xsltproc --nonet --xinclude \
|
xsltproc --nonet --xinclude \
|
||||||
|
--stringparam jobs_2 "$JOBS_2" \
|
||||||
-o chroot-scripts/ chroot.xsl \
|
-o chroot-scripts/ chroot.xsl \
|
||||||
$BOOK/chapter0?/*chroot*.xml >> $LOGDIR/$LOG 2>&1
|
$BOOK/chapter0?/*chroot*.xml >> $LOGDIR/$LOG 2>&1
|
||||||
echo "done"
|
echo "done"
|
||||||
|
|
|
@ -22,9 +22,11 @@ wrt_compare_targets() { #
|
||||||
local dir
|
local dir
|
||||||
printf -v dir chapter%02d "$1"
|
printf -v dir chapter%02d "$1"
|
||||||
|
|
||||||
sed -i '/userdel/d' $dir/*revised*
|
REVISED=cleanup
|
||||||
|
if ls $dir/*revised* 2>/dev/null; then REVISED=revised; fi
|
||||||
|
sed -i '/userdel/d' $dir/*$REVISED*
|
||||||
for (( N = 2; N < ITERATIONS; N++ )); do
|
for (( N = 2; N < ITERATIONS; N++ )); do
|
||||||
sed -i '/userdel/d' $dir-build_$N/*revised*
|
sed -i '/userdel/d' $dir-build_$N/*$REVISED*
|
||||||
done
|
done
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,8 +132,6 @@ create_urls() { #
|
||||||
|
|
||||||
echo -n "Creating URLs file... "
|
echo -n "Creating URLs file... "
|
||||||
xsltproc --nonet --xinclude \
|
xsltproc --nonet --xinclude \
|
||||||
--stringparam server "$SERVER" \
|
|
||||||
--stringparam family lfs \
|
|
||||||
--stringparam pkgmngt "$PKGMNGT" \
|
--stringparam pkgmngt "$PKGMNGT" \
|
||||||
--stringparam revision "$INITSYS" \
|
--stringparam revision "$INITSYS" \
|
||||||
--output ../sources/urls.lst \
|
--output ../sources/urls.lst \
|
||||||
|
|
|
@ -136,8 +136,9 @@ STATS=n
|
||||||
SRC_ARCHIVE=/sources
|
SRC_ARCHIVE=/sources
|
||||||
BUILD_ROOT=/sources
|
BUILD_ROOT=/sources
|
||||||
BUILD_SUBDIRS=y
|
BUILD_SUBDIRS=y
|
||||||
JOBS=$(if [ -n "$N_PARALLEL" ]; then echo $N_PARALLEL; else echo 1; fi)
|
JOBS=$(if [ "$ALL_CORES" = y ]; then echo 0; else echo $N_PARALLEL; fi)
|
||||||
EOF
|
EOF
|
||||||
|
# The 0 value above is for using all cores
|
||||||
for OPT_VAR in CFLAGS CXXFLAGS LDFLAGS; do
|
for OPT_VAR in CFLAGS CXXFLAGS LDFLAGS; do
|
||||||
eval optVal=\$${OPT_VAR}_$DEF_OPT_MODE
|
eval optVal=\$${OPT_VAR}_$DEF_OPT_MODE
|
||||||
if [ -n "$optVal" ] && [ "$optVal" != unset ]; then
|
if [ -n "$optVal" ] && [ "$optVal" != unset ]; then
|
||||||
|
@ -179,7 +180,6 @@ 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 \{\} \;
|
||||||
if [ "$GETPKG" = "y" ]; then
|
if [ "$GETPKG" = "y" ]; then
|
||||||
JH_FTP_SERVER=$SERVER/pub/blfs/ \
|
|
||||||
JH_SRC_ARCHIVE=${SRC_ARCHIVE:-/dev/null} \
|
JH_SRC_ARCHIVE=${SRC_ARCHIVE:-/dev/null} \
|
||||||
$BUILDDIR$BLFS_ROOT/download_script
|
$BUILDDIR$BLFS_ROOT/download_script
|
||||||
else # Save the download script in case the user wants to run it later
|
else # Save the download script in case the user wants to run it later
|
||||||
|
@ -218,10 +218,10 @@ pushd $BUILDDIR$BLFS_ROOT/work
|
||||||
# installation, using libxslt, which is not installed yet. So move
|
# installation, using libxslt, which is not installed yet. So move
|
||||||
# updating to the end of the process, adding an 'update' target
|
# updating to the end of the process, adding an 'update' target
|
||||||
sed -i -e '/xsltproc/,+6d' \
|
sed -i -e '/xsltproc/,+6d' \
|
||||||
-e '/^all/s@$@ update@' \
|
-e '/^all/i update:' \
|
||||||
-e 's/touch/@touch/' Makefile
|
-e 's/touch/@touch/' Makefile
|
||||||
cat >> Makefile << EOF
|
cat >> Makefile << EOF
|
||||||
update:
|
update: all
|
||||||
@echo Updating the tracking file
|
@echo Updating the tracking file
|
||||||
@for pack in \$\$(grep '<productname' ../$LFS_XML/tmp/lfs-full.xml | \\
|
@for pack in \$\$(grep '<productname' ../$LFS_XML/tmp/lfs-full.xml | \\
|
||||||
sed 's/.*>\([^<]*\)<.*/\1/' | \\
|
sed 's/.*>\([^<]*\)<.*/\1/' | \\
|
||||||
|
|
|
@ -18,7 +18,7 @@ inline_doc
|
||||||
# Common settings by Config.in sections and books family
|
# Common settings by Config.in sections and books family
|
||||||
local -r BOOK_common="COMMIT BOOK CUSTOM_TOOLS"
|
local -r BOOK_common="COMMIT BOOK CUSTOM_TOOLS"
|
||||||
local -r GENERAL_common="LUSER LGROUP LHOME BUILDDIR CLEAN GETPKG SRC_ARCHIVE \
|
local -r GENERAL_common="LUSER LGROUP LHOME BUILDDIR CLEAN GETPKG SRC_ARCHIVE \
|
||||||
SERVER RETRYSRCDOWNLOAD RETRYDOWNLOADCNT DOWNLOADTIMEOUT \
|
RETRYSRCDOWNLOAD RETRYDOWNLOADCNT DOWNLOADTIMEOUT \
|
||||||
RUNMAKE"
|
RUNMAKE"
|
||||||
local -r BUILD_chroot="TEST STRIP"
|
local -r BUILD_chroot="TEST STRIP"
|
||||||
local -r BUILD_common="FSTAB CONFIG TIMEZONE PAGE LANG INSTALL_LOG"
|
local -r BUILD_common="FSTAB CONFIG TIMEZONE PAGE LANG INSTALL_LOG"
|
||||||
|
@ -29,13 +29,13 @@ inline_doc
|
||||||
local -r LFS_book="$BOOK_common INITSYS BLFS_TOOL"
|
local -r LFS_book="$BOOK_common INITSYS BLFS_TOOL"
|
||||||
|
|
||||||
# Build Settings by book
|
# Build Settings by book
|
||||||
local -r LFS_build="$BUILD_chroot NCURSES5 DEL_LA_FILES $BUILD_common PKGMNGT FULL_LOCALE WRAP_INSTALL"
|
local -r LFS_build="$BUILD_chroot NCURSES5 $BUILD_common PKGMNGT FULL_LOCALE WRAP_INSTALL"
|
||||||
|
|
||||||
# System Settings by book
|
# System Settings by book
|
||||||
local -r LFS_system="HOSTNAME INTERFACE IP_ADDR GATEWAY PREFIX BROADCAST DOMAIN DNS1 DNS2 FONT KEYMAP LOCAL LOG_LEVEL"
|
local -r LFS_system="HOSTNAME INTERFACE IP_ADDR GATEWAY PREFIX BROADCAST DOMAIN DNS1 DNS2 FONT KEYMAP LOCAL LOG_LEVEL"
|
||||||
|
|
||||||
# Full list of books settings
|
# Full list of books settings
|
||||||
local -r lfs_PARAM_LIST="$LFS_book $GENERAL_common $LFS_build $LFS_system $ADVANCED_chroot N_PARALLEL REALSBU SAVE_CH5 $ADVANCED_common"
|
local -r lfs_PARAM_LIST="$LFS_book $GENERAL_common $LFS_build $LFS_system $ADVANCED_chroot ALL_CORES CPUSET N_PARALLEL REALSBU SAVE_CH5 $ADVANCED_common"
|
||||||
# local -r blfs_PARAM_LIST="BRANCH_ID BLFS_ROOT BLFS_XML TRACKING_DIR"
|
# local -r blfs_PARAM_LIST="BRANCH_ID BLFS_ROOT BLFS_XML TRACKING_DIR"
|
||||||
|
|
||||||
# Additional variables
|
# Additional variables
|
||||||
|
@ -129,12 +129,11 @@ inline_doc
|
||||||
ITERATIONS) [[ "$COMPARE" = "y" ]] && echo -e "`eval echo $PARAM_VALS`" ;;
|
ITERATIONS) [[ "$COMPARE" = "y" ]] && echo -e "`eval echo $PARAM_VALS`" ;;
|
||||||
TARGET32) [[ -n "${TARGET32}" ]] && echo -e "`eval echo $PARAM_VALS`" ;;
|
TARGET32) [[ -n "${TARGET32}" ]] && echo -e "`eval echo $PARAM_VALS`" ;;
|
||||||
MIPS_LEVEL) [[ "${ARCH}" = "mips" ]] && echo -e "`eval echo $PARAM_VALS`" ;;
|
MIPS_LEVEL) [[ "${ARCH}" = "mips" ]] && echo -e "`eval echo $PARAM_VALS`" ;;
|
||||||
SERVER) [[ "$GETPKG" = "y" ]] && echo -e "`eval echo $PARAM_VALS`" ;;
|
|
||||||
RETRYSRCDOWNLOAD) [[ "$GETPKG" = "y" ]] && echo -e "`eval echo $PARAM_VALS`" ;;
|
RETRYSRCDOWNLOAD) [[ "$GETPKG" = "y" ]] && echo -e "`eval echo $PARAM_VALS`" ;;
|
||||||
RETRYDOWNLOADCNT) [[ "$GETPKG" = "y" ]] && echo -e "`eval echo $PARAM_VALS`" ;;
|
RETRYDOWNLOADCNT) [[ "$GETPKG" = "y" ]] && echo -e "`eval echo $PARAM_VALS`" ;;
|
||||||
DOWNLOADTIMEOUT) [[ "$GETPKG" = "y" ]] && echo -e "`eval echo $PARAM_VALS`" ;;
|
DOWNLOADTIMEOUT) [[ "$GETPKG" = "y" ]] && echo -e "`eval echo $PARAM_VALS`" ;;
|
||||||
N_PARALLEL) [[ "$OPTIMIZE" -gt "0" ]] && echo -e "`eval echo $PARAM_VALS`" ;;
|
CPUSET) [[ "$HAVE_CGROUP" = "y" ]] && [[ "$ALL_CORES" = "y" ]] && echo -e "`eval echo $PARAM_VALS`" ;;
|
||||||
REALSBU) [[ "$OPTIMIZE" = "2" ]] && echo -e "`eval echo $PARAM_VALS`" ;;
|
N_PARALLEL) [[ "$ALL_CORES" = "n" ]] && echo -e "`eval echo $PARAM_VALS`" ;;
|
||||||
|
|
||||||
# Envars that requires some validation
|
# Envars that requires some validation
|
||||||
LUSER) echo -e "`eval echo $PARAM_VALS`"
|
LUSER) echo -e "`eval echo $PARAM_VALS`"
|
||||||
|
@ -167,7 +166,7 @@ inline_doc
|
||||||
BOOT_CONFIG) [[ "${METHOD}" = "boot" ]] && validate_file -z -e -s ;;
|
BOOT_CONFIG) [[ "${METHOD}" = "boot" ]] && validate_file -z -e -s ;;
|
||||||
|
|
||||||
# Treatment of LANG parameter
|
# Treatment of LANG parameter
|
||||||
LANG ) # See it the locale value has been set
|
LANG ) # See if the locale value has been set
|
||||||
echo -n "`eval echo $PARAM_VALS`"
|
echo -n "`eval echo $PARAM_VALS`"
|
||||||
[[ -z "${!config_param}" ]] &&
|
[[ -z "${!config_param}" ]] &&
|
||||||
echo " -- Variable $config_param cannot be empty!" &&
|
echo " -- Variable $config_param cannot be empty!" &&
|
||||||
|
|
|
@ -44,6 +44,7 @@ ADD_CUSTOM_TOOLS = $CUSTOM_TOOLS
|
||||||
ADD_BLFS_TOOLS = $BLFS_TOOL
|
ADD_BLFS_TOOLS = $BLFS_TOOL
|
||||||
PKGMNGT = $PKGMNGT
|
PKGMNGT = $PKGMNGT
|
||||||
WRAP_INSTALL = $WRAP_INSTALL
|
WRAP_INSTALL = $WRAP_INSTALL
|
||||||
|
CPUSET = $CPUSET
|
||||||
|
|
||||||
|
|
||||||
export PATH := \${PATH}:/usr/sbin
|
export PATH := \${PATH}:/usr/sbin
|
||||||
|
|
36
common/run-in-cgroup.sh
Executable file
36
common/run-in-cgroup.sh
Executable file
|
@ -0,0 +1,36 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -z "$CPUSPEC" ] || [ "$#" -lt 1 ]; then
|
||||||
|
echo "usage: CPUSPEC=... $0 command"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
ARGS="$@"
|
||||||
|
|
||||||
|
set +e
|
||||||
|
|
||||||
|
if type systemd-run >/dev/null 2>&1 ; then # systemd
|
||||||
|
sudo systemd-run -G --pty -d --uid=$(whoami) \
|
||||||
|
-p AllowedCPUs="$CPUSPEC" \
|
||||||
|
--slice "user-$(whoami).slice" \
|
||||||
|
"$@"
|
||||||
|
elif type loginctl >/dev/null 2>&1 ; then #elogind
|
||||||
|
sudo mkdir /sys/fs/cgroup/jhalfs
|
||||||
|
sudo sh -c "echo +cpuset > /sys/fs/cgroup/cgroup.subtree_control"
|
||||||
|
(
|
||||||
|
sudo sh -c "echo $BASHPID > /sys/fs/cgroup/jhalfs/cgroup.procs"
|
||||||
|
sudo sh -c "
|
||||||
|
SESS_CGROUP=/sys/fs/cgroup/\$XDG_SESSION_ID
|
||||||
|
echo $CPUSPEC > \$SESS_CGROUP/cpuset.cpus
|
||||||
|
( echo \$BASHPID > \$SESS_CGROUP/cgroup.procs &&
|
||||||
|
exec sudo -u $(whoami) $ARGS )"
|
||||||
|
)
|
||||||
|
sudo rmdir /sys/fs/cgroup/jhalfs
|
||||||
|
else # no session manager
|
||||||
|
sudo mkdir /sys/fs/cgroup/jhalfs
|
||||||
|
sudo sh -c "echo +cpuset > /sys/fs/cgroup/cgroup.subtree_control"
|
||||||
|
sudo sh -c "echo \"$CPUSPEC\" > /sys/fs/cgroup/jhalfs/cpuset.cpus"
|
||||||
|
(sudo sh -c "echo $BASHPID > /sys/fs/cgroup/jhalfs/cgroup.procs" &&
|
||||||
|
exec "$@")
|
||||||
|
sudo rmdir /sys/fs/cgroup/jhalfs
|
||||||
|
fi
|
|
@ -5,9 +5,6 @@
|
||||||
|
|
||||||
<xsl:output method="text"/>
|
<xsl:output method="text"/>
|
||||||
|
|
||||||
<!-- The FTP server used as fallback -->
|
|
||||||
<xsl:param name="server">ftp://ftp.osuosl.org</xsl:param>
|
|
||||||
|
|
||||||
<!-- Do we use a package manager? -->
|
<!-- Do we use a package manager? -->
|
||||||
<xsl:param name="pkgmngt" select="'n'"/>
|
<xsl:param name="pkgmngt" select="'n'"/>
|
||||||
|
|
||||||
|
|
13
jhalfs
13
jhalfs
|
@ -102,7 +102,7 @@ git_commit=$(git log -1 --format=format:"%h %ad")
|
||||||
version="
|
version="
|
||||||
${BOLD} \"jhalfs\"${OFF} builder tool (development) $git_commit
|
${BOLD} \"jhalfs\"${OFF} builder tool (development) $git_commit
|
||||||
|
|
||||||
Copyright (C) 2005-2021, the jhalfs team:
|
Copyright (C) 2005-2023, the jhalfs team:
|
||||||
Jeremy Huntwork
|
Jeremy Huntwork
|
||||||
George Boudreau
|
George Boudreau
|
||||||
Manuel Canales Esparcia
|
Manuel Canales Esparcia
|
||||||
|
@ -175,6 +175,7 @@ SET_MISC=${SET_MISC:=n}
|
||||||
SET_BLOWFISH=${SET_BLOWFISH:=n}
|
SET_BLOWFISH=${SET_BLOWFISH:=n}
|
||||||
UNICODE=${UNICODE:=n}
|
UNICODE=${UNICODE:=n}
|
||||||
LOCAL=${LOCAL:=n}
|
LOCAL=${LOCAL:=n}
|
||||||
|
ALL_CORES=${ALL_CORES:=n}
|
||||||
REALSBU=${REALSBU:=n}
|
REALSBU=${REALSBU:=n}
|
||||||
SAVE_CH5=${SAVE_CH5:=n}
|
SAVE_CH5=${SAVE_CH5:=n}
|
||||||
|
|
||||||
|
@ -287,12 +288,14 @@ if [[ "$OPTIMIZE" != "0" ]]; then
|
||||||
#
|
#
|
||||||
# optimize configurations
|
# optimize configurations
|
||||||
load_file optimize/opt_config 'Loading optimization config'
|
load_file optimize/opt_config 'Loading optimization config'
|
||||||
# The number of parallel jobs is taken from configuration now
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
JH_MAKEFLAGS="-j${N_PARALLEL}"
|
|
||||||
# Validate optimize settings, if required
|
# Validate optimize settings, if required
|
||||||
validate_opt_settings
|
validate_opt_settings
|
||||||
fi
|
fi
|
||||||
|
# Parallelization is outside optimization, because it is now in the book
|
||||||
|
if [[ "$ALL_CORES" = "n" ]]; then
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
JH_MAKEFLAGS="-j${N_PARALLEL}"
|
||||||
|
fi
|
||||||
#
|
#
|
||||||
|
|
||||||
if [[ "$REBUILD_MAKEFILE" = "n" ]] ; then
|
if [[ "$REBUILD_MAKEFILE" = "n" ]] ; then
|
||||||
|
@ -320,7 +323,7 @@ if [[ "$REBUILD_MAKEFILE" = "n" ]] ; then
|
||||||
true >"$LOGDIR/$LOG"
|
true >"$LOGDIR/$LOG"
|
||||||
|
|
||||||
# Copy common helper files
|
# Copy common helper files
|
||||||
cp "$COMMON_DIR"/{makefile-functions,progress_bar.sh} "$JHALFSDIR/"
|
cp "$COMMON_DIR"/{makefile-functions,progress_bar.sh,run-in-cgroup.sh} "$JHALFSDIR/"
|
||||||
|
|
||||||
# Copy needed stylesheets
|
# Copy needed stylesheets
|
||||||
cp "$COMMON_DIR"/{packages.xsl,chroot.xsl,kernfs.xsl} "$JHALFSDIR/"
|
cp "$COMMON_DIR"/{packages.xsl,chroot.xsl,kernfs.xsl} "$JHALFSDIR/"
|
||||||
|
|
|
@ -16,9 +16,8 @@ validate_opt_settings() { # Show optimize setting and wait user agreeme
|
||||||
echo -e "expected, please rebuild without optimizations before"
|
echo -e "expected, please rebuild without optimizations before"
|
||||||
echo -e "asking for support.${OFF}\n"
|
echo -e "asking for support.${OFF}\n"
|
||||||
|
|
||||||
echo -e "MAKEFLAGS: ${L_arrow}${BOLD}${JH_MAKEFLAGS}${OFF}${R_arrow}"
|
# [ -n "$JH_MAKEFLAGS" ] && \
|
||||||
[ -n "$JH_MAKEFLAGS" ] && \
|
# echo -e "BLACK_LIST: ${L_arrow}${BOLD}${BLACK_LIST}${OFF}${R_arrow}\n"
|
||||||
echo -e "BLACK_LIST: ${L_arrow}${BOLD}${BLACK_LIST}${OFF}${R_arrow}\n"
|
|
||||||
|
|
||||||
echo -e "DEF_OPT_MODE: ${L_arrow}${BOLD}${DEF_OPT_MODE}${OFF}${R_arrow}\n"
|
echo -e "DEF_OPT_MODE: ${L_arrow}${BOLD}${DEF_OPT_MODE}${OFF}${R_arrow}\n"
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,7 @@ PACKAGE=${PACKAGE,,}
|
||||||
# name is not normalized, several hacks are necessary (now in function
|
# name is not normalized, several hacks are necessary (now in function
|
||||||
# extract_version)...
|
# extract_version)...
|
||||||
VERSION=$(extract_version $PCKGVRS)
|
VERSION=$(extract_version $PCKGVRS)
|
||||||
porg -+ -lp ${PACKAGE}-${VERSION} sh -e << PORG_EOF
|
porg -+ -lp ${PACKAGE}-${VERSION} -- sh -e << PORG_EOF
|
||||||
$*
|
$*
|
||||||
PORG_EOF
|
PORG_EOF
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue