Skip to content

Commit

Permalink
Merge pull request dotnet#1383 from crummel/merge3.0-20191121
Browse files Browse the repository at this point in the history
Merge 3.0 => 3.1
  • Loading branch information
crummel authored Nov 22, 2019
2 parents 41e3f40 + dc9a11c commit 733b4fd
Show file tree
Hide file tree
Showing 22 changed files with 489 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .vsts.pipelines/jobs/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
- script: |
set -ex
df -h
args="--skip-build --minimize-disk-usage"
args="--skip-build --minimize-disk-usage --skip-prebuilt-check"
if [ "$(reportPrebuiltLeaks)" = "true" ]; then
args="$args --enable-leak-detection"
fi
Expand Down
39 changes: 39 additions & 0 deletions build-source-tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ shift
SKIP_BUILD=0
INCLUDE_LEAK_DETECTION=0
MINIMIZE_DISK_USAGE=0
SKIP_PREBUILT_ENFORCEMENT=0
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1

while :; do
Expand All @@ -36,6 +37,9 @@ while :; do
--minimize-disk-usage)
MINIMIZE_DISK_USAGE=1
;;
--skip-prebuilt-check)
SKIP_PREBUILT_ENFORCEMENT=1
;;
--)
shift
echo "Detected '--': passing remaining parameters '$@' as build.sh arguments."
Expand Down Expand Up @@ -169,6 +173,14 @@ find $TARBALL_ROOT/src \( -type f \( \
-iname *.zip -o \
-iname *.nupkg \) \) -exec rm {} \;

if [ $MINIMIZE_DISK_USAGE -eq 1 ]; then
pushd "$TARBALL_ROOT/src"
echo 'Removing unneeded files to trim tarball...'
# we don't build CoreCLR tests right now and they have a lot of them - ~380MB
rm -rf coreclr.*/tests
popd
fi

echo 'Copying sourcelink metadata to tarball...'
pushd $SCRIPT_ROOT
for srcDir in `find bin/src -name '.git' -type d`; do
Expand Down Expand Up @@ -286,6 +298,33 @@ do
fi
done

echo 'Removing known extra packages from tarball prebuilts...'
while IFS= read -r packagePattern
do
if [[ "$packagePattern" =~ ^# ]]; then
continue
fi
rm -f $TARBALL_ROOT/packages/prebuilt/$packagePattern
done < $SCRIPT_ROOT/support/additional-prebuilts-to-delete.txt

if [ $SKIP_PREBUILT_ENFORCEMENT -ne 1 ]; then
echo 'Checking for extra prebuilts...'
error_encountered=false
for package in `ls -A $TARBALL_ROOT/packages/prebuilt`
do
if grep -q "$package" $SCRIPT_ROOT/support/allowed-prebuilts.txt; then
echo "Allowing prebuilt $package"
else
echo "ERROR: $package is not in the allowed prebuilts list ($SCRIPT_ROOT/support/allowed-prebuilts.txt)"
error_encountered=true
fi
done
if [ "$error_encountered" = "true" ]; then
echo "Either remove this prebuilt, add it to the known extras list ($SCRIPT_ROOT/support/additional-prebuilts-to-delete.txt) or add it to the allowed prebuilts list."
exit 1
fi
fi

echo 'Removing source-built, previously source-built packages and reference packages from il pkg src...'
OLDIFS=$IFS

Expand Down
1 change: 1 addition & 0 deletions dir.props
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
<SourceBuiltPackagesPath>$(SourceBuiltBlobFeedDir)packages/</SourceBuiltPackagesPath>
<SourceBuiltAssetsDir>$(SourceBuiltBlobFeedDir)assets/</SourceBuiltAssetsDir>
<PrebuiltPackagesPath>$(ProjectDir)packages/prebuilt/</PrebuiltPackagesPath>
<PreviouslyRestoredPackagesPath>$(ProjectDir)packages/previouslyRestored/</PreviouslyRestoredPackagesPath>
<PrebuiltSourceBuiltPackagesPath>$(ProjectDir)packages/source-built/</PrebuiltSourceBuiltPackagesPath>
<SourceBuiltTarBallPath>$(OutputPath)</SourceBuiltTarBallPath>
<SourceBuiltToolsetDir>$(LocalBlobStorageRoot)Toolset/</SourceBuiltToolsetDir>
Expand Down
32 changes: 32 additions & 0 deletions patches/aspnetcore/0011-Add-FreeBSD.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From 457e4bcc40228d64bb98c4e35937d31b4cc76599 Mon Sep 17 00:00:00 2001
From: Tomas Weinfurt <tweinfurt@yahoo.com>
Date: Wed, 13 Nov 2019 22:32:02 -0800
Subject: [PATCH] Add FreeBSD

---
Directory.Build.props | 2 ++
1 file changed, 2 insertions(+)

diff --git a/Directory.Build.props b/Directory.Build.props
index 80e6bb14f0..76b1b4451b 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -115,6 +115,7 @@
<PropertyGroup>
<TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('Windows'))">win</TargetOsName>
<TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('OSX'))">osx</TargetOsName>
+ <TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('FreeBSD'))">freebsd</TargetOsName>
<TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('Linux'))">linux</TargetOsName>
<TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture>
<TargetRuntimeIdentifier>$(TargetOsName)-$(TargetArchitecture)</TargetRuntimeIdentifier>
@@ -125,6 +126,7 @@
win-x86;
win-arm;
osx-x64;
+ freebsd-x64;
linux-musl-x64;
linux-musl-arm64;
linux-x64;
--
2.23.0

