Compare commits

...

24 Commits

Author SHA1 Message Date
Pierre Labastie e967368f98 Fix generation of chroot instructions for newer LFS book 2018-05-12 11:29:29 +00:00
Pierre Labastie 56a5508dcd Merge trunk r4041,4042 2018-03-10 20:48:52 +00:00
Pierre Labastie 4cd2611b21 The preceding merge added a
line concerning porg, which is not in version 2.4...
2018-03-10 20:29:49 +00:00
Pierre Labastie 72063a43b4 merge trunk r4040 and r4044 to 2.4 branch 2018-03-10 20:01:55 +00:00
Pierre Labastie 0313634ea2 Merge trunk r4024 and r4039, fixing generation of Makefile and of
DESTDIR install for libelf
2018-03-10 19:59:20 +00:00
Pierre Labastie 61b7c59ffa Typos and remove a now useless instruction 2018-01-07 18:30:48 +00:00
Pierre Labastie 90bfcb92bf Do not set LC_ALL in BLFS/envars.conf,
> and rely on the user setting an UTF-8 locale
2017-11-19 17:33:34 +00:00
Pierre Labastie 8d07ea6f31 Remove characters that are illegal in filenames from external deps 2017-09-14 17:09:02 +00:00
Pierre Labastie caee4dff7c Merge trunk r3990 2017-08-09 14:06:53 +00:00
Pierre Labastie b99e56a0e9 Merge trunk r3986: common/libs/func_install_blfs:
Honour-variables-set-in-jhalfs
2017-08-09 13:49:14 +00:00
Pierre Labastie 9f6ceb0caf Merge trunk rev 3984:
BLFS/xsl/gen_pkg_list.xsl: misalignned closing tag
2017-08-09 13:33:55 +00:00
Pierre Labastie ed9acf79d4 Merge trunk rev 3982: BLFS/Makefile:
-  Do not call make after inititalizing the tracking file
-  Remove the <package-version> file from tracking dir after using it
-  Fix a typo
2017-08-09 13:29:01 +00:00
Pierre Labastie 3917eca81c Allow non-numeric version in glibc 2017-07-11 16:22:35 +00:00
Pierre Labastie f7d138607b Package management: compute times and sizes without packing times and sizes 2017-07-04 13:01:13 +00:00
Pierre Labastie 6a7c2181fc merge trunk r3972-3973 2017-06-29 17:01:00 +00:00
Pierre Labastie e2182051f6 Quote bash variables in arguments to --stringparam for xsltproc 2017-06-29 14:15:36 +00:00
Pierre Labastie 4954fdff01 Use BUILD_DIR and SRC_DIR in bootscripts/systemd-units download instructions 2017-06-29 08:22:13 +00:00
Pierre Labastie b37d5e3f0a Merge trunk-r3965 2017-06-11 10:55:12 +00:00
Pierre Labastie b9f1fcf1ad Fix lfs.xsl parameter defaults 2017-05-02 08:47:40 +00:00
Pierre Labastie 1503465db4 Merge trunk r3962 2017-05-02 08:36:55 +00:00
Pierre Labastie 5b0b1f2772 Copy the right file to SRC_ARCHIVE when "Retrieve source files" is on
and "Add blfs-tool support" is on: only $PACKAGE{,1} files were copied.
2017-04-10 08:32:56 +00:00
Pierre Labastie 95221541ab Create 2.4 branch to prepare bug fix release(s) 2.4.x 2017-04-10 08:11:05 +00:00
Pierre Labastie d9a0beb19b Fix version information for stable release 2017-04-08 09:33:44 +00:00
Pierre Labastie 90493395cd Create the 2.4 release tag 2017-04-08 09:29:18 +00:00
21 changed files with 242 additions and 161 deletions

View File

@ -1,5 +1,5 @@
# From the Build Scripts Written By: Jim Gifford <lfs@jg555.com>
# Modified By: Joe Ciccone <jciccone@linuxfromscratch.org
# Modified By: Joe Ciccone <jciccone@linuxfromscratch.org>
# Additional changes: George Boudreau <georgeb@linuxfromscratch.org>
# Pierre Labastie <pierre.labastie at neuf.fr>
@ -111,11 +111,10 @@ $(PACK_LIST): $(XSLDIR)/gen_pkg_list.xsl $(XSLDIR)/specialCases.xsl $(TRACKFILE)
$(TRACKFILE): $(TRACKING_DIR)
$(Q)if ! [ -f $@ ]; then \
echo Initializing $(TRACKFILE) && \
/bin/echo -e '$(INITIAL_TRACK)' > $@ && \
$(MAKE) $(PACK_LIST); \
/bin/echo -e '$(INITIAL_TRACK)' > $@; \
fi
$(Q)for track in $(TRACKING_DIR)/*-*; do \
if [ -f $$track ]; then \
if [ -f $$track ]; then \
pack=$$(echo $$track | sed 's@.*/\(.*\)-[0-9c].*@\1@') && \
version=$$(echo $$track | sed 's@.*-\([0-9c].*\)@\1@') && \
xsltproc --stringparam packages $(PACK_LIST) \
@ -124,7 +123,8 @@ $(TRACKFILE): $(TRACKING_DIR)
-o track.tmp $(XSLDIR)/bump.xsl $@ && \
sed -i 's@PACKDESC@$(TOPDIR)/packdesc.dtd@' track.tmp && \
xmllint --format --postvalid track.tmp > $@; \
fi; \
fi; \
rm -f $$track; \
done; \
rm -f track.tmp

View File

@ -32,8 +32,10 @@ unset SRC_SUBDIRS
# 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
# sourced at the end of this file. Note that LC_ALL takes
# precedence over LANG. As of {B,}LFS 8.1, this setting is
# not needed...
# export LC_ALL=C
#--- Server used if the file isn't found in SRC_DIR,
# and cannot be downloaded from upstream.

View File

@ -178,7 +178,7 @@ done
echo -en "\n\tGenerating the build scripts ...\n"
rm -rf scripts
xsltproc --xinclude --nonet \
--stringparam sudo $SUDO \
--stringparam sudo "$SUDO" \
-o ./scripts/ ${MakeScripts} \
${BookXml}
# Make the scripts executable.

View File

@ -90,7 +90,7 @@
<package><xsl:text>&#xA; </xsl:text>
<xsl:element name="name">
<xsl:value-of select="normalize-space(title)"/>
</xsl:element>
</xsl:element>
<xsl:text>&#xA;</xsl:text>
<!-- Do not use .//*, which would include self. -->
<xsl:apply-templates
@ -286,7 +286,7 @@
<xsl:value-of select="$status"/>
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="translate(normalize-space(text()),' ','-')"/>
<xsl:value-of select="translate(normalize-space(text()),' /,()','-----')"/>
</xsl:attribute>
<xsl:attribute name="type">link</xsl:attribute>
</xsl:element>

View File

@ -426,39 +426,37 @@ fi
<xsl:template name="set-bootpkg-dir">
<xsl:param name="bootpkg" select="'bootscripts'"/>
<xsl:param name="url" select="''"/>
<xsl:text>[[ ! -d $SRC_DIR/blfs-</xsl:text>
<xsl:copy-of select="$bootpkg"/>
<xsl:text> ]] &amp;&amp; mkdir $SRC_DIR/blfs-</xsl:text>
<xsl:copy-of select="$bootpkg"/>
<xsl:text>
pushd $SRC_DIR/blfs-</xsl:text>
<xsl:text>BOOTPKG_DIR=blfs-</xsl:text>
<xsl:copy-of select="$bootpkg"/>
<xsl:text>
BOOTSRC_DIR=${SRC_ARCHIVE}${SRC_SUBDIRS:+/${BOOTPKG_DIR}}
BOOTBUILD_DIR=${BUILD_ROOT}${BUILD_SUBDIRS:+/${BOOTPKG_DIR}}
mkdir -p $BOOTSRC_DIR
mkdir -p $BOOTBUILD_DIR
pushd $BOOTSRC_DIR
URL=</xsl:text>
<xsl:value-of select="$url"/>
<xsl:text>
BOOTPACKG=$(basename $URL)
if [[ ! -f $BOOTPACKG ]] ; then
if [[ -f $SRC_ARCHIVE/$PKG_DIR/$BOOTPACKG ]] ; then
cp $SRC_ARCHIVE/$PKG_DIR/$BOOTPACKG $BOOTPACKG
elif [[ -f $SRC_ARCHIVE/$BOOTPACKG ]] ; then
if [[ -f $SRC_ARCHIVE/$BOOTPACKG ]] ; then
cp $SRC_ARCHIVE/$BOOTPACKG $BOOTPACKG
else
wget -T 30 -t 5 $URL
cp $BOOTPACKG $SRC_ARCHIVE
fi
rm -f unpacked
rm -f $BOOTBUILD_DIR/unpacked
fi
cd $BOOTBUILD_DIR
if [[ -e unpacked ]] ; then
BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
if ! [[ -d $BOOTUNPACKDIR ]]; then
rm unpacked
tar -xvf $BOOTPACKG > unpacked
tar -xvf $BOOTSRC_DIR/$BOOTPACKG > unpacked
BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
fi
else
tar -xvf $BOOTPACKG > unpacked
tar -xvf $BOOTSRC_DIR/$BOOTPACKG > unpacked
BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
fi
cd $BOOTUNPACKDIR

View File

@ -6,7 +6,7 @@ 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
An fstab for the future system is located in /home/user/fstablfs
Run only the critical testsuites
Settings for a French user
Run four make jobs in parallel

