diff --git a/.mailmap b/.mailmap old mode 100644 new mode 100755 index a44bd753915..272ae70bf29 --- a/.mailmap +++ b/.mailmap @@ -3,17 +3,27 @@ Adam Chlipala Alex Schneider Alexander Schneider Alex Schneider Alexander Schneider +Aoyama Kazuharu AOYAMA Kazuharu +Aoyama Kazuharu AOYAMA Kazuharu + +Brian Clozel Brian Clozel + Christian Knuth Donovan Muller donovanmuller Eduardo Silva +Finn Bock bckfnn + Gerard Roche Gjero Krsteski gjerokrsteski Gjero Krsteski g.krsteski +Haley Young haleyyoung +Haley Young haleyyoung + INADA Naoki INADA Naoki @@ -23,7 +33,8 @@ Juan José Aguililla jamming kares -Lari Hotari +Lari Hotari Lari Hotari +Lari Hotari Lari Hotari Leandro Pereira @@ -41,6 +52,7 @@ mcocciaTE mcoccia Mike Smith Mike Smith Mike Smith msmith-techempower +Mike Smith msmith Raphael Andre Bauer reyez @@ -50,6 +62,10 @@ Stefan Geneshky Stefan G Stefano Casazza stefanocasazza Stefano Casazza stefanocasazza +Stefano Casazza stefano casazza + +Shengjun Yu shengjun yu +Shengjun Yu yushengjun Skamander sksamuel diff --git a/.travis.yml b/.travis.yml index 1a0456e0c96..9c2b2af0724 100644 --- a/.travis.yml +++ b/.travis.yml @@ -165,4 +165,3 @@ install: script: # Pick one test in this directory and verify - time ./toolset/run-ci.py verify "$TESTDIR" - diff --git a/deployment/vagrant-common/bootstrap.sh b/deployment/vagrant-common/bootstrap.sh index f7934f6d8c6..52b30a633ec 100755 --- a/deployment/vagrant-common/bootstrap.sh +++ b/deployment/vagrant-common/bootstrap.sh @@ -106,8 +106,17 @@ if [ ! -e "~/.firstboot" ]; then # If they didn't sync, we need to clone it if [ -d "/FrameworkBenchmarks" ]; then ln -s /FrameworkBenchmarks $FWROOT - echo "Removing installs/ and results/ folders so they do not interfere" + echo "Removing your current results folder to avoid interference" rm -rf $FWROOT/installs $FWROOT/results + + # vboxfs does not support chown or chmod, which we need. + # We therefore bind-mount a normal linux directory so we can + # use these operations. This enables us to + # use `chown -R testrunner:testrunner $FWROOT/installs` later + echo "Mounting over your installs folder" + mkdir -p /tmp/TFB_installs + mkdir -p /FrameworkBenchmarks/installs + sudo mount -o bind /tmp/TFB_installs $FWROOT/installs else # If there is no synced folder, clone the project echo "Cloning project from $GH_REPO $GH_BRANCH" diff --git a/deployment/vagrant-common/core.rb b/deployment/vagrant-common/core.rb index 1a741309147..43408589f8b 100644 --- a/deployment/vagrant-common/core.rb +++ b/deployment/vagrant-common/core.rb @@ -98,8 +98,19 @@ def provider_virtualbox(config, role, ip_address='172.16.0.16') vb.memory = ENV.fetch('TFB_VB_MEM', 3022) vb.cpus = ENV.fetch('TFB_VB_CPU', 2) - # mount_options addresses issue mitchellh/vagrant#4997 - override.vm.synced_folder "../..", "/FrameworkBenchmarks", mount_options: ['fmode=777', 'dmode=777'] + # The VirtualBox file system for shared folders (vboxfs) + # does not support posix's chown/chmod - these can only + # be set at mount time, and they are uniform for the entire + # shared directory. We require chown, because we have the + # testrunner user account, so this is a problem. To mitigate + # the effects, we set the folders and files to 777 permissions. + # Even though we cannot chown them to testrunner, with 777 and + # owner vagrant *most* of the software works ok. Occasional + # issues are still possible. + # + # See mitchellh/vagrant#4997 + # See http://superuser.com/a/640028/136050 + override.vm.synced_folder "../..", "/FrameworkBenchmarks", :mount_options => ["dmode=777", "fmode=777"] if role.eql? "all" or role.eql? "app" override.vm.network :forwarded_port, guest: 8080, host: 28080 diff --git a/frameworks/CSharp/aspnet/.gitignore b/frameworks/CSharp/aspnet/.gitignore index b9965942aae..d8379475bd3 100644 --- a/frameworks/CSharp/aspnet/.gitignore +++ b/frameworks/CSharp/aspnet/.gitignore @@ -2,5 +2,5 @@ *.suo */bin/* */obj/* -lib/* -!lib/.nuget +*/packages/* +nginx.upstream.conf diff --git a/frameworks/CSharp/aspnet/README.md b/frameworks/CSharp/aspnet/README.md index d5a91ef5a8b..538ef883843 100644 --- a/frameworks/CSharp/aspnet/README.md +++ b/frameworks/CSharp/aspnet/README.md @@ -18,7 +18,7 @@ **Platforms** * .NET Framework 4.5 (Windows) -* Mono 3.2.8 (Linux) +* Mono 3.99.0 (Linux) **Web Servers** @@ -29,37 +29,16 @@ **Web Stack** * ASP.NET 4.5 -* ASP.NET MVC Framework 5.1.0 +* ASP.NET MVC Framework 5.2.2 +* ASP.NET Razor 3.2.2 **Databases** -* MySQL Connector/Net 6.8.3 -* Npgsql 2.0.14.3 -* Entity Framework 6.0.2 -* Mongo C# Driver 1.8.3 +* MySQL Connector/Net 6.9.5 +* Npgsql 2.2.3 +* Entity Framework 6.1.1 +* Mongo C# Driver 1.9.2 **Developer Tools** * Visual Studio 2012 - -## Mono Installation - - sudo apt-get install git-core build-essential autoconf automake libtool zlib1g-dev pkg-config gettext - - git clone git://github.com/mono/mono - cd mono - git checkout mono-3.2.8 - ./autogen.sh --prefix=/usr/local - make get-monolite-latest - make EXTERNAL_MCS=${PWD}/mcs/class/lib/monolite/gmcs.exe - sudo make install - - cd .. - - git clone git://github.com/mono/xsp - cd xsp - ./autogen.sh --prefix=/usr/local - make - sudo make install - - mozroots --import --sync diff --git a/frameworks/CSharp/aspnet/bash_profile.sh b/frameworks/CSharp/aspnet/bash_profile.sh deleted file mode 100644 index 659caf695d2..00000000000 --- a/frameworks/CSharp/aspnet/bash_profile.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -export MONO_ROOT=${IROOT}/mono-3.6.0-install - -# Needed to find Mono's shared libraries -export LD_LIBRARY_PATH="$MONO_ROOT/lib" - -export NGINX_HOME=${IROOT}/nginx \ No newline at end of file diff --git a/frameworks/CSharp/aspnet/lib/.nuget/NuGet.exe b/frameworks/CSharp/aspnet/lib/.nuget/NuGet.exe deleted file mode 100644 index c296edf177f..00000000000 Binary files a/frameworks/CSharp/aspnet/lib/.nuget/NuGet.exe and /dev/null differ diff --git a/frameworks/CSharp/aspnet/lib/.nuget/NuGet.targets b/frameworks/CSharp/aspnet/lib/.nuget/NuGet.targets deleted file mode 100644 index bdcb71290f8..00000000000 --- a/frameworks/CSharp/aspnet/lib/.nuget/NuGet.targets +++ /dev/null @@ -1,135 +0,0 @@ - - - - $(MSBuildProjectDirectory)\..\ - - - false - - - false - - - false - - - true - - - - - - - - - - - $([System.IO.Path]::Combine($(SolutionDir), "..", "lib", ".nuget")) - $([System.IO.Path]::Combine($(ProjectDir), "..", "lib", "packages.config")) - $([System.IO.Path]::Combine($(SolutionDir), "..", "lib")) - - - - - $(SolutionDir)..\lib\.nuget - $(SolutionDir)..\lib\packages.config - $(SolutionDir)..\lib - - - - - $(NuGetToolsPath)\NuGet.exe - @(PackageSource) - - "$(NuGetExePath)" - mono $(NuGetExePath) - - $(TargetDir.Trim('\\')) - - -RequireConsent - -NonInteractive - - - $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -OutputDirectory "$(RepositoryPath)" - $(NuGetCommand) pack "$(ProjectPath)" -Properties Configuration=$(Configuration) $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols - - - - RestorePackages; - $(BuildDependsOn); - - - - - $(BuildDependsOn); - BuildPackage; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/frameworks/CSharp/aspnet/nginx.conf b/frameworks/CSharp/aspnet/nginx.conf index 183f0412685..1b856d3dc25 100644 --- a/frameworks/CSharp/aspnet/nginx.conf +++ b/frameworks/CSharp/aspnet/nginx.conf @@ -19,7 +19,23 @@ http { location / { fastcgi_pass mono; - include /usr/local/nginx/conf/fastcgi_params; + fastcgi_param QUERY_STRING $query_string; + fastcgi_param REQUEST_METHOD $request_method; + fastcgi_param CONTENT_TYPE $content_type; + fastcgi_param CONTENT_LENGTH $content_length; + fastcgi_param SCRIPT_NAME $fastcgi_script_name; + fastcgi_param REQUEST_URI $request_uri; + fastcgi_param DOCUMENT_URI $document_uri; + fastcgi_param DOCUMENT_ROOT $document_root; + fastcgi_param SERVER_PROTOCOL $server_protocol; + fastcgi_param HTTPS $https if_not_empty; + fastcgi_param GATEWAY_INTERFACE CGI/1.1; + fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; + fastcgi_param REMOTE_ADDR $remote_addr; + fastcgi_param REMOTE_PORT $remote_port; + fastcgi_param SERVER_ADDR $server_addr; + fastcgi_param SERVER_PORT $server_port; + fastcgi_param SERVER_NAME $server_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } } diff --git a/frameworks/CSharp/aspnet/setup_nginx.py b/frameworks/CSharp/aspnet/setup_nginx.py deleted file mode 100644 index fbb67cd1e33..00000000000 --- a/frameworks/CSharp/aspnet/setup_nginx.py +++ /dev/null @@ -1,45 +0,0 @@ -import subprocess -import sys -import setup_util -import os - -def start(args, logfile, errfile): - if os.name == 'nt': - return 1 - - setup_util.replace_text("aspnet/src/Web.config", "localhost", args.database_host) - - # 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): - if os.name == 'nt': - return 0 - - 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 - # - p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE) - out, err = p.communicate() - for line in out.splitlines(): - if 'mono-server' 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) diff --git a/frameworks/CSharp/aspnet/setup_nginx.sh b/frameworks/CSharp/aspnet/setup_nginx.sh index fa091ae36c1..763eff394e4 100755 --- a/frameworks/CSharp/aspnet/setup_nginx.sh +++ b/frameworks/CSharp/aspnet/setup_nginx.sh @@ -1,30 +1,37 @@ #!/bin/bash +set -e + +# mono environment variables +. ${IROOT}/mono.installed + +export NGINX_HOME=${IROOT}/nginx + sed -i 's|localhost|'"$DBHOST"'|g' src/Web.config -# build -rm -rf bin obj -cd src -$MONO_ROOT/bin/xbuild /p:Configuration=Release +# extra cleaning +rm -rf src/bin src/obj +rm -rf /tmp/nuget + +xbuild src/Benchmarks.build.proj /t:Clean +xbuild src/Benchmarks.build.proj /t:Build + +# one fastcgi instance for each thread +# load balanced by nginx +port_start=9001 +port_end=$(($port_start+$MAX_THREADS)) # nginx conf="upstream mono {\n" -current=9001 -end=$(($current+$MAX_THREADS)) -while [ $current -lt $end ]; do - conf+="\tserver 127.0.0.1:${current};\n" - let current=current+1 +for port in $(seq $port_start $port_end); do + conf+="\tserver 127.0.0.1:${port};\n" done conf+="}" echo -e $conf > $TROOT/nginx.upstream.conf -$NGINX_HOME/sbin/nginx -c $TROOT/nginx.conf -g "${MAX_THREADS}" +$NGINX_HOME/sbin/nginx -c $TROOT/nginx.conf -g "worker_processes ${MAX_THREADS};" -# Start fastcgi for each thread # To debug, use --printlog --verbose --loglevels=All -current=9001 -end=$(($current+$MAX_THREADS)) -while [ $current -lt $end ]; do - MONO_OPTIONS=--gc=sgen fastcgi-mono-server4 --applications=/:$(pwd)/src --socket=tcp:127.0.0.1:$current - let current=current+1 +for port in $(seq $port_start $port_end); do + fastcgi-mono-server4 --applications=/:${TROOT}/src --socket=tcp:127.0.0.1:$port & done diff --git a/frameworks/CSharp/aspnet/setup_xsp.py b/frameworks/CSharp/aspnet/setup_xsp.py deleted file mode 100644 index 88d1cc38379..00000000000 --- a/frameworks/CSharp/aspnet/setup_xsp.py +++ /dev/null @@ -1,34 +0,0 @@ -import subprocess -import sys -import setup_util -import os - -def start(args, logfile, errfile): - if os.name == 'nt': - return 1 - - setup_util.replace_text("aspnet/src/Web.config", "localhost", args.database_host) - - try: - subprocess.check_call("rm -rf bin obj", shell=True, cwd="aspnet/src", 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 ubuntu:ubuntu /usr/local/etc/mono", shell=True, stderr=errfile, stdout=logfile) - subprocess.Popen("MONO_OPTIONS=--gc=sgen xsp4 --nonstop", shell=True, cwd="aspnet/src", stderr=errfile, stdout=logfile) - return 0 - except subprocess.CalledProcessError: - return 1 - -def stop(logfile, errfile): - if os.name == 'nt': - return 0 - - p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE) - out, err = p.communicate() - for line in out.splitlines(): - if 'xsp4' in line: - pid = int(line.split(None, 2)[1]) - try: - os.kill(pid, 15) - except OSError: - pass - return 0 \ No newline at end of file diff --git a/frameworks/CSharp/aspnet/src/Benchmarks.build.proj b/frameworks/CSharp/aspnet/src/Benchmarks.build.proj new file mode 100644 index 00000000000..f7f7815dd93 --- /dev/null +++ b/frameworks/CSharp/aspnet/src/Benchmarks.build.proj @@ -0,0 +1,56 @@ + + + + + $(MSBuildThisFileDirectory) + Release + packages/nuget.exe + packages/ + http://nuget.org/nuget.exe + "$(NuGetExe)" + mono --runtime=v4.0.30319 "$(NuGetExe)" + Configuration=$(Configuration);SolutionDir=$(SolutionDir) + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/frameworks/CSharp/aspnet/src/Benchmarks.AspNet.csproj b/frameworks/CSharp/aspnet/src/Benchmarks.csproj similarity index 70% rename from frameworks/CSharp/aspnet/src/Benchmarks.AspNet.csproj rename to frameworks/CSharp/aspnet/src/Benchmarks.csproj index c3636ae37da..13e96159d30 100644 --- a/frameworks/CSharp/aspnet/src/Benchmarks.AspNet.csproj +++ b/frameworks/CSharp/aspnet/src/Benchmarks.csproj @@ -45,69 +45,61 @@ True - ..\lib\Microsoft.AspNet.Mvc.5.1.0\lib\net45\System.Web.Mvc.dll - - - True - ..\lib\Microsoft.AspNet.WebPages.3.1.0\lib\net45\System.Web.Helpers.dll + $(SolutionDir)\packages\Microsoft.AspNet.Mvc.5.2.2\lib\net45\System.Web.Mvc.dll True - ..\lib\Microsoft.AspNet.Razor.3.1.0\lib\net45\System.Web.Razor.dll + $(SolutionDir)\packages\Microsoft.AspNet.Razor.3.2.2\lib\net45\System.Web.Razor.dll True - ..\lib\Microsoft.AspNet.WebPages.3.1.0\lib\net45\System.Web.WebPages.dll - - - True - ..\lib\Microsoft.AspNet.WebPages.3.1.0\lib\net45\System.Web.WebPages.Deployment.dll + $(SolutionDir)\packages\Microsoft.AspNet.WebPages.3.2.2\lib\net45\System.Web.WebPages.dll True - ..\lib\Microsoft.AspNet.WebPages.3.1.0\lib\net45\System.Web.WebPages.Razor.dll - - - True - ..\lib\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll + $(SolutionDir)\packages\Microsoft.AspNet.WebPages.3.2.2\lib\net45\System.Web.WebPages.Razor.dll - ..\lib\Newtonsoft.Json.5.0.8\lib\net45\Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.6.0.6\lib\net45\Newtonsoft.Json.dll - ..\lib\ServiceStack.Text.4.0.8\lib\net40\ServiceStack.Text.dll + $(SolutionDir)\packages\ServiceStack.Text.4.0.34\lib\net40\ServiceStack.Text.dll True - ..\lib\EntityFramework.6.0.2\lib\net45\EntityFramework.dll + $(SolutionDir)\packages\EntityFramework.6.1.1\lib\net45\EntityFramework.dll True - ..\lib\EntityFramework.6.0.2\lib\net45\EntityFramework.SqlServer.dll + $(SolutionDir)\packages\EntityFramework.6.1.1\lib\net45\EntityFramework.SqlServer.dll True - ..\lib\MySql.Data.6.8.3\lib\net45\MySql.Data.dll + $(SolutionDir)\packages\MySql.Data.6.9.5\lib\net45\MySql.Data.dll True - ..\lib\MySql.Data.Entities.6.8.3.0\lib\net45\mysql.data.entity.EF6.dll + $(SolutionDir)\packages\MySql.Data.Entity.6.9.5\lib\net45\MySql.Data.Entity.EF6.dll True - ..\lib\Npgsql.2.0.14.3\lib\net45\Npgsql.dll + $(SolutionDir)\packages\Npgsql.2.2.3\lib\net45\Npgsql.dll True - ..\lib\Npgsql.2.0.14.3\lib\net45\Mono.Security.dll + $(SolutionDir)\packages\Npgsql.EntityFramework.2.2.3\lib\net45\Npgsql.EntityFramework.dll + + + True + $(SolutionDir)\packages\Npgsql.2.2.3\lib\net45\Mono.Security.dll True - ..\lib\mongocsharpdriver.1.8.3\lib\net35\MongoDB.Bson.dll + $(SolutionDir)\packages\mongocsharpdriver.1.9.2\lib\net35\MongoDB.Bson.dll True - ..\lib\mongocsharpdriver.1.8.3\lib\net35\MongoDB.Driver.dll + $(SolutionDir)\packages\mongocsharpdriver.1.9.2\lib\net35\MongoDB.Driver.dll @@ -137,6 +129,11 @@ Designer + + + Designer + + @@ -147,8 +144,7 @@ - - + diff --git a/frameworks/CSharp/aspnet/src/Benchmarks.sln b/frameworks/CSharp/aspnet/src/Benchmarks.sln index 4fd1313a845..bc4859c504b 100644 --- a/frameworks/CSharp/aspnet/src/Benchmarks.sln +++ b/frameworks/CSharp/aspnet/src/Benchmarks.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Benchmarks.AspNet", "Benchmarks.AspNet.csproj", "{62C3DEA2-2696-4200-BD83-011679316847}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Benchmarks", "Benchmarks.csproj", "{62C3DEA2-2696-4200-BD83-011679316847}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/frameworks/CSharp/aspnet/src/Models/MongoDB.cs b/frameworks/CSharp/aspnet/src/Models/MongoDB.cs index 1a4b5c6962f..da6ad4829bc 100644 --- a/frameworks/CSharp/aspnet/src/Models/MongoDB.cs +++ b/frameworks/CSharp/aspnet/src/Models/MongoDB.cs @@ -48,6 +48,6 @@ public MongoDB(string connectionStringName) public class MongoWorld : World { [ScriptIgnore] - public ObjectId _id { get; set; } + public object _id { get; set; } } } \ No newline at end of file diff --git a/frameworks/CSharp/aspnet/src/Views/Fortunes.cshtml b/frameworks/CSharp/aspnet/src/Views/Fortunes.cshtml index 6609c777cab..7b157324b3b 100644 --- a/frameworks/CSharp/aspnet/src/Views/Fortunes.cshtml +++ b/frameworks/CSharp/aspnet/src/Views/Fortunes.cshtml @@ -3,7 +3,6 @@ - Fortunes diff --git a/frameworks/CSharp/aspnet/src/Views/Web.config b/frameworks/CSharp/aspnet/src/Views/Web.config index 8b370b617e2..28f6234d15e 100644 --- a/frameworks/CSharp/aspnet/src/Views/Web.config +++ b/frameworks/CSharp/aspnet/src/Views/Web.config @@ -1,13 +1,13 @@ - -
-
+ +
+
- + diff --git a/frameworks/CSharp/aspnet/src/Web.config b/frameworks/CSharp/aspnet/src/Web.config index 66a9221c9a6..36e8611b1c4 100644 --- a/frameworks/CSharp/aspnet/src/Web.config +++ b/frameworks/CSharp/aspnet/src/Web.config @@ -15,16 +15,16 @@ - - + + - - + + diff --git a/frameworks/CSharp/aspnet/src/packages.config b/frameworks/CSharp/aspnet/src/packages.config new file mode 100644 index 00000000000..feba05c45d0 --- /dev/null +++ b/frameworks/CSharp/aspnet/src/packages.config @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/toolset/run-ci.py b/toolset/run-ci.py index 2af1d7f5cfd..9dc2bc86cd4 100755 --- a/toolset/run-ci.py +++ b/toolset/run-ci.py @@ -437,7 +437,7 @@ def run_travis_setup(self): done nc -z localhost 27017 if [ $? -eq 0 ]; then - mongo < create.js + mongo < config/create.js mongod --version else >&2 echo "MongoDB did not start, skipping" diff --git a/toolset/setup/linux/bash_functions.sh b/toolset/setup/linux/bash_functions.sh index 0b838337f40..b056791a1de 100755 --- a/toolset/setup/linux/bash_functions.sh +++ b/toolset/setup/linux/bash_functions.sh @@ -38,6 +38,18 @@ fw_unzip() { rm -f "$@" } +# Download *.deb file and install into IROOT without using sudo +# Does not download dependant packages +# +# Example: fw_apt_to_iroot [] +fw_apt_to_iroot() { + DIR=${2:-$1} + echo "Downloading $1 to $IROOT" + apt-get download $1 + echo "Extracting $1 to $DIR" + dpkg-deb -x $1*.deb "$IROOT/$DIR" && rm $1*.deb +} + # Was there an error for the current dependency? FW_dep_error=0 # Have we seen any errors? diff --git a/toolset/setup/linux/languages/mono.sh b/toolset/setup/linux/languages/mono.sh index 2772021af22..8f60bf7e392 100644 --- a/toolset/setup/linux/languages/mono.sh +++ b/toolset/setup/linux/languages/mono.sh @@ -1,31 +1,56 @@ #!/bin/bash -set -x +set -ex -RETCODE=$(fw_exists ${IROOT}/mono.installed) +RETCODE=$(fw_exists $IROOT/mono.installed) [ ! "$RETCODE" == 0 ] || { \ echo "Installing RootCAs from Mozilla..."; - sudo $IROOT/mono-3.6.0-install/bin/mozroots --import --sync; + # Load environment variables + . $IROOT/mono.installed + mozroots --import --sync; return 0; } -sudo apt-get install -qqy build-essential \ - autoconf \ - automake \ - libtool \ - zlib1g-dev \ - pkg-config \ - gettext +# what do we want? latest mono +# how do we want it? already compiled from packages but without sudo apt-get +# See https://github.com/TechEmpower/FrameworkBenchmarks/pull/1287 -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 +# Add source for prepackaged binaries +sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF +echo "deb http://jenkins.mono-project.com/repo/debian sid main" | sudo tee /etc/apt/sources.list.d/mono-jenkins.list +sudo apt-get update -cd mono-3.6.0 -./autogen.sh --prefix=${IROOT}/mono-3.6.0-install -echo -n "Installing Mono" -make -j4 EXTERNAL_MCS=${IROOT}/mono-3.6.0/mcs/class/lib/monolite/basic.exe 2>&1 | tee $IROOT/mono-install.log | awk '{ if (NR%100 == 0) printf "."}' -make install 2>&1 | tee -a $IROOT/mono-install.log | awk '{ if (NR%100 == 0) printf "."}' +# Find the most recent snapshot +SNAPSHOT=$(apt-cache search 'mono-snapshot-.*-assemblies' | cut -d'-' -f3 | tail -1) -echo "Installing RootCAs from Mozilla..."; -sudo ${IROOT}/mono-3.6.0-install/bin/mozroots --import --sync; +# save environment -touch $IROOT/mono.installed +echo "export SNAPDATE=$SNAPSHOT" > $IROOT/mono.installing +cat >> $IROOT/mono.installing <<'END' +export MONO_HOME=$IROOT/mono-snapshot-$SNAPDATE +export MONO_PATH=$MONO_HOME/lib/mono/4.5 +export MONO_CFG_DIR=$MONO_HOME/etc +export PATH=$MONO_HOME/bin:$PATH +export LD_LIBRARY_PATH=$MONO_HOME/lib:$LD_LIBRARY_PATH +export PKG_CONFIG_PATH=$MONO_HOME/lib/pkgconfig:$PKG_CONFIG_PATH +END + +# load environment +. $IROOT/mono.installing + +# start fresh +rm -rf $MONO_HOME && mkdir -p $MONO_HOME + +# Download and extract debs +fw_apt_to_iroot mono-snapshot-$SNAPSHOT +fw_apt_to_iroot mono-snapshot-${SNAPSHOT}-assemblies mono-snapshot-$SNAPSHOT + +# Simplify paths +mv $MONO_HOME/opt/mono-*/* $MONO_HOME +file $MONO_HOME/bin/* | grep "POSIX shell script" | awk -F: '{print $1}' | xargs sed -i "s|/opt/mono-$SNAPDATE|$MONO_HOME|g" +sed -i "s|/opt/mono-$SNAPDATE|$MONO_HOME|g" $MONO_HOME/lib/pkgconfig/*.pc $MONO_HOME/etc/mono/config + +# import SSL certificates +mozroots --import --sync +#echo -e 'y\ny\ny\n' | certmgr -ssl https://nuget.org + +mv $IROOT/mono.installing $IROOT/mono.installed diff --git a/toolset/setup/linux/languages/xsp.sh b/toolset/setup/linux/languages/xsp.sh index 31d40df91f0..8b2d1aa7bc7 100644 --- a/toolset/setup/linux/languages/xsp.sh +++ b/toolset/setup/linux/languages/xsp.sh @@ -1,18 +1,27 @@ #!/bin/bash +set -e + RETCODE=$(fw_exists ${IROOT}/xsp.installed) [ ! "$RETCODE" == 0 ] || { return 0; } fw_depends mono + +# mono environment variables +. ${IROOT}/mono.installed + +# get git clone git://github.com/mono/xsp cd xsp -git checkout 8a31bc625727594d42f94173768bee5cf8afd0a4 +git checkout e272a2c006211b6b03be2ef5bbb9e3f8fefd0768 -export PKG_CONFIG_PATH=${IROOT}/mono-3.6.0-install/lib/pkgconfig -export PATH=${IROOT}/mono-3.6.0-install/bin:$PATH - -./autogen.sh --prefix=${IROOT}/mono-3.6.0-install +# build +./autogen.sh --prefix=${MONO_HOME} --disable-docs make make install +# cleanup +cd .. +rm -rf xsp + touch ${IROOT}/xsp.installed diff --git a/toolset/setup/linux/prerequisites.sh b/toolset/setup/linux/prerequisites.sh index 6e9cbfd2323..5798045b5dc 100755 --- a/toolset/setup/linux/prerequisites.sh +++ b/toolset/setup/linux/prerequisites.sh @@ -61,4 +61,8 @@ RETCODE=$(fw_exists ~/.bash_profile.bak) sudo sh -c "echo '* - nofile 65535' >> /etc/security/limits.conf" -touch fwbm_prereqs_installed +# Sudo in case we don't have permissions on IROOT +sudo touch fwbm_prereqs_installed + +# Ensure everyone can see the file +sudo chmod 775 fwbm_prereqs_installed