Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Changes: mono/api-snapshot@fc50bc4...45a61d9

        $ git diff --shortstat fc50bc4f...45a61d93
         22 files changed, 775 insertions(+), 474 deletions(-)

Changes: dotnet/cecil@a6c8f5e...a6a7f5c

        $ git diff --shortstat a6c8f5e1...a6a7f5c0
         55 files changed, 818 insertions(+), 530 deletions(-)

Changes: mono/corefx@1f87de3...49f1c45

        $ git diff --shortstat e4f7102b...49f1c453
         38 files changed, 1171 insertions(+), 419 deletions(-)

Changes: dotnet/linker@ebe2a1f...e8d054b

        $ git diff --shortstat ebe2a1f4...e8d054bf
         137 files changed, 5360 insertions(+), 1781 deletions(-)

Changes: mono/mono@8946e49...18920a8

        $ git diff --shortstat 8946e49a...18920a83
         1811 files changed, 47240 insertions(+), 48331 deletions(-)

Changes: xamarin/xamarin-android-api-compatibility@a61271e...50a3c52

        $ git diff --shortstat a61271e0...50a3c52d
         1 file changed, 2 insertions(+), 791 deletions(-)

Fixes: #3619

Context: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1005448
Context: https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/967582
Context: https://github.com/dotnet/coreclr/issues/26370
Context: https://github.com/dotnet/coreclr/issues/26479
Context: https://github.com/dotnet/corefx/issues/40455
Context: https://github.com/dotnet/corefx/issues/40578
Context: mono/mono#7377
Context: mono/mono#12421
Context: mono/mono#12586
Context: mono/mono#14080
Context: mono/mono#14725
Context: mono/mono#14772
Context: mono/mono#15261
Context: mono/mono#15262
Context: mono/mono#15263
Context: mono/mono#15307
Context: mono/mono#15308
Context: mono/mono#15310
Context: mono/mono#15646
Context: mono/mono#15687
Context: mono/mono#15805
Context: mono/mono#15992
Context: mono/mono#15994
Context: mono/mono#15999
Context: mono/mono#16032
Context: mono/mono#16034
Context: mono/mono#16046
Context: mono/mono#16192
Context: mono/mono#16308
Context: mono/mono#16310
Context: mono/mono#16369
Context: mono/mono#16380
Context: mono/mono#16381
Context: mono/mono#16395
Context: mono/mono#16411
Context: mono/mono#16415
Context: mono/mono#16486
Context: mono/mono#16570
Context: mono/mono#16605
Context: mono/mono#16616
Context: mono/mono#16689
Context: mono/mono#16701
Context: mono/mono#16712
Context: mono/mono#16742
Context: mono/mono#16759
Context: mono/mono#16803
Context: mono/mono#16808
Context: mono/mono#16824
Context: mono/mono#16876
Context: mono/mono#16879
Context: mono/mono#16918
Context: mono/mono#16943
Context: mono/mono#16950
Context: mono/mono#16974
Context: mono/mono#17004
Context: mono/mono#17017
Context: mono/mono#17038
Context: mono/mono#17040
Context: mono/mono#17083
Context: mono/mono#17084
Context: mono/mono#17133
Context: mono/mono#17139
Context: mono/mono#17151
Context: mono/mono#17180
Context: mono/mono#17278
Context: mono/mono#17549
Context: mono/mono#17569
Context: mono/mono#17665
Context: mono/mono#17687
Context: mono/mono#17737
Context: mono/mono#17790
Context: mono/mono#17924
Context: mono/mono#17931
Context: https://github.com/mono/mono/issues/26758
Context: https://github.com/mono/mono/issues/37913
Context: xamarin/xamarin-macios#7005
  • Loading branch information
