Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c6074b1
Remove source-built dir from tarball in favor of prev source-built ar…
dseefeld Nov 15, 2019
8ebb121
Remove prebuilt nupkgs from the tarball. (#1348)
crummel Nov 15, 2019
e8c3007
Fix relative path
dseefeld Nov 15, 2019
5549f8a
Remove source-built dir from tarball in favor of prev source-built ar…
dseefeld Nov 15, 2019
6d06f30
Fix relative path
dseefeld Nov 15, 2019
114e60a
Add add'l pkgs to delete when generating tarball
dseefeld Nov 18, 2019
c6ba5b7
Sort additional prebuilts to delete text file
dseefeld Nov 18, 2019
1ce3b1b
Report all disallowed prebuilts on tarball creation
dseefeld Nov 18, 2019
44705e4
Add extra PVP entry for sourcelink in sourcelink and arcade only
dseefeld Nov 18, 2019
44bef38
Merge branch 'removeSourceBuilt' of https://github.com/dseefeld/sourc…
dseefeld Nov 18, 2019
feb9d91
Initial support for FreeBSD. (#1362)
wfurt Nov 18, 2019
296b2bc
Use boostrap version of sourcelink only for sourcelink
dseefeld Nov 18, 2019
71ffa02
Include coreclr-tools in source-built archive (#1369)
dseefeld Nov 19, 2019
6408e50
Update version of source-built archive
dseefeld Nov 21, 2019
d39586f
Remove source-built dir from tarball in favor of prev source-built ar…
dseefeld Nov 15, 2019
cf66b14
Fix relative path
dseefeld Nov 15, 2019
e9885d2
Add extra PVP entry for sourcelink in sourcelink and arcade only
dseefeld Nov 18, 2019
52be555
Use boostrap version of sourcelink only for sourcelink
dseefeld Nov 18, 2019
43b17f6
Update version of source-built archive
dseefeld Nov 21, 2019
d5c30f2
Merge branch 'removeSourceBuilt' of https://github.com/dseefeld/sourc…
dseefeld Nov 21, 2019
81e28aa
Add one prebuilt to additional-prebuilts-to-delete
dseefeld Nov 22, 2019
35ba6cc
Update version of SourceBuildReferencePackages
dseefeld Nov 25, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 39 additions & 6 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 @@ -173,6 +177,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 @@ -242,12 +254,6 @@ done
echo 'Copying source-built packages to tarball to replace packages needed before they are built...'
mkdir -p $TARBALL_ROOT/packages/source-built
cp -r $SCRIPT_ROOT/Tools/source-built/coreclr-tools $TARBALL_ROOT/packages/source-built/
cp $SCRIPT_ROOT/bin/obj/x64/Release/blob-feed/packages/*Arcade*.nupkg $TARBALL_ROOT/packages/source-built/
cp $SCRIPT_ROOT/bin/obj/x64/Release/blob-feed/packages/*SourceLink*.nupkg $TARBALL_ROOT/packages/source-built/
cp $SCRIPT_ROOT/bin/obj/x64/Release/blob-feed/packages/*Build*Tasks*.nupkg $TARBALL_ROOT/packages/source-built/
cp $SCRIPT_ROOT/bin/obj/x64/Release/blob-feed/packages/runtime*.nupkg $TARBALL_ROOT/packages/source-built/
cp $SCRIPT_ROOT/bin/obj/x64/Release/blob-feed/packages/*DotNetHost*.nupkg $TARBALL_ROOT/packages/source-built/
cp $SCRIPT_ROOT/bin/obj/x64/Release/blob-feed/packages/*DotNetAppHost*.nupkg $TARBALL_ROOT/packages/source-built/

# Setup package version props to include both source-built and running PackageVersions.props
mkdir --parents $TARBALL_ROOT/bin/obj/x64/Release/
Expand Down Expand Up @@ -289,6 +295,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
6 changes: 3 additions & 3 deletions dir.props
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@

<!-- Additional psuedo-versions that some repos depend on -->
<ItemGroup>
<!-- Arcade uses this property to determine which version of SourceLink to pull in -->
<ExtraPackageVersionPropsPackageInfo Condition="'$(OfflineBuild)' != 'true'" Include="MicrosoftSourceLinkVersion" Version="%24(MicrosoftSourceLinkCommonPackageVersion)" />
<ExtraPackageVersionPropsPackageInfo Condition="'$(OfflineBuild)' == 'true'" Include="MicrosoftSourceLinkVersion" Version="$(sourcelinkOutputPackageVersion)" />
<!-- Arcade uses this property to determine which version of SourceLink to pull in
SourceLink sets its own bootstrap version of this -->
<ExtraPackageVersionPropsPackageInfo Condition="'$(RepoName)' != 'sourcelink'" Include="MicrosoftSourceLinkVersion" Version="%24(MicrosoftSourceLinkCommonPackageVersion)" />
<!-- we don't produce the Windows version of this package but that's the one core-sdk keys off of for the ASP.NET version -->
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftAspNetCoreAppRuntimewinx64PackageVersion" Version="$(aspnetcoreOutputPackageVersion)" />
<!-- same thing here for CLI -->
Expand Down
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>ce459ae07c3d7a1e68251268855e0bc7b3d97f75</Sha>
</Dependency>
<Dependency Name="Private.SourceBuild.ReferencePackages" Version="1.0.0-beta.19554.1">
<Dependency Name="Private.SourceBuild.ReferencePackages" Version="1.0.0-beta.19575.1">
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
<Sha>d570630310386977b48ff9a5a53df4118374fdbb</Sha>
<Sha>7e10466c601a2220a7b9c3b769f74c06ca4fb9c9</Sha>
</Dependency>
</ToolsetDependencies>
<ProductDependencies>
Expand Down
4 changes: 2 additions & 2 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>
<!-- Production Dependencies -->
<PropertyGroup>
<PrivateSourceBuildReferencePackagesPackageVersion>1.0.0-beta.19554.1</PrivateSourceBuildReferencePackagesPackageVersion>
<PrivateSourceBuiltArtifactsPackageVersion>0.1.0-3.0.100</PrivateSourceBuiltArtifactsPackageVersion>
<PrivateSourceBuildReferencePackagesPackageVersion>1.0.0-beta.19575.1</PrivateSourceBuildReferencePackagesPackageVersion>
<PrivateSourceBuiltArtifactsPackageVersion>0.1.0-3.0.101.dev.19570.2</PrivateSourceBuiltArtifactsPackageVersion>
</PropertyGroup>
</Project>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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

Loading