diff --git a/CONF.sh b/CONF.sh index 4675c139..140a2823 100644 --- a/CONF.sh +++ b/CONF.sh @@ -41,7 +41,7 @@ unset BASE_INCLUDE || true unset BASE_EXCLUDE || true unset INSTALLER_CD || true unset DI_CODENAME || true -unset MAXCDS || true +unset MAXCDS || true # The debian-cd dir # Where I am (hoping I'm in the debian-cd dir) diff --git a/Makefile b/Makefile index 1b3e71d7..dd64a592 100755 --- a/Makefile +++ b/Makefile @@ -58,9 +58,9 @@ endif ifndef HOOK HOOK=$(BASEDIR)/tools/$(CODENAME).hook endif -ifneq "$(wildcard $(MIRROR)/dists/$(CODENAME)/main/disks-$(ARCH))" "" +ifneq "$(wildcard $(MIRROR)/dists/$(DI_CODENAME)/main/disks-$(ARCH))" "" ifndef BOOTDISKS -export BOOTDISKS=$(MIRROR)/dists/$(CODENAME)/main/disks-$(ARCH) +export BOOTDISKS=$(MIRROR)/dists/$(DI_CODENAME)/main/disks-$(ARCH) endif endif ifndef DOJIGDO @@ -73,10 +73,10 @@ endif ifndef UDEB_INCLUDE # Netinst/businesscard CD should have udeb_include file by default ifeq ($(INSTALLER_CD),1) -UDEB_INCLUDE=$(BASEDIR)/data/$(CODENAME)/$(ARCH)_businesscard_udeb_include +UDEB_INCLUDE=$(BASEDIR)/data/$(DI_CODENAME)/$(ARCH)_businesscard_udeb_include endif ifeq ($(INSTALLER_CD),2) -UDEB_INCLUDE=$(BASEDIR)/data/$(CODENAME)/$(ARCH)_netinst_udeb_include +UDEB_INCLUDE=$(BASEDIR)/data/$(DI_CODENAME)/$(ARCH)_netinst_udeb_include endif endif @@ -175,7 +175,7 @@ endif ## INITIALIZATION ## # Creation of the directories needed -init: ok $(OUT) $(TDIR) $(BDIR) $(SDIR) $(ADIR) +init: ok $(OUT) $(TDIR) $(BDIR) $(SDIR) $(ADIR) unstable-map $(OUT): $(Q)mkdir -p $(OUT) $(TDIR): @@ -187,6 +187,15 @@ $(SDIR): $(ADIR): $(Q)mkdir -p $(ADIR) $(Q)mkdir -p $(ADIR)/apt-ftparchive-db +# Make sure unstable/sid points to testing/sarge, as there is no build +# rule for unstable/sid. +unstable-map: + $(Q)if [ ! -d $(BASEDIR)/data/sid ] ; then \ + ln -s sarge $(BASEDIR)/data/sid ; \ + fi + $(Q)if [ ! -d $(BASEDIR)/tools/boot/sid ] ; then \ + ln -s sarge $(BASEDIR)/tools/boot/sid ; \ + fi ## CLEANINGS ## @@ -207,10 +216,12 @@ src-clean: realclean: distclean distclean: ok bin-distclean src-distclean bin-distclean: + $(Q)echo "Cleaning the binary build directory" $(Q)rm -rf $(BDIR) $(Q)rm -rf $(ADIR) $(Q)rm -rf $(TDIR)/jigdofilelist src-distclean: + $(Q)echo "Cleaning the source build directory" $(Q)rm -rf $(SDIR) $(Q)rm -rf $(TDIR)/jigdofilelist @@ -360,7 +371,7 @@ endif | tr ' ' '\n' >>$(BDIR)/rawlist; \ fi $(Q)perl -npe 's/\@ARCH\@/$(ARCH)/g' $(TASK) | \ - cpp -nostdinc -nostdinc++ -P -undef -D ARCH=$(ARCH) -D ARCH_$(ARCH) \ + cpp -nostdinc -nostdinc++ -P -undef -D ARCH=$(ARCH) -D ARCH_$(subst -,_,$(ARCH)) \ -U $(ARCH) -U i386 -U linux -U unix \ -DFORCENONUSONCD1=$(forcenonusoncd1) \ -I $(BASEDIR)/tasks -I $(BDIR) - - >> $(BDIR)/rawlist @@ -369,7 +380,7 @@ endif $(BDIR)/rawlist-exclude: $(Q)if [ -n "$(EXCLUDE)" ]; then \ perl -npe 's/\@ARCH\@/$(ARCH)/g' $(EXCLUDE) | \ - cpp -nostdinc -nostdinc++ -P -undef -D ARCH=$(ARCH) -D ARCH_$(ARCH) \ + cpp -nostdinc -nostdinc++ -P -undef -D ARCH=$(ARCH) -D ARCH_$(subst -,_,$(ARCH)) \ -U $(ARCH) -U i386 -U linux -U unix \ -DFORCENONUSONCD1=$(forcenonusoncd1) \ -I $(BASEDIR)/tasks -I $(BDIR) - - >> $(BDIR)/rawlist-exclude; \ @@ -624,10 +635,10 @@ $(BDIR)/bootable-stamp: dir=$${file%%.packages}; \ n=$${dir##$(BDIR)/}; \ dir=$(BDIR)/CD$$n; \ - if [ -f $(BASEDIR)/tools/boot/$(CODENAME)/boot-$(ARCH) ]; then \ + if [ -f $(BASEDIR)/tools/boot/$(DI_CODENAME)/boot-$(ARCH) ]; then \ cd $(BDIR); \ - echo "Running tools/boot/$(CODENAME)/boot-$(ARCH) $$n $$dir" ; \ - $(BASEDIR)/tools/boot/$(CODENAME)/boot-$(ARCH) $$n $$dir; \ + echo "Running tools/boot/$(DI_CODENAME)/boot-$(ARCH) $$n $$dir" ; \ + $(BASEDIR)/tools/boot/$(DI_CODENAME)/boot-$(ARCH) $$n $$dir; \ else \ if [ "$${IGNORE_MISSING_BOOT_SCRIPT:-0}" = "0" ]; then \ echo "No script to make CDs bootable for $(ARCH) ..."; \ @@ -701,18 +712,18 @@ $(BDIR)/CD1/tools: done # Add the disks-arch directories if/where needed -disks: ok bin-infos $(BDIR)/CD1/dists/$(CODENAME)/main/disks-$(ARCH) -$(BDIR)/CD1/dists/$(CODENAME)/main/disks-$(ARCH): +disks: ok bin-infos $(BDIR)/CD1/dists/$(DI_CODENAME)/main/disks-$(ARCH) +$(BDIR)/CD1/dists/$(DI_CODENAME)/main/disks-$(ARCH): ifdef BOOTDISKS @echo "Adding disks-$(ARCH) stuff ..." $(Q)set -e; \ for DISK in $(FIRSTDISKS) ; do \ - mkdir -p $(BDIR)/$$DISK/dists/$(CODENAME)/main/disks-$(ARCH) ; \ + mkdir -p $(BDIR)/$$DISK/dists/$(DI_CODENAME)/main/disks-$(ARCH) ; \ $(add_files) \ - $(BDIR)/$$DISK/dists/$(CODENAME)/main/disks-$(ARCH) \ + $(BDIR)/$$DISK/dists/$(DI_CODENAME)/main/disks-$(ARCH) \ $(BOOTDISKS) . ; \ touch $(BDIR)/$$DISK/.disk/kernel_installable ; \ - cd $(BDIR)/$$DISK/dists/$(CODENAME)/main/disks-$(ARCH); \ + cd $(BDIR)/$$DISK/dists/$(DI_CODENAME)/main/disks-$(ARCH); \ rm -rf base-images-*; \ if [ "$(SYMLINK)" != "" ]; then exit 0; fi; \ if [ -L current ]; then \ @@ -892,11 +903,11 @@ bin-images: ok bin-md5list $(OUT) $(TDIR)/jigdofilelist $(BINDISKINFOND) \ > $(TDIR)/$(CODENAME)-$(ARCH).jigdo; \ fi; \ - if [ "$(DOJIGDO)" != "2" -o -f $(BASEDIR)/tools/boot/$(CODENAME)/post-boot-$(ARCH) ]; then \ + if [ "$(DOJIGDO)" != "2" -o -f $(BASEDIR)/tools/boot/$(DI_CODENAME)/post-boot-$(ARCH) ]; then \ $(MKISOFS) $(MKISOFS_OPTS) -V "$$volid" \ -o $(OUT)/$(CODENAME)-$(ARCH)-$$n.raw $$opts CD$$n ; \ - if [ -f $(BASEDIR)/tools/boot/$(CODENAME)/post-boot-$(ARCH) ]; then \ - $(BASEDIR)/tools/boot/$(CODENAME)/post-boot-$(ARCH) $$n $$dir \ + if [ -f $(BASEDIR)/tools/boot/$(DI_CODENAME)/post-boot-$(ARCH) ]; then \ + $(BASEDIR)/tools/boot/$(DI_CODENAME)/post-boot-$(ARCH) $$n $$dir \ $(OUT)/$(CODENAME)-$(ARCH)-$$n.raw; \ fi; \ if [ "$(DOJIGDO)" != "0" ]; then \ @@ -974,8 +985,8 @@ bin-image: ok bin-md5list $(OUT) volid=`cat $(CD).volid`; rm -f $(OUT)/$(CODENAME)-$(ARCH)-$(CD).raw; \ $(MKISOFS) $(MKISOFS_OPTS) -V "$$volid" \ -o $(OUT)/$(CODENAME)-$(ARCH)-$(CD).raw $$opts CD$(CD); \ - if [ -f $(BASEDIR)/tools/boot/$(CODENAME)/post-boot-$(ARCH) ]; then \ - $(BASEDIR)/tools/boot/$(CODENAME)/post-boot-$(ARCH) $(CD) $(BDIR)/CD$(CD) \ + if [ -f $(BASEDIR)/tools/boot/$(DI_CODENAME)/post-boot-$(ARCH) ]; then \ + $(BASEDIR)/tools/boot/$(DI_CODENAME)/post-boot-$(ARCH) $(CD) $(BDIR)/CD$(CD) \ $(OUT)/$(CODENAME)-$(ARCH)-$(CD).raw; \ fi diff --git a/build.sh b/build.sh index b9d6eba4..788d4371 100755 --- a/build.sh +++ b/build.sh @@ -24,24 +24,32 @@ else fi fi echo " ... selecting packages to include" -if [ -e ${MIRROR}/dists/${CODENAME}/main/disks-${ARCH}/current/. ] ; then - disks=`du -sm ${MIRROR}/dists/${CODENAME}/main/disks-${ARCH}/current/. | \ +if [ -e ${MIRROR}/dists/${DI_CODENAME}/main/disks-${ARCH}/current/. ] ; then + disks=`du -sm ${MIRROR}/dists/${DI_CODENAME}/main/disks-${ARCH}/current/. | \ awk '{print $1}'` else disks=0 fi -if [ -f $BASEDIR/tools/boot/$CODENAME/boot-$ARCH.calc ]; then - . $BASEDIR/tools/boot/$CODENAME/boot-$ARCH.calc +if [ -f $BASEDIR/tools/boot/$DI_CODENAME/boot-$ARCH.calc ]; then + . $BASEDIR/tools/boot/$DI_CODENAME/boot-$ARCH.calc fi SIZE_ARGS='' -for CD in 1 2 3 4 5 6 7 8; do +for CD in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do size=`eval echo '$'"BOOT_SIZE_${CD}"` [ "$size" = "" ] && size=0 [ $CD = "1" ] && size=$(($size + $disks)) + mult=`eval echo '$'"SIZE_MULT_${CD}"` + [ "$mult" = "" ] && mult=100 FULL_SIZE=`echo "($DEFBINSIZE - $size) * 1024 * 1024" | bc` - echo "INFO: Reserving $size MB on the $CD cd. SIZELIMIT=$FULL_SIZE." + echo "INFO: Reserving $size MB on CD $CD for boot files. SIZELIMIT=$FULL_SIZE." + if [ $mult != 100 ]; then + echo " INFO: Reserving "$((100-$mult))"% of the CD for extra metadata" + FULL_SIZE=`echo "$FULL_SIZE * $mult" / 100 | bc` + echo " INFO: SIZELIMIT now $FULL_SIZE." + fi SIZE_ARGS="$SIZE_ARGS SIZELIMIT${CD}=$FULL_SIZE" done + FULL_SIZE=`echo "($DEFSRCSIZE - $size) * 1024 * 1024" | bc` make list COMPLETE=1 $SIZE_ARGS SRCSIZELIMIT=$FULL_SIZE echo " ... building the images" diff --git a/build_all.sh b/build_all.sh index 9bb699f9..cea460d3 100755 --- a/build_all.sh +++ b/build_all.sh @@ -35,11 +35,19 @@ do . $BASEDIR/tools/boot/$CODENAME/boot-$ARCH.calc fi SIZE_ARGS='' - for CD in 1 2 3 4 5 6 7 8; do + for CD in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do size=`eval echo '$'"BOOT_SIZE_${CD}"` [ "$size" = "" ] && size=0 [ $CD = "1" ] && size=$(($size + $disks)) + mult=`eval echo '$'"SIZE_MULT_${CD}"` + [ "$mult" = "" ] && mult=100 FULL_SIZE=`echo "($DEFBINSIZE - $size) * 1024 * 1024" | bc` + echo "INFO: Reserving $size MB on CD $CD for boot files. SIZELIMIT=$FULL_SIZE." + if [ $mult != 100 ]; then + echo " INFO: Reserving "$((100-$mult))"% of the CD for extra metadata" + FULL_SIZE=`echo "$FULL_SIZE * $mult" / 100 | bc` + echo " INFO: SIZELIMIT now $FULL_SIZE." + fi SIZE_ARGS="$SIZE_ARGS SIZELIMIT${CD}=$FULL_SIZE" done FULL_SIZE=`echo "($DEFSRCSIZE - $size) * 1024 * 1024" | bc` diff --git a/debian/changelog b/debian/changelog index 71eb30a1..f62acdee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -68,6 +68,10 @@ debian-cd (2.2.18) UNRELEASED; urgency=low building if it is missing. - Make it possible to give different CONF.sh files to build.sh. - Make it possible to change which images to build using CONF.sh. + - Use DI_CODENAME to locate the installation system. This make it + possible to use debian-installer with Woody CDs. + - Avoid illegal dash (-) in cpp architecture defines. Patch + from Colin Watson. * Stephen R. Marenka - Update m68k support for sarge. - Fix m68k/amiga icons. diff --git a/tools/boot/sarge/boot-alpha b/tools/boot/sarge/boot-alpha index 7158028c..4111a88d 100755 --- a/tools/boot/sarge/boot-alpha +++ b/tools/boot/sarge/boot-alpha @@ -18,7 +18,7 @@ # $1 is the CD number # $2 is the temporary CD build dir -. $BASEDIR/tools/boot/$CODENAME/common.sh +. $BASEDIR/tools/boot/$DI_CODENAME/common.sh set -e diff --git a/tools/boot/sarge/boot-hppa b/tools/boot/sarge/boot-hppa index 9932fbec..7ac2793d 100755 --- a/tools/boot/sarge/boot-hppa +++ b/tools/boot/sarge/boot-hppa @@ -7,7 +7,7 @@ # palo is used to make ISOs bootable on HPPA. -. $BASEDIR/tools/boot/$CODENAME/common.sh +. $BASEDIR/tools/boot/$DI_CODENAME/common.sh set -e diff --git a/tools/boot/sarge/boot-i386 b/tools/boot/sarge/boot-i386 index fb2fc7f1..d059abbc 100755 --- a/tools/boot/sarge/boot-i386 +++ b/tools/boot/sarge/boot-i386 @@ -6,7 +6,7 @@ # $1 is the CD number # $2 is the temporary CD build dir -. $BASEDIR/tools/boot/$CODENAME/common.sh +. $BASEDIR/tools/boot/$DI_CODENAME/common.sh set -e @@ -66,7 +66,7 @@ done if [ "$NN" = "1" ]; then echo "Using ISOLINUX boot-disks image on CD$N" mkdir -p boot$N/isolinux - cp -f $BASEDIR/data/$CODENAME/isolinux.bin boot$N/isolinux/ + cp -f $BASEDIR/data/$DI_CODENAME/isolinux.bin boot$N/isolinux/ cp -lf cdrom/vmlinuz $CDDIR/install/ cp -lf cdrom/initrd.gz $CDDIR/install/ echo -n "-cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table " > $N.mkisofs_opts @@ -99,10 +99,10 @@ done # ISOLINUX setup # Include Smart Boot Manager image for people where isolinux fails -gzip -dc $BASEDIR/data/$CODENAME/sbm.bin.gz > $CDDIR/install/sbm.bin +gzip -dc $BASEDIR/data/$DI_CODENAME/sbm.bin.gz > $CDDIR/install/sbm.bin # Keep the original file timestamp -touch -r $BASEDIR/data/$CODENAME/sbm.bin.gz $CDDIR/install/sbm.bin -cp -p $BASEDIR/data/$CODENAME/README.sbm $CDDIR/install/ +touch -r $BASEDIR/data/$DI_CODENAME/sbm.bin.gz $CDDIR/install/sbm.bin +cp -p $BASEDIR/data/$DI_CODENAME/README.sbm $CDDIR/install/ # Isolinux help files come from d-i. cat cdrom/debian-cd_info.tar.gz | (cd boot$N/isolinux/; tar zx) mv -f boot$N/isolinux/syslinux.txt boot$N/isolinux/isolinux.txt @@ -121,7 +121,7 @@ if [ -e boot$N/isolinux/f3.txt.with26 ];then done cp -a cdrom/2.6 $CDDIR/install/2.6 # Isolinux config file. -sed "s/\$KERNEL_PARAMS/$KERNEL_PARAMS/g" > boot$N/isolinux/isolinux.cfg < boot$N/isolinux/isolinux.cfg <