directhex authored and jonpryor committed Dec 3, 2019
1 parent fd64aaf commit 0f98637
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 173 deletions.
2 changes: 1 addition & 1 deletion .external
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
xamarin/monodroid:master@1b907d680cc6561dcfaddc6f997d2f6ff5456644
mono/mono:2019-08@8946e49a974ea8b75fe5b8b7e93ffd4571521a85
mono/mono:2019-10@18920a83f423fb864a2263948737681968f5b2c8
6 changes: 3 additions & 3 deletions Configuration.props
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@
<AndroidSupportedTargetJitAbis Condition=" '$(AndroidSupportedTargetJitAbis)' == '' ">armeabi-v7a:arm64-v8a:x86</AndroidSupportedTargetJitAbis>
<JavaInteropSourceDirectory Condition=" '$(JavaInteropSourceDirectory)' == '' ">$(MSBuildThisFileDirectory)external\Java.Interop</JavaInteropSourceDirectory>
<MonoSourceDirectory>$(MSBuildThisFileDirectory)external\mono</MonoSourceDirectory>
<MonoRequiredMinimumVersion Condition=" '$(MonoRequiredMinimumVersion)' == '' ">6.6.0</MonoRequiredMinimumVersion>
<MonoRequiredMaximumVersion Condition=" '$(MonoRequiredMaximumVersion)' == '' ">6.7.0</MonoRequiredMaximumVersion>
<MonoRequiredMinimumVersion Condition=" '$(MonoRequiredMinimumVersion)' == '' ">6.8.0</MonoRequiredMinimumVersion>
<MonoRequiredMaximumVersion Condition=" '$(MonoRequiredMaximumVersion)' == '' ">6.9.0</MonoRequiredMaximumVersion>
<IgnoreMaxMonoVersion Condition=" '$(IgnoreMaxMonoVersion)' == '' ">True</IgnoreMaxMonoVersion>
<MonoRequiredDarwinMinimumVersion>$(MonoRequiredMinimumVersion).54</MonoRequiredDarwinMinimumVersion>
<MonoRequiredDarwinMinimumVersion>$(MonoRequiredMinimumVersion).61</MonoRequiredDarwinMinimumVersion>
<LinkerSourceDirectory>$(MSBuildThisFileDirectory)external\mono\sdks\out\android-sources\external\linker\src</LinkerSourceDirectory>
<OpenTKSourceDirectory>$(MSBuildThisFileDirectory)external\opentk</OpenTKSourceDirectory>
<MingwZlibRootDirectory Condition=" '$(ZlibRootDirectory)' == '' And '$(HostOS)' == 'Linux' ">\usr</MingwZlibRootDirectory>
Expand Down
7 changes: 5 additions & 2 deletions Documentation/guides/BuildProcess.md
Original file line number Diff line number Diff line change
Expand Up @@ -735,12 +735,15 @@ when packaging Release applications.
This corresponds to the **Native TLS 1.2+** setting in the
Visual Studio property pages.

- `legacy`: Use the historical managed SSL implementation for
network interaction. This *does not* support TLS 1.2.
- `legacy`: In Xamarin.Android v10.1 and earlier, use the historical
managed SSL implementation for network interaction. This *does not* support TLS 1.2.

This corresponds to the **Managed TLS 1.0** setting in the
Visual Studio property pages.

In Xamarin.Android v10.2 and later, this value is ignored and the
`btls` setting is used.

- `default`: This value is unlikely to be used in Xamarin.Android
projects. The recommended value to use instead is the empty string,
which corresponds to the **Default** setting in the Visual Studio
Expand Down
9 changes: 9 additions & 0 deletions Documentation/release-notes/3753.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### Bumps to mono/mono/2019-10@18920a83

This brings in a multitude of changes.

TODO: link to Mono release notes for Mono 6.8.0.

In particular, this updates `Mono.Security.dll` to *remove* support for TLS 1.0.
When the `$(AndroidTlsProvider)` MSBuild property is set to `legacy` or
`default`, the `btls` value will now be used.
167 changes: 18 additions & 149 deletions Documentation/workflow/HowToBumpMono.md
Original file line number Diff line number Diff line change
@@ -1,64 +1,18 @@
# How To Bump Mono

There will eventually be two ways that xamarin-android depends on mono:
Android uses a binary artifcats package from mono that is tied to a specific version / commit. This makes it pretty trivial to bump mono.