View File

@ -1121,29 +1121,30 @@ CUSTOM_TOOLS: $custom_list
create-sbu_du-report: mk_SYSTOOLS
@\$(call echo_message, Building)
@if [ "\$(ADD_REPORT)" = "y" ]; then \\
./create-sbu_du-report.sh logs $VERSION; \\
./create-sbu_du-report.sh logs $VERSION $(date --iso-8601); \\
\$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report); \\
fi;
@touch \$@
do-housekeeping:
@-umount \$(MOUNT_PT)/dev/pts
@-if [ -h \$(MOUNT_PT)/dev/shm ]; then \\
@-umount \$(MOUNT_PT)/sys
@-umount \$(MOUNT_PT)/proc
@-if mountpoint -q \$(MOUNT_PT)/run; then \\
umount \$(MOUNT_PT)/run; \\
elif [ -h \$(MOUNT_PT)/dev/shm ]; then \\
link=\$\$(readlink \$(MOUNT_PT)/dev/shm); \\
umount \$(MOUNT_PT)/\$\$link; \\
unset link; \\
else \\
umount \$(MOUNT_PT)/dev/shm; \\
fi
@-umount \$(MOUNT_PT)/dev/pts
@-umount \$(MOUNT_PT)/dev
@-umount \$(MOUNT_PT)/sys
@-umount \$(MOUNT_PT)/proc
@-rm /tools /cross-tools
@-if [ ! -f luser-exist ]; then \\
userdel \$(LUSER); \\
rm -rf \$(LUSER_HOME); \\
fi;
EOF
) >> $MKFILE

View File

@ -502,7 +502,7 @@ ROOT: $chowning
create-sbu_du-report: mk_LUSER
@\$(call echo_message, Building)
@if [ "\$(ADD_REPORT)" = "y" ]; then \\
./create-sbu_du-report.sh logs $VERSION; \\
./create-sbu_du-report.sh logs $VERSION $(date --iso-8601); \\
\$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report); \\
fi;
@touch \$@

View File

@ -551,7 +551,7 @@ ROOT: $chowning
create-sbu_du-report: mk_LUSER
@\$(call echo_message, Building)
@if [ "\$(ADD_REPORT)" = "y" ]; then \\
./create-sbu_du-report.sh logs $VERSION; \\
./create-sbu_du-report.sh logs $VERSION $(date --iso-8601); \\
\$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report); \\
fi;
@touch \$@

View File

@ -953,7 +953,6 @@ menu "Advanced Features"
depends !BOOK_BLFS
config REPORT
depends !PKGMNGT
bool "Create SBU and disk usage report"
default y

View File

@ -616,7 +616,7 @@ BLFS_TOOL: $blfs_tool
create-sbu_du-report: mk_BOOT
@\$(call echo_message, Building)
@if [ "\$(ADD_REPORT)" = "y" ]; then \\
./create-sbu_du-report.sh logs $VERSION; \\
./create-sbu_du-report.sh logs $VERSION $(date --iso-8601); \\
\$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report); \\
fi;
@touch \$@

View File

