#!/bin/bash # # Copyright (C) 2008 Brian Brazil # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # set -ex . config # -security etc. VARIANT=$1 DIR=$WORKINGDIR/$MIRRORDIST$VARIANT if ! [ -f $DIR/bootstrap-done ]; then rm -rf $DIR mkdir -p $DIR debootstrap --arch=i386 $MIRRORDIST $DIR $MIRROR touch $DIR/bootstrap-done fi cat > $DIR/etc/apt/sources.list <> $DIR/etc/apt/sources.list < $DIR/etc/debian_chroot # Copy of builder for use in chroot rsync -ra --delete . $DIR/builder if ! mountpoint $DIR/proc; then mount proc -t proc $DIR/proc fi chroot $DIR bash -c "set -ex; DEBIAN_PRIORITY=critical aptitude -y update && aptitude -y dist-upgrade && aptitude -y install build-essential kernel-wedge imagemagick netpbm fakeroot sharutils devscripts unifdef equivs $CHROOT_EXTRA_PACKAGES && /builder/fixup-kernel-wedge"