1999-11-11 17:18:12 -01:00
|
|
|
|
YACS - Yet Another CD Script :-)
|
|
|
|
|
================================
|
2000-02-19 16:52:52 -01:00
|
|
|
|
(better known as debian-cd)
|
1999-11-11 17:18:12 -01:00
|
|
|
|
|
2001-07-10 09:57:43 +00:00
|
|
|
|
Copyright 1999-2001 Rapha<68>l Hertzog <hertzog@debian.org>
|
1999-11-11 17:18:12 -01:00
|
|
|
|
This set of tools is licensed under the General Public License
|
|
|
|
|
version 2 or any later version. You can find it in
|
|
|
|
|
/usr/share/common-licenses/GPL on a Debian GNU system.
|
|
|
|
|
|
|
|
|
|
Thanks to Steve McIntyre <stevem@chiark.greenend.org.uk> for his
|
|
|
|
|
work on slink_cd/debian_cd. Some ideas come from his script.
|
|
|
|
|
|
2000-02-19 16:52:52 -01:00
|
|
|
|
Thanks to all the contributors on the debian-cd mailing list.
|
|
|
|
|
|
1999-11-11 17:18:12 -01:00
|
|
|
|
What is needed ?
|
|
|
|
|
================
|
|
|
|
|
Software :
|
|
|
|
|
- the apt-get (>= 0.3.11.1) tool
|
|
|
|
|
- perl (>= 5.004)
|
|
|
|
|
- bash (or another POSIX shell)
|
|
|
|
|
- make
|
2000-02-26 10:41:10 -01:00
|
|
|
|
- mkisofs/mkhybrid (mkisofs also provides the isoinfo binary used by the
|
|
|
|
|
Pseudo Image Kit)
|
1999-11-11 17:18:12 -01:00
|
|
|
|
- dpkg-multicd package (for dpkg-scanpackages with -m option)
|
|
|
|
|
- the perl MD5 module
|
|
|
|
|
- dpkg-dev (>= 1.4.1.6) (for dpkg-scansources)
|
2000-05-18 22:49:02 +00:00
|
|
|
|
- lynx (for text version of README.html)
|
2000-11-13 15:48:14 -01:00
|
|
|
|
- if you want to generate .list files: tempfile, as included in debianutils
|
|
|
|
|
>= 1.6 (not absolutely necessary, workaround described in tools/pi-makelist)
|
1999-11-11 17:18:12 -01:00
|
|
|
|
Other :
|
|
|
|
|
- lots of free space on your disks
|
|
|
|
|
- a Debian mirror (on a partition where you can write, if you can't write
|
|
|
|
|
on it then you may try to use a symlink farm but it's not the
|
|
|
|
|
recommended way to build Debian CDs)
|
|
|
|
|
|
|
|
|
|
-------------------------------
|
|
|
|
|
- GENERATING DEBIAN CD IMAGES -
|
|
|
|
|
-------------------------------
|
2000-02-26 10:41:10 -01:00
|
|
|
|
|
|
|
|
|
|
1999-11-11 17:18:12 -01:00
|
|
|
|
For people that do not have time, here's the quick explanation :
|
|
|
|
|
================================================================
|
|
|
|
|
|
|
|
|
|
Edit the CONF.sh and change the PATHs for the mirror and so on.
|
|
|
|
|
$ vim CONF.sh
|
|
|
|
|
$ . CONF.sh
|
2000-06-19 22:25:24 +00:00
|
|
|
|
$ make distclean
|
1999-11-13 15:44:36 -01:00
|
|
|
|
$ make status
|
2000-04-03 22:05:07 +00:00
|
|
|
|
$ make list COMPLETE=1 SIZELIMIT1=555000000 SRCSIZELIMIT=665000000
|
1999-11-11 17:18:12 -01:00
|
|
|
|
$ make official_images
|
|
|
|
|
[ or if you want only binary images :
|
|
|
|
|
$ make bin-official_images ]
|
|
|
|
|
|
|
|
|
|
But you really should consider reading further for more information.
|
2001-07-10 09:57:43 +00:00
|
|
|
|
You can also give a look at build.sh and build_all.sh for an automatized
|
|
|
|
|
way of building CD images.
|
2000-02-26 10:41:10 -01:00
|
|
|
|
|
1999-11-11 17:18:12 -01:00
|
|
|
|
How to build a CD set - step by step
|
|
|
|
|
====================================
|
|
|
|
|
|
1999-11-13 15:44:36 -01:00
|
|
|
|
If not yet done, cd to the /usr/share/debian-cd/ directory.
|
1999-11-11 17:18:12 -01:00
|
|
|
|
|
|
|
|
|
The process of building a CD is decomposed as follow :
|
|
|
|
|
|
|
|
|
|
- first configure what is needed in CONF.sh and source it
|
|
|
|
|
in your shell
|
|
|
|
|
$ . CONF.sh
|
|
|
|
|
The exported environment variables will be used by all the
|
|
|
|
|
tools involved here (Makefiles, perl scripts, shell scripts).
|
|
|
|
|
|
|
|
|
|
If you want to build CD images for more than one arch, you will
|
|
|
|
|
have to build them one after the other (you may use a shell
|
|
|
|
|
script for this).
|
|
|
|
|
|
2000-03-07 17:59:31 -01:00
|
|
|
|
Note that the temporary dir must be on the same device than the
|
|
|
|
|
mirror because debian-cd uses hardlinks for generating an image
|
|
|
|
|
tree. If you can't do this, you'll have to use the symlink farm.
|
|
|
|
|
The symlink farm is explained at the end of this README.
|
|
|
|
|
|
2000-06-19 22:25:24 +00:00
|
|
|
|
- let's clean everything that may still be there from previous runs :
|
|
|
|
|
$ make distclean
|
|
|
|
|
|
1999-11-11 17:18:12 -01:00
|
|
|
|
- now we'll check if your mirror is ok (with good Packages files) :
|
|
|
|
|
$ make mirrorcheck
|
|
|
|
|
|
|
|
|
|
- then you will have to launch this for initializing the
|
|
|
|
|
temporary directory used for the build :
|
|
|
|
|
$ make status
|
1999-11-13 15:44:36 -01:00
|
|
|
|
If this has failed then this will be automatically launched :
|
1999-11-11 17:18:12 -01:00
|
|
|
|
$ make correctstatus
|
|
|
|
|
However note that make status should never fail if it is
|
|
|
|
|
used for building a CD set for the stable release ...
|
|
|
|
|
|
|
|
|
|
- now you can decide what you want on your CDs
|
|
|
|
|
$ make list TASK=tasks/debian-2.2 COMPLETE=1
|
|
|
|
|
or
|
|
|
|
|
$ make list TASK=tasks/gnome COMPLETE=0 SIZELIMIT=576716800
|
|
|
|
|
or
|
|
|
|
|
$ export NONFREE=1; make list TASK=tasks/kde COMPLETE=1
|
1999-12-21 16:20:30 -01:00
|
|
|
|
or for something like an official image for the USA (without non-US &
|
|
|
|
|
non-free) :
|
2000-09-20 17:36:53 +00:00
|
|
|
|
$ make list COMPLETE=1 SIZELIMIT1=576716800
|
1999-11-11 17:18:12 -01:00
|
|
|
|
.... take a look at the file tasks/* to see the options you can have :)
|
|
|
|
|
|
|
|
|
|
You can change the behaviour of this command with the following
|
|
|
|
|
variables :
|
|
|
|
|
- if NONUS is set, then packages from non-US will be allowed (remember
|
|
|
|
|
that the value of NONUS must be the path to the non-US mirror
|
|
|
|
|
if you have one)
|
2000-06-16 23:42:50 +00:00
|
|
|
|
- if FORCENONUSONCD1 is set also, then packages will be
|
|
|
|
|
rearranged so that non-US packages are all on CD#1. This
|
|
|
|
|
includes the non-free ones if you specify NONFREE. Then 2 separate
|
|
|
|
|
copies of CD#1 will be produced, identical in every respect except
|
|
|
|
|
for the inclusion/lack of non-US packages. The same happens for
|
|
|
|
|
the source CDs when they are built.
|
1999-11-11 17:18:12 -01:00
|
|
|
|
- if NONFREE is set, then packages from non-free will be allowed
|
|
|
|
|
(NONFREE must be exported to all sub-shells)
|
2000-06-06 17:19:27 +00:00
|
|
|
|
- if EXTRANONFREE is set, then non-free packages will be included
|
|
|
|
|
on an extra CD (the last CD in fact). Don't use NONFREE and
|
|
|
|
|
EXTRANONFREE at the same time !
|
|
|
|
|
(EXTRANONFREE must be exported to all sub-shells)
|
1999-11-11 17:18:12 -01:00
|
|
|
|
- if COMPLETE is set, all packages that are not listed in the
|
|
|
|
|
selected task file will be included at the end
|
|
|
|
|
- if SIZELIMIT is set, it will be used as the maximum size that
|
|
|
|
|
we can put into each CD
|
|
|
|
|
- if SIZELIMIT<X> (with <X> beeing a integer) is set, it will be used
|
|
|
|
|
as the maximum size of the X'th binary CD. SIZELIMIT<X> overrides
|
|
|
|
|
SIZELIMIT ...
|
|
|
|
|
- if SRCSIZELIMIT is set, it's used as the maximum size for source CD
|
|
|
|
|
- if SRCSIZELIMIT<X> (with <X> beeing an integer) is set, it will be
|
|
|
|
|
used as the maximum size of the X'th source CD
|
|
|
|
|
|
|
|
|
|
This target calls the targets "bin-list" and "src-list" that can be used to
|
|
|
|
|
build only binary CDs or only source CDs.
|
|
|
|
|
|
|
|
|
|
- it may be time to add the disks-arch stuff and to make the CDs bootable
|
|
|
|
|
$ make bootable
|
|
|
|
|
This does affect only the binary CDs.
|
|
|
|
|
|
1999-11-13 15:44:36 -01:00
|
|
|
|
If you want to use boot-floppies built by yourself you can give
|
|
|
|
|
a parameter BOOTDISKS=<dir> giving the directory where
|
|
|
|
|
they are (note that $BOOTDISKS/current must be a symlink to the
|
|
|
|
|
real directory, it must follow the same setup than in the FTP
|
|
|
|
|
mirror). Your boot-floppies must also be on the same partiton than
|
|
|
|
|
your mirror & temporary dir (hardlinks are used here too).
|
|
|
|
|
|
2000-09-20 17:36:53 +00:00
|
|
|
|
All CD1 of officials images are bootable (CD for ARM are the exception)
|
|
|
|
|
and the space required for this stuff may not always be taken into
|
|
|
|
|
account in the size calculation. That's why you may need to adjust
|
|
|
|
|
manually SIZELIMIT1 following the size of the boot-floppies set that
|
|
|
|
|
you're using.
|
|
|
|
|
|
1999-11-11 17:18:12 -01:00
|
|
|
|
- now, we'll add the binary packages to the temporary tree :
|
|
|
|
|
$ make packages
|
|
|
|
|
|
|
|
|
|
- and we'll add the sources to the temporary tree :
|
|
|
|
|
$ make sources
|
|
|
|
|
|
|
|
|
|
- if you want to install additional files :
|
|
|
|
|
make bin-extras CD=1 ROOTSRC=/home/ftp/ DIR=goodies/wordperfect
|
|
|
|
|
make src-extras CD=3 ROOTSRC=/home/ftp/ DIR=goodies/kernel-2.3
|
|
|
|
|
|
|
|
|
|
The first will copy /home/ftp/goodies/wordperfect/ on the first binary
|
|
|
|
|
CD. It will be in <root of the cd>/goodies/wordperfect ... you can call
|
|
|
|
|
make extras multiple times if you need more. Please note that
|
|
|
|
|
the files to be copied should be on the same partition than
|
|
|
|
|
your mirror (unless you use a symlink farm).
|
|
|
|
|
|
|
|
|
|
If you want to do customize your CD even more, you can use the hook
|
|
|
|
|
system. Read below about them.
|
|
|
|
|
|
|
|
|
|
- We can add an md5sum.txt file on each CD to enable users to check their
|
|
|
|
|
files :
|
|
|
|
|
$ make md5list
|
|
|
|
|
This does call the targets 'bin-md5list' and 'src-md5list'. You can
|
|
|
|
|
choose to call only bin-md5list if you're building only binary images.
|
|
|
|
|
|
|
|
|
|
- now we can create the images
|
|
|
|
|
$ make images
|
|
|
|
|
If you don't have enough space for all images, you can generate
|
|
|
|
|
only one image (of the second binary CD for example) with :
|
|
|
|
|
$ make bin-image CD=2
|
|
|
|
|
Of course if you want to build all binary images you'll use :
|
|
|
|
|
$ make bin-images
|
|
|
|
|
And "make src-images" will generate the sources images.
|
|
|
|
|
|
2001-07-10 09:57:43 +00:00
|
|
|
|
Note: I use here make images, but you could as well use make
|
|
|
|
|
official_images since the latter is the same as the former with
|
|
|
|
|
some dependencies on targets that you already launched
|
|
|
|
|
(make bootable packages sources).
|
|
|
|
|
|
2000-02-19 16:52:52 -01:00
|
|
|
|
- if you want to generate a MD5SUMS file with the md5sums of the
|
|
|
|
|
images you can do it with :
|
|
|
|
|
$ make imagesums
|
|
|
|
|
|
2000-02-26 10:41:10 -01:00
|
|
|
|
|
2001-07-10 09:57:43 +00:00
|
|
|
|
Official images
|
|
|
|
|
===============
|
|
|
|
|
|
|
|
|
|
If you use make official_images you're building CD images that have
|
|
|
|
|
the same properties than official CD images but they still doesn't
|
|
|
|
|
have the name of "Official Images". The name of the images is given
|
|
|
|
|
by setting the OFFICIAL and DEBVERSION environment variable (check
|
|
|
|
|
CONF.sh).
|
|
|
|
|
|
|
|
|
|
Please never ever use the "Official" name for a CD image that you
|
|
|
|
|
built yourself. The only images that can be called "Official" are the
|
|
|
|
|
ones built by Debian itself and which are provided on Debian's
|
|
|
|
|
servers.
|
|
|
|
|
|
|
|
|
|
The default configuration shipped with this package will automatically
|
|
|
|
|
name the images "Unofficial". CD will work exactly in the same way
|
|
|
|
|
with all Debian tools, only the label is different. That means you
|
|
|
|
|
can use build.sh and build_all.sh to build your "Unofficial" images
|
|
|
|
|
without modifying anything.
|
|
|
|
|
|
2000-03-07 17:59:31 -01:00
|
|
|
|
Local packages
|
|
|
|
|
==============
|
|
|
|
|
|
|
|
|
|
If you provide some custom made packages and you want to put them on
|
|
|
|
|
Debian CD set you can do it. Simply put your packages in
|
|
|
|
|
$MIRROR/dists/$CODENAME/local/binary-$ARCH/<section>.
|
|
|
|
|
The organization of this sub-tree is the same than what you can find
|
|
|
|
|
in the main, contrib or non-free part. You may use different section
|
|
|
|
|
names if you want. Be sure to create Packages files (and Sources.gz if you
|
2001-08-19 11:39:09 +00:00
|
|
|
|
include sources). You can also put your local packages under
|
|
|
|
|
$MIRROR/pool/local (just a new facility for people not wanting packages
|
|
|
|
|
under dists).
|
2000-03-07 17:59:31 -01:00
|
|
|
|
|
|
|
|
|
To include local packages, the LOCAL environment variable must be set
|
|
|
|
|
to "1" while building the CDs.
|
|
|
|
|
|
2000-06-30 00:04:03 +00:00
|
|
|
|
You can also set the LOCALDEBS environment variable, and it will be used
|
|
|
|
|
instead of MIRROR when looking for local packages.
|
2000-03-07 17:59:31 -01:00
|
|
|
|
|
2000-02-26 10:41:10 -01:00
|
|
|
|
Additionnal targets
|
|
|
|
|
===================
|
|
|
|
|
|
|
|
|
|
Pseudo Image Kit
|
|
|
|
|
----------------
|
|
|
|
|
Those of you, who will make images available to people for download may
|
|
|
|
|
consider using the Pseudo Image Kit (cf http://cdimage.debian.org for more
|
|
|
|
|
information). That's why you can launch "make pi-makelist" that will generate
|
|
|
|
|
the *.list files for the images you've just generated.
|
|
|
|
|
|
|
|
|
|
The tools/pi-makelist script needs the isoinfo binary. You can get the
|
|
|
|
|
sources from http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html
|
|
|
|
|
|
|
|
|
|
Alternatively (and certainly simpler for people using Debian system), the
|
|
|
|
|
isoinfo binary is in the mkisofs package (since Debian potato at least).
|
|
|
|
|
|
|
|
|
|
|
1999-11-11 17:18:12 -01:00
|
|
|
|
About the hook system
|
|
|
|
|
=====================
|
|
|
|
|
|
|
|
|
|
A hook script can be executed at different times. You can specify the
|
|
|
|
|
script by setting the HOOK variable to the script filename. It will
|
|
|
|
|
get 2 arguments, the first is the CD number. The second depends on
|
|
|
|
|
where/when the hook script is called. It can be 'before-scanpackages'
|
|
|
|
|
or 'before-mkisofs' (their values are explicit ...). When the script
|
|
|
|
|
is called, the current directory will be the temporary directory used for
|
|
|
|
|
the build (aka $TDIR/$CODENAME-$ARCH).
|
|
|
|
|
|
|
|
|
|
There are hooks only for binary CDs at the present time. If HOOK is not
|
|
|
|
|
set, it will look for a script $BASEDIR/tools/$CODENAME.hook.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
About the symlink farm
|
|
|
|
|
======================
|
|
|
|
|
|
|
|
|
|
If you don't have write access on the disk where you have the mirror
|
|
|
|
|
or if for another reason hardlink cannot be used, you can try to
|
|
|
|
|
use a symlink farm. Instead of having real files, your temporary tree
|
|
|
|
|
will be filled with symlinks that mkhybrid will change into files when
|
|
|
|
|
it will build the image. You'll need to use a special options. You
|
|
|
|
|
have 2 lines of options in CONF.sh as examples.
|
|
|
|
|
|
|
|
|
|
I've never tested the symlink farm ... it may well generate unusable
|
|
|
|
|
images. Don't use it for ISO images that will used by many users.
|
|
|
|
|
|
|
|
|
|
Note that you will also need a patched mkhybrid that does support the
|
|
|
|
|
-F option. Have a look here about it :
|
|
|
|
|
http://www.chiark.greenend.org.uk/~stevem/DebianCD/
|
|
|
|
|
|
1999-11-14 13:09:57 -01:00
|
|
|
|
The mkhybrid package in Debian does support this -F option since
|
|
|
|
|
potato (Debian 2.2).
|