71
# Operating system files to copy over into the jail.
72
# These will be copied from the given place on the OS file system into the
73
# same place within the jail.
76
'/lib/tls/i686/cmov/libc.so.6',
77
'/lib/tls/i686/cmov/libdl.so.2',
78
'/lib/tls/i686/cmov/libm.so.6',
79
'/lib/tls/i686/cmov/libpthread.so.0',
80
'/lib/tls/i686/cmov/libutil.so.1',
83
# Symlinks to make within the jail. Src mapped to dst.
85
'python2.5': 'jail/usr/bin/python',
87
# Trees to copy. Src mapped to dst (these will be passed to action_copytree).
89
'/usr/lib/python2.5': 'jail/usr/lib/python2.5',
71
92
# Try importing existing conf, but if we can't just set up defaults
72
93
# The reason for this is that these settings are used by other phases
73
94
# of setup besides conf, so we need to know them.
481
502
"""Copies necessary Operating System files from their usual locations
482
503
into the jail/ directory of the cwd."""
483
504
# Currently source paths are configured for Ubuntu.
484
copy_file_to_jail('/lib/ld-linux.so.2', dry)
485
copy_file_to_jail('/lib/tls/i686/cmov/libc.so.6', dry)
486
copy_file_to_jail('/lib/tls/i686/cmov/libdl.so.2', dry)
487
copy_file_to_jail('/lib/tls/i686/cmov/libm.so.6', dry)
488
copy_file_to_jail('/lib/tls/i686/cmov/libpthread.so.0', dry)
489
copy_file_to_jail('/lib/tls/i686/cmov/libutil.so.1', dry)
490
copy_file_to_jail('/usr/bin/python2.5', dry)
491
action_symlink('python2.5', 'jail/usr/bin/python', dry)
492
action_copytree('/usr/lib/python2.5', 'jail/usr/lib/python2.5', dry)
505
for filename in JAIL_FILES:
506
copy_file_to_jail(filename, dry)
507
for src, dst in JAIL_LINKS.items():
508
action_symlink(src, dst, dry)
509
for src, dst in JAIL_COPYTREES.items():
510
action_copytree(src, dst, dry)
494
512
def copy_file_to_jail(src, dry):
495
513
"""Copies a single file from an absolute location into the same location