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

Bug#783001: unblock: debian-cd/3.1.17



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package debian-cd

Hi folks,

It's time for the traditional late debian-cd upload so we have the
current scripts in sync with the package in the archive ready for
release. Filterdiff attached (filtering out the massive noise from the
popcon data update).

As per normal, the changes may appear quite large but have been in
production use in our infrastructure already and therefore are
reasonably well tested.

unblock debian-cd/3.1.17

Cheers,

Steve
diff -Nru debian-cd-3.1.16/Makefile debian-cd-3.1.17/Makefile
--- debian-cd-3.1.16/Makefile	2014-10-05 09:13:32.000000000 +0100
+++ debian-cd-3.1.17/Makefile	2015-04-20 12:42:34.000000000 +0100
@@ -222,7 +222,7 @@
 	@echo "Generating a fake status file for apt-get and apt-cache..."
 	$(Q)for ARCH in $(ARCHES); do \
 		mkdir -p $(ADIR)/$(CODENAME)-$$ARCH/apt/preferences.d; \
-		if [ $$ARCH = "source" -o "$(INSTALLER_CD)" = "1" -o "$(INSTALLER_CD)" = "2" -o "$(INSTALLER_CD)" = "C" ];then \
+		if [ $$ARCH = "source" -o "$(INSTALLER_CD)" = "1" -o "$(INSTALLER_CD)" = "2" -o "$(INSTALLER_CD)" = "C" -o "$(INSTALLER_CD)" = "F" ];then \
 			:> $(ADIR)/$(CODENAME)-$$ARCH/status ; \
 		else \
 			zcat $(MIRROR)/dists/$(CODENAME)/main/binary-$$ARCH/Packages.gz | \
@@ -372,6 +372,9 @@
 	if [ "$(EXCLUDE_486_KERNEL)"x = "1"x ] ; then \
 		ARCHDEFS="$$ARCHDEFS -DARCH_i386_EXCLUDE_486_KERNEL"; \
 	fi; \
+	if [ "$(EXCLUDE_586_KERNEL)"x = "1"x ] ; then \
+		ARCHDEFS="$$ARCHDEFS -DARCH_i386_EXCLUDE_586_KERNEL"; \
+	fi; \
 	if [ "$(SOURCEONLY)"x != "yes"x ] ; then \
 		cat $(TASKDIR)/$(TASK) | \
 		cpp -nostdinc -P -undef $$ARCHDEFS $$VARIANTDEFS\
diff -Nru debian-cd-3.1.16/contrib/CONF.sh debian-cd-3.1.17/contrib/CONF.sh
--- debian-cd-3.1.16/contrib/CONF.sh	2013-06-17 15:59:47.000000000 +0100
+++ debian-cd-3.1.17/contrib/CONF.sh	2015-04-20 12:42:34.000000000 +0100
@@ -47,8 +47,8 @@
 # Where I am (hoping I'm in the debian-cd dir)
 export BASEDIR=`pwd`
 
-# Building wheezy cd set ...
-export CODENAME=wheezy
+# Building jessie cd set ...
+export CODENAME=jessie
 
 if [ ! "$DI_CODENAME" ]
 then
diff -Nru debian-cd-3.1.16/contrib/HEADER.html.in debian-cd-3.1.17/contrib/HEADER.html.in
--- debian-cd-3.1.16/contrib/HEADER.html.in	1970-01-01 01:00:00.000000000 +0100
+++ debian-cd-3.1.17/contrib/HEADER.html.in	2015-04-20 12:42:34.000000000 +0100
@@ -0,0 +1,184 @@
+#if 0
+Input file for docs in multiple different directories. Process with
+cpp.
+#endif
+
+<h1>What's in this directory?</h1>
+
+#ifdef STYLElist
+
+   <p>These are list files.</p>
+
+   <h2>How do I use these files?</h2>
+
+   <p>
+   The list files here simply describe what files are contained in
+   each Debian ISO image, in order to help users find which images
+   they might want to download. They are simply text files, compressed
+   to save space and download time.</p>
+
+#else
+#  ifdef ARCHsource
+
+     <p>These are files containing source code for the Debian
+     operating system.</p>
+
+#  else
+
+     <p>These are files containing the installer and other software
+     for the Debian GNU/KERNEL operating system.
+
+#    ifdef ARCHmulti
+
+       The files in this directory are designed to work on both 32-bit
+       and 64-bit PCs (i386 and amd64).
+
+#    else
+
+       The files in this directory are specifically for
+       the <code>ARCH</code> architecture.</p>
+
+#    endif
+#  endif
+
+   <h2>How do I use these files?</h2>
+
+#  ifdef STYLEjigdo
+
+     <p>The files here are in "jigdo"
+     format. Use <a href="https://www.debian.org/CD/jigdo-cd/";>jigdo</a>
+     tools to download the contents of the complete ISO image files
+     from what's here and a normal Debian mirror. You should end up
+     with an exact copy of each ISO image as though you'd downloaded
+     it directly via HTTP or FTP.</p>
+
+#  elif defined(STYLEbt)
+
+     <p>The files here are bittorrent files. Use
+     a <a href="https://www.debian.org/CD/torrent-cd/";>bittorrent</a>
+     client program to download the contents of the complete ISO image
+     files in a peer-to-peer manner. You should end up with an exact
+     copy of each ISO image as though you'd downloaded it directly via
+     HTTP or FTP.</p>
+
+#  elif defined(STYLEiso)
+
+     <p>The files here are complete ISO images, ready to use.</p>
+
+#  endif
+
+   <p> Once you have downloaded all the ISO images you want, you will
+   typically need to write them to installation media.</p>
+
+   <h2>What size and type of media will I need?</h2>
+
+   <p>The images described here are sized to be written to
+
+#  ifdef TYPEcd
+     writeable CD media
+#  elif TYPEdvd
+     writeable DVD media
+#  elif TYPEbd
+     writeable Blu-Ray media
+#  elif TYPEdlbd
+     writeable dual-layer Blu-Ray media
+#  endif
+
+   at a minimum, but may be written to larger media if needed.
+
+#  ifdef ISOHYBRID
+
+     For <strong>extra</strong> convenience, these images may also be
+     written directly to a USB stick. So long as your computer will
+     boot directly from that USB stick, it should start the Debian
+     installer that way.
+
+#    if defined(TYPEdvd)
+
+       The first DVD in this set is also deliberately limited in size
+       so it should fit on a standard-sized 4GB USB stick.
+
+#    endif
+#  endif
+   </p>
+
+#  if !defined(ONEonly) && !defined(ARCHsource)
+
+     <h2>There are lots of files here! Do I need all of them?</h2>
+
+     <p>In most cases it is not necessary to download and
+     use <strong>all</strong> of these images to be able to install
+     Debian on your computer. Debian comes with a massive set of
+     software packages, hence why it takes so many disks for a
+     complete set. Most typical users only need a small subset of
+     those software packages.</p>
+
+     <p>Initially, you will only need to download and use
+     the <strong>first</strong> image of a set (labelled as
+     <code>debian-<i>something</i>-1</code> to be able to start the
+     Debian installer and set up Debian on your computer. If there are
+     more images available here
+     (labelled <code>debian-<i>something</i>-2</code>,
+     <code>debian-<i>something</i>-3</code>, etc.), they contain the
+     extra packages that can be installed on a Debian system (as
+     mentioned previously). They will <strong>not</strong> be bootable
+     and are entirely optional. If you have a fast Internet
+     connection, you're most likely better off installing any desired
+     extra packages directly from the Debian mirrors on the Internet
+     instead of by using these extra images.</p>
+
+#  endif
+
+#  if defined(TYPEcd) && !defined(ARCHsource) && !defined(STYLElist)
+#    if !defined(ONEonly)
+
+       <p>There are different versions of CD #1 here to allow for a
+       choice of default desktop on installation,
+       e.g. <code>debian-<i>something</i>-kde-CD-1</code> contains the
+       core pieces of the KDE desktop and will default to installing
+       that desktop when used. The <strong>default</strong> desktop
+       installed using
+       <code>debian-<i>something</i>-CD-1</code> is Gnome.</p>
+
+#    endif
+
+     <p>The <code>netinst</code> CD here is a small CD image that
+     contains just the core Debian installer code and a small core set
+     of text-mode programs (known as "standard" in Debian). To install
+     a desktop or other common software, you'll also need either an
+     Internet connection or some other Debian CD/DVD images.</p>
+
+#  endif
+
+#  ifdef UPDATES
+
+     <p>The <code>update</code> files here are extra convenience files
+     for people updating from previous versions of Debian. If you are
+     installing fresh, you may safely ignore
+     them. <a href="https://www.debian.org/CD/faq/#update-cd";>More
+     details...</a></p>
+
+#  endif
+
+   <h2>How can I verify my download is correct and exactly what has
+   been created by Debian?</h2>
+
+   <p>There are files here (MD5SUMS, SHA1SUMS, etc.) which contain
+   checksums of the images. These checksum files are also signed - see
+   MD5SUMS.sign, SHA1SUMS.sign, etc. Once you've downloaded an image,
+   you can check:</p>
+
+   <ul>
+      <li>that its checksum matches that expected from the checksum file; and
+      <li>that the checksum file has not been tampered with.
+   </ul>
+
+   <p>For more information about how to do these steps, read
+   the <a href="https://www.debian.org/CD/verify";>verification guide</a>.
+
+#endif
+
+<h2>Other questions?</h2>
+
+<p>See the Debian CD <a href="https://www.debian.org/CD/faq/";>FAQ</a>
+for lots more information about Debian CDs and installation.</p>
diff -Nru debian-cd-3.1.16/contrib/common.sh debian-cd-3.1.17/contrib/common.sh
--- debian-cd-3.1.16/contrib/common.sh	2013-06-17 15:59:47.000000000 +0100
+++ debian-cd-3.1.17/contrib/common.sh	2015-04-20 12:42:34.000000000 +0100
@@ -22,6 +22,8 @@
     case $1 in
         NI)
 	    DESC="Netinst CD";;
+        MACNI)
+	    DESC="Mac Netinst CD";;
         CD)
 	    DESC="Full CD";;
         DVD)
@@ -30,8 +32,10 @@
             DESC="Blu-ray";;
         DLBD)
             DESC="Dual-layer Blu-ray";;
-        KDE)
+        KDECD)
 	    DESC="KDE CD";;
+        GNOMECD)
+	    DESC="GNOME CD";;
         LIGHTCD)
 	    DESC="XFCE/lxde CD";;
         XFCECD)
@@ -105,5 +109,41 @@
     fi
     arch_end=`now`
     arch_time=`calc_time $arch_start $arch_end`
