From dcf741d1497b0f05a97ad0f20bddc6b2440bf67d Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 9 Apr 2010 13:39:41 +0200 Subject: added caching fixed use of contrib bootstrap --- contrib/debootstrap/devices.tar.gz | Bin 0 -> 783 bytes inc/bootstrap.inc.sh | 18 ++++++++++++++---- inc/env.inc.sh | 14 ++++++++++++-- inc/helper.inc.sh | 1 + 4 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 contrib/debootstrap/devices.tar.gz diff --git a/contrib/debootstrap/devices.tar.gz b/contrib/debootstrap/devices.tar.gz new file mode 100644 index 0000000..35fa60b Binary files /dev/null and b/contrib/debootstrap/devices.tar.gz differ diff --git a/inc/bootstrap.inc.sh b/inc/bootstrap.inc.sh index c7965bd..7822b96 100644 --- a/inc/bootstrap.inc.sh +++ b/inc/bootstrap.inc.sh @@ -11,25 +11,35 @@ bootstrap () { echo -en "${R}2${NONE} " && sleep 1 && \ echo -en "${R}1${NONE} " && sleep 1 && \ echo ".. go " + + export DEBOOTSTRAP_DIR="$BROOT_BASE_DIR/contrib/debootstrap" + + mkdir -p "$buildrootpath/root/bin" + + mkdir -p "/tmp/deb/partial" + mkdir -p "$buildrootpath/var/cache/apt/archives" + mount -o bind "/tmp/deb" "$buildrootpath/var/cache/apt/archives" + + $DEBOOTSTRAP_DIR/debootstrap --arch="i386" squeeze $buildrootpath http://ftp.de.debian.org/debian - debootstrap --arch="i386" squeeze $buildrootpath http://ftp.de.debian.org/debian touch $buildrootpath/bootstraped + sed -i -e "s,main,main non-free," $buildrootpath/etc/apt/sources.list setupBindmounts $buildrootpath updatebuildroot $buildrootpath chroot-exec aptitude update - chroot-apt-installinstall locales + + chroot-aptinstall locales sed -i -e "s,^#.*\(en_US.*\)$,\1," $buildrootpath/etc/locale.gen chroot-exec locale-gen chroot-aptinstall build-essential chroot-aptinstall git-core subversion chroot-aptinstall firmware-iwlwifi firmware-linux firmware-linux-free firmware-linux-nonfree linux-image-2.6.32-trunk-686-bigmem - mkdir -p $buildrootpath/root/bin cp ./chroot-scripts/* $buildrootpath/root/bin/ chmod 700 $buildrootpath/root/bin/* - chroot-exec /root/bin/build-bb.sh + # chroot-exec /root/bin/build-bb.sh destroyBindmounts diff --git a/inc/env.inc.sh b/inc/env.inc.sh index fed5fea..bab613c 100644 --- a/inc/env.inc.sh +++ b/inc/env.inc.sh @@ -1,2 +1,12 @@ -buildrootpath=$(slxsettings |grep public-path | sed -e "s,^.*='\(.*\)'$,\1,") -buildrootpath="$buildrootpath/buildroot" +slxsettings=$(slxsettings 2>/dev/null ) +if [ $? -eq 0 ]; then + buildrootpath=$(slxsettings |grep public-path | sed -e "s,^.*='\(.*\)'$,\1,") + buildrootpath="$buildrootpath/buildroot" +else + buildrootpath="/tmp/buildroot" +fi + +SCRIPT=$(readlink -f $0) +SCRIPTPATH=`dirname $SCRIPT` + +BROOT_BASE_DIR=$SCRIPTPATH diff --git a/inc/helper.inc.sh b/inc/helper.inc.sh index c0780b0..eed974d 100644 --- a/inc/helper.inc.sh +++ b/inc/helper.inc.sh @@ -7,4 +7,5 @@ setupBindmounts() { destroyBindmounts() { umount $buildrootpath/proc umount $buildrootpath/dev + umount /tmp/deb } -- cgit v1.2.3-55-g7522