aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-03-25 07:32:43 +1000
committerDavid Walter Seikel2013-03-25 07:32:43 +1000
commit147dff6692ae7293f7e9057dd990388ed3125aec (patch)
tree25421fda0ab589806a5f7995c6dbb04f8579fd88
parentAdd docs about how to set up the build images. (diff)
downloadImpyReleaseBuilder-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.
-rwxr-xr-xBuildReleases.sh192
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
3PWD=$(pwd) 3# These control which ones get built.
4do_local=0
5do_linux64=1
6do_linux32=1
7do_windowsXP=0
8do_mac=0
9
10# Where to find suitable disk images for the various OS's.
11img_linux64=~/bin/ubuntu64_diff.qcow2
12img_linux32=~/bin/ubuntu32_diff.qcow2
13img_windowsXP=/media/sdb2/IMAGES/xp_diff.qcow2
14
4 15
5unique_port() 16unique_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
39fi 50fi
40 51
41echo "Creating source tarball."
42tar czf TARBALLS/impy-release-source_${date}.tar.gz --exclude-vcs SOURCE &&
43
44 52
45echo "Building locally, assuming 64 bit, linux." && 53echo "Creating source tarball."
46rm -fr BUILD && 54tar czf TARBALLS/impy-release-source_${date}.tar.gz SOURCE &&
47mkdir BUILD &&
48tar xzf TARBALLS/impy-release-source_${date}.tar.gz -C BUILD &&
49cd BUILD/SOURCE &&
50cd 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 &&
56cd ../../indra/viewer-linux-* &&
57cp Imprudence-* ../../../../../TARBALLS
58cd ../../../../..
59 55
60 56
61FTP_PORT=$(unique_port) 57FTP_PORT=$(unique_port)
@@ -72,56 +68,120 @@ disown $(jobs -p)
72FTP_SERVER=10.0.2.2 68FTP_SERVER=10.0.2.2
73 69
74 70
75echo "Building in qemu, assuming 32 bit, linux." && 71if [ $do_local -eq 1 ]
76# Relies on the guest having this in /etc/init/ttyS0.conf - 72then
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 &&
82qemu -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 &&
84cd /home/builder && 80 ./1-get-libraries-from-SL &&
85rm -fr BUILD && 81 ./2-trim-libraries-from-SL &&
86mkdir BUILD && 82 ./3-compile-SL-source &&
87mkdir -p TARBALLS && 83 ./4-package-viewer &&
88sleep 2 && 84 cd ../../indra/viewer-linux-* &&
89busybox ftpget ${FTP_SERVER} -vP ${FTP_PORT} TARBALLS/impy-release-source_${date}.tar.gz impy-release-source_${date}.tar.gz && 85 cp Imprudence-* ../../../../../TARBALLS
90tar xzf TARBALLS/impy-release-source_${date}.tar.gz -C BUILD && 86 cd ../../../../..
91cd BUILD/SOURCE && 87fi
92cd linden/scripts/linux && 88
93./0-patch-SL-source && 89
94./1-get-libraries-from-SL && 90if [ $do_linux64 -eq 1 ]
95./2-trim-libraries-from-SL && 91then
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
98cd ../../indra/viewer-linux-* && 94 #
99cp Imprudence-* ../../../../../TARBALLS && 95 mkdir -p /home/builder &&
100cd /home/builder/TARBALLS && 96 cd /home/builder &&
101find . -name Imprudence-* -type f -exec busybox ftpput ${FTP_SERVER} -vP ${FTP_PORT} '{}' '{}' \; 97 rm -fr BUILD &&
102 98 rm -fr TARBALLS &&
103shutdown -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
104zzzzEOFzzzz 118zzzzEOFzzzz
119 sleep 10
120fi
121
105 122
106sleep 10 123if [ $do_linux32 -eq 1 ]
107 124then
108echo "Building in qemu, Windows XP." 125 echo "Building in qemu, 32 bit linux." &&
109expect -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
110set timeout -1 127 #
111set send_slow {1 .1} 128 mkdir -p /home/builder &&
112spawn 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 &&
113match_max 100000 130 rm -fr BUILD &&
114expect -exact "\$ "; sleep .1; send -s -- "cd /home/me\r" 131 rm -fr TARBALLS &&
115expect -exact "\$ "; sleep .1; send -s -- "rm -fr BUILD\r" 132 mkdir -p BUILD &&
116expect -exact "\$ "; sleep .1; send -s -- "su - me -c 'mkdir BUILD'\r" 133 mkdir -p TARBALLS &&
117expect -exact "\$ "; sleep .1; send -s -- "su - me -c 'mkdir -p TARBALLS'\r" 134 sleep 2 &&
118expect -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 &&
119expect -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 &&
120expect -exact "\$ "; sleep .1; send -s -- "su - me -c 'ls -la BUILD'\r" 137 cd BUILD/SOURCE &&
121expect -exact "\$ "; sleep .1; send -s -- "su - me -c 'ls -la TARBALLS'\r" 138 cd linden/scripts/linux &&
122 139 ./0-patch-SL-source &&
123expect -exact "\$ "; sleep .1; send -s -- "shutdown -s now\r" 140 ./1-get-libraries-from-SL &&
124expect 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
125zzzzEOFzzzz 150zzzzEOFzzzz
151 sleep 10
152fi
126 153
127 154
155if [ $do_windowsXP -eq 1 ]
156then
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
181fi
182
183
184if [ $do_mac -eq 1 ]
185then
186 echo "No Mac support yet, coz I need a real Mac for that."
187fi