#!/bin/sh # Copyright (C) 2005 Eddy Petrisor # # 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., 59 Temple Place, Suite 330, Boston, # MA 02111-1307 USA # SUITE='sid' CHROOT="chroot/${SUITE}-root" BOOTSTRAP="cdebootstrap -f build ${SUITE} ${CHROOT}" if [ ! -f /usr/bin/cdebootstrap ] then BOOTSTRAP="debootstrap --variant=buildd ${SUITE} ${CHROOT}" [ ! -f /usr/bin/debootstrap ] && echo 'You need debootstrap or cdebootstrap to create the chroot' && exit 1 fi # create the directories, if needed [ ! -d ${CHROOT} ] && mkdir -p $CHROOT [ ! -d ${CHROOT}/proc ] && mkdir -p $CHROOT/proc [ ! -d ${CHROOT}/sys ] && mkdir -p $CHROOT/sys [ ! -d ${CHROOT}/etc ] && mkdir -p $CHROOT/etc # install the chroot environment $BOOTSTRAP # post chroot install mount -t proc proc ${CHROOT}/proc/ mount -t sysfs sysfs ${CHROOT}/sys/ touch ${CHROOT}/etc/resolv.conf cat /etc/resolv.conf > ${CHROOT}/etc/resolv.conf touch ${CHROOT}/etc/apt/sources.list echo 'deb ftp://ftp.ro.debian.org/debian unstable main' > ${CHROOT}/etc/apt/sources.list #cp /etc/apt/trusted.gpg ${CHROOT}/etc/apt/ echo 'APT { Get { AllowUnauthenticated "yes"; }; };' > ${CHROOT}/etc/apt/apt.conf chroot ${CHROOT} <