These go hand in hand with the changes to the boot-floppies posted to
debian-boot and are also rather raw stuff. It uses the options that the
patches to debian-boot implement. Some bits and pieces from elsewhere.

The patches:
1. Reduce the size of the necessary files on the CD by insuring 
   that only one kernel and corresponding drivers are included.
2. Remove all packages already in the base-system.
3. Remove lots of documentation etc.
4. Reduce prompting.

Index: CONF.sh
===================================================================
RCS file: /cvs/debian-boot/debian-cd/CONF.sh,v
retrieving revision 1.12
diff -u -r1.12 CONF.sh
--- CONF.sh     2000/08/25 16:54:03     1.12
+++ CONF.sh     2000/10/09 22:38:47
@@ -15,7 +15,7 @@
 # Official or non-official set.
 # NOTE: THE "OFFICIAL" DESIGNATION IS ONLY ALLOWED FOR IMAGES AVAILABLE
 # ON THE OFFICIAL DEBIAN CD WEBSITE http://cdimage.debian.org
-export OFFICIAL="Unofficial"
+export OFFICIAL="Telemetry"
 #export OFFICIAL="Official"
 #export OFFICIAL="Official Beta"
 
@@ -31,7 +31,7 @@
 export MIRROR=/ftp/debian
 
 # Comment the following line if you don't have/want non-US
-#export NONUS=/ftp/debian-non-US
+export NONUS=/a/debian-non-US
 
 # And this option will make you 2 copies of CD1 - one with all the
 # non-US packages on it, one with none. Useful if you're likely to
@@ -39,17 +39,17 @@
 #export FORCENONUSONCD1=1
 
 # Path of the temporary directory
-export TDIR=/ftp/tmp
+export TDIR=$BASEDIR/tmp
 
 # Path where the images will be written
-export OUT=/rack/debian-cd
+export OUT=/debian-cd
 
 # Where we keep the temporary apt stuff.
 # This cannot reside on an NFS mount.
-export APTTMP=/ftp/tmp/apt
+export APTTMP=$BASEDIR/apt
 
-# Do I want to have NONFREE merged in the CD set
-# export NONFREE=1
+# Do I want to have NONFREE
+export NONFREE=1
 
 # Do I want to have NONFREE on a separate CD (the last CD of the CD set)
 # WARNING: Don't use NONFREE and EXTRANONFREE at the same time !
@@ -58,12 +58,12 @@
 # If you have a $MIRROR/dists/$CODENAME/local/binary-$ARCH dir with 
 # local packages that you want to put on the CD set then
 # uncomment the following line 
-# export LOCAL=1
+export LOCAL=1
 
 # If your local packages are not under $MIRROR, but somewhere else, 
 # you can uncomment this line and edit to to point to a directory
 # containing dists/$CODENAME/local/binary-$ARCH
-# export LOCALDEBS=/home/joey/debian/va/debian
+export LOCALDEBS=/ftp/tb
 
 # Sparc only : bootdir (location of cd.b and second.b)
 # export BOOTDIR=/boot
@@ -76,6 +76,24 @@
 # partition than your source files.
 # export COPYLINK=1
 
+# Use this to reduce the size of the first CD to a minimum and remove
+# packages already in the base tarball. This is usefull for credit card
+# size cds. You should also set COMPLETE=0 in order to avoid the filling up
+# of the CD.
+#export CCD=1
+
+# The following sets options to be passed to dbootstrap etc during the
+# install
+# cdrom = do not ask for paths. use cdrom paths
+# quiet = reduce dialogs
+# bootkbd = set keyboard do not query user
+export BOOTOPTS="cdrom quiet copycd bootkbd=qwerty/us install=task-telemetry"
+
+# This option makes sources be included on binary CDs. It is probably
+# only useful if one cd with binaries and sources has to be generated.
+#export SOURCES_WITH_BINARIES=1
+
+
 # Options
 # export MKISOFS=/usr/bin/mkhybrid
 # export MKISOFS_OPTS="-a -r -T"       #For normal users
@@ -87,3 +105,19 @@
 # uncoment this to make build_all.sh try to build a simple CD image if
 # the proper official CD run does not work
 #ATTEMPT_FALLBACK=yes