-    echo "$ARCH build started at $arch_start, ended at $arch_end (took $arch_time), error(s) $arch_error"
+    echo "$arch build started at $arch_start, ended at $arch_end (took $arch_time), error(s) $arch_error"
+}
+
+generate_checksums_for_arch () {
+    ARCH=$1
+    JIGDO_DIR=$2
+    ISO_DIR=$(echo $JIGDO_DIR | sed 's,jigdo-,iso-,g')
+
+    echo "$ARCH: Generating checksum files for the builds in $JIGDO_DIR"
+    $TOPDIR/debian-cd/tools/imagesums $JIGDO_DIR $EXTENSION > /dev/null
+    cp $JIGDO_DIR/*SUMS*${EXTENSION} $ISO_DIR
+}
+
+catch_live_builds () {
+    # Catch parallel build types here                                                                                               
+    while [ ! -f $PUBDIRLIVETRACE ] || [ ! -f $PUBDIROSTRACE ] ; do
+	sleep 1
+    done
+
+    . $PUBDIROSTRACE
+    time_spent=`calc_time $start $end`
+    echo "openstack build started at $start, ended at $end (took $time_spent), error $error"
+
+    . $PUBDIRLIVETRACE
+    time_spent=`calc_time $start $end`
+    echo "live builds started at $start, ended at $end (took $time_spent), error $error"
+
+}
+
+arch_has_firmware () {
+    arch=$1
+    for arch1 in $ARCHES_FIRMWARE; do
+        if [ "$arch" = "$arch1" ] ; then
+	    return 0
+	fi
+    done
+    return 1
 }
diff -Nru debian-cd-3.1.16/contrib/cronjob.daily debian-cd-3.1.17/contrib/cronjob.daily
--- debian-cd-3.1.16/contrib/cronjob.daily	2013-06-17 15:59:47.000000000 +0100
+++ debian-cd-3.1.17/contrib/cronjob.daily	2015-04-20 12:42:34.000000000 +0100
@@ -11,9 +11,12 @@
 BUILDLOCK=$HOME/.debian-cd.lock
 export PUBDIRJIG=$PUBDIR/daily-builds
 export DATE_BUILD="$DATE-$BUILDNUM"
-export TESTING_SUITE=wheezy
+export TESTING_SUITE=jessie
 BUILDS_RUNNING=""
 
+export NI_WANTED=1
+export TESTING_WANTED=0
+
 if [ "$RELEASE_BUILD"x = ""x ] ; then
     export SID_WANTED=1
     export OUT_FREE_TST=${PUBDIRJIG}/${TESTING_SUITE}_d-i/${DATE_BUILD}
@@ -24,30 +27,23 @@
     export RSYNC_TARGET_FIRMWARE=/mnt/nfs-cdimage/unofficial/non-free/cd-including-firmware/daily-builds
 else
     export SID_WANTED=0
+    export TESTING_WANTED=1
     export OUT_FREE_TST=${PUBDIRJIG}-$RELEASE_BUILD
     export OUT_FW_TST=${PUBDIRJIG}-$RELEASE_BUILD-firmware
     export OUT_FREE_SID=""
     export OUT_FW_SID=""
     export RSYNC_TARGET_FREE=/mnt/nfs-cdimage/.${RELEASE_BUILD}
     export RSYNC_TARGET_FIRMWARE=/mnt/nfs-cdimage/unofficial/non-free/cd-including-firmware/.${RELEASE_BUILD}
-    export CONF=~/build.wheezy/CONF.sh.${RELEASE_BUILD}
+    export CONF=~/build.jessie/CONF.sh.${RELEASE_BUILD}
     export RELEASE_BUILD=$RELEASE_BUILD
+    export EXTENSION=".small"
 fi
-export BC_WANTED=0
-export NI_WANTED=1
 
 . $TOPDIR/common.sh
 
 # Make sure the machine isn't rebooted while we're busy
 reboot_lock
 
-# If we're doing a normal set of daily/weekly builds, leave the
-# checksum filenames alone. Otherwise, make life easier for people
-# combining things later and append a suitable name as we build.
-if [ "$DEBVERSION"x != "testing"x ] ; then
-    export SUMS_EXTENSION=".small"
-fi
-
 finalise_arch_dir () {
     ARCH=$1
 
@@ -72,15 +68,20 @@
 		sed "s/ARCH/$ARCH/g;s/DATE/$DATESTRING/g;s/BUILDNUM/$BUILDNUM/g;s/INST_VER/$INST_VER/g" \
 		    $INFILE > $ARCH_DIR/HEADER.html
 	    fi
-	    $TOPDIR/debian-cd/tools/imagesums $ARCH_JIGDO_DIR $SUMS_EXTENSION
-	    cp $ARCH_JIGDO_DIR/*SUMS* $ARCH_ISO_DIR
+
+	    generate_checksums_for_arch $ARCH $ARCH_JIGDO_DIR
+
 	    cd $ARCH_DIR
 	    # Only make torrent files for release builds
 	    if [ "$RELEASE_BUILD"x != ""x ] ; then
-		~/build.wheezy/mktorrent iso-cd/*iso
+		~/build.jessie/mktorrent iso-cd/*iso
 		cp iso-cd/*SUMS* bt-cd
 	    fi
-	    ~/build.wheezy/mklist iso-cd/*iso
+	    if [ "$RELEASE_BUILD"x = ""x ] ; then
+		echo "Signing checksums files using the automatic key"
+		~/build.jessie/sign-images $OUT_DIR $ARCH
+	    fi
+	    ~/build.jessie/mklist iso-cd/*iso
 	    cd $TOPDIR
 	fi
     done
@@ -89,8 +90,9 @@
 cd $TOPDIR &&
 if lockfile -r0 $BUILDLOCK ; then
 
-    echo "svn update debian-cd:"
-    cd debian-cd && svn cleanup ; svn up ; cd ..
+#    echo "NOT checking for git updates"
+    echo "git update debian-cd"
+    cd debian-cd && git pull ; cd ..
 
     cd $TOPDIR
 
@@ -116,21 +118,21 @@
 	done
 
         if [ "$arch" = "multi-arch" ] ; then
-	    for arch1 in $ARCHES_FIRMWARE; do
-		if [ "$arch" = "$arch1" ] ; then
-		    if [ "$SID_WANTED" = "1" ] ; then
-			if [ "$NI_WANTED" = "1" ] ; then
-			    build_started SIDNIFIRMWARE
-			    OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
-				NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=C \
-				FORCE_FIRMWARE=1 CDNAME=firmware \
-				TASK=debian-installer+kernel LOGAPPEND="-1" \
-				MAXISOS=ALL MAXJIGDOS=ALL \
-				DI=sid DI_DIST="$DI_DIST" VARIANTS=xen \
-				DI_WWW_HOME=default ./testingcds "amd64 i386" &
-			fi
+	    if $(arch_has_firmware $arch) ; then
+		if [ "$SID_WANTED" = "1" ] ; then
+		    if [ "$NI_WANTED" = "1" ] ; then
+			build_started SIDNIFIRMWARE
+			OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
+			    NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=C \
+			    FORCE_FIRMWARE=1 CDNAME=firmware \
+			    TASK=debian-installer+kernel LOGAPPEND="-1" \
+			    MAXISOS=ALL MAXJIGDOS=ALL \
+			    DI=sid DI_DIST="$DI_DIST" VARIANTS=xen \
+			    DI_WWW_HOME=default ./testingcds "amd64 i386" &
 		    fi
+		fi
 
+		if [ "$TESTING_WANTED" = "1" ] ; then
 		    if [ "$NI_WANTED" = "1" ] ; then
 			build_started TESTINGNIFIRMWARE
 			OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
@@ -142,7 +144,7 @@
 			    ./testingcds "amd64 i386" &
 		    fi
 		fi
-	    done
+	    fi
 
 	    if [ "$SID_WANTED" = "1" ] ; then
 		if [ "$NI_WANTED" = "1" ] ; then
@@ -156,14 +158,16 @@
 		fi
 	    fi
 
-	    if [ "$NI_WANTED" = "1" ] ; then
-		build_started TESTINGNI
-		OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
-                    NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=2 \
-                    TASK=debian-installer+kernel LOGAPPEND="-1" \
-                    MAXISOS=ALL MAXJIGDOS=ALL \
-                    DI=${TESTING_SUITE} DI_DIST="$DI_DIST" VARIANTS=xen \
-                    ./testingcds "amd64 i386" &
+	    if [ "$TESTING_WANTED" = "1" ] ; then
+		if [ "$NI_WANTED" = "1" ] ; then
+		    build_started TESTINGNI
+		    OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
+			NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=2 \
+			TASK=debian-installer+kernel LOGAPPEND="-1" \
+			MAXISOS=ALL MAXJIGDOS=ALL \
+			DI=${TESTING_SUITE} DI_DIST="$DI_DIST" VARIANTS=xen \
+			./testingcds "amd64 i386" &
+		fi
 	    fi
 
 	    catch_parallel_builds
@@ -174,20 +178,20 @@
 
         else # end of m-a
 
-	    for arch1 in $ARCHES_FIRMWARE; do
-		if [ "$arch" = "$arch1" ] ; then
-		    if [ "$SID_WANTED" = "1" ] ; then
-			if [ "$NI_WANTED" = "1" ] ; then
-			    build_started SIDNIFIRMWARE
-			    OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
-				FORCE_FIRMWARE=1 CDNAME=firmware \
-				NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=C \
-				TASK=debian-installer+kernel MAXISOS=ALL MAXJIGDOS=ALL \
-				DI=sid DI_WWW_HOME=default DI_DIR="$ARCH_DI_DIR" \
-				./testingcds "$arch" &
-			fi
+	    if $(arch_has_firmware $arch) ; then
+		if [ "$SID_WANTED" = "1" ] ; then
+		    if [ "$NI_WANTED" = "1" ] ; then
+			build_started SIDNIFIRMWARE
+			OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
+			    FORCE_FIRMWARE=1 CDNAME=firmware \
+			    NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=C \
+			    TASK=debian-installer+kernel MAXISOS=ALL MAXJIGDOS=ALL \
+			    DI=sid DI_WWW_HOME=default DI_DIR="$ARCH_DI_DIR" \
+			    ./testingcds "$arch" &
 		    fi
+		fi
 
+		if [ "$TESTING_WANTED" = "1" ] ; then
 		    if [ "$NI_WANTED" = "1" ] ; then
 			build_started TESTINGNIFIRMWARE
 			OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
@@ -198,44 +202,55 @@
 			    ./testingcds "$arch" &
 		    fi
 		fi
-	    done
+	    fi
 
 	    if [ "$SID_WANTED" = "1" ] ; then
-		if [ "$BC_WANTED" = "1" ] ; then
-		    build_started SIDBC
+		if [ "$NI_WANTED" = "1" ] ; then
+		    build_started SIDNI
 		    OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
-			NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=1 \
-			TASK=debian-installer MAXISOS=ALL MAXJIGDOS=ALL \
+			NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=2 \
+			TASK=debian-installer+kernel MAXISOS=ALL MAXJIGDOS=ALL \
 			DI=sid DI_WWW_HOME=default DI_DIR="$ARCH_DI_DIR" \
 			./testingcds "$arch" &
 		fi
+	    fi
 
+	    if [ "$TESTING_WANTED" = "1" ] ; then
 		if [ "$NI_WANTED" = "1" ] ; then
-		    build_started SIDNI
+		    build_started TESTINGNI
 		    OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
 			NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=2 \
 			TASK=debian-installer+kernel MAXISOS=ALL MAXJIGDOS=ALL \
-			DI=sid DI_WWW_HOME=default DI_DIR="$ARCH_DI_DIR" \
+			DI=${TESTING_SUITE} DI_DIST="$DI_DIST" \
 			./testingcds "$arch" &
 		fi
 	    fi
 
-	    if [ "$BC_WANTED" = "1" ] ; then
-		build_started TESTINGBC
-		OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
-		    NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=1 \
-		    TASK=debian-installer MAXISOS=ALL MAXJIGDOS=ALL \
-		    DI=${TESTING_SUITE} DI_DIST="$DI_DIST" \
-		    ./testingcds "$arch" &
-	    fi
-
-	    if [ "$NI_WANTED" = "1" ] ; then
-		build_started TESTINGNI
-		OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
-		    NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=2 \
-		    TASK=debian-installer+kernel MAXISOS=ALL MAXJIGDOS=ALL \
-		    DI=${TESTING_SUITE} DI_DIST="$DI_DIST" \
-		    ./testingcds "$arch" &
+	    # Special Mac-only builds
+            if [ "$arch" = "i386" ] ; then
+		if [ "$SID_WANTED" = "1" ] ; then
+		    if [ "$NI_WANTED" = "1" ] ; then
+			build_started SIDMACNI
+			OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
+			    NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=F \
+			    TASK=debian-installer+kernel MAXISOS=ALL MAXJIGDOS=ALL \
+			    BOOT_METHODS=BIOS CDNAME="debian-mac" \
+			    DI=sid DI_WWW_HOME=default DI_DIR="$ARCH_DI_DIR" \
+			    ./testingcds "$arch" &
+		    fi
+		fi
+
+		if [ "$TESTING_WANTED" = "1" ] ; then
+		    if [ "$NI_WANTED" = "1" ] ; then
+			build_started TESTINGMACNI
+			OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
+			    NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=F \
+			    TASK=debian-installer+kernel MAXISOS=ALL MAXJIGDOS=ALL \
+			    BOOT_METHODS=BIOS CDNAME="debian-mac" \
+			    DI=${TESTING_SUITE} DI_DIST="$DI_DIST" \
+			    ./testingcds "$arch" &
+		    fi
+		fi
 	    fi
 
 	    catch_parallel_builds
diff -Nru debian-cd-3.1.16/contrib/cronjob.weekly debian-cd-3.1.17/contrib/cronjob.weekly
--- debian-cd-3.1.16/contrib/cronjob.weekly	2013-06-17 15:59:47.000000000 +0100
+++ debian-cd-3.1.17/contrib/cronjob.weekly	2015-04-20 12:42:34.000000000 +0100
@@ -9,8 +9,11 @@
 . $TOPDIR/settings.sh
 
 export PUBDIRJIG=$PUBDIR/weekly-builds
+export PUBDIROSTRACE=/mnt/nfs-cdimage/.live/trace-os
+export PUBDIRLIVETRACE=/mnt/nfs-cdimage/.live/trace-live
 export DATE_BUILD="$DATE-$BUILDNUM"
 BUILDLOCK=$HOME/.debian-cd.lock
+CD_I_F="/mnt/nfs-cdimage/unofficial/non-free/cd-including-firmware"
 
 . $TOPDIR/common.sh
 
@@ -23,16 +26,16 @@
 
 if [ "$RELEASE_BUILD"x = ""x ] ; then
     export RSYNC_TARGET=/mnt/nfs-cdimage/weekly-builds
-    export RSYNC_TARGET_FIRMWARE=/mnt/nfs-cdimage/unofficial/non-free/cd-including-firmware/weekly-builds
+    export RSYNC_TARGET_FIRMWARE=${CD_I_F}/weekly-builds
 else
-    export RSYNC_TARGET=/mnt/nfs-cdimage/.${RELEASE_BUILD}
-    export RSYNC_TARGET_FIRMWARE=/mnt/nfs-cdimage/unofficial/non-free/cd-including-firmware/.${RELEASE_BUILD}
-    export CONF=~/build.wheezy/CONF.sh.${RELEASE_BUILD}
+    export RSYNC_TARGET=/mnt/nfs-cdimage/.${RELEASE_BUILD}/debian-cd
+    export RSYNC_TARGET_FIRMWARE=${CD_I_F}/.${RELEASE_BUILD}/debian-cd
+    export CONF=~/build.jessie/CONF.sh.${RELEASE_BUILD}
     export RELEASE_BUILD=$RELEASE_BUILD
     # If we're doing a normal set of daily/weekly builds, leave the
     # checksum filenames alone. Otherwise, make life easier for people
     # combining things later and append a suitable name as we build.
-    export SUMS_EXTENSION=".large"
+    export EXTENSION=".large"
     USE_DAILY_DI=N
 fi
 
@@ -51,19 +54,32 @@
 
 BUILDS_RUNNING=""
 
+export NOOPENSTACK
+export NOLIVE
+rm -f $PUBDIRLIVETRACE $PUBDIROSTRACE
+~/build.jessie/cronjob.weekly-live &
+
 if lockfile -r0 $BUILDLOCK ; then
-#    echo "NOT checking for svn updates"
-    echo "svn update debian-cd"
-    cd debian-cd && svn cleanup; svn up ; cd ..
+#    echo "NOT checking for git updates"
+    echo "git update debian-cd"
+    cd debian-cd && git pull ; cd ..
+
+    # Work out the default desktop, and do *not* build a CD1 for that
+    # desktop - it'll be done in the full set anyway
+    TASKSEL_DEB=$(./debian-cd/tools/which_deb ${MIRROR} testing task-desktop binary)
+    DEFAULT_DESKTOP=$(dpkg --info ${MIRROR}/${TASKSEL_DEB} |
+	awk '/Recommends: task-.*-desktop/ {split($2,a,"-"); print toupper(a[2])}')
+    echo default desktop is $DEFAULT_DESKTOP, drop CD1 for that desktop
+    export NO${DEFAULT_DESKTOP}CD=1
 
 #    echo "NOT checking for popcon updates"
     if [ "$NOPOPCON"x = ""x ] ; then
-	cd debian-cd && ./tools/update_popcon tasks/wheezy/popularity-contest ; cd ..
+	cd debian-cd && ./tools/update_popcon tasks/jessie/popularity-contest ; cd ..
     fi
 
     cd $TOPDIR
     mkdir -p $PUBDIRJIG/trace
-    mkdir -p $RSYNC_TARGET
+    mkdir -p $RSYNC_TARGET $RSYNC_TARGET_FIRMWARE
 
     for arch in $ARCHES; do
         # Reset envvars for next iteration
@@ -71,8 +87,11 @@
         arch_start=`now`
 
         if [ "$arch" != multi-arch ] ; then
-            rm -rf $PUBDIRJIG/$arch
+            rm -rf $PUBDIRJIG/$arch $PUBDIRJIG-firmware/$arch
             mkdir -p $PUBDIRJIG/$arch
+	    if $(arch_has_firmware $arch) ; then
+		mkdir -p $PUBDIRJIG-firmware/$arch
+	    fi
 
 #            export DI_DIR="$ARCH_DI_DIR" 
 	    export VARIANTS=""
@@ -109,9 +128,9 @@
 			;;
                     source)
                         export MAXISOS=ALL; export MAXJIGDOS=ALL ;;
-                    powerpc)
-                        # Special case: make DVD1 fit on a 4GB USB
-                        # stick (#686471)
+                    powerpc|arm64)
+                        # Special cases: make DVD1 fit on a 4GB USB
+                        # stick
 			export FORCE_CD_SIZE1=STICK4GB
                         export MAXISOS=1; export MAXJIGDOS=ALL ;;
                     *)
@@ -168,8 +187,21 @@
                 esac
             fi
 
-            # kde, xfce and lxde cds
+            # individual desktop cds: gnome, kde, xfce. lxde
             if [ "$arch"x != "source"x ] && [ "$NOCD"x = ""x ] ; then
+		if [ "$NOGNOMECD"x = ""x ] ; then
+                    export MAX_PKG_SIZE=300000000
+                    export DESKTOP=gnome
+                    export MAXISOS=1; export MAXJIGDOS=1
+		    unset FORCE_CD_SIZE1
+		    export VARIANTS=""
+		    build_started GNOMECD
+                    INSTALLER_CD=E TASK=Debian-gnome \
+                        KERNEL_PARAMS='desktop=gnome' \
+                        MAXCDS=1 MAXISOS=ALL MAXJIGDOS=ALL \
+                        ./testingcds "$arch" &
+		fi
+
 		if [ "$NOKDECD"x = ""x ] ; then
                     export MAX_PKG_SIZE=300000000
                     export DESKTOP=kde
@@ -231,39 +263,69 @@
                     DI=${DI} DI_DIST=${DI} \
                     ./testingcds "$arch" &		
 
-                for arch1 in $ARCHES_FIRMWARE; do
-                    if [ "$arch" = "$arch1" ] ; then
-                        build_started NIFIRMWARE
-                        OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
-                            NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=C \
-                            FORCE_FIRMWARE=1 CDNAME=firmware \
-                            KERNEL_PARAMS="desktop=all" \
-                            DESKTOP=all VARIANTS=xen \
-                            TASK=debian-installer+kernel MAXISOS=ALL MAXJIGDOS=ALL \
-                            DI=${DI} DI_DIST=${DI} \
-                            ./testingcds "$arch" &
-                    fi
-                done
+		if $(arch_has_firmware $arch) ; then
+                    build_started NIFIRMWARE
+                    OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
+                        NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=C \
+                        FORCE_FIRMWARE=1 CDNAME=firmware \
+                        KERNEL_PARAMS="desktop=all" \
+                        DESKTOP=all VARIANTS=xen \
+                        TASK=debian-installer+kernel MAXISOS=ALL MAXJIGDOS=ALL \
+                        DI=${DI} DI_DIST=${DI} \
+                        ./testingcds "$arch" &
+                fi
+
+                if [ "$arch" = "i386" ] ; then
+                    build_started MACNI
+                    OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
+                        NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=F \
+                        BOOT_METHODS=BIOS CDNAME="debian-mac" \
+                        KERNEL_PARAMS="desktop=all" \
+                        DESKTOP=all VARIANTS=xen \
+                        TASK=debian-installer+kernel MAXISOS=ALL MAXJIGDOS=ALL \
+                        DI=${DI} DI_DIST=${DI} \
+                        ./testingcds "$arch" &
+                fi
             fi
 
 	    catch_parallel_builds
 
+            for dir in $PUBDIRJIG/$arch/jigdo-*; do
+                generate_checksums_for_arch $arch $dir
+            done
+            if [ -d $PUBDIRJIG-firmware/$arch ] ; then
+                for dir in ${PUBDIRJIG}-firmware/$arch/jigdo-*; do
+                    generate_checksums_for_arch $arch $dir
+                done
+            fi
+
             if [ "$NOSYNC"x = ""x ] ; then
                 if [ "$arch_error"x = "none"x ] ; then
-                    echo "  Running ~/build.wheezy/iso_run $PUBDIRJIG/ $RSYNC_TARGET/ $arch &"
-                    ~/build.wheezy/iso_run $PUBDIRJIG/ $RSYNC_TARGET/ $arch &
-		    if [ -d $PUBDIRJIG-firmware/$arch ] ; then
-                        echo "  Running ~/build.wheezy/iso_run ${PUBDIRJIG}-firmware/ $RSYNC_TARGET_FIRMWARE/ $arch &"
-                        ~/build.wheezy/iso_run ${PUBDIRJIG}-firmware/ $RSYNC_TARGET_FIRMWARE/ $arch &
+                    if [ "$RELEASE_BUILD"x = ""x ] ; then
+                        echo "Signing checksums files using the automatic key"
+                        ~/build.jessie/sign-images $PUBDIRJIG $arch
+                    fi
+                    echo "  Running ~/build.jessie/iso_run $PUBDIRJIG/ $RSYNC_TARGET/ $arch &"
+                    ~/build.jessie/iso_run $PUBDIRJIG/ $RSYNC_TARGET/ $arch &
+                    if [ -d $PUBDIRJIG-firmware/$arch ] ; then
+                        if [ "$RELEASE_BUILD"x = ""x ] ; then
+                            echo "Signing checksums files using the automatic key"
+                            ~/build.jessie/sign-images $PUBDIRJIG-firmware $ARCH
+                        fi
+                        echo "  Running ~/build.jessie/iso_run ${PUBDIRJIG}-firmware/ $RSYNC_TARGET_FIRMWARE/ $arch &"
+                        ~/build.jessie/iso_run ${PUBDIRJIG}-firmware/ $RSYNC_TARGET_FIRMWARE/ $arch &
                     fi
                 else
-                    ~/build.wheezy/report_build_error $RSYNC_TARGET $arch "$arch_error"
+                    ~/build.jessie/report_build_error $RSYNC_TARGET $arch "$arch_error"
                 fi
             fi
         else # multi-arch
-            rm -rf $PUBDIRJIG/multi-arch
+            rm -rf $PUBDIRJIG/multi-arch $PUBDIRJIG-firmware/multi-arch
             for i in iso-dvd jigdo-dvd iso-cd jigdo-cd; do
                 mkdir -p $PUBDIRJIG/multi-arch/$i
+                if $(arch_has_firmware multi-arch) ; then
+		    mkdir -p $PUBDIRJIG-firmware/multi-arch/$i
+		fi
             done
 
             if [ "$NODVD"x = ""x ] ; then
@@ -294,49 +356,70 @@
                     DI=${DI} DI_DIST=${DI} \
                     ./testingcds "amd64 i386" &
 
-                for arch1 in $ARCHES_FIRMWARE; do
-                    if [ "$arch" = "$arch1" ] ; then
-                        build_started NIFIRMWARE
-                        OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
-                            NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=C \
-                            FORCE_FIRMWARE=1 CDNAME=firmware \
-                            KERNEL_PARAMS="desktop=all" \
-                            DESKTOP=all VARIANTS=xen \
-                            TASK=debian-installer+kernel \
-                            MAXISOS=ALL MAXJIGDOS=ALL \
-                            DI=${DI} DI_DIST=${DI} \
-                            ./testingcds "amd64 i386" &
-                    fi
-                done
+		if $(arch_has_firmware $arch) ; then
+                    build_started NIFIRMWARE
+                    OMIT_RELEASE_NOTES=1 OMIT_MANUAL=1 NORECOMMENDS=1 \
+                        NOSUGGESTS=1 COMPLETE=0 INSTALLER_CD=C \
+                        FORCE_FIRMWARE=1 CDNAME=firmware \
+                        KERNEL_PARAMS="desktop=all" \
+                        DESKTOP=all VARIANTS=xen \
+                        TASK=debian-installer+kernel \
+                        MAXISOS=ALL MAXJIGDOS=ALL \
+                        DI=${DI} DI_DIST=${DI} \
+                        ./testingcds "amd64 i386" &
+                fi
             fi
 
 	    catch_parallel_builds
 
+            for dir in $PUBDIRJIG/multi-arch/jigdo-*; do
+                generate_checksums_for_arch multi-arch $dir
+            done
+            if [ -d $PUBDIRJIG-firmware/multi-arch ] ; then
+                for dir in ${PUBDIRJIG}-firmware/multi-arch/jigdo-*; do
+                    generate_checksums_for_arch multi-arch $dir
+                done
+	    fi
+
             if [ "$NOSYNC"x = ""x ] ; then
                 if [ "$arch_error"x = "none"x ] || [ "$arch_error"x = ""x ] ; then
-                    echo "  Running ~/build.wheezy/iso_run $PUBDIRJIG/ $RSYNC_TARGET/ multi-arch &"
-                    ~/build.wheezy/iso_run $PUBDIRJIG/ $RSYNC_TARGET/ multi-arch &
-		    if [ -d $PUBDIRJIG-firmware/multi-arch ] ; then
-                        echo "  Running ~/build.wheezy/iso_run ${PUBDIRJIG}-firmware/ $RSYNC_TARGET_FIRMWARE/ multi-arch &"
-                        ~/build.wheezy/iso_run ${PUBDIRJIG}-firmware/ $RSYNC_TARGET_FIRMWARE/ multi-arch &
+                    if [ "$RELEASE_BUILD"x = ""x ] ; then
+                        echo "Signing checksums files using the automatic key"
+                        ~/build.jessie/sign-images $PUBDIRJIG multi-arch
+                    fi
+                    echo "  Running ~/build.jessie/iso_run $PUBDIRJIG/ $RSYNC_TARGET/ multi-arch &"
+                    ~/build.jessie/iso_run $PUBDIRJIG/ $RSYNC_TARGET/ multi-arch &
+                    if [ -d $PUBDIRJIG-firmware/multi-arch ] ; then
+                        if [ "$RELEASE_BUILD"x = ""x ] ; then
+                            echo "Signing checksums files using the automatic key"
+		            ~/build.jessie/sign-images $PUBDIRJIG-firmware multi-arch
+                        fi
+                        echo "  Running ~/build.jessie/iso_run ${PUBDIRJIG}-firmware/ $RSYNC_TARGET_FIRMWARE/ multi-arch &"
+                        ~/build.jessie/iso_run ${PUBDIRJIG}-firmware/ $RSYNC_TARGET_FIRMWARE/ multi-arch &
                     fi
                 else
-                    ~/build.wheezy/report_build_error $RSYNC_TARGET multi-arch "$arch_error"
+                    ~/build.jessie/report_build_error $RSYNC_TARGET multi-arch "$arch_error"
                 fi
             fi
         fi # end of multi-arch
 
     done
 
+    # Generate HEADER.html files
+    ~/build.jessie/generate_headers $RSYNC_TARGET
+    ~/build.jessie/generate_headers $RSYNC_TARGET_FIRMWARE
+
     if [ "$NOFW"x = ""x ] ; then
-	~/build.wheezy/generate_firmware_images wheezy
-	~/build.wheezy/generate_firmware_images sid
+	~/build.jessie/generate_firmware_images jessie
+	~/build.jessie/generate_firmware_images sid
     fi
     
     if [ "$NOSNAP"x = ""x ] ; then
         ~/bin/weekly-snapshots
     fi
 
+    catch_live_builds
+
     date -u > $PUBDIRJIG/trace/cdimage.debian.org
 
     rm -f $BUILDLOCK
diff -Nru debian-cd-3.1.16/contrib/cronjob.weekly-live debian-cd-3.1.17/contrib/cronjob.weekly-live
--- debian-cd-3.1.16/contrib/cronjob.weekly-live	1970-01-01 01:00:00.000000000 +0100
+++ debian-cd-3.1.17/contrib/cronjob.weekly-live	2015-04-20 12:42:34.000000000 +0100
@@ -0,0 +1,57 @@
+#!/bin/bash
+
+now () {
+    date -u +%F:%H:%M:%S
+}
+
+START=`now`
+ERROR=0
+if [ "$NOOPENSTACK"x = ""x ] ; then
+    echo "  Running openstack build"
+    ~/live/bin/run-openstack
+    ERROR=$?
+    if [ $ERROR -eq 0 ] ; then
+	if [ "$RELEASE_BUILD"x = ""x ] ; then
+	    ~/build.jessie/sign-images /mnt/nfs-cdimage/.live/new/openstack-jessie ""
+	    mv /mnt/nfs-cdimage/.live/new/openstack-jessie/* /mnt/nfs-cdimage/openstack/testing
+	else
+	    mkdir -p /mnt/nfs-cdimage/.${RELEASE_BUILD}
+	    mv /mnt/nfs-cdimage/.live/new/openstack-jessie/* /mnt/nfs-cdimage/.${RELEASE_BUILD}/openstack
+	fi
+    fi
+    # Wait for the KVM to shut down cleanly
+    sleep 30
+fi
+END=`now`
+echo -e "start=$START\nend=$END\nerror=$ERROR\nlogfile=\n" > $PUBDIROSTRACE
+
+START=`now`
+ERROR=0
+if [ "$NOLIVE"x = ""x ] ; then
+    echo "  Running debian-live build"
+    ~/live/bin/run-live
+    ERROR=$?
+    if [ $ERROR -eq 0 ] ; then
+	if [ "$RELEASE_BUILD"x = ""x ] ; then
+	    ~/build.jessie/sign-images /mnt/nfs-cdimage/.live/new/free ""
+	    mv -f /mnt/nfs-cdimage/weekly-live-builds /mnt/nfs-cdimage/weekly-live-builds.old
+	    mv /mnt/nfs-cdimage/.live/new/free/ /mnt/nfs-cdimage/weekly-live-builds
+	    rm -rf /mnt/nfs-cdimage/weekly-live-builds.old
+
+	    ~/build.jessie/sign-images /mnt/nfs-cdimage/.live/new/non-free ""
+	    mv -f ${CD_I_F}/weekly-live-builds ${CD_I_F}/weekly-live-builds.old
+	    mv /mnt/nfs-cdimage/.live/new/non-free ${CD_I_F}/weekly-live-builds
+	    rm -rf ${CD_I_F}/weekly-live-builds.old
+	else
+	    mkdir -p /mnt/nfs-cdimage/.${RELEASE_BUILD}/
+	    mv /mnt/nfs-cdimage/.live/new/free/ /mnt/nfs-cdimage/.${RELEASE_BUILD}/live-free
+	    mv /mnt/nfs-cdimage/.live/new/non-free /mnt/nfs-cdimage/.${RELEASE_BUILD}/live-non-free
+	fi
+    fi
+    # Wait for the KVM to shut down cleanly
+    sleep 30
+fi
+END=`now`
+echo -e "start=$START\nend=$END\nerror=$ERROR\nlogfile=\n" > $PUBDIRLIVETRACE
+
+exit 0
diff -Nru debian-cd-3.1.16/contrib/daily-firmware.html debian-cd-3.1.17/contrib/daily-firmware.html
--- debian-cd-3.1.16/contrib/daily-firmware.html	2013-06-17 15:59:47.000000000 +0100
+++ debian-cd-3.1.17/contrib/daily-firmware.html	2015-04-20 12:42:34.000000000 +0100
@@ -1,7 +1,7 @@
 <h1>Daily "firmware" build #BUILDNUM for ARCH, using installer build from INST_VER</h1>
 
 <p>These images will install the testing version of Debian, currently
-<strong>Wheezy</strong>. They include non-free firmware to make
+<strong>Jessie</strong>. They include non-free firmware to make
 installation easier on some systems requiring proprietary but
 redistributable
 firmware. See <a href="http://wiki.debian.org/Firmware";>http://wiki.debian.org/Firmware</a>
diff -Nru debian-cd-3.1.16/contrib/daily.html debian-cd-3.1.17/contrib/daily.html
--- debian-cd-3.1.16/contrib/daily.html	2013-06-17 15:59:47.000000000 +0100
+++ debian-cd-3.1.17/contrib/daily.html	2015-04-20 12:42:34.000000000 +0100
@@ -1,7 +1,7 @@
 <h1>Daily build #BUILDNUM for ARCH, using installer build from INST_VER</h1>
 
 <p>These images will install the testing version of Debian, currently
-<strong>Wheezy</strong>.</p>
+<strong>Jessie</strong>.</p>
 
 <p>See the <a href="/cdimage/daily-builds/">top-level daily
 directory</a> for more information about the daily builds.</p>
diff -Nru debian-cd-3.1.16/contrib/generate_headers debian-cd-3.1.17/contrib/generate_headers
--- debian-cd-3.1.16/contrib/generate_headers	1970-01-01 01:00:00.000000000 +0100
+++ debian-cd-3.1.17/contrib/generate_headers	2015-04-20 12:42:34.000000000 +0100
@@ -0,0 +1,49 @@
+#!/bin/bash
+
+INPUT=~/build/HEADER.html.in
+CPP="cpp -traditional -undef -P -C -nostdinc"
+
+if [ "$1"x = ""x ] ; then
+   echo "$0: Need to be told which directory to target!"
+   exit 1
+fi
+
+cd $1
+for DIR in *; do
+    if [ -d $DIR ] && [ $DIR != trace ] ; then
+	ARCH=$DIR
+	case $ARCH in
+	    i386|amd64|arm64)
+		EXTRAS="-DISOHYBRID"
+		;;
+	    multi-arch)
+		EXTRAS="-DISOHYBRID -DONEonly"
+		ARCH="multi"
+		;;
+	    *)            
+		EXTRAS=""
+		;;
+	esac
+	case $ARCH in
+	    kfreebsd*)
+		KERNEL="kFreeBSD"
+		;;
+	    hurd*)
+		KERNEL="Hurd"
+		;;
+	    *)
+		KERNEL="Linux"
+		;;
+	esac
+	for DIR1 in $DIR/*-* ; do
+	    STYLE=$(echo $DIR1 | sed 's,^.*/,,g;s,-.*$,,g')
+	    TYPE=$(echo $DIR1 | sed 's,^.*-,,g')
+	    ls -l $DIR1 | grep -q update
+	    if [ $? -eq 0 ] ; then
+		UPDATES="-DUPDATES"
+	    fi
+	    #echo "Found directory $DIR (ARCH $ARCH, STYLE $STYLE, TYPE $TYPE)"
+	    $CPP -DARCH=${ARCH} -DARCH${ARCH} -DKERNEL=${KERNEL} -DSTYLE${STYLE} -DSTYLE=${STYLE} -DTYPE${TYPE} $UPDATES $EXTRAS $INPUT > $DIR1/HEADER.html
+	done
+    fi
+done
diff -Nru debian-cd-3.1.16/contrib/images4testing_d-i debian-cd-3.1.17/contrib/images4testing_d-i
--- debian-cd-3.1.16/contrib/images4testing_d-i	1970-01-01 01:00:00.000000000 +0100
+++ debian-cd-3.1.17/contrib/images4testing_d-i	2015-04-20 12:42:34.000000000 +0100
@@ -0,0 +1,2 @@
+DI_DIST=jessie
+DI_CODENAME=$DI_DIST
diff -Nru debian-cd-3.1.16/contrib/iso_run debian-cd-3.1.17/contrib/iso_run
--- debian-cd-3.1.16/contrib/iso_run	2013-06-17 15:59:47.000000000 +0100
+++ debian-cd-3.1.17/contrib/iso_run	2015-04-20 12:42:34.000000000 +0100
@@ -6,7 +6,7 @@
 RSYNC_TARGET=$2
 ARCH=$3
 
-LOG=~/build.wheezy/log/$ARCH.iso_run
+LOG=~/build.jessie/log/$ARCH.iso_run
 HOSTNAME=`hostname -f`
 LOCK=~/iso_run.lock
 START=`date -u +%H:%M:%S`
@@ -33,7 +33,7 @@
     cp -a $FILE $OUTDIR/$FILE
 
     if [ "$RELEASE_BUILD"x != ""x ] ; then
-	~/build.wheezy/mktorrent $FILE >> $LOG
+	~/build.jessie/mktorrent $FILE >> $LOG
 	BTFILE=`echo $FILE.torrent | sed 's/iso-/bt-/'`
 	echo $OUTDIR/$BTFILE >> $LOG
 	cp -a $BTFILE $OUTDIR/$BTFILE
@@ -93,7 +93,7 @@
 	    # Only populate the HEADER.html file for regular weekly
 	    # builds; we don't want it for releases
             DATE=`date -u`
-            sed "s/ARCH/$ARCH/g;s/DATE/$DATE/g" ~/build.wheezy/weekly.html \
+            sed "s/ARCH/$ARCH/g;s/DATE/$DATE/g" ~/build.jessie/weekly.html \
 		> $TARGET/$ARCH.tmp/HEADER.html
 	fi
 
diff -Nru debian-cd-3.1.16/contrib/settings.sh debian-cd-3.1.17/contrib/settings.sh
--- debian-cd-3.1.16/contrib/settings.sh	2014-05-10 13:50:31.000000000 +0100
+++ debian-cd-3.1.17/contrib/settings.sh	2015-04-20 12:42:34.000000000 +0100
@@ -5,8 +5,8 @@
 export PUBDIR=/org/cdbuilder.debian.org/dst/deb-cd
 
 export MIRROR=/org/cdbuilder.debian.org/src/ftp/debian
-export BASEDIR=~/build.wheezy/debian-cd
-export MKISOFS=~/build.wheezy/mkisofs/usr/bin/mkisofs
+export BASEDIR=~/build.jessie/debian-cd
+export MKISOFS=~/build.jessie/mkisofs/usr/bin/mkisofs
 if [ "$DATE"x = ""x ] ; then
     export DATE=`date -u +%Y%m%d`
 fi
@@ -14,7 +14,7 @@
 export EXTRACTED_SOURCES=/mnt/nfs-cdimage/cd-sources
 
 if [ "$ARCHES"x = ""x ] ; then
-    ARCHES="i386 source amd64 multi-arch powerpc armel armhf ia64 mips mipsel s390x sparc kfreebsd-amd64 kfreebsd-i386"
+    ARCHES="i386 source amd64 multi-arch arm64 armel armhf ppc64el mips mipsel s390x powerpc"
 fi
 
 if [ "$ARCHES_FIRMWARE"x = ""x ] ; then
diff -Nru debian-cd-3.1.16/contrib/sign-images debian-cd-3.1.17/contrib/sign-images
--- debian-cd-3.1.16/contrib/sign-images	1970-01-01 01:00:00.000000000 +0100
+++ debian-cd-3.1.17/contrib/sign-images	2015-04-20 12:42:34.000000000 +0100
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# Helper for signing images
+#
+DIR=$1
+ARCH=$2
+
+KEYID=42468F4009EA8AC3
+
+cd $DIR/$ARCH
+
+for file in $(find . -name '*SUMS' \
+    -o -name *SUMS.small \
+    -o -name *SUMS.large); do
+    gpg -q -a --detach-sign \
+	--batch --no-tty \
+        --passphrase-file ~/.testing-pass \
+        -u $KEYID \
+        $file 2>&1 > gpg.log
+    error=$?
+    if [ $error -ne 0 ] ; then  
+        echo "  FAIL:"
+        cat gpg.log
+        exit 1
+    fi
+    mv $file.asc $file.sign > gpg.log 2>&1
+    if [ $error -ne 0 ] ; then  
+        echo "  FAIL:"
+        cat gpg.log
+        exit 1
+    fi
+done
+
+rm -f gpg.log
diff -Nru debian-cd-3.1.16/contrib/testingcds debian-cd-3.1.17/contrib/testingcds
--- debian-cd-3.1.16/contrib/testingcds	2013-06-17 15:59:47.000000000 +0100
+++ debian-cd-3.1.17/contrib/testingcds	2015-04-20 12:42:34.000000000 +0100
@@ -13,11 +13,11 @@
 #set -x
 
 if [ "$CONF"x = ""x ] ; then
-    CONF=~/build.wheezy/CONF.sh
+    CONF=~/build.jessie/CONF.sh
 fi
 export CF=$CONF
 if [ "$DCD_DIR"x = ""x ] ; then
-    DCD_DIR=~/build.wheezy/debian-cd
+    DCD_DIR=~/build.jessie/debian-cd
 fi
 export CF=$CONF
 
@@ -60,7 +60,7 @@
 case "$INSTALLER_CD" in
     1)
         export DISKTYPE=BC;;
