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

« back to all changes in this revision

Viewing changes to bin/ivle-buildjail

  • Committer: Matt Giuca
  • Date: 2009-04-22 05:14:58 UTC
  • Revision ID: matt.giuca@gmail.com-20090422051458-vh65hoaa3a54knxq
Stopped clobbering conf.py within the jail, using a proper ivle.conf instead.
Now works with Python 2.6 (and can have another version, possible 2.6, inside
the jail).

ivle/config/ivle-spec.conf: Added user_info section with in-jail variables.
ivle/makeuser: Writes a conf file (ivle.conf) instead of conf.py.
ivle/conf/conf.py: Added emulation layer bindings for the in-jail variables.
ivle-buildjail: No longer REMOVES the conf.py file (since it's just a normal
    source file now).

(--author Will)

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
        shutil.rmtree(jail_site_packages)
117
117
    shutil.copytree(ivle_site_packages, jail_site_packages)
118
118
 
119
 
    # IMPORTANT: ivle/conf/conf.py contains details which could compromise security
120
 
    # if left in the jail (such as the DB password). We delete it now! It would be
121
 
    # shadowed by the per-user conf.py anyway, but it's best to be safe.
122
 
    os.unlink(os.path.join(jail_site_packages, 'conf/conf.py'))
123
 
    # XXX: Shouldn't copy the compiled files at all, but compile them in the jail!
124
 
    os.unlink(os.path.join(jail_site_packages, 'conf/conf.pyc'))
125
 
 
126
119
if os.spawnvp(os.P_WAIT, 'rsync', ['rsync', '-a', '--delete',
127
120
              build_path + '/', ivle.conf.jail_system]) != 0:
128
121
    print >> sys.stderr, "Jail copying failed."