Browse Source

Merge pull request #968 from hamiltont/aspnet

Mono: Apply multiple fixes to make tests build and run
Hamilton Turner 10 years ago
parent
commit
1f15fbdd96

+ 6 - 0
deployment/vagrant-virtualbox/README.md

@@ -30,3 +30,9 @@ initial state each time to avoid interference.
 automatically build and inject the correct version of Oracle's Guest 
 automatically build and inject the correct version of Oracle's Guest 
 Additions for the VM you are running. It's helpful for avoiding annoying 
 Additions for the VM you are running. It's helpful for avoiding annoying 
 errors like "host additions are 4.3.10 but guest is 4.3.18"
 errors like "host additions are 4.3.10 but guest is 4.3.18"
+
+**Use SSH Port Forwarding To Access Web Servers Inside Vagrant**
+
+Use `vagrant ssh -- -L 9001:127.0.0.1:9001` to make `localhost:9001` 
+on your host OS connect you to `127.0.0.1:9001` inside the Vagrant 
+VM

+ 37 - 0
frameworks/C#/README.md

@@ -0,0 +1,37 @@
+# Limited Travis-CI Verification 
+
+Because the verification system uses the linux-only Travis-CI
+service, verifying Windows-only tests has to be done manually
+and is very time consuming. 
+
+Consider including an additional test, likely based on Mono and 
+FastCGI (e.g. xsp), that can run on Linux when submitting a new
+framework. This will drastically speed up our ability to merge
+in your pull request. 
+
+# Different Mono Versions
+
+While we have not currently run into the need to have multiple 
+simultaneous Mono installations, it is [possible](http://www.mono-project.com/docs/compiling-mono/parallel-mono-environments/)
+
+# Debugging Mono + NuGet
+
+Mono understands an environment variable `MONO_LOG_LEVEL=debug` that is helpful for checking that 
+mono is properly working e.g. loading necessary DLL's. 
+
+Most NuGet commands understand a `-Verbosity` flag, which is great because the error messages can be completely
+mystifying when working with Mono too. Use this would enable all the debugging you can: 
+
+    $ MONO_LOG_LEVEL=debug mono NuGet2.exe update -Verbosity "detailed" -self
+
+For example, aspnet was constantly failing with this message: 
+    
+    Could not connect to the feed specified at 'https://www.nuget.org/api/v2/'. Please verify that the package source (located in the Package Manager Settings) is valid and ensure your network connectivity.`. 
+
+Using `-Verbosity "detailed"` shows that the real error is actually a Mono library problem, as so: 
+
+    System.InvalidOperationException: Could not connect to the feed specified at 'https://www.nuget.org/api/v2/'. Please verify that the package source (located in the Package Manager Settings) is valid and ensure your network connectivity. ---> System.Net.WebException: libMonoPosixHelper.so ---> System.DllNotFoundException: libMonoPosixHelper.so
+      at (wrapper managed-to-native) System.IO.Compression.DeflateStreamNative:CreateZStream (System.IO.Compression.CompressionMode,bool,System.IO.Compression.DeflateStreamNative/UnmanagedReadOrWrite,intptr)
+      <snip>
+
+More helpful info is [here](http://www.mono-project.com/docs/advanced/pinvoke/dllnotfoundexception/), [here](http://docs.nuget.org/docs/reference/command-line-reference)

+ 8 - 0
frameworks/C#/aspnet/bash_profile.sh

@@ -0,0 +1,8 @@
+#!/bin/bash
+
+export MONO_ROOT=${IROOT}/mono-3.6.0-install
+
+export PATH="$MONO_ROOT/bin:$PATH"
+
+# Needed to find Mono's shared libraries
+export LD_LIBRARY_PATH="$MONO_ROOT/lib"

+ 2 - 0
frameworks/C#/aspnet/benchmark_config

@@ -260,6 +260,8 @@
     },
     },
     "mono-mysql-raw": {
     "mono-mysql-raw": {
       "setup_file": "setup_nginx",
       "setup_file": "setup_nginx",
+      "json_url": "/json/default",
+      "plaintext_url": "/plaintext",
       "db_url": "/ado/mysql",
       "db_url": "/ado/mysql",
       "query_url": "/ado/mysql?queries=",
       "query_url": "/ado/mysql?queries=",
       "fortune_url": "/ado/mysql/fortunes",
       "fortune_url": "/ado/mysql/fortunes",

+ 1 - 1
frameworks/C#/aspnet/install.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 #!/bin/bash
 
 
-fw_depends mono
+fw_depends nginx mono xsp

+ 22 - 25
frameworks/C#/aspnet/setup_nginx.py

@@ -3,46 +3,43 @@ import sys
 import setup_util
 import setup_util
 import os
 import os
 
 
-root = os.getcwd() + "/aspnet"
-app = root + "/src"
-
 def start(args, logfile, errfile):
 def start(args, logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 1
     return 1
   
   
-  setup_util.replace_text(app + "/Web.config", "localhost", args.database_host)
+  setup_util.replace_text("aspnet/src/Web.config", "localhost", args.database_host)
 
 
-  try:
-    # build
-    subprocess.check_call("rm -rf bin obj", shell=True, cwd=app, stderr=errfile, stdout=logfile)
-    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R $USER:$USER /usr/local/etc/mono", shell=True, stderr=errfile, stdout=logfile)
-    
-    # nginx
-    workers = 'worker_processes ' + str(args.max_threads) + ';'
-    subprocess.check_call('echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > ' + root + '/nginx.upstream.conf', shell=True, stderr=errfile, stdout=logfile);
-    subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' + root + '/nginx.conf -g "' + workers + '"', shell=True, stderr=errfile, stdout=logfile)
-    
-    # fastcgi
-    for port in range(9001, 9001 + args.max_threads):
-      subprocess.Popen("MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 /applications=/:. /socket=tcp:127.0.0.1:" + str(port) + " &", shell=True, cwd=app, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
+  # build
+  subprocess.check_call("rm -rf bin obj", shell=True, cwd="aspnet", stderr=errfile, stdout=logfile)
+  subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd="aspnet/src", stderr=errfile, stdout=logfile)
+  subprocess.check_call("sudo chown -R $USER:$USER $MONO_ROOT", shell=True, stderr=errfile, stdout=logfile)
+  
+  # nginx
+  workers = 'worker_processes ' + str(args.max_threads) + ';'
+  logfile.write("Setting up workers as %s\n\n" % workers)
+  subprocess.check_call("echo Hello there", shell=True, stderr=errfile, stdout=logfile);
+  command = 'echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > $TROOT/nginx.upstream.conf'
+  logfile.write("Using command %s" % command)
+  subprocess.check_call(command, shell=True, stderr=errfile, stdout=logfile);
+  subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c $TROOT/nginx.conf -g "' + workers + '"', shell=True, stderr=errfile, stdout=logfile)
+  
+  # Start fastcgi for each thread
+  # To debug, use --printlog --verbose --loglevels=All
+  for port in range(9001, 9001 + args.max_threads):
+    subprocess.Popen("MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 --applications=/:%s/src --socket=tcp:127.0.0.1:%s " % (args.directory, port), shell=True, cwd="aspnet", stderr=errfile, stdout=logfile)
 
 
 def stop(logfile, errfile):
 def stop(logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 0
     return 0
   
   
-  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + root + "/nginx.conf -s stop", shell=True, stderr=errfile, stdout=logfile)
-  subprocess.check_call("rm -f " + root + "/nginx.upstream.conf", shell=True, stderr=errfile, stdout=logfile)
+  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/nginx.conf -s stop", shell=True, stderr=errfile, stdout=logfile)
+  subprocess.check_call("rm -f $TROOT/nginx.upstream.conf", shell=True, stderr=errfile, stdout=logfile)
   #
   #
   # stop mono
   # stop mono
   #
   #
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   out, err = p.communicate()
   for line in out.splitlines():
   for line in out.splitlines():
-    if 'mono-server' in line:
+    if 'mono-server' in line and not 'run-ci' in line and not 'run-tests' in line:
       pid = int(line.split(None, 2)[1])
       pid = int(line.split(None, 2)[1])
       os.kill(pid, 15)
       os.kill(pid, 15)
-  return 0

+ 1 - 1
frameworks/C#/aspnet/src/Benchmarks.AspNet.csproj

@@ -91,7 +91,7 @@
     </Reference>
     </Reference>
     <Reference Include="MySql">
     <Reference Include="MySql">
       <Private>True</Private>
       <Private>True</Private>
-      <HintPath>..\lib\MySql.Data.Entities.6.8.3\lib\net45\mysql.data.entity.EF6.dll</HintPath>
+      <HintPath>..\lib\MySql.Data.Entities.6.8.3.0\lib\net45\mysql.data.entity.EF6.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="Npgsql">
     <Reference Include="Npgsql">
       <Private>True</Private>
       <Private>True</Private>

+ 3 - 3
frameworks/C#/aspnet/src/Controllers/JsonController.cs

@@ -8,17 +8,17 @@ namespace Benchmarks.AspNet.Controllers
     {
     {
         public ActionResult Default()
         public ActionResult Default()
         {
         {
-            return new JsonResult { Data = new { message = "Hello World" } };
+            return new JsonResult { Data = new { message = "Hello, World!" } };
         }
         }
 
 
         public ActionResult JsonNet()
         public ActionResult JsonNet()
         {
         {
-            return new JsonNetResult { Data = new { message = "Hello World" } };
+            return new JsonNetResult { Data = new { message = "Hello, World!" } };
         }
         }
 
 
         public ActionResult ServiceStack()
         public ActionResult ServiceStack()
         {
         {
-            return new ServiceStackResult { Data = new { message = "Hello World" } };
+            return new ServiceStackResult { Data = new { message = "Hello, World!" } };
         }
         }
     }
     }
 
 

+ 8 - 0
frameworks/C#/evhttp-sharp/bash_profile.sh

@@ -0,0 +1,8 @@
+#!/bin/bash
+
+export MONO_ROOT=${IROOT}/mono-3.6.0-install
+
+export PATH="$MONO_ROOT/bin:$PATH"
+
+# Needed to find Mono's shared libraries
+export LD_LIBRARY_PATH="$MONO_ROOT/lib"

+ 13 - 13
frameworks/C#/evhttp-sharp/setup.py

@@ -3,26 +3,26 @@ import sys
 import setup_util
 import setup_util
 import os
 import os
 
 
-
 def start(args, logfile, errfile):
 def start(args, logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 1
     return 1
   
   
-  app = args.troot + "/src"
-
-  try:
-    # build
-    subprocess.check_call("rm -rf bin obj", shell=True, cwd=app, stdout=logfile, stderr=errfile)
-    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app, stdout=logfile, stderr=errfile)
-    os.environ['MONO_GC_PARAMS']="nursery-size=64m"
-    subprocess.Popen("mono -O=all bin/Release/EvHttpSharpBenchmark.exe 127.0.0.1 8085 " + str(args.max_threads) + " &", shell=True, cwd=app, stdout=logfile, stderr=errfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
+  # build
+  subprocess.check_call("rm -rf bin obj", shell=True, cwd="evhttp-sharp", stdout=logfile, stderr=errfile)
+  subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd="evhttp-sharp/src", stdout=logfile, stderr=errfile)
+  os.environ['MONO_GC_PARAMS']="nursery-size=64m"
+  subprocess.Popen("mono -O=all $TROOT/src/bin/Release/EvHttpSharpBenchmark.exe 127.0.0.1 8085 " + str(args.max_threads), shell=True, cwd="evhttp-sharp", stdout=logfile, stderr=errfile)
 
 
 def stop(logfile, errfile):
 def stop(logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 0
     return 0
   
   
-  subprocess.check_call("pkill -9 mono", shell=True)
+  # stop mono
+  p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
+  out, err = p.communicate()
+  for line in out.splitlines():
+    if 'mono' in line and not 'run-ci' in line and not 'run-tests' in line:
+      pid = int(line.split(None, 2)[1])
+      os.kill(pid, 15)
+
   return 0
   return 0

+ 8 - 0
frameworks/C#/nancy/bash_profile.sh

@@ -0,0 +1,8 @@
+#!/bin/bash
+
+export MONO_ROOT=${IROOT}/mono-3.6.0-install
+
+export PATH="$MONO_ROOT/bin:$PATH"
+
+# Needed to find Mono's shared libraries
+export LD_LIBRARY_PATH="$MONO_ROOT/lib"

+ 1 - 1
frameworks/C#/nancy/install.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 #!/bin/bash
 
 
-fw_depends nginx xsp
+fw_depends nginx xsp mono

+ 17 - 24
frameworks/C#/nancy/setup_nginx.py

@@ -3,45 +3,38 @@ import sys
 import setup_util
 import setup_util
 import os
 import os
 
 
-root = os.getcwd() + "/nancy"
-app = root + "/src"
-
 def start(args, logfile, errfile):
 def start(args, logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 1
     return 1
   
   
-  setup_util.replace_text(app + "/Web.config", "localhost", args.database_host)
+  setup_util.replace_text("nancy/src/Web.config", "localhost", args.database_host)
 
 
-  try:
-    # build
-    subprocess.check_call("rm -rf bin obj", shell=True, cwd=app, stderr=errfile, stdout=logfile)
-    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app, stderr=errfile, stdout=logfile)
-    
-    # nginx
-    workers = 'worker_processes ' + str(args.max_threads) + ';'
-    subprocess.check_call('echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > ' + root + '/nginx.upstream.conf', shell=True, stderr=errfile, stdout=logfile);
-    subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' + root + '/nginx.conf -g "' + workers + '"', shell=True, stderr=errfile, stdout=logfile)
-    
-    # fastcgi
-    for port in range(9001, 9001 + args.max_threads):
-      subprocess.Popen("MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 /applications=/:. /socket=tcp:127.0.0.1:" + str(port) + " &", shell=True, cwd=app, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
+  # build
+  subprocess.check_call("rm -rf bin obj", shell=True, cwd="nancy", stderr=errfile, stdout=logfile)
+  subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd="nancy/src", stderr=errfile, stdout=logfile)
+  
+  # nginx
+  workers = 'worker_processes ' + str(args.max_threads) + ';'
+  subprocess.check_call('echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > $TROOT/nginx.upstream.conf', shell=True, stderr=errfile, stdout=logfile);
+  subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c $TROOT/nginx.conf -g "' + workers + '"', shell=True, stderr=errfile, stdout=logfile)
+  
+  # Start fastcgi for each thread
+  # To debug, use --printlog --verbose --loglevels=All
+  for port in range(9001, 9001 + args.max_threads):
+    subprocess.Popen("MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 --applications=/:%s/src --socket=tcp:127.0.0.1:%s " % (args.directory, port), shell=True, cwd="nancy", stderr=errfile, stdout=logfile)
 
 
 def stop(logfile, errfile):
 def stop(logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 0
     return 0
   
   
-  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + root + "/nginx.conf -s stop", shell=True, stderr=errfile, stdout=logfile)
-  subprocess.check_call("rm -f " + root + "/nginx.upstream.conf", shell=True, stderr=errfile, stdout=logfile)
+  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/nginx.conf -s stop", shell=True, stderr=errfile, stdout=logfile)
+  subprocess.check_call("rm -f $TROOT/nginx.upstream.conf", shell=True, stderr=errfile, stdout=logfile)
   #
   #
   # stop mono
   # stop mono
   #
   #
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   out, err = p.communicate()
   for line in out.splitlines():
   for line in out.splitlines():
-    if 'mono-server' in line:
+    if 'mono-server' in line and not 'run-ci' in line and not 'run-tests' in line:
       pid = int(line.split(None, 2)[1])
       pid = int(line.split(None, 2)[1])
       os.kill(pid, 15)
       os.kill(pid, 15)
-  return 0

+ 8 - 0
frameworks/C#/servicestack/bash_profile.sh

@@ -0,0 +1,8 @@
+#!/bin/bash
+
+export MONO_ROOT=${IROOT}/mono-3.6.0-install
+
+export PATH="$MONO_ROOT/bin:$PATH"
+
+# Needed to find Mono's shared libraries
+export LD_LIBRARY_PATH="$MONO_ROOT/lib"

+ 1 - 1
frameworks/C#/servicestack/install.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 #!/bin/bash
 
 
-fw_depends nginx xsp 
+fw_depends nginx xsp mono

+ 20 - 34
frameworks/C#/servicestack/setup_nginx.py

@@ -3,54 +3,40 @@ import sys
 import setup_util
 import setup_util
 import os
 import os
 
 
-root = os.getcwd() + "/servicestack"
-app = root + "/src"
-
 def start(args, logfile, errfile):
 def start(args, logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 1
     return 1
   
   
-  setup_util.replace_text(app + "/Web.config", "localhost", args.database_host)
+  setup_util.replace_text("servicestack/src/Web.config", "localhost", args.database_host)
 
 
-  try:
-    # build
-    subprocess.check_call("rm -rf bin obj", shell=True, cwd=app, stderr=errfile, stdout=logfile)
-    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app, stderr=errfile, stdout=logfile)
-    subprocess.check_call("sudo chown -R $USER:$USER /usr/local/etc/mono", shell=True, stderr=errfile, stdout=logfile)
-    
-    # nginx
-    workers = 'worker_processes ' + str(args.max_threads) + ';'
-    subprocess.check_call('echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > ' + root + '/nginx.upstream.conf', shell=True, stderr=errfile, stdout=logfile);
-    subprocess.check_call('/usr/local/nginx/sbin/nginx -c ' + root + '/nginx.conf -g "' + workers + '"', shell=True, stderr=errfile, stdout=logfile)
-    
-    # fastcgi
-    for port in range(9001, 9001 + args.max_threads):
-      subprocess.Popen("MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 /applications=/:. /socket=tcp:127.0.0.1:" + str(port) + " &", shell=True, cwd=app, stderr=errfile, stdout=logfile)
-    return 0
-  except subprocess.CalledProcessError:
-    return 1
+  # build
+  subprocess.check_call("rm -rf bin obj", shell=True, cwd="servicestack", stderr=errfile, stdout=logfile)
+  subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd="servicestack/src", stderr=errfile, stdout=logfile)
+  subprocess.check_call("sudo chown -R $USER:$USER $MONO_ROOT", shell=True, stderr=errfile, stdout=logfile)
+  
+  # nginx
+  workers = 'worker_processes ' + str(args.max_threads) + ';'
+  subprocess.check_call('echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > $TROOT/nginx.upstream.conf', shell=True, stderr=errfile, stdout=logfile);
+  subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c $TROOT/nginx.conf -g "' + workers + '"', shell=True, stderr=errfile, stdout=logfile)
+  
+  # Start fastcgi for each thread
+  # To debug, use --printlog --verbose --loglevels=All
+  for port in range(9001, 9001 + args.max_threads):
+    # subprocess.Popen("MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 /applications=/:. /socket=tcp:127.0.0.1:" + str(port) + " &", shell=True, cwd=app, stderr=errfile, stdout=logfile)
+    subprocess.Popen("MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 --applications=/:%s/src --socket=tcp:127.0.0.1:%s " % (args.directory, port), shell=True, cwd="servicestack", stderr=errfile, stdout=logfile)
 
 
 def stop(logfile, errfile):
 def stop(logfile, errfile):
   if os.name == 'nt':
   if os.name == 'nt':
     return 0
     return 0
   
   
-  #
+  # stop nginx
+  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c $TROOT/nginx.conf -s stop", shell=True, stderr=errfile, stdout=logfile)
+
   # stop mono
   # stop mono
-  #
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
   out, err = p.communicate()
   out, err = p.communicate()
   for line in out.splitlines():
   for line in out.splitlines():
-    if 'mono-server' in line:
-      pid = int(line.split(None, 2)[1])
-      os.kill(pid, 15)
-
-  #
-  # stop nginx
-  #
-  p2 = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
-  out, err = p2.communicate()
-  for line in out.splitlines():
-    if 'nginx: master' in line:
+    if 'mono-server' in line and not 'run-ci' in line and not 'run-tests' in line:
       pid = int(line.split(None, 2)[1])
       pid = int(line.split(None, 2)[1])
       os.kill(pid, 15)
       os.kill(pid, 15)
 
 

+ 24 - 10
toolset/setup/linux/languages/mono.sh

@@ -1,22 +1,36 @@
 #!/bin/bash
 #!/bin/bash
 
 
+set -x
 
 
-RETCODE=$(fw_exists mono-3.2.8.installed)
+RETCODE=$(fw_exists mono.installed)
 [ ! "$RETCODE" == 0 ] || { \
 [ ! "$RETCODE" == 0 ] || { \
   echo "Installing RootCAs from Mozilla..."; 
   echo "Installing RootCAs from Mozilla..."; 
   mozroots --import --sync;
   mozroots --import --sync;
+  echo "ROOT: Installing RootCAs from Mozilla..."; 
+  sudo $IROOT/mono-3.6.0-install/bin/mozroots --import --sync;
   return 0; }
   return 0; }
 
 
-fw_get http://download.mono-project.com/sources/mono/mono-3.2.8.tar.bz2 -O mono-3.2.8.tar.bz2
-fw_untar mono-3.2.8.tar.bz2
-cd mono-3.2.8 
-./configure --disable-nls --prefix=/usr/local
-make get-monolite-latest
-make -j4 EXTERNAL_MCS=${PWD}/mcs/class/lib/monolite/basic.exe
-sudo make install
+sudo apt-get install -y build-essential \
+             autoconf \
+             automake \
+             libtool \
+             zlib1g-dev \
+             pkg-config \
+             gettext
+
+fw_get http://download.mono-project.com/sources/mono/mono-3.6.0.tar.bz2 -O mono-3.6.0.tar.bz2
+fw_untar mono-3.6.0.tar.bz2
+
+cd mono-3.6.0
+./autogen.sh --prefix=$IROOT/mono-3.6.0-install
+# make -j4 EXTERNAL_MCS=${PWD}/mcs/class/lib/monolite/basic.exe
+make -j4
+make install
 
 
-sudo apt-get -y install mono-devel
 echo "Installing RootCAs from Mozilla..."; 
 echo "Installing RootCAs from Mozilla..."; 
 mozroots --import --sync;
 mozroots --import --sync;
 
 
-touch mono-3.2.8.installed
+echo "ROOT: Installing RootCAs from Mozilla..."; 
+sudo $IROOT/mono-3.6.0-install/bin/mozroots --import --sync;
+
+touch $IROOT/mono.installed

+ 8 - 4
toolset/setup/linux/languages/xsp.sh

@@ -1,12 +1,16 @@
 #!/bin/bash
 #!/bin/bash
 
 
-RETCODE=$(fw_exists xsp)
+RETCODE=$(fw_exists xsp.installed)
 [ ! "$RETCODE" == 0 ] || { return 0; }
 [ ! "$RETCODE" == 0 ] || { return 0; }
 
 
 fw_depends mono
 fw_depends mono
-git clone --depth 1 git://github.com/mono/xsp
+git clone git://github.com/mono/xsp
 cd xsp
 cd xsp
 git checkout 8a31bc625727594d42f94173768bee5cf8afd0a4
 git checkout 8a31bc625727594d42f94173768bee5cf8afd0a4
-./autogen.sh --prefix=/usr/local
+
+export PKG_CONFIG_PATH=$IROOT/mono-3.6.0-install/lib/pkgconfig
+./autogen.sh --prefix=$IROOT/mono-3.6.0-install
 make
 make
-sudo make install
+make install
+
+touch $IROOT/xsp.installed