El Viernes, 4 de Noviembre de 2005 01:16, Bruce Dubbs escribió:
> In any case, we can migrate our process to the way LFS is doing it.
> Right now it's just a matter of hammering out the details and making it
> happen.
Details:
.- Replace patcheslist.xsl with the attached one.
.- Replace the patch-root entity by:
<!ENTITY patch-root "http://www.linuxfromscratch.org/patches/blfs/svn">
to can have all patches directories for all project's books (except CLFS for
now) under the same tree hierarchy.
.- Apply the attached patch to render-blfs-book-sh
.- From that moment, all new patches must be added to the patches repo before
to commit the book changes. To remove old patches, follow the patches project
guidelines.
.- The BLFS/trunk/patches repo directory could be removed and the
blfs/downloads/svn/ directory could be used to store the HTML tarball (like
LFS) instead of the patches.
.- To be sure at any moment (i.e., after a packages version changes that
implies the addition/removal of several patches) that all patches mentioned
in the book are up-to-date on the patches repo, the editor can run the next
command when logged into their belgarath's home:
xsltproc --xinclude --nonet -stringparam dest.dir ~/blfs-patches \
stylesheets/patches-script.xsl index.xml | sh -
You can do the changed mentioned above in few minutes, run manually the new
render-blfs-book.sh, verify that all go well, and, if you agree with the
results, then maybe will be good also to do another review to
render-blfs-book.sh (e.g., to "svn co" only BLFS/trunk/BOOK or to make it
more similar to render-lfs-book.sh, that can manage branches.)
If it don't work as you like, revert the changes, run the old
render-blfs-book.sh, and continue using the curren method ;-)
--
Manuel Canales Esparcia
Usuario de LFS nº2886: http://www.linuxfromscratch.org
LFS en castellano: http://www.escomposlinux.org/lfs-es http://www.lfs-es.com
TLDP-ES: http://es.tldp.org
<?xml version='1.0' encoding='ISO-8859-1'?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text"/>
<!-- Allow select the dest dir at runtime -->
<xsl:param name="dest.dir">
<xsl:value-of select="concat('/home/httpd/', substring-after('&patch-root;', 'http://'))"/>
</xsl:param>
<xsl:template match="/">
<xsl:text>#! /bin/bash

</xsl:text>
<!-- Create dest.dir if it don't exist -->
<xsl:text> mkdir -p </xsl:text>
<xsl:value-of select="$dest.dir"/>
<xsl:text> &&
</xsl:text>
<xsl:text> cd </xsl:text>
<xsl:value-of select="$dest.dir"/>
<xsl:text> &&

</xsl:text>
<!-- Touch a dummy patch to prevent fails if dest dir is empty, then remove old patches -->
<xsl:text> touch dummy.patch &&
 rm -f *.patch &&

</xsl:text>
<xsl:apply-templates/>
<!-- Ensure correct owneship -->
<xsl:text>
 chgrp lfswww *.patch &&
</xsl:text>
<xsl:text>
 exit
</xsl:text>
</xsl:template>
<xsl:template match="//text()"/>
<xsl:template match="//ulink">
<!-- Match only local patches links and skip duplicated URLs splitted for PDF output-->
<xsl:if test="contains(@url, '.patch') and contains(@url, '&patch-root;')
and not(ancestor-or-self::*/@condition = 'pdf')">
<xsl:variable name="patch.name" select="substring-after(@url, '&patch-root;')"/>
<xsl:text> cp /home/httpd/www.linuxfromscratch.org/patches/downloads</xsl:text>
<xsl:choose>
<!-- cdparanoia -->
<xsl:when test="contains($patch.name, '-III')">
<xsl:text>/cdparanoia</xsl:text>
</xsl:when>
<!-- Open Office -->
<xsl:when test="contains($patch.name, 'OOo')">
<xsl:text>/OOo</xsl:text>
</xsl:when>
<!-- QT -->
<xsl:when test="contains($patch.name, 'qt-x')">
<xsl:text>/qt</xsl:text>
</xsl:when>
<!-- XOrg -->
<xsl:when test="contains($patch.name, 'X11R6')">
<xsl:text>/xorg</xsl:text>
</xsl:when>
<!-- General rule -->
<xsl:otherwise>
<xsl:variable name="cut"
select="translate(substring-after($patch.name, '-'), '0123456789', '0000000000')"/>
<xsl:variable name="patch.name2">
<xsl:value-of select="substring-before($patch.name, '-')"/>
<xsl:text>-</xsl:text>
<xsl:value-of select="$cut"/>
</xsl:variable>
<xsl:value-of select="substring-before($patch.name2, '-0')"/>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="$patch.name"/>
<xsl:text> . 
</xsl:text>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
--- render-blfs-book.sh-orig 2005-11-04 19:58:08.913247288 +0100
+++ render-blfs-book.sh 2005-11-04 20:34:14.498028360 +0100
@@ -92,21 +92,10 @@
chgrp -R lfswww /home/httpd/$DEST/ || die "Could not chgrp -R lfswww /home/httpd/$DEST/" $LINENO
# Now copy the patches
-rm -f ${DLDIR}*patch || die "Could not rm -f ${DLDIR}*patch" $LINENO
-cp $PATCHES_DIR/*patch $DLDIR || die "Could not cp $PATCHES_DIR/*patch $DLDIR" $LINENO
-
-# Check for missing patches
-cd $BOOK_DIR || die "Could not cd to $BOOK_DIR" $LINENO
-xsltproc --xinclude --nonet --output blfs-patch-list stylesheets/patcheslist.xsl index.xml
-sed -e "s|^.*/||" blfs-patch-list > blfs-patches || die "Second xsltproc failed" $LINENO
-sort blfs-patches > blfs-patch-list
-ls -1 $PATCHES_DIR/*patch|sed -e "s|^.*/||" > patch-dir-list || die "ls -1 $PATCHES_DIR/*patch" $LINENO
-
-diff --text --unified=0 blfs-patch-list patch-dir-list > patch-problems
-missing=`wc -l patch-problems|gawk -F" " '{print $1}'`
-if [ $missing -gt 0 ]; then
- nail -s"BLFS Patch file discrepancies" blfs-book@linuxfromscratch.org < patch-problems
-fi
+cd $BOOK_DIR || die "Could not cd to $BOOK_DIR" $LINENO
+xsltproc --xinclude stylesheets/patches-script.xsl index.xml > \
+ copy-blfs-patches.sh || die "xsltproc failed" $LINENO
+sh copy-blfs-patches.sh || die "copy of patches failed" $LINENO
# Remove the temporary files
cd $HTML_DIR || die "Could not cd to $HTML_DIR" $LINENO
--
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page