@@ -39,30 +39,52 @@ get_deboot ()
3939 cd $BASE_DIR /$DEBOOT_DIR ;
4040 wget -c $DEBOOT_SRC /$DEBOOT_DEB ;
4141 ar -x $DEBOOT_DEB ;
42- tar -xf data.tar.xz ;
42+ tar -xzf data.tar.gz ;
4343 cd $BASE_DIR ;
4444}
4545
4646# this function just creates the chroot environment
4747deboot_chroot ()
4848{
4949 # do the bootstrap
50- DEBOOTSTRAP_DIR=$BASE_DIR /$DEBOOT_DIR /usr/share/debootstrap $BASE_DIR /$DEBOOT_DIR /usr/sbin/debootstrap --arch= $ROOT_ARCH --include= $REQUIRED_PACKAGES --no-check-gpg $ROOT_SUITE $BASE_DIR /$ROOT_TARGET $ROOT_SOURCE ;
50+ DEBOOTSTRAP_DIR=$BASE_DIR /$DEBOOT_DIR /usr/share/debootstrap $BASE_DIR /$DEBOOT_DIR /usr/sbin/debootstrap --variant=buildd --arch= $ROOT_ARCH --no-check-gpg $ROOT_SUITE $BASE_DIR /$ROOT_TARGET $ROOT_SOURCE ;
5151
5252 # deboot feels the need to mount proc, we don't need it here
5353 umount $BASE_DIR /$ROOT_TARGET /proc;
5454
55- # stop dpkg from running daemons
55+ # stop dpkg from running daemons
5656cat > $BASE_DIR /$ROOT_TARGET /usr/sbin/policy-rc.d << EOF
5757#!/bin/sh
5858exit 101
5959EOF
6060 chmod a+x $BASE_DIR /$ROOT_TARGET /usr/sbin/policy-rc.d;
6161
62+ # update the chroot's sources.list
63+ cat > $BASE_DIR /$ROOT_TARGET /etc/apt/sources.list << EOF
64+ deb http://archive.ubuntu.com/ubuntu $ROOT_SUITE main restricted universe multiverse
65+ deb http://archive.ubuntu.com/ubuntu $ROOT_SUITE -updates main restricted universe multiverse
66+ deb http://archive.ubuntu.com/ubuntu $ROOT_SUITE -security main restricted universe multiverse
67+ EOF
68+
6269 # divert ischroot
6370 # note that this throws error, my need to be fixed, not sure
6471 chroot $BASE_DIR /$ROOT_TARGET dpkg-divert --divert /usr/bin/ischroot.debianutils --rename /usr/bin/ischroot;
6572 chroot $BASE_DIR /$ROOT_TARGET /bin/ln -s /bin/true /usr/bin/ischroot;
73+
74+ chroot $BASE_DIR /$ROOT_TARGET dpkg -i /var/cache/apt/archives/apt_* .deb;
75+ }
76+
77+ # bring the chroot current
78+ upgrade_chroot ()
79+ {
80+ chroot $BASE_DIR /$ROOT_TARGET apt-get update;
81+ chroot $BASE_DIR /$ROOT_TARGET apt-get dist-upgrade;
82+ }
83+
84+ # install required packages in the chroot
85+ install_build_tools ()
86+ {
87+ chroot $BASE_DIR /$ROOT_TARGET apt-get install $REQUIRED_PACKAGES ;
6688}
6789
6890# this function gets the architecture for our chroot
0 commit comments