-    2|7|8|C)
+    2|7|8|C|F)
         export DISKTYPE=NETINST;;
     3|6)
         export OUT_TYPE=dvd
@@ -79,6 +79,8 @@
     D)
         export OUT_TYPE=dlbd
         export DISKTYPE=DLBD;;
+    E)
+        export DISKTYPE=gnome-CD;;
     *)  export DISKTYPE=CD;;
 esac
 
@@ -122,6 +124,10 @@
     export OFFICIAL="Official Multi-Arch Netinst"
 elif [ "$INSTALLER_CD" = "C" ]; then
     export OFFICIAL="Unofficial Netinst including firmware"
+elif [ "$INSTALLER_CD" = "E" ]; then
+    export OFFICIAL="Official Gnome CD Snapshot"
+elif [ "$INSTALLER_CD" = "F" ]; then
+    export OFFICIAL="Official Mac Netinst"
 fi
 
 rm -rf "$OUT"
@@ -140,6 +146,15 @@
 
 > $LOGFILE
 
+# Make sure we have an extension for all builds, so we don't have
+# multiple processes tripping over each other when generating checksum
+# files
+if [ "$INSTALLER_CD" = ""x ] ; then
+    SUMS_EXTENSION=".cd"
+else
+    SUMS_EXTENSION=".${INSTALLER_CD}"
+fi
+
 # Do the actual building
 START=`now`
 if ./build.sh "$ARCH" >>"$LOGFILE" 2>&1 ; then
@@ -147,7 +162,8 @@
     # we treat the daily netinst images in a different way
     if [ "$INSTALLER_CD" = "1" ] || \
        [ "$INSTALLER_CD" = "2" ] || \
-       [ "$INSTALLER_CD" = "C" ] ; then
+       [ "$INSTALLER_CD" = "C" ] || \
+       [ "$INSTALLER_CD" = "F" ] ; then
 
         ##################################
         # NETINST STUFF
@@ -170,11 +186,6 @@
 	mkdir -p $ARCHDIR/list-cd $ARCHDIR/jigdo-cd $ARCHDIR/iso-cd
         # put the isos and jigdos in their place
 