40 changes: 40 additions & 0 deletions patches/core-setup/0005-Add-FreeBSD-support.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From 9847f667b05b577cf98f92cb32f38beff95ea504 Mon Sep 17 00:00:00 2001
From: Tomas Weinfurt <tweinfurt@yahoo.com>
Date: Wed, 13 Nov 2019 00:53:31 -0800
Subject: [PATCH] add freebsd support

---
src/Directory.Build.props | 4 ++--
src/pkg/projects/netcoreappRIDs.props | 1 +
3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index c22e11fa..1fc24b41 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -12,7 +12,7 @@
<CrossGenSymbolExtension>.map</CrossGenSymbolExtension>
<CrossGenSymbolExtension Condition="'$(OSGroup)' == 'Windows_NT'">.ni.pdb</CrossGenSymbolExtension>
<!-- OSX doesn't have crossgen symbols, yet -->
- <CrossGenSymbolExtension Condition="'$(OSGroup)' == 'OSX'"></CrossGenSymbolExtension>
+ <CrossGenSymbolExtension Condition="'$(OSGroup)' == 'OSX' OR '$(OSGroup)' == 'FreeBSD'"></CrossGenSymbolExtension>
</PropertyGroup>

-</Project>
\ No newline at end of file
+</Project>
diff --git a/src/pkg/projects/netcoreappRIDs.props b/src/pkg/projects/netcoreappRIDs.props
index 7483d182..5561842f 100644
--- a/src/pkg/projects/netcoreappRIDs.props
+++ b/src/pkg/projects/netcoreappRIDs.props
@@ -35,6 +35,7 @@
<!-- The following RIDs are not officically supported and are not
built during official builds, however we wish to include them
in our runtime.json to enable others to provide them. -->
+ <UnofficialBuildRID Include="freebsd-x64" />
<UnofficialBuildRID Include="tizen.4.0.0-armel">
<Platform>armel</Platform>
</UnofficialBuildRID>
--
2.23.0

24 changes: 24 additions & 0 deletions patches/core-setup/0006-Fix-OSGroup-on-FreeBSD.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 63218afeff61a044c6482c5cd119a17bdb59de09 Mon Sep 17 00:00:00 2001
From: Tomas Weinfurt <tweinfurt@yahoo.com>
Date: Wed, 13 Nov 2019 14:07:57 -0800
Subject: [PATCH] Fix OSGroup on FreeBSD

---
Directory.Build.props | 1 +
1 file changed, 1 insertion(+)

diff --git a/Directory.Build.props b/Directory.Build.props
index 890012bf..a2539d51 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -111,6 +111,7 @@
-->
<PropertyGroup>
<OSGroup Condition="'$(OS)'=='Unix' AND Exists('/Applications')">OSX</OSGroup>
+ <OSGroup Condition="'$(OS)'=='Unix' and $([MSBuild]::IsOSPlatform('FREEBSD'))">FreeBSD</OSGroup>
<OSGroup Condition="'$(OSGroup)' == ''">$(OS)</OSGroup>
</PropertyGroup>

--
2.23.0

196 changes: 196 additions & 0 deletions patches/corefx/0005-Add-FreeBSD-RIDs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
From 32d103eecf9d1e9648e6b1ed063860fed00bcc8f Mon Sep 17 00:00:00 2001
From: Tomas Weinfurt <tweinfurt@yahoo.com>
Date: Thu, 24 Oct 2019 10:19:39 -0700
Subject: [PATCH] add entries for new FreeBSD releases (#41794)

---
.../runtime.compatibility.json | 81 +++----------------
pkg/Microsoft.NETCore.Platforms/runtime.json | 38 ++-------
.../runtimeGroups.props | 2 +-
3 files changed, 22 insertions(+), 99 deletions(-)

diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
index 1e5c380a7a6a..2a196ecc9fc7 100644
--- a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
+++ b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
@@ -984,17 +984,17 @@
"any",
"base"
],
- "freebsd.11.0": [
- "freebsd.11.0",
+ "freebsd.12": [
+ "freebsd.12",
"freebsd.11",
"freebsd",
"unix",
"any",
"base"
],
- "freebsd.11.0-x64": [
- "freebsd.11.0-x64",
- "freebsd.11.0",
+ "freebsd.12-x64": [
+ "freebsd.12-x64",
+ "freebsd.12",
"freebsd.11-x64",
"freebsd.11",
"freebsd-x64",
@@ -1004,75 +1004,20 @@
"any",
"base"
],
- "freebsd.11.1": [
- "freebsd.11.1",
- "freebsd.11.0",
+ "freebsd.13": [
+ "freebsd.13",
+ "freebsd.12",
"freebsd.11",
"freebsd",
"unix",
"any",
"base"
],
- "freebsd.11.1-x64": [
- "freebsd.11.1-x64",
- "freebsd.11.1",
- "freebsd.11.0-x64",
- "freebsd.11.0",
- "freebsd.11-x64",
- "freebsd.11",
- "freebsd-x64",
- "freebsd",
- "unix-x64",
- "unix",
- "any",
- "base"
- ],
- "freebsd.11.2": [
- "freebsd.11.2",
- "freebsd.11.1",
- "freebsd.11.0",
- "freebsd.11",
- "freebsd",
- "unix",
- "any",
- "base"
- ],
- "freebsd.11.2-x64": [
- "freebsd.11.2-x64",
- "freebsd.11.2",
- "freebsd.11.1-x64",
- "freebsd.11.1",
- "freebsd.11.0-x64",
- "freebsd.11.0",
- "freebsd.11-x64",
- "freebsd.11",
- "freebsd-x64",
- "freebsd",
- "unix-x64",
- "unix",
- "any",
- "base"
- ],
- "freebsd.11.3": [
- "freebsd.11.3",
- "freebsd.11.2",
- "freebsd.11.1",
- "freebsd.11.0",
- "freebsd.11",
- "freebsd",
- "unix",
- "any",
- "base"
- ],
- "freebsd.11.3-x64": [
- "freebsd.11.3-x64",
- "freebsd.11.3",
- "freebsd.11.2-x64",
- "freebsd.11.2",
- "freebsd.11.1-x64",
- "freebsd.11.1",
- "freebsd.11.0-x64",
- "freebsd.11.0",
+ "freebsd.13-x64": [
+ "freebsd.13-x64",
+ "freebsd.13",
+ "freebsd.12-x64",
+ "freebsd.12",
"freebsd.11-x64",
"freebsd.11",
"freebsd-x64",
diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.json b/pkg/Microsoft.NETCore.Platforms/runtime.json
index b2f286ea2479..e70f2da7e668 100644
--- a/pkg/Microsoft.NETCore.Platforms/runtime.json
+++ b/pkg/Microsoft.NETCore.Platforms/runtime.json
@@ -510,48 +510,26 @@
"freebsd-x64"
]
},
- "freebsd.11.0": {
+ "freebsd.12": {
"#import": [
"freebsd.11"
]
},
- "freebsd.11.0-x64": {
+ "freebsd.12-x64": {
"#import": [
- "freebsd.11.0",
+ "freebsd.12",
"freebsd.11-x64"
]
},
- "freebsd.11.1": {
+ "freebsd.13": {
"#import": [
- "freebsd.11.0"
+ "freebsd.12"
]
},
- "freebsd.11.1-x64": {
+ "freebsd.13-x64": {
"#import": [
- "freebsd.11.1",
- "freebsd.11.0-x64"
- ]
- },
- "freebsd.11.2": {
- "#import": [
- "freebsd.11.1"
- ]
- },
- "freebsd.11.2-x64": {
- "#import": [
- "freebsd.11.2",
- "freebsd.11.1-x64"
- ]
- },
- "freebsd.11.3": {
- "#import": [
- "freebsd.11.2"
- ]
- },
- "freebsd.11.3-x64": {
- "#import": [
- "freebsd.11.3",
- "freebsd.11.2-x64"
+ "freebsd.13",
+ "freebsd.12-x64"
]
},
"gentoo": {
diff --git a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
index eeb8130b54fb..6c95b67819be 100644
--- a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
+++ b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
@@ -99,7 +99,7 @@
<RuntimeGroup Include="freebsd">
<Parent>unix</Parent>
<Architectures>x64</Architectures>
- <Versions>11;11.0;11.1;11.2;11.3</Versions>
+ <Versions>11;12;13</Versions>
</RuntimeGroup>

<!-- rhel 6 is independent -->
Loading

0 comments on commit 733b4fd

Please sign in to comment.