Added more docs, updated old ones to match current reality

This commit is contained in:
Steve McIntyre 2006-12-28 02:39:00 +00:00
parent f6e47116af
commit 97fc7e1f81
6 changed files with 245 additions and 19 deletions

View File

@ -2,7 +2,7 @@
<head>
<title>getting debian-cd</title>
</head>
<body
<body>
<h1>getting debian-cd</h1>
<h2>Development versions - using svn</h2>
@ -33,7 +33,7 @@ for archives and details of how to subscribe.</p>
<p>
<hr>
(c) Steve McIntyre &lt;steve@einval.com&gt;, April 2006. GPL v2<br>
(c) Steve McIntyre &lt;steve@einval.com&gt;, December 2006. GPL v2<br>
<a href="index.html">Prev - Overview</a><br>
<a href="requirements.html">Next - Requirements</a>
</body>

View File

@ -2,7 +2,7 @@
<head>
<title>debian-cd</title>
</head>
<body
<body>
<h1>debian-cd</h1>
<h2>An attempt at documentation!</h2>
@ -44,8 +44,8 @@ href="cd-contents.html">CD contents</a>.</p>
<p>debian-cd is made up of a large central Makefile and lots of
small(ish) helper scripts written in sh and perl. It depends on
various other packages to do lots of the hard work, for example apt to
calculate t package dependencies and debootstrap to provide the list
of packages needed for a base installation.</p>
calculate package dependencies and debootstrap to provide the list of
packages needed for a base installation.</p>
<p>A typical debian-cd run will involve:</p>
@ -57,12 +57,11 @@ there are other config options.
<li>Running a build wrapper script (build.sh or build_all.sh); the wrapper script will call various rules in the Makefile
<li>Parse Packages files from the mirror to work out what packages are
available
<li>Work out what will fit on each CD, and how many CDs are needed
<li>Make temporary trees, one for each output image
<li>Set up volume information in each tree
<li>Copy in boot files and d-i bits onto each CD where they are wanted
<li>Copy documentation files onto CDs as required
<li>Copy the packages files onto each CD; generate Packages metadata
<li>Copy packages files onto each CD; generate Packages metadata
files along the way
<li>Generate checksums of the files on each CD
<li>Run mkisofs to turn the temporary trees into ISO images and/or
@ -73,7 +72,7 @@ jigdo files
details on each of the steps!</p>
<hr>
(c) Steve McIntyre &lt;steve@einval.com&gt;, April 2006. GPL v2<br>
(c) Steve McIntyre &lt;steve@einval.com&gt;, December 2006. GPL v2<br>
<a href="getting.html">Next - Getting debian-cd</a>
</body>
</html>

149
docs/makefile.html Normal file
View File