-	$TOPDIR/debian-cd/tools/imagesums $OUT $SUMS_EXTENSION >> "$LOGFILE"
-        sed -i 's/-BC-1/-businesscard/g;s/-NETINST-1/-netinst/g' $OUT/*SUMS*
-        cp $OUT/*SUMS* $ARCHDIR/iso-cd
-        cp $OUT/*SUMS* $ARCHDIR/jigdo-cd
-
         for i in "$OUT"/*-1.iso; do
             BASE=`basename $i .iso`
             NETINSTNAME=`echo $BASE | sed 's/-BC-1/-businesscard/g;s/-NETINST-1/-netinst/g'`
@@ -213,18 +224,10 @@
         done
 
         mkdir -p "$PUBDIRJIG"/$OUTARCH/jigdo-${OUT_TYPE}
-	for file in "$OUT"/*SUMS${SUMS_EXTENSION}; do
-	    outfile="$PUBDIRJIG"/$OUTARCH/jigdo-${OUT_TYPE}/`basename $file`
-	    cat $file >> $outfile
-	done
         mv "$OUT"/*.template "$PUBDIRJIG"/$OUTARCH/jigdo-${OUT_TYPE}
         mv "$OUT"/*.jigdo    "$PUBDIRJIG"/$OUTARCH/jigdo-${OUT_TYPE}
 
         mkdir -p "$PUBDIRJIG"/$OUTARCH/iso-${OUT_TYPE}
-	for file in "$OUT"/*SUMS${SUMS_EXTENSION}; do
-	    outfile="$PUBDIRJIG"/$OUTARCH/iso-${OUT_TYPE}/`basename $file`
-	    cat $file >> $outfile
-	done
 	for file in "$OUT"/*.iso; do
 	    if [ -e $file ] ; then 
                 mv $file    "$PUBDIRJIG"/$OUTARCH/iso-${OUT_TYPE}
@@ -269,7 +272,7 @@
     for i in $MYEMAIL
     do
         (echo Error when trying to create cds for $RUN ; cat $LOGFILE) | \
-            mail -s "testingcds $RUN has failed; log included" "$i"
+            mail -s "$RELEASE_BUILD testingcds $RUN has failed; log included" "$i"
     done
     overview "$RUN" failed
     END=`now`
diff -Nru debian-cd-3.1.16/data/jessie/pegasos/pegasos debian-cd-3.1.17/data/jessie/pegasos/pegasos
--- debian-cd-3.1.16/data/jessie/pegasos/pegasos	2014-05-10 13:50:31.000000000 +0100
+++ debian-cd-3.1.17/data/jessie/pegasos/pegasos	2015-04-20 12:42:34.000000000 +0100
@@ -37,10 +37,10 @@
 : my-boot-case ( num -- )
   ."  " cr
   case
-    1 of " cd install/powerpc/vmlinuz-chrp.initrd --" endof
-    2 of " cd install/powerpc/vmlinuz-chrp.initrd priority=low --" endof
-    3 of " cd install/powerpc/vmlinuz-chrp.initrd rescue/enable=true --" endof
-    4 of " cd install/powerpc/vmlinuz-chrp.initrd auto=true priority=critical --" endof
+    1 of " cd install/powerpc/vmlinuz-chrp.initrd ---" endof
+    2 of " cd install/powerpc/vmlinuz-chrp.initrd priority=low ---" endof
+    3 of " cd install/powerpc/vmlinuz-chrp.initrd rescue/enable=true ---" endof
+    4 of " cd install/powerpc/vmlinuz-chrp.initrd auto=true priority=critical ---" endof
     5 of " none" endof
   endcase
   $boot
diff -Nru debian-cd-3.1.16/data/jessie/yaboot/mac32.conf debian-cd-3.1.17/data/jessie/yaboot/mac32.conf
--- debian-cd-3.1.16/data/jessie/yaboot/mac32.conf	2014-05-10 13:50:31.000000000 +0100
+++ debian-cd-3.1.17/data/jessie/yaboot/mac32.conf	2015-04-20 12:42:34.000000000 +0100
@@ -9,27 +9,27 @@
 image=/install/powerpc/vmlinux
 	label=install
 	initrd=/install/powerpc/initrd.gz
-	append="--"
+	append="---"
 	initrd-size=10240
 	read-only
 
 image=/install/powerpc/vmlinux
 	label=expert
 	initrd=/install/powerpc/initrd.gz
-	append="priority=low --"
+	append="priority=low ---"
 	initrd-size=10240
 	read-only
 
 image=/install/powerpc/vmlinux
 	label=rescue
 	initrd=/install/powerpc/initrd.gz
-	append="rescue/enable=true --"
+	append="rescue/enable=true ---"
 	initrd-size=10240
 	read-only
 
 image=/install/powerpc/vmlinux
 	label=auto
 	initrd=/install/powerpc/initrd.gz
-	append="auto=true priority=critical --"
+	append="auto=true priority=critical ---"
 	initrd-size=10240
 	read-only
diff -Nru debian-cd-3.1.16/data/jessie/yaboot/yaboot.conf debian-cd-3.1.17/data/jessie/yaboot/yaboot.conf
--- debian-cd-3.1.16/data/jessie/yaboot/yaboot.conf	2014-05-10 13:50:31.000000000 +0100
+++ debian-cd-3.1.17/data/jessie/yaboot/yaboot.conf	2015-04-20 12:42:34.000000000 +0100
@@ -9,28 +9,28 @@
 image=/install/powerpc64/vmlinux
 	label=install
 	initrd=/install/powerpc64/initrd.gz
-	append="--"
+	append="---"
 	initrd-size=10240
 	read-only
 
 image=/install/powerpc64/vmlinux
 	label=expert
 	initrd=/install/powerpc64/initrd.gz
-	append="priority=low --"
+	append="priority=low ---"
 	initrd-size=10240
 	read-only
 
 image=/install/powerpc64/vmlinux
 	label=rescue
 	initrd=/install/powerpc64/initrd.gz
-	append="rescue/enable=true --"
+	append="rescue/enable=true ---"
 	initrd-size=10240
 	read-only
 
 image=/install/powerpc64/vmlinux
 	label=auto
 	initrd=/install/powerpc64/initrd.gz
-	append="auto=true priority=critical --"
+	append="auto=true priority=critical ---"
 	initrd-size=10240
 	read-only
 
@@ -40,27 +40,27 @@
 image=/install/powerpc/vmlinux
 	label=install32
 	initrd=/install/powerpc/initrd.gz
-	append="--"
+	append="---"
 	initrd-size=10240
 	read-only
 
 image=/install/powerpc/vmlinux
 	label=expert32
 	initrd=/install/powerpc/initrd.gz
-	append="priority=low --"
+	append="priority=low ---"
 	initrd-size=10240
 	read-only
 
 image=/install/powerpc/vmlinux
 	label=rescue32
 	initrd=/install/powerpc/initrd.gz
-	append="rescue/enable=true --"
+	append="rescue/enable=true ---"
 	initrd-size=10240
 	read-only
 
 image=/install/powerpc/vmlinux
 	label=auto32
 	initrd=/install/powerpc/initrd.gz
-	append="auto=true priority=critical --"
+	append="auto=true priority=critical ---"
 	initrd-size=10240
 	read-only
diff -Nru debian-cd-3.1.16/data/sid/pegasos/pegasos debian-cd-3.1.17/data/sid/pegasos/pegasos
--- debian-cd-3.1.16/data/sid/pegasos/pegasos	2014-05-10 13:50:31.000000000 +0100
+++ debian-cd-3.1.17/data/sid/pegasos/pegasos	2015-04-20 12:42:34.000000000 +0100
@@ -37,10 +37,10 @@
 : my-boot-case ( num -- )
   ."  " cr
   case
-    1 of " cd install/powerpc/vmlinuz-chrp.initrd --" endof
-    2 of " cd install/powerpc/vmlinuz-chrp.initrd priority=low --" endof
-    3 of " cd install/powerpc/vmlinuz-chrp.initrd rescue/enable=true --" endof
-    4 of " cd install/powerpc/vmlinuz-chrp.initrd auto=true priority=critical --" endof
+    1 of " cd install/powerpc/vmlinuz-chrp.initrd ---" endof
+    2 of " cd install/powerpc/vmlinuz-chrp.initrd priority=low ---" endof
+    3 of " cd install/powerpc/vmlinuz-chrp.initrd rescue/enable=true ---" endof
+    4 of " cd install/powerpc/vmlinuz-chrp.initrd auto=true priority=critical ---" endof
     5 of " none" endof
   endcase
   $boot
diff -Nru debian-cd-3.1.16/data/sid/yaboot/mac32.conf debian-cd-3.1.17/data/sid/yaboot/mac32.conf
--- debian-cd-3.1.16/data/sid/yaboot/mac32.conf	2014-05-10 13:50:31.000000000 +0100
+++ debian-cd-3.1.17/data/sid/yaboot/mac32.conf	2015-04-20 12:42:34.000000000 +0100
@@ -9,27 +9,27 @@
 image=/install/powerpc/vmlinux
 	label=install
 	initrd=/install/powerpc/initrd.gz
-	append="--"
+	append="---"
 	initrd-size=10240
 	read-only
 
 image=/install/powerpc/vmlinux
 	label=expert
 	initrd=/install/powerpc/initrd.gz
-	append="priority=low --"
+	append="priority=low ---"
 	initrd-size=10240
 	read-only
 
 image=/install/powerpc/vmlinux
 	label=rescue
 	initrd=/install/powerpc/initrd.gz
-	append="rescue/enable=true --"
+	append="rescue/enable=true ---"
 	initrd-size=10240
 	read-only
 
 image=/install/powerpc/vmlinux
 	label=auto
 	initrd=/install/powerpc/initrd.gz
-	append="auto=true priority=critical --"
+	append="auto=true priority=critical ---"
 	initrd-size=10240
 	read-only
diff -Nru debian-cd-3.1.16/data/sid/yaboot/yaboot.conf debian-cd-3.1.17/data/sid/yaboot/yaboot.conf
--- debian-cd-3.1.16/data/sid/yaboot/yaboot.conf	2014-05-10 13:50:31.000000000 +0100
+++ debian-cd-3.1.17/data/sid/yaboot/yaboot.conf	2015-04-20 12:42:34.000000000 +0100
@@ -9,28 +9,28 @@
 image=/install/powerpc64/vmlinux
 	label=install
 	initrd=/install/powerpc64/initrd.gz
-	append="--"
+	append="---"
 	initrd-size=10240
 	read-only
 
 image=/install/powerpc64/vmlinux
 	label=expert
 	initrd=/install/powerpc64/initrd.gz
-	append="priority=low --"
+	append="priority=low ---"
 	initrd-size=10240
 	read-only
 
 image=/install/powerpc64/vmlinux
 	label=rescue
 	initrd=/install/powerpc64/initrd.gz
-	append="rescue/enable=true --"
+	append="rescue/enable=true ---"
 	initrd-size=10240
 	read-only
 
 image=/install/powerpc64/vmlinux
 	label=auto
 	initrd=/install/powerpc64/initrd.gz
-	append="auto=true priority=critical --"
+	append="auto=true priority=critical ---"
 	initrd-size=10240
 	read-only
 
@@ -40,27 +40,27 @@
 image=/install/powerpc/vmlinux
 	label=install32
 	initrd=/install/powerpc/initrd.gz
-	append="--"
+	append="---"
 	initrd-size=10240
 	read-only
 
 image=/install/powerpc/vmlinux
 	label=expert32
 	initrd=/install/powerpc/initrd.gz
-	append="priority=low --"
+	append="priority=low ---"
 	initrd-size=10240
 	read-only
 
 image=/install/powerpc/vmlinux
 	label=rescue32
 	initrd=/install/powerpc/initrd.gz
-	append="rescue/enable=true --"
+	append="rescue/enable=true ---"
 	initrd-size=10240
 	read-only
 
 image=/install/powerpc/vmlinux
 	label=auto32
 	initrd=/install/powerpc/initrd.gz
-	append="auto=true priority=critical --"
+	append="auto=true priority=critical ---"
 	initrd-size=10240
 	read-only
diff -Nru debian-cd-3.1.16/debian/changelog debian-cd-3.1.17/debian/changelog
--- debian-cd-3.1.16/debian/changelog	2014-10-29 17:32:18.000000000 +0000
+++ debian-cd-3.1.17/debian/changelog	2015-04-20 12:42:34.000000000 +0100
@@ -1,3 +1,32 @@
+debian-cd (3.1.17) unstable; urgency=medium
+
+  [ Steve McIntyre ]
+  * Provide hashes for uncompressed Translation-* files, and remove the
+    uncompressed versions from the output disc. Closes: #767253. Initial
+    patch from Michael Vogt - thanks!
+  * Add 586 kernels to replace 486 for i386 CDs
+  * More tweaks for arm64 CD building
+  * Change from -- to --- for kernel command line handling.
+    Closes: #764676
+  * Add minor support / bug fixes for i386 EFI.
+  * Add fine-grained control over usage of BIOS and EFI boot on x86 CDs,
+    needed for extra Mac CD builds.
+  * update-cd: if we're doing torrents, make sure we include update CD
+    checksums in bt-$type too.
+  * Improve autorun.inf, make sure the disc icon displays. Closes: #772691
+    Thanks to jnqnfe for initial patch, slightly tweaked.
+  * Add rdnssd on disc 1 by default. Closes: #782299
+  * Update included files from the setup repo in the contrib dir
+
+  [ Ben Hutchings ]
+  * generate_di+k_list: Update kernel and related package lists for mips*
+    Closes: #777711
+
+  [ Helge Deller ]
+  * [alpha] fix unpacking aboot-base, copy versioned vmlinuz file correctly.
+
+ -- Steve McIntyre <93sam@debian.org>  Mon, 20 Apr 2015 12:36:57 +0100
+
 debian-cd (3.1.16) unstable; urgency=medium
 
   [ Steve McIntyre ]
@@ -12,8 +41,6 @@
   * Extend FORCE_SID_TASKSEL usage in update_tasks to also affect desktop
     choice algorithm
   * Add experimental support for arm64 booting via UEFI
-  * Use new tasksel interface to determine default desktop.
-    Closes: #762613
   * Do not look for isolinux/desktop/*cfg files for appending
     kernel params for Jessie. Closes: #767223, #766411. Thanks to Prema
     and Vagrant for (identical!) patches. :-)
diff -Nru debian-cd-3.1.16/tasks/jessie/popularity-contest debian-cd-3.1.17/tasks/jessie/popularity-contest
diff -Nru debian-cd-3.1.16/tools/boot/jessie/boot-alpha debian-cd-3.1.17/tools/boot/jessie/boot-alpha
--- debian-cd-3.1.16/tools/boot/jessie/boot-alpha	2014-05-10 13:50:31.000000000 +0100
+++ debian-cd-3.1.17/tools/boot/jessie/boot-alpha	2015-04-20 12:42:34.000000000 +0100
@@ -54,7 +54,7 @@
 
 mkdir boot$N
 ab_deb=`ls $MIRROR/pool/main/a/aboot/aboot-base_*.deb | tail -1`
-ar p $ab_deb data.tar.gz | tar zxf - -C boot$N/ ./boot/bootlx
+(dpkg --fsys-tarfile "$ab_deb" | tar xf - -C boot$N/ ./boot/bootlx)
 
 # Download boot images
 # XXX: Driver floppies?  Any alpha that /has/ a CDROM should be able to
@@ -67,7 +67,8 @@
 		if [ ! "$DI_DIR" ];then
 		   DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images/cdrom"
 		fi
-		cp "$DI_DIR/$image" .
+		ab_file=`ls "$DI_DIR"/$image* | tail -1`
+		cp "$ab_file" .
 	else
 		wget "$DI_WWW_HOME/$image"
 	fi
@@ -76,7 +77,8 @@
 
 echo "Using $THISTYPE boot-disks image on CD$N"
 mkdir -p boot$N/boot
-cp initrd.gz vmlinuz boot$N/boot/
+cp initrd.gz boot$N/boot/
+cp vmlinuz* boot$N/boot/vmlinuz
 mkdir -p boot$N/etc
 
 RSIZE=$(expr $(zcat boot$N/boot/initrd.gz | wc --bytes) / 1024)
diff -Nru debian-cd-3.1.16/tools/boot/jessie/boot-arm64 debian-cd-3.1.17/tools/boot/jessie/boot-arm64
--- debian-cd-3.1.16/tools/boot/jessie/boot-arm64	2014-10-05 09:13:53.000000000 +0100
+++ debian-cd-3.1.17/tools/boot/jessie/boot-arm64	2015-04-20 12:42:34.000000000 +0100
@@ -65,6 +65,10 @@
     fi
 done
 
+mkdir -p $CDDIR/$INSTALLDIR
+cp -lf cdrom/vmlinuz $CDDIR/$INSTALLDIR/
+cp -lf cdrom/initrd.gz $CDDIR/$INSTALLDIR/
+
 # Boot setup including config and help files comes from d-i.
 mkdir -pv $PWD/boot$N
 cat cdrom/debian-cd_info.tar.gz | (cd boot$N/; tar zx)
@@ -73,12 +77,6 @@
 add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J -joliet-long"
 add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-cache-inodes"
 
-# We explicitly put the boot bits in boot$N (as opposed to CD$N) and
-# list it first on the eventual mkisofs command line. That means
-# they'll be placed nearer the front of the eventual image; some older
-# BIOSes apparently have a limitation on what they'll boot here.
-add_mkisofs_opt $CDDIR/../$N.mkisofs_dirs "boot$N"
-
 if [ -d boot$N/grub ] ; then
     echo "  Adding EFI boot code for $ARCH on CD$N"
 
@@ -111,20 +109,25 @@
 
     # Ugh - different code here depending on the version of xorriso we've got
     if [ $XORRISO_VER -le 10202 ] ; then
-        # 1.2.2 shipping in Wheezy
-        echo "Using older EFI command line for xorriso $XORRISO_VER"
-        # Tell xorriso to create a secondary ElTorito boot record for the
-        # EFI bootloader
-        add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-eltorito-alt-boot --efi-boot boot/grub/efi.img"
-        # Add the efi image as a FAT partition too, so our CD image will
-        # also boot on a USB key (like isohybrid, just implemented
-        # differently)
-        add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-append_partition 2 0x01 $CDDIR/boot/grub/efi.img"
-        
+        echo "ERROR: debian-cd depends on xorriso > 1.2.2 for making arm64 bootable CDs."
+        exit 1;
     elif [ $XORRISO_VER -gt 10202 ] ; then
         echo "Using newer EFI support in xorriso $XORRISO_VER"
-        add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot"
+
+	# Location of the EFI boot image, and don't emulate a floppy or HD
+        add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-e boot/grub/efi.img -no-emul-boot"
+
+	# Add an *extra* partition on the end for the EFI bits
+	add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-append_partition 2 0xef $CDDIR/boot/grub/efi.img"
+
+	# And force alignment
+	add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-partition_cyl_align all"
     fi      
+
+    # Finally, belt and braces - fix up the %install% entries in grub
+    # in case they're still there
+    sed -i "s,\%install\%,$INSTALLDIR,g" $CDDIR/boot/grub/grub.cfg
+
 else
     echo "  No EFI boot code for $ARCH on CD$N"
 fi
diff -Nru debian-cd-3.1.16/tools/boot/jessie/boot-hurd debian-cd-3.1.17/tools/boot/jessie/boot-hurd
--- debian-cd-3.1.16/tools/boot/jessie/boot-hurd	2014-06-03 18:10:12.000000000 +0100
+++ debian-cd-3.1.17/tools/boot/jessie/boot-hurd	2015-04-20 12:42:34.000000000 +0100
@@ -85,6 +85,7 @@
        todos > $CDDIR/autorun.inf <<EOF
 [autorun]
 open=autorun.bat
+label=Install Debian GNU/Hurd
 EOF
        todos > $CDDIR/autorun.bat <<EOF
 @echo Starting "README.html"...
diff -Nru debian-cd-3.1.16/tools/boot/jessie/boot-kfreebsd debian-cd-3.1.17/tools/boot/jessie/boot-kfreebsd
--- debian-cd-3.1.16/tools/boot/jessie/boot-kfreebsd	2014-06-03 18:10:12.000000000 +0100
+++ debian-cd-3.1.17/tools/boot/jessie/boot-kfreebsd	2015-04-20 12:42:34.000000000 +0100
@@ -99,6 +99,7 @@
        todos > $CDDIR/autorun.inf <<EOF
 [autorun]
 open=autorun.bat
+label=Install Debian GNU/kFreeBSD
 EOF
        todos > $CDDIR/autorun.bat <<EOF
 @echo Starting "README.html"...
diff -Nru debian-cd-3.1.16/tools/boot/jessie/boot-x86 debian-cd-3.1.17/tools/boot/jessie/boot-x86
--- debian-cd-3.1.16/tools/boot/jessie/boot-x86	2014-10-29 17:26:11.000000000 +0000
+++ debian-cd-3.1.17/tools/boot/jessie/boot-x86	2015-04-20 12:42:34.000000000 +0100
@@ -12,6 +12,26 @@
 set -e
 #set -x
 
+# Have we been told to use just one boot method? If none listed,
+# assume all are desired. Order also matters. Possible values are
+# "BIOS", "EFI" and "BIOS EFI". We'll also accept "EFI BIOS" for
+# completeness, but we will switch the order.
+if [ "$BOOT_METHODS"x = ""x ] \
+    || [ "$BOOT_METHODS"x = "BIOS EFI"x ] \
+    || [ "$BOOT_METHODS"x = "EFI BIOS"x ] ; then
+    BOOT_BIOS=1
+    BOOT_EFI=2
+elif [ "$BOOT_METHODS"x = "BIOS"x ] ; then
+    BOOT_BIOS=1
+    BOOT_EFI=0
+elif [ "$BOOT_METHODS"x = "EFI"x ] ; then
+    BOOT_EFI=1
+    BOOT_BIOS=0
+else
+    echo "ERROR: Unrecognized boot method choice $BOOT_METHODS"
+    exit 1
+fi
+
 N=$1
 CDDIR=$2
 BOOTDIR=
@@ -25,6 +45,8 @@
         DI_WWW_HOME="http://d-i.debian.org/daily-images/amd64/daily";
     fi
     try_di_image_cache
+else
+    DI_WWW_HOME=$(echo $DI_WWW_HOME | sed "s,%ARCH%,$ARCH,")
 fi
 
 case "$MKISOFS" in
@@ -32,9 +54,9 @@
         XORRISO_VER=$(xorriso_version)
         ;;
     *)
-	echo "ERROR: debian-cd now depends on xorriso for making x86 bootable CDs."
-	exit 1;
-	;;
+        echo "ERROR: debian-cd now depends on xorriso for making x86 bootable CDs."
+        exit 1;
+        ;;
 esac
 
 cd $CDDIR/..
@@ -54,164 +76,120 @@
 INSTALLDIR_amd64="install.amd"
 
 if [ "$ARCH" = i386 ]; then
-	INSTALLDIR="$INSTALLDIR_i386"
+        INSTALLDIR="$INSTALLDIR_i386"
 else
-	INSTALLDIR="$INSTALLDIR_amd64"
+        INSTALLDIR="$INSTALLDIR_amd64"
 fi
 
 BOOT_IMAGES="cdrom/initrd.gz cdrom/vmlinuz cdrom/debian-cd_info.tar.gz"
-# Only include disk images on full CDs, not on smaller images.
-#if [ "$ARCH" = i386 ] && [ "$INSTALLER_CD" != 1 ] && [ "$INSTALLER_CD" != 2 ] && [ "$INSTALLER_CD" != C ]; then
-	#DISK_IMAGES="floppy/cd-drivers.img floppy/boot.img floppy/root.img"
-	#EXTRA_DISK_IMAGES="cdrom/boot.img"
-#fi
 
 # Download boot images.
 for image in $BOOT_IMAGES; do
-	if [ ! -e "$image" ]; then
-		dir=$(dirname $image)
-		mkdir -p $dir
-		if [ -n "$LOCAL"  -a -f "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" ]; then
-			cp "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" "$image"
-		elif [ ! "$DI_WWW_HOME" ];then
-			if [ ! "$DI_DIR" ];then
-				DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
-			fi
-#			echo "Copying images from $DI_DIR"
-			cp "$DI_DIR/$image" "$image"
-		else
-			wget "$DI_WWW_HOME/$image" -O "$image"
-		fi
-	fi
+        if [ ! -e "$image" ]; then
+                dir=$(dirname $image)
+                mkdir -p $dir
+                if [ -n "$LOCAL"  -a -f "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" ]; then
+                        cp "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" "$image"
+                elif [ ! "$DI_WWW_HOME" ];then
+                        if [ ! "$DI_DIR" ];then
+                                DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
+                        fi
+#                       echo "Copying images from $DI_DIR"
+                        cp "$DI_DIR/$image" "$image"
+                else
+                        wget "$DI_WWW_HOME/$image" -O "$image"
+                fi
+        fi
 done
 
 # Images that are not really required or may be unavailable.
 for image in $DISK_IMAGES $EXTRA_DISK_IMAGES; do
-	if [ ! -e "$image" ]; then
-		dir=$(dirname $image)
-		mkdir -p $dir
-		if [ -n "$LOCAL"  -a -f "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" ]; then
-			cp "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" "$image"
-		elif [ ! "$DI_WWW_HOME" ];then
-			if [ ! "$DI_DIR" ];then
-				DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
-			fi
-			cp "$DI_DIR/$image" "$image" || true
-		else
-			wget "$DI_WWW_HOME/$image" -O "$image" || rm -f "$image"
-		fi
-	fi
+        if [ ! -e "$image" ]; then
+                dir=$(dirname $image)
+                mkdir -p $dir
+                if [ -n "$LOCAL"  -a -f "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" ]; then
+                        cp "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" "$image"
+                elif [ ! "$DI_WWW_HOME" ];then
+                        if [ ! "$DI_DIR" ];then
+                                DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
+                        fi
+                        cp "$DI_DIR/$image" "$image" || true
+                else
+                        wget "$DI_WWW_HOME/$image" -O "$image" || rm -f "$image"
+                fi
+        fi
 done
 
 # Only disk one gets the extra files installed
 if [ "$NN" = "1" ]; then
-	# populate the install directory as well
-	for disk in $DISK_IMAGES $EXTRA_DISK_IMAGES; do
-		if [ -e "$disk" ]; then
-			dir=$(dirname $disk)
-			mkdir -p $CDDIR/$INSTALLDIR/$dir
-			cp -lf $disk $CDDIR/$INSTALLDIR/$dir
-		fi
-	done
-
-	if [ -e "$MIRROR/tools" ] && \
-	   [ ! -e $CDDIR/tools ] && \
-	   [ "$OMIT_DOC_TOOLS" != "1" ] ; then
-		echo "  Adding tools to CD1"
-		$BASEDIR/tools/add_files $CDDIR $MIRROR tools
-		# Remove the win32-loader/ subdirectory from tools, as d-i already installs setup.exe
-		rm -Rf $CDDIR/tools/win32-loader
-	fi
+        # populate the install directory as well
+        for disk in $DISK_IMAGES $EXTRA_DISK_IMAGES; do
+                if [ -e "$disk" ]; then
+                        dir=$(dirname $disk)
+                        mkdir -p $CDDIR/$INSTALLDIR/$dir
+                        cp -lf $disk $CDDIR/$INSTALLDIR/$dir
+                fi
+        done
+
+        if [ -e "$MIRROR/tools" ] && \
+           [ ! -e $CDDIR/tools ] && \
+           [ "$OMIT_DOC_TOOLS" != "1" ] ; then
+                echo "  Adding tools to CD1"
+                $BASEDIR/tools/add_files $CDDIR $MIRROR tools
+                # Remove the win32-loader/ subdirectory from tools, as d-i already installs setup.exe
+                rm -Rf $CDDIR/tools/win32-loader
+        fi
 fi
 
 extra_image () {
-	image=$1
-	doppelgangers="$2"
-	dir=$(dirname "$image")
-
-	mkdir -p $CDDIR/$INSTALLDIR/$dir
-	if [ ! -e $CDDIR/$INSTALLDIR/"$image" ] ; then
-		if [ ! "$DI_WWW_HOME" ] ; then
-			if [ ! "$DI_DIR" ] ; then
-				DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
-			fi
-			cp "$DI_DIR/cdrom/$image" $CDDIR/$INSTALLDIR/"$image"
-		else
-			wget "$DI_WWW_HOME/cdrom/$image" -O $CDDIR/$INSTALLDIR/"$image"
-		fi
-	fi
-	for doppelganger in $doppelgangers ; do
-		if [ -f "$CDDIR/$INSTALLDIR/$dir/$doppelganger" ] &&
-			cmp -s $CDDIR/$INSTALLDIR/"$image" $CDDIR/$INSTALLDIR/"$dir"/"$doppelganger" ; then
-			echo "  $image identical to $doppelganger. Linking"
-			ln -nf $CDDIR/$INSTALLDIR/"$dir"/"$doppelganger" $CDDIR/$INSTALLDIR/"$image"
-			break
-		fi
-	done
+        image=$1
+        doppelgangers="$2"
+        dir=$(dirname "$image")
+
+        mkdir -p $CDDIR/$INSTALLDIR/$dir
+        if [ ! -e $CDDIR/$INSTALLDIR/"$image" ] ; then
+                if [ ! "$DI_WWW_HOME" ] ; then
+                        if [ ! "$DI_DIR" ] ; then
+                                DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
+                        fi
+                        cp "$DI_DIR/cdrom/$image" $CDDIR/$INSTALLDIR/"$image"
+                else
+                        wget "$DI_WWW_HOME/cdrom/$image" -O $CDDIR/$INSTALLDIR/"$image"
+                fi
+        fi
+        for doppelganger in $doppelgangers ; do
+                if [ -f "$CDDIR/$INSTALLDIR/$dir/$doppelganger" ] &&
+                        cmp -s $CDDIR/$INSTALLDIR/"$image" $CDDIR/$INSTALLDIR/"$dir"/"$doppelganger" ; then
+                        echo "  $image identical to $doppelganger. Linking"
+                        ln -nf $CDDIR/$INSTALLDIR/"$dir"/"$doppelganger" $CDDIR/$INSTALLDIR/"$image"
+                        break
+                fi
+        done
 }
 
 case "$DESKTOP" in
     $UNSPEC_DESKTOP_DEFAULT)
-	# default from tasksel 
-	DESKTOP=
-	;;
+        # default from tasksel 
+        DESKTOP=
+        ;;
     all)
-	# default from tasksel 
-	DESKTOP=
-	;;
+        # default from tasksel 
+        DESKTOP=
+        ;;
     light)
-	DESKTOP=xfce
-	;;
+        DESKTOP=xfce
+        ;;
 esac
 # desktop boot parameter gets set separately through DESKTOP variable
 KERNEL_PARAMS="$(echo "$KERNEL_PARAMS" | sed -r "s/desktop=[^ ]* ?//")"
 
-echo "  Using ISOLINUX boot-disks image on CD$N"
 mkdir -p $CDDIR/$INSTALLDIR
 cp -lf cdrom/vmlinuz $CDDIR/$INSTALLDIR/
 cp -lf cdrom/initrd.gz $CDDIR/$INSTALLDIR/
 if [ -e $CDDIR/tools/loadlin.exe ]; then
-	echo "\\tools\\loadlin.exe vmlinuz initrd=initrd.gz" | todos > $CDDIR/$INSTALLDIR/install.bat
-fi
-
-mkdir -p $CDDIR/../syslinux
-SYSLINUXDEB=$(find_pkg_file syslinux)
-if [ -z "$SYSLINUXDEB" ]; then
-	echo "ERROR: syslinux package is required" >&2
-	exit 1
-fi
-(dpkg --fsys-tarfile "$MIRROR/$SYSLINUXDEB" | \
-	tar xf - -C $CDDIR/../syslinux ./usr/lib)
-
-if [ -n "$ARCHIVE_EXTRACTED_SOURCES" ]; then
-	echo $SYSLINUXDEB >> $CDDIR/../$N.pkgs_extracted
-	find_pkg_file syslinux source >> $CDDIR/../$N.pkgs_extracted
+        echo "\\tools\\loadlin.exe vmlinuz initrd=initrd.gz" | todos > $CDDIR/$INSTALLDIR/install.bat
 fi
 
-# syslinux 6.x onwards uses different packaging layout. Deal with bold
-# old and new layout for now.
-
-if [ -f $CDDIR/../syslinux/usr/lib/syslinux/isolinux.bin ] ; then
-    SYSLINUX_LAYOUT=OLD
-    add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-isohybrid-mbr syslinux/usr/lib/syslinux/isohdpfx.bin"
-else
-    SYSLINUX_LAYOUT=NEW
-    ISOLINUXDEB=$(find_pkg_file isolinux)
-    if [ -z "$ISOLINUXDEB" ]; then
-	echo "ERROR: isolinux package is required" >&2
-	exit 1
-    fi
-    (dpkg --fsys-tarfile "$MIRROR/$ISOLINUXDEB" | \
-	tar xf - -C $CDDIR/../syslinux ./usr/lib)
-    
-    if [ -n "$ARCHIVE_EXTRACTED_SOURCES" ]; then
-	echo $ISOLINUXDEB >> $CDDIR/../$N.pkgs_extracted
-	find_pkg_file isolinux source >> $CDDIR/../$N.pkgs_extracted
-    fi
-    add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-isohybrid-mbr syslinux/usr/lib/ISOLINUX/isohdpfx.bin"
-fi
-
-
 # In case of a multi-arch CD the script will be called two times. The
 # first time the isolinux dir gets set up for single arch; if it is
 # called a second time the isolinux dir already exists and we know it
@@ -220,211 +198,256 @@
 
 MULTIARCH=
 if [ -e boot$N/isolinux/isolinux.cfg ]; then
-	MULTIARCH=1
-	rm -r boot$N/isolinux
+        MULTIARCH=1
+        rm -r boot$N/isolinux
 fi
 
 mkdir -p boot$N/isolinux
 # Isolinux setup including config and help files comes from d-i.
 cat cdrom/debian-cd_info.tar.gz | (cd boot$N/isolinux/; tar zx)
 
-# If we don't have grub stuff from d-i, tell xorriso to add a
-# partition offset for the isohybrid code
-if [ ! -d boot$N/isolinux/grub ] ; then
-    add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-partition_offset 16"
-fi
-
-di_syslinux_ver="$(di_syslinux_version)"
-case "$di_syslinux_ver" in
-	2.0)
-		: ;;
-	1.*)
-		echo "Error: syslinux config versions before 2.0 are not supported"
-		exit 1 ;;
-	*)
-		echo "Error: unrecognized syslinux config version '$di_syslinux_ver'"
-		exit 1 ;;
-esac
-
 # Not everything in the tarball is isolinux stuff
 if [ -e boot$N/isolinux/win32-loader.ini ] ; then
-	for file in boot$N/isolinux/g2ldr* boot$N/isolinux/setup.exe boot$N/isolinux/win32-loader.ini; do
-		if [ -e $file ] ; then
-			mv -v $file boot$N/
-		fi
-	done
+    for file in boot$N/isolinux/g2ldr* boot$N/isolinux/setup.exe boot$N/isolinux/win32-loader.ini; do
+        if [ -e $file ] ; then
+            mv -v $file CD$N/
+        fi
+    done
+    # Modify win32-loader.ini for the "current" arch
+    sed -i "s|install/|$INSTALLDIR/|" CD$N/win32-loader.ini
+    if [ "${DESKTOP}" ] ; then
+        sed -i "s|^\(default_desktop\)=.*|\1=${DESKTOP}|" CD$N/win32-loader.ini
+    fi
 fi
 
-if [ -e boot$N/isolinux/f3.txt.withgtk ]; then
-	extra_image gtk/vmlinuz         "../vmlinuz"
-	extra_image gtk/initrd.gz       "../initrd.gz"
-	mv boot$N/isolinux/f3.txt.withgtk boot$N/isolinux/f3.txt
-	mv boot$N/isolinux/f4.txt.withgtk boot$N/isolinux/f4.txt
-	if [ -e boot$N/isolinux/isolinux.cfg.withgtk ]; then
-		mv boot$N/isolinux/isolinux.cfg.withgtk boot$N/isolinux/isolinux.cfg
-	fi
-	if [ -e $CDDIR/tools/loadlin.exe ]; then
-		echo "\\tools\\loadlin.exe \\$INSTALLDIR\\vmlinuz initrd=initrd.gz vga=788" | todos > $CDDIR/$INSTALLDIR/gtk/install.bat
-	fi
-fi
-rm -f boot$N/isolinux/isolinux.cfg.with*
+# Add autorun
+if [ -f CD$N/setup.exe ]; then
+# when win32-loader is present, use that (it already checks for README.html)
+    todos > $CDDIR/autorun.inf <<EOF
+[autorun]
+open=setup.exe
+icon=setup.exe,0
+label=Install Debian GNU/Linux
 
-if variant_enabled "xen" ; then
-	extra_image xen/vmlinuz         "../vmlinuz   ../gtk/vmlinuz"
-	extra_image xen/initrd.gz       "../initrd.gz ../gtk/initrd.gz"
-	extra_image xen/debian.cfg || extra_image xen/xm-debian.cfg
-fi
+[Content]
+MusicFiles=false
+PictureFiles=false
+VideoFiles=false
+EOF
+elif [ -f $CDDIR/README.html ]; then
+    todos > $CDDIR/autorun.inf <<EOF
+[autorun]
+open=autorun.bat
+label=Install Debian GNU/Linux
 
-# Modify win32-loader.ini for the "current" arch
-if [ -e boot$N/win32-loader.ini ]; then
-	sed -i "s|install/|$INSTALLDIR/|" boot$N/win32-loader.ini
-	if [ "${DESKTOP}" ] ; then
-		sed -i "s|^\(default_desktop\)=.*|\1=${DESKTOP}|" boot$N/win32-loader.ini
-	fi
+[Content]
+MusicFiles=false
+PictureFiles=false
+VideoFiles=false
+EOF
+    todos > $CDDIR/autorun.bat <<EOF
+@echo Starting "README.html"...
+@start README.html
+@exit
+EOF
 fi
 
-if [ $SYSLINUX_LAYOUT = OLD ] ; then
-    cp -f $CDDIR/../syslinux/usr/lib/syslinux/isolinux.bin boot$N/isolinux/
-    cp -f $CDDIR/../syslinux/usr/lib/syslinux/vesamenu.c32 boot$N/isolinux/
-    if [ -e $CDDIR/../syslinux/usr/lib/syslinux/ldlinux.c32 ]; then
-	cp -f $CDDIR/../syslinux/usr/lib/syslinux/ldlinux.c32 boot$N/isolinux/
-	cp -f $CDDIR/../syslinux/usr/lib/syslinux/libcom32.c32 boot$N/isolinux/
-	cp -f $CDDIR/../syslinux/usr/lib/syslinux/libutil.c32 boot$N/isolinux/
+# Common mkisofs options when creating CDs
+add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J -joliet-long"
+add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-cache-inodes"
+
+# BIOS-boot specific stuff. Even when we're *not* doing BIOS boot, we
+# still create all the isolinux config files as they're parsed and
+# used later. We just don't grab all the syslinux files, then make
+# sure that we *don't* set up BIOS boot on the xorriso command line.
+if [ "$BOOT_BIOS" = 1 ] ; then
+    echo "  Adding BIOS boot code for $ARCH on CD$N"
+    mkdir -p $CDDIR/../syslinux
+    SYSLINUXDEB=$(find_pkg_file syslinux)
+    if [ -z "$SYSLINUXDEB" ]; then
+        echo "ERROR: syslinux package is required" >&2
+        exit 1
     fi
-else
+    (dpkg --fsys-tarfile "$MIRROR/$SYSLINUXDEB" | \
+        tar xf - -C $CDDIR/../syslinux ./usr/lib)
+
+    if [ -n "$ARCHIVE_EXTRACTED_SOURCES" ]; then
+        echo $SYSLINUXDEB >> $CDDIR/../$N.pkgs_extracted
+        find_pkg_file syslinux source >> $CDDIR/../$N.pkgs_extracted
+    fi
+
+    ISOLINUXDEB=$(find_pkg_file isolinux)
+    if [ -z "$ISOLINUXDEB" ]; then
+        echo "ERROR: isolinux package is required" >&2
+        exit 1
+    fi
+    (dpkg --fsys-tarfile "$MIRROR/$ISOLINUXDEB" | \
+        tar xf - -C $CDDIR/../syslinux ./usr/lib)
+    
+    if [ -n "$ARCHIVE_EXTRACTED_SOURCES" ]; then
+        echo $ISOLINUXDEB >> $CDDIR/../$N.pkgs_extracted
+        find_pkg_file isolinux source >> $CDDIR/../$N.pkgs_extracted
+    fi
+    add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-isohybrid-mbr syslinux/usr/lib/ISOLINUX/isohdpfx.bin"
+
     cp -f $CDDIR/../syslinux/usr/lib/ISOLINUX/isolinux.bin boot$N/isolinux/
     cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/vesamenu.c32 boot$N/isolinux/
     cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/ldlinux.c32 boot$N/isolinux/
     cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/libcom32.c32 boot$N/isolinux/
     cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/libutil.c32 boot$N/isolinux/
+
+    # If we don't have grub stuff from d-i, tell xorriso to add a
+    # partition offset for the isohybrid code
+    if [ ! -d boot$N/isolinux/grub ] || [ $BOOT_EFI = 0 ] ; then
+        add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-partition_offset 16"
+    fi
+
+    # Add the normal options to make an ElTorito bootable CD/DVD using isolinux
+    add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-b isolinux/isolinux.bin"
+    add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-c isolinux/boot.cat"
+    bls=4 # Specify 4 for BIOS boot, don't calculate it
+    add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-boot-load-size $bls"
+    add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-boot-info-table"    
+    add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-no-emul-boot"
+
+    # We explicitly put the boot bits in boot$N (as opposed to CD$N)
+    # and list it first on the eventual mkisofs command line. That
+    # means they'll be placed nearer the front of the eventual image;
+    # some older BIOSes apparently have a limitation on what they'll
+    # boot here.
+    add_mkisofs_opt $CDDIR/../$N.mkisofs_dirs "boot$N"
+else
+    echo "  No BIOS boot code for $ARCH on CD$N"
+fi
+
+di_syslinux_ver="$(di_syslinux_version)"
+case "$di_syslinux_ver" in
+    2.0)
+        : ;;
+    1.*)
+        echo "Error: syslinux config versions before 2.0 are not supported"
+        exit 1 ;;
+    *)
+        echo "Error: unrecognized syslinux config version '$di_syslinux_ver'"
+        exit 1 ;;
+esac
+
+if [ -e boot$N/isolinux/f3.txt.withgtk ]; then
+    extra_image gtk/vmlinuz         "../vmlinuz"
+    extra_image gtk/initrd.gz       "../initrd.gz"
+    mv boot$N/isolinux/f3.txt.withgtk boot$N/isolinux/f3.txt
+    mv boot$N/isolinux/f4.txt.withgtk boot$N/isolinux/f4.txt
+    if [ -e boot$N/isolinux/isolinux.cfg.withgtk ]; then
+        mv boot$N/isolinux/isolinux.cfg.withgtk boot$N/isolinux/isolinux.cfg
+    fi
+    if [ -e $CDDIR/tools/loadlin.exe ]; then
+        echo "\\tools\\loadlin.exe \\$INSTALLDIR\\vmlinuz initrd=initrd.gz vga=788" | todos > $CDDIR/$INSTALLDIR/gtk/install.bat
+    fi
+fi
+rm -f boot$N/isolinux/isolinux.cfg.with*
+
+if variant_enabled "xen" ; then
+    extra_image xen/vmlinuz         "../vmlinuz   ../gtk/vmlinuz"
+    extra_image xen/initrd.gz       "../initrd.gz ../gtk/initrd.gz"
+    extra_image xen/debian.cfg || extra_image xen/xm-debian.cfg
 fi
 
 if [ -z "$MULTIARCH" ]; then
-	# Set up isolinux dir for only the current arch
-	grep -lr '%install%' boot$N/isolinux/* | xargs -r sed -i "s|%install%|$INSTALLDIR|"
+    # Set up isolinux dir for only the current arch
+    grep -lr '%install%' boot$N/isolinux/* | xargs -r sed -i "s|%install%|$INSTALLDIR|"
     
-	# Remove the amd*.cfg files to avoid them being loaded on a
-	# disc that does not have both amd64 and i386 dirs.
-	find boot$N/isolinux/ -name "amd*.cfg" -delete
+    # Remove the amd*.cfg files to avoid them being loaded on a disc
+    # that does not have both amd64 and i386 dirs.
+    find boot$N/isolinux/ -name "amd*.cfg" -delete
 else
-	# Set up isolinux dir for multi-arch
-	grep -lr '%install[-amd]*%' boot$N/isolinux/* | xargs -r sed -i -e "s|%install%|$INSTALLDIR_i386|" -e "s|%install-amd%|$INSTALLDIR_amd64|"
+    # Set up isolinux dir for multi-arch
+    grep -lr '%install[-amd]*%' boot$N/isolinux/* | xargs -r sed -i -e "s|%install%|$INSTALLDIR_i386|" -e "s|%install-amd%|$INSTALLDIR_amd64|"
 
-	for file in boot$N/isolinux/f3.txt* boot$N/isolinux/f4.txt*; do
-		sed -i "4 s/^$/(note: i386 is default; prepend 'amd64-' to use an amd64 kernel instead)/" $file
-	done
-
-	if [ -e boot$N/win32-loader.ini ]; then
-		# Modify win32-loader.ini to also cover the "other" arch
-		if [ "$ARCH" = i386 ]; then
-			sed -i -e "/^arch=/d
-					   /^i386\//p; s/^i386/amd64/; s/=$INSTALLDIR_i386/=$INSTALLDIR_amd64/g" \
-					       boot$N/win32-loader.ini
-		else
-			sed -i -e "/^arch=/d
-					   /^amd64\//p; s/^amd64/i386/; s/=$INSTALLDIR_amd64/=$INSTALLDIR_i386/g" \
-					       boot$N/win32-loader.ini
-		fi
-	fi
+    for file in boot$N/isolinux/f3.txt* boot$N/isolinux/f4.txt*; do
+        sed -i "4 s/^$/(note: i386 is default; prepend 'amd64-' to use an amd64 kernel instead)/" $file
+    done
+
+    if [ -e CD$N/win32-loader.ini ]; then
+        # Modify win32-loader.ini to also cover the "other" arch
+        if [ "$ARCH" = i386 ]; then
+            sed -i -e "/^arch=/d
+                       /^i386\//p; s/^i386/amd64/; s/=$INSTALLDIR_i386/=$INSTALLDIR_amd64/g" \
+                           CD$N/win32-loader.ini
+        else
+            sed -i -e "/^arch=/d
+                       /^amd64\//p; s/^amd64/i386/; s/=$INSTALLDIR_amd64/=$INSTALLDIR_i386/g" \
+                           CD$N/win32-loader.ini
+        fi
+    fi
 
-	# Apply workaround for #505243
+    # Apply workaround for #505243
+    if [ "$BOOT_BIOS" = 1 ] ; then
 	multiarch_workaround
+    fi
 fi
 
 if [ "$SPLASHPNG" ] ; then
-	# Insert our own splash screen.  Color index 0 is background, and
-	# index 7 is foreground.  Set to black and white respecively
-	pngtopnm < $SPLASHPNG | ppmquant 16 | \
-		ppmtolss16 "#ffffff=7" "#000000=0" > boot$N/isolinux/splash.rle
-	pngtopnm < $SPLASHPNG | ppmquant 16 | pnmtopng  > boot$N/isolinux/splash.png
+    # Insert our own splash screen.  Color index 0 is background, and
+    # index 7 is foreground.  Set to black and white respecively
+    pngtopnm < $SPLASHPNG | ppmquant 16 | \
+        ppmtolss16 "#ffffff=7" "#000000=0" > boot$N/isolinux/splash.rle
+    pngtopnm < $SPLASHPNG | ppmquant 16 | pnmtopng  > boot$N/isolinux/splash.png
 fi
 
 # used by Debian Edu
 if [ "$LOGOPNG" ] ; then
-	# Add custom logo to the initrd.gz file, replacing old image
-	GTKINITRD=$CDDIR/$INSTALLDIR/gtk/initrd
-	GTKINITRDGZ=$GTKINITRD.gz
-	echo "info: Adding $LOGOPNG to $GTKINITRD"
-	INITRDDIR=$TDIR/initrd-$$
-	# Repack initrd with new image
-	mkdir -p $INITRDDIR
-	(
-		cd $INITRDDIR
-		gunzip $GTKINITRDGZ
-		mkdir -p $INITRDDIR/usr/share/graphics
-		cp $LOGOPNG $INITRDDIR/usr/share/graphics/logo_debian.png
-		echo usr/share/graphics/logo_debian.png | \
-		cpio -oA -H newc -F $GTKINITRD
-		gzip -9 $GTKINITRD
-	)
-	rm -rf $INITRDDIR
+    # Add custom logo to the initrd.gz file, replacing old image
+    GTKINITRD=$CDDIR/$INSTALLDIR/gtk/initrd
+    GTKINITRDGZ=$GTKINITRD.gz
+    echo "info: Adding $LOGOPNG to $GTKINITRD"
+    INITRDDIR=$TDIR/initrd-$$
+    # Repack initrd with new image
+    mkdir -p $INITRDDIR
+    (
+        cd $INITRDDIR
+        gunzip $GTKINITRDGZ
+        mkdir -p $INITRDDIR/usr/share/graphics
+        cp $LOGOPNG $INITRDDIR/usr/share/graphics/logo_debian.png
+        echo usr/share/graphics/logo_debian.png | \
+            cpio -oA -H newc -F $GTKINITRD
+        gzip -9 $GTKINITRD
+    )
+    rm -rf $INITRDDIR
 fi
 
 sed -i "s|built on|built $BUILD_DATE; d-i|" boot$N/isolinux/f1.txt
 
 if [ -n "$KERNEL_PARAMS" ]; then
-	# Substitute custom kernel params into the isolinux config file(s)
-	for file in boot$N/isolinux/*.cfg; do
-		case "$(basename $file)" in
-			instsel.cfg)
-				continue ;;
-		esac
-		sed -i "/^[[:space:]]\+append .*--/ s|append|append $KERNEL_PARAMS|" \
-			$file
-	done
+    # Substitute custom kernel params into the isolinux config file(s)
+    for file in boot$N/isolinux/*.cfg; do
+        case "$(basename $file)" in
+            instsel.cfg)
+                continue ;;
+        esac
+        sed -i "/^[[:space:]]\+append .*---/ s|append|append $KERNEL_PARAMS|" \
+            $file
+    done
 fi
 
 set_default_desktop
+rm -rf cdrom
 
-# Add autorun
-if [ -f boot$N/setup.exe ]; then
-# when win32-loader is present, use that (it already checks for README.html)
-	todos > $CDDIR/autorun.inf <<EOF
-[autorun]
-open=setup.exe
-EOF
-elif [ -f $CDDIR/README.html ]; then
-	todos > $CDDIR/autorun.inf <<EOF
-[autorun]
-open=autorun.bat
-EOF
-	todos > $CDDIR/autorun.bat <<EOF
-@echo Starting "README.html"...
-@start README.html
-@exit
-EOF
-fi
-
-rm -rf cdrom floppy
-
-# Common mkisofs options when creating CDs
-add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J -joliet-long"
-add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-cache-inodes"
-
-# Add the normal options to make an ElTorito bootable CD/DVD
-add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-b isolinux/isolinux.bin"
-add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-c isolinux/boot.cat"
-add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-no-emul-boot"
-bls=4 # Specify 4 for BIOS boot, don't calculate it
-add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-boot-load-size $bls"
-add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-boot-info-table"	
-
-# We explicitly put the boot bits in boot$N (as opposed to CD$N) and
-# list it first on the eventual mkisofs command line. That means
-# they'll be placed nearer the front of the eventual image; some older
-# BIOSes apparently have a limitation on what they'll boot here.
-add_mkisofs_opt $CDDIR/../$N.mkisofs_dirs "boot$N"
-
-if [ -d boot$N/isolinux/grub ] ; then
+if [ -d boot$N/isolinux/grub ] && [ $BOOT_EFI -ne 0 ] ; then
     echo "  Adding EFI boot code for $ARCH on CD$N"
 
     # Move GRUB files to the right place.
     mkdir -p $CDDIR/efi/boot
-    mcopy -i boot$N/isolinux/grub/efi.img ::efi/boot/bootx64.efi $CDDIR/efi/boot/bootx64.efi
+    mcopy -n -i boot$N/isolinux/grub/efi.img '::efi/boot/boot*.efi' $CDDIR/efi/boot
     mkdir -p $CDDIR/boot/grub
     mv boot$N/isolinux/grub/* $CDDIR/boot/grub/
     rmdir boot$N/isolinux/grub
 
+	# If we're only doing EFI, copy the splash file from the BIOS boot dir
+	if [ $BOOT_EFI = 1 ] ; then
+		mkdir -p $CDDIR/isolinux
+		cp boot$N/isolinux/splash.png $CDDIR/isolinux
+	fi
+
     # Create grub menu entries to match the isolinux ones
     sed -i '/^menuentry/Q' $CDDIR/boot/grub/grub.cfg;
     $BASEDIR/tools/boot/$DI_CODENAME/parse_isolinux \
@@ -448,16 +471,23 @@
     mkfs.msdos -C "$CDDIR/boot/grub/efi.img" $blocks >/dev/null
     mmd -i "$CDDIR/boot/grub/efi.img" ::efi
     mmd -i "$CDDIR/boot/grub/efi.img" ::efi/boot
-    mcopy -i "$CDDIR/boot/grub/efi.img" $CDDIR/efi/boot/boot*.efi \
+    mcopy -o -i "$CDDIR/boot/grub/efi.img" $CDDIR/efi/boot/boot*.efi \
         "::efi/boot"
 
+    if [ $BOOT_EFI = 2 ] ; then
+	# We're being added alongside (after) a BIOS boot record. Tell
+	# xorriso to create a (secondary) ElTorito boot record for the
+	# EFI bootloader. Otherwise, xorriso will create it as the
+	# primary.
+        add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-eltorito-alt-boot"
+    fi
+
     # Ugh - different code here depending on the version of xorriso we've got
     if [ $XORRISO_VER -le 10202 ] ; then
         # 1.2.2 shipping in Wheezy
         echo "Using older EFI command line for xorriso $XORRISO_VER"
-        # Tell xorriso to create a secondary ElTorito boot record for the
-        # EFI bootloader
-        add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-eltorito-alt-boot --efi-boot boot/grub/efi.img"
+
+        add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "--efi-boot boot/grub/efi.img"
         # Add the efi image as a FAT partition too, so our CD image will
         # also boot on a USB key (like isohybrid, just implemented
         # differently)
@@ -465,7 +495,7 @@
 
     elif [ $XORRISO_VER -gt 10202 ] ; then
         echo "Using newer EFI support in xorriso $XORRISO_VER"
-        add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot"
+        add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-e boot/grub/efi.img -no-emul-boot"
         add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-isohybrid-gpt-basdat -isohybrid-apm-hfsplus"
     fi	
 else
diff -Nru debian-cd-3.1.16/tools/boot/jessie/parse_isolinux debian-cd-3.1.17/tools/boot/jessie/parse_isolinux
--- debian-cd-3.1.16/tools/boot/jessie/parse_isolinux	2014-06-03 18:10:12.000000000 +0100
+++ debian-cd-3.1.17/tools/boot/jessie/parse_isolinux	2015-04-20 12:42:34.000000000 +0100
@@ -70,19 +70,16 @@
     my %k = %{$t};
     my $initrd;
 
-    # Only print 64-bit kernels
-    if ($k{"kernel"} =~ /amd/) {
-	$k{"label"} =~ s/\^//;
-	if ($k{"append"} =~ s? (initrd=\S+)??) {
-	    $initrd = $1;
-	    $initrd =~ s?^.*initrd=??;
-	}
-	print_indent "menuentry '$pre" . $k{"label"} . "' {\n";
-	print_indent "    set background_color=black\n";
-	print_indent "    linux    " . $k{"kernel"} . " " . $k{"append"} . "\n";
-	print_indent "    initrd   $initrd\n";
-	print_indent "}\n";
-    } 
+    $k{"label"} =~ s/\^//;
+    if ($k{"append"} =~ s? (initrd=\S+)??) {
+	$initrd = $1;
+	$initrd =~ s?^.*initrd=??;
+    }
+    print_indent "menuentry '$pre" . $k{"label"} . "' {\n";
+    print_indent "    set background_color=black\n";
+    print_indent "    linux    " . $k{"kernel"} . " " . $k{"append"} . "\n";
+    print_indent "    initrd   $initrd\n";
+    print_indent "}\n";
 }
 
 sub debug {
diff -Nru debian-cd-3.1.16/tools/boot/sid/boot-alpha debian-cd-3.1.17/tools/boot/sid/boot-alpha
--- debian-cd-3.1.16/tools/boot/sid/boot-alpha	2014-05-10 13:50:31.000000000 +0100
+++ debian-cd-3.1.17/tools/boot/sid/boot-alpha	2015-04-20 12:42:34.000000000 +0100
@@ -54,7 +54,7 @@
 
 mkdir boot$N
 ab_deb=`ls $MIRROR/pool/main/a/aboot/aboot-base_*.deb | tail -1`
-ar p $ab_deb data.tar.gz | tar zxf - -C boot$N/ ./boot/bootlx
+(dpkg --fsys-tarfile "$ab_deb" | tar xf - -C boot$N/ ./boot/bootlx)
 
 # Download boot images
 # XXX: Driver floppies?  Any alpha that /has/ a CDROM should be able to
@@ -67,7 +67,8 @@
 		if [ ! "$DI_DIR" ];then
 		   DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images/cdrom"
 		fi
-		cp "$DI_DIR/$image" .
+		ab_file=`ls "$DI_DIR"/$image* | tail -1`
+		cp "$ab_file" .
 	else
 		wget "$DI_WWW_HOME/$image"
 	fi
@@ -76,7 +77,8 @@
 
 echo "Using $THISTYPE boot-disks image on CD$N"
 mkdir -p boot$N/boot
-cp initrd.gz vmlinuz boot$N/boot/
+cp initrd.gz boot$N/boot/
+cp vmlinuz* boot$N/boot/vmlinuz
 mkdir -p boot$N/etc
 
 RSIZE=$(expr $(zcat boot$N/boot/initrd.gz | wc --bytes) / 1024)
diff -Nru debian-cd-3.1.16/tools/boot/sid/boot-arm64 debian-cd-3.1.17/tools/boot/sid/boot-arm64
--- debian-cd-3.1.16/tools/boot/sid/boot-arm64	2014-10-05 09:13:53.000000000 +0100
+++ debian-cd-3.1.17/tools/boot/sid/boot-arm64	2015-04-20 12:42:34.000000000 +0100
@@ -65,6 +65,10 @@
     fi
 done
 
+mkdir -p $CDDIR/$INSTALLDIR
+cp -lf cdrom/vmlinuz $CDDIR/$INSTALLDIR/
+cp -lf cdrom/initrd.gz $CDDIR/$INSTALLDIR/
+
 # Boot setup including config and help files comes from d-i.
 mkdir -pv $PWD/boot$N
 cat cdrom/debian-cd_info.tar.gz | (cd boot$N/; tar zx)
@@ -73,12 +77,6 @@
 add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J -joliet-long"
 add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-cache-inodes"
 
-# We explicitly put the boot bits in boot$N (as opposed to CD$N) and
-# list it first on the eventual mkisofs command line. That means
-# they'll be placed nearer the front of the eventual image; some older
-# BIOSes apparently have a limitation on what they'll boot here.
-add_mkisofs_opt $CDDIR/../$N.mkisofs_dirs "boot$N"
-
 if [ -d boot$N/grub ] ; then
     echo "  Adding EFI boot code for $ARCH on CD$N"
 
@@ -111,20 +109,25 @@
 
     # Ugh - different code here depending on the version of xorriso we've got
     if [ $XORRISO_VER -le 10202 ] ; then
-        # 1.2.2 shipping in Wheezy
-        echo "Using older EFI command line for xorriso $XORRISO_VER"
-        # Tell xorriso to create a secondary ElTorito boot record for the
-        # EFI bootloader
-        add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-eltorito-alt-boot --efi-boot boot/grub/efi.img"
-        # Add the efi image as a FAT partition too, so our CD image will
-        # also boot on a USB key (like isohybrid, just implemented
-        # differently)
-        add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-append_partition 2 0x01 $CDDIR/boot/grub/efi.img"
-        
+        echo "ERROR: debian-cd depends on xorriso > 1.2.2 for making arm64 bootable CDs."
+        exit 1;
     elif [ $XORRISO_VER -gt 10202 ] ; then
         echo "Using newer EFI support in xorriso $XORRISO_VER"
-        add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot"
+
+	# Location of the EFI boot image, and don't emulate a floppy or HD
+        add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-e boot/grub/efi.img -no-emul-boot"
+
+	# Add an *extra* partition on the end for the EFI bits
+	add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-append_partition 2 0xef $CDDIR/boot/grub/efi.img"
+
+	# And force alignment
+	add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-partition_cyl_align all"
     fi      
+
+    # Finally, belt and braces - fix up the %install% entries in grub
+    # in case they're still there
+    sed -i "s,\%install\%,$INSTALLDIR,g" $CDDIR/boot/grub/grub.cfg
+
 else
     echo "  No EFI boot code for $ARCH on CD$N"
 fi
diff -Nru debian-cd-3.1.16/tools/boot/sid/boot-hurd debian-cd-3.1.17/tools/boot/sid/boot-hurd
--- debian-cd-3.1.16/tools/boot/sid/boot-hurd	2014-06-03 18:10:12.000000000 +0100
+++ debian-cd-3.1.17/tools/boot/sid/boot-hurd	2015-04-20 12:42:34.000000000 +0100
@@ -85,6 +85,7 @@
        todos > $CDDIR/autorun.inf <<EOF
 [autorun]
 open=autorun.bat
+label=Install Debian GNU/Hurd
 EOF
        todos > $CDDIR/autorun.bat <<EOF
 @echo Starting "README.html"...
diff -Nru debian-cd-3.1.16/tools/boot/sid/boot-kfreebsd debian-cd-3.1.17/tools/boot/sid/boot-kfreebsd
--- debian-cd-3.1.16/tools/boot/sid/boot-kfreebsd	2014-06-03 18:10:12.000000000 +0100
+++ debian-cd-3.1.17/tools/boot/sid/boot-kfreebsd	2015-04-20 12:42:34.000000000 +0100
@@ -99,6 +99,7 @@
        todos > $CDDIR/autorun.inf <<EOF
 [autorun]
 open=autorun.bat
+label=Install Debian GNU/kFreeBSD
 EOF
        todos > $CDDIR/autorun.bat <<EOF
 @echo Starting "README.html"...
diff -Nru debian-cd-3.1.16/tools/boot/sid/boot-x86 debian-cd-3.1.17/tools/boot/sid/boot-x86
--- debian-cd-3.1.16/tools/boot/sid/boot-x86	2014-10-29 17:26:11.000000000 +0000
+++ debian-cd-3.1.17/tools/boot/sid/boot-x86	2015-04-20 12:42:34.000000000 +0100
@@ -12,6 +12,26 @@
 set -e
 #set -x
 
+# Have we been told to use just one boot method? If none listed,
+# assume all are desired. Order also matters. Possible values are
+# "BIOS", "EFI" and "BIOS EFI". We'll also accept "EFI BIOS" for
+# completeness, but we will switch the order.
+if [ "$BOOT_METHODS"x = ""x ] \
+    || [ "$BOOT_METHODS"x = "BIOS EFI"x ] \
+    || [ "$BOOT_METHODS"x = "EFI BIOS"x ] ; then
+    BOOT_BIOS=1
+    BOOT_EFI=2
+elif [ "$BOOT_METHODS"x = "BIOS"x ] ; then
+    BOOT_BIOS=1
+    BOOT_EFI=0
+elif [ "$BOOT_METHODS"x = "EFI"x ] ; then
+    BOOT_EFI=1
+    BOOT_BIOS=0
+else
+    echo "ERROR: Unrecognized boot method choice $BOOT_METHODS"
+    exit 1
+fi
+
 N=$1
 CDDIR=$2
 BOOTDIR=
@@ -25,6 +45,8 @@
         DI_WWW_HOME="http://d-i.debian.org/daily-images/amd64/daily";
     fi
     try_di_image_cache
+else
+    DI_WWW_HOME=$(echo $DI_WWW_HOME | sed "s,%ARCH%,$ARCH,")
 fi
 
 case "$MKISOFS" in
@@ -32,9 +54,9 @@
         XORRISO_VER=$(xorriso_version)
         ;;
     *)
-	echo "ERROR: debian-cd now depends on xorriso for making x86 bootable CDs."
-	exit 1;
-	;;
+        echo "ERROR: debian-cd now depends on xorriso for making x86 bootable CDs."
+        exit 1;
+        ;;
 esac
 
 cd $CDDIR/..
@@ -54,164 +76,120 @@
 INSTALLDIR_amd64="install.amd"
 
 if [ "$ARCH" = i386 ]; then
-	INSTALLDIR="$INSTALLDIR_i386"
+        INSTALLDIR="$INSTALLDIR_i386"
 else
-	INSTALLDIR="$INSTALLDIR_amd64"
+        INSTALLDIR="$INSTALLDIR_amd64"
 fi
 
 BOOT_IMAGES="cdrom/initrd.gz cdrom/vmlinuz cdrom/debian-cd_info.tar.gz"
-# Only include disk images on full CDs, not on smaller images.
-#if [ "$ARCH" = i386 ] && [ "$INSTALLER_CD" != 1 ] && [ "$INSTALLER_CD" != 2 ] && [ "$INSTALLER_CD" != C ]; then
-	#DISK_IMAGES="floppy/cd-drivers.img floppy/boot.img floppy/root.img"
-	#EXTRA_DISK_IMAGES="cdrom/boot.img"
-#fi
 
 # Download boot images.
 for image in $BOOT_IMAGES; do
-	if [ ! -e "$image" ]; then
-		dir=$(dirname $image)
-		mkdir -p $dir
-		if [ -n "$LOCAL"  -a -f "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" ]; then
-			cp "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" "$image"
-		elif [ ! "$DI_WWW_HOME" ];then
-			if [ ! "$DI_DIR" ];then
-				DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
-			fi
-#			echo "Copying images from $DI_DIR"
-			cp "$DI_DIR/$image" "$image"
-		else
-			wget "$DI_WWW_HOME/$image" -O "$image"
-		fi
-	fi
+        if [ ! -e "$image" ]; then
+                dir=$(dirname $image)
+                mkdir -p $dir
+                if [ -n "$LOCAL"  -a -f "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" ]; then
+                        cp "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" "$image"
+                elif [ ! "$DI_WWW_HOME" ];then
+                        if [ ! "$DI_DIR" ];then
+                                DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
+                        fi
+#                       echo "Copying images from $DI_DIR"
+                        cp "$DI_DIR/$image" "$image"
+                else
+                        wget "$DI_WWW_HOME/$image" -O "$image"
+                fi
+        fi
 done
 
 # Images that are not really required or may be unavailable.
 for image in $DISK_IMAGES $EXTRA_DISK_IMAGES; do
-	if [ ! -e "$image" ]; then
-		dir=$(dirname $image)
-		mkdir -p $dir
-		if [ -n "$LOCAL"  -a -f "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" ]; then
-			cp "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" "$image"
-		elif [ ! "$DI_WWW_HOME" ];then
-			if [ ! "$DI_DIR" ];then
-				DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
-			fi
-			cp "$DI_DIR/$image" "$image" || true
-		else
-			wget "$DI_WWW_HOME/$image" -O "$image" || rm -f "$image"
-		fi
-	fi
+        if [ ! -e "$image" ]; then
+                dir=$(dirname $image)
+                mkdir -p $dir
+                if [ -n "$LOCAL"  -a -f "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" ]; then
+                        cp "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" "$image"
+                elif [ ! "$DI_WWW_HOME" ];then
+                        if [ ! "$DI_DIR" ];then
+                                DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
+                        fi
+                        cp "$DI_DIR/$image" "$image" || true
+                else
+                        wget "$DI_WWW_HOME/$image" -O "$image" || rm -f "$image"
+                fi
+        fi
 done
 
 # Only disk one gets the extra files installed
 if [ "$NN" = "1" ]; then
-	# populate the install directory as well
-	for disk in $DISK_IMAGES $EXTRA_DISK_IMAGES; do
-		if [ -e "$disk" ]; then
-			dir=$(dirname $disk)
-			mkdir -p $CDDIR/$INSTALLDIR/$dir
-			cp -lf $disk $CDDIR/$INSTALLDIR/$dir
-		fi
-	done
-
-	if [ -e "$MIRROR/tools" ] && \
-	   [ ! -e $CDDIR/tools ] && \
-	   [ "$OMIT_DOC_TOOLS" != "1" ] ; then
-		echo "  Adding tools to CD1"
-		$BASEDIR/tools/add_files $CDDIR $MIRROR tools
-		# Remove the win32-loader/ subdirectory from tools, as d-i already installs setup.exe
-		rm -Rf $CDDIR/tools/win32-loader
-	fi
+        # populate the install directory as well
+        for disk in $DISK_IMAGES $EXTRA_DISK_IMAGES; do
+                if [ -e "$disk" ]; then
+                        dir=$(dirname $disk)
+                        mkdir -p $CDDIR/$INSTALLDIR/$dir
+                        cp -lf $disk $CDDIR/$INSTALLDIR/$dir
+                fi
+        done
+
+        if [ -e "$MIRROR/tools" ] && \
+           [ ! -e $CDDIR/tools ] && \
+           [ "$OMIT_DOC_TOOLS" != "1" ] ; then
+                echo "  Adding tools to CD1"
+                $BASEDIR/tools/add_files $CDDIR $MIRROR tools
+                # Remove the win32-loader/ subdirectory from tools, as d-i already installs setup.exe
+                rm -Rf $CDDIR/tools/win32-loader
+        fi
 fi
 
 extra_image () {
-	image=$1
-	doppelgangers="$2"
-	dir=$(dirname "$image")
-
-	mkdir -p $CDDIR/$INSTALLDIR/$dir
-	if [ ! -e $CDDIR/$INSTALLDIR/"$image" ] ; then
-		if [ ! "$DI_WWW_HOME" ] ; then
-			if [ ! "$DI_DIR" ] ; then
-				DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
-			fi
-			cp "$DI_DIR/cdrom/$image" $CDDIR/$INSTALLDIR/"$image"
-		else
-			wget "$DI_WWW_HOME/cdrom/$image" -O $CDDIR/$INSTALLDIR/"$image"
-		fi
-	fi
-	for doppelganger in $doppelgangers ; do
-		if [ -f "$CDDIR/$INSTALLDIR/$dir/$doppelganger" ] &&
-			cmp -s $CDDIR/$INSTALLDIR/"$image" $CDDIR/$INSTALLDIR/"$dir"/"$doppelganger" ; then
-			echo "  $image identical to $doppelganger. Linking"
-			ln -nf $CDDIR/$INSTALLDIR/"$dir"/"$doppelganger" $CDDIR/$INSTALLDIR/"$image"
-			break
-		fi
-	done
+        image=$1
+        doppelgangers="$2"
+        dir=$(dirname "$image")
+
+        mkdir -p $CDDIR/$INSTALLDIR/$dir
+        if [ ! -e $CDDIR/$INSTALLDIR/"$image" ] ; then
+                if [ ! "$DI_WWW_HOME" ] ; then
+                        if [ ! "$DI_DIR" ] ; then
+                                DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
+                        fi
+                        cp "$DI_DIR/cdrom/$image" $CDDIR/$INSTALLDIR/"$image"
+                else
+                        wget "$DI_WWW_HOME/cdrom/$image" -O $CDDIR/$INSTALLDIR/"$image"
+                fi
+        fi
+        for doppelganger in $doppelgangers ; do
+                if [ -f "$CDDIR/$INSTALLDIR/$dir/$doppelganger" ] &&
+                        cmp -s $CDDIR/$INSTALLDIR/"$image" $CDDIR/$INSTALLDIR/"$dir"/"$doppelganger" ; then
+                        echo "  $image identical to $doppelganger. Linking"
+                        ln -nf $CDDIR/$INSTALLDIR/"$dir"/"$doppelganger" $CDDIR/$INSTALLDIR/"$image"
+                        break
+                fi
+        done
 }
 
 case "$DESKTOP" in
     $UNSPEC_DESKTOP_DEFAULT)
-	# default from tasksel 
-	DESKTOP=
-	;;
+        # default from tasksel 
+        DESKTOP=
+        ;;
     all)
-	# default from tasksel 
-	DESKTOP=
-	;;
+        # default from tasksel 
+        DESKTOP=
+        ;;
     light)
-	DESKTOP=xfce
-	;;
+        DESKTOP=xfce
+        ;;
 esac
 # desktop boot parameter gets set separately through DESKTOP variable
 KERNEL_PARAMS="$(echo "$KERNEL_PARAMS" | sed -r "s/desktop=[^ ]* ?//")"
 
-echo "  Using ISOLINUX boot-disks image on CD$N"
 mkdir -p $CDDIR/$INSTALLDIR
 cp -lf cdrom/vmlinuz $CDDIR/$INSTALLDIR/
 cp -lf cdrom/initrd.gz $CDDIR/$INSTALLDIR/
 if [ -e $CDDIR/tools/loadlin.exe ]; then
-	echo "\\tools\\loadlin.exe vmlinuz initrd=initrd.gz" | todos > $CDDIR/$INSTALLDIR/install.bat
-fi
-
-mkdir -p $CDDIR/../syslinux
-SYSLINUXDEB=$(find_pkg_file syslinux)
-if [ -z "$SYSLINUXDEB" ]; then
-	echo "ERROR: syslinux package is required" >&2
-	exit 1
-fi
-(dpkg --fsys-tarfile "$MIRROR/$SYSLINUXDEB" | \
-	tar xf - -C $CDDIR/../syslinux ./usr/lib)
-
-if [ -n "$ARCHIVE_EXTRACTED_SOURCES" ]; then
-	echo $SYSLINUXDEB >> $CDDIR/../$N.pkgs_extracted
-	find_pkg_file syslinux source >> $CDDIR/../$N.pkgs_extracted
+        echo "\\tools\\loadlin.exe vmlinuz initrd=initrd.gz" | todos > $CDDIR/$INSTALLDIR/install.bat
 fi
 
-# syslinux 6.x onwards uses different packaging layout. Deal with bold
-# old and new layout for now.
-
-if [ -f $CDDIR/../syslinux/usr/lib/syslinux/isolinux.bin ] ; then
-    SYSLINUX_LAYOUT=OLD
-    add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-isohybrid-mbr syslinux/usr/lib/syslinux/isohdpfx.bin"
-else
-    SYSLINUX_LAYOUT=NEW
-    ISOLINUXDEB=$(find_pkg_file isolinux)
-    if [ -z "$ISOLINUXDEB" ]; then
-	echo "ERROR: isolinux package is required" >&2
-	exit 1
-    fi
-    (dpkg --fsys-tarfile "$MIRROR/$ISOLINUXDEB" | \
-	tar xf - -C $CDDIR/../syslinux ./usr/lib)
-    
-    if [ -n "$ARCHIVE_EXTRACTED_SOURCES" ]; then
-	echo $ISOLINUXDEB >> $CDDIR/../$N.pkgs_extracted
-	find_pkg_file isolinux source >> $CDDIR/../$N.pkgs_extracted
-    fi
-    add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-isohybrid-mbr syslinux/usr/lib/ISOLINUX/isohdpfx.bin"
-fi
-
-
 # In case of a multi-arch CD the script will be called two times. The
 # first time the isolinux dir gets set up for single arch; if it is
 # called a second time the isolinux dir already exists and we know it
@@ -220,211 +198,256 @@
 
 MULTIARCH=
 if [ -e boot$N/isolinux/isolinux.cfg ]; then
-	MULTIARCH=1
-	rm -r boot$N/isolinux
+        MULTIARCH=1
+        rm -r boot$N/isolinux
 fi
 
 mkdir -p boot$N/isolinux
 # Isolinux setup including config and help files comes from d-i.
 cat cdrom/debian-cd_info.tar.gz | (cd boot$N/isolinux/; tar zx)
 
-# If we don't have grub stuff from d-i, tell xorriso to add a
-# partition offset for the isohybrid code
-if [ ! -d boot$N/isolinux/grub ] ; then
-    add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-partition_offset 16"
-fi
-
-di_syslinux_ver="$(di_syslinux_version)"
-case "$di_syslinux_ver" in
-	2.0)
-		: ;;
-	1.*)
-		echo "Error: syslinux config versions before 2.0 are not supported"
-		exit 1 ;;
-	*)
-		echo "Error: unrecognized syslinux config version '$di_syslinux_ver'"
-		exit 1 ;;
-esac
-
 # Not everything in the tarball is isolinux stuff
 if [ -e boot$N/isolinux/win32-loader.ini ] ; then
-	for file in boot$N/isolinux/g2ldr* boot$N/isolinux/setup.exe boot$N/isolinux/win32-loader.ini; do
-		if [ -e $file ] ; then
-			mv -v $file boot$N/
-		fi
-	done
+    for file in boot$N/isolinux/g2ldr* boot$N/isolinux/setup.exe boot$N/isolinux/win32-loader.ini; do
+        if [ -e $file ] ; then
+            mv -v $file CD$N/
+        fi
+    done
+    # Modify win32-loader.ini for the "current" arch
+    sed -i "s|install/|$INSTALLDIR/|" CD$N/win32-loader.ini
+    if [ "${DESKTOP}" ] ; then
+        sed -i "s|^\(default_desktop\)=.*|\1=${DESKTOP}|" CD$N/win32-loader.ini
+    fi
 fi
 
-if [ -e boot$N/isolinux/f3.txt.withgtk ]; then
-	extra_image gtk/vmlinuz         "../vmlinuz"
-	extra_image gtk/initrd.gz       "../initrd.gz"
-	mv boot$N/isolinux/f3.txt.withgtk boot$N/isolinux/f3.txt
-	mv boot$N/isolinux/f4.txt.withgtk boot$N/isolinux/f4.txt
-	if [ -e boot$N/isolinux/isolinux.cfg.withgtk ]; then
-		mv boot$N/isolinux/isolinux.cfg.withgtk boot$N/isolinux/isolinux.cfg
-	fi
-	if [ -e $CDDIR/tools/loadlin.exe ]; then
-		echo "\\tools\\loadlin.exe \\$INSTALLDIR\\vmlinuz initrd=initrd.gz vga=788" | todos > $CDDIR/$INSTALLDIR/gtk/install.bat
-	fi
-fi
-rm -f boot$N/isolinux/isolinux.cfg.with*
+# Add autorun
+if [ -f CD$N/setup.exe ]; then
+# when win32-loader is present, use that (it already checks for README.html)
+    todos > $CDDIR/autorun.inf <<EOF
+[autorun]
+open=setup.exe
+icon=setup.exe,0
+label=Install Debian GNU/Linux
 
-if variant_enabled "xen" ; then
-	extra_image xen/vmlinuz         "../vmlinuz   ../gtk/vmlinuz"
-	extra_image xen/initrd.gz       "../initrd.gz ../gtk/initrd.gz"
-	extra_image xen/debian.cfg || extra_image xen/xm-debian.cfg
-fi
+[Content]
+MusicFiles=false
+PictureFiles=false
+VideoFiles=false
+EOF
+elif [ -f $CDDIR/README.html ]; then
+    todos > $CDDIR/autorun.inf <<EOF
+[autorun]
+open=autorun.bat
+label=Install Debian GNU/Linux
 
-# Modify win32-loader.ini for the "current" arch
-if [ -e boot$N/win32-loader.ini ]; then
-	sed -i "s|install/|$INSTALLDIR/|" boot$N/win32-loader.ini
-	if [ "${DESKTOP}" ] ; then
-		sed -i "s|^\(default_desktop\)=.*|\1=${DESKTOP}|" boot$N/win32-loader.ini
-	fi
+[Content]
+MusicFiles=false
+PictureFiles=false
+VideoFiles=false
+EOF
+    todos > $CDDIR/autorun.bat <<EOF
+@echo Starting "README.html"...
+@start README.html
+@exit
+EOF
 fi
 
-if [ $SYSLINUX_LAYOUT = OLD ] ; then
-    cp -f $CDDIR/../syslinux/usr/lib/syslinux/isolinux.bin boot$N/isolinux/
-    cp -f $CDDIR/../syslinux/usr/lib/syslinux/vesamenu.c32 boot$N/isolinux/
-    if [ -e $CDDIR/../syslinux/usr/lib/syslinux/ldlinux.c32 ]; then
-	cp -f $CDDIR/../syslinux/usr/lib/syslinux/ldlinux.c32 boot$N/isolinux/
-	cp -f $CDDIR/../syslinux/usr/lib/syslinux/libcom32.c32 boot$N/isolinux/
-	cp -f $CDDIR/../syslinux/usr/lib/syslinux/libutil.c32 boot$N/isolinux/
+# Common mkisofs options when creating CDs
+add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J -joliet-long"
+add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-cache-inodes"
+
+# BIOS-boot specific stuff. Even when we're *not* doing BIOS boot, we
+# still create all the isolinux config files as they're parsed and
+# used later. We just don't grab all the syslinux files, then make
+# sure that we *don't* set up BIOS boot on the xorriso command line.
+if [ "$BOOT_BIOS" = 1 ] ; then
+    echo "  Adding BIOS boot code for $ARCH on CD$N"
+    mkdir -p $CDDIR/../syslinux
+    SYSLINUXDEB=$(find_pkg_file syslinux)
+    if [ -z "$SYSLINUXDEB" ]; then
+        echo "ERROR: syslinux package is required" >&2
+        exit 1
     fi
-else
+    (dpkg --fsys-tarfile "$MIRROR/$SYSLINUXDEB" | \
+        tar xf - -C $CDDIR/../syslinux ./usr/lib)
+
+    if [ -n "$ARCHIVE_EXTRACTED_SOURCES" ]; then
+        echo $SYSLINUXDEB >> $CDDIR/../$N.pkgs_extracted
+        find_pkg_file syslinux source >> $CDDIR/../$N.pkgs_extracted
+    fi
+
+    ISOLINUXDEB=$(find_pkg_file isolinux)
+    if [ -z "$ISOLINUXDEB" ]; then
+        echo "ERROR: isolinux package is required" >&2
+        exit 1
+    fi
+    (dpkg --fsys-tarfile "$MIRROR/$ISOLINUXDEB" | \
+        tar xf - -C $CDDIR/../syslinux ./usr/lib)
+    
+    if [ -n "$ARCHIVE_EXTRACTED_SOURCES" ]; then
+        echo $ISOLINUXDEB >> $CDDIR/../$N.pkgs_extracted
+        find_pkg_file isolinux source >> $CDDIR/../$N.pkgs_extracted
+    fi
+    add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-isohybrid-mbr syslinux/usr/lib/ISOLINUX/isohdpfx.bin"
+
     cp -f $CDDIR/../syslinux/usr/lib/ISOLINUX/isolinux.bin boot$N/isolinux/
     cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/vesamenu.c32 boot$N/isolinux/
     cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/ldlinux.c32 boot$N/isolinux/
     cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/libcom32.c32 boot$N/isolinux/
     cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/libutil.c32 boot$N/isolinux/
+
+    # If we don't have grub stuff from d-i, tell xorriso to add a
+    # partition offset for the isohybrid code
+    if [ ! -d boot$N/isolinux/grub ] || [ $BOOT_EFI = 0 ] ; then
+        add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-partition_offset 16"
+    fi
+
+    # Add the normal options to make an ElTorito bootable CD/DVD using isolinux
+    add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-b isolinux/isolinux.bin"
+    add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-c isolinux/boot.cat"
+    bls=4 # Specify 4 for BIOS boot, don't calculate it
+    add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-boot-load-size $bls"
+    add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-boot-info-table"    
+    add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-no-emul-boot"
+
+    # We explicitly put the boot bits in boot$N (as opposed to CD$N)
+    # and list it first on the eventual mkisofs command line. That
+    # means they'll be placed nearer the front of the eventual image;
+    # some older BIOSes apparently have a limitation on what they'll
+    # boot here.
+    add_mkisofs_opt $CDDIR/../$N.mkisofs_dirs "boot$N"
+else
+    echo "  No BIOS boot code for $ARCH on CD$N"
+fi
+
+di_syslinux_ver="$(di_syslinux_version)"
+case "$di_syslinux_ver" in
+    2.0)
+        : ;;
+    1.*)
+        echo "Error: syslinux config versions before 2.0 are not supported"
+        exit 1 ;;
+    *)
+        echo "Error: unrecognized syslinux config version '$di_syslinux_ver'"
+        exit 1 ;;
+esac
+
+if [ -e boot$N/isolinux/f3.txt.withgtk ]; then
+    extra_image gtk/vmlinuz         "../vmlinuz"
+    extra_image gtk/initrd.gz       "../initrd.gz"
+    mv boot$N/isolinux/f3.txt.withgtk boot$N/isolinux/f3.txt
+    mv boot$N/isolinux/f4.txt.withgtk boot$N/isolinux/f4.txt
+    if [ -e boot$N/isolinux/isolinux.cfg.withgtk ]; then
+        mv boot$N/isolinux/isolinux.cfg.withgtk boot$N/isolinux/isolinux.cfg
+    fi
+    if [ -e $CDDIR/tools/loadlin.exe ]; then
+        echo "\\tools\\loadlin.exe \\$INSTALLDIR\\vmlinuz initrd=initrd.gz vga=788" | todos > $CDDIR/$INSTALLDIR/gtk/install.bat
+    fi
+fi
+rm -f boot$N/isolinux/isolinux.cfg.with*
+
+if variant_enabled "xen" ; then
+    extra_image xen/vmlinuz         "../vmlinuz   ../gtk/vmlinuz"
+    extra_image xen/initrd.gz       "../initrd.gz ../gtk/initrd.gz"
+    extra_image xen/debian.cfg || extra_image xen/xm-debian.cfg
 fi
 
 if [ -z "$MULTIARCH" ]; then
-	# Set up isolinux dir for only the current arch
-	grep -lr '%install%' boot$N/isolinux/* | xargs -r sed -i "s|%install%|$INSTALLDIR|"
+    # Set up isolinux dir for only the current arch
+    grep -lr '%install%' boot$N/isolinux/* | xargs -r sed -i "s|%install%|$INSTALLDIR|"
     
-	# Remove the amd*.cfg files to avoid them being loaded on a
-	# disc that does not have both amd64 and i386 dirs.
-	find boot$N/isolinux/ -name "amd*.cfg" -delete
+    # Remove the amd*.cfg files to avoid them being loaded on a disc
+    # that does not have both amd64 and i386 dirs.
+    find boot$N/isolinux/ -name "amd*.cfg" -delete
 else
-	# Set up isolinux dir for multi-arch
-	grep -lr '%install[-amd]*%' boot$N/isolinux/* | xargs -r sed -i -e "s|%install%|$INSTALLDIR_i386|" -e "s|%install-amd%|$INSTALLDIR_amd64|"
+    # Set up isolinux dir for multi-arch
+    grep -lr '%install[-amd]*%' boot$N/isolinux/* | xargs -r sed -i -e "s|%install%|$INSTALLDIR_i386|" -e "s|%install-amd%|$INSTALLDIR_amd64|"
 
-	for file in boot$N/isolinux/f3.txt* boot$N/isolinux/f4.txt*; do
-		sed -i "4 s/^$/(note: i386 is default; prepend 'amd64-' to use an amd64 kernel instead)/" $file
-	done
-
-	if [ -e boot$N/win32-loader.ini ]; then
-		# Modify win32-loader.ini to also cover the "other" arch
-		if [ "$ARCH" = i386 ]; then
-			sed -i -e "/^arch=/d
-					   /^i386\//p; s/^i386/amd64/; s/=$INSTALLDIR_i386/=$INSTALLDIR_amd64/g" \
-					       boot$N/win32-loader.ini
-		else
-			sed -i -e "/^arch=/d
-					   /^amd64\//p; s/^amd64/i386/; s/=$INSTALLDIR_amd64/=$INSTALLDIR_i386/g" \
-					       boot$N/win32-loader.ini
-		fi
-	fi
+    for file in boot$N/isolinux/f3.txt* boot$N/isolinux/f4.txt*; do
+        sed -i "4 s/^$/(note: i386 is default; prepend 'amd64-' to use an amd64 kernel instead)/" $file
+    done
+
+    if [ -e CD$N/win32-loader.ini ]; then
+        # Modify win32-loader.ini to also cover the "other" arch
+        if [ "$ARCH" = i386 ]; then
+            sed -i -e "/^arch=/d
+                       /^i386\//p; s/^i386/amd64/; s/=$INSTALLDIR_i386/=$INSTALLDIR_amd64/g" \
+                           CD$N/win32-loader.ini
+        else
+            sed -i -e "/^arch=/d
+                       /^amd64\//p; s/^amd64/i386/; s/=$INSTALLDIR_amd64/=$INSTALLDIR_i386/g" \
+                           CD$N/win32-loader.ini
+        fi
+    fi
 
-	# Apply workaround for #505243
+    # Apply workaround for #505243
+    if [ "$BOOT_BIOS" = 1 ] ; then
 	multiarch_workaround
+    fi
 fi
 
 if [ "$SPLASHPNG" ] ; then
-	# Insert our own splash screen.  Color index 0 is background, and
-	# index 7 is foreground.  Set to black and white respecively
-	pngtopnm < $SPLASHPNG | ppmquant 16 | \
-		ppmtolss16 "#ffffff=7" "#000000=0" > boot$N/isolinux/splash.rle
-	pngtopnm < $SPLASHPNG | ppmquant 16 | pnmtopng  > boot$N/isolinux/splash.png
+    # Insert our own splash screen.  Color index 0 is background, and
+    # index 7 is foreground.  Set to black and white respecively
+    pngtopnm < $SPLASHPNG | ppmquant 16 | \
+        ppmtolss16 "#ffffff=7" "#000000=0" > boot$N/isolinux/splash.rle
+    pngtopnm < $SPLASHPNG | ppmquant 16 | pnmtopng  > boot$N/isolinux/splash.png
 fi
 
 # used by Debian Edu
 if [ "$LOGOPNG" ] ; then
-	# Add custom logo to the initrd.gz file, replacing old image
-	GTKINITRD=$CDDIR/$INSTALLDIR/gtk/initrd
-	GTKINITRDGZ=$GTKINITRD.gz
-	echo "info: Adding $LOGOPNG to $GTKINITRD"
-	INITRDDIR=$TDIR/initrd-$$
-	# Repack initrd with new image
-	mkdir -p $INITRDDIR
-	(
-		cd $INITRDDIR
-		gunzip $GTKINITRDGZ
-		mkdir -p $INITRDDIR/usr/share/graphics
-		cp $LOGOPNG $INITRDDIR/usr/share/graphics/logo_debian.png
-		echo usr/share/graphics/logo_debian.png | \
-		cpio -oA -H newc -F $GTKINITRD
-		gzip -9 $GTKINITRD
-	)
-	rm -rf $INITRDDIR
+    # Add custom logo to the initrd.gz file, replacing old image
+    GTKINITRD=$CDDIR/$INSTALLDIR/gtk/initrd
+    GTKINITRDGZ=$GTKINITRD.gz
+    echo "info: Adding $LOGOPNG to $GTKINITRD"
+    INITRDDIR=$TDIR/initrd-$$
+    # Repack initrd with new image
+    mkdir -p $INITRDDIR
+    (
+        cd $INITRDDIR
+        gunzip $GTKINITRDGZ
+        mkdir -p $INITRDDIR/usr/share/graphics
+        cp $LOGOPNG $INITRDDIR/usr/share/graphics/logo_debian.png
+        echo usr/share/graphics/logo_debian.png | \
+            cpio -oA -H newc -F $GTKINITRD
+        gzip -9 $GTKINITRD
+    )
+    rm -rf $INITRDDIR
 fi
 
 sed -i "s|built on|built $BUILD_DATE; d-i|" boot$N/isolinux/f1.txt
 
 if [ -n "$KERNEL_PARAMS" ]; then
-	# Substitute custom kernel params into the isolinux config file(s)
-	for file in boot$N/isolinux/*.cfg; do
-		case "$(basename $file)" in
-			instsel.cfg)
-				continue ;;
-		esac
-		sed -i "/^[[:space:]]\+append .*--/ s|append|append $KERNEL_PARAMS|" \
-			$file
-	done
+    # Substitute custom kernel params into the isolinux config file(s)
+    for file in boot$N/isolinux/*.cfg; do
+        case "$(basename $file)" in
+            instsel.cfg)
+                continue ;;
+        esac
+        sed -i "/^[[:space:]]\+append .*---/ s|append|append $KERNEL_PARAMS|" \
+            $file
+    done
 fi
 
 set_default_desktop
+rm -rf cdrom
 
-# Add autorun
-if [ -f boot$N/setup.exe ]; then
-# when win32-loader is present, use that (it already checks for README.html)
-	todos > $CDDIR/autorun.inf <<EOF
-[autorun]
-open=setup.exe
-EOF
-elif [ -f $CDDIR/README.html ]; then
-	todos > $CDDIR/autorun.inf <<EOF
-[autorun]
-open=autorun.bat
-EOF
-	todos > $CDDIR/autorun.bat <<EOF
-@echo Starting "README.html"...
-@start README.html
-@exit
-EOF
-fi
-
-rm -rf cdrom floppy
-
-# Common mkisofs options when creating CDs
-add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J -joliet-long"
-add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-cache-inodes"
-
-# Add the normal options to make an ElTorito bootable CD/DVD
-add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-b isolinux/isolinux.bin"
-add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-c isolinux/boot.cat"
-add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-no-emul-boot"
-bls=4 # Specify 4 for BIOS boot, don't calculate it
-add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-boot-load-size $bls"
-add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-boot-info-table"	
-
-# We explicitly put the boot bits in boot$N (as opposed to CD$N) and
-# list it first on the eventual mkisofs command line. That means
-# they'll be placed nearer the front of the eventual image; some older
-# BIOSes apparently have a limitation on what they'll boot here.
-add_mkisofs_opt $CDDIR/../$N.mkisofs_dirs "boot$N"
-
-if [ -d boot$N/isolinux/grub ] ; then
+if [ -d boot$N/isolinux/grub ] && [ $BOOT_EFI -ne 0 ] ; then
     echo "  Adding EFI boot code for $ARCH on CD$N"
 
     # Move GRUB files to the right place.
     mkdir -p $CDDIR/efi/boot
-    mcopy -i boot$N/isolinux/grub/efi.img ::efi/boot/bootx64.efi $CDDIR/efi/boot/bootx64.efi
+    mcopy -n -i boot$N/isolinux/grub/efi.img '::efi/boot/boot*.efi' $CDDIR/efi/boot
     mkdir -p $CDDIR/boot/grub
     mv boot$N/isolinux/grub/* $CDDIR/boot/grub/
     rmdir boot$N/isolinux/grub
 
+	# If we're only doing EFI, copy the splash file from the BIOS boot dir
+	if [ $BOOT_EFI = 1 ] ; then
+		mkdir -p $CDDIR/isolinux
+		cp boot$N/isolinux/splash.png $CDDIR/isolinux
+	fi
+
     # Create grub menu entries to match the isolinux ones
     sed -i '/^menuentry/Q' $CDDIR/boot/grub/grub.cfg;
     $BASEDIR/tools/boot/$DI_CODENAME/parse_isolinux \
@@ -448,16 +471,23 @@
     mkfs.msdos -C "$CDDIR/boot/grub/efi.img" $blocks >/dev/null
     mmd -i "$CDDIR/boot/grub/efi.img" ::efi
     mmd -i "$CDDIR/boot/grub/efi.img" ::efi/boot
-    mcopy -i "$CDDIR/boot/grub/efi.img" $CDDIR/efi/boot/boot*.efi \
+    mcopy -o -i "$CDDIR/boot/grub/efi.img" $CDDIR/efi/boot/boot*.efi \
         "::efi/boot"
 
+    if [ $BOOT_EFI = 2 ] ; then
+	# We're being added alongside (after) a BIOS boot record. Tell
+	# xorriso to create a (secondary) ElTorito boot record for the
+	# EFI bootloader. Otherwise, xorriso will create it as the
+	# primary.
+        add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-eltorito-alt-boot"
+    fi
+
     # Ugh - different code here depending on the version of xorriso we've got
     if [ $XORRISO_VER -le 10202 ] ; then
         # 1.2.2 shipping in Wheezy
         echo "Using older EFI command line for xorriso $XORRISO_VER"
-        # Tell xorriso to create a secondary ElTorito boot record for the
-        # EFI bootloader
-        add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-eltorito-alt-boot --efi-boot boot/grub/efi.img"
+
+        add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "--efi-boot boot/grub/efi.img"
         # Add the efi image as a FAT partition too, so our CD image will
         # also boot on a USB key (like isohybrid, just implemented
         # differently)
@@ -465,7 +495,7 @@
 
     elif [ $XORRISO_VER -gt 10202 ] ; then
         echo "Using newer EFI support in xorriso $XORRISO_VER"
-        add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot"
+        add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-e boot/grub/efi.img -no-emul-boot"
         add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-isohybrid-gpt-basdat -isohybrid-apm-hfsplus"
     fi	
 else
diff -Nru debian-cd-3.1.16/tools/boot/sid/parse_isolinux debian-cd-3.1.17/tools/boot/sid/parse_isolinux
--- debian-cd-3.1.16/tools/boot/sid/parse_isolinux	2014-06-03 18:10:12.000000000 +0100
+++ debian-cd-3.1.17/tools/boot/sid/parse_isolinux	2015-04-20 12:42:34.000000000 +0100
@@ -70,19 +70,16 @@
     my %k = %{$t};
     my $initrd;
 
-    # Only print 64-bit kernels
-    if ($k{"kernel"} =~ /amd/) {
-	$k{"label"} =~ s/\^//;
-	if ($k{"append"} =~ s? (initrd=\S+)??) {
-	    $initrd = $1;
-	    $initrd =~ s?^.*initrd=??;
-	}
-	print_indent "menuentry '$pre" . $k{"label"} . "' {\n";
-	print_indent "    set background_color=black\n";
-	print_indent "    linux    " . $k{"kernel"} . " " . $k{"append"} . "\n";
-	print_indent "    initrd   $initrd\n";
-	print_indent "}\n";
-    } 
+    $k{"label"} =~ s/\^//;
+    if ($k{"append"} =~ s? (initrd=\S+)??) {
+	$initrd = $1;
+	$initrd =~ s?^.*initrd=??;
+    }
+    print_indent "menuentry '$pre" . $k{"label"} . "' {\n";
+    print_indent "    set background_color=black\n";
+    print_indent "    linux    " . $k{"kernel"} . " " . $k{"append"} . "\n";
+    print_indent "    initrd   $initrd\n";
+    print_indent "}\n";
 }
 
 sub debug {
diff -Nru debian-cd-3.1.16/tools/boot/wheezy/boot-hurd debian-cd-3.1.17/tools/boot/wheezy/boot-hurd
--- debian-cd-3.1.16/tools/boot/wheezy/boot-hurd	2013-06-17 15:59:47.000000000 +0100
+++ debian-cd-3.1.17/tools/boot/wheezy/boot-hurd	2015-04-20 12:42:34.000000000 +0100
@@ -81,6 +81,7 @@
        todos > $CDDIR/autorun.inf <<EOF
 [autorun]
 open=autorun.bat
+label=Install Debian GNU/Hurd
 EOF
        todos > $CDDIR/autorun.bat <<EOF
 @echo Starting "README.html"...
diff -Nru debian-cd-3.1.16/tools/boot/wheezy/boot-kfreebsd debian-cd-3.1.17/tools/boot/wheezy/boot-kfreebsd
--- debian-cd-3.1.16/tools/boot/wheezy/boot-kfreebsd	2013-06-17 15:59:47.000000000 +0100
+++ debian-cd-3.1.17/tools/boot/wheezy/boot-kfreebsd	2015-04-20 12:42:34.000000000 +0100
@@ -93,6 +93,7 @@
        todos > $CDDIR/autorun.inf <<EOF
 [autorun]
 open=autorun.bat
+label=Install Debian GNU/kFreeBSD
 EOF
        todos > $CDDIR/autorun.bat <<EOF
 @echo Starting "README.html"...
diff -Nru debian-cd-3.1.16/tools/boot/wheezy/boot-x86 debian-cd-3.1.17/tools/boot/wheezy/boot-x86
--- debian-cd-3.1.16/tools/boot/wheezy/boot-x86	2014-08-07 02:00:34.000000000 +0100
+++ debian-cd-3.1.17/tools/boot/wheezy/boot-x86	2015-04-20 12:42:34.000000000 +0100
@@ -370,11 +370,24 @@
 	todos > $CDDIR/autorun.inf <<EOF
 [autorun]
 open=setup.exe
+icon=setup.exe,0
+label=Install Debian GNU/Linux
+
+[Content]
+MusicFiles=false
+PictureFiles=false
+VideoFiles=false
 EOF
 elif [ -f $CDDIR/README.html ]; then
 	todos > $CDDIR/autorun.inf <<EOF
 [autorun]
 open=autorun.bat
+label=Install Debian GNU/Linux
+
+[Content]
+MusicFiles=false
+PictureFiles=false
+VideoFiles=false
 EOF
 	todos > $CDDIR/autorun.bat <<EOF
 @echo Starting "README.html"...
diff -Nru debian-cd-3.1.16/tools/generate_di+k_list debian-cd-3.1.17/tools/generate_di+k_list
--- debian-cd-3.1.16/tools/generate_di+k_list	2014-10-04 16:23:26.000000000 +0100
+++ debian-cd-3.1.17/tools/generate_di+k_list	2015-04-20 12:42:34.000000000 +0100
@@ -79,6 +79,8 @@
 pptp-linux
 /* #593914: netinsts are being used on wireless too these days. */
 wpasupplicant