@ -16,7 +16,7 @@
n = no, original behavior
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'"/>
<!-- Run test suites?
0 = none
@ -24,28 +24,28 @@
2 = all chapter06 testsuites
3 = all chapter05 and chapter06 testsuites
-->
<xsl:param name="testsuite" select="1"/>
<xsl:param name="testsuite" select="'1'"/>
<!-- Bomb on test suites failures?
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
-->
<xsl:param name="bomb-testsuite" select="n"/>
<xsl:param name="bomb-testsuite" select="'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 -->
<xsl:param name="timezone" select="GMT"/>
<xsl:param name="timezone" select="'GMT'"/>
<!-- Page size -->
<xsl:param name="page" select="letter"/>
<xsl:param name="page" select="'letter'"/>
<!-- Locale settings -->
<xsl:param name="lang" select="C"/>
<xsl:param name="lang" select="'C'"/>
<!-- Install the whole set of locales -->
<xsl:param name='full-locale' select='n'/>
<xsl:param name="full-locale" select="'n'"/>
<xsl:template match="/">
<xsl:apply-templates select="//sect1[not(@revision) or
@ -190,6 +190,12 @@ esac
@role='installation' and
$pkgmngt = 'y'">
<xsl:text>mkdir -pv $PKG_DEST/usr/include/{rpc,rpcsvc}
</xsl:text>
</xsl:if>
<xsl:if test="../@id = 'ch-system-libelf' and
@role='installation' and
$pkgmngt = 'y'">
<xsl:text>mkdir -pv $PKG_DEST/usr/lib/pkgconfig
</xsl:text>
</xsl:if>
<xsl:apply-templates
@ -236,7 +242,9 @@ done
for dir in $PKG_DEST/{boot,etc,lib,bin,sbin}; do
[[ -z $(ls $dir) ]] &amp;&amp; rmdir -v $dir
done
PREV_SEC=${SECONDS}
packInstall
SECONDS=${PREV_SEC}
rm -rf $PKG_DEST
</xsl:text>
</xsl:if>
@ -308,7 +316,9 @@ cd $PKGDIR
@role != 'nodump']/userinput[@remap != 'adjust']"
mode="pkgmngt"/>
<xsl:if test="$dirname = 'chapter06'">
<xsl:text>packInstall
<xsl:text>PREV_SEC=${SECONDS}
packInstall
SECONDS=${PREV_SEC}
rm -rf $PKG_DEST
</xsl:text>
</xsl:if>
@ -469,6 +479,7 @@ exit
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
<xsl:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
@ -489,7 +500,9 @@ PKGDIR=$(dirname $PKGDIR)/tzdata-</xsl:text>
<xsl:text>ZONEINFO=$PKG_DEST</xsl:text>
<xsl:copy-of select="substring-after(string(),'ZONEINFO=')"/>
<xsl:text>
PREV_SEC=${SECONDS}
packInstall
SECONDS=${PREV_SEC}
rm -rf $PKG_DEST
PKG_DEST=$OLD_PKG_DEST
unset OLD_PKG_DEST
@ -598,7 +611,32 @@ unset OLD_PKGDIR
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise> <!-- no make in this string -->
<xsl:when test="contains($outputstring,'ninja install')">
<xsl:choose>
<xsl:when test="not(starts-with($outputstring,'ninja install'))">
<xsl:call-template name="outputpkgdest">
<xsl:with-param name="outputstring"
select="substring-before($outputstring,'ninja install')"/>
</xsl:call-template>
<xsl:call-template name="outputpkgdest">
<xsl:with-param
name="outputstring"
select="substring-after($outputstring,
substring-before($outputstring,'ninja install'))"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise> <!-- "ninja" is the first word and is followed by
"install"-->
<xsl:text>DESTDIR=$PKG_DEST ninja</xsl:text>
<xsl:call-template name="outputpkgdest">
<xsl:with-param
name="outputstring"
select="substring-after($outputstring,'ninja')"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise> <!-- no make nor ninja in this string -->
<xsl:choose>
<xsl:when test="contains($outputstring,'&gt;/') and
not(contains(substring-before($outputstring,'&gt;/'),' /'))">
@ -617,7 +655,6 @@ unset OLD_PKGDIR
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$outputstring"/>
<xsl:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>

View File

@ -574,7 +574,7 @@ CUSTOM_TOOLS: $custom_list
create-sbu_du-report: mk_BOOT
@\$(call echo_message, Building)
@if [ "\$(ADD_REPORT)" = "y" ]; then \\
sudo ./create-sbu_du-report.sh logs $VERSION; \\
sudo ./create-sbu_du-report.sh logs $VERSION $(date --iso-8601); \\
\$(call echo_report,$VERSION-SBU_DU-$(date --iso-8601).report); \\
fi;
@touch \$@

View File

@ -14,7 +14,8 @@
<xsl:template match="sect1">
<xsl:if
test="descendant::screen/userinput[starts-with(string(),'chroot')]">
test="descendant::screen/userinput[contains(string(),'&#xA;chroot') or
starts-with(string(),'chroot')]">
<!-- The file names -->
<xsl:variable name="pi-file" select="processing-instruction('dbhtml')"/>
<xsl:variable name="pi-file-value" select="substring-after($pi-file,'filename=')"/>
@ -39,14 +40,51 @@
<!-- Creating dirs and files -->
<exsl:document href="{$order}-{$filename}" method="text">
<xsl:text>#!/bin/bash&#xA;</xsl:text>
<xsl:apply-templates select=".//userinput[starts-with(string(),'chroot')]"/>
<xsl:apply-templates
select=".//userinput[contains(string(),'&#xA;chroot') or
starts-with(string(),'chroot')]"/>
<xsl:text>exit&#xA;</xsl:text>
</exsl:document>
</xsl:if>
</xsl:template>
<xsl:template match="userinput">
<xsl:apply-templates/>
<xsl:text>&#xA;</xsl:text>
<xsl:call-template name="extract-chroot">
<xsl:with-param name="instructions" select="string()"/>
</xsl:call-template>
</xsl:template>
<xsl:template name="extract-chroot">
<xsl:param name="instructions" select="''"/>
<xsl:choose>
<xsl:when test="not(starts-with($instructions,'&#xA;chroot')) and
contains($instructions, '&#xA;chroot')">
<xsl:call-template name="extract-chroot">
<xsl:with-param name="instructions"
select="substring(substring-after($instructions,
substring-before($instructions,
'&#xA;chroot')),2)"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="contains($instructions,'\&#xA;')">
<xsl:copy-of select="substring-before($instructions,'\&#xA;')"/>
<xsl:text>\
</xsl:text>
<xsl:call-template name="extract-chroot">
<xsl:with-param name="instructions"
select="substring-after($instructions,'\&#xA;')"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="contains($instructions,'&#xA;')">
<xsl:copy-of select="substring-before($instructions,'&#xA;')"/>
<xsl:text>
</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="$instructions"/>
<xsl:text>
</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>

