From ae64f372b549c006d404e4821c48168a3f10df28 Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Sun, 11 Jul 2004 09:34:59 +0000 Subject: [PATCH] Use DI_CODENAME to locate the installation system. This make it possible to use debian-installer with Woody CDs. --- Makefile | 45 +++++++++++++++++++++-------------- build.sh | 8 +++---- debian/changelog | 2 ++ tools/boot/sarge/boot-alpha | 2 +- tools/boot/sarge/boot-hppa | 2 +- tools/boot/sarge/boot-i386 | 10 ++++---- tools/boot/sarge/boot-ia64 | 2 +- tools/boot/sarge/boot-m68k | 2 +- tools/boot/sarge/boot-mips | 2 +- tools/boot/sarge/boot-mipsel | 2 +- tools/boot/sarge/boot-powerpc | 2 +- tools/boot/sarge/boot-sparc | 2 +- tools/boot/sarge/common.sh | 4 ++-- 13 files changed, 48 insertions(+), 37 deletions(-) diff --git a/Makefile b/Makefile index 494f4b20..7c117c99 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 ## @@ -626,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) ..."; \ @@ -703,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 \ @@ -894,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 \ @@ -976,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 41a12dfa..788d4371 100755 --- a/build.sh +++ b/build.sh @@ -24,14 +24,14 @@ 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 9 10 11 12 13 14 15; do diff --git a/debian/changelog b/debian/changelog index 92d54562..dc940f64 100644 --- a/debian/changelog +++ b/debian/changelog @@ -70,6 +70,8 @@ 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. * 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 4630773e..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 diff --git a/tools/boot/sarge/boot-ia64 b/tools/boot/sarge/boot-ia64 index d04342c7..6e8de284 100755 --- a/tools/boot/sarge/boot-ia64 +++ b/tools/boot/sarge/boot-ia64 @@ -5,7 +5,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 set -x diff --git a/tools/boot/sarge/boot-m68k b/tools/boot/sarge/boot-m68k index c31463ed..723af422 100755 --- a/tools/boot/sarge/boot-m68k +++ b/tools/boot/sarge/boot-m68k @@ -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 diff --git a/tools/boot/sarge/boot-mips b/tools/boot/sarge/boot-mips index acfd40ae..d71985b2 100755 --- a/tools/boot/sarge/boot-mips +++ b/tools/boot/sarge/boot-mips @@ -7,7 +7,7 @@ # genisovh is used to make ISOs bootable on mips. -. $BASEDIR/tools/boot/$CODENAME/common.sh +. $BASEDIR/tools/boot/$DI_CODENAME/common.sh set -e diff --git a/tools/boot/sarge/boot-mipsel b/tools/boot/sarge/boot-mipsel index 49ef8208..4d869327 100755 --- a/tools/boot/sarge/boot-mipsel +++ b/tools/boot/sarge/boot-mipsel @@ -15,7 +15,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-powerpc b/tools/boot/sarge/boot-powerpc index bbdf0158..043c7ea7 100755 --- a/tools/boot/sarge/boot-powerpc +++ b/tools/boot/sarge/boot-powerpc @@ -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 diff --git a/tools/boot/sarge/boot-sparc b/tools/boot/sarge/boot-sparc index b8bdf3b2..4b7a9ce7 100755 --- a/tools/boot/sarge/boot-sparc +++ b/tools/boot/sarge/boot-sparc @@ -4,7 +4,7 @@ # # Do install stuff for sparc, including making first CD bootable -. $BASEDIR/tools/boot/$CODENAME/common.sh +. $BASEDIR/tools/boot/$DI_CODENAME/common.sh set -e diff --git a/tools/boot/sarge/common.sh b/tools/boot/sarge/common.sh index a8811334..43daebd7 100644 --- a/tools/boot/sarge/common.sh +++ b/tools/boot/sarge/common.sh @@ -8,11 +8,11 @@ # This function should be called for all bootable images. install_languages() { # Param $1 is the CD directory - if [ -f "$MIRROR/dists/$CODENAME/main/disks-$ARCH/current/xlp.tgz" ] + if [ -f "$MIRROR/dists/$DI_CODENAME/main/disks-$ARCH/current/xlp.tgz" ] then mkdir $1/.xlp (cd $1/.xlp; \ - tar zxf $MIRROR/dists/$CODENAME/main/disks-$ARCH/current/xlp.tgz ) + tar zxf $MIRROR/dists/$DI_CODENAME/main/disks-$ARCH/current/xlp.tgz ) fi }