summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian2010-04-09 13:39:41 +0200
committerSebastian2010-04-09 13:39:41 +0200
commitdcf741d1497b0f05a97ad0f20bddc6b2440bf67d (patch)
tree0b9d509e0f9af2a2c56b5196b88f75a9e9e15c17
parentadded bootstrap 1.0.22 (diff)
downloadbroot-dcf741d1497b0f05a97ad0f20bddc6b2440bf67d.tar.gz
broot-dcf741d1497b0f05a97ad0f20bddc6b2440bf67d.tar.xz
broot-dcf741d1497b0f05a97ad0f20bddc6b2440bf67d.zip
added caching
fixed use of contrib bootstrap
-rw-r--r--contrib/debootstrap/devices.tar.gzbin0 -> 783 bytes
-rw-r--r--inc/bootstrap.inc.sh18
-rw-r--r--inc/env.inc.sh14
-rw-r--r--inc/helper.inc.sh1
4 files changed, 27 insertions, 6 deletions
diff --git a/contrib/debootstrap/devices.tar.gz b/contrib/debootstrap/devices.tar.gz
new file mode 100644
index 0000000..35fa60b
--- /dev/null
+++ b/contrib/debootstrap/devices.tar.gz
Binary files 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
}