@ -0,0 +1,149 @@
<html>
<head>
<title>The Makefile</title>
</head>
<body>
<h1>The Makefile</h1>
<p>A quick overview of the debian-cd Makefile: what it does, and
how.</p>
<h2>Variable setup and checking</h2>
<p>Simple sanity checking that all the needed variables from CONF.sh
are present and correct, and also set up some more internal
variables:</p>
<ul>
<li><code>BUILD_DATE</code> - simply, the date and time of the build
<li><code>ARCHES_NOSRC</code> - the list of arches specified, minus
source
<li><code>SOURCEONLY</code> - set only if we're building source and no
binaries
<li><code>INC_SOURCE</code> - set if we're building source at all
<li><em>lots of variables pointing to the helper scripts</em>
<li><code>BDIR</code> - the working dir for temporary files
<li><code>ADIR</code> - an alias for APTTMP, as set in CONF.sh
<li><code>DB_DIR</code> - points to a debootstrap temp dir under BDIR
<li><code>PATH</code> - we add the debootstrap /usr/sbin dir to the
path
<li><code>LATEST_DB</code> - the full path to the most recent version
of debootstrap in the archive
<h3><code>default:</code></h3>
<p>There is not a sensible default action for the Makefile (e.g. make
all), so simply print a message and return.</p>
<h3><code>ok:</code></h3>
<p>Simple sanity checking.</p>
<h3><code>$(MIRROR)/doc:</code>, <code>$(MIRROR)/tools:</code> and
<code>need-complete-mirror</code></h3>
<p>Ensure that we have all the needed pieces of the archive.</p>
<h2>General initialisation and cleanup</h2>
<h3><code>init:</code></h3>
<p>Depends on a group of trivial small rules - make the temp dirs as
necesssary, and extract the latest debootstrap deb from LATEST_DB
above.</p>
<h3><code>clean: and dir-clean:</code></h3>
<p>Clean up build tress.</p>
<h3><code>realclean: and distclean:</code></h3>
<p>Delete all temporary state.</p>
<h2>Package lists and apt setup</h2>
<h3><code>$(CODENAME)_status:</code></h3>
<p>Use the (maybe provided) default starting package list for
$(CODENAME). If that doesn't exist, fall back to "make status".</p>
<h3><code>status:</code> and <code>$(ADIR)/status:</code></h3>
<p>Create an initial list of the packages desired.</p>
<p>First, for BC and NETINST (aka INSTALLER_CD=1 or INSTALLER_CD=2),
simply create an empty list. For other CDs, grab the list of
Required/Important/Standard/Base packages from the Packages file.</p>
<p>Secondly, create/update the temporary apt db using
<code>apt-selection</code>.</p>
<p>Finally, use <code>apt-selection</code> to check the consistency of
the standard system in terms of dependencies. If needed, run
<code>make correctstatus</code> to add/remove packages.
<h3><code>correctstatus:</code></h3>
<p>Add/remove packages as needed to fix up the dependencies.</p>
<h3><code>apt-update:</code></h3>
<p>After setting up the default list of packages, run
<code>apt-selection update</code> for each of the arches, so we're
ready to ask apt to do real work for us.</p>
<h3><code>deletelist:</code></h3>
<p>Simple list cleanup</p>
<h3><code>packagelists:</code></h3>
<p>Helper for dependencies</p>
<h3><code>$(BDIR)/rawlist:</code></h3>
<p>Using debootstrap and the task file specified, generate a "raw"
(i.e. not cleanly formatted) list of the packages desired.</p>
<h3><code>$(BDIR)/rawlist.exclude:</code></h3>
<p>Using user-specified exclude lists, generate a rawlist of packages
that <strong>must not</strong> go into the images.</p>
<h3><code>genlist:</code>, <code>$(BDIR)/list</code> and
<code>$(BDIR)/list.exclude</code></h3>
<p>Clean up the rawlist and rawlist.exclude files ready for use.</p>
<h2>Tree and image building</h2>
<h3><code>image-trees:</code></h3>
<p>Does a lot of work, via three scripts:</p>
<ul>
<li>Sort the output from genlist into dependency order using
<code>list2cds</code> for each arch in turn, outputting to
$(BDIR)/packages.$ARCH.
<li>Merge the output of those separate package lists (if necessary),
outputting to $(BDIR)/packages using <code>merge_package_lists</code>.
<li>Now we have a sorted list of (potentially multi-arch) packages
ready to start using. Make the temporary trees using that list - call
<code>make_disc_trees.pl</code>
</ul>
<h3><code>images:</code></h3>
<p>Using the trees from <code>image-trees:</code>, convert those trees
into CD/DVD ISO/jigdo files as required.</p>
<h3><code>image:</code> and <code>check-number-given:</code></h3>
<p>If you're short on space, will allow you to create images one ISO
at a time - specify <code>CD=n</code> on the make command line to just
make CD number n.</p>
<h3><code>imagesums:</code></h3>
<p>Use the <code>imagesums</code> script to generate md5sums for the
output images.</p>
<h2>Misc targets</h2>
<h3><code>update-popcon</code></h3>
<p>Update the sorting order for packages using usage stats from
popcon.debian.org.</p>
<h3><code>official_images:</code></h3>
<p>Simple wrapper that depends on all the needed bits in the right
order.</p>
<hr>
(c) Steve McIntyre &lt;steve@einval.com&gt;, December 2006. GPL v2<br>
<a href="running.html">Prev - Running</a><br>
<a href="helpers.html">Next - The helper scripts, where most of the
work happens</a>
</body>
</html>

View File

@ -2,7 +2,7 @@
<head>
<title>debian-cd requirements</title>
</head>
<body
<body>
<h1>debian-cd requirements</h1>
<p>debian-cd has a few dependencies, some obvious and some less
@ -36,11 +36,11 @@ of debian-cd (up to and including the sarge release) used
<code>jigdo-file</code> to parse ISO images and output the
jigdos. Newer versions of debian-cd (v2.2.24 and newer) instead use a
patched version of <code>mkisofs</code> which can natively create
jigdo files. This needs mkisofs version 4:2.01+01a03-4 or newer in
Debian.</p>
jigdo files. This needs mkisofs version 4:2.01+01a03-4 or newer, or
genisoimage in Debian.</p>
<hr>
(c) Steve McIntyre &lt;steve@einval.com&gt;, April 2006. GPL v2<br>
(c) Steve McIntyre &lt;steve@einval.com&gt;, December 2006. GPL v2<br>
<a href="getting.html">Prev - Getting debian-cd</a><br>
<a href="setup.html">Next - Setup</a>
</body>

61
docs/running.html Normal file
View File