+/* #782299: netcfg will install rdnssd, make sure it's on our media */
+rdnssd
 
 /* Misc d-i */
 installation-report
@@ -126,6 +128,10 @@
 linux-image-486
 linux-headers-486
 #endif
+#ifndef ARCH_i386_EXCLUDE_586_KERNEL
+linux-image-586
+linux-headers-586
+#endif
 
 #endif
 
@@ -154,9 +160,10 @@
 #endif
 
 #ifdef ARCH_mips
-/* doesn't use a initrd to boot */
+initramfs-tools
 arcboot
 sibyl
+linux-image-octeon
 linux-image-r4k-ip22
 linux-image-r5k-ip32
 linux-image-sb1-bcm91250a
@@ -164,10 +171,13 @@
 #endif
 
 #ifdef ARCH_mipsel
-/* doesn't use a initrd to boot */
+initramfs-tools
 sibyl
 colo
 delo
+linux-image-loongson-2e
+linux-image-loongson-2f
+linux-image-loongson-3
 linux-image-r3k-kn02
 linux-image-r4k-kn04
 linux-image-r5k-cobalt
diff -Nru debian-cd-3.1.16/tools/make_disc_trees.pl debian-cd-3.1.17/tools/make_disc_trees.pl
--- debian-cd-3.1.16/tools/make_disc_trees.pl	2014-08-07 02:00:34.000000000 +0100
+++ debian-cd-3.1.17/tools/make_disc_trees.pl	2015-04-20 12:42:34.000000000 +0100
@@ -575,20 +575,32 @@
 	return ($checksum, $st->size);
 }
 
