Skip to content

Commit

Permalink
Merge 143dbae into edd71c6
Browse files Browse the repository at this point in the history
  • Loading branch information
ta264 authored Feb 27, 2021
2 parents edd71c6 + 143dbae commit 894c5e2
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 52 deletions.
32 changes: 20 additions & 12 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
parameters:
- name: runtimeBranch
displayName: Branch for runtime and aspnetcore repositories
displayName: Branch for runtime repository
type: string
default: v5.0.3
default: v6.0.0-preview.1.21102.12
- name: aspBranch
displayName: Branch for aspnetcore repository
type: string
default: v6.0.0-preview.1.21103.6
- name: sdkBranch
displayName: Branch for installer repository
type: string
default: v5.0.103
default: v6.0.100-preview.1.21103.13

variables:
runCounter: $[counter('runNumber', 1)]
Expand Down Expand Up @@ -57,12 +61,14 @@ stages:
- checkout: self
- checkout: runtime
- bash: |
set -e
git -C runtime checkout ${{ parameters.runtimeBranch }}
sed -i '/\/dnceng\/internal\//d' runtime/NuGet.config
displayName: Checkout and patch
- bash: |
DOTNET_DOCKER_TAG="mcr.microsoft.com/dotnet-buildtools/prereqs:$(curl -s https://raw.githubusercontent.com/dotnet/versions/master/build-info/docker/image-info.dotnet-dotnet-buildtools-prereqs-docker-master.json | jq -r '.repos[0].images[] | select(.platforms[0].dockerfile | contains("freebsd/11")) | .platforms[0].simpleTags[0]')"
docker run -e ROOTFS_DIR=/crossrootfs/x64 -v ${BUILD_SOURCESDIRECTORY}/runtime:/runtime $DOTNET_DOCKER_TAG /runtime/build.sh -c Release -cross -os freebsd
DOTNET_DOCKER_TAG="mcr.microsoft.com/dotnet-buildtools/prereqs:$(curl -s https://raw.githubusercontent.com/dotnet/versions/master/build-info/docker/image-info.dotnet-dotnet-buildtools-prereqs-docker-main.json | jq -r '.repos[0].images[] | select(.platforms[0].dockerfile | contains("freebsd/11")) | .platforms[0].simpleTags[0]')"
echo $DOTNET_DOCKER_TAG
docker run -e ROOTFS_DIR=/crossrootfs/x64 -v ${BUILD_SOURCESDIRECTORY}/runtime:/runtime $DOTNET_DOCKER_TAG /runtime/build.sh -ci -c Release -cross -os freebsd /p:BuildNumberMajor=21102 /p:BuildNumberMinor=12 /p:OfficialBuildId=20210202.12 /p:IsEligibleForNgenOptimization=false
displayName: Build Runtime
- publish: '$(Build.SourcesDirectory)/runtime/artifacts/packages/Release/Shipping'
artifact: RuntimePackages
Expand All @@ -80,10 +86,10 @@ stages:
- checkout: aspnetcore
submodules: true
- bash: |
git -C aspnetcore checkout ${{ parameters.runtimeBranch }}
set -e
git -C aspnetcore checkout ${{ parameters.aspBranch }}
git -C aspnetcore apply ../dotnet-bsd/patches/aspnetcore/0001-freebsd-support.patch
dotnet nuget add source ../runtime/artifacts/packages/Release/Shipping --name local --configfile aspnetcore/NuGet.config
dotnet nuget add source https://pkgs.dev.azure.com/Servarr/Servarr/_packaging/dotnet-bsd-crossbuild/nuget/v3/index.json --name dotnet-bsd-crossbuild --configfile aspnetcore/NuGet.config
sed -i '/\/dnceng\/internal\//d' aspnetcore/NuGet.config
displayName: Apply patches
- task: DownloadPipelineArtifact@2
Expand All @@ -95,10 +101,11 @@ stages:
dotnet-runtime-*-freebsd-x64.tar.gz
Microsoft.*.freebsd-x64.*.nupkg
- bash: |
set -e
ls -lR runtime
mkdir -p aspnetcore/artifacts/obj/Microsoft.AspNetCore.App.Runtime
cp runtime/artifacts/packages/Release/Shipping/dotnet-runtime-*-freebsd-x64.tar.gz aspnetcore/artifacts/obj/Microsoft.AspNetCore.App.Runtime
aspnetcore/build.sh -c Release -ci --os-name freebsd -pack -nobl /p:CrossgenOutput=false /p:OfficialBuildId=$(date +%Y%m%d)-99
aspnetcore/build.sh -c Release -ci --os-name freebsd -pack -nobl /p:CrossgenOutput=false /p:BuildNumberMajor=21103 /p:BuildNumberMinor=6 /p:OfficialBuildId=20210203.6
displayName: Build AspNetCore
- publish: '$(Build.SourcesDirectory)/aspnetcore/artifacts/packages/Release/Shipping'
artifact: AspNetCorePackages
Expand All @@ -118,13 +125,13 @@ stages:
- checkout: self
- checkout: installer
- bash: |
set -e
git -C installer checkout ${{ parameters.sdkBranch }}
git -C installer apply ../dotnet-bsd/patches/installer/0001-freebsd-support.patch
dotnet nuget remove source msbuild --configfile installer/NuGet.config
dotnet nuget remove source nuget-build --configfile installer/NuGet.config
dotnet nuget remove source msbuild --configfile installer/NuGet.config || true
dotnet nuget remove source nuget-build --configfile installer/NuGet.config || true
dotnet nuget add source ../runtime/artifacts/packages/Release/Shipping --name runtime --configfile installer/NuGet.config
dotnet nuget add source ../aspnetcore/artifacts/packages/Release/Shipping --name aspnetcore --configfile installer/NuGet.config
dotnet nuget add source https://pkgs.dev.azure.com/Servarr/Servarr/_packaging/dotnet-bsd-crossbuild/nuget/v3/index.json --name dotnet-bsd-crossbuild --configfile aspnetcore/NuGet.config
sed -i '/\/dnceng\/internal\//d' installer/NuGet.config
displayName: Apply patches
- task: DownloadPipelineArtifact@2
Expand All @@ -149,12 +156,13 @@ stages:
targetPath: '$(Build.SourcesDirectory)/aspnetcore/artifacts/installers/Release'
patterns: 'aspnetcore-runtime-*'
- bash: |
set -e
ls -lR runtime
ls -lR aspnetcore
mkdir -p installer/artifacts/obj/redist/Release/downloads/
cp runtime/artifacts/packages/Release/Shipping/dotnet-runtime-*-freebsd-x64.tar.gz installer/artifacts/obj/redist/Release/downloads/
cp aspnetcore/artifacts/installers/Release/aspnetcore-runtime-* installer/artifacts/obj/redist/Release/downloads/
installer/build.sh -c Release -ci -pack -nobl --runtime-id freebsd-x64 /p:OSName=freebsd /p:CrossgenOutput=false /p:OfficialBuildId=$(date +%Y%m%d)-99 /p:DISABLE_CROSSGEN=True /p:IncludeAspNetCoreRuntime=True
installer/build.sh -c Release -ci -pack -nobl --runtime-id freebsd-x64 /p:OSName=freebsd /p:CrossgenOutput=false /p:BuildNumberMajor=21103 /p:BuildNumberMinor=13 /p:OfficialBuildId=20210203.13 /p:DISABLE_CROSSGEN=True /p:IncludeAspNetCoreRuntime=True
displayName: Build Installer
- publish: '$(Build.SourcesDirectory)/installer/artifacts/packages/Release/Shipping'
artifact: Installer
Expand Down
36 changes: 17 additions & 19 deletions patches/aspnetcore/0001-freebsd-support.patch
Original file line number Diff line number Diff line change
@@ -1,39 +1,37 @@
From 80531576c3f4dcfe863ab513094e8e65aceb962d Mon Sep 17 00:00:00 2001
From 4fed51358288e646b82f4fd598435f125f985177 Mon Sep 17 00:00:00 2001
From: ta264 <[email protected]>
Date: Fri, 29 Jan 2021 19:25:11 +0000
Subject: [PATCH] freebsd support
Date: Fri, 26 Feb 2021 08:42:34 +0000
Subject: [PATCH] FreeBSD support

