user/dotnet8-runtime: now on aports
This commit is contained in:
parent
201ef47734
commit
bdccdfdba2
16 changed files with 0 additions and 1042 deletions
|
@ -1,531 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
pkgname=dotnet8-runtime
|
||||
pkgver=8.0.1
|
||||
pkgrel=0
|
||||
_gittag=v8.0.1
|
||||
_giturl="https://github.com/dotnet/dotnet"
|
||||
_testtag=d3d39e7c404c6e45c3e7ab6621c5f6cabf1540b0
|
||||
_bunnytag=v15
|
||||
_stage0ver=8.0.100-r0
|
||||
_patches="
|
||||
aspnetcore_portable-build-workaround.patch
|
||||
aspire_fix-gitinfo-target.patch
|
||||
build_enable-timestamps.patch
|
||||
installer_hard-dereference-tar-gz.patch
|
||||
roslyn-analyzer_disable-apphost.patch
|
||||
runtime_82269-mono-thread-coop-undefine-fortify-source.patch
|
||||
runtime_90251-rename-mono-cmake-host-var.patch
|
||||
runtime_enable-system-libunwind.diff
|
||||
runtime_more-clang-16-suppression.patch
|
||||
runtime_remove-usage-of-off64-t.patch
|
||||
vstest_intent-net8.0.patch
|
||||
"
|
||||
|
||||
_pkgver_macro=${pkgver%.*}
|
||||
_pkgver_prior=${pkgver%.*.*}
|
||||
_pkgver_name=${_pkgver_macro//[.0]}
|
||||
_pkgver_sdk=${pkgver/0./0.10}
|
||||
pkgdesc="The .NET $_pkgver_macro Core runtime"
|
||||
# x86: blocked by https://github.com/dotnet/runtime/issues/77667
|
||||
# armhf: blocked by https://github.com/dotnet/runtime/issues/77663
|
||||
# riscv64: blocked by https://github.com/dotnet/runtime/issues/84834
|
||||
# s390x | ppc64le: mono-based runtime still has issues on musl
|
||||
arch="all !x86 !armhf !riscv64 !s390x !ppc64le"
|
||||
url=https://dotnet.microsoft.com
|
||||
license="MIT"
|
||||
provides="dotnet$_pkgver_name=$pkgver-r$pkgrel"
|
||||
depends="
|
||||
dotnet$_pkgver_name-hostfxr
|
||||
icu-data-full
|
||||
icu-libs
|
||||
"
|
||||
checkdepends="
|
||||
babeltrace
|
||||
binutils
|
||||
coreutils
|
||||
file
|
||||
gawk
|
||||
jq
|
||||
lttng-tools
|
||||
npm
|
||||
procps
|
||||
sed
|
||||
strace
|
||||
util-linux-misc
|
||||
which
|
||||
"
|
||||
# For now package is not tested to build on itself
|
||||
# To test: replace 'dotnet-stage0-bootstrap' with 'dotnet-bootstrap'
|
||||
# and 'dotnet-stage0-artifacts' with 'dotnet-bootstrap-artifacts'
|
||||
makedepends="
|
||||
bash
|
||||
clang
|
||||
cmake
|
||||
dotnet$_pkgver_name-stage0-bootstrap=$_stage0ver
|
||||
dotnet$_pkgver_name-stage0-artifacts=$_stage0ver
|
||||
dotnet$_pkgver_name-stage0=$_stage0ver
|
||||
findutils
|
||||
git
|
||||
grep
|
||||
icu-data-full
|
||||
icu-dev
|
||||
inetutils-syslogd
|
||||
krb5-dev
|
||||
libgit2-dev
|
||||
libintl
|
||||
libucontext-dev
|
||||
libunwind-dev
|
||||
libxml2-dev
|
||||
libxml2-utils
|
||||
linux-headers
|
||||
lldb-dev
|
||||
llvm-dev
|
||||
lttng-ust-dev
|
||||
nodejs
|
||||
numactl-dev
|
||||
openssl-dev
|
||||
pigz
|
||||
rsync
|
||||
samurai
|
||||
tar
|
||||
xz
|
||||
zlib-dev
|
||||
"
|
||||
case $CARCH in
|
||||
s390x|x86) ;;
|
||||
*) makedepends="$makedepends lld-dev";;
|
||||
esac
|
||||
|
||||
subpackages="
|
||||
aspnetcore$_pkgver_name-runtime:aspnetcore_runtime:noarch
|
||||
aspnetcore$_pkgver_name-targeting-pack:aspnetcore_targeting_pack:noarch
|
||||
dotnet$_pkgver_name-runtime-artifacts::noarch
|
||||
dotnet$_pkgver_name-runtime-bootstrap
|
||||
dotnet$_pkgver_name-apphost-pack:apphost_pack
|
||||
dotnet$_pkgver_name-hostfxr
|
||||
dotnet$_pkgver_name-targeting-pack:targeting_pack:noarch
|
||||
dotnet-host:host
|
||||
"
|
||||
source="
|
||||
dotnet-tarball-$_gittag.tar.gz::https://github.com/dotnet/dotnet/archive/refs/tags/$_gittag.tar.gz
|
||||
dotnet-release-$_gittag.json::https://github.com/dotnet/dotnet/releases/download/$_gittag/release.json
|
||||
dotnet-testsuite-$_testtag.tar.gz::https://github.com/redhat-developer/dotnet-regular-tests/archive/$_testtag.tar.gz
|
||||
dotnet-bunny-$_bunnytag.tar.gz::https://github.com/redhat-developer/dotnet-bunny/archive/$_bunnytag.tar.gz
|
||||
dotnet.sh.in
|
||||
$_patches
|
||||
"
|
||||
builddir="$srcdir"/dotnet-${_gittag/v}
|
||||
_checkdir="$srcdir"/dotnet-bunny-${_bunnytag/v}
|
||||
_testdir="$srcdir"/dotnet-regular-tests-$_testtag
|
||||
_cli_root="$srcdir"/bootstrap
|
||||
_libdir="/usr/lib"
|
||||
# if true, then within pipeline environment, in which case send logs there
|
||||
# to be scooped
|
||||
if [ -d "$APORTSDIR/logs" ]; then
|
||||
_logdir="$APORTSDIR"/logs/$pkgname
|
||||
else
|
||||
_logdir="$srcdir"/logs
|
||||
fi
|
||||
|
||||
case $CARCH in
|
||||
x86_64) _dotnet_arch="x64";;
|
||||
aarch64) _dotnet_arch="arm64";;
|
||||
armv7) _dotnet_arch="arm";;
|
||||
armhf) _dotnet_arch="armv6";;
|
||||
*) _dotnet_arch="$CARCH";;
|
||||
esac
|
||||
|
||||
# Build doesn't set all the right executable bits for the right file types
|
||||
_fix_executable() {
|
||||
# add executable bit
|
||||
find "$1" -type f \( \
|
||||
-name 'apphost' -o \
|
||||
-name 'singlefilehost' -o \
|
||||
-name 'lib*so' \
|
||||
\) \
|
||||
-exec chmod +x '{}' \;
|
||||
|
||||
# remove executable bit
|
||||
find "$1" -type f \( \
|
||||
-name '*.a' -o \
|
||||
-name '*.dll' -o \
|
||||
-name '*.h' -o \
|
||||
-name '*.json' -o \
|
||||
-name '*.pdb' -o \
|
||||
-name '*.props' -o \
|
||||
-name '*.pubxml' -o \
|
||||
-name '*.targets' -o \
|
||||
-name '*.txt' -o \
|
||||
-name '*.xml' \
|
||||
\) \
|
||||
-exec chmod -x '{}' \;
|
||||
}
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
# Using system libunwind is broken on aarch64|armv7, and unused on mono-based builds
|
||||
# see https://github.com/dotnet/source-build/issues/2408,
|
||||
case $CARCH in
|
||||
aarch64|armv7) msg "Using bundled libunwind";;
|
||||
armhf|s390x|ppc64le) msg "No libunwind used";;
|
||||
*)
|
||||
msg "Using system libunwind"
|
||||
patch -p1 -i "$srcdir"/runtime_enable-system-libunwind.diff
|
||||
;;
|
||||
esac
|
||||
|
||||
# ensure that dotnet does not download artifacts provided by dotnet-artifacts
|
||||
rm -rf "$builddir"/packages/archive
|
||||
|
||||
# links logfiles to pipeline logs for easy pickup in pipelines
|
||||
mkdir -p "$_logdir" "$builddir"/artifacts
|
||||
ln -s "$_logdir" "$builddir"/artifacts/logs
|
||||
ln -s "$_logdir" "$builddir"/artifacts/log
|
||||
for i in "$builddir"/src/*; do
|
||||
if [ -f "$i" ]; then
|
||||
continue
|
||||
fi
|
||||
mkdir -p "$_logdir"/${i##*\/} "$builddir"/src/${i##*\/}/artifacts
|
||||
ln -s "$_logdir"/${i##*\/} "$builddir"/src/${i##*\/}/artifacts/log
|
||||
done
|
||||
|
||||
# dotnet requires its bootstrap to be in a writable dir
|
||||
msg "Setting up bootstrap"
|
||||
local _bootstrapdir=$(find $_libdir/dotnet/bootstrap/$_pkgver_macro* -maxdepth 0 | sort -r | head -n 1)
|
||||
if [ ! -d "$_cli_root" ]; then
|
||||
cp -r "$_bootstrapdir" "$_cli_root"
|
||||
fi
|
||||
}
|
||||
|
||||
build() {
|
||||
msg "Building $pkgname-$pkgver"
|
||||
|
||||
ulimit -n 4096
|
||||
|
||||
# Disable use of LTTng as tracing on lttng <=2.13.0 is broken
|
||||
# See https://github.com/dotnet/runtime/issues/57784.
|
||||
if [ -f "/usr/lib/liblttng-ust.so.1 " ]; then
|
||||
export DOTNET_LTTng=0
|
||||
fi
|
||||
|
||||
case "$CARCH" in
|
||||
x86*) ;;
|
||||
*)
|
||||
# clang doesn't implement this outside of x86, and it causes a later configure to fail
|
||||
export CFLAGS="${CFLAGS/-fstack-clash-protection}"
|
||||
export CXXFLAGS="${CXXFLAGS/-fstack-clash-protection}"
|
||||
;;
|
||||
esac
|
||||
|
||||
# looks for most recent recent version of _artifactsdir
|
||||
local _artifactsdir=$(find $_libdir/dotnet/artifacts/$_pkgver_macro* -maxdepth 0 | sort -r | head -n 1)
|
||||
|
||||
# ci args, else the output is forwarded to log files which isn't ideal in a
|
||||
# pipeline environment, and build by defaults uses lots of space
|
||||
local args="
|
||||
/v:minimal
|
||||
/p:LogVerbosity=minimal
|
||||
/p:MinimalConsoleLogOutput=true
|
||||
/p:CleanWhileBuilding=true
|
||||
"
|
||||
|
||||
# part of https://github.com/dotnet/installer/pull/14792 that sets this flag
|
||||
# was not integrated in 7.0.1xx yet
|
||||
case $CARCH in
|
||||
riscv64|s390x|ppc64le) local args="$args /p:SourceBuildUseMonoRuntime=true";;
|
||||
esac
|
||||
|
||||
# Sets TargetRid manually as dotnet cannot be trusted to reliably compute
|
||||
# the machine's runtime ID between releases.
|
||||
# shellcheck disable=SC2034
|
||||
. /etc/os-release
|
||||
local VERSION_ID_DOT="${VERSION_ID//[^.]}"
|
||||
while [ ${#VERSION_ID_DOT} -gt 1 ]; do
|
||||
local VERSION_ID="${VERSION_ID%.*}"
|
||||
local VERSION_ID_DOT="${VERSION_ID//[^.]}"
|
||||
done
|
||||
local VERSION_ID_DASH="${VERSION_ID//[^_]}"
|
||||
while [ ${#VERSION_ID_DASH} -ge 1 ]; do
|
||||
local VERSION_ID="${VERSION_ID%_*}"
|
||||
local VERSION_ID_DASH="${VERSION_ID//[^_]}"
|
||||
done
|
||||
local args="$args /p:TargetRid=$ID.$VERSION_ID-$_dotnet_arch"
|
||||
|
||||
./build.sh \
|
||||
--with-sdk "$_cli_root" \
|
||||
--with-packages "$_artifactsdir" \
|
||||
--release-manifest "$srcdir"/dotnet-release-$_gittag.json \
|
||||
-- $args
|
||||
}
|
||||
|
||||
check() {
|
||||
ulimit -n 4096
|
||||
# Tests timeout (in seconds)
|
||||
local _tests_timeout=1000
|
||||
# Test suite disable flags
|
||||
# following tests can only work after packaging step
|
||||
local _disabled_tests="man-pages distribution-package bash-completion install-location release-version-sane managed-symbols-available tools-in-path"
|
||||
# test broken: permission issue on lxc / pipelines
|
||||
local _disabled_tests="$_disabled_tests createdump-aspnet"
|
||||
# test broken: cannot pg_ctl can't create postgresql server
|
||||
local _disabled_tests="$_disabled_tests system-data-odbc"
|
||||
# test broken: no such file or directory bug
|
||||
local _disabled_tests="$_disabled_tests limits"
|
||||
# {bundled,system}-libunwind: use system version on all but aarch64/armv7, as broken
|
||||
# see https://github.com/redhat-developer/dotnet-regular-tests/issues/113
|
||||
# disable on mono-flavored runtime as mono does not use libunwind
|
||||
case $CARCH in
|
||||
armv7|aarch64) local _disabled_tests="$_disabled_tests system-libunwind";;
|
||||
s390x|ppc64le|armhf) local _disabled_tests="$_disabled_tests bundled-libunwind system-libunwind";;
|
||||
*) local _disabled_tests="$_disabled_tests bundled-libunwind";;
|
||||
esac
|
||||
# nativeaot is not supported on armv7
|
||||
case $CARCH in
|
||||
armv7) local _disabled_tests="$_disabled_tests nativeaot"
|
||||
esac
|
||||
|
||||
msg "Unpacking produced dotnet"
|
||||
export DOTNET_ROOT="$_checkdir/release"
|
||||
if [ ! -d "$DOTNET_ROOT" ]; then
|
||||
mkdir -p "$DOTNET_ROOT"
|
||||
tar --use-compress-program="pigz" \
|
||||
-xf "$builddir"/artifacts/$_dotnet_arch/Release/dotnet-sdk-$_pkgver_macro*.tar.gz \
|
||||
-C "$DOTNET_ROOT" \
|
||||
--no-same-owner
|
||||
fi
|
||||
export PATH="$DOTNET_ROOT:$PATH"
|
||||
# some files either should or should not have executable bits
|
||||
# (done again during packaging - this is for tests)
|
||||
_fix_executable "$DOTNET_ROOT"
|
||||
|
||||
msg "Building turkey test suite"
|
||||
if [ ! -d "$_logdir/check" ]; then
|
||||
mkdir -p "$_logdir"/check
|
||||
fi
|
||||
if [ ! -d "$_checkdir"/turkey ]; then
|
||||
cd "$_checkdir"/Turkey
|
||||
dotnet publish -bl:"$_logdir"/check/turkey.binlog -f net6.0 -c Release -p:VersionPrefix=1 -p:VersionSuffix="$(git rev-parse --short HEAD)" -o "$_checkdir"/turkey
|
||||
fi
|
||||
|
||||
msg "Running test suite"
|
||||
cd "$_testdir"
|
||||
for i in $_disabled_tests; do
|
||||
if [ -d "$i" ]; then
|
||||
sed -i 's|"enabled": true|"enabled": false|' $i/test.json
|
||||
fi
|
||||
done
|
||||
dotnet "$_checkdir"/turkey/Turkey.dll -t $_tests_timeout -l "$_logdir"/check || local ERROR=true
|
||||
if [ $ERROR ]; then
|
||||
msg "Check error reported, please check logs"
|
||||
fi
|
||||
}
|
||||
|
||||
package() {
|
||||
install -dm 755 "$pkgdir"/$_libdir/dotnet/shared
|
||||
|
||||
tar --use-compress-program="pigz" \
|
||||
-xf "$builddir"/artifacts/$_dotnet_arch/Release/dotnet-sdk-$_pkgver_macro*.tar.gz \
|
||||
-C "$pkgdir"/$_libdir/dotnet/ \
|
||||
--no-same-owner \
|
||||
./shared/Microsoft.NETCore.App
|
||||
|
||||
# some files either should or should not have executable bits
|
||||
_fix_executable "$pkgdir"
|
||||
|
||||
# Disable use of LTTng as tracing on lttng <=2,13,0 is broken
|
||||
# See https://github.com/dotnet/runtime/issues/57784.
|
||||
if [ -f "/usr/lib/liblttng-ust.so.1 " ]; then
|
||||
rm "$pkgdir"/$_libdir/dotnet/shared/Microsoft.NETCore.App/*/libcoreclrtraceptprovider.so
|
||||
fi
|
||||
}
|
||||
|
||||
artifacts() {
|
||||
pkgdesc="Internal package for building .NET $_pkgver_macro Software Development Kit"
|
||||
# hack to allow artifacts to pull itself
|
||||
provides="dotnet$_pkgver_name-bootstrap-artifacts"
|
||||
provider_priority=$_pkgver_prior
|
||||
|
||||
# directory creation
|
||||
install -dm 755 \
|
||||
"$subpkgdir"/$_libdir/dotnet/artifacts/$_pkgver_sdk \
|
||||
"$subpkgdir"/usr/share/licenses
|
||||
|
||||
# extract arch-agnostic artifacts to artifacts dir for use by future dotnet builds
|
||||
tar --use-compress-program="pigz" \
|
||||
-xf "$builddir"/artifacts/$_dotnet_arch/Release/Private.SourceBuilt.Artifacts.*.tar.gz \
|
||||
-C "$subpkgdir"/$_libdir/dotnet/artifacts/$_pkgver_sdk/ \
|
||||
--no-same-owner \
|
||||
--exclude '*Intermediate*' \
|
||||
--exclude '*alpine*'
|
||||
}
|
||||
|
||||
bootstrap() {
|
||||
pkgdesc="The .NET $_pkgver_macro Core bootstrap"
|
||||
depends=""
|
||||
|
||||
# hack for dotnetx-runtime to be able to pull itself for bootstrapping
|
||||
provides="dotnet$_pkgver_name-bootstrap"
|
||||
provider_priority=$_pkgver_prior
|
||||
|
||||
# directory creation
|
||||
install -dm 755 \
|
||||
"$subpkgdir"/$_libdir/dotnet/bootstrap/$_pkgver_sdk/docs \
|
||||
"$subpkgdir"/$_libdir/dotnet/artifacts/$_pkgver_sdk
|
||||
|
||||
# unpack sdk to bootstrap
|
||||
tar --use-compress-program="pigz" \
|
||||
-xf "$builddir"/artifacts/$_dotnet_arch/Release/dotnet-sdk-$_pkgver_macro*.tar.gz \
|
||||
-C "$subpkgdir"/$_libdir/dotnet/bootstrap/$_pkgver_sdk/ \
|
||||
--no-same-owner
|
||||
|
||||
# extract arch-specific artifacts to artifacts dir for use by future dotnet builds
|
||||
tar --use-compress-program="pigz" \
|
||||
-xf "$builddir"/artifacts/$_dotnet_arch/Release/Private.SourceBuilt.Artifacts.*.tar.gz \
|
||||
-C "$subpkgdir"/$_libdir/dotnet/artifacts/$_pkgver_sdk/ \
|
||||
--no-same-owner \
|
||||
--wildcards \
|
||||
'*alpine*'
|
||||
|
||||
# assemble docs
|
||||
find "$builddir" -iname 'dotnet*.1' -type f -exec cp '{}' "$subpkgdir"/$_libdir/dotnet/bootstrap/$_pkgver_sdk/docs/. \;
|
||||
|
||||
# completions
|
||||
install -m 755 "$builddir"/src/sdk/scripts/register-completions.bash "$subpkgdir"/$_libdir/dotnet/bootstrap/$_pkgver_sdk/.
|
||||
install -m 755 "$builddir"/src/sdk/scripts/register-completions.zsh "$subpkgdir"/$_libdir/dotnet/bootstrap/$_pkgver_sdk/.
|
||||
|
||||
# some files either should or should not have executable bits
|
||||
_fix_executable "$subpkgdir"
|
||||
|
||||
# Disable use of LTTng as tracing on lttng <=2,13,0 is broken
|
||||
# See https://github.com/dotnet/runtime/issues/57784.
|
||||
if [ -f "/usr/lib/liblttng-ust.so.1 " ]; then
|
||||
rm "$subpkgdir"/$_libdir/dotnet/bootstrap/*/shared/Microsoft.NETCore.App/*/libcoreclrtraceptprovider.so
|
||||
fi
|
||||
}
|
||||
|
||||
host() {
|
||||
pkgdesc="A generic driver for the .NET Core Command Line Interface"
|
||||
depends=""
|
||||
|
||||
install -dm 755 \
|
||||
"$subpkgdir"/etc/profile.d \
|
||||
"$subpkgdir"/etc/dotnet \
|
||||
"$subpkgdir"/usr/bin \
|
||||
"$subpkgdir"/$_libdir/dotnet
|
||||
|
||||
tar --use-compress-program="pigz" \
|
||||
-xf "$builddir"/artifacts/$_dotnet_arch/Release/dotnet-sdk-$_pkgver_macro*.tar.gz \
|
||||
-C "$subpkgdir"/$_libdir/dotnet/ \
|
||||
--no-same-owner \
|
||||
./dotnet
|
||||
|
||||
ln -s $_libdir/dotnet/dotnet "$subpkgdir"/usr/bin/dotnet
|
||||
echo "$_libdir/dotnet" > "$subpkgdir"/etc/dotnet/install_location
|
||||
echo "$_libdir/dotnet" > "$subpkgdir"/etc/dotnet/install_location_$_dotnet_arch
|
||||
sed "s|%LIBDIR%|$_libdir/dotnet|" "$srcdir"/dotnet.sh.in > "$subpkgdir"/etc/profile.d/dotnet.sh
|
||||
}
|
||||
|
||||
hostfxr() {
|
||||
pkgdesc="The .NET host resolver contains the logic to resolve and select the right version of the .NET SDK or runtime to use."
|
||||
depends="dotnet-host"
|
||||
provides="dotnet-hostfxr-$_pkgver_macro=$pkgver-r$pkgrel"
|
||||
|
||||
install -dm 755 "$subpkgdir"/$_libdir/dotnet
|
||||
|
||||
tar --use-compress-program="pigz" \
|
||||
-xf "$builddir"/artifacts/$_dotnet_arch/Release/dotnet-sdk-$_pkgver_macro*.tar.gz \
|
||||
-C "$subpkgdir"/$_libdir/dotnet/ \
|
||||
--no-same-owner \
|
||||
./host
|
||||
|
||||
# some files either should or should not have executable bits
|
||||
_fix_executable "$subpkgdir"
|
||||
}
|
||||
|
||||
aspnetcore_runtime() {
|
||||
pkgdesc="The ASP.NET $_pkgver_macro Core runtime"
|
||||
depends="dotnet$_pkgver_name-runtime"
|
||||
provides="aspnetcore-runtime-$_pkgver_macro=$pkgver-r$pkgrel"
|
||||
|
||||
install -dm 755 "$subpkgdir"/$_libdir/dotnet
|
||||
|
||||
tar --use-compress-program="pigz" \
|
||||
-xf "$builddir"/artifacts/$_dotnet_arch/Release/dotnet-sdk-$_pkgver_macro*.tar.gz \
|
||||
-C "$subpkgdir"/$_libdir/dotnet/ \
|
||||
--no-same-owner \
|
||||
./shared/Microsoft.AspNetCore.App
|
||||
|
||||
# some files either should or should not have executable bits
|
||||
_fix_executable "$subpkgdir"
|
||||
}
|
||||
|
||||
apphost_pack() {
|
||||
pkgdesc="The .NET $_pkgver_macro Core apphost pack"
|
||||
provides="dotnet-apphost-pack-$_pkgver_macro=$pkgver-r$pkgrel"
|
||||
|
||||
install -dm 755 "$subpkgdir"/$_libdir/dotnet
|
||||
|
||||
tar --use-compress-program="pigz" \
|
||||
-xf "$builddir"/artifacts/$_dotnet_arch/Release/dotnet-sdk-$_pkgver_macro*.tar.gz \
|
||||
-C "$subpkgdir"/$_libdir/dotnet/ \
|
||||
--no-same-owner \
|
||||
--wildcards \
|
||||
'./packs/Microsoft.NETCore.App.Host.*'
|
||||
|
||||
# some files either should or should not have executable bits
|
||||
_fix_executable "$subpkgdir"
|
||||
}
|
||||
|
||||
targeting_pack() {
|
||||
pkgdesc="The .NET $_pkgver_macro Core targeting pack"
|
||||
provides="dotnet-targeting-pack-$_pkgver_macro=$pkgver-r$pkgrel"
|
||||
|
||||
install -dm 755 "$subpkgdir"/$_libdir/dotnet
|
||||
|
||||
tar --use-compress-program="pigz" \
|
||||
-xf "$builddir"/artifacts/$_dotnet_arch/Release/dotnet-sdk-$_pkgver_macro*.tar.gz \
|
||||
-C "$subpkgdir"/$_libdir/dotnet/ \
|
||||
--no-same-owner \
|
||||
./packs/Microsoft.NETCore.App.Ref
|
||||
|
||||
# some files either should or should not have executable bits
|
||||
_fix_executable "$subpkgdir"
|
||||
}
|
||||
|
||||
aspnetcore_targeting_pack() {
|
||||
pkgdesc="The ASP.NET $_pkgver_macro Core targeting pack"
|
||||
provides="aspnetcore-targeting-pack-$_pkgver_macro=$pkgver-r$pkgrel"
|
||||
|
||||
install -dm 755 "$subpkgdir"/$_libdir/dotnet
|
||||
|
||||
tar --use-compress-program="pigz" \
|
||||
-xf "$builddir"/artifacts/$_dotnet_arch/Release/dotnet-sdk-$_pkgver_macro*.tar.gz \
|
||||
-C "$subpkgdir"/$_libdir/dotnet/ \
|
||||
--no-same-owner \
|
||||
./packs/Microsoft.AspNetCore.App.Ref
|
||||
|
||||
# some files either should or should not have executable bits
|
||||
_fix_executable "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
f2a1d0bf6159de441a566c53b04b6d8f31c520fdadca42670fe1eba37c5d1900fe6d930023c4b37134edf28cf5816c8bc9116ba691432b1f6d56ce2a814c3412 dotnet-tarball-v8.0.1.tar.gz
|
||||
8ddbaed1611294016cd99728b57182ee63bb4fe4b0331556ff4eb0551f9188744f04ffa5ad2034e93168090114a8eaafe411ccec286e26aa7d871da477a1b5d7 dotnet-release-v8.0.1.json
|
||||
8fe41ddd03c1b98dc9eec5e337ca0dcc8fbeff65b67ac1a383bd7d1e5fd3c21b820dacd498d1c2268445bb634cfb9dba3e8924e71a98f2ccd8221b17fb079044 dotnet-testsuite-d3d39e7c404c6e45c3e7ab6621c5f6cabf1540b0.tar.gz
|
||||
7f59b10878aa90a6953ee4d88d08fa932910a24018dace92b173ee87c847d14734f93dc5fc031982a3d0a5cb4ac223b83d0e548531c23c4e3326dc83510989a9 dotnet-bunny-v15.tar.gz
|
||||
c3f31956976b77198e72a3fef3427338b6b2961f8c121416040c1105de0ce8073e46f4c2e9ef22a001aee69cbe39621c2ddac988522693110071dfae42f2e2b7 dotnet.sh.in
|
||||
ad7373a112acc07a6a7bbc522d417b26d90b3e3ae9c1e66a6cc70af16af7e7111d9764e7758062d0a5e67f026cc44f2b111051c3d484bd56917f2144db88588b aspnetcore_portable-build-workaround.patch
|
||||
e5b9b947226456844f705e66f3f19d4519ce88f360e3f3413999c2867c31d9008db78f5806bfee7185d7548c6279ef6492a40ff24c20ed9d58b6ef66b167d7a8 aspire_fix-gitinfo-target.patch
|
||||
eed7a7481a967f6938de956a6df485efa6dd61bf36ae4a768493cb1f7da0296dc91e0f2f89f7c302083ba9cf0c778e28228ec1b52e902077a00072d7d9957ef3 build_enable-timestamps.patch
|
||||
ab362bdbbea8d8116b6bf7bf58e330ce6d7d171b42613ac03514f76afa2574b75d6566148d1b72047fbfe61b40ac67b3f2d8af87a7074c790bf882a5b7e73960 installer_hard-dereference-tar-gz.patch
|
||||
097db705c787501782a1b203e8c453453075dfcadc4f5282849c6ffdda4d7832f75c56089bced4542cc83704fe33842cc725084dac2ba261cacdaf54ae468b3c roslyn-analyzer_disable-apphost.patch
|
||||
d732df247c721c9f677baabdd7f36dbf4b564814ff64164361065bb1c196b767494a1d39f634eadf01a23032c7b3e64102614b7213065c81096bbf3f8022e6a0 runtime_82269-mono-thread-coop-undefine-fortify-source.patch
|
||||
3354fa721809f1b94c579408ee78004ff3ca2ba79212c1a0ecc424a9955bb5d5a80c115d4c30dd257526f356ea76f0562db6f83d8dd0b6135f8c689886b3348d runtime_90251-rename-mono-cmake-host-var.patch
|
||||
39e1b848d1ae81e4b81758522de7d3e36b11d2ab626565efb8e4cceae8da29018277709f0af8fcfa75be8da79f8d6432eb6aac49a5e82510c3aca34632df4d8e runtime_enable-system-libunwind.diff
|
||||
887112eb2b103eadd6887529ebae7f9a75df2c2cb168e84fd40cc09f9bcd20917d428bbba06968b07b0a463890da82b1b2b1d033a3dd016e6494067464ae6f74 runtime_more-clang-16-suppression.patch
|
||||
0c25319125ef5b0ad490b37a643c0c5257c796d5ed24f9ac404f698710b07de790bcbb0b6336d4a50025b94c3bff99b214951bd8f0a79a8d6f543ebaa300740f runtime_remove-usage-of-off64-t.patch
|
||||
5c74abbd7ea71ba6164f71b866c9da564db9ccd95f1a9a8b82f5b0b599fab6d59d64ba1157ec13d7ac36d23145f3d9de2189ed6c40f56e46555ab378c161948b vstest_intent-net8.0.patch
|
||||
"
|
|
@ -1,149 +0,0 @@
|
|||
# dotnet8-runtime
|
||||
|
||||
This is the .NET 8.0 package for Alpine Linux.
|
||||
|
||||
Please report any issues [using Gitlab](https://gitlab.alpinelinux.org/alpine/aports/-/issues/new) and tag @ayakael
|
||||
|
||||
# Building info
|
||||
|
||||
## Generated packages
|
||||
* `aspnetcore8-runtime`
|
||||
* `aspnetcore8-targeting-pack`
|
||||
* `dotnet8-apphost-pack` (used by dotnet8-runtime)
|
||||
* `dotnet8-hostfxr` (used by dotnet-host)
|
||||
* `dotnet8-runtime`
|
||||
* `dotnet8-runtime-artifacts` (aimed for internal use as bootstrap)
|
||||
* `dotnet8-runtime-bootstrap` (aimed for internal use as bootstrap)
|
||||
* `dotnet8-targeting-pack`
|
||||
* `dotnet-host`
|
||||
|
||||
## How to build dotnet8 on Alpine
|
||||
As dotnet is a self-hosting compiler (thus it compiles using itself), it
|
||||
requires a bootstrap for the initial build. To solve this problem, this package
|
||||
follows the `stage0` proposal outlined [here](https://lists.alpinelinux.org/~alpine/devel/%3C33KG0XO61I4IL.2Z7RTAZ5J3SY6%408pit.net%3E)
|
||||
|
||||
The goal of `stage0` is to bootstrap dotnet with as little intervention as
|
||||
possible, thus allowing seamless Alpine upgrades. Unfortunately, upstream only
|
||||
builds bootstraps for Alpine on `x86_64`, `aarch64`, and `armv7`. Thus, `stage0`
|
||||
has also been designed to be crossbuild aware, allowing bootstrapping to other
|
||||
platforms.
|
||||
|
||||
In summary, dotnet8 is built using three different aports.
|
||||
|
||||
* `community/dotnet8-stage0`
|
||||
Builds minimum components for full build of dotnet8, and packages these in an initial
|
||||
`dotnet8-stage0-bootstrap` package that `dotnet8-runtime` pulls.
|
||||
* `community/dotnet8-runtime`
|
||||
Builds full and packages dotnet8 fully using either stage0 or previoulsy built
|
||||
dotnet8 build.
|
||||
* `community/dotnet8-sdk`
|
||||
As abuild does not allow different versions for subpackages, a different aport
|
||||
is required to package sdk bits from dotnet8-runtime. dotnet8-runtime only
|
||||
builds 8.0.1xx feature branch of SDK. Thus, when a new feature branch of sdk is
|
||||
released, the updated components are to be built on dotnet8-sdk rather than
|
||||
simply repackaging dotnet8-runtime artifacts.
|
||||
|
||||
## Crossbuilding with `stage0`
|
||||
Crossbuilding `stage0` is a three step process:
|
||||
1. Build sysroot for target platform by using `scripts/bootstrap.sh` in aports repo:
|
||||
```
|
||||
./bootstrap.sh $CTARGET_ARCH
|
||||
```
|
||||
2. Although not necessary, it is recommended to add Alpine repositories to
|
||||
`$HOME/sysroot-$CTARGET_ARCH/etc/apk/repositories`, making sure to add required
|
||||
keys. This makes it so that whatever package is not built in step 1 will
|
||||
be pulled from package repos
|
||||
3. Crossbuild `dotnet8-stage0` via:
|
||||
```
|
||||
CHOST=$CTARGET_ARCH abuild -r
|
||||
```
|
||||
|
||||
# Specification
|
||||
|
||||
This package follows [package naming and contents suggested by upstream](https://docs.microsoft.com/en-us/dotnet/core/build/distribution-packaging),
|
||||
with two exceptions. It installs dotnet to `/usr/lib/dotnet` (aka `$_libdir`).
|
||||
In addition, the package is named `dotnet8` as opposed to `dotnet-8.0`
|
||||
to match Alpine Linux naming conventions for packages with many installable versions
|
||||
|
||||
# Contributing
|
||||
|
||||
The steps below are for the final package. Please only contribute to a
|
||||
pre-release version if you know what you are doing. Original instructions
|
||||
follow.
|
||||
|
||||
## General Changes
|
||||
|
||||
1. Fork the main aports repo.
|
||||
|
||||
2. Checkout the forked repository.
|
||||
|
||||
- `git clone ssh://git@gitlab.alpinelinux.org/$USER/aports`
|
||||
- `cd community/dotnet8-runtime`
|
||||
|
||||
3. Make your changes. Don't forget to add a changelog.
|
||||
|
||||
4. Do local builds.
|
||||
|
||||
- `abuild -r`
|
||||
|
||||
5. Fix any errors that come up and rebuild until it works locally.
|
||||
|
||||
6. Commit the changes to the git repo in a git branch
|
||||
|
||||
- `git checkout -b dotnet8/<name>`
|
||||
- `git add` any new patches
|
||||
- `git remove` any now-unnecessary patches
|
||||
- `git commit -m 'community/dotnet8-runtime: descriptive description'`
|
||||
- `git push`
|
||||
|
||||
7. Create a merge request with your changes, tagging @ayakael for review.
|
||||
|
||||
8. Once the tests in the pull-request pass, and reviewers are happy, your changes
|
||||
will be merged.
|
||||
|
||||
## Updating to an new upstream release
|
||||
|
||||
1. Fork the main aports repo.
|
||||
|
||||
2. Checkout the forked repository.
|
||||
|
||||
- `git clone ssh://git@gitlab.alpinelinux.org/$USER/aports`
|
||||
- `cd community/dotnet8-runtime`
|
||||
|
||||
|
||||
3. Build the new upstream source tarball. Update the versions in the
|
||||
APKBUILD file, and then create a snapshot. After build, update checksum.
|
||||
|
||||
- `abuild snapshot`
|
||||
- `abuild checksum`
|
||||
|
||||
4. Do local builds.
|
||||
|
||||
- `abuild -r`
|
||||
|
||||
5. Fix any errors that come up and rebuild until it works locally. Any
|
||||
patches that are needed at this point should be added to the APKBUILD file
|
||||
in `_patches` variable.
|
||||
|
||||
6. Upload the source archive to a remote location, and update `source` variable.
|
||||
|
||||
7. Commit the changes to the git repo in a git branch.
|
||||
|
||||
- `git checkout -b dotnet8/<name>`
|
||||
- `git add` any new patches
|
||||
- `git remove` any now-unnecessary patches
|
||||
- `git commit -m 'community/dotnet8-runtime: upgrade to <new-version>`
|
||||
- `git push`
|
||||
|
||||
8. Create a merge request with your changes, tagging @ayakael for review.
|
||||
|
||||
9. Once the tests in the pull-request pass, and reviewers are happy, your changes
|
||||
will be merged.
|
||||
|
||||
# Testing
|
||||
|
||||
This package uses CI tests as defined in `check()` function. Creating a
|
||||
merge-request or running a build will fire off tests and flag any issues.
|
||||
|
||||
The tests themselves are contained in this external repository:
|
||||
https://github.com/redhat-developer/dotnet-regular-tests/
|
|
@ -1,20 +0,0 @@
|
|||
diff --git a/src/aspire/Directory.Build.targets.orig b/src/aspire/Directory.Build.targets
|
||||
index 511adb03a5d..d62a050caab 100644
|
||||
--- a/src/aspire/Directory.Build.targets.orig
|
||||
+++ b/src/aspire/Directory.Build.targets
|
||||
@@ -6,13 +6,12 @@
|
||||
<PackageReadmeFile Condition="'$(PackageReadmeFile)' == '' And '$(ReadMeExists)' == 'true'">README.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
- <Import Condition="'$(SampleProject)' == 'true' or '$(CI)' != 'true' " Project="eng\Versions.dev.targets" />
|
||||
- <Import Condition="'$(SampleProject)' != 'true' and '$(CI)' == 'true' " Project="eng\Versions.targets" />
|
||||
+ <Import Project="eng\Versions.dev.targets" />
|
||||
|
||||
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
|
||||
|
||||
<ItemGroup Condition="'$(ReadMeExists)' == 'true'">
|
||||
<None Include="$(ReadMePath)" Pack="true" PackagePath="\" />
|
||||
</ItemGroup>
|
||||
-
|
||||
+
|
||||
</Project>
|
|
@ -1,43 +0,0 @@
|
|||
From 451aa3e9544b0214d0e8e844c27af3847f5bf391 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/dotnet/installer/pull/13410
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Fri, 18 Feb 2022 05:14:39 +0000
|
||||
Subject: [PATCH 1/1] musl build fix
|
||||
|
||||
Line causes build of aspnetcore on arm to look for linux version of
|
||||
CrossGen2 rather than linux-musl. This removes the line so that
|
||||
BuildOsName is pulled from TargetOsName as expected
|
||||
|
||||
This is now only necessary for portable
|
||||
builds, as https://github.com/dotnet/installer/pull/14549 has fixed
|
||||
issues relating to musl build on full source-build
|
||||
|
||||
---
|
||||
.../App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/src/aspnetcore/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj.orig b/src/aspnetcore/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj
|
||||
index 77dce00..b31b36d 100644
|
||||
--- a/src/aspnetcore/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj.orig
|
||||
+++ b/src/aspnetcore/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj
|
||||
@@ -103,8 +103,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
|
||||
Special case the crossgen2 package reference on Windows to avoid the x86 package when building in Visual Studio.
|
||||
-->
|
||||
<BuildOsName>$(TargetOsName)</BuildOsName>
|
||||
- <BuildOsName Condition="'$(TargetOsName)' == 'linux-musl' and '$(TargetArchitecture)' != 'x64'">linux</BuildOsName>
|
||||
<BuildOsName Condition=" '$(PortableBuild)' == 'false' ">$(TargetRuntimeIdentifier.Substring(0,$(TargetRuntimeIdentifier.IndexOf('-'))))</BuildOsName>
|
||||
<Crossgen2BuildArchitecture Condition=" '$(BuildOsName)' == 'win' ">x64</Crossgen2BuildArchitecture>
|
||||
<Crossgen2BuildArchitecture Condition=" '$(Crossgen2BuildArchitecture)' == '' ">$(BuildArchitecture)</Crossgen2BuildArchitecture>
|
||||
<Crossgen2PackageRootVariableName>PkgMicrosoft_NETCore_App_Crossgen2_$(BuildOsName.Replace('.', '_'))-$(Crossgen2BuildArchitecture)</Crossgen2PackageRootVariableName>
|
||||
diff --git a/repo-projects/aspnetcore.proj.orig b/repo-projects/aspnetcore.proj
|
||||
index 289b506..fadcc0d 100644
|
||||
--- a/repo-projects/aspnetcore.proj.orig
|
||||
+++ b/repo-projects/aspnetcore.proj
|
||||
@@ -13,6 +13,7 @@
|
||||
<BuildCommandArgs>$(StandardSourceBuildArgs.Replace('--publish', ''))</BuildCommandArgs>
|
||||
<!-- The arch flag (defaults to x64) overrides any value of TargetArchitecture that we might set -->
|
||||
<BuildCommandArgs>$(BuildCommandArgs) --arch $(Platform)</BuildCommandArgs>
|
||||
+ <BuildCommandArgs>$(BuildCommandArgs) --os-name linux-musl</BuildCommandArgs>
|
||||
<BuildCommandArgs>$(BuildCommandArgs) --no-build-repo-tasks</BuildCommandArgs>
|
||||
<BuildCommandArgs>$(BuildCommandArgs) --no-build-nodejs</BuildCommandArgs>
|
||||
<BuildCommandArgs>$(BuildCommandArgs) /p:PublishCompressedFilesPathPrefix=$(SourceBuiltAspNetCoreRuntime)</BuildCommandArgs>
|
|
@ -1,40 +0,0 @@
|
|||
diff --git a/repo-projects/Directory.Build.props b/repo-projects/Directory.Build.props
|
||||
index b70a3161fef..d57f9393299 100644
|
||||
--- a/repo-projects/Directory.Build.props
|
||||
+++ b/repo-projects/Directory.Build.props
|
||||
@@ -134,6 +134,7 @@
|
||||
<StandardSourceBuildArgs>$(StandardSourceBuildArgs) $(FlagParameterPrefix)pack</StandardSourceBuildArgs>
|
||||
<StandardSourceBuildArgs>$(StandardSourceBuildArgs) $(FlagParameterPrefix)publish</StandardSourceBuildArgs>
|
||||
<StandardSourceBuildArgs>$(StandardSourceBuildArgs) -bl</StandardSourceBuildArgs>
|
||||
+ <StandardSourceBuildArgs>$(StandardSourceBuildArgs) /consoleLoggerParameters:ShowTimestamp</StandardSourceBuildArgs>
|
||||
|
||||
<StandardSourceBuildArgs>$(StandardSourceBuildArgs) /p:ArcadeBuildFromSource=true</StandardSourceBuildArgs>
|
||||
<StandardSourceBuildArgs>$(StandardSourceBuildArgs) /p:CopyWipIntoInnerSourceBuildRepo=true</StandardSourceBuildArgs>
|
||||
<StandardSourceBuildArgs>$(StandardSourceBuildArgs) /p:DotNetBuildOffline=true</StandardSourceBuildArgs>
|
||||
|
||||
diff --git a/src/fsharp/eng/build.sh b/src/fsharp/eng/build.sh
|
||||
index fff8414b3ef..d470fc6ed56 100755
|
||||
--- a/src/fsharp/eng/build.sh
|
||||
+++ b/src/fsharp/eng/build.sh
|
||||
@@ -144,7 +144,7 @@ while [[ $# > 0 ]]; do
|
||||
--sourcebuild)
|
||||
source_build=true
|
||||
;;
|
||||
- /p:*)
|
||||
+ /*)
|
||||
properties="$properties $1"
|
||||
;;
|
||||
*)
|
||||
diff --git a/src/roslyn/eng/build.sh b/src/roslyn/eng/build.sh
|
||||
index a08cbea099d..d3ec235732f 100755
|
||||
--- a/src/roslyn/eng/build.sh
|
||||
+++ b/src/roslyn/eng/build.sh
|
||||
@@ -167,7 +167,7 @@ while [[ $# > 0 ]]; do
|
||||
args="$args $1"
|
||||
shift
|
||||
;;
|
||||
- /p:*)
|
||||
+ /*)
|
||||
properties="$properties $1"
|
||||
;;
|
||||
*)
|
|
@ -1,12 +0,0 @@
|
|||
# Set location for AppHost lookup
|
||||
[ -z "$DOTNET_ROOT" ] && export DOTNET_ROOT=%LIBDIR%
|
||||
|
||||
# Add dotnet tools directory to PATH
|
||||
DOTNET_TOOLS_PATH="$HOME/.dotnet/tools"
|
||||
case "$PATH" in
|
||||
*"$DOTNET_TOOLS_PATH"* ) true ;;
|
||||
* ) PATH="$PATH:$DOTNET_TOOLS_PATH" ;;
|
||||
esac
|
||||
|
||||
# Extract self-contained executables under HOME to avoid multi-user issues from using the default '/var/tmp'
|
||||
[ -z "$DOTNET_BUNDLE_EXTRACT_BASE_DIR" ] && export DOTNET_BUNDLE_EXTRACT_BASE_DIR="${XDG_CACHE_HOME:-"$HOME"/.cache}/dotnet_bundle_extract"
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/src/installer/src/core-sdk-tasks/TarGzFileCreateFromDirectory.cs.orig b/src/installer/src/core-sdk-tasks/TarGzFileCreateFromDirectory.cs
|
||||
index 06b9857..066d595 100644
|
||||
--- a/src/installer/src/core-sdk-tasks/TarGzFileCreateFromDirectory.cs.orig
|
||||
+++ b/src/installer/src/core-sdk-tasks/TarGzFileCreateFromDirectory.cs
|
||||
@@ -131,7 +131,7 @@ private string GetSourceSpecification()
|
||||
|
||||
private string GetDestinationArchive()
|
||||
{
|
||||
- return $"-czf {DestinationArchive}";
|
||||
+ return $"--hard-dereference -czf {DestinationArchive}";
|
||||
}
|
||||
|
||||
private string GetExcludes()
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/src/installer/src/redist/targets/GenerateLayout.targets.orig b/src/installer/src/redist/targets/GenerateLayout.targets
|
||||
index a27834f..0c899d4 100644
|
||||
--- a/src/installer/src/redist/targets/GenerateLayout.targets.orig
|
||||
+++ b/src/installer/src/redist/targets/GenerateLayout.targets
|
||||
@@ -85,7 +85,7 @@
|
||||
<WinFormsAndWpfSharedFxArchiveFileName>windowsdesktop-runtime-$(MicrosoftWindowsDesktopAppRuntimePackageVersion)-$(SharedFrameworkRid)$(ArchiveExtension)</WinFormsAndWpfSharedFxArchiveFileName>
|
||||
|
||||
<Crossgen2Rid>$(HostOSName)-$(BuildArchitecture)</Crossgen2Rid>
|
||||
- <Crossgen2Rid Condition="'$(DotNetBuildFromSource)' == 'true'">$(SharedFrameworkRid)</Crossgen2Rid>
|
||||
+ <Crossgen2Rid Condition="'$(DotNetBuildFromSource)' == 'true'">$(SharedFrameworkRid.SubString(0, $(SharedFrameworkRid.LastIndexOf('-'))))-$(BuildArchitecture)</Crossgen2Rid>
|
||||
|
||||
<AspNetCoreInstallerRid Condition="'$(AspNetCoreInstallerRid)' == ''">$(SharedFrameworkRid)</AspNetCoreInstallerRid>
|
||||
<AspNetCoreInstallerRid Condition="'$(SharedFrameworkRid)' == 'rhel.6-x64'">linux-x64</AspNetCoreInstallerRid>
|
|
@ -1,28 +0,0 @@
|
|||
From 79f02a53316f90543d60269d7c06727c376f423b Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Wed, 24 Aug 2022 18:41:08 +0000
|
||||
Subject: [PATCH 1/1] disable apphost usage
|
||||
|
||||
Roslyn-analyzer can't seem to find apphost produced by runtime build on ppc64le
|
||||
This disables its use as it isn't necessary
|
||||
|
||||
---
|
||||
diff --git a/src/roslyn-analyzers/src/PerformanceTests/Tests/PerformanceTests.csproj.orig b/src/roslyn-analyzers/src/PerformanceTests/Tests/PerformanceTests.csproj
|
||||
index 7b454a4..bbe18ae 100644
|
||||
--- a/src/roslyn-analyzers/src/PerformanceTests/Tests/PerformanceTests.csproj.orig
|
||||
+++ b/src/roslyn-analyzers/src/PerformanceTests/Tests/PerformanceTests.csproj
|
||||
@@ -16,6 +16,7 @@
|
||||
<IsPackable>false</IsPackable>
|
||||
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
|
||||
<MicrosoftCodeAnalysisVersion>$(MicrosoftCodeAnalysisVersionForTests)</MicrosoftCodeAnalysisVersion>
|
||||
+ <UseAppHost>false</UseAppHost>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BenchmarkDotNet" Version="$(BenchmarkDotNetVersion)" />
|
||||
@@ -28,4 +29,4 @@
|
||||
<ProjectReference Include="..\Utilities\CSharp\CSharpPerfUtilities.csproj" />
|
||||
<ProjectReference Include="..\Utilities\VisualBasic\VisualBasicPerfUtilities.csproj" />
|
||||
</ItemGroup>
|
||||
-</Project>
|
||||
\ No newline at end of file
|
||||
+</Project>
|
|
@ -1,25 +0,0 @@
|
|||
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.
|
||||
See: https://gitlab.alpinelinux.org/alpine/aports/-/issues/14105. Alpine Linux
|
||||
now sets this by default since https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/43463,
|
||||
which makes mono-flavored runtime dump its core. This patch offers a workaround
|
||||
by undefining _FORTIFY_SOURCE in the problematic file.
|
||||
|
||||
---
|
||||
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>
|
|
@ -1,24 +0,0 @@
|
|||
From 65877a9c1260c1c37d1c3355703b1951b6754cdf Mon Sep 17 00:00:00 2001
|
||||
From: Adeel <3840695+am11@users.noreply.github.com>
|
||||
Date: Mon, 20 Mar 2023 19:36:14 +0200
|
||||
Subject: [PATCH] Specify -z notext on linux-musl-x86
|
||||
|
||||
---
|
||||
src/coreclr/CMakeLists.txt | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/runtime/src/coreclr/CMakeLists.txt b/src/runtime/src/coreclr/CMakeLists.txt
|
||||
index 67b773bf78787..87d862a541ae6 100644
|
||||
--- a/src/runtime/src/coreclr/CMakeLists.txt
|
||||
+++ b/src/runtime/src/coreclr/CMakeLists.txt
|
||||
@@ -109,6 +109,10 @@ if(CLR_CMAKE_HOST_UNIX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
+ if(CLR_CMAKE_TARGET_ALPINE_LINUX AND CLR_CMAKE_TARGET_ARCH_I386)
|
||||
+ add_linker_flag(-Wl,-z,notext)
|
||||
+ endif()
|
||||
+
|
||||
if(NOT CLR_CMAKE_HOST_MACCATALYST AND NOT CLR_CMAKE_HOST_IOS AND NOT CLR_CMAKE_HOST_TVOS)
|
||||
add_subdirectory(pal)
|
||||
add_subdirectory(hosts)
|
|
@ -1,80 +0,0 @@
|
|||
From 828269b7e68039f8bc0bdac66e2fd5c58b6d3471 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/dotnet/runtime/pull/90251
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Wed, 9 Aug 2023 11:36:39 -0400
|
||||
Subject: [PATCH 1/1] Rename CMAKE var for mono on libc-musl
|
||||
|
||||
---
|
||||
src/mono/CMakeLists.txt | 6 +++---
|
||||
src/mono/mono/mini/CMakeLists.txt | 12 ++++++------
|
||||
2 files changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/runtime/src/coreclr/pgosupport.cmake b/src/runtime/src/coreclr/pgosupport.cmake
|
||||
index 719ac14ad99..34a42781ab2 100644
|
||||
--- a/src/runtime/src/coreclr/pgosupport.cmake
|
||||
+++ b/src/runtime/src/coreclr/pgosupport.cmake
|
||||
@@ -25,13 +25,13 @@ function(add_pgo TargetName)
|
||||
target_compile_options(${TargetName} PRIVATE -flto -fprofile-instr-generate)
|
||||
set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS " -flto -fprofile-instr-generate")
|
||||
if(CMAKE_CROSSCOMPILING AND CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
- if (CLR_CMAKE_HOST_ALPINE_LINUX)
|
||||
+ if (CLR_CMAKE_TARGET_LINUX_MUSL)
|
||||
set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS " -resource-dir ${CMAKE_SYSROOT}/usr/lib/clang/${CMAKE_C_COMPILER_VERSION}")
|
||||
- else(CLR_CMAKE_HOST_ALPINE_LINUX)
|
||||
+ else(CLR_CMAKE_TARGET_LINUX_MUSL)
|
||||
string(REPLACE "." ";" CLANG_VERSION "${CMAKE_C_COMPILER_VERSION}")
|
||||
list(POP_FRONT CLANG_VERSION CLANG_VERSION_MAJOR)
|
||||
set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS " -resource-dir ${CMAKE_SYSROOT}/usr/lib/llvm-${CLANG_VERSION_MAJOR}/lib/clang/${CMAKE_C_COMPILER_VERSION}")
|
||||
- endif(CLR_CMAKE_HOST_ALPINE_LINUX)
|
||||
+ endif(CLR_CMAKE_TARGET_LINUX_MUSL)
|
||||
endif(CMAKE_CROSSCOMPILING AND CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
if(NOT LD_LLVM)
|
||||
set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS " -fuse-ld=gold")
|
||||
diff --git a/src/runtime/src/mono/CMakeLists.txt b/src/runtime/src/mono/CMakeLists.txt
|
||||
index e04d9e9d364..00e54a25d69 100644
|
||||
--- a/src/runtime/src/mono/CMakeLists.txt
|
||||
+++ b/src/runtime/src/mono/CMakeLists.txt
|
||||
@@ -943,10 +943,10 @@ else()
|
||||
set(DISABLE_DLLMAP 1)
|
||||
endif()
|
||||
|
||||
-if(CLR_CMAKE_HOST_ALPINE_LINUX)
|
||||
- # Setting RLIMIT_NOFILE breaks debugging of coreclr on Alpine Linux for some reason
|
||||
+if(CLR_CMAKE_TARGET_LINUX_MUSL)
|
||||
+ # Setting RLIMIT_NOFILE breaks debugging of coreclr on musl-libc for some reason
|
||||
add_definitions(-DDONT_SET_RLIMIT_NOFILE)
|
||||
- # On Alpine Linux, we need to ensure that the reported stack range for the primary thread is
|
||||
+ # On musl-libc, we need to ensure that the reported stack range for the primary thread is
|
||||
# larger than the initial committed stack size.
|
||||
add_definitions(-DENSURE_PRIMARY_STACK_SIZE)
|
||||
endif()
|
||||
diff --git a/src/runtime/src/mono/mono/mini/CMakeLists.txt.orig b/src/runtime/src/mono/mono/mini/CMakeLists.txt
|
||||
index 5d6ef3d..c3e5414 100644
|
||||
--- a/src/runtime/src/mono/mono/mini/CMakeLists.txt.orig
|
||||
+++ b/src/runtime/src/mono/mono/mini/CMakeLists.txt
|
||||
@@ -400,9 +400,9 @@ if(NOT DISABLE_SHARED_LIBS)
|
||||
endif()
|
||||
target_compile_definitions(monosgen-shared PRIVATE -DMONO_DLL_EXPORT)
|
||||
# Alpine Linux implements ucontext in a different library
|
||||
- if(CLR_CMAKE_HOST_ALPINE_LINUX AND TARGET_S390X)
|
||||
+ if(CLR_CMAKE_TARGET_LINUX_MUSL AND TARGET_S390X)
|
||||
target_link_libraries(monosgen-shared PRIVATE ucontext)
|
||||
- endif(CLR_CMAKE_HOST_ALPINE_LINUX AND TARGET_S390X)
|
||||
+ endif(CLR_CMAKE_TARGET_LINUX_MUSL AND TARGET_S390X)
|
||||
set_target_properties(monosgen-shared PROPERTIES OUTPUT_NAME ${MONO_SHARED_LIB_NAME})
|
||||
if(MONO_SET_RPATH_ORIGIN)
|
||||
set_target_properties(monosgen-shared PROPERTIES INSTALL_RPATH "$ORIGIN")
|
||||
@@ -601,10 +601,10 @@ if(NOT DISABLE_EXECUTABLES)
|
||||
target_link_libraries(mono-sgen PRIVATE icu_shim_objects)
|
||||
endif()
|
||||
target_link_libraries(mono-sgen PRIVATE ${OS_LIBS} ${LLVM_LIBS} ${ICU_LIBS} ${Z_LIBS})
|
||||
- # Alpine Linux implements ucontext in a different library
|
||||
- if(CLR_CMAKE_HOST_ALPINE_LINUX AND TARGET_S390X)
|
||||
+ # musl-libc implements ucontext in a different library
|
||||
+ if(CLR_CMAKE_TARGET_LINUX_MUSL AND TARGET_S390X)
|
||||
target_link_libraries(mono-sgen PRIVATE ucontext)
|
||||
- endif(CLR_CMAKE_HOST_ALPINE_LINUX AND TARGET_S390X)
|
||||
+ endif(CLR_CMAKE_TARGET_LINUX_MUSL AND TARGET_S390X)
|
||||
if(NOT DISABLE_COMPONENTS AND STATIC_COMPONENTS AND NOT DISABLE_LINK_STATIC_COMPONENTS)
|
||||
# if components are built statically, link them into runtime.
|
||||
target_sources(mono-sgen PRIVATE "${mono-components-objects}")
|
|
@ -1,12 +0,0 @@
|
|||
diff --git a/src/runtime/eng/SourceBuild.props.orig b/src/runtime/eng/SourceBuild.props
|
||||
index 1e9d5cf..c40e4fa 100644
|
||||
--- a/src/runtime/eng/SourceBuild.props.orig
|
||||
+++ b/src/runtime/eng/SourceBuild.props
|
||||
@@ -48,6 +48,7 @@
|
||||
<InnerBuildArgs Condition="'$(OfficialBuildId)' != ''">$(InnerBuildArgs) /p:OfficialBuildId=$(OfficialBuildId)</InnerBuildArgs>
|
||||
<InnerBuildArgs Condition="'$(ContinuousIntegrationBuild)' != ''">$(InnerBuildArgs) /p:ContinuousIntegrationBuild=$(ContinuousIntegrationBuild)</InnerBuildArgs>
|
||||
<InnerBuildArgs Condition="'$(SourceBuildUseMonoRuntime)' == 'true'">$(InnerBuildArgs) --usemonoruntime</InnerBuildArgs>
|
||||
+ <InnerBuildArgs>$(InnerBuildArgs) --cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE</InnerBuildArgs>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/src/runtime/eng/native/configurecompiler.cmake b/src/runtime/eng/native/configurecompiler.cmake
|
||||
index c9a54547c0a..931da2cae5b 100644
|
||||
--- a/src/runtime/eng/native/configurecompiler.cmake
|
||||
+++ b/src/runtime/eng/native/configurecompiler.cmake
|
||||
@@ -488,6 +488,8 @@ if (CLR_CMAKE_HOST_UNIX)
|
||||
# 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)
|
||||
+ add_compile_options(-Wno-ignored-attributes)
|
||||
else()
|
||||
add_compile_options(-Wno-uninitialized)
|
||||
add_compile_options(-Wno-strict-aliasing)
|
|
@ -1,26 +0,0 @@
|
|||
diff --git a/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp.orig b/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp
|
||||
index 20b2494..165b190 100644
|
||||
--- a/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp.orig
|
||||
+++ b/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp
|
||||
@@ -469,7 +469,7 @@ CrashInfo::ReadProcessMemory(void* address, void* buffer, size_t size, size_t* r
|
||||
// performance optimization.
|
||||
m_canUseProcVmReadSyscall = false;
|
||||
assert(m_fdMem != -1);
|
||||
- *read = pread64(m_fdMem, buffer, size, (off64_t)address);
|
||||
+ *read = pread(m_fdMem, buffer, size, (off_t)address);
|
||||
}
|
||||
|
||||
if (*read == (size_t)-1)
|
||||
diff --git a/src/runtime/src/coreclr/debug/createdump/crashinfo.cpp.orig b/src/runtime/src/coreclr/debug/createdump/crashinfo.cpp
|
||||
index 5addb79..79655d1 100644
|
||||
--- a/src/runtime/src/coreclr/debug/createdump/crashinfo.cpp.orig
|
||||
+++ b/src/runtime/src/coreclr/debug/createdump/crashinfo.cpp
|
||||
@@ -760,7 +760,7 @@ CrashInfo::PageMappedToPhysicalMemory(uint64_t start)
|
||||
}
|
||||
|
||||
uint64_t pagemapOffset = (start / PAGE_SIZE) * sizeof(uint64_t);
|
||||
- uint64_t seekResult = lseek64(m_fdPagemap, (off64_t) pagemapOffset, SEEK_SET);
|
||||
+ uint64_t seekResult = lseek(m_fdPagemap, (off_t) pagemapOffset, SEEK_SET);
|
||||
if (seekResult != pagemapOffset)
|
||||
{
|
||||
int seekErrno = errno;
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/src/vstest/test/Intent/Intent.csproj b/src/vstest/test/Intent/Intent.csproj
|
||||
index bb711c9256..6d0b199a9b 100644
|
||||
--- a/src/vstest/test/Intent/Intent.csproj
|
||||
+++ b/src/vstest/test/Intent/Intent.csproj
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
- <TargetFramework>net6.0</TargetFramework>
|
||||
+ <TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
Loading…
Reference in a new issue