forked from renggli/pharo-builder
-
Notifications
You must be signed in to change notification settings - Fork 6
/
build_client_image.sh
executable file
·195 lines (186 loc) · 5.62 KB
/
build_client_image.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
#!/bin/bash -x
#
# build_client_image.sh -- Downloads and installs the desired Smalltalk
# installation: PharoCore-1-3, Pharo-1.4, Pharo-2.0, Squeak-4.3, Squeak-4.4
#
# Copyright (c) 2012 VMware, Inc. All Rights Reserved <dhenrich@vmware.com>.
# Copyright (c) 2013-2014 GemTalk Systems, LLC <dhenrich@gemtalksystems.com>.
#
# Environment variables defined in .travis.yml
#
#
set -e # exit on error
#install 32 bit libs if necessary
case "$(uname -m)" in
"x86_64")
echo "64bit os"
# 32-bit VM
sudo apt-get -qq update
sudo apt-get -qq install libc6:i386
# UUIDPlugin
sudo apt-get -qq install libuuid1:i386
# SqueakSSL
sudo apt-get -qq install libkrb5-3:i386 libk5crypto3:i386 zlib1g:i386 libcomerr2:i386 libkrb5support0:i386 libkeyutils1:i386
case "$ST" in
Squeak*|Pharo*)
sudo apt-get -qq install libx11-6:i386 libgl1-mesa-glx:i386 libsm6:i386 libssl1.0.0:i386
sudo ln -s /lib/i386-linux-gnu/libcrypto.so.1.0.0 /lib/i386-linux-gnu/libcrypto.so.10
sudo ln -s /lib/i386-linux-gnu/libssl.so.1.0.0 /lib/i386-linux-gnu/libssl.so.10
esac
case "$ST" in
Pharo*)
sudo apt-get -qq install libssl1.0.0:i386
# libFT2Plugin
sudo apt-get -qq install libfreetype6:i386
esac
;;
*)
echo "32bit os"
;;
esac
IMAGE_BASE_NAME=$ST
IMAGE_TARGET_NAME=$ST
case "$ST" in
PharoCore-1.2)
pharoReleaseNumber="12"
;;
PharoCore-1.3)
pharoReleaseNumber="13"
;;
Pharo-1.4)
pharoReleaseNumber="14"
;;
Pharo-2.0)
pharoReleaseNumber="20"
;;
Pharo-3.0)
pharoReleaseNumber="30"
;;
Pharo-4.0)
pharoReleaseNumber="40"
;;
Pharo-5.0)
pharoReleaseNumber="50"
;;
*)
# noop
;;
esac
case "$ST" in
# PharoCore-1.1
PharoCore-1.1)
cd $IMAGES_PATH
wget http://files.pharo.org/image/11/PharoCore-1.1.2.zip
unzip PharoCore-1.1.2.zip
cd PharoCore-1.1.2
IMAGE_BASE_NAME=PharoCore-1.1.2-11422
mv *.sources $SOURCES_PATH
;;
# PharoCore-1.3 - don't use zeroconf script as the newer vms apparently cause package load errors...see Issue #69
PharoCore-1.3)
cd $IMAGES_PATH
wget http://files.pharo.org/image/13/13323.zip
unzip 13323.zip
cd PharoCore-1.3-13323
mv *.sources $SOURCES_PATH
;;
Pharo*)
cd $IMAGES_PATH
mkdir $ST
cd $ST
wget --quiet -O - get.pharo.org/vm${pharoReleaseNumber} | bash
wget --quiet -O - get.pharo.org/${pharoReleaseNumber} | bash
IMAGE_BASE_NAME=Pharo
# move VM to $IMAGES_PATH
mv pharo ..
mv pharo-vm ..
;;
# Squeak-4.3 ... allow Squeak4.3 for backwards compatibility
Squeak-4.3|Squeak4.3)
cd $IMAGES_PATH
wget http://ftp.squeak.org/4.3/Squeak4.3.zip
unzip Squeak4.3.zip
cd Squeak4.3
wget http://ftp.squeak.org/sources_files/SqueakV41.sources.gz
gunzip SqueakV41.sources.gz
IMAGE_BASE_NAME=Squeak4.3
mv *.sources $SOURCES_PATH
;;
# Squeak-4.4
Squeak-4.4)
cd $IMAGES_PATH
# 4.3 stores things in a Squeak4.3 directory. 4.4 doesn't.
# So we mimic the behaviour of 4.3.
mkdir -p Squeak4.4
cd Squeak4.4
wget http://ftp.squeak.org/4.4/Squeak4.4-12327.zip
unzip Squeak4.4-12327.zip
wget http://ftp.squeak.org/sources_files/SqueakV41.sources.gz
gunzip SqueakV41.sources.gz
IMAGE_BASE_NAME=Squeak4.4-12327
mv *.sources $SOURCES_PATH
;;
# Squeak-4.5
Squeak-4.5)
cd $IMAGES_PATH
# 4.3 stores things in a Squeak4.3 directory. 4.5 doesn't.
# So we mimic the behaviour of 4.3.
mkdir -p Squeak4.5
cd Squeak4.5
wget http://ftp.squeak.org/4.5/Squeak4.5-13680.zip
unzip Squeak4.5-13680.zip
wget http://ftp.squeak.org/sources_files/SqueakV41.sources.gz
gunzip SqueakV41.sources.gz
IMAGE_BASE_NAME=Squeak4.5-13680
mv *.sources $SOURCES_PATH
;;
# Squeak-4.6
Squeak-4.6)
cd $IMAGES_PATH
# 4.3 stores things in a Squeak4.3 directory. 4.6 doesn't.
# So we mimic the behaviour of 4.3.
mkdir -p Squeak4.6
cd Squeak4.6
wget http://ftp.squeak.org/4.6/Squeak4.6-15102.zip
unzip Squeak4.6-15102.zip
wget http://ftp.squeak.org/sources_files/SqueakV46.sources.gz
gunzip SqueakV46.sources.gz
IMAGE_BASE_NAME=Squeak4.6-15102
mv *.sources $SOURCES_PATH
;;
# Squeak-5.0
Squeak-5.0)
cd $IMAGES_PATH
# 4.3 stores things in a Squeak4.3 directory. 5.0 doesn't.
# So we mimic the behaviour of 4.3.
mkdir -p Squeak5.0
cd Squeak5.0
wget http://ftp.squeak.org/5.0/Squeak5.0-15113.zip
unzip Squeak5.0-15113.zip
wget http://ftp.squeak.org/sources_files/SqueakV50.sources.gz
gunzip SqueakV50.sources.gz
IMAGE_BASE_NAME=Squeak5.0-15113
mv *.sources $SOURCES_PATH
;;
# Squeak-Trunk
Squeak-Trunk)
cd $IMAGES_PATH
mkdir -p SqueakTrunkImage
cd SqueakTrunkImage
wget http://build.squeak.org/job/Trunk/default/lastSuccessfulBuild/artifact/target/TrunkImage.zip
unzip TrunkImage.zip
wget http://ftp.squeak.org/sources_files/SqueakV50.sources.gz
gunzip SqueakV50.sources.gz
IMAGE_BASE_NAME=SpurTrunkImage
mv *.sources $SOURCES_PATH
;;
# unknown
\?) echo "Unknown Smalltalk version ${ST}"
exit 1
;;
esac
# move the image components into the correct location
mv ${IMAGE_BASE_NAME}.changes ../${IMAGE_TARGET_NAME}.changes
mv ${IMAGE_BASE_NAME}.image ../${IMAGE_TARGET_NAME}.image
# success
exit 0