diff options
author | David Walter Seikel | 2013-03-25 07:32:43 +1000 |
---|---|---|
committer | David Walter Seikel | 2013-03-25 07:32:43 +1000 |
commit | 147dff6692ae7293f7e9057dd990388ed3125aec (patch) | |
tree | 25421fda0ab589806a5f7995c6dbb04f8579fd88 | |
parent | Add docs about how to set up the build images. (diff) | |
download | ImpyReleaseBuilder-147dff6692ae7293f7e9057dd990388ed3125aec.zip ImpyReleaseBuilder-147dff6692ae7293f7e9057dd990388ed3125aec.tar.gz ImpyReleaseBuilder-147dff6692ae7293f7e9057dd990388ed3125aec.tar.bz2 ImpyReleaseBuilder-147dff6692ae7293f7e9057dd990388ed3125aec.tar.xz |
Added 64 bit Linux qemu build, and build parameters up the top.
Diffstat (limited to '')
-rwxr-xr-x | BuildReleases.sh | 192 |
1 files changed, 126 insertions, 66 deletions
diff --git a/BuildReleases.sh b/BuildReleases.sh index 230a90b..5f85383 100755 --- a/BuildReleases.sh +++ b/BuildReleases.sh | |||
@@ -1,6 +1,17 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | PWD=$(pwd) | 3 | # These control which ones get built. |
4 | do_local=0 | ||
5 | do_linux64=1 | ||
6 | do_linux32=1 | ||
7 | do_windowsXP=0 | ||
8 | do_mac=0 | ||
9 | |||
10 | # Where to find suitable disk images for the various OS's. | ||
11 | img_linux64=~/bin/ubuntu64_diff.qcow2 | ||
12 | img_linux32=~/bin/ubuntu32_diff.qcow2 | ||
13 | img_windowsXP=/media/sdb2/IMAGES/xp_diff.qcow2 | ||
14 | |||
4 | 15 | ||
5 | unique_port() | 16 | unique_port() |
6 | { | 17 | { |
@@ -38,24 +49,9 @@ else | |||
38 | git clone git://github.com/imprudence/imprudence.git SOURCE || exit 0 | 49 | git clone git://github.com/imprudence/imprudence.git SOURCE || exit 0 |
39 | fi | 50 | fi |
40 | 51 | ||
41 | echo "Creating source tarball." | ||
42 | tar czf TARBALLS/impy-release-source_${date}.tar.gz --exclude-vcs SOURCE && | ||
43 | |||
44 | 52 | ||
45 | echo "Building locally, assuming 64 bit, linux." && | 53 | echo "Creating source tarball." |
46 | rm -fr BUILD && | 54 | tar czf TARBALLS/impy-release-source_${date}.tar.gz SOURCE && |
47 | mkdir BUILD && | ||
48 | tar xzf TARBALLS/impy-release-source_${date}.tar.gz -C BUILD && | ||
49 | cd BUILD/SOURCE && | ||
50 | cd linden/scripts/linux && | ||
51 | ./0-patch-SL-source && | ||
52 | ./1-get-libraries-from-SL && | ||
53 | ./2-trim-libraries-from-SL && | ||
54 | ./3-compile-SL-source && | ||
55 | ./4-package-viewer && | ||
56 | cd ../../indra/viewer-linux-* && | ||
57 | cp Imprudence-* ../../../../../TARBALLS | ||
58 | cd ../../../../.. | ||
59 | 55 | ||
60 | 56 | ||
61 | FTP_PORT=$(unique_port) | 57 | FTP_PORT=$(unique_port) |
@@ -72,56 +68,120 @@ disown $(jobs -p) | |||
72 | FTP_SERVER=10.0.2.2 | 68 | FTP_SERVER=10.0.2.2 |
73 | 69 | ||
74 | 70 | ||
75 | echo "Building in qemu, assuming 32 bit, linux." && | 71 | if [ $do_local -eq 1 ] |
76 | # Relies on the guest having this in /etc/init/ttyS0.conf - | 72 | then |
77 | #start on stopped rc RUNLEVEL=[2345] | 73 | echo "Building local." && |
78 | #stop on runlevel [!2345] | 74 | rm -fr BUILD && |
79 | #respawn | 75 | mkdir BUILD && |
80 | #exec /sbin/getty -iLn -l /bin/bash 115200 ttyS0 vt102 | 76 | tar xzf TARBALLS/impy-release-source_${date}.tar.gz -C BUILD && |
81 | 77 | cd BUILD/SOURCE && | |
82 | qemu -M pc -cpu athlon -hda ~/bin/ubuntu32_diff.qcow2 -m 1G -serial stdio << zzzzEOFzzzz | 78 | cd linden/scripts/linux && |
83 | # | 79 | ./0-patch-SL-source && |
84 | cd /home/builder && | 80 | ./1-get-libraries-from-SL && |
85 | rm -fr BUILD && | 81 | ./2-trim-libraries-from-SL && |
86 | mkdir BUILD && | 82 | ./3-compile-SL-source && |
87 | mkdir -p TARBALLS && | 83 | ./4-package-viewer && |
88 | sleep 2 && | 84 | cd ../../indra/viewer-linux-* && |
89 | busybox ftpget ${FTP_SERVER} -vP ${FTP_PORT} TARBALLS/impy-release-source_${date}.tar.gz impy-release-source_${date}.tar.gz && | 85 | cp Imprudence-* ../../../../../TARBALLS |
90 | tar xzf TARBALLS/impy-release-source_${date}.tar.gz -C BUILD && | 86 | cd ../../../../.. |
91 | cd BUILD/SOURCE && | 87 | fi |
92 | cd linden/scripts/linux && | 88 | |
93 | ./0-patch-SL-source && | 89 | |
94 | ./1-get-libraries-from-SL && | 90 | if [ $do_linux64 -eq 1 ] |
95 | ./2-trim-libraries-from-SL && | 91 | then |
96 | ./3-compile-SL-source && | 92 | echo "Building in qemu, 64 bit linux." && |
97 | ./4-package-viewer && | 93 | qemu-system-x86_64 -M pc -cpu phenom -m 1G -hda $img_linux64 -serial stdio <<- zzzzEOFzzzz |
98 | cd ../../indra/viewer-linux-* && | 94 | # |
99 | cp Imprudence-* ../../../../../TARBALLS && | 95 | mkdir -p /home/builder && |
100 | cd /home/builder/TARBALLS && | 96 | cd /home/builder && |
101 | find . -name Imprudence-* -type f -exec busybox ftpput ${FTP_SERVER} -vP ${FTP_PORT} '{}' '{}' \; | 97 | rm -fr BUILD && |
102 | 98 | rm -fr TARBALLS && | |
103 | shutdown -h now | 99 | mkdir -p BUILD && |
100 | mkdir -p TARBALLS && | ||
101 | sleep 2 && | ||
102 | busybox ftpget ${FTP_SERVER} -vP ${FTP_PORT} TARBALLS/impy-release-source_${date}.tar.gz impy-release-source_${date}.tar.gz && | ||
103 | tar xzf TARBALLS/impy-release-source_${date}.tar.gz -C BUILD && | ||
104 | cd BUILD/SOURCE && | ||
105 | cd linden/scripts/linux && | ||
106 | ./0-patch-SL-source && | ||
107 | ./1-get-libraries-from-SL && | ||
108 | ./2-trim-libraries-from-SL && | ||
109 | cp -ar ../../libraries/x86_64-linux/include/ares ../../libraries/include # Hack around an odd problem. | ||
110 | ./3-compile-SL-source && | ||
111 | ./4-package-viewer && | ||
112 | cd ../../indra/viewer-linux-* && | ||
113 | cp Imprudence-* ../../../../../TARBALLS && | ||
114 | cd /home/builder/TARBALLS && | ||
115 | find . -name Imprudence-* -type f -exec busybox ftpput ${FTP_SERVER} -vP ${FTP_PORT} '{}' '{}' \; | ||
116 | |||
117 | shutdown -h now | ||
104 | zzzzEOFzzzz | 118 | zzzzEOFzzzz |
119 | sleep 10 | ||
120 | fi | ||
121 | |||
105 | 122 | ||
106 | sleep 10 | 123 | if [ $do_linux32 -eq 1 ] |
107 | 124 | then | |
108 | echo "Building in qemu, Windows XP." | 125 | echo "Building in qemu, 32 bit linux." && |
109 | expect -c "set date ${date}" -c "set FTP_SERVER ${FTP_SERVER}" -c "set FTP_PORT ${FTP_PORT}" - << "zzzzEOFzzzz" | 126 | qemu-system-i386 -M pc -cpu athlon -m 1G -hda $img_linux32 -serial stdio <<- zzzzEOFzzzz |
110 | set timeout -1 | 127 | # |
111 | set send_slow {1 .1} | 128 | mkdir -p /home/builder && |
112 | spawn qemu -M pc -cpu athlon -m 2G -hda /media/sdb2/IMAGES/xp_diff.qcow2 -cdrom /home/dvs1/Downloads/lose/winxphomex86.iso -serial stdio | 129 | cd /home/builder && |
113 | match_max 100000 | 130 | rm -fr BUILD && |
114 | expect -exact "\$ "; sleep .1; send -s -- "cd /home/me\r" | 131 | rm -fr TARBALLS && |
115 | expect -exact "\$ "; sleep .1; send -s -- "rm -fr BUILD\r" | 132 | mkdir -p BUILD && |
116 | expect -exact "\$ "; sleep .1; send -s -- "su - me -c 'mkdir BUILD'\r" | 133 | mkdir -p TARBALLS && |
117 | expect -exact "\$ "; sleep .1; send -s -- "su - me -c 'mkdir -p TARBALLS'\r" | 134 | sleep 2 && |
118 | expect -exact "\$ "; sleep 2; send -s -- "lftp -c 'open -p $FTP_PORT $FTP_SERVER && lcd TARBALLS && get1 impy-release-source_$date.tar.gz'\r" | 135 | busybox ftpget ${FTP_SERVER} -vP ${FTP_PORT} TARBALLS/impy-release-source_${date}.tar.gz impy-release-source_${date}.tar.gz && |
119 | expect -exact "\$ "; sleep .1; send -s -- "su - me -c 'tar xzf TARBALLS/impy-release-source_$date.tar.gz -C BUILD'\r" | 136 | tar xzf TARBALLS/impy-release-source_${date}.tar.gz -C BUILD && |
120 | expect -exact "\$ "; sleep .1; send -s -- "su - me -c 'ls -la BUILD'\r" | 137 | cd BUILD/SOURCE && |
121 | expect -exact "\$ "; sleep .1; send -s -- "su - me -c 'ls -la TARBALLS'\r" | 138 | cd linden/scripts/linux && |
122 | 139 | ./0-patch-SL-source && | |
123 | expect -exact "\$ "; sleep .1; send -s -- "shutdown -s now\r" | 140 | ./1-get-libraries-from-SL && |
124 | expect eof | 141 | ./2-trim-libraries-from-SL && |
142 | ./3-compile-SL-source && | ||
143 | ./4-package-viewer && | ||
144 | cd ../../indra/viewer-linux-* && | ||
145 | cp Imprudence-* ../../../../../TARBALLS && | ||
146 | cd /home/builder/TARBALLS && | ||
147 | find . -name Imprudence-* -type f -exec busybox ftpput ${FTP_SERVER} -vP ${FTP_PORT} '{}' '{}' \; | ||
148 | |||
149 | shutdown -h now | ||
125 | zzzzEOFzzzz | 150 | zzzzEOFzzzz |
151 | sleep 10 | ||
152 | fi | ||
126 | 153 | ||
127 | 154 | ||
155 | if [ $do_windowsXP -eq 1 ] | ||
156 | then | ||
157 | echo "Building in qemu, Windows XP." | ||
158 | # A here document would be preferable, but "interact" won't work then. | ||
159 | expect -c " | ||
160 | set timeout -1 | ||
161 | set send_slow {1 .1} | ||
162 | spawn qemu-system-i386 -M pc -cpu athlon -m 2G -hda ${img_windowsXP} -serial stdio | ||
163 | match_max 100000 | ||
164 | strace 1 | ||
165 | expect -exact \"\$ \"; sleep .1; send -s -- \"cd /home/me\r\" | ||
166 | expect -exact \"\$ \"; sleep .1; send -s -- \"rm -fr BUILD\r\" | ||
167 | expect -exact \"\$ \"; sleep .1; send -s -- \"rm -fr TARBALLS\r\" | ||
168 | expect -exact \"\$ \"; sleep .1; send -s -- \"su - me -c 'mkdir -p BUILD'\r\" | ||
169 | expect -exact \"\$ \"; sleep .1; send -s -- \"su - me -c 'mkdir -p TARBALLS'\r\" | ||
170 | expect -exact \"\$ \"; sleep 2; send -s -- \"lftp -c 'open -p ${FTP_PORT} ${FTP_SERVER} && lcd TARBALLS && get1 impy-release-source_${date}.tar.gz'\r\" | ||
171 | expect -exact \"\$ \"; sleep .1; send -s -- \"su - me -c 'tar xzf TARBALLS/impy-release-source_${date}.tar.gz -C BUILD'\r\" | ||
172 | expect -exact \"\$ \"; sleep .1; send -s -- \"su - me -c 'ls -la BUILD'\r\" | ||
173 | expect -exact \"\$ \"; sleep .1; send -s -- \"su - me -c 'ls -la TARBALLS'\r\" | ||
174 | expect -exact \"\$ \"; sleep .1; send -s -- \"cd /home/me/BUILD/SOURCE\r\" | ||
175 | |||
176 | interact quit return; sleep .1; send -s -- \"\r\" | ||
177 | expect -exact \"\$ \"; sleep .1; send -s -- \"shutdown -s now\r\" | ||
178 | expect eof" | ||
179 | echo '' | ||
180 | sleep 10 | ||
181 | fi | ||
182 | |||
183 | |||
184 | if [ $do_mac -eq 1 ] | ||
185 | then | ||
186 | echo "No Mac support yet, coz I need a real Mac for that." | ||
187 | fi | ||