[blfs-dev] Rendering LFS/BLFS books

Bruce Dubbs bruce.dubbs at gmail.com
Mon Mar 18 09:35:53 PDT 2013


Baho Utot wrote:
> I have cloned the svn repositories for the BLFS and the LFS books.
> I have then rendered both LFS and BLFS books.
> I have found some things I would like to bring to the table.
>
> 1.    The BLFS book places the finished book in a totally different sub
> directory. I am suggessing the following change to the Makefile
>
>           From:
>
>           BASEDIR ?= $(HOME)/public_html/blfs-book-xsl
>           DUMPDIR ?= $(HOME)/blfs-commands
>
>           To:
>
>           BASEDIR ?= ~/blfs-book
>           DUMPDIR ?= ~/blfs-commands
>
>           This makes it consistent with the LFS book output locations

You can easily override a Makefile variable with an environment variable 
to suit your needs.

> 2.    The BLFS svn book does not make the boot scripts package like the
> LFS book. Can this be added/corrected to the book makefile so it matches
> what the LFS book does and produce the bootscripts package?

That's a bit more complex.  There are several ways to do things, but 
your change would require me to do a lot of changes.  What I use now in 
the daily build is:

XML_DIR=`mktemp -d /tmp/blfsbookxml.XXXXXX`
BLFS_DIR=$XML_DIR/BLFS/
BOOK_DIR=$BLFS_DIR/BOOK
SVN="svn://linuxfromscratch.org/BLFS/trunk"

cd $XML_DIR
svn --quiet export  "$SVN" BLFS

# Build the bootscripts

cd $BOOK_DIR
VERSION=`grep "bootscripts-version " general.ent|cut -d\" -f2`
BOOTSCRIPTS=blfs-bootscripts-$VERSION
DEST=`grep "downloads-root " general.ent|cut -d\" -f2|cut -b 8-`

cd $BLFS_DIR
mv bootscripts $BOOTSCRIPTS
sleep 2
tar -cjhf $BOOTSCRIPTS.tar.bz2 $BOOTSCRIPTS
# copy $BOOTSCRIPTS.tar.bz2 to the desired location

Why don't you just use that or a variation.

   -- Bruce



More information about the blfs-dev mailing list