View File

@ -5,12 +5,13 @@ set -e
LOGSDIR=$1
VERSION=$2
DATE=$3
LINE="================================================================================"
# Make sure that we have a directory as first argument
[[ ! -d "$LOGSDIR" ]] && \
echo -e "\nUSAGE: create-sbu_du-report.sh logs_directory [book_version]\n" && exit
echo -e "\nUSAGE: create-sbu_du-report.sh logs_directory [book_version] [date]\n" && exit
# Make sure that the first argument is a jhalfs logs directory
[[ ! -f "$LOGSDIR"/000-masterscript.log ]] && \
@ -18,6 +19,7 @@ LINE="==========================================================================
# If this script is run manually, the book version may be unknown
[[ -z "$VERSION" ]] && VERSION=unknown
[[ -z "$DATE" ]] && DATE=$(date --iso-8601)
# If there is iteration logs directories, copy the logs inside iteration-1
# to the top level dir
@ -25,7 +27,7 @@ LINE="==========================================================================
cp $LOGSDIR/build_1/* $LOGSDIR
# Set the report file
REPORT="$VERSION"-SBU_DU-$(date --iso-8601).report
REPORT="$VERSION"-SBU_DU-"$DATE".report
[ -f $REPORT ] && : >$REPORT
@ -119,7 +121,7 @@ done
# For printing the last 'Installed files disk usage', we need to 'du' the
# root dir, excluding the jhalfs directory (and lost+found). We assume
# that the rootdir is $LOGSDIR/../..
DU1=`du -skx --exclude=jhalfs --exclude=lost+found $LOGSDIR/../.. | cut -f1`
DU1=`du -skx --exclude=jhalfs --exclude=lost+found --exclude /var/lib $LOGSDIR/../.. | cut -f1`
DU1MB=`perl -e 'printf "%.3f" , ('$DU1' / '1024')';`
INSTALL=`perl -e 'print ('$DU1' - '$DU1PREV')';`
INSTALLMB=`perl -e 'printf "%.3f" , ('$DU1MB' - '$DU1MBPREV')';`

View File

@ -95,46 +95,46 @@ extract_commands() { #
case ${PROGNAME} in
clfs)
echo -n " ${L_arrow}${BOLD}$ARCH${R_arrow} target architecture... "
xsltproc --nonet \
--xinclude \
--stringparam method $METHOD \
--stringparam testsuite $TEST \
--stringparam bomb-testsuite $BOMB_TEST \
--stringparam vim-lang $VIMLANG \
--stringparam timezone $TIMEZONE \
--stringparam page $PAGE \
--stringparam lang $LANG \
--stringparam sparc $SPARC64_PROC \
--stringparam x86 $TARGET \
--stringparam mips $TARGET \
-o ./${PROGNAME}-commands/ \
$XSL \
xsltproc --nonet \
--xinclude \
--stringparam method "$METHOD" \
--stringparam testsuite "$TEST" \
--stringparam bomb-testsuite "$BOMB_TEST" \
--stringparam vim-lang "$VIMLANG" \
--stringparam timezone "$TIMEZONE" \
--stringparam page "$PAGE" \
--stringparam lang "$LANG" \
--stringparam sparc "$SPARC64_PROC" \
--stringparam x86 "$TARGET" \
--stringparam mips "$TARGET" \
-o ./${PROGNAME}-commands/ \
$XSL \
$BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
;;
clfs2)
echo -n " ${L_arrow}${BOLD}$ARCH${R_arrow} target architecture... "
xsltproc --nonet \
--xinclude \
--stringparam vim-lang $VIMLANG \
--stringparam timezone $TIMEZONE \
--stringparam page $PAGE \
--stringparam lang $LANG \
--output ./${PROGNAME}-commands/ \
$XSL \
xsltproc --nonet \
--xinclude \
--stringparam vim-lang "$VIMLANG" \
--stringparam timezone "$TIMEZONE" \
--stringparam page "$PAGE" \
--stringparam lang "$LANG" \
--output ./${PROGNAME}-commands/ \
$XSL \
$BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
;;
clfs3)
echo -n " ${L_arrow}${BOLD}$ARCH${R_arrow} target architecture... "
xsltproc --nonet \
--xinclude \
--stringparam endian x$ENDIAN \
--stringparam timezone $TIMEZONE \
--stringparam page $PAGE \
--stringparam lang $LANG \
--output ./${PROGNAME}-commands/ \
$XSL \
xsltproc --nonet \
--xinclude \
--stringparam endian x$ENDIAN \
--stringparam timezone "$TIMEZONE" \
--stringparam page "$PAGE" \
--stringparam lang "$LANG" \
--output ./${PROGNAME}-commands/ \
$XSL \
$BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
;;
@ -142,16 +142,16 @@ extract_commands() { #
echo -n " ${L_arrow}${BOLD}$MODEL + $KERNEL${R_arrow} HLFS flavour... "
xsltproc --nonet \
--xinclude \
--stringparam model $MODEL \
--stringparam kernel $KERNEL \
--stringparam testsuite $TEST \
--stringparam bomb-testsuite $BOMB_TEST \
--stringparam model "$MODEL" \
--stringparam kernel "$KERNEL" \
--stringparam testsuite "$TEST" \
--stringparam bomb-testsuite "$BOMB_TEST" \
--stringparam features \
x$SSP$ASLR$PAX$HARDENED_TMP$WARNINGS$MISC$BLOWFISH \
--stringparam timezone $TIMEZONE \
--stringparam page $PAGE \
--stringparam lang $LANG \
--stringparam grsecurity_host $GRSECURITY_HOST \
--stringparam timezone "$TIMEZONE" \
--stringparam page "$PAGE" \
--stringparam lang "$LANG" \
--stringparam grsecurity_host "$GRSECURITY_HOST" \
--output ./${PROGNAME}-commands/ \
$XSL \
$BOOK/index.xml >>$LOGDIR/$LOG 2>&1
@ -164,19 +164,19 @@ extract_commands() { #
fi
popd > /dev/null
xsltproc --nonet \
--xinclude \
--stringparam revision $INITSYS \
--stringparam testsuite $TEST \
--stringparam bomb-testsuite $BOMB_TEST \
--stringparam vim-lang $VIMLANG \
--stringparam full-locale $FULL_LOCALE \
--stringparam timezone $TIMEZONE \
--stringparam page $PAGE \
--stringparam lang $LANG \
--stringparam pkgmngt $PKGMNGT \
--output ./${PROGNAME}-commands/ \
$XSL \
xsltproc --nonet \
--xinclude \
--stringparam revision "$INITSYS" \
--stringparam testsuite "$TEST" \
--stringparam bomb-testsuite "$BOMB_TEST" \
--stringparam vim-lang "$VIMLANG" \
--stringparam full-locale "$FULL_LOCALE" \
--stringparam timezone "$TIMEZONE" \
--stringparam page "$PAGE" \
--stringparam lang "$LANG" \
--stringparam pkgmngt "$PKGMNGT" \
--output ./${PROGNAME}-commands/ \
$XSL \
$BOOK/index.xml >> $LOGDIR/$LOG 2>&1
;;
*) echo -n " ${L_arrow}${PROGNAME}${R_arrow} book invalid, terminate build... "
@ -214,19 +214,19 @@ create_package_list() { #
$BOOK/BOOK/materials/${ARCH}-chapter.xml >>$LOGDIR/$LOG 2>&1
;;
hlfs)
xsltproc --nonet --xinclude \
--stringparam model $MODEL \
--stringparam kernel $KERNEL \
--output pkg_tarball_list \
packages.xsl \
xsltproc --nonet --xinclude \
--stringparam model "$MODEL" \
--stringparam kernel "$KERNEL" \
--output pkg_tarball_list \
packages.xsl \
$BOOK/chapter04/chapter04.xml >>$LOGDIR/$LOG 2>&1
;;
lfs)
xsltproc --nonet --xinclude \
--stringparam pkgmngt $PKGMNGT \
--stringparam revision $INITSYS \
--output pkg_tarball_list \
packages.xsl \
xsltproc --nonet --xinclude \
--stringparam pkgmngt "$PKGMNGT" \
--stringparam revision "$INITSYS" \
--output pkg_tarball_list \
packages.xsl \
$BOOK/chapter03/chapter03.xml >>$LOGDIR/$LOG 2>&1
;;
*)

View File

@ -150,35 +150,35 @@ create_urls() { #
case ${PROGNAME} in
clfs*)
echo -n "Creating CLFS <${ARCH}> specific URLs file"
xsltproc --nonet --xinclude \
--stringparam server $SERVER \
--stringparam family clfs \
-o $BUILDDIR/sources/urls.lst \
urls.xsl \
xsltproc --nonet --xinclude \
--stringparam server "$SERVER" \
--stringparam family clfs \
-o $BUILDDIR/sources/urls.lst \
urls.xsl \
$BOOK/BOOK/materials/$ARCH-chapter.xml >>$LOGDIR/$LOG 2>&1
echo " ...OK"
;;
hlfs)
echo -n "Creating HLFS <${MODEL}> + <${KERNEL}> specific URLs file"
xsltproc --nonet --xinclude \
--stringparam server $SERVER \
--stringparam family lfs \
--stringparam model $MODEL \
--stringparam kernel $KERNEL \
-o $BUILDDIR/sources/urls.lst \
urls.xsl \
xsltproc --nonet --xinclude \
--stringparam server "$SERVER" \
--stringparam family lfs \
--stringparam model "$MODEL" \
--stringparam kernel "$KERNEL" \
-o $BUILDDIR/sources/urls.lst \
urls.xsl \
$BOOK/chapter04/chapter04.xml >>$LOGDIR/$LOG 2>&1
echo " ...OK"
;;
lfs)
echo -n "Creating LFS specific URLs file"
xsltproc --nonet --xinclude \
--stringparam server $SERVER \
--stringparam family lfs \
--stringparam pkgmngt $PKGMNGT \
--stringparam revision $INITSYS \
--output ../sources/urls.lst \
urls.xsl \
xsltproc --nonet --xinclude \
--stringparam server "$SERVER" \
--stringparam family lfs \
--stringparam pkgmngt "$PKGMNGT" \
--stringparam revision "$INITSYS" \
--output ../sources/urls.lst \
urls.xsl \
$BOOK/chapter03/chapter03.xml >>$LOGDIR/$LOG 2>&1
echo " ...OK"
;;

View File

@ -34,15 +34,17 @@ echo "copying the local BLFS working copy (may take some time)"
# book has already been validated, tmp is posterior to the others, and
# validation will not be done again.
cp -ruT --preserve=timestamps $BLFS_WC_LOCATION \
${BUILDDIR}${BLFS_ROOT}/blfs-xml
${BUILDDIR}${BLFS_ROOT}/$BLFS_XML
fi
# Downloads the book if necessary, initialize the tracking file and the
# package database.
# sudo is needed if $BUILDDIR/var/lib is owned by root and /var/lib/jhalfs
# has to be created
sudo make -j1 -C $BUILDDIR$BLFS_ROOT \
REV=$INITSYS \
TRACKING_DIR=$BUILDDIR$TRACKING_DIR \
sudo make -j1 -C $BUILDDIR$BLFS_ROOT \
REV=$INITSYS \
TRACKING_DIR=$BUILDDIR$TRACKING_DIR \
BLFS_XML=$BUILDDIR$BLFS_ROOT/$BLFS_XML \
SVN=$SVN_2/BLFS/$BLFS_TREE \
$BUILDDIR$BLFS_ROOT/packages.xml
# Because the BLFS Makefile is supposed to be used in chroot (or booted)
@ -134,10 +136,10 @@ p}' \
cp $PACKAGE1 $SRC_ARCHIVE
p}' \
-e '/PATCH=/,/^fi/{/^fi/a\
cp $PACKAGE1 $SRC_ARCHIVE
cp $PATCH $SRC_ARCHIVE
p}' \
-e '/URL=/,/^fi/{/^fi/a\
cp $PACKAGE1 $SRC_ARCHIVE
cp $BOOTPACKG $SRC_ARCHIVE
p}' \
$BUILDDIR$BLFS_ROOT/scripts/* >> $BUILDDIR$BLFS_ROOT/download_script
chmod u+x $BUILDDIR$BLFS_ROOT/download_script
@ -164,7 +166,7 @@ if [ "$DEP_LIBXSLT" = y ]; then
# line (without '&&'). I have not found a simple way to delete lines
# between 2 addresses, excluding either the first or the last one. So use
# a loop for accumulating lines and deleting at the end.
# Sorry for sed synthax.
# Sorry for sed syntax.
sed -i '\@^[[:space:]]*/etc/xml/catalog$@{
n
:a
@ -181,12 +183,6 @@ fi
if [ "$DEP_SVN" = y ]; then
sed -i -e /javahl/d -e /swig/d $BUILDDIR$BLFS_ROOT/scripts/*subversion
fi
if [ "$DEP_LYNX" = y ]; then
if [ "$DEP_OPENSSL" = y -o "$DEP_WGET" = y ]; then
sed -e 's/configure/& --with-ssl/' \
-i $BUILDDIR$BLFS_ROOT/scripts/*lynx
fi
fi
# At last generates the build Makefile
mkdir -p $BUILDDIR$BLFS_ROOT/work
pushd $BUILDDIR$BLFS_ROOT/work

View File

@ -39,7 +39,7 @@ crFILELOGDIR = /\$(SCRIPT_ROOT)/$FILELOGDIRBASE
SU_LUSER = sudo -u \$(LUSER) -i sh -c
LUSER_HOME = \$(LHOME)/\$(LUSER)
PRT_DU = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found \$(MOUNT_PT) \`\n"
PRT_DU_CR = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found / \`\n"
PRT_DU_CR = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found --exclude /var/lib / \`\n"
ADD_REPORT = $REPORT
ADD_CUSTOM_TOOLS = $CUSTOM_TOOLS
@ -110,6 +110,10 @@ get_package_tarball_name() { #
;;
libdbus) echo $(grep "^dbus" $JHALFSDIR/pkg_tarball_list | head -n1 )
;;
glibc) echo $(grep "^glibc" $JHALFSDIR/pkg_tarball_list | head -n1 )
;;
libelf) echo $(grep "^elfutils" $JHALFSDIR/pkg_tarball_list | head -n1 )
;;
*) echo $(grep "^$script_name[_-][[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
;;
esac
@ -133,6 +137,9 @@ get_package_version() { #
iputils*) echo ${1} | sed -e 's@^.*-@@' \
-e 's@\.tar.*@@'
;;
glibc*) echo ${1} | sed -e 's@^[^-]*-@@' \
-e 's@\.tar.*@@'
;;
LVM*) echo ${1} | sed -e 's@^[^.]*\.@@' \
-e 's@\.tgz.*@@'
;;

View File

@ -116,9 +116,11 @@ source $COMMON_DIR/libs/func_check_version.sh
[[ $VERBOSITY > 0 ]] && echo "${SD_BORDER}${nl_}"
case $BLFS_BRANCH_ID in
development ) BLFS_TREE=trunk/BOOK ;;
branch-* ) BLFS_TREE=branches/${BLFS_BRANCH_ID#branch-} ;;
* ) BLFS_TREE=tags/${BLFS_BRANCH_ID} ;;
development ) BLFS_TREE=trunk/BOOK ;;
branch-6.* ) BLFS_TREE=branches/${BLFS_BRANCH_ID#branch-}/BOOK ;;
branch-* ) BLFS_TREE=branches/${BLFS_BRANCH_ID#branch-} ;;
6.2* | 7.* | 8.* ) BLFS_TREE=tags/${BLFS_BRANCH_ID} ;;
* ) BLFS_TREE=tags/${BLFS_BRANCH_ID}/BOOK ;;
esac
# Check for build prerequisites.

19
jhalfs
View File

@ -70,8 +70,7 @@ trap 'echo -e "\n\n${RED}INTERRUPT${OFF} trapped\n" && exit 2' 1 2 3 15 17 18
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
version="
${BOLD} \"jhalfs\"${OFF} builder tool (development) \$Rev$
\$Date$
${BOLD} \"jhalfs\"${OFF} builder tool (stable version 2.4)
Written by George Boudreau, Manuel Canales Esparcia, Pierre Labastie,
plus several contributions.
@ -174,7 +173,7 @@ case $BRANCH_ID in
lfs )
LFSVRS=${BRANCH_ID}
TREE=branches/${BRANCH_ID#branch-}
if [ ${BRANCH_ID#branch-} = 6 ]; then
if [ ${BRANCH_ID:7:1} = 6 ]; then
TREE=${TREE}/BOOK
fi
;;
@ -293,9 +292,9 @@ if [[ "${BLFS_TOOL}" = "y" ]] ; then
*EDIT* ) echo " You forgot to set the BLFS branch or stable book version."
echo " Please rerun make and fix the configuration."
exit 2 ;;
branch-systemd ) BLFS_TREE=branches/systemd ;;
branch-* ) BLFS_TREE=branches/${BLFS_BRANCH_ID#branch-}/BOOK ;;
6.2* | 7.* ) BLFS_TREE=tags/${BLFS_BRANCH_ID} ;;
branch-6.* ) BLFS_TREE=branches/${BLFS_BRANCH_ID#branch-}/BOOK ;;
branch-* ) BLFS_TREE=branches/${BLFS_BRANCH_ID#branch-} ;;
6.2* | 7.* | 8.*) BLFS_TREE=tags/${BLFS_BRANCH_ID} ;;
* ) BLFS_TREE=tags/${BLFS_BRANCH_ID}/BOOK ;;
esac
fi
@ -441,16 +440,16 @@ fi
if [[ "$REBUILD_MAKEFILE" = "y" ]] ; then
case $PROGNAME in
clfs* )
VERSION=$(xmllint --noent $JHALFSDIR/$BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
VERSION=$(xmllint --noent $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)
VERSION=$(grep 'ENTITY version ' $BOOK/general.ent| cut -d\" -f2)
else
VERSION=$(grep 'ENTITY versiond' $JHALFSDIR/$BOOK/general.ent| cut -d\" -f2)
VERSION=$(grep 'ENTITY versiond' $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 $BOOK/prologue/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
esac
fi