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

« back to all changes in this revision

Viewing changes to bin/ivle-buildjail

  • Committer: William Grant
  • Date: 2009-12-10 04:35:39 UTC
  • mto: This revision was merged to the branch mainline in revision 1398.
  • Revision ID: grantw@unimelb.edu.au-20091210043539-lvfr4o480wrhbhs5
python-console will now substitute a FakeObject when it sees a PicklingError, not just a TypeError.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
# Requires root
36
36
if os.getuid() != 0:
37
 
    print >> sys.stderr, "This script requires root privileges to run"
 
37
    print >> sys.stderr, "This script requires root privlages to run"
38
38
    sys.exit(1)
39
39
 
40
40
conf = ivle.config.Config()
84
84
              build_path, mirror=options.apt_mirror)
85
85
 
86
86
    ivle.jailbuilder.debian.apt_update_cache(build_path)
87
 
    # Minimal required packages
88
87
    ivle.jailbuilder.debian.apt_install(build_path,
89
 
            ['python2.5', 'python-cjson', 'python-svn', 'python-configobj'])
 
88
                        ['python2.5', 'python-cjson', 'python-svn'])
90
89
 
91
90
    ivle.jailbuilder.debian.apt_clean(build_path)
92
91
 
118
117
 
119
118
    ivle.jailbuilder.debian.apt_clean(build_path)
120
119
 
121
 
    # Configure locales to allow en_US.UTF-8 (which IVLE uses)
122
 
    ivle.jailbuilder.debian._execute_in_chroot(build_path,
123
 
        ['locale-gen', 'en_US.UTF-8'])
124
 
 
125
120
if conf['jail']['devmode']:
126
121
    # Copy all console and operating system files into the jail
127
122
    services_path = os.path.join(conf['paths']['share'], 'services')
150
145
        shutil.rmtree(jail_site_packages)
151
146
    shutil.copytree(ivle_site_packages, jail_site_packages)
152
147
 
153
 
    # And finally copy in /etc/hosts, /etc/resolv.conf and /etc/hostname,
154
 
    # so name resolution is less unlikely to work.
155
 
    shutil.copy(
156
 
        '/etc/resolv.conf', os.path.join(build_path, 'etc/resolv.conf'))
157
 
    shutil.copy('/etc/hosts', os.path.join(build_path, 'etc/hosts'))
158
 
    shutil.copy('/etc/hostname', os.path.join(build_path, 'etc/hostname'))
159
 
 
160
148
# Make /tmp and /var/lock un-world-writable. /tmp will be mounted over,
161
149
# and /var/{lock,tmp} should die.
162
150
for path in ('tmp', 'var/lock', 'var/tmp'):