@ -0,0 +1,61 @@
<html>
<head>
<title>Running</title>
</head>
<body>
<h1>Running</h1>
<p>The build.sh and build_all.sh wrapper scripts are the easiest way
to make CDs, but they're not very complicated.</p>
<h2>build.sh</h2>
<p>This loads the configuration from CONF.sh, set some more default
configuration (in case it's not already set in CONF.sh), then
runs:</p>
<ul>
<li><code>make distclean</code> - clean up after a previous run
<li><code>make ${CODENAME}_status</code> - initialise the temp trees
and seed the default set of base packages needed for the specified
arch(es)
<li><code>make mirrorcheck</code> - grab metadata from the mirror,
used in generating jigdo files
<li><code>make $IMAGETARGET</code> - will be the same as <code>make
official_images</code> unless you've configured things
differently. This is the step that actually builds images; more
details later.
<li><code>make imagesums</code> - generate md5sums of the completed
images
</ul>
<h3>build.sh parameters</h3>
<p>the <strong>single</strong> argument that build.sh takes is the
architecture (or architectures) to build for. It will
<strong>only</strong> build one set of CDs; if you specify more than
one architecture as the parameter, the set will be multi-arch. Be
aware, that to pass multiple arches as one parameter you need to
specify them in quotes so the shell does not split them up, e.g.</p>
<p><code>build.sh "i386 amd64 powerpc"</code></p>
<h2>build_all.sh</h2>
<p>build_all.sh is <strong>very</strong> similar to build_all.sh
(deliberately). The only difference is that it will loop through a
list of architectures, running each in turn and outputting them to a
per-arch subdirectory in your output tree. That's all.</p>
<hr>
(c) Steve McIntyre &lt;steve@einval.com&gt;, December 2006. GPL v2<br>
<a href="setup.html">Prev - Setup</a><br>
<a href="makefile.html">Next - The Makefile, core control</a>
</body>
</html>

View File

@ -2,7 +2,7 @@
<head>
<title>Setup</title>
</head>
<body
<body>
<h1>Setup</h1>
<p>Configuration for debian-cd is stored in the file CONF.sh. This
@ -27,6 +27,17 @@ have sane defaults and can be ignored in common use.</p>
<li><code>TDIR</code> - a path to a temporary directory; should be on the same filesystem as <code>MIRROR</code> so that hard links work
<li><code>OUT</code> - the directory where ISO images and/or jigdo files will be created
<li><code>APTTMP</code> - another temporary directory for layout code; can live anywhere
<li><code>ARCHES</code> - (optionally) specify the architecture(s) to
build for. If you you want a multi-arch disc set, specify all the
arches you want as one argument, using quotes (e.g. "amd64 i386
powerpc")
<li><code>DISKTYPE</code> - the type of disc you're trying to
build. Recognised values are: <code>BC</code>, <code>NETINST</code>,
<code>CD</code>, <code>CD700</code>, <code>DVD</code> and
<code>CUSTOM</code>. The disc type is mainly used to decide the
allowable size per output image. If you choose <code>CUSTOM</code>,
then you'll also need to set <code>CUSTOMSIZE</code> to the size of
your media.
</ul>
<p>Setting these options is sufficient to allow creation of a standard
@ -46,8 +57,9 @@ wanting to make different images include:</p>
<li><code>NONFREE</code> - whether or not to allow packages from the non-free section onto the CDs
<li><code>EXTRANONFREE</code> - like <code>NONFREE</code>, but sort the non-free packages to a separate last CD instead of mixing them in
<li><code>LOCAL</code> - if you have a local set of packages that you want to merge into your CDs, specify the location here. The location should look just like the other sections (main, contrib, non-free) with Packages files etc.
<li><code>DEFBINSIZE</code> - the <strong>approximate</strong> target size of a binary image, in megabytes. See <a href="conf.sh.html">CONF.sh</a> for more details on how this works.
<li><code>DEFSRCSIZE</code> - the <strong>approximate</strong> target size of a source image, in megabytes. See <a href="conf.sh.html">CONF.sh</a> for more details on how this works.
<li><code>LOCALDEBS</code> - if you have set <code>LOCAL</code> above
and the local packages are outside of the <code>MIRROR</code> tree,
specify the local here.
<li><code>EXCLUDE</code> - specifies a file listing packages that should be omitted from consideration when laying out the CDs
<li><code>UNEXCLUDE$N</code> - a way to re-add excluded packages back into the set, starting with CD number $N. Using <code>EXCLUDE</code> and <code>UNEXCLUDE</code> allows some finer-grained control of package placement if desired
<li><code>DOJIGDO</code> - specify what to create: 0 means ISOs only; 1 means ISOs and jigdo files; 2 means jigdo files only
@ -62,11 +74,16 @@ wanting to make different images include:</p>
<li><code>SPLASHPNG</code> - specify the image to be used on the boot splash screen, on architectures where this is supported
</ul>
<p>If you do tweak some of these options, especially image sizes, it
may take quite a few iterations of testing to get exactly what you're
looking for...</p>
<p>If you do tweak some of these options, it may take quite a few
iterations of testing to get exactly what you're looking for. Be
warned!</p>
<p>For more information and yet more configuration, please see the
comments in the shipped CONF.sh file. Or, if in doubt, ask!</p>
<hr>
(c) Steve McIntyre &lt;steve@einval.com&gt;, December 2006. GPL v2<br>
<a href="requirements.html">Prev - debian-cd requirements</a><br>
<a href="conf.sh.html">Next - Full details of CONF.sh configuration</a>
<a href="running.html">Next - Running debian-cd to make some disc images</a>
</body>
</html>