82
82
# Just get the first 3 characters of sys.version.
83
83
PYTHON_VERSION = sys.version[0:3]
85
# Operating system files to copy over into the jail.
86
# These will be copied from the given place on the OS file system into the
87
# same place within the jail.
90
'/lib/tls/i686/cmov/libc.so.6',
91
'/lib/tls/i686/cmov/libdl.so.2',
92
'/lib/tls/i686/cmov/libm.so.6',
93
'/lib/tls/i686/cmov/libpthread.so.0',
94
'/lib/tls/i686/cmov/libutil.so.1',
97
# These 2 files do not exist in Ubuntu
98
#'/etc/ld.so.preload',
99
#'/etc/ld.so.nohwcap',
105
'/usr/bin/python%s' % PYTHON_VERSION,
106
# Needed by fileservice
107
'/lib/libcom_err.so.2',
108
'/lib/libcrypt.so.1',
109
'/lib/libkeyutils.so.1',
110
'/lib/libresolv.so.2',
113
'/usr/lib/libapr-1.so.0',
114
'/usr/lib/libaprutil-1.so.0',
115
'/usr/lib/libapt-pkg-libc6.6-6.so.4.5',
116
'/usr/lib/libdb-4.6.so',
117
'/usr/lib/libexpat.so.1',
118
'/usr/lib/libgcrypt.so.11',
119
'/usr/lib/libgnutls.so.13',
120
'/usr/lib/libgpg-error.so.0',
121
'/usr/lib/libgssapi_krb5.so.2',
122
'/usr/lib/libk5crypto.so.3',
123
'/usr/lib/libkrb5.so.3',
124
'/usr/lib/libkrb5support.so.0',
125
'/usr/lib/liblber.so.2',
126
'/usr/lib/liblber-2.4.so.2',
127
'/usr/lib/libldap_r.so.2',
128
'/usr/lib/libldap_r-2.4.so.2',
129
'/usr/lib/libneon.so.27',
130
'/usr/lib/libpq.so.5',
131
'/usr/lib/libsasl2.so.2',
132
'/usr/lib/libsqlite3.so.0',
133
'/usr/lib/libsvn_client-1.so.1',
134
'/usr/lib/libsvn_delta-1.so.1',
135
'/usr/lib/libsvn_diff-1.so.1',
136
'/usr/lib/libsvn_fs-1.so.1',
137
'/usr/lib/libsvn_fs_base-1.so.1',
138
'/usr/lib/libsvn_fs_fs-1.so.1',
139
'/usr/lib/libsvn_ra-1.so.1',
140
'/usr/lib/libsvn_ra_dav-1.so.1',
141
'/usr/lib/libsvn_ra_local-1.so.1',
142
'/usr/lib/libsvn_ra_svn-1.so.1',
143
'/usr/lib/libsvn_repos-1.so.1',
144
'/usr/lib/libsvn_subr-1.so.1',
145
'/usr/lib/libsvn_wc-1.so.1',
146
'/usr/lib/libtasn1.so.3',
147
'/usr/lib/libxml2.so.2',
148
# Needed by matplotlib
149
'/usr/lib/i686/cmov/libssl.so.0.9.8',
150
'/usr/lib/i686/cmov/libcrypto.so.0.9.8',
151
'/lib/tls/i686/cmov/libnsl.so.1',
152
'/usr/lib/libz.so.1',
153
'/usr/lib/atlas/liblapack.so.3',
154
'/usr/lib/atlas/libblas.so.3',
155
'/usr/lib/libg2c.so.0',
156
'/usr/lib/libstdc++.so.6',
157
'/usr/lib/libfreetype.so.6',
158
'/usr/lib/libpng12.so.0',
159
'/usr/lib/libBLT.2.4.so.8.4',
160
'/usr/lib/libtk8.4.so.0',
161
'/usr/lib/libtcl8.4.so.0',
162
'/usr/lib/tcl8.4/init.tcl',
163
'/usr/lib/libX11.so.6',
164
'/usr/lib/libXau.so.6',
165
'/usr/lib/libXdmcp.so.6',
166
'/lib/libgcc_s.so.1',
169
'/lib/libnss_dns.so.2',
170
'/lib/libnss_mdns4_minimal.so.2',
175
'/etc/nsswitch.conf',
176
'/lib/libnss_files.so.2',
178
'/usr/lib/libjpeg.so.62',
180
'/usr/lib/libxslt.so.1',
181
'/usr/lib/libexslt.so.0',
182
# Needed by elementtree
183
'/usr/lib/libtidy-0.99.so.0',
185
# Symlinks to make within the jail. Src mapped to dst.
187
'python%s' % PYTHON_VERSION: 'jail/usr/bin/python',
189
# Trees to copy. Src mapped to dst (these will be passed to action_copytree).
191
'/usr/lib/python%s' % PYTHON_VERSION:
192
'jail/usr/lib/python%s' % PYTHON_VERSION,
193
'/var/lib/python-support/python%s' % PYTHON_VERSION:
194
'jail/var/lib/python-support/python%s' %PYTHON_VERSION,
195
'/usr/share/matplotlib': 'jail/usr/share/matplotlib',
196
'/etc/ld.so.conf.d': 'jail/etc/ld.so.conf.d',
197
'/usr/share/pycentral': 'jail/usr/share/pycentral',
198
'/usr/share/pycentral-data': 'jail/usr/share/pycentral-data',
199
'/usr/share/nltk': 'jail/usr/share/nltk',
202
85
class ConfigOption:
203
86
"""A configuration option; one of the things written to conf.py."""
204
87
def __init__(self, option_name, default, prompt, comment):
1065
954
# Create the jail and its subdirectories
1066
955
# Note: Other subdirs will be made by copying files
1067
action_mkdir('jail', dry)
1068
action_mkdir('jail/home', dry)
1069
action_mkdir('jail/tmp', dry)
1071
# Chmod the tmp directory to world writable
1072
action_chmod_w('jail/tmp', dry)
956
action_runprog('./buildjail.sh', [], dry)
1074
958
# Copy all console and operating system files into the jail
1075
959
action_copylist(install_list.list_scripts, 'jail/opt/ivle', dry)
1076
copy_os_files_jail(dry)
1077
960
# Chmod the python console
1078
961
action_chmod_x('jail/opt/ivle/scripts/python-console', dry)
1079
962
action_chmod_x('jail/opt/ivle/scripts/fileservice', dry)