---
Directory.Build.props | 1 +
NuGet.config | 1 +
eng/Dependencies.props | 1 +
eng/Versions.props | 2 +-
.../App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj | 2 +-
5 files changed, 5 insertions(+), 2 deletions(-)
Directory.Build.props | 1 +
eng/Dependencies.props | 1 +
2 files changed, 2 insertions(+)

diff --git a/Directory.Build.props b/Directory.Build.props
index 07e3d34055..ac32e584ac 100644
index f2f54bab5d..cd41aba973 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -160,6 +160,7 @@
win-x86;
win-arm;
@@ -163,6 +163,7 @@
win-arm64;
+ freebsd-x64;
osx-x64;
osx-arm64;
+ freebsd-x64;
linux-musl-x64;
linux-musl-arm;
linux-musl-arm64;
diff --git a/eng/Dependencies.props b/eng/Dependencies.props
index 36a24451f0..5a5a2fa9dd 100644
index 4858ba89c5..853b455267 100644
--- a/eng/Dependencies.props
+++ b/eng/Dependencies.props
@@ -91,6 +91,7 @@ and are generated based on the last package release.
<LatestPackageReference Include="Microsoft.NETCore.App.Runtime.win-x86" />
<LatestPackageReference Include="Microsoft.NETCore.App.Runtime.win-arm" />
<LatestPackageReference Include="Microsoft.NETCore.App.Runtime.win-arm64" />
+ <LatestPackageReference Include="Microsoft.NETCore.App.Runtime.freebsd-x64" />
<LatestPackageReference Include="Microsoft.NETCore.App.Runtime.osx-x64" />
<LatestPackageReference Include="Microsoft.NETCore.App.Runtime.osx-arm64" />
+ <LatestPackageReference Include="Microsoft.NETCore.App.Runtime.freebsd-x64" />
<LatestPackageReference Include="Microsoft.NETCore.App.Runtime.linux-x64" />
<LatestPackageReference Include="Microsoft.NETCore.App.Runtime.linux-arm" />
2.25.1
<LatestPackageReference Include="Microsoft.NETCore.App.Runtime.linux-arm64" />
--
2.30.0