+sub remove_uncompressed {
+	my ($filename);
+
+	$filename = $File::Find::name;
+
+	if ($filename =~ m/\/.*\/(Packages|Sources)$/o ||
+		$filename =~ m/\/.*\/i18n\/(Translation-[_a-zA-Z]+)$/o)
+	{
+		unlink($_) or die "Failed to remove $_: $!\n";
+	}
+}
+
 sub recompress {
 	# Recompress various files
 	my ($filename);
 
 	$filename = $File::Find::name;
 
-    # Packages and Sources files; workaround for bug #402482
-    if ($filename =~ m/\/.*\/(Packages|Sources)$/o) {
+	# Packages and Sources files; workaround for bug #402482
+	if ($filename =~ m/\/.*\/(Packages|Sources)$/o) {
 		system("gzip -9c < $_ >$_.gz");
 	}
-    # Translation files need to be compressed in .gz format on CD?
+	# Translation files need to be compressed in .gz format on CD?
 	if ($filename =~ m/\/.*\/i18n\/(Translation.*)$/o &&
-        ! ($filename =~ m/\/.*\/i18n\/(Translation.*gz)$/o)) {
-		system("gzip -9 $_");
+		! ($filename =~ m/\/.*\/i18n\/(Translation.*gz)$/o)) {
+		system("gzip -9c < $_ >$_.gz");
 	}
 }	
 
@@ -829,6 +841,7 @@
 	find (\&recompress, ".");
 	checksum_files_for_release();
 	close(RELEASE);
+	find (\&remove_uncompressed, ".");
 	chdir("../..");
 
 	print "  Finishing off md5sum.txt\n";
diff -Nru debian-cd-3.1.16/update-cd debian-cd-3.1.17/update-cd
--- debian-cd-3.1.16/update-cd	2014-09-21 18:24:30.000000000 +0100
+++ debian-cd-3.1.17/update-cd	2015-04-20 12:42:34.000000000 +0100
@@ -33,6 +33,9 @@
 # Use JTE extensions to mkisofs to make jigdo files?
 JTE=1
 
+# Set up torrents too?
+BT=1
+
 # The working directory to use. MUST be on the same partition as the mirror.
 TDIR=/org/cdbuilder.debian.org/src/deb-cd/tmp/squeeze-update/cd-work
 
@@ -141,6 +144,7 @@
     ISODIR=$OUT/$THISARCH/iso-$TYPE
     JIGDODIR=$OUT/$THISARCH/jigdo-$TYPE
     LISTDIR=$OUT/$THISARCH/list-$TYPE
+    BTDIR=$OUT/$THISARCH/bt-$TYPE
 
     if [ ! -d ${ISODIR} ] ; then
         mkdir -p ${ISODIR}
@@ -151,6 +155,9 @@
     if [ ! -d ${LISTDIR} ] ; then
         mkdir -p ${LISTDIR}
     fi
+    if [ $BT = 1 ] && [ ! -d ${BTDIR} ] ; then
+        mkdir -p ${BTDIR}
+    fi
 
     if [ $JTE = 1 ] ; then
 	set +e
@@ -180,6 +187,7 @@
             awk '/Image Hex MD5Sum/ {print $5}'`
         echo "$MD5  ${BASENAME}.iso" >> ${JIGDODIR}/MD5SUMS.update
         echo "$MD5  ${BASENAME}.iso" >> ${ISODIR}/MD5SUMS.update
+        [ $BT = 1 ] && echo "$MD5  ${BASENAME}.iso" >> ${BTDIR}/MD5SUMS.update
         for SHA_SIZE in 1 256 512; do
             SHA=`cat ${JIGDODIR}/${BASENAME}.jigdo | \
                 awk "/Image Hex SHA${SHA_SIZE}Sum/ {print \\$5}"`
@@ -189,6 +197,7 @@
             fi
             echo "$SHA  ${BASENAME}.iso" >> ${JIGDODIR}/SHA${SHA_SIZE}SUMS.update
             echo "$SHA  ${BASENAME}.iso" >> ${ISODIR}/SHA${SHA_SIZE}SUMS.update
+            [ $BT = 1 ] && echo "$SHA  ${BASENAME}.iso" >> ${BTDIR}/SHA${SHA_SIZE}SUMS.update
         done
         gzip -9 ${JIGDODIR}/${BASENAME}.jigdo
         mv ${JIGDODIR}/${BASENAME}.jigdo.gz ${JIGDODIR}/${BASENAME}.jigdo

Reply to: