~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to buildjail.sh

  • Committer: wagrant
  • Date: 2008-08-07 05:30:07 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:988
buildjail: Install python-nltk-data (it's now in my repository).
           Also don't bother to remove stuff from the jail - we no longer
           need to hardlink it hundreds of times, and it means we can use
           the jail normally afterwards.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
RELEASE=hardy
33
33
SECTIONS="main universe"
34
34
JAIL=jail
35
 
SYSTEMPACKAGES="python-cjson python-svn"
 
35
SYSTEMPACKAGES="python2.5 python-cjson python-svn"
36
36
STUDENTPACKAGES="python-numpy python-matplotlib python-scipy \
37
37
    python-beautifulsoup python-lxml python-imaging \
38
 
    python-simpletal python-nltk" # elementtree-1.3beta (needs tidy)
39
 
 
40
 
# FIXME: [nasty-hack] Override the default mirror to the local AARNET one.  
41
 
# This should really be a local configuration option, but unfortunately 
42
 
# setup.py is a bit of a mess and needs a clean up to support this. For the 
43
 
# mean time we'll override it here.
44
 
MIRROR=http://mirror.aarnet.edu.au/pub/ubuntu/archive/
45
 
# [/nasty-hack]
46
 
 
47
 
if [ "x$MIRROR" = "x" ]; then
48
 
    MIRROR=http://archive.ubuntu.com/ubuntu/
 
38
    python-simpletal python-nltk python-nltk-data" # elementtree-1.3beta
 
39
 
 
40
# FIXME: [hack] Override the default mirror to the local AARNET one.  This 
 
41
# should really be a local configuration option, but unfortunately setup.py is 
 
42
# a bit of a mess and needs a clean up to support this. For the mean time we'll 
 
43
# override it here.
 
44
 
 
45
if [ -z "$MIRROR" ]; then
 
46
    MIRROR=http://mirror.aarnet.edu.au/pub/ubuntu/archive/
 
47
    #MIRROR=http://archive.ubuntu.com/ubuntu/ # Default Mirror
49
48
fi
50
49
echo "Using Mirror: $MIRROR"
51
50
 
 
51
# Do we have debootstrap? 
 
52
if [ -x /usr/sbin/debootstrap ]; then
 
53
    DEBOOTSTRAP="/usr/sbin/debootstrap"
 
54
fi
 
55
 
 
56
if [ -z "$DEBOOTSTRAP" ]; then
 
57
    echo "Error: Debootstrap not found. Is it installed?"
 
58
    return 1
 
59
fi
 
60
 
52
61
echo "Building minimal Jail..."
53
 
sudo rm -rf $JAIL
54
 
sudo debootstrap --components=`echo $SECTIONS | tr ' ' ','` \
 
62
sudo rm -rf --one-file-system $JAIL
 
63
sudo $DEBOOTSTRAP --components=`echo $SECTIONS | tr ' ' ','` \
55
64
    --include=ubuntu-keyring \
56
65
    --variant=minbase $RELEASE $JAIL $MIRROR
57
66
 
71
80
sudo chroot $JAIL /bin/sh -c "apt-get -y upgrade"
72
81
sudo chroot $JAIL /bin/sh -c "apt-get -y clean"
73
82
 
74
 
echo "Pruning unwanted files from Jail..."
75
 
sudo rm -rf $JAIL/dev/ $JAIL/sys/ $JAIL/proc/ $JAIL/boot/