community/dotnet6-stage0: upgrade to 6.0.115

This commit is contained in:
Antoine Martin 2023-03-28 17:23:27 -04:00 committed by Antoine Martin
parent 5043f84ead
commit 5994361ff3
6 changed files with 245 additions and 236 deletions

View file

@ -2,17 +2,18 @@
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=dotnet6-stage0
pkgver=6.0.112
pkgver=6.0.115
pkgrel=0
[ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross=""
# Tag of tarball generator.
_gittag=v6.0.112
_gittag=v$pkgver
# Versions of prebuilt artifacts and bootstrap tar
_artifactsver=6.0.112
_bootstrapver="6.0.112"
_bootstrapver="6.0.115"
_bootstraprel=0
_installerver=$_bootstrapver
# Version of packages that aren't defined in git-info
@ -23,13 +24,13 @@ _iltoolsver=6.0.12-servicing.22579.1
# build_* patches applies directly to $builddir
_patches="
aspnetcore_use-linux-musl-crossgen-on-non-x64.patch
build_set-local-repo.patch
installer_2780-reprodicible-tarball.patch
installer_runtimepacks.patch
roslyn_57003-mono-namedmutex.patch
roslyn_allow-extra-params.patch
roslyn_revert-lift-version-codeanalysis.patch
runtime_76500-mono-musl-support.patch
runtime_81573-suppress-clang-16-warnings.patch
runtime_82269-mono-thread-coop-undefine-fortify-source.patch
runtime_build-with-no-strict-prototypes.patch
runtime_lld-fix.patch
runtime_no-additional-runtime-id.patch
@ -44,8 +45,9 @@ _pkgver_macro=${pkgver%.*}
_pkgver_prior=1
_pkgver_name="${_pkgver_macro//[.0]}"
pkgdesc="The .NET Core stage0 bits for dotnet build"
#arch="x86_64 aarch64 armv7 s390x"
arch="x86_64 aarch64 armv7 s390x"
url=https://www.microsoft.com/net/core
_giturl="https://github.com/dotnet/installer"
license="MIT"
options="!check" # Testsuite in main -build aport
subpackages="
@ -53,16 +55,16 @@ subpackages="
dotnet$_pkgver_name-stage0-bootstrap
"
source="
https://repo.gpg.nz/apk/archives/dotnet-${_gittag/release\/}.tar.xz
https://lab.ilot.io/dotnet/installer/-/releases/$_gittag/downloads/tarball/dotnet-$_gittag.tar.xz
dotnet-sdk-$_bootstrapver-linux-musl-x64.noextract::https://dotnetcli.azureedge.net/dotnet/Sdk/$_bootstrapver/dotnet-sdk-$_bootstrapver-linux-musl-x64.tar.gz
dotnet-sdk-$_bootstrapver-linux-musl-arm64.noextract::https://dotnetcli.azureedge.net/dotnet/Sdk/$_bootstrapver/dotnet-sdk-$_bootstrapver-linux-musl-arm64.tar.gz
dotnet-sdk-$_bootstrapver-linux-musl-arm.noextract::https://dotnetcli.azureedge.net/dotnet/Sdk/$_bootstrapver/dotnet-sdk-$_bootstrapver-linux-musl-arm.tar.gz
dotnet-sdk-$_bootstrapver-linux-musl-s390x.noextract::https://repo.gpg.nz/apk/archives/dotnet-sdk-$_bootstrapver-linux-musl-s390x.tar.gz
dotnet-sdk-$_bootstrapver-r$_bootstraprel-linux-musl-s390x.noextract::https://lab.ilot.io/ayakael/dotnet-stage0/-/releases/$_bootstrapver-r$_bootstraprel/downloads/sdk/dotnet-sdk-$_bootstrapver-r$_bootstraprel-linux-musl-s390x.tar.xz
Private.SourceBuilt.Artifacts.$_artifactsver.noextract::https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.$_artifactsver.tar.gz
https://globalcdn.nuget.org/packages/runtime.linux-musl-x64.microsoft.netcore.ilasm.6.0.0.nupkg
https://globalcdn.nuget.org/packages/runtime.linux-musl-arm64.microsoft.netcore.ilasm.6.0.0.nupkg
https://globalcdn.nuget.org/packages/runtime.linux-musl-arm.microsoft.netcore.ilasm.6.0.0.nupkg
https://repo.gpg.nz/apk/archives/runtime.linux-musl-s390x.microsoft.netcore.ilasm.6.0.0.nupkg
runtime.linux-musl-s390x.microsoft.netcore.ilasm.6.0.0.nupkg::https://lab.ilot.io/ayakael/dotnet-stage0/-/package_files/1513/download
$_extra_nupkgs
$_patches
"
@ -76,6 +78,7 @@ makedepends_host="
gcc
grep
icu-dev
jq
krb5-dev
libintl
libstdc++
@ -141,7 +144,10 @@ fi
# generates tarball containing all components built by dotnet
snapshot() {
local _pkg="$srcdir"/${builddir##*/}.tar
ulimit -n 4096
export NUGET_PACKAGES=$_nugetdir
if [ -d "$srcdir" ]; then
cd "$srcdir"
else
@ -150,13 +156,15 @@ snapshot() {
if [ -d "installer" ]; then
cd "$srcdir"/installer
else
git clone https://github.com/dotnet/installer && cd "$srcdir"/installer
git clone $_giturl --branch $_gittag && cd "$srcdir"/installer
fi
git checkout $_gittag
sed 's|/src/installer||' "$startdir"/installer_2780-reprodicible-tarball.patch | patch -Np1 || true
if [ ! -d "$_cli_root" ]; then
local _cli_root=
sed 's|<Exec Command="tar.*|<Exec Command="tar -cf $(TarballFilePath) -C $(TarballDir)/.. $([MSBuild]::MakeRelative($([System.IO.Path]::GetDirectoryName($(TarballDir))), $(TarballDir)))" />|' -i src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets
if [ -d "$_libdir/dotnet/bootstrap" ]; then
local _cli_root="$(find /usr/lib/dotnet/bootstrap/6.0* -maxdepth 0 -type d | sort -r | head -n 1)"
else
local _cli_root=""
fi
_InitializeDotNetCli="$_cli_root" DOTNET_INSTALL_DIR="$_cli_root" DotNetBuildFromSource=true ./build.sh \
@ -171,17 +179,10 @@ snapshot() {
abuild checksum
}
prepare() {
default_prepare
# adjusts sdk version to expected
sed "s|6.0.100|$_bootstrapver|" -i "$builddir"/src/roslyn/global.json
sed "s|6.0.100|$_bootstrapver|" -i "$builddir"/src/sdk/global.json
for i in sdk installer aspnetcore roslyn; do
sed "s|@@PACKAGESDIR@@|$_packagesdir|" -i "$builddir"/src/$i/NuGet.config
done
mkdir -p "$_cli_root"
mkdir -p $_packagesdir $_downloaddir $_outputdir $_nugetdir
@ -200,7 +201,20 @@ prepare() {
unzip -po "$srcdir"/runtime.linux-musl-$_dotnet_arch.microsoft.netcore.ilasm.*.nupkg runtimes/linux-musl-$_dotnet_arch/native/ilasm > $_cli_root/ilasm
chmod +x "$_cli_root"/ilasm
tar --use-compress-program="pigz" -xf "$srcdir"/dotnet-sdk-$_pkgver_macro*$_dotnet_arch.noextract -C "$_cli_root" --no-same-owner
tar -xf "$srcdir"/dotnet-sdk-$_pkgver_macro*$_dotnet_arch.noextract -C "$_cli_root" --no-same-owner
for i in $_extra_nupkgs; do
local filename=${i/::*}
local filename=${filename##*/}
$_nuget push "$srcdir"/$filename --source="$_packagesdir"
done
# adjusts sdk version and packagedir to expected
for i in runtime sdk installer aspnetcore roslyn; do
$_nuget add source $_packagesdir --name local --configfile "$builddir"/src/$i/NuGet.config
tmp=$(mktemp)
jq ".sdk.version = \"$_bootstrapver\"" "$builddir"/src/$i/global.json > $tmp && mv $tmp "$builddir"/src/$i/global.json
done
}
_runtime() {
@ -221,7 +235,7 @@ _runtime() {
/consoleLoggerParameters:ShowTimestamp
/p:NoPgoOptimize=true
/p:EnableNgenOptimization=false
/p:GitCommitHash=$(cat ./.git/HEAD)
/p:GitCommitHash=$(grep GitCommitHash "$builddir"/git-info/runtime.props | sed -E 's|</?GitCommitHash>||g' | tr -d ' ')
/p:ILAsmToolPath=$_cli_root
"
if [ "$CBUILD" != "$CHOST" ]; then
@ -253,7 +267,7 @@ _roslyn() {
-c Release
-bl
/consoleLoggerParameters:ShowTimestamp
/p:GitCommitHash=$(cat ./.git/HEAD)
/p:GitCommitHash=$(grep GitCommitHash "$builddir"/git-info/roslyn.props | sed -E 's|</?GitCommitHash>||g' | tr -d ' ')
"
if [ "$_roslynver" != "${_roslynver##*-}" ]; then
local args="$args /p:VersionSuffix=${_roslynver##*-}"
@ -285,7 +299,7 @@ _sdk() {
-c Release
-bl
/consoleLoggerParameters:ShowTimestamp
/p:GitCommitHash=$(cat ./.git/HEAD)
/p:GitCommitHash=$(grep GitCommitHash "$builddir"/git-info/sdk.props | sed -E 's|</?GitCommitHash>||g' | tr -d ' ')
/p:Architecture=$_dotnet_target
"
if [ "$_sdkver" != "${_sdkver##*-}" ]; then
@ -316,7 +330,7 @@ _aspnetcore() {
-no-build-nodejs
-bl
/consoleLoggerParameters:ShowTimestamp
/p:GitCommitHash=$(cat ./.git/HEAD)
/p:GitCommitHash=$(grep GitCommitHash "$builddir"/git-info/aspnetcore.props | sed -E 's|</?GitCommitHash>||g' | tr -d ' ')
/p:DotNetAssetRootUrl=file://$_downloaddir/
"
case $CARCH in
@ -350,7 +364,8 @@ _installer() {
/p:Architecture=$_dotnet_target
/p:CoreSetupBlobRootUrl=file://$_downloaddir/
/p:DotnetToolsetBlobRootUrl=file://$_downloaddir/
/p:GitCommitHash=$(cat ./.git/HEAD)
/p:EnableSourceLink=false
/p:GitCommitHash=$(grep GitCommitHash "$builddir"/git-info/installer.props | sed -E 's|</?GitCommitHash>||g' | tr -d ' ')
/p:GitCommitCount=$(grep GitCommitCount "$builddir"/git-info/installer.props | sed -E 's|</?GitCommitCount>||g' | tr -d ' ')
/p:PublicBaseURL=file://$_downloaddir/
"
@ -433,7 +448,11 @@ bootstrap() {
# copies artifacts to artifacts dir for use by future dotnet builds
for i in $_nupkgsArray; do install -Dm644 "$_packagesdir"/$i "$subpkgdir"/$_libdir/dotnet/artifacts/$pkgver/ || true; done
for i in $_extra_nupkgs; do install -Dm644 "$srcdir"/${i##*/} "$subpkgdir"/$_libdir/dotnet/artifacts/$pkgver/; done
for i in $_extra_nupkgs; do
local filename=${i/::*}
local filename=${filename##*/}
install -Dm644 "$srcdir"/$filename "$subpkgdir"/$_libdir/dotnet/artifacts/$pkgver/
done
msg "Changing iltools version to $_iltoolsver"
# source-build expects a certain version of ilasm, ildasm and testhost
@ -480,11 +499,11 @@ artifacts() {
}
sha512sums="
a308859d2b3e2946c38b400e9711cd34c52fbabf927fca7212ed3a87ba495b8fa125e043b4890d01c59a152930e92fdced40fd2eed9e7da3b13345cfe2a7dc6f dotnet-v6.0.112.tar.xz
6d23a7fe8dbddb0785811271326aa3f0bcd68db85c1a148c4e21eb6fd7347a1381dac9c077e4d01c17b08570cffea4b4cf43f78c3f83c2177e66a8c4531c237d dotnet-sdk-6.0.112-linux-musl-x64.noextract
6000baf38c8b92ea4c71ecc6b3f2dcffbe6e0b3d3e8846f7c296180d0ac1d94905542df3453dc8fae16c3ae351d6380f053017d86207c2e58affdc67c93fff1b dotnet-sdk-6.0.112-linux-musl-arm64.noextract
2d0bdbc564853ea9c6daf4a1fb7940c28bf3a766ef857a4fcccaa42f8b3ccda53f8b968b83187e1387a8119502175a8f92215a24eeacd843c018a01b44e140cc dotnet-sdk-6.0.112-linux-musl-arm.noextract
79389787b851ebdbe0ea2dcafa172aba313e72db795b02cc2ad0b42b9dd9017ed26c3e4cdc987711bedb2237211dcd2f7d05ba90d9e4f4f2a43dbdeb1990874a dotnet-sdk-6.0.112-linux-musl-s390x.noextract
d205bd65e5d51b9471805553c2a8a4c34cf81df72eaede9072541061c78109356b8b77d0b2fdc85eb33b3907facf7d06aca9247e03830df66f91385e62237ec1 dotnet-v6.0.115.tar.xz
025f21c494ed0c63e3c5acb17d4c95b51d049b9ecf6c9bde0700368fe63cf0067d74777c020f6e497cd148c68ddc0c1d807cb074aff7b520be88e6309ad1cce3 dotnet-sdk-6.0.115-linux-musl-x64.noextract
ff98fe117814e2e623be5c5d273e1d9cc22c0694e7e042212e4cd91605fbacc9a37cb5ca62b070abd520769511c52e9887ea3c47e9ac7d7762088787b544cef5 dotnet-sdk-6.0.115-linux-musl-arm64.noextract
4f693041514bb1344b1c1a5144bf0aa1fd5a2965db768df79f6d0760208944eb98d281af080e4c181a29ecaddedcfdde82f03678204cc27895cef5c5e1dd5bf1 dotnet-sdk-6.0.115-linux-musl-arm.noextract
c2053bff25e8634a3f6cf58d12a23921d55ff88a3a7c86fcc75450d2887f56bf43fe93d7da735b01b94fa822866fe8b9a060477501248eb25b9f705aa6a138b8 dotnet-sdk-6.0.115-r0-linux-musl-s390x.noextract
64fffa28143c28ceefbae08e8086746e177a11242f6a5b778bc5597190748c9d3e869020d7d3f4b74efaad7fbb73258765e227c9bdd098501fdbbc7e7e6ec05b Private.SourceBuilt.Artifacts.6.0.112.noextract
0eb771d7e23607a256f209c958a8025af6a7c1e20948b244f2903941aad5e1c0f130a9285ee29086d6188090e8692f5f129329a88da54d3f0a7e7e5b7e4257ef runtime.linux-musl-x64.microsoft.netcore.ilasm.6.0.0.nupkg
5ad26a79b5ba3ebdc6932dde50218d2c0669377dcb628debbb448e0dfc5d001d7e07b121f18ecd50b667ab372e10ec0bfe166a6e2103faf2f824995fdad0c355 runtime.linux-musl-arm64.microsoft.netcore.ilasm.6.0.0.nupkg
@ -492,16 +511,16 @@ a308859d2b3e2946c38b400e9711cd34c52fbabf927fca7212ed3a87ba495b8fa125e043b4890d01
efdc9097028d11ddc2e9e052c57d62af333705b5108093077238d8b98fb5e250d75ac62cec5842bd9989bf6d737736a70ed4f512c69b356314805c24f3f1d698 runtime.linux-musl-s390x.microsoft.netcore.ilasm.6.0.0.nupkg
a24efb7578e2020e17c877ffe00b49f8f476b0845fdc55c16404008a9566d8628a72c2208bd23df745c88592ebe9c922b0cf1bc1f95f834b539bbcc2cbf516c5 system.reactive.core.4.1.1.nupkg
7462305c0aed05c0d18ea5ebf8a9d04c7e15d826ff5682d14ce256393e8d05094d3be244fdc550cb1ab9fa45400c4d92783faac03960ef156fa25b4073728fdb aspnetcore_use-linux-musl-crossgen-on-non-x64.patch
8db70e1df88894ae9095f1ddd277ef52c6e02678bb9ec34c44378aeb76694d8b8f7db47c0a7dbcb395b14481ef3f643e3bd3ffe23f9d16a2290cd7ff2ea7b98c build_set-local-repo.patch
5a60254d58f4a2f3bafb75cfafc84ed6a0c5705714b7a6fb3bc84463d80abff98c9ac04adcdb0390d143dbb2b8cbd626cefb289a9f1dddfa963a240abc9b7725 installer_2780-reprodicible-tarball.patch
53194e107801ae36668599697fa42d7bf6ef24baff63987a3289e95b971f83a9c50ed1815efeb67ba86afbd1172ae6db964022d0f4a85ba4409a1d622c6c999f installer_runtimepacks.patch
42779a7bf1004fe0f7054cfa4f09f49d7f2a57c0543ec994ffbd54fb349abb508295476098ed35d60e9676be8bcc15aa8a9ec5c814cd1e058357530b5cdfb2b6 roslyn_57003-mono-namedmutex.patch
ead82bb2276acc273d661e42597c76661984143bb7736cd6a64241f51b2da3b9b8625b6232e24c7f9a6965436f65a5b7bf1ba7669a01e6b9774ebd3a62f7ebe0 roslyn_allow-extra-params.patch
cf40e37b4adfc61e24e3b48a397b4d813726d190f271869d946035279bf662a694a0fca448f5ae06ad2bb2300595223109ad64f60f65dac5cddf9308e12147a3 roslyn_revert-lift-version-codeanalysis.patch
e67e0114bd324dae65eb19f6fa8c74414bee77cd30e299931b0d82b4ca1b6b6f88358a0c47ffb180f46c5cb28f61f79bb4a59d43c1ae3011bfe491e757de293a runtime_76500-mono-musl-support.patch
eb957e55c39b6adc9de079861e6e2279c8fa9d65aab019fb9a02de1549136f511f8d4b39d689aef3c73a7a86a90a9e8372c34a934a500afa0325bedf3ee9f97c runtime_81573-suppress-clang-16-warnings.patch
827e899a83103f666dc3d57c1ec695bebc659a574f4a1d754da0cafe8c18d7db79c3950267e905fa078f94612ee1101fbddd0ea62b3c08947d8bcd7d9c8de41c runtime_82269-mono-thread-coop-undefine-fortify-source.patch
f1960cb573ca33437d29a5a98fa05df848c95fde2f9e0dd3344be8583c1cc98d3034b6b4d8fea2643ae29046fe312529651207da33b66e892b76b62e637dfbc2 runtime_build-with-no-strict-prototypes.patch
5f465f6e3bfbff66551a5690eb41be46735f8e0b1e6e6503038521a8cc60cd66b7839426319ec304f785c9f074ef588b1f189ad6dbb6ced53257af28b09388f2 runtime_lld-fix.patch
564463cf898ee82a96f54303f7663527192ccd097a27b68c27fe6c9a5b7c9ac352dc23c7658f180ef3194433ededbf0d01fee3194604f6ca8b20dd17d3ebf9dd runtime_no-additional-runtime-id.patch
521f47ffcd6120722588718aee99952f90cc5e6940bc8e0bcd460bdc05df33b4380b3fca9adb42a0e6abe8516c4d93d6f318bb21c7f091c7b248c18081453fc4 runtime_no-additional-runtime-id.patch
173105cf8e63f2e15c8b46d598f1338416a0da1ce77e0862cfb774c41e7883c70d0d733ed56fae5ab091ea96f8d6dd70e0e873b5dac6edb4e1266a08f68f2986 runtime_s390x-build.patch
b5f28aa8bdbd24c589276a60893859965eb78b0abfbdac7a6e86715ac87e3bbd8bc271852ff62a41ea83b53af02e1c1814abcccc8862c07b3ac74633d1be0a32 sdk_dummyshim-fix.patch
"

View file

@ -1,64 +0,0 @@
From 46382e01243e30156660f6efe84a9afee0c5c1aa Mon Sep 17 00:00:00 2001
From: Antoine Martin <dev@ayakael.net>
Date: Sun, 28 Aug 2022 05:19:20 +0000
Subject: [PATCH 2/2] aspnetcore_set-local-repo
Patch necessary for stage0, as each component requires the artifacts
from previously built component. This patch (along with a prepare step
in aport) adds a "local" nupkg repository that artifacts are pushed to
at end of component build
---
src/aspnetcore/NuGet.config | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/aspnetcore/NuGet.config b/src/aspnetcore/NuGet.config
index a26b4ca86..1f40b8f06 100644
--- a/src/aspnetcore/NuGet.config
+++ b/src/aspnetcore/NuGet.config
@@ -2,6 +2,7 @@
<configuration>
<packageSources>
<clear />
+ <add key="local" value="@@PACKAGESDIR@@" />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-runtime -->
<add key="darc-int-dotnet-runtime-163a635" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-runtime-163a6359/nuget/v3/index.json" />
diff --git a/src/roslyn/NuGet.config b/src/roslyn/NuGet.config
index a26b4ca86..1f40b8f06 100644
--- a/src/roslyn/NuGet.config
+++ b/src/roslyn/NuGet.config
@@ -3,6 +3,7 @@
<configuration>
<packageSources>
<clear />
+ <add key="local" value="@@PACKAGESDIR@@" />
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
<add key="dotnet5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
diff --git a/src/sdk/NuGet.config b/src/sdk/NuGet.config
index 2773a4d0b..9aab732f7 100644
--- a/src/sdk/NuGet.config
+++ b/src/sdk/NuGet.config
@@ -2,6 +2,7 @@
<configuration>
<packageSources>
<clear />
+ <add key="local" value="@@PACKAGESDIR@@" />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-aspnetcore -->
<add key="darc-int-dotnet-aspnetcore-6a01dd1" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-aspnetcore-6a01dd1e/nuget/v3/index.json" />
diff --git a/src/installer/NuGet.config b/src/installer/NuGet.config
index 8cac51c22..c07e44968 100644
--- a/src/installer/NuGet.config
+++ b/src/installer/NuGet.config
@@ -5,6 +5,7 @@
</solution>
<packageSources>
<clear />
+ <add key="local" value="@@PACKAGESDIR@@" />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-aspnetcore -->
<add key="darc-int-dotnet-aspnetcore-6a01dd1" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-aspnetcore-6a01dd1e/nuget/v3/index.json" />
--
2.37.1

View file

@ -1,127 +0,0 @@
From 3669424e83ce393e2e0ee3f23b5a255c3a11a192 Mon Sep 17 00:00:00 2001
Patch-Source: https://github.com/dotnet/installer/issues/2780
From: Antoine Martin <dev@ayakael.net>
Date: Wed, 16 Feb 2022 15:59:42 +0000
Subject: [PATCH 1/1] reproducible tarball
By default, tarball is not reprodicible due to a select few of volatile
files. This volatility is associated with .git directories and
OfficialBuildId of a few packages that source it from tarball build
date. This patch allows stripping of git directories to bare minimum and
sources OfficialBuildId with generic date to be modified later for
build.
---
.../src/Tarball_WriteSourceRepoProperties.cs | 6 +--
.../tools/SourceBuildArcadeTarball.targets | 9 +++--
.../SourceBuildArcadeTarball_strip-git.sh | 38 +++++++++++++++++++
3 files changed, 46 insertions(+), 7 deletions(-)
create mode 100755 src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball_strip-git.sh
diff --git a/src/installer/src/SourceBuild/Arcade/src/Tarball_WriteSourceRepoProperties.cs b/src/installer/src/SourceBuild/Arcade/src/Tarball_WriteSourceRepoProperties.cs
index b6b2793f3..55d680971 100644
--- a/src/installer/src/SourceBuild/Arcade/src/Tarball_WriteSourceRepoProperties.cs
+++ b/src/installer/src/SourceBuild/Arcade/src/Tarball_WriteSourceRepoProperties.cs
@@ -105,12 +105,12 @@ private static DerivedVersion GetVersionInfo(string version, string commitCount)
if (releaseParts.Length == 2)
{
// NuGet does this - arbitrary build IDs
- return new DerivedVersion { OfficialBuildId = DateTime.Now.ToString("yyyyMMdd.1"), PreReleaseVersionLabel = releaseParts[0] };
+ return new DerivedVersion { OfficialBuildId = DateTime.Now.ToString("19900101.1"), PreReleaseVersionLabel = releaseParts[0] };
}
else if (releaseParts.Length == 3)
{
// VSTest uses full dates for the first part of their preview build numbers
- if (DateTime.TryParseExact(releaseParts[1], "yyyyMMdd", new CultureInfo("en-US"), DateTimeStyles.AssumeLocal, out DateTime fullDate))
+ if (DateTime.TryParseExact(releaseParts[1], "19900101", new CultureInfo("en-US"), DateTimeStyles.AssumeLocal, out DateTime fullDate))
{
return new DerivedVersion { OfficialBuildId = $"{releaseParts[1]}.{releaseParts[2]}", PreReleaseVersionLabel = releaseParts[0] };
}
@@ -139,7 +139,7 @@ private static DerivedVersion GetVersionInfo(string version, string commitCount)
{
// finalized version number (x.y.z) - probably not our code
// VSTest, Application Insights, Newtonsoft.Json do this
- return new DerivedVersion { OfficialBuildId = DateTime.Now.ToString("yyyyMMdd.1"), PreReleaseVersionLabel = string.Empty };
+ return new DerivedVersion { OfficialBuildId = DateTime.Now.ToString("19900101.1"), PreReleaseVersionLabel = string.Empty };
}
throw new FormatException($"Can't derive a build ID from version {version} (commit count {commitCount}, release {string.Join(";", nugetVersion.Release.Split('-', '.'))})");
diff --git a/src/installer/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets b/src/installer/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets
index a516a86cf..eb5858ba3 100644
--- a/src/installer/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets
+++ b/src/installer/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets
@@ -15,6 +15,7 @@
<PropertyGroup>
<ArtifactsDir>$(RepoRoot)artifacts/</ArtifactsDir>
<TarballDir>$(ArtifactsDir)tarball/</TarballDir>
+ <TarballNameDir>$([MSBuild]::MakeRelative($([System.IO.Path]::GetDirectoryName($(TarballDir))), $(TarballDir)))</TarballNameDir>
<TarballRootDir>$([MSBuild]::EnsureTrailingSlash('$(TarballDir)'))</TarballRootDir>
<TarballSourceDir>$(TarballRootDir)src/</TarballSourceDir>
<TarballGitInfoDir>$(TarballRootDir)git-info/</TarballGitInfoDir>
@@ -42,7 +43,7 @@
<Error Text="TarballFilePath not specified." Condition=" '$(TarballFilePath)' == '' " />
<MakeDir Directories="$(TarballFileDir)" Condition=" '$(TarballFileDir)' != '' " />
- <Exec Command="tar --numeric-owner -zcf $(TarballFilePath) -C $(TarballDir) ." />
+ <Exec Command="tar --format=gnu --sort=name --owner=0 --group=0 --numeric-owner --mtime='1990-01-01Z' -cf $(TarballFilePath) -C $(TarballDir)/.. $(TarballNameDir)" />
<Message Text="Tarball '$(TarballFilePath)' was successfully created from '$(TarballDir)'" Importance="High" />
</Target>
@@ -189,10 +190,10 @@
Command="git config --file $(TarballRepoSourceDir)/.git/config --add remote.origin.url $(OriginalRepoUri)"
WorkingDirectory="$(RepoRoot)"/>
- <!-- Remove the git objects folder to free up tarball space -->
+ <!-- Strips git directories / submodules to bare minimum for reproducibility -->
<Exec
- Command="rm -rf objects"
- WorkingDirectory="$(TarballRepoSourceDir).git"
+ Command="$(RepoRoot)/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball_strip-git.sh $(SourceDir)"
+ WorkingDirectory="$(TarballSourceDir)"
Condition="$(PreserveTarballGitFolders) != 'true'" />
<Message Text="--> Done Cloning Repo $(SourceBuildRepoName)" Importance="High" />
diff --git a/src/installer/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball_strip-git.sh b/src/installer/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball_strip-git.sh
new file mode 100755
index 000000000..63858732f
--- /dev/null
+++ b/src/installer/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball_strip-git.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+repodir="$1"
+
+gitdir="$repodir"/.git
+stripdir="$repodir"/.strip
+mkdir "$stripdir"
+
+commit=$(git -C "$repodir" rev-parse HEAD)
+url="$(grep -m 1 url "$gitdir"/config)"
+url=${url#*= }
+
+echo $commit > "$stripdir"/HEAD
+{
+echo "[remote \"origin\"]"
+echo " url = \"$url\""
+} > "$stripdir"/config
+
+if [ -f "$repodir"/.gitmodules ]; then
+ cat "$repodir"/.gitmodules >> "$stripdir"/config
+
+ for subdir in $(find "$gitdir"/modules -type f -name 'config'); do
+ subdir=${subdir/\/config}
+ substripdir="${subdir/.git/.strip}"
+ commit=$(git -C "$subdir" rev-parse HEAD)
+ url="$(grep -m 1 url "$subdir"/config)"
+ url=${url#*= }
+
+ mkdir -p "$substripdir"
+ echo $commit > "$substripdir"/HEAD
+ {
+ echo "[remote \"origin\"]"
+ echo " url = \"$url\""
+ } > "$substripdir"/config
+ done
+fi
+
+rm -fR "$gitdir"
+mv "$stripdir" "$gitdir"

View file

@ -0,0 +1,157 @@
From 9e1945b03c7dd7772f2b97a1149f07f7cbd63ed8 Mon Sep 17 00:00:00 2001
Patch-Source: https://github.com/dotnet/runtime/pull/81573
From: Antoine Martin <dev@ayakael.net>
Date: Tue, 28 Mar 2023 13:58:40 -0400
Subject: [PATCH 1/1] Suppress clang-16 warnings
---
eng/native/configurecompiler.cmake | 8 ++++++++
src/coreclr/dlls/mscordbi/CMakeLists.txt | 5 +----
src/coreclr/dlls/mscordbi/mscordbi.cpp | 15 +++++++++++++++
src/native/corehost/apphost/static/CMakeLists.txt | 4 ++--
.../apphost/static/singlefilehost_OSXexports.src | 11 -----------
.../apphost/static/singlefilehost_unixexports.src | 4 ----
6 files changed, 26 insertions(+), 21 deletions(-)
delete mode 100644 src/native/corehost/apphost/static/singlefilehost_OSXexports.src
diff --git a/src/runtime/eng/native/init-compiler.sh b/src/runtime/eng/native/init-compiler.sh
index 883c7c5..4555cbe 100755
--- a/src/runtime/eng/native/init-compiler.sh
+++ b/src/runtime/eng/native/init-compiler.sh
@@ -46,8 +46,8 @@ if [[ -z "$CLR_CC" ]]; then
# Set default versions
if [[ -z "$majorVersion" ]]; then
# note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero.
- if [[ "$compiler" == "clang" ]]; then versions=( 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 )
- elif [[ "$compiler" == "gcc" ]]; then versions=( 11 10 9 8 7 6 5 4.9 ); fi
+ if [[ "$compiler" == "clang" ]]; then versions=( 16 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 )
+ elif [[ "$compiler" == "gcc" ]]; then versions=( 12 11 10 9 8 7 6 5 4.9 ); fi
for version in "${versions[@]}"; do
parts=(${version//./ })
diff --git a/src/runtime/eng/native/configurecompiler.cmake b/src/runtime/eng/native/configurecompiler.cmake
index f3526deb19f..6cf0577a774 100644
--- a/src/runtime/eng/native/configurecompiler.cmake
+++ b/src/runtime/eng/native/configurecompiler.cmake
@@ -367,6 +367,15 @@ if (CLR_CMAKE_HOST_UNIX)
add_compile_options(-Wno-incompatible-ms-struct)
add_compile_options(-Wno-reserved-identifier)
+
+ # clang 16.0 introduced buffer hardening https://discourse.llvm.org/t/rfc-c-buffer-hardening/65734
+ # which we are not conforming to yet.
+ add_compile_options(-Wno-unsafe-buffer-usage)
+
+ # other clang 16.0 suppressions
+ add_compile_options(-Wno-single-bit-bitfield-constant-conversion)
+ add_compile_options(-Wno-cast-function-type-strict)
+ add_compile_options(-Wno-incompatible-function-pointer-types-strict)
else()
add_compile_options(-Wno-unknown-pragmas)
add_compile_options(-Wno-uninitialized)
diff --git a/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt b/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
index c7a23c9923f..4a03a788a71 100644
--- a/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
+++ b/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
@@ -99,10 +99,7 @@ elseif(CLR_CMAKE_HOST_UNIX)
mscordaccore
)
- # COREDBI_LIBRARIES is mentioned twice because ld is one pass linker and will not find symbols
- # if they are defined after they are used. Having all libs twice makes sure that ld will actually
- # find all symbols.
- target_link_libraries(mscordbi ${COREDBI_LIBRARIES} ${COREDBI_LIBRARIES})
+ target_link_libraries(mscordbi ${COREDBI_LIBRARIES})
add_dependencies(mscordbi mscordaccore)
diff --git a/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp b/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp
index afd2cfe8002..489c552a0bd 100644
--- a/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp
+++ b/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp
@@ -26,3 +26,18 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
// Defer to the main debugging code.
return DbgDllMain(hInstance, dwReason, lpReserved);
}
+
+#if defined(HOST_LINUX) && defined(TARGET_LINUX)
+PALIMPORT HINSTANCE PALAPI DAC_PAL_RegisterModule(IN LPCSTR lpLibFileName);
+PALIMPORT VOID PALAPI DAC_PAL_UnregisterModule(IN HINSTANCE hInstance);
+
+HINSTANCE PALAPI PAL_RegisterModule(IN LPCSTR lpLibFileName)
+{
+ return DAC_PAL_RegisterModule(lpLibFileName);
+}
+
+VOID PALAPI PAL_UnregisterModule(IN HINSTANCE hInstance)
+{
+ DAC_PAL_UnregisterModule(hInstance);
+}
+#endif
diff --git a/src/runtime/src/native/corehost/apphost/static/CMakeLists.txt b/src/runtime/src/native/corehost/apphost/static/CMakeLists.txt
index a00c7913986..6d491c086da 100644
--- a/src/runtime/src/native/corehost/apphost/static/CMakeLists.txt
+++ b/src/runtime/src/native/corehost/apphost/static/CMakeLists.txt
@@ -73,8 +73,8 @@ if(CLR_CMAKE_TARGET_WIN32)
add_linker_flag("/DEF:${CMAKE_CURRENT_SOURCE_DIR}/singlefilehost.def")
else()
- if(CLR_CMAKE_TARGET_OSX)
- set(DEF_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/singlefilehost_OSXexports.src)
+ if(CLR_CMAKE_TARGET_FREEBSD)
+ set(DEF_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/singlefilehost_freebsdexports.src)
else()
set(DEF_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/singlefilehost_unixexports.src)
endif()
diff --git a/src/runtime/src/native/corehost/apphost/static/singlefilehost_OSXexports.src b/src/runtime/src/native/corehost/apphost/static/singlefilehost_OSXexports.src
deleted file mode 100644
index 18d5697e845..00000000000
--- a/src/runtime/src/native/corehost/apphost/static/singlefilehost_OSXexports.src
+++ /dev/null
@@ -1,11 +0,0 @@
-; Licensed to the .NET Foundation under one or more agreements.
-; The .NET Foundation licenses this file to you under the MIT license.
-
-; needed by SOS
-DotNetRuntimeInfo
-
-; DAC table export
-g_dacTable
-
-; Used by profilers
-MetaDataGetDispenser
diff --git a/src/runtime/src/native/corehost/apphost/static/singlefilehost_unixexports.src b/src/runtime/src/native/corehost/apphost/static/singlefilehost_unixexports.src
index 1f9c5178218..18d5697e845 100644
--- a/src/runtime/src/native/corehost/apphost/static/singlefilehost_unixexports.src
+++ b/src/runtime/src/native/corehost/apphost/static/singlefilehost_unixexports.src
@@ -9,7 +9,3 @@ g_dacTable
; Used by profilers
MetaDataGetDispenser
-
-; FreeBSD needs to reexport these
-__progname
-environ
--
diff --git a/src/runtime/src/libraries/Native/Unix/CMakeLists.txt b/src/runtime/src/libraries/Native/Unix/CMakeLists.txt
index 6931f62d24c..4f7375a59c6 100644
--- a/src/runtime/src/libraries/Native/Unix/CMakeLists.txt
+++ b/src/runtime/src/libraries/Native/Unix/CMakeLists.txt
@@ -51,6 +51,15 @@ if(CMAKE_C_COMPILER_ID STREQUAL Clang)
add_compile_options(-Wthread-safety)
add_compile_options(-Wno-thread-safety-analysis)
add_compile_options(-Wno-reserved-identifier)
+
+ # clang 16.0 introduced buffer hardening https://discourse.llvm.org/t/rfc-c-buffer-hardening/65734
+ # which we are not conforming to yet.
+ add_compile_options(-Wno-unsafe-buffer-usage)
+
+ # other clang 16.0 suppressions
+ add_compile_options(-Wno-single-bit-bitfield-constant-conversion)
+ add_compile_options(-Wno-cast-function-type-strict)
+ add_compile_options(-Wno-incompatible-function-pointer-types-strict)
elseif(CMAKE_C_COMPILER_ID STREQUAL GNU)
add_compile_options(-Wno-stringop-truncation)
endif()
2.38.4

View file

@ -0,0 +1,25 @@
From 98054ea87ce70247bb09ceafd2ad1a0b36d2fef4 Mon Sep 17 00:00:00 2001
Patch-Source: https://github.com/dotnet/runtime/issues/82269
From: Antoine Martin <dev@ayakael.net>
Date: Sat, 1 Oct 2022 09:21:58 -0400
Subject: [PATCH] Undefine fortify-source on mono-thread-coop
When _FORTIFY_SOURCE=2, there is a bug relating to memcpy that expresses itself.
which makes mono-flavored runtime dump its core. This patch offers a workaround
by undefining _FORTIFY_SOURCE in the problematic file.
See: https://github.com/dotnet/runtime/issues/82269
---
diff --git a/src/runtime/src/mono/mono/utils/mono-threads-coop.c b/src/runtime/src/mono/mono/utils/mono-threads-coop.c
index 4ed659d6605..34bb5785fba 100644
--- a/src/runtime/src/mono/mono/utils/mono-threads-coop.c
+++ b/src/runtime/src/mono/mono/utils/mono-threads-coop.c
@@ -15,6 +15,7 @@
#ifdef TARGET_MACH
#define _DARWIN_C_SOURCE
#endif
+#undef _FORTIFY_SOURCE
#include <mono/utils/mono-compiler.h>
#include <mono/utils/mono-threads.h>

View file

@ -7,20 +7,19 @@ For some reason, AdditionalRuntimeIdentifiers gets set as '$arch' rather than 'l
Since we know our portable RID exists, just skip ensuring RID existence
---
diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj
index 5ff979046a5..e0af5d1ca02 100644
--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj
diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj.orig b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj
index 84d4bb8..58f7e01 100644
--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj.orig
+++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj
@@ -16,9 +16,6 @@
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
@@ -17,8 +17,6 @@
<NoWarn>$(NoWarn);NU5128</NoWarn> <!-- No Dependencies-->
<PackageDescription>Provides runtime information required to resolve target framework, platform, and runtime specific implementations of .NETCore packages.</PackageDescription>
-
- <!-- When building from source, ensure the RID we're building for is part of the RID graph -->
- <AdditionalRuntimeIdentifiers Condition="'$(DotNetBuildFromSource)' == 'true'">$(AdditionalRuntimeIdentifiers);$(OutputRID)</AdditionalRuntimeIdentifiers>
<ServicingVersion>7</ServicingVersion>
<ServicingVersion>8</ServicingVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
--
2.37.1