1. Via [source code](#mono-source), or
2. Via [mono archive](#mono-archive)
The folloing checklist covers what you need to do. Note, if you know the system mono version does not need changed, you can skip the first step.


<a name="mono-source" />

## Mono Source

When using mono from source -- which is required for all versions of mono
before the `mono/2018-10` release branch -- the
[`external/mono`](../../external) git submodule reference is used.

Currently, many parts of the xamarin-android build system *require* the
presence and use of mono source code, including:

* The [`src/Mono.Posix`](../../src/Mono.Posix) and
[`src/Mono.Data.Sqlite`](../../src/Mono.Data.Sqlite) builds.
* Inclusion of PDB2MDB source code within
[`src/Xamarin.Android.Build.Tasks`](../../src/Xamarin.Android.Build.Tasks).
* Inclusion of networking and related code into
[`src/monodroid`](../../src/monodroid).

We are working to remove these source dependencies so that we can support using
a [Mono Archive](#mono-archive) in the future.

Until a Mono Archive *exists* and can be *used*, source code integration must
fulfill the following checklist:

- [ ] [Update `.gitmodules`](#update-gitmodules).
- [ ] [Update `external/mono` submodule reference](#update-mono-submodule).
- [ ] [Update system mono used for the build](#update-system-mono).
- [ ] [Update `MonoAndroid` Profile Assemblies](#update-profile)
- [ ] [Update MonoRequiredDarwinMinimumVersion used in the build](#update-configuration-props).
- [ ] [Update external mono commit in .external](#update-mono-external-commit).
- [ ] [Ensure it *builds*](#build).
- [ ] [Ensure unit tests *pass*](#unit-tests).
- [ ] [Check for API Breakage](#api-validation).
- [ ] [Create a Pull Request](#create-pr).
- [ ] [Ask for QA Validation](#qa-validation) (***LAST***).


<a name="update-gitmodules" />

### Update `.gitmodules`

Update [`.gitmodules`](../../.gitmodules) to refer to the correct mono branch.


<a name="update-mono-submodule" />

### Update `external/mono`

Update the git submodule reference that [`external/mono`](../../external) refers to:

cd external/mono
git checkout BRANCH-NAME
git pull --rebase


<a name="update-system-mono" />

### Update system mono
Expand All @@ -71,92 +25,21 @@ These version numbers can be found in
[mono's `configure.ac`](https://github.com/mono/mono/blob/master/configure.ac)
in the `AC_INIT()` statement.

The `$(_DarwinMonoFramework)` and `%(RequiredProgram.DarwinMinimumUrl)` values
within [`build-tools/dependencies/dependencies.projitems`](../../build-tools/dependencies/dependencies.projitems)
should be updated to corresponds to the version number used in the mono submodule.

`%(DarwinMinimumUrl)` must be a macOS `.pkg` file and must exist.

For example, see commit
[606675b5](https://github.com/xamarin/xamarin-android/commit/606675b59f52595e3030c529de4c856fb347edd8):

```diff
diff --git a/Configuration.props b/Configuration.props
index a2a9c1d1..ec78ddb4 100644
--- a/Configuration.props
+++ b/Configuration.props
@@ -70,8 +70,8 @@
<JavaInteropSourceDirectory Condition=" '$(JavaInteropSourceDirectory)' == '' ">$(MSBuildThisFileDirectory)external\Java.Interop</JavaInteropSourceDirectory>
<MonoSourceDirectory>$(MSBuildThisFileDirectory)external\mono</MonoSourceDirectory>
- <MonoRequiredMinimumVersion Condition=" '$(MonoRequiredMinimumVersion)' == '' ">5.14.0</MonoRequiredMinimumVersion>
- <MonoRequiredMaximumVersion Condition=" '$(MonoRequiredMaximumVersion)' == '' ">5.15.0</MonoRequiredMaximumVersion>
+ <MonoRequiredMinimumVersion Condition=" '$(MonoRequiredMinimumVersion)' == '' ">5.16.0</MonoRequiredMinimumVersion>
+ <MonoRequiredMaximumVersion Condition=" '$(MonoRequiredMaximumVersion)' == '' ">5.17.0</MonoRequiredMaximumVersion>
<IgnoreMaxMonoVersion Condition=" '$(IgnoreMaxMonoVersion)' == '' ">True</IgnoreMaxMonoVersion>
<MonoRequiredDarwinMinimumVersion>$(MonoRequiredMinimumVersion).0</MonoRequiredDarwinMinimumVersion>
<LinkerSourceDirectory>$(MSBuildThisFileDirectory)external\mono\external\linker</LinkerSourceDirectory>
diff --git a/build-tools/dependencies/dependencies.projitems b/build-tools/dependencies/dependencies.projitems
index f4a2f60e..1bd5d8c2 100644
--- a/build-tools/dependencies/dependencies.projitems
+++ b/build-tools/dependencies/dependencies.projitems
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
- <_DarwinMonoFramework>MonoFramework-MDK-5.14.0.141.macos10.xamarin.universal.pkg</_DarwinMonoFramework>
+ <_DarwinMonoFramework>MonoFramework-MDK-5.16.0.106.macos10.xamarin.universal.pkg</_DarwinMonoFramework>
<_AptGetInstall>apt-get -f -u install</_AptGetInstall>
</PropertyGroup>
<ItemGroup>
@@ -59,7 +59,7 @@
<MaximumVersion Condition=" '$(IgnoreMaxMonoVersion)' == '' Or '$(IgnoreMaxMonoVersion)' == 'False' " >$(MonoRequiredMaximumVersion)</MaximumVersion>
<DarwinMinimumVersion>$(MonoRequiredDarwinMinimumVersion)</DarwinMinimumVersion>
<CurrentVersionCommand>$(MSBuildThisFileDirectory)..\scripts\mono-version</CurrentVersionCommand>
- <DarwinMinimumUrl>https://xamjenkinsartifact.azureedge.net/build-package-osx-mono/2018-04/116/8ae8c52383b43892fb7a35dbf0992738bd52fa90/$(_DarwinMonoFramework)</DarwinMinimumUrl>
+ <DarwinMinimumUrl>https://xamjenkinsartifact.azureedge.net/build-package-osx-mono/2018-06/78/341142d7656f43239a041b2c44f00acfb8fa7c59/$(_DarwinMonoFramework)</DarwinMinimumUrl>
<DarwinInstall>installer -pkg "$(AndroidToolchainCacheDirectory)\$(_DarwinMonoFramework)" -target /</DarwinInstall>
</RequiredProgram>
</ItemGroup>
```


<a name="update-profile" />

### Update `MonoAndroid` Profile Assemblies

[`src/mono-runtimes/ProfileAssemblies.projitems`](../../src/mono-runtimes/ProfileAssemblies.projitems)
has three item groups that may need to be updated:

* `@(MonoFacadeAssembly)`
* `@(MonoProfileAssembly)`
* `@(MonoTestAssembly)`

There must be a `@(MonoFacadeAssembly)` entry for every Facade assembly that
must be shipped in the SDK. Facade assemblies are installed into the
`bin/$(Configuration)/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v1.0/Facades`
directory.

This script uses the contents of `external/mono/sdks/out/android-bcl`, and thus
requires either a local monodroid sdks build, or the extraction of a
[Mono Archive](#mono-archive).

The `@(MonoProfileAssembly)` item group is for non-Facade assemblies, which are
installed into the
`bin/$(Configuration)/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v1.0`
directory. This item group must be updated whenever a new BCL assembly is added.

The `@(MonoTestAssembly)` item group contains unit test assemblies, executed by
[`tests/BCL-Tests`](../../tests/BCL-Tests).
The `%(MonoTestAssembly.TestType)` item metadata is the *type* of unit test
assembly; valid values are `xunit` (for xUnit unit test assemblies),
`reference` (for ???), and the empty string/not set (for NUnit assemblies).


It should be possible to update `ProfileAssemblies.projitems` by running the
script `build-tools/scripts/gen-ProfileAssemblies.sh`:

build-tools/scripts/gen-ProfileAssemblies.sh > src/mono-runtimes/ProfileAssemblies.projitems
An example within Configuration.props:

`<MonoRequiredMinimumVersion Condition=" '$(MonoRequiredMinimumVersion)' == '' ">6.8.0</MonoRequiredMinimumVersion>`

`<MonoRequiredMaximumVersion Condition=" '$(MonoRequiredMaximumVersion)' == '' ">6.9.0</MonoRequiredMaximumVersion>`

<a name="update-mono-external-commit" />

### Update external mono commit in .external

Updating the commit in this file will pull in the version of mono you want to bump to.

Within [`.external`](../../.external) indicate the mono branch and commit. For example:

`mono/mono:2019-10@e9b5aec5ec7801df66117f2da730672ede15dcc6`

<a name="build" />

Expand Down Expand Up @@ -232,17 +115,3 @@ Asking QA for validation should be done ***last***.

Once QA approves, the mono bump PR can be merged.


<a name="mono-archive" />

## Mono Archives

A "Mono Archive" is a binary package (`.zip` file) which contains *binary*
mono artifacts, *not* source code.

See also:

* The [Mono SDKs Integration project](https://github.com/xamarin/xamarin-android/projects/10)
* Commit [f970cd50](https://github.com/xamarin/xamarin-android/commit/f970cd50d2c19dcb4b62cc1dd1198c31cc10a2df)

TODO. :-)
1 change: 1 addition & 0 deletions build-tools/automation/build.linux.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def chRootPackages = '''
lib32z1
libc++-dev
libgdk-pixbuf2.0-dev
libmono-btls-interface4.0-cil
libncurses5-dev
libsqlite3-dev
libtinfo-dev:i386
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ partial class Configurables
partial class Urls
{
public static readonly Uri Corretto = new Uri ($"{Corretto_BaseUri}{CorrettoUrlPathVersion}/amazon-corretto-{CorrettoDistVersion}-macosx-x64.tar.gz");
public static readonly Uri MonoPackage = new Uri ("https://download.mono-project.com/archive/6.4.0/macos-10-universal/MonoFramework-MDK-6.4.0.198.macos10.xamarin.universal.pkg");
public static readonly Uri MonoPackage = new Uri ("https://xamjenkinsartifact.azureedge.net/build-package-osx-mono/2019-10/57/e9b5aec5ec7801df66117f2da730672ede15dcc6/MonoFramework-MDK-6.8.0.53.macos10.xamarin.universal.pkg");
}

partial class Defaults
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ partial class MacOS

// If you change the minimum Mono version here, please change the URL as well
new MonoPkgProgram ("Mono", "com.xamarin.mono-MDK.pkg", Configurables.Urls.MonoPackage) {
MinimumVersion = "6.0.0.313",
MinimumVersion = "6.8.0.53",
MaximumVersion = "6.99.0.0",
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,7 @@ List<string> PrepareMakeArguments (Context context, string workingDirectory, Lis
string toolchainsPrefix = Path.Combine (GetProperty (KnownProperties.AndroidToolchainDirectory), "toolchains");

var ret = new List<string> {
"DISABLE_IOS=1",
"DISABLE_MAC=1",
"ENABLE_ANDROID=1",
$"CONFIGURATION={Configurables.Defaults.MonoSdksConfiguration}",
"IGNORE_PROVISION_MXE=false",
"IGNORE_PROVISION_ANDROID=true",
Expand Down
2 changes: 1 addition & 1 deletion external/xamarin-android-api-compatibility
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@ TypeDefinition GetTlsProvider (ModuleDefinition module)

TypeDefinition type;
switch (provider) {
case "btls":
type = module.GetType ("Mono.Btls.MonoBtlsProvider");
break;
case "legacy":
case "default":
type = module.GetType ("Mono.Net.Security.LegacyTlsProvider");
case "btls":
type = module.GetType ("Mono.Btls.MonoBtlsProvider");
break;
default:
throw new InvalidOperationException (string.Format ("Unknown TlsProvider `{0}`.", provider));
Expand Down
8 changes: 1 addition & 7 deletions src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -409,13 +409,7 @@ void AddProfilers (ZipArchiveEx apk, string abi)

void AddBtlsLibs (ZipArchiveEx apk, string abi)
{
if (string.IsNullOrEmpty (TlsProvider) ||
string.Compare ("btls", TlsProvider, StringComparison.OrdinalIgnoreCase) == 0) {
AddNativeLibrary (apk, abi, "libmono-btls-shared.so");
}
// These are the other supported values
// * "default":
// * "legacy":
AddNativeLibrary (apk, abi, "libmono-btls-shared.so");
}

void AddRuntimeLibraries (ZipArchiveEx apk, string [] supportedAbis)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2701,8 +2701,8 @@ public void BuildWithResolveAssembliesFailure ([Values (true, false)] bool usePa
{
// androidTlsProvider, isRelease, extpected
new object[] { "", true, true, },
new object[] { "default", true, false, },
new object[] { "legacy", true, false, },
new object[] { "default", true, true, },
new object[] { "legacy", true, true, },
new object[] { "btls", true, true, }
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@
<Compile Include="$(LinkerSourceFullPath)\linker\Linker\MethodReferenceExtensions.cs">
<Link>Linker\Linker\MethodReferenceExtensions.cs</Link>
</Compile>
<Compile Include="$(LinkerSourceFullPath)\linker\Linker\OutputException.cs">
<Link>Linker\Linker\OutputException.cs</Link>
</Compile>
<Compile Include="$(LinkerSourceFullPath)\linker\Linker\OverrideInformation.cs">
<Link>Linker\Linker\OverrideInformation.cs</Link>
</Compile>
Expand Down

0 comments on commit 0f98637

Please sign in to comment.