diff --git a/Makefile b/Makefile index 0a160c3b..54d608ae 100755 --- a/Makefile +++ b/Makefile @@ -53,6 +53,7 @@ merge_package_lists=$(BASEDIR)/tools/merge_package_lists update_popcon=$(BASEDIR)/tools/update_popcon update_tasks=$(BASEDIR)/tools/update_tasks grab_source_list=$(BASEDIR)/tools/grab_source_list +which_deb=$(BASEDIR)/tools/which_deb BDIR=$(TDIR)/$(CODENAME) ADIR=$(APTTMP) @@ -62,8 +63,7 @@ export DEBOOTSTRAP_DIR := $(DB_DIR)/usr/lib/debootstrap export PATH := $(DB_DIR)/usr/sbin:$(PATH) export BDIR -LATEST_DB := $(shell zcat $(MIRROR)/dists/$(CODENAME)/main/binary-i386/Packages.gz | awk '/\/debootstrap_.*deb/ {print $$2}') -LATEST_DB := $(MIRROR)/$(LATEST_DB) +LATEST_DB := $(shell $(which_deb) $(MIRROR) $(CODENAME) debootstrap) ## DEBUG STUFF ## diff --git a/data/etch/isolinux.bin b/data/etch/isolinux.bin deleted file mode 100644 index 9fd7f636..00000000 Binary files a/data/etch/isolinux.bin and /dev/null differ diff --git a/data/etch/sbm.bin.gz b/data/etch/sbm.bin.gz deleted file mode 100644 index 20e4aa4f..00000000 Binary files a/data/etch/sbm.bin.gz and /dev/null differ diff --git a/data/lenny/isolinux.bin b/data/lenny/isolinux.bin deleted file mode 100644 index c70bec2c..00000000 Binary files a/data/lenny/isolinux.bin and /dev/null differ diff --git a/data/lenny/sbm.bin.gz b/data/lenny/sbm.bin.gz deleted file mode 100644 index 20e4aa4f..00000000 Binary files a/data/lenny/sbm.bin.gz and /dev/null differ diff --git a/data/lenny/vesamenu.c32 b/data/lenny/vesamenu.c32 deleted file mode 100644 index fc779067..00000000 Binary files a/data/lenny/vesamenu.c32 and /dev/null differ diff --git a/data/sarge/isolinux.bin b/data/sarge/isolinux.bin deleted file mode 100644 index d7c6d4d0..00000000 Binary files a/data/sarge/isolinux.bin and /dev/null differ diff --git a/data/sarge/sbm.bin.gz b/data/sarge/sbm.bin.gz deleted file mode 100644 index 20e4aa4f..00000000 Binary files a/data/sarge/sbm.bin.gz and /dev/null differ diff --git a/debian/changelog b/debian/changelog index 9deb9a9f..8088afc2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -101,6 +101,13 @@ debian-cd (3.0.5) UNRELEASED; urgency=low images for less-popular architectures but still produce all the jigdo files, saving a lot of disk space. * Recommend syslinux-common instead of syslinux. Closes: #497966 + * Major licensing problem cleanup: (Closes: #497270) + + Remove binary blobs from the package; pull those files from the + .debs in the archive as needed (sbm.bin.gz, isolinux.bin, + vesamenu.c32) + + Pull out the code to find the right deb and put it in a new helper + shell script (tools/which_deb), called from Makefile and boot-* as + needed. -- Frans Pop Mon, 04 Aug 2008 18:59:31 +0200 diff --git a/tools/boot/lenny/boot-powerpc b/tools/boot/lenny/boot-powerpc index 8bce9d0e..dc03f61f 100755 --- a/tools/boot/lenny/boot-powerpc +++ b/tools/boot/lenny/boot-powerpc @@ -55,9 +55,8 @@ add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-hfs-volid Debian/PowerPC_${CODENAME} cd $INSTALLDIR # Extract yaboot from the archive if [ -z "$YABOOT_DEBUG" ]; then - YADEB="$($BASEDIR/tools/apt-selection cache show yaboot | \ - grep ^Filename | awk '{print $2}')" - (ar p "${MIRROR}/${YADEB}" data.tar.gz | \ + YADEB=`$BASEDIR/tools/which_deb $MIRROR $DI_CODENAME yaboot` + (ar p "${YADEB}" data.tar.gz | \ tar zxf - -C . ./usr/lib/yaboot/yaboot) mv usr/lib/yaboot/yaboot . rm -rf usr diff --git a/tools/boot/lenny/boot-sparc b/tools/boot/lenny/boot-sparc index 4476c911..455df849 100755 --- a/tools/boot/lenny/boot-sparc +++ b/tools/boot/lenny/boot-sparc @@ -38,8 +38,7 @@ cd $CDDIR/.. # Setup directories mkdir -p $inst/boot -silo_deb=$MIRROR/`zcat $MIRROR/dists/$DI_CODENAME/main/binary-sparc/Packages.gz | \ - awk '/^Filename: .*\/silo/ {print $2}'` +silo_deb=`$BASEDIR/tools/which_deb $MIRROR $DI_CODENAME silo` # put the relevant parts of SILO boot loader (ar p $silo_deb data.tar.gz | \ tar zxf - -C $inst/ ./boot/{isofs,second}.b) diff --git a/tools/boot/lenny/boot-x86 b/tools/boot/lenny/boot-x86 index 7c29cc21..2a54a1da 100644 --- a/tools/boot/lenny/boot-x86 +++ b/tools/boot/lenny/boot-x86 @@ -120,10 +120,17 @@ if [ "$NN" = "1" ]; then done # Include Smart Boot Manager image for people where isolinux fails - gzip -dc $BASEDIR/data/$DI_CODENAME/sbm.bin.gz > $CDDIR/install/sbm.bin - # Keep the original file timestamp - touch -r $BASEDIR/data/$DI_CODENAME/sbm.bin.gz $CDDIR/install/sbm.bin - cp -p $BASEDIR/data/$DI_CODENAME/README.sbm $CDDIR/install/ + + # TODO: Work out how to do this properly; for now it's disabled + # (SAM 2008-09-15) + + #SBMDEB=`$BASEDIR/tools/which_deb $MIRROR $DI_CODENAME sbm` + #(ar p "${SBMDEB}" data.tar.gz | \ + # tar zxf - -C $CDDIR/../sbm ./boot) + #cp -f $CDDIR/../sbm/boot/sbm.img $CDDIR/install/sbm.bin + + # And add our own README + #cp -p $BASEDIR/data/$DI_CODENAME/README.sbm $CDDIR/install/ fi extra_image () { @@ -149,6 +156,10 @@ if [ "$THISTYPE" = "isolinux" ]; then cp -lf cdrom/vmlinuz $CDDIR/$INSTALLDIR/ cp -lf cdrom/initrd.gz $CDDIR/$INSTALLDIR/ + SYSLINUXDEB=`$BASEDIR/tools/which_deb $MIRROR $DI_CODENAME syslinux` + (ar p "${SYSLINUXDEB}" data.tar.gz | \ + tar zxf - -C $CDDIR/../syslinux ./usr/lib) + add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J -joliet-long" add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-cache-inodes" add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-b isolinux/isolinux.bin" @@ -208,8 +219,8 @@ if [ "$THISTYPE" = "isolinux" ]; then fi fi - cp -f $BASEDIR/data/$DI_CODENAME/isolinux.bin boot$N/$ISOLINUXDIR/ - cp -f $BASEDIR/data/$DI_CODENAME/vesamenu.c32 boot$N/$ISOLINUXDIR/ + cp -f $CDDIR/../syslinux/usr/lib/syslinux/isolinux.bin boot$N/$ISOLINUXDIR/ + cp -f $CDDIR/../syslinux/usr/lib/syslinux/vesamenu.c32 boot$N/$ISOLINUXDIR/ if [ -n "$ISOLINUX_DEFAULT" ]; then sed -i "s/^DEFAULT .*$/DEFAULT $ISOLINUX_DEFAULT/" boot$N/$ISOLINUXDIR/isolinux.cfg diff --git a/tools/which_deb b/tools/which_deb new file mode 100755 index 00000000..92c72406 --- /dev/null +++ b/tools/which_deb @@ -0,0 +1,59 @@ +#!/bin/sh +# +# which_deb +# +# Simple helper tool to find the appropriate version of a package in +# the archive to meet a requirement in the debian-cd build + +MIRROR=$1 +CODENAME=$2 +PKG=$3 +PATH=$MIRROR/dists/$CODENAME/main + +case $PKG in + + debootstrap) + DEB="$MIRROR/"`zcat $PATH/binary-i386/Packages.gz | \ + awk '/\/debootstrap_.*deb/ {print $2}'` + ;; + + sbm) + DEB="$MIRROR/"`zcat $PATH/binary-i386/Packages.gz | \ + awk '/\/sbm.*deb/ {print $2}'` + ;; + + silo) + DEB="$MIRROR/"`zcat $PATH/binary-sparc/Packages.gz | \ + awk '/\/silo.*deb/ {print $2}'` + ;; + + syslinux) + # More complex - look for syslinux-common, then fall back to + # syslinux if we don't find that + DEB="$MIRROR/"`zcat $PATH/binary-i386/Packages.gz | \ + awk '/\/syslinux-common.*deb/ {print $2}'` + if [ "$DEB"x = "$MIRROR/"x ] ; then + DEB="$MIRROR/"`zcat $PATH/binary-i386/Packages.gz | \ + awk '/\/syslinux.*deb/ {print $2}'` + fi + ;; + + yaboot) + DEB="$MIRROR/"`zcat $PATH/binary-powerpc/Packages.gz | \ + awk '/\/yaboot.*deb/ {print $2}'` + ;; + + *) + # No idea what we should be doing here... + DEB="$MIRROR/" + ;; + +esac + +if [ "$DEB"x = "$MIRROR/"x ] ; then + echo "$0: Failed to find a deb for package $PKG in $MIRROR/" + exit 1 +fi + +echo $DEB +