Compare commits
24 Commits
mihari-dev
...
2.4
Author | SHA1 | Date |
---|---|---|
Pierre Labastie | e967368f98 | |
Pierre Labastie | 56a5508dcd | |
Pierre Labastie | 4cd2611b21 | |
Pierre Labastie | 72063a43b4 | |
Pierre Labastie | 0313634ea2 | |
Pierre Labastie | 61b7c59ffa | |
Pierre Labastie | 90bfcb92bf | |
Pierre Labastie | 8d07ea6f31 | |
Pierre Labastie | caee4dff7c | |
Pierre Labastie | b99e56a0e9 | |
Pierre Labastie | 9f6ceb0caf | |
Pierre Labastie | ed9acf79d4 | |
Pierre Labastie | 3917eca81c | |
Pierre Labastie | f7d138607b | |
Pierre Labastie | 6a7c2181fc | |
Pierre Labastie | e2182051f6 | |
Pierre Labastie | 4954fdff01 | |
Pierre Labastie | b37d5e3f0a | |
Pierre Labastie | b9f1fcf1ad | |
Pierre Labastie | 1503465db4 | |
Pierre Labastie | 5b0b1f2772 | |
Pierre Labastie | 95221541ab | |
Pierre Labastie | d9a0beb19b | |
Pierre Labastie | 90493395cd |
|
@ -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
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
<package><xsl:text>
 </xsl:text>
|
||||
<xsl:element name="name">
|
||||
<xsl:value-of select="normalize-space(title)"/>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
<xsl:text>
</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>
|
||||
|
|
|
@ -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> ]] && 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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 \$@
|
||||
|
|
|
@ -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 \$@
|
||||
|
|
|
@ -953,7 +953,6 @@ menu "Advanced Features"
|
|||
depends !BOOK_BLFS
|
||||
|
||||
config REPORT
|
||||
depends !PKGMNGT
|
||||
bool "Create SBU and disk usage report"
|
||||
default y
|
||||
|
||||
|
|
|
@ -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 \$@
|
||||
|
|
59
LFS/lfs.xsl
59
LFS/lfs.xsl
|
@ -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) ]] && 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>
</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,'>/') and
|
||||
not(contains(substring-before($outputstring,'>/'),' /'))">
|
||||
|
@ -617,7 +655,6 @@ unset OLD_PKGDIR
|
|||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$outputstring"/>
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
|
|
|
@ -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 \$@
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
|
||||
<xsl:template match="sect1">
|
||||
<xsl:if
|
||||
test="descendant::screen/userinput[starts-with(string(),'chroot')]">
|
||||
test="descendant::screen/userinput[contains(string(),'
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
</xsl:text>
|
||||
<xsl:apply-templates select=".//userinput[starts-with(string(),'chroot')]"/>
|
||||
<xsl:apply-templates
|
||||
select=".//userinput[contains(string(),'
chroot') or
|
||||
starts-with(string(),'chroot')]"/>
|
||||
<xsl:text>exit
</xsl:text>
|
||||
</exsl:document>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="userinput">
|
||||
<xsl:apply-templates/>
|
||||
<xsl:text>
</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,'
chroot')) and
|
||||
contains($instructions, '
chroot')">
|
||||
<xsl:call-template name="extract-chroot">
|
||||
<xsl:with-param name="instructions"
|
||||
select="substring(substring-after($instructions,
|
||||
substring-before($instructions,
|
||||
'
chroot')),2)"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="contains($instructions,'\
')">
|
||||
<xsl:copy-of select="substring-before($instructions,'\
')"/>
|
||||
<xsl:text>\
|
||||
</xsl:text>
|
||||
<xsl:call-template name="extract-chroot">
|
||||
<xsl:with-param name="instructions"
|
||||
select="substring-after($instructions,'\
')"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="contains($instructions,'
')">
|
||||
<xsl:copy-of select="substring-before($instructions,'
')"/>
|
||||
<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>
|
||||
|
|
|
@ -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')';`
|
||||
|
|
|
@ -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
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -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"
|
||||
;;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.*@@'
|
||||
;;
|
||||
|
|
|
@ -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
19
jhalfs
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue