root/morphix/trunk/how_tos/autobuildingmorphix.html

Revision 2, 4.1 kB (checked in by nextime, 2 years ago)

Initial import, branching from morphix svn

Line 
1 <h1>Auto-Building Morphix Modules</h1>
2
3 <p>In the last two hacks we've looked at what Morphix is, and how we
4 can easily customize an existing Morphix Live CD. In this last hack,
5 we will take a look at Module Maker, or MMaker, a tool for autobuilding Morphix
6 modules. Remastering modules is all fine and well, and you can do this
7 just as you can with a compressed KNOPPIX image. However, laziness is
8 seen as a virtue in Morphix-land: one command is all it should take to
9 (re)build a module.
10
11 <h2>A look at a module generator</h2>
12
13 <p>MMaker is a tool under development at the moment, but is quite
14 simple in nature. Using a so-called template, an xml file with all the
15 information about the module you want to build, you can auto-build a
16 Morphix module:
17
18 <pre>
19 mmaker mytemplate.xml mymodule.mod
20 </pre>
21
22 <p>What MMaker does when you execute this command is debootstrap a new
23 debian filesystem using the details in the template, set up the
24 necessary mainmodule directories and installs all packages specified
25 in the template, while using apt to handle any
26 dependancies. Afterwards it compresses the whole bunch into a fresh
27 new module, ready to be added to a Morphix Live CD in the usual
28 manner.
29
30 <p/>As you might have guessed, the template is the key to all of
31 this. A look at one for Morphix LightGUI: [note to editor: the
32 template uses an xml notation, so might not appear when viewing in html]
33
34 <pre>
35
36 &lt;comps&gt;
37  &lt;groups&gt;
38   &lt;version&gt;0.5&lt;/version&gt;
39   &lt;id&gt;lightgui&lt;/id&gt;
40   &lt;name&gt;Morphix LightGUI&lt;/name&gt;
41   &lt;repositorylist&gt;
42    &lt;repository type="debian"&gt;ftp://ftp.debian.org/debian&lt;/repository&gt;
43    &lt;repository type="plain"&gt;http://www.morphix.org/debian&lt;/repository&gt;
44   &lt;/repositorylist&gt;
45   &lt;description&gt;Morphix LightGUI mainmodule. Includes XFCE4, Firefox,
46   Abiword and a host of other goodies&lt;/description&gt;
47   &lt;type&gt;mainmod&lt;/type&gt;
48   &lt;suite&gt;sid&lt;/suite&gt;
49   &lt;packagelist&gt;
50    &lt;packagereq&gt;abiword&lt;/packagereq&gt;
51    &lt;packagereq&gt;xfce4&lt;/packagereq&gt;
52    &lt;packagereq&gt;mozilla-firefox&lt;/packagereq&gt;
53    &lt;!-- ... other goodies here ... --&gt;
54   &lt;/packagelist&gt;
55  &lt;/group&gt;
56 &lt;/comps&gt;
57 </pre>
58
59 <p>Seems simple, doesn't it? The actual template for LightGUI is
60 quite a bit longer (and contains a package to start xfce4 at boot
61 time), but it's very simple to specify which repositories you want to use,
62 what Debian suite you want, what type of Morphix module you want to
63 autobuild and naturally the packages you want. Currently, MMaker can
64 only build base and main modules . A few tags might need some extra
65 explaining:
66 <p/>
67 &lt;repository&gt; - With this tag you define the Debian repository/repositories from
68 which to build your module. Use the type="plain" attribute when you
69 have a repository without separate suites (You can verify this by
70 checking the repository, if it has a Packages file in the root directory of
71 the repository we call it 'plain'). Normal, Debian-style repositories
72 is default
73 <p/>
74 &lt;type&gt; - mainmod, basemod. minimod-type templates are coming up
75 (a separate minimodule generator was constructed before MMaker). It
76 would actually be fairly easy to even have a knoppix-type.
77 <p/>
78 &lt;suite&gt; - sid, sarge, woody (or unstable, testing or stable). These
79 are the three branches of Debian, of which Morphix is derived from.
80 <p/>
81 &lt;arch&gt; - the architecture for which you are building your
82 module. Using an architecture different from the host system isn't
83 recommended and can lead to very interesting errors. It defaults to
84 the architecture of your host system, which should be fine most of the
85 time.
86
87 <p/>There are a few other tags and commandline options for MMaker,
88 consult the documentation for details.
89
90 <p/>After your module is built (which takes some time without a local
91 Debian mirror) your uncompressed module will exist in a directory in
92 your /tmp. MMaker will output details of how to recompress it if
93 necessary. We hope MMaker will be useful in letting Morphix work for you!
94
95 <h2>References</h2>
96
97 Module Maker Wiki page:
98 http://www.alextreme.org/phpwiki/index.php/ModuleMaker
Note: See TracBrowser for help on using the browser.