diff options
author | Bruce Dubbs <bdubbs@linuxfromscratch.org> | 2011-10-08 02:12:06 +0000 |
---|---|---|
committer | Bruce Dubbs <bdubbs@linuxfromscratch.org> | 2011-10-08 02:12:06 +0000 |
commit | daed5a3e75d60b08ebf67e8d4287c152908aa764 (patch) | |
tree | 76acad3ecc447ba6560c8475b37b745f7ea9d8b7 | |
parent | 3fffa40201f72e3038066af1f45ca8f97b88b2e7 (diff) |
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
-rw-r--r-- | Makefile | 15 | ||||
-rw-r--r-- | bootscripts/Makefile | 4 | ||||
-rw-r--r-- | chapter01/changelog.xml | 5 | ||||
-rw-r--r-- | packages.ent | 2 | ||||
-rw-r--r-- | stylesheets/md5sum.xsl | 58 |
5 files changed, 80 insertions, 4 deletions
@@ -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 diff --git a/bootscripts/Makefile b/bootscripts/Makefile index 65eafc888..e4afb51ec 100644 --- a/bootscripts/Makefile +++ b/bootscripts/Makefile @@ -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 diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 1782ba264..c3831c38b 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -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, diff --git a/packages.ent b/packages.ent index b2cbef24c..93dc58dcc 100644 --- a/packages.ent +++ b/packages.ent @@ -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 --> diff --git a/stylesheets/md5sum.xsl b/stylesheets/md5sum.xsl new file mode 100644 index 000000000..d179594af --- /dev/null +++ b/stylesheets/md5sum.xsl @@ -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>
</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> + |