Miror update to bootscripts Makefile.

Add capability in main Makefile to create md5sum file.


git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9618 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Bruce Dubbs 2011-10-08 02:12:06 +00:00
parent 3fffa40201
commit daed5a3e75
5 changed files with 80 additions and 4 deletions

View File

@ -103,6 +103,17 @@ wget-list:
$(Q)xsltproc --xinclude --nonet --output $(BASEDIR)/wget-list \
stylesheets/wget-list.xsl chapter03/chapter03.xml
md5sums:
@echo "Generating md5sum file..."
$(Q)mkdir -p $(BASEDIR)
$(Q)xsltproc --xinclude --nonet --output $(BASEDIR)/md5sums \
stylesheets/md5sum.xsl chapter03/chapter03.xml
$(Q)sed -i -e "s/BOOTSCRIPTS-MD5SUM/$(shell md5sum lfs-bootscripts*.tar.bz2 | cut -d' ' -f1)/" \
$(BASEDIR)/md5sums
$(Q)sed -i -e "s/UDEV-MD5SUM/$(shell md5sum udev-config*.tar.bz2 | cut -d' ' -f1)/" \
$(BASEDIR)/md5sums
dump-commands: validxml
@echo "Dumping book commands..."
$(Q)xsltproc --output $(DUMPDIR)/ \
@ -111,7 +122,7 @@ dump-commands: validxml
validate: maketar validxml
@echo "Validation complete."
all: lfs nochunks pdf dump-commands
all: lfs nochunks pdf dump-commands md5sums
.PHONY : all dump-commands lfs nochunks pdf profile-html tmpdir validate \
validxml wget-list maketar
validxml wget-list maketar md5sums

View File

@ -21,7 +21,9 @@ create-dirs:
install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rcS.d
install -d -m ${DIRMODE} ${EXTDIR}/rc.d/init.d
install -d -m ${DIRMODE} ${EXTDIR}/sysconfig
install -d -m ${DIRMODE} ${LIBDIR}
install -d -m ${DIRMODE} ${EXTDIR}/sysconfig
install -d -m ${DIRMODE} ${MAN8}
install -d -m ${DIRMODE} ${SBIN}
ln -svf services ${DESTDIR}/lib/lsb
ln -sf rc.d/init.d ${EXTDIR}/init.d

View File

@ -39,6 +39,11 @@
<listitem>
<para>2011-10-07</para>
<itemizedlist>
<listitem>
<para>[bdubbs] - Miror update to bootscripts Makefile. Fixes
<ulink url="&lfs-ticket-root;2939">#2939</ulink>.
</para>
</listitem>
<listitem>
<para>[matthew] - Remove Pkg-Config, and its dependencies PCRE and
Glib. E2fsprogs, Man-DB and Udev can all be built without Pkg-Config,

View File

@ -290,7 +290,7 @@
<!ENTITY less-ch6-du "3.5 MB">
<!ENTITY less-ch6-sbu "less than 0.1 SBU">
<!ENTITY lfs-bootscripts-version "20111006"> <!-- Scripts depend on this format -->
<!ENTITY lfs-bootscripts-version "20111007"> <!-- Scripts depend on this format -->
<!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB"> <!-- Updated in Makefile -->
<!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.bz2">
<!ENTITY lfs-bootscripts-md5 "BOOTSCRIPTS-MD5SUM"> <!-- Updated in Makefile -->

58
stylesheets/md5sum.xsl Normal file
View File

@ -0,0 +1,58 @@
<?xml version='1.0' encoding='ISO-8859-1'?>
<!-- Create a md5 list for packages and pathces used. -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:apply-templates select="//ulink"/>
</xsl:template>
<xsl:template match="ulink">
<!-- If some package don't have the predefined strings in their
name, the next test must be fixed to match it also. Skip possible
duplicated URLs that may be split for PDF output -->
<xsl:if test="(contains( @url, '.tar.' ) or
contains( @url, '.tgz' ) or
contains( @url, '.patch') ) and
not( ancestor-or-self::*/@condition = 'pdf' )" >
<!-- Get the md5sum -->
<xsl:value-of select="../../para/literal"/>
<!-- Add two spaces -->
<xsl:text> </xsl:text>
<!-- Get the basename -->
<xsl:call-template name="basename">
<xsl:with-param name="pathname" select="@url"/>
</xsl:call-template>
<!-- Add a newline -->
<xsl:text>&#x0a;</xsl:text>
</xsl:if>
</xsl:template>
<xsl:template name="basename">
<xsl:param name="pathname"/>
<xsl:choose>
<xsl:when test="contains( $pathname, '/' )" >
<xsl:call-template name="basename">
<xsl:with-param name="pathname" select="substring-after( $pathname, '/' )" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$pathname"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>