+
+# export COMPLETE=1
+
+# Settings for Credit Card Size CD
+export CCD=1
+export TASK=tasks/Telemetry
+export EXCLUDE=list.exclude
+export COMPLETE=0
+export BOOTDISKS=/boot-floppies
+
+# Settings for regular size CD accompanying the book
+#export CCD=
+#export TASK=tasks/Telemetry_Deluxe
+#export EXCLUDE=
+#export COMPLETE=0
+#export SOURCE_WITH_BINARIES=1
Index: Makefile
===================================================================
RCS file: /cvs/debian-boot/debian-cd/Makefile,v
retrieving revision 1.27
diff -u -r1.27 Makefile
--- Makefile    2000/09/03 16:45:04     1.27
+++ Makefile    2000/10/09 22:38:47
@@ -9,6 +9,7 @@
 # before. For this you can source the CONF.sh 
 # file in your shell
 
+# Modified to support credit card size cds by Christoph Lameter 
+<[EMAIL PROTECTED]>, May 18, 2000.
 
 ## DEFAULT VALUES
 ifndef VERBOSE_MAKE
@@ -59,7 +60,7 @@
 HOOK=$(BASEDIR)/tools/$(CODENAME).hook
 endif
 ifndef BOOTDISKS
-BOOTDISKS=$(MIRROR)/dists/$(CODENAME)/main/disks-$(ARCH)
+export BOOTDISKS=$(MIRROR)/dists/$(CODENAME)/main/disks-$(ARCH)
 endif
 
 ## Internal variables  
@@ -77,9 +78,9 @@
 set_mkisofs_opts=$(BASEDIR)/tools/set_mkisofs_opts
 strip_nonus_bin=$(BASEDIR)/tools/strip-nonUS-bin
 
-BDIR=$(TDIR)/$(CODENAME)-$(ARCH)
-ADIR=$(APTTMP)/$(CODENAME)-$(ARCH)
-SDIR=$(TDIR)/$(CODENAME)-src
+export BDIR=$(TDIR)/$(CODENAME)-$(ARCH)
+export ADIR=$(APTTMP)/$(CODENAME)-$(ARCH)
+export SDIR=$(TDIR)/$(CODENAME)-src
 
 FIRSTDISKS=CD1 
 ifdef FORCENONUSONCD1
@@ -106,6 +107,8 @@
         echo $(BINVOLID) ; \
        echo SRCVOLID: ; \
         echo $(SRCVOLID) ; \
+       echo $(ADIR); \
+       echo $(SDIR); \
 
 ## CHECKS ##
 
@@ -190,14 +193,25 @@
 
 # Regenerate the status file with only packages that
 # are of priority standard or higher
+# If a credit card size cd has to be generated then a list of base packages
+# needs to be provided to list2cds and the status file will only consist of base 
+packages
+# The way of determining the base packages might have to be changed due to changes
+# to the way base packages are marked by the debian project --19may2000 clameter
 status: init $(ADIR)/status
 $(ADIR)/status:
        @echo "Generating a fake status file for apt-get and apt-cache..."
-       $(Q)zcat $(MIRROR)/dists/$(CODENAME)/main/binary-$(ARCH)/Packages.gz | \
+       @if [ "$(CCD)" != 0 ]; then \
+       tar xzOf $(BOOTDISKS)/current/base2_2.tgz ./var/lib/dpkg/status | \
        perl -000 -ne 's/^(Package: .*)$$/$$1\nStatus: install ok installed/m; \
+                      print;' | \
+       tee $(ADIR)/status | grep "^Package:" | awk '{ print $$2; }' > 
+$(ADIR)/list.base ; \
+       else \
+       zcat $(MIRROR)/dists/$(CODENAME)/main/binary-$(ARCH)/Packages.gz | \
+       perl -000 -ne 's/^(Package: .*)$$/$$1\nStatus: install ok installed/m; \
                       print if (/^Priority: (required|important|standard)/m or \
-                      /^Section: base/m);' \
-       > $(ADIR)/status
+                      /^Section: base/m);' \
+        > $(ADIR)/status ;\
+       fi;
        # Updating the apt database
        $(Q)$(apt) update
        #
@@ -448,6 +462,22 @@
                echo "done."; \
        done
        $(Q)touch $(SDIR)/sources-stamp
+
+bin-sources: src-infos src-list $(SDIR)/sources-stamp
+$(BDIR)/sources-stamp:
+       @echo "Adding the selected sources to each CD."
+       @for i in $(BDIR)/*.sources; do \
+               dir=$${i%%.sources}; \
+               n=$${dir##$(BDIR)/}; \
+               echo -n "$$n ... "; \
+               grep -v "non-US/" $$i | xargs $(addfiles) $$dir $(MIRROR); \
+               if [ -n "$(NONUS)" ]; then \
+                       grep "non-US/" $$i | xargs $(addfiles) $$dir $(NONUS); \
+               fi; \
+               $(scansources) $$dir; \
+               echo "done."; \
+       done
+       @touch $(BDIR)/sources-stamp
 
 ## BOOT & DOC & INSTALL ##
 
Index: tools/add_packages
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/add_packages,v
retrieving revision 1.4
diff -u -r1.4 add_packages
--- tools/add_packages  2000/09/05 23:12:54     1.4
+++ tools/add_packages  2000/10/09 22:38:47
@@ -22,19 +22,28 @@
 
 my ($p, $file, $arch, $d, $realfile, $source, $section, $name);
 while (defined($_ = <LIST>)) {
-       m/^Package: (\S+)/m and $p = $1;
+       m/^Package: (\S+)/mi and $p = $1;
        m/^Filename: (\S+)/mi and $file = $1;
-       m/^Architecture: (\S+)/m and $arch = $1;
-       m/^Section: (\S+)/m and $section = $1;
+       m/^Architecture: (\S+)/mi and $arch = $1;
+       m/^Section: (\S+)/mi and $section = $1;
 
+if (! defined $file) {
+       print "no file for $_\n";
+}
+
        $source = ($section =~ /non-US/) ? $nonus : $mirror;
 
        # This is a hack to allow the local debs to be located elsewhere.
-       $source=$localdebs if $file=~m:local/:;
-
-       # If arch=all and filename is a symbolic link
-       # we suppose that the link points to .../binary-all/...
-       # and we reproduce a similar setup on the CD
+       if ($file=~m:local/:) {
+               $source=$localdebs;
+       }
+       print "Source=$source LOCALDEBS=$localdebs\n";
+       # If arch=all, filename may or may not be a symlink.
+       # (It used to be one; the Packages files on the archive are now
+       # created differently, so the link is dereferenced.)
+       # So.. this code is for the case where it is a symlink.
+       #   we suppose that the link points to .../binary-all/...
+       #   and we reproduce a similar setup on the CD
        if ($arch eq "all" and -l "$source/$file") {
                if ($section =~ /non-US/) {
                        $file =~ m#/([^/]+)$# and $name = $1;
@@ -44,6 +53,24 @@
                        symlink ("../../binary-all/$name", "$dir/$file");
                }
                $file =~ s#/binary-$ENV{'ARCH'}/#/binary-all/#g;
+       }
+       # This code is for the case where it is not a symlink.
+       # In this case, we need to make a symlink from binary-all to
+       # binary-<arch>.
+       # But don't mess with local archives in this way.
+       elsif ($arch eq "all" && $source ne $localdebs) {
+print "DEBUG: arch all, not a link... $file\n";
+               my $newfile=$file;
+               $newfile =~ s#/binary-all/#/binary-$ENV{'ARCH'}/#g;
+               if ($section =~ /non-US/) {
+                       # TODO (but it should never happen?)
+                       die "sorry, I don't know how to handle this";
+               }
+               else {
+                       $file =~ m#/([^/]+/[^/]+)$# and $name = $1;
+print "DEBUG: symlink(../../binary-all/$name to $dir/$newfile)\n";
+                       symlink ("../../binary-all/$name", "$dir/$newfile");
+               }
        }
        # And we put the file in the CD tree (with a (hard) link)
        $realfile = real_file ("$source/$file");
Index: tools/cds2src
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/cds2src,v
retrieving revision 1.8
diff -u -r1.8 cds2src
--- tools/cds2src       2000/06/30 00:04:03     1.8
+++ tools/cds2src       2000/10/09 22:38:48
@@ -21,9 +21,9 @@
 my $complete = $ENV{'COMPLETE'} || 0;
 my $local = $ENV{'LOCAL'} || 0;
 
-my $bdir = "$ENV{'TDIR'}/$ENV{'CODENAME'}-$ENV{'ARCH'}";
-my $adir = "$ENV{'APTTMP'}/$ENV{'CODENAME'}-$ENV{'ARCH'}";
-my $sdir = "$ENV{'TDIR'}/$ENV{'CODENAME'}-src";
+my $bdir = "$ENV{'BDIR'}";
+my $adir = "$ENV{'ADIR'}";
+my $sdir = "$ENV{'SDIR'}";
 my $verbose = $ENV{'VERBOSE'} || 0;
 
 my $mirror = $ENV{'MIRROR'};
Index: tools/list2cds
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/list2cds,v
retrieving revision 1.7
diff -u -r1.7 list2cds
--- tools/list2cds      2000/06/16 23:42:50     1.7
+++ tools/list2cds      2000/10/09 22:38:48
@@ -26,6 +26,7 @@
 my $adir = "$ENV{'APTTMP'}/$ENV{'CODENAME'}-$ENV{'ARCH'}";
 my $dir = "$ENV{'TDIR'}/$ENV{'CODENAME'}-$ENV{'ARCH'}";
 my $verbose = $ENV{'VERBOSE'} || 0;
+my $ccd = $ENV{'CCD'} || 0;
 
 $| = 1; # Autoflush for debugging
 
@@ -42,6 +43,7 @@
 my %included;
 my %excluded;
 my %packages;
+my %basepackage;
 
 msg(0, "
 ======================================================================
@@ -93,6 +95,19 @@
        close EXCL;
 }
 
+# read list.base which is generated for credit card size cds and contains
+# a list of packages assumed to be present through the base.tgz file.
+# the debs for the base packages will not be included on the cd but handled
+# to satisfy dependencies. 18-May-2000 clameter
+
+if ($ccd) {
+       open (BASE,"<$adir/list.base") || die "Can't open $adir/list.base : $!\n";
+       while (defined($_=<BASE>)) {
+               chomp;
+               $basepackage{$_}=1;
+       }
+}
+
 # Now exclude more packages because of the non-free and non-us rules
 if (not $nonfree) {
        foreach (grep { $packages{$_}{"Section"} =~ /non-free/ }
@@ -125,7 +140,7 @@
 close (STATS);
 
 # Browse the list of packages to include
-msg(0, "-- Adding standard, required, important and base packages \n" .
+msg(0, "-- Processing default packages and packages added by apt \n" .
        "   on the first CD ...\n");
 my ($total_size, $cd_size, $size, $cd) = (0, 0, 0, 1);
 my %cds;
@@ -143,10 +158,13 @@
                 next;
        }
        next if $excluded{$p};
-       $cd_size += $packages{$p}{"Size"};
-       $total_size += $packages{$p}{"Size"};
        $included{$p} = 1;
-       add_to_cd (1, [ $p ]);
+       # Omit any packages in base for ccds
+       if (not $ccd or not $basepackage{$p}) {
+         $cd_size += $packages{$p}{"Size"};
+         $total_size += $packages{$p}{"Size"};
+         add_to_cd (1, [ $p ]);
+       }
 }
 close STATUS;
 msg(0, "   Standard system already takes $cd_size bytes on the first CD.\n");
@@ -192,7 +210,8 @@
            msg(3, "$_ has already been included.\n");
            next;
        }
-       add_package ($_, 1);
+        # Do not add suggested and recommended packages for ccds
+       add_package ($_, $ccd ? 0 : 1);
 }
 close LIST;
 
Index: tools/boot/potato/boot-i386
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/boot/potato/boot-i386,v
retrieving revision 1.9
diff -u -r1.9 boot-i386
--- tools/boot/potato/boot-i386 2000/06/16 23:42:50     1.9
+++ tools/boot/potato/boot-i386 2000/10/09 22:38:48
@@ -7,12 +7,33 @@
 # Heavily hacked by Rapha�l Hertzog <[EMAIL PROTECTED]> for
 # YACS (the new debian-cd in potato)
 # 12MAR00  updated for current i386 bootdisks  --jwest
-#
+# 18MAY00  added conditions for credit card cd. ccds
+#          also do not have a full disks-i386 directory. use $BOOTDISKS
+#          instead. Its also shorter. --clameter
+# 22may00  update to be able to use $BOOTOPTS to set kernel parameters on
+#          boot
 # Do install stuff for i386, including making bootable CDs
 #
 # $1 is the CD number
 # $2 is the temporary CD build dir
 
+
+setbootopts()
+{
+# Set boot options in an image already generated by the boot-floppies
+# package. This requires accessing and modifying the boot floppy image.
+# Parameters
+# $1 image
+# $2 options
+       if [ "$2" == "" ]; then
+               return
+       fi
+       echo "drive u: file=\"$1\"" >~/.mtoolsrc
+       mtype u:syslinux.cfg | sed -e "s%^APPEND %APPEND $2 %" -e 's/^TIMEOUT 
+0/TIMEOUT 10/' >~/SYSLINUX.CFG
+       mcopy -o ~/SYSLINUX.CFG u:
+       rm ~/SYSLINUX.CFG ~/.mtoolsrc
+}
+
 set -e
 
 N=$1
@@ -30,6 +51,7 @@
          cp -f 
CD1/dists/$CODENAME/main/disks-$ARCH/current/images-2.88/compact/rescue.bin boot2/boot/
          echo -n "-J -b boot/rescue.bin -c boot/boot.catalog boot2" \
                        > 2.mkisofs_opts
+          setbootopts boot2/boot/rescue.bin "$BOOTOPTS"
        fi
        exit 0;
 fi
@@ -45,10 +67,10 @@
 
 echo -n "-J -b boot/rescue.bin -c boot/boot.catalog boot1" > $N.mkisofs_opts
 
-(cd $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/ ; \
-       cp -f images-1.44/resc*.bin  $CDDIR/install ; \
-       cp -f linux  $CDDIR/install ; \
-       cp -f images-1.44/root.bin $CDDIR/install )
+(cd $BOOTDISKS/current/ ; \
+       cp images-1.44/resc*.bin  $CDDIR/install ; \
+       cp linux  $CDDIR/install ; \
+       cp images-1.44/root.bin $CDDIR/install )
 
 mkdir -p boot1/boot
 
@@ -63,22 +85,41 @@
 #      gzip -c9 /tmp/root.bin.uncompressed > $CDDIR/install/root.bin ; \
 #      rm /tmp/root.bin.uncompressed  )
 ## end notes
-
-cp -f $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/images-2.88/rescue.bin 
boot1/boot
 
+cp $BOOTDISKS/current/images-2.88/rescue.bin boot1/boot
+setbootopts boot1/boot/rescue.bin "$BOOTOPTS"
 
 #Extracting tools for disc 1
 
+cp $BOOTDISKS/current/dosutils/* $CDDIR/install/
+
+(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 $BOOTOPTS" ; \
+       ) |todos > $CDDIR/install/boot.bat
+
+if [ "$CCD" != "" ]; then
+       # remove stuff that is not needed for creditcard cd
+       cd $CDDIR
+       rm -rf doc pics tools
+       rm dists/potato/Contents*
+       rm -r `find dists -name source -type d`
+       cd dists/potato/main/disks-i386/current
+       rm -rf dosutils doc lang setlang.bat
+       rm -rf udma66 compact idepci images-1.20 images-1.44 images-2.88
+       rm READ-pl.txt md5sum.txt README.txt linux install.bat
+       ln -s ../../../../../install images-1.44
+#      ln -s ../../../../../install/rescue.bin
+#      ln -s ../../../../../install/root.bin
+#      ln -s ../../../../../install/linux
+       exit 0
+fi
+
 cp -f $CDDIR/dists/$CODENAME/main/disks-$ARCH/current/dosutils/* $CDDIR/install/
 
 (echo "Tools for DOS :" ; \
        echo "lodlin/         load Linux kernel from DOS" ;\
        echo "rawrite2/       rawrite 2.0 : create disks from disk images (*.bin)"; \
        ) |todos > $CDDIR/tools/README.tools
-
-(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 > $CDDIR/install/boot.bat
 
Index: tools/potato/installtools.sh
===================================================================
RCS file: /cvs/debian-boot/debian-cd/tools/potato/installtools.sh,v
retrieving revision 1.14
diff -u -r1.14 installtools.sh
--- tools/potato/installtools.sh        2000/06/16 23:42:50     1.14
+++ tools/potato/installtools.sh        2000/10/09 22:38:48
@@ -3,12 +3,19 @@
 # Install files in /install and some in /doc
 # 26-dec-99 changes for i386 (2.2.x) bootdisks --jwest
 # 11-mar-00 added sparc to boot-disk documentation test  --jwest
+# 18-may-00 skip this for credit Card size CDs. --clameter
 
 set -e
 
 # The location of the tree for CD#1, passed in
 DIR=$1
+# If this is a credit card size cd then dont install anything.
+if [ "$CCD" != "" ]; then
+       exit 0
+fi
 
+BDIR=$TDIR/$CODENAME-$ARCH
+
 DOCDIR=doc
 
 # Put the install documentation in /install
@@ -24,4 +31,3 @@
 do
        ln -s $file
 done
-




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to