[blfs-dev] Automating BLFS
bruce.dubbs at gmail.com
Sun Aug 25 08:16:19 PDT 2013
Rob Landley wrote:
> So if there's a vacuum, I note that I'm finally updating my old
> automated LFS 6.8 build to 7.4-rc1, and once I've got that I'd like to
> automate the corresponding BLFS release. (I automated 80 or so BLFS
> packages before, but that was for an employer and got left behind when
> the contract ended.)
I'm not sure what you mean about automating BLFS. A lot of users create
scripts for each package. Do you mean that you are tying these scripts
together in a super script, creating a Makefile, or something else?
> This is building Linux From Scratch on top of an arbitrary host
> environment, and I'm testing it using the aboriginal linux base system
> for several different targets qemu supports (building natively on each
> target under an emulated build environment). It's slow, but not _that_
> slow on modern hardware and I've got distcc set up calling out to the
> cross compiler on the host to speed it up a little and take advantage
> of SMP.
> The potential advantage of this for BLFS is regression testing: you can
> plug in a new package and see what effect it has on all the others.
That's a very good observation.
> What I don't currently have is a way to parse the docbook and generate
> automated builds from that. I'm currently doing it by hand. If the
> instructions are regular enough that a machine can be programmed to
> follow them, it would probably be a good idea to do that.
Take a look at jhalfs. That does a very good job with LFS, but the BLFS
side is somewhat less used. What you seem to need is to be able to
extract the commands with xsltproc, but writing that is somewhat of an
arcane art. Looking at the lfs and blfs stylesheets may give you some ideas.
I was recently looking at writing a Makefile to merely list packages and
their dependencies, but that is complicated when considering optional
dependencies. It's especially a problem for packages external to the
book. I do not know of a way to automate that right now. Perhaps a
change to the book's xml to add a class='' parameter to the appropriate
locations would help, but that is a long term project.
More information about the blfs-dev