[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

new debian-cd scripts



i rewrote the old debian-cd scripts to a new all improved makefile.
here is my version 0.1. Features :
 - will work without the "-x" exclude option of mkisofs. This option was
   removed in newer mkisofs version (which have now joilet fs - could be
   usefull).
 - support for adding non-free, non-US and other stuff. The official debian
   cdrom should not include this, but many cd vendors want to add non-US and
   parts of non-free. They will do it anyway, so we should make sure, that
   these cdroms will not be broken.
 - all cd's are bootable

Content :
 "binary"	hamm/hamm/binary-ARCH,binary-all,disks-ARCH
 		hamm/source/x11, doc/, tools/
 "source"	hamm/source/ (without x11 - everything did not fit)
 "misc"		hamm/contrib/binary-ARCH,binary-all,disks-ARCH,source
 		project/, indices/
 		optional : non-US
		optional : non-free (selected packages)
		optional : mirror/ (a dir where things could be like
			kernel source (2.0 + 2.1), netscape, mozilla,
			kde, whatever-you-want-to-include)


TODO:
 - write a script to check mirrors (all files present ? with correct md5sum ?
 	Packages = Packages.gz ? ...)
 - oops there are bugs in the contrib/ and non-free/ section, which will
   include all architectures present.
 - improve the readme files (not included in this posting :-((

my goal is tp get rid of the current, ugly shell scripts, and to create a
better way to create cdroms. debian cd's may not be broken, and we can write
software to make sure they are ok. 

problems : can dselect/apt handle a machine with one cdrom drive,
but two binary cds ? not even main+contrib will fit on one cd.
and at least non-US will be included by european distributors.

andreas

---- Makefile
include Configuration
SHELL=/bin/sh

binary: .mkisofs
	rm -rf $(TMPDIR)
	mkdir $(TMPDIR)
	$(bootdir)

	mkdir $(TMPDIR)/debian
	(cd $(ARCHIVE); cp -dpRPl dists $(TMPDIR)/debian);
	(cd $(ARCHIVE); cp -dpRPl $(CODENAME)/$(CODENAME)/binary-$(ARCH)\
			$(TMPDIR)/debian);
	(cd $(ARCHIVE); cp -dpRPl $(CODENAME)/$(CODENAME)/binary-all\
			$(TMPDIR)/debian);
	(cd $(ARCHIVE); cp -dpRPl $(CODENAME)/$(CODENAME)/disks-$(ARCH)\
			$(TMPDIR)/debian);
	(cd $(ARCHIVE); cp -dpRPl tools $(TMPDIR)/debian);
	(cd $(ARCHIVE); cp -dpRPl doc $(TMPDIR)/debian);
	(cd $(ARCHIVE); cp -dpRPl README* $(TMPDIR)/debian);

	# did not fit on the source cdrom
	(cd $(ARCHIVE); cp -dpRPl $(CODENAME)/$(CODENAME)/source/x11 $(TMPDIR)/debian)

	todos < text/binary-cd/README.txt > $(TMPDIR)/README.txt

	$(MKISOFS) -V "$(VOLI) Binary" \
 	-b boot/resc1440.bin -c boot/boot.catalog \
 	-o $(IMAGEPATH)/binary.iso $(TMPDIR)

	rm -rf $(TMPDIR)

source: .mkisofs
	rm -rf $(TMPDIR)
	mkdir $(TMPDIR)
	$(bootdir)

	mkdir $(TMPDIR)/debian
	(cd $(ARCHIVE); cp -dpRPl $(CODENAME)/$(CODENAME)/source\
			$(TMPDIR)/debian);
	# everything did not fit
	rm -rf $(TMPDIR)/debian/$(CODENAME)/$(CODENAME)/source/x11

	todos < text/source-cd/README.txt > $(TMPDIR)/README.txt

	$(MKISOFS) -V "$(VOLI) Source" \
 	-b boot/resc1440.bin -c boot/boot.catalog \
 	-o $(IMAGEPATH)/source.iso  $(TMPDIR)

	rm -rf $(TMPDIR)


misc: .mkisofs
	rm -rf $(TMPDIR)
	mkdir $(TMPDIR)
	$(bootdir)

	mkdir $(TMPDIR)/debian
	mkdir $(TMPDIR)/debian/$(CODENAME)
	(cd $(ARCHIVE); cp -dpRPl dists $(TMPDIR)/debian);
	(cd $(ARCHIVE); cp -dpRPl project $(TMPDIR)/debian)
	(cd $(ARCHIVE); cp -dpRPl indices $(TMPDIR)/debian)
	(cd $(ARCHIVE); cp -dpRPl $(CODENAME)/contrib $(TMPDIR)/debian)

	# optional : include non-US
ifneq "$(NON-US)" ""
	mkdir $(TMPDIR)/debian/$(CODENAME)/non-US
	(cd $(NON-US);  cp -dpRl * $(TMPDIR)/debian/$(CODENAME)/non-US)
endif

	# optional : include non-free
ifneq "$(NON-FREE)" ""
	(cd $(ARCHIVE); \
	 cp -dpRPl $(foreach pkg,$(NON-FREE),$(CODENAME)/non-free/binary-$(ARCH)/*/$(pkg)_*) $(TMPDIR)/debian)
	 cp -dpRPl $(foreach pkg,$(NON-FREE),$(CODENAME)/non-free/binary-all/*/$(pkg)_*) $(TMPDIR)/debian)
	 cp -dpRPl $(foreach pkg,$(NON-FREE),$(CODENAME)/non-free/source/*/$(pkg)_*) $(TMPDIR)/debian)
	(cd $(TMPDIR)/debian/$(CODENAME)/non-free; dpkg-scanpackages . . \
		dists/$(CODENAME) > binary-$(ARCH)/Packages;  \
		cat binary-$(ARCH)/Packages |gzip -9 \
			> binary-$(ARCH)/Packages.gz)
endif

ifneq "$(MIRROR)" ""
	mkdir $(TMPDIR)/mirror
	(cd $(MIRROR); cp -dpRPl * $(TMPDIR)/mirror)
endif

	todos < text/plus-cd/README.txt > $(TMPDIR)/README.txt

	$(MKISOFS) -V "$(VOLI) Misc" \
 	-b boot/resc1440.bin -c boot/boot.catalog \
 	-o $(IMAGEPATH)/misc.iso $(TMPDIR)

	rm -rf $(TMPDIR)

.mkisofs:
	echo ABST="$(ABST)" >> .mkisofs
	echo APPI="$(APPI)" > .mkisofs
	echo BIBL="$(BIBL)" >> .mkisofs
	echo COPY="$(COPY)" >> .mkisofs
	echo PREP="$(PREP)" >> .mkisofs
	echo PUBL="$(PUBL)" >> .mkisofs
	echo SYSI="$(SYSI)" >> .mkisofs
	echo VOLS="$(VOLS)" >> .mkisofs


define bootdir
	-mkdir -m 755 $(TMPDIR)/boot

	cp $(RELEASE)/$(CODENAME)/disks-$(ARCH)/current/linux \
	 $(TMPDIR)/boot
	cp $(RELEASE)/$(CODENAME)/disks-$(ARCH)/current/root.bin \
	 $(TMPDIR)/boot
	cp $(RELEASE)/$(CODENAME)/disks-$(ARCH)/current/resc1440.bin \
	 $(TMPDIR)/boot
	rm -rf tmp
	(mkdir tmp; cd tmp; unzip $(ARCHIVE)/tools/lodlin*.zip)
	cp tmp/*/*.EXE $(TMPDIR)/boot
	rm -rf tmp

	(echo "@ echo off" ; \
	echo "rem Flush any write-cached disk blocks before we leave DOS. " ; \
	echo "smartdrv /c" ; \
	echo "loadlin.exe linux root=/dev/ram ro initrd=root.bin" ; \
	)|todos  > $(TMPDIR)/boot/boot.bat

	cp $(RELEASE)/$(CODENAME)/disks-$(ARCH)/current/install* $(TMPDIR)
endef

---- Configuration
# Architecture
ARCH=i386

# TMPDIR, must be on the same partition as your ftp mirror
TMPDIR=/export/mirror/tmpdir

# Pathname to the archive.
ARCHIVE=/export/mirror/debian

# Code-name of the release.
CODENAME=hamm

# Pathname to the release.
RELEASE=$(ARCHIVE)/$(CODENAME)

# Pathname to the target directory, where the ISO filesystems will be placed.
#IMAGEPATH=/export/samba/admin
IMAGEPATH=/nethome/data

# Program to create the image, with parameters
# -K is a kludge to add 16K to the end. This makes up for a
# Linux read-ahead problem that still exists as of 2.1.30 using
# the loop mount, and maybe off of CD as well.
MKISOFS=mkisofs -K -a -r -T -v  

# optional : include non-US
NON-US=/export/mirror/debian-non-US/$(CODENAME)

# optional : include packages from non-free
#NON-FREE=amp biss chimera chktex circus cthugha cucipop dgs dgs-dev doc++ \
doc-html-w3 dvi2tty epan ethiop ezlm-source festival festlex-cmu \
festlex-oald festlex-poslex festvox-don festvox-kdlpc16k festvox-kdlpc8k \
fftw1 gfont giftrans gravitywars gs-aladdin html2latex hwb lclint \
libcgic1 libcgic1-altdev libcgicg1 libcgicg1-dev libgd-perl libgd1 \
libgd1-altdev libgd1g libgd1g-dev libjpeg-gif mcvert mirror mpg123 musixtex \
musixtex-doc mysql-base mysql-bench mysql-dev mysql-doc mysql-manual \
mysql-server ncftp ncompress nedit netpbm-nonfree newsgate noweb ocal \
optimizer opustex pdl qmail-src qt-doc qt1g qt1g qt1g-dev serialmail-src \
snns snns-doc swi-prolog tatctae tetex-french tgif tkdiff tripwire \
ucbmpeg ucbmpg-play unarj wwwcount xacc-smotif xanim xautolock \
xfractint xpostitplus xtrkcad xzx zoo

# optional : include some other files on the third cdrom in /mirror
MIRROR=/export/mirror/mirror


# CDROM INFORMATION

#       ABST   The  abstract information, often the name of a file
#              on the disc containing an abstract.  There is space
#              in the disc for 37 characters of information.
ABST=README.txt

#       APPI   The  application  identifier  should  describe  the
#              application  that  will  be  on the disc.  There is
#              space on the disc for 128  characters  of  informa­
#              tion.   May be overridden using the -A command line
#              option.
APPI=Debian GNU/Linux 2.0

#       BIBL   The bibliographic information, often the name of a
#              file on the disc containing a bibliography. There
#              is space in the disc for 37 characters of information.
BIBL=

#       COPY   The copyright information, often the name of a file
#              on the disc containing the copyright notice.  There
#              is space in the disc for 37 characters of  informa­
#              tion.
COPY=Copyrighted by SPI and others.

#       PREP   This should describe the  preparer  of  the  CDROM,
#              usually  with  a  mailing address and phone number.
#              There is space on the disc for  128  characters  of
#              information.   May  be overridden using the -p com­
#              mand line option.
PREP=Andreas Jellinghaus <aj@dungeon.inka.de>

#       PUBL   This should describe the publisher  of  the  CDROM,
#              usually  with  a  mailing address and phone number.
#              There is space on the disc for  128  characters  of
#              information.
PUBL=Andreas Jellinghaus <aj@dungeon.inka.de>

#       SYSI   The System Identifier.  There is space on the  disc
#              for 32 characters of information.
SYSI=Linux

#       VOLI   The  Volume Identifier.  There is space on the disc
#              for 32 characters of information. 
VOLI=

#       VOLS   The  Volume  Set  Name.  There is space on the disc
#              for 278 characters of information.
VOLS=Debian GNU/Linux 2.0 . A distribution of a free-software Linux system. \
For information, please see http://www.debian.org/ . \
Sun Apr 26 12:19:04 CEST 1998


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: