Add in filesystem package explicitly.
[sliceimage.git] / build.sh
1 #!/bin/bash
2 #
3 # Builds VServer reference image
4 #
5 # Mark Huang <mlhuang@cs.princeton.edu>
6 # Copyright (C) 2004-2006 The Trustees of Princeton University
7 #
8 # $Id: build.sh,v 1.20 2007/09/06 20:41:23 faiyaza Exp $
9 #
10
11 PATH=/sbin:/bin:/usr/sbin:/usr/bin
12
13 # In both a normal CVS environment and a PlanetLab RPM
14 # build environment, all of our dependencies are checked out into
15 # directories at the same level as us.
16 if [ -d ../build ] ; then
17     PATH=$PATH:../build
18     srcdir=..
19 else
20     echo "Error: Could not find $(cd .. && pwd -P)/build/"
21     exit 1
22 fi
23
24 export PATH
25
26 # build.common comes from the build module
27 . build.common
28
29 pl_process_fedora_options $@
30 shiftcount=$?
31 shift $shiftcount
32
33 # XXX this should be coming from some configuration file
34 # Packages to install
35 packagelist=(
36 bash
37 coreutils
38 iputils
39 kernel-vserver
40 bzip2
41 crontabs
42 diffutils
43 logrotate
44 openssh-clients
45 passwd
46 rsh
47 rsync
48 sudo
49 tcpdump
50 telnet
51 traceroute
52 time
53 vixie-cron
54 wget
55 which
56 yum
57 curl
58 gzip
59 perl
60 python
61 tar
62 jre
63 findutils
64 filesystem
65 )
66
67 # vserver-reference packages used for reference image
68 for package in "${packagelist[@]}" ; do
69     packages="$packages -p $package"
70 done
71
72 # Do not tolerate errors
73 set -e
74
75 # Make /vservers
76 vroot=$PWD/vservers/.vref/default
77 install -d -m 755 $vroot
78
79 # Populate a minimal /dev in the reference image
80 pl_makedevs $vroot
81
82 # Populate image with vserver-reference packages
83 pl_setup_chroot $vroot $packages
84
85 exit 0