|< Day Day Up >|
Hack 100 Auto-Build Morphix Modules MapLab tutorial map
Morphix is already easy to change due to its modular nature, but you can make module creation even easier and more powerful by using Module Maker to automate building Morphix modules .
[Hack #99] looks at how you can easily customize an existing Morphix live CD. This hack takes a look at Module Maker, or MMaker , a tool for auto-building Morphix modules.
Remastering modules is all fine and good, and you can do this just as you can with a compressed KNOPPIX image. However, laziness is seen as a virtue in Morphix-land: one command is all it should take to (re)build a module.
9.8.1 A Look at a Module Generator
MMaker is a tool under development at the moment, but it is quite simple in nature. Using a so-called template, an XML file with all the information about the module you want to build, you can auto-build a Morphix module:
$ mmaker mytemplate.xml mymodule.mod
What MMaker does when you execute this command is debootstrap a new Debian filesystem using the details in the template, set up the necessary mainmodule directories, and install all packages specified in the template, using APT to handle any dependencies. Afterwards, it compresses the whole bunch into a fresh new module, ready to be added to a Morphix live CD in the usual manner.
As you might have guessed, the template is the key to all of this. Here is a sample template that is used for Morphix LightGUI:
<comps> <groups> <version>0.5</version> <id>lightgui</id> <name>Morphix LightGUI</name> <repositorylist> <repository type="debian">ftp://ftp.debian.org/debian</repository> <repository type="plain">http://www.morphix.org/debian</repository> </repositorylist> <description>Morphix LightGUI mainmodule. Includes XFCE4, Firefox, Abiword and a host of other goodies</description> <type>mainmod</type> <suite>sid</suite> <packagelist> <packagereq>abiword</packagereq> <packagereq>xfce4</packagereq> <packagereq>mozilla-firefox</packagereq> <!-- ... other goodies here ... --> </packagelist> </group> </comps>
Seems simple, doesn't it? The actual template for LightGUI is quite a bit longer (it contains more packages in the <packagelist> section and contains a package to start xfce4 at boot time), but it's very simple to specify which repositories you want to use, which Debian suite you want, which type of Morphix module you want to auto-build, and, naturally, the packages you want. Currently, MMaker can build only base and main modules.
A few tags might need some extra explaining:
There are a few other tags and command-line options for Mmaker ; consult the documentation for details.
After your module is built (which takes some time without a local Debian mirror), your uncompressed module exists in a directory in your /tmp directory. MMaker outputs details of how to recompress it if necessary. Hopefully, MMaker is useful in letting Morphix work for you!
9.8.2 See Also
|< Day Day Up >|