Ticket #9752: tor-browser-bundle-lxc-patch.txt

File tor-browser-bundle-lxc-patch.txt, 1.5 KB (added by mcs, 6 years ago)

proposed fix (set LXC_ARCH and LXC_SUITE when using LXC)

Line 
1diff --git a/gitian/make-vms.sh b/gitian/make-vms.sh
2index d5615a6..f27985c 100755
3--- a/gitian/make-vms.sh
4+++ b/gitian/make-vms.sh
5@@ -24,26 +24,28 @@ build_and_test_vm() {
6   local dist="$1"; shift
7   local arch="$1"; shift
8   local bits="$1"; shift
9 
10   if [ ! -f ./base-$dist-$arch.qcow2 ];
11   then
12     if [ "z$USE_LXC" = "z1" ];
13     then
14+      export LXC_ARCH=$arch LXC_SUITE=$dist
15       ./bin/make-base-vm --suite $dist --lxc --arch $arch
16     else
17       ./bin/make-base-vm --suite $dist --arch $arch
18     fi
19   
20     make-clean-vm --suite $dist --arch $arch
21     if [ $? -ne 0 ];
22     then
23         echo "$arch $dist VM creation failed"
24-        exit 1
25+# TODO: should the following line be an exit or a return?
26+        return 1
27     fi
28 
29     stop-target $bits $dist
30     start-target $bits $dist-$arch &
31     for i in 1 2 3
32     do
33       sleep 2
34       on-target /bin/true && break
35diff --git a/gitian/mkbundle-linux.sh b/gitian/mkbundle-linux.sh
36index d421231..1a5dd8e 100755
37--- a/gitian/mkbundle-linux.sh
38+++ b/gitian/mkbundle-linux.sh
39@@ -16,16 +16,20 @@ then
40 fi
41 
42 if [ -z "$NUM_PROCS" ];
43 then
44   export NUM_PROCS=2
45 fi
46 
47 ./make-vms.sh
48+if [ $? -ne 0 ]; then
49+  echo "make-vms failed."
50+  exit 1
51+fi
52 
53 cd $GITIAN_DIR
54 export PATH=$PATH:$PWD/libexec
55 
56 echo "pref(\"torbrowser.version\", \"$TORBROWSER_VERSION-Linux\");" > $GITIAN_DIR/inputs/torbrowser.version
57 echo "$TORBROWSER_VERSION" > $GITIAN_DIR/inputs/bare-version
58 
59 cp $WRAPPER_DIR/build-helpers/* $GITIAN_DIR/inputs/