* Major licensing problem cleanup: (Closes: #497270)

+ Remove binary blobs from the package; pull those files from the
      .debs in the archive as needed (isolinux.bin, vesamenu.c32)
    + sbm.bin *not* yet worked out, so drop it for now
    + 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.
This commit is contained in:
Steve McIntyre 2008-09-15 23:09:18 +00:00
parent d55d40f1e7
commit 60dbf627e2
13 changed files with 88 additions and 13 deletions

View File

@ -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 ##

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

7
debian/changelog vendored
View File

@ -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 <fjp@debian.org> Mon, 04 Aug 2008 18:59:31 +0200

View File

@ -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

View File

@ -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)

View File

@ -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

59
tools/which_deb Executable file
View File

@ -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