40 changes: 19 additions & 21 deletions patches/installer/0001-freebsd-support.patch
Original file line number Diff line number Diff line change
@@ -1,38 +1,36 @@
From ecfb7edc726e8de389b573d901be73e20e9027bf Mon Sep 17 00:00:00 2001
From 3cd24046afa9c2ab5644b1f299a92cbc9c5b82e0 Mon Sep 17 00:00:00 2001
From: ta264 <[email protected]>
Date: Mon, 1 Feb 2021 17:22:10 +0000
Subject: [PATCH] freebsd support
Date: Fri, 26 Feb 2021 09:08:27 +0000
Subject: [PATCH] FreeBSD support

---
NuGet.config | 4 ++--
src/redist/targets/GenerateBundledVersions.targets | 4 ++--
src/redist/targets/GenerateBundledVersions.targets | 3 ++-
src/redist/targets/GetRuntimeInformation.targets | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/redist/targets/GenerateBundledVersions.targets b/src/redist/targets/GenerateBundledVersions.targets
index 43b35ea06..00c2520b3 100644
index 51866d564..13ff7a8e1 100644
--- a/src/redist/targets/GenerateBundledVersions.targets
+++ b/src/redist/targets/GenerateBundledVersions.targets
@@ -73,7 +73,7 @@

<NetCore31RuntimePackRids Include="@(NetCore30RuntimePackRids)"/>

- <NetCore5AppHostRids Include="@(NetCore31RuntimePackRids)"/>
+ <NetCore5AppHostRids Include="@(NetCore31RuntimePackRids);freebsd-x64;"/>
@@ -79,6 +79,7 @@
<Net50AppHostRids Include="
@(NetCore31RuntimePackRids);
linux-musl-arm;
+ freebsd-x64;
"/>

<NetCore5RuntimePackRids Include="
@(NetCore5AppHostRids);
@@ -108,7 +108,7 @@
<Crossgen2SupportedRids Include="linux-musl-x64;linux-x64;win-x64" />
<Net50RuntimePackRids Include="
@@ -115,7 +116,7 @@
<Crossgen2SupportedRids Include="@(Net50Crossgen2SupportedRids)" />

<AspNetCore31RuntimePackRids Include="@(AspNetCore30RuntimePackRids)" />
- <AspNetCore50RuntimePackRids Include="@(AspNetCore31RuntimePackRids);win-arm64" />
+ <AspNetCore50RuntimePackRids Include="@(AspNetCore31RuntimePackRids);win-arm64;freebsd-x64" />
<AspNetCoreRuntimePackRids Include="@(AspNetCore50RuntimePackRids)" />
- <AspNetCore50RuntimePackRids Include="@(AspNetCore31RuntimePackRids);linux-musl-arm;win-arm64" />
+ <AspNetCore50RuntimePackRids Include="@(AspNetCore31RuntimePackRids);linux-musl-arm;win-arm64;freebsd-x64" />
<AspNetCoreRuntimePackRids Include="@(AspNetCore50RuntimePackRids);osx-arm64" />

<WindowsDesktop30RuntimePackRids Include="win-x64;win-x86" />
diff --git a/src/redist/targets/GetRuntimeInformation.targets b/src/redist/targets/GetRuntimeInformation.targets
index 9f53268ab..0ba2fc8dc 100644
index ce6e3b14c..015845125 100644
--- a/src/redist/targets/GetRuntimeInformation.targets
+++ b/src/redist/targets/GetRuntimeInformation.targets
@@ -4,7 +4,7 @@
Expand Down

0 comments on commit 894c5e2

Please sign in to comment.