*/*: clean-up community and testing
This commit is contained in:
parent
0a669827a1
commit
67cebc80bd
128 changed files with 0 additions and 13781 deletions
|
@ -1,588 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
# secfixes:
|
||||
# 6.0.106-r0:
|
||||
# - CVE-2022-30184
|
||||
# 6.0.108-r0:
|
||||
# - CVE-2022-34716
|
||||
# 6.0.109-r0:
|
||||
# - CVE-2022-38013
|
||||
# 6.0.110-r0:
|
||||
# - CVE-2022-41032
|
||||
# 6.0.112-r0:
|
||||
# - CVE-2022-41089
|
||||
# 6.0.113-r0:
|
||||
# - CVE-2023-21538
|
||||
# 6.0.114-r0:
|
||||
# - CVE-2023-21808
|
||||
# 6.0.116-r0:
|
||||
# - CVE-2023-28260
|
||||
# 6.0.118-r0:
|
||||
# - CVE-2023-24895
|
||||
# - CVE-2023-24897
|
||||
# - CVE-2023-24936
|
||||
# - CVE-2023-29331
|
||||
# - CVE-2023-29337
|
||||
# - CVE-2023-33126
|
||||
# - CVE-2023-33128
|
||||
# - CVE-2023-33135
|
||||
# 6.0.120-r0:
|
||||
# - CVE-2023-33127
|
||||
# - CVE-2023-33170
|
||||
# 6.0.121-r0:
|
||||
# - CVE-2023-35390
|
||||
# - CVE-2023-38180
|
||||
# - CVE-2023-35391
|
||||
# 6.0.122-r0:
|
||||
# - CVE-2023-36792
|
||||
# - CVE-2023-36793
|
||||
# - CVE-2023-36794
|
||||
# - CVE-2023-36796
|
||||
# - CVE-2023-36799
|
||||
# 6.0.123-r0:
|
||||
# - CVE-2023-44487
|
||||
# 6.0.124-r0:
|
||||
# - CVE-2023-36792
|
||||
# - CVE-2023-36793
|
||||
# - CVE-2023-36794
|
||||
# - CVE-2023-36796
|
||||
# - CVE-2023-36799
|
||||
# - CVE-2023-44487
|
||||
# 6.0.125-r0:
|
||||
# - CVE-2023-36049
|
||||
# - CVE-2023-36558
|
||||
|
||||
|
||||
pkgname=dotnet6-build
|
||||
pkgver=6.0.125
|
||||
pkgrel=0
|
||||
_gittag=v$pkgver
|
||||
_giturl="https://github.com/dotnet/installer"
|
||||
_testtag=e1cc0f181ffd4d755756d30d985513897d592ba4
|
||||
_bunnytag=71880bd94711519f7b786248a88a827a401207a2
|
||||
_llvmver=16
|
||||
_patches="
|
||||
build_14816-non-portable-build.patch
|
||||
build_14816-update-portable-rid-logic.patch
|
||||
build_disable-apphost.diff
|
||||
installer_14816-update-portable-rid-logic.patch
|
||||
msbuild_optional-systemconfiguration.patch
|
||||
msbuild_optional-systemsecurity.patch
|
||||
roslyn_57003-mono-namedmutex.patch
|
||||
runtime_76500-mono-musl-support.patch
|
||||
runtime_82269-mono-thread-coop-undefine-fortify-source.patch
|
||||
runtime_enable-system-libunwind.diff
|
||||
runtime_remove-usage-of-off64-t.patch
|
||||
sdk_14239-add-zsh-compdef-completion-script.patch
|
||||
sdk_telemetry-optout.patch
|
||||
"
|
||||
|
||||
_pkgver_macro=${pkgver%.*}
|
||||
_pkgver_prior=${pkgver%.*.*}
|
||||
_pkgver_name=${_pkgver_macro//[.0]}
|
||||
pkgdesc="The .NET $_pkgver_macro bootstrap"
|
||||
arch="x86_64 aarch64 armv7"
|
||||
url=https://dotnet.microsoft.com
|
||||
license="MIT"
|
||||
# hack for dotnetx-build to be able to pull itself for bootstrapping
|
||||
provides="dotnet$_pkgver_name-bootstrap"
|
||||
provider_priority=$_pkgver_prior
|
||||
checkdepends="
|
||||
babeltrace
|
||||
binutils
|
||||
coreutils
|
||||
file
|
||||
gawk
|
||||
jq
|
||||
lttng-tools
|
||||
npm
|
||||
procps
|
||||
sed
|
||||
strace
|
||||
util-linux-misc
|
||||
which
|
||||
"
|
||||
makedepends="
|
||||
alpine-release
|
||||
bash
|
||||
clang$_llvmver
|
||||
cmake
|
||||
dotnet$_pkgver_name-bootstrap
|
||||
dotnet$_pkgver_name-bootstrap-artifacts
|
||||
dotnet$_pkgver_name-stage0
|
||||
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$_llvmver-dev
|
||||
lttng-ust-dev
|
||||
nodejs
|
||||
numactl-dev
|
||||
openssl-dev
|
||||
pigz
|
||||
rsync
|
||||
tar
|
||||
xz
|
||||
zlib-dev
|
||||
"
|
||||
case $CARCH in
|
||||
s390x|x86) ;;
|
||||
*) makedepends="$makedepends lld-dev";;
|
||||
esac
|
||||
|
||||
subpackages="
|
||||
dotnet$_pkgver_name-artifacts:artifacts:noarch
|
||||
dotnet$_pkgver_name-sdk
|
||||
dotnet$_pkgver_name-templates:templates:noarch
|
||||
dotnet-zsh-completion:zshcomp:noarch
|
||||
dotnet-bash-completion:bashcomp:noarch
|
||||
dotnet-doc
|
||||
netstandard21-targeting-pack:netstandard_targeting_pack:noarch
|
||||
"
|
||||
source="
|
||||
https://lab.ilot.io/mirrors/installer/-/releases/$_gittag/downloads/tarball/dotnet-$_gittag.tar.xz
|
||||
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
|
||||
$_patches
|
||||
"
|
||||
builddir="$srcdir"/dotnet-$_gittag
|
||||
_checkdir="$srcdir"/dotnet-bunny-${_bunnytag/v}
|
||||
_testdir="$srcdir"/dotnet-regular-tests-$_testtag
|
||||
_cli_root="$srcdir"/bootstrap
|
||||
_nugetdir="$srcdir"/nuget-cache
|
||||
_artifactsdir="$_cli_root"/artifacts
|
||||
_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 '{}' \;
|
||||
}
|
||||
|
||||
# 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
|
||||
mkdir -p "$srcdir" && cd "$srcdir"
|
||||
fi
|
||||
if [ -d "installer" ]; then
|
||||
cd "$srcdir"/installer
|
||||
else
|
||||
git clone $_giturl --branch $_gittag && cd "$srcdir"/installer
|
||||
fi
|
||||
|
||||
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 \
|
||||
/p:ArcadeBuildTarball=true \
|
||||
/p:TarballDir=$builddir \
|
||||
/p:TarballFilePath=$_pkg
|
||||
|
||||
msg "Compressing ${builddir##*/}.tar to $SRCDEST"
|
||||
xz -T0 -9 -vv -e -c > "$SRCDEST"/${builddir##*/}.tar.xz < "$_pkg"
|
||||
|
||||
cd "$startdir"
|
||||
abuild checksum
|
||||
}
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
ulimit -n 4096
|
||||
|
||||
# Using system libunwind is broken on aarch64 and mono-based builds
|
||||
# see https://github.com/dotnet/source-build/issues/2408,
|
||||
case $CARCH in
|
||||
x86_64)
|
||||
msg "Using system libunwind"
|
||||
patch -p1 -i "$srcdir"/runtime_enable-system-libunwind.diff
|
||||
;;
|
||||
esac
|
||||
|
||||
# For some reason, new s390x apphost isn't pulled, this disable it's use on s390x
|
||||
case $CARCH in
|
||||
s390x)
|
||||
msg "Disabing use of apphost"
|
||||
patch -p1 -i "$srcdir"/build_disable-apphost.diff
|
||||
;;
|
||||
esac
|
||||
|
||||
# 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
|
||||
# ensure that dotnet does not download artifacts provided by dotnet-artifacts
|
||||
rm -rf "$builddir"/packages/archive
|
||||
}
|
||||
|
||||
build() {
|
||||
msg "Building $pkgname-$pkgver"
|
||||
ulimit -n 4096
|
||||
|
||||
export PATH="$PATH:/usr/lib/llvm$_llvmver/bin"
|
||||
|
||||
# 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
|
||||
|
||||
# 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
|
||||
"
|
||||
# disable use of crossgen on arches platforms where its unsupported (mono)
|
||||
# or broken (armv7, aarch64)
|
||||
case $CARCH in
|
||||
x86|aarch64|armv7|armhf|s390x) local args="$args /p:CrossgenOutput=false /p:DISABLE_CROSSGEN=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"
|
||||
|
||||
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
|
||||
|
||||
./build.sh \
|
||||
--with-sdk "$_cli_root" \
|
||||
--with-packages "$_artifactsdir" \
|
||||
-- $args
|
||||
}
|
||||
|
||||
check() {
|
||||
ulimit -n 4096
|
||||
export NUGET_PACKAGES=$_nugetdir
|
||||
|
||||
# Tests timeout (in seconds)
|
||||
local _tests_timeout=600
|
||||
# Test suite disable flags
|
||||
# following tests can only work after packaging step
|
||||
local _disabled_tests="man-pages distribution-package bash-completion install-local release-version-sane"
|
||||
# test broken on all but x86_64 and aarch64: no musl release for omnisharp
|
||||
if [ "$CARCH" != "x86_64" ] && [ "$CARCH" != "aarch64" ]; then
|
||||
local _disabled_tests="$_disabled_tests omnisharp"
|
||||
fi
|
||||
# test broken: permission issue on lxc / pipelines
|
||||
local _disabled_tests="$_disabled_tests createdump-aspnet workload"
|
||||
# liblttng-ust_sys-sdt.h: no 'NT_STAPSDT' on Alpine's lttng-ust package
|
||||
# lttng: known issue, see https://github.com/dotnet/runtime/issues/57784
|
||||
local _disabled_tests="$_disabled_tests liblttng-ust_sys-sdt.h lttng"
|
||||
# {bundled,system}-libunwind: use system version on all but aarch64/armv7, as broken
|
||||
# see https://github.com/redhat-developer/dotnet-regular-tests/issues/113
|
||||
case $CARCH in
|
||||
x86_64) local _disabled_tests="$_disabled_tests bundled-libunwind";;
|
||||
*) local _disabled_tests="$_disabled_tests system-libunwind";;
|
||||
esac
|
||||
# publish-ready-to-run: broken due to crossgen2 nupkg on musl-arm64 / musl-arm platform being broken
|
||||
# should be fixed with https://github.com/dotnet/runtime/pull/66814
|
||||
case $CARCH in
|
||||
aarch64|armv7) local _disabled_tests="$_disabled_tests publish-ready-to-run publish-ready-to-run-linux";;
|
||||
esac
|
||||
# test unit hangs
|
||||
local _disabled_tests="$_disabled_tests debugging-via-dotnet-dump"
|
||||
|
||||
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"
|
||||
mkdir "$_logdir"/check
|
||||
if [ ! -d "$_checkdir"/turkey ]; then
|
||||
cd "$_checkdir"/Turkey
|
||||
dotnet publish -bl:$_logdir/check/turkey.binlog -f netcoreapp3.1 -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"
|
||||
fi
|
||||
}
|
||||
|
||||
package() {
|
||||
# directory creation
|
||||
install -dm 755 \
|
||||
"$pkgdir"/$_libdir/dotnet/bootstrap/$pkgver \
|
||||
"$pkgdir"/usr/share/man/man1 \
|
||||
"$pkgdir"/$_libdir/dotnet/artifacts/$pkgver
|
||||
|
||||
# unpack sdk to bootstrap
|
||||
tar --use-compress-program="pigz" \
|
||||
-xf "$builddir"/artifacts/$_dotnet_arch/Release/dotnet-sdk-$_pkgver_macro*.tar.gz \
|
||||
-C "$pkgdir"/$_libdir/dotnet/bootstrap/$pkgver/ \
|
||||
--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 "$pkgdir"/$_libdir/dotnet/artifacts/$pkgver/ \
|
||||
--no-same-owner \
|
||||
--wildcards \
|
||||
'*alpine*'
|
||||
|
||||
# assemble docs
|
||||
find "$builddir" -iname 'dotnet*.1' -type f -exec cp '{}' "$pkgdir"/usr/share/man/man1/. \;
|
||||
|
||||
# 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/bootstrap/*/shared/Microsoft.NETCore.App/*/libcoreclrtraceptprovider.so
|
||||
fi
|
||||
}
|
||||
|
||||
sdk() {
|
||||
pkgdesc="The .NET $_pkgver_macro SDK"
|
||||
depends="
|
||||
aspnetcore$_pkgver_name-runtime
|
||||
aspnetcore$_pkgver_name-targeting-pack
|
||||
dotnet$_pkgver_name-apphost-pack
|
||||
dotnet$_pkgver_name-targeting-pack
|
||||
dotnet$_pkgver_name-templates
|
||||
netstandard21-targeting-pack
|
||||
"
|
||||
provides="
|
||||
dotnet-sdk-$_pkgver_macro=$pkgver-r$pkgrel
|
||||
dotnet$_pkgver_name-dev=$pkgver-r$pkgrel
|
||||
"
|
||||
|
||||
install -dm 755 "$subpkgdir"/$_libdir/dotnet
|
||||
|
||||
# sdk
|
||||
tar --use-compress-program="pigz" \
|
||||
-xf "$builddir"/artifacts/$_dotnet_arch/Release/dotnet-sdk-$_pkgver_macro*.tar.gz \
|
||||
-C "$subpkgdir"/$_libdir/dotnet/ \
|
||||
--no-same-owner \
|
||||
./sdk ./sdk-manifests
|
||||
|
||||
# some files either should or should not have executable bits
|
||||
_fix_executable "$subpkgdir"
|
||||
|
||||
# See https://github.com/dotnet/source-build/issues/2579
|
||||
find "$subpkgdir" -type f -name 'testhost.x86' -delete
|
||||
find "$subpkgdir" -type f -name 'vstest.console' -delete
|
||||
}
|
||||
|
||||
netstandard_targeting_pack() {
|
||||
pkgdesc="The .NET 2.1 Standard targeting pack"
|
||||
depends="dotnet-host"
|
||||
provides="netstandard-targeting-pack-2.1=$pkgver-r$pkgrel"
|
||||
|
||||
install -dm 755 "$subpkgdir"/$_libdir/dotnet/packs
|
||||
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/NETStandard.Library.Ref
|
||||
|
||||
# some files either should or should not have executable bits
|
||||
_fix_executable "$subpkgdir"
|
||||
}
|
||||
|
||||
templates() {
|
||||
pkgdesc="The .NET $_pkgver_macro templates"
|
||||
depends="dotnet-host"
|
||||
provides="dotnet-templates-$_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 \
|
||||
./templates
|
||||
|
||||
# some files either should or should not have executable bits
|
||||
_fix_executable "$subpkgdir"
|
||||
}
|
||||
|
||||
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 \
|
||||
"$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/ \
|
||||
--no-same-owner \
|
||||
--exclude '*Intermediate*' \
|
||||
--exclude '*alpine*'
|
||||
}
|
||||
|
||||
zshcomp() {
|
||||
depends=""
|
||||
pkgdesc="zsh completion for .NET"
|
||||
# netstandard21-targeting-pack will always be pulled by any dotnetx-sdk
|
||||
# thus pulling this with it for sdk
|
||||
install_if="netstandard21-targeting-pack zsh"
|
||||
depends="dotnet-host"
|
||||
|
||||
install -dm 755 "$subpkgdir"/usr/share/zsh/site-functions
|
||||
install -m 755 "$builddir"/src/sdk/scripts/register-completions.zsh "$subpkgdir"/usr/share/zsh/site-functions/_dotnet
|
||||
}
|
||||
|
||||
bashcomp() {
|
||||
depends=""
|
||||
pkgdesc="bash completion for .NET"
|
||||
# netstandard21-targeting-pack will always be pulled by any dotnetx-sdk
|
||||
# thus pulling this with it for sdk
|
||||
install_if="netstandard21-targeting-pack bash-completion"
|
||||
depends="dotnet-host"
|
||||
|
||||
install -dm 755 "$subpkgdir"/usr/share/bash-completion/completions
|
||||
install -m 755 "$builddir"/src/sdk/scripts/register-completions.bash "$subpkgdir"/usr/share/bash-completion/completions/_dotnet
|
||||
}
|
||||
|
||||
doc() {
|
||||
default_doc
|
||||
pkgdesc="Docs for .NET"
|
||||
|
||||
# licenses
|
||||
install -dm 755 "$subpkgdir"/usr/share/licenses/dotnet
|
||||
tar --use-compress-program="pigz" \
|
||||
-xf "$builddir"/artifacts/$_dotnet_arch/Release/dotnet-sdk-$_pkgver_macro*.tar.gz \
|
||||
-C "$subpkgdir"/usr/share/licenses/dotnet/ \
|
||||
--no-same-owner \
|
||||
./LICENSE.txt ./ThirdPartyNotices.txt
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
5f3626aac49cf29c924d30fa81c508be8a45b38914c08b67c1dbec44f7d2b3ff7b6a8126ff4af88d43b972e5e17a712757b762ecf5c99c5f6acd8284ee9b2a3f dotnet-v6.0.125.tar.xz
|
||||
e9f3df13d093fac214778c1137857e065f58d4e0d2a48d540d8ed7bb41e2fd73b2b3f62a0aa5b0e80fa80a5b58ba77ff19b9d10a492802f8539e3a6ed79d299d dotnet-testsuite-e1cc0f181ffd4d755756d30d985513897d592ba4.tar.gz
|
||||
fc281df5fcf0d31dc9ff7f5b0e870960cfbe3c4fa0f6a6bb50b22c4ee18d2c608c827205bc79bd7f686d77ac917582fc26f68432cdd86c4a33b910c0c7416d09 dotnet-bunny-71880bd94711519f7b786248a88a827a401207a2.tar.gz
|
||||
bdc2617791fda07bcc87cf5f8727ac721756810880b14c5472998d6a3e238d85d5a12db7823d1237b17f40945e697a6c9104d1c43816c775cc03920e88572a37 build_14816-non-portable-build.patch
|
||||
70d402d0bcaa98c8b09652365404238b67ed26eb9c3d510c7d6309fb61937d98c9144f1096e521c11b00e946d29585a9d474498ccc5223de32bd6471ab5a431f build_14816-update-portable-rid-logic.patch
|
||||
a5a359af816595fbf19482e5dccf874c78d2fc4b59f38223118aac603b33e00c9fed22580eee3112519477205c2c8ed16177d100f09f45275e3da3c20b0ed7f7 build_disable-apphost.diff
|
||||
e71f91d14873755bc2f227807d909e5260bd1f166a262eda0bf05d4a3975a7bce7fde457c1eba476a83b317aebdaaba25f1893d3385182428c08bba6243f21c8 installer_14816-update-portable-rid-logic.patch
|
||||
86e14ecc0269c8b2c2a2a679790de4fa4e15ac06b2a831e1129c4a7de1499d60583fcdc79b3705652c3c4ced73afac2e0ee3edce2cfa3b00fddf94180fb26e10 msbuild_optional-systemconfiguration.patch
|
||||
f4d27624f735ce77e0030fa791594fc12fb325a3ce8620791a7856bd5c0067a042df2196ec97ed4d0309db64bd51e6a48cafaad316d9ea45e34134214a7f3ca4 msbuild_optional-systemsecurity.patch
|
||||
42779a7bf1004fe0f7054cfa4f09f49d7f2a57c0543ec994ffbd54fb349abb508295476098ed35d60e9676be8bcc15aa8a9ec5c814cd1e058357530b5cdfb2b6 roslyn_57003-mono-namedmutex.patch
|
||||
e67e0114bd324dae65eb19f6fa8c74414bee77cd30e299931b0d82b4ca1b6b6f88358a0c47ffb180f46c5cb28f61f79bb4a59d43c1ae3011bfe491e757de293a runtime_76500-mono-musl-support.patch
|
||||
827e899a83103f666dc3d57c1ec695bebc659a574f4a1d754da0cafe8c18d7db79c3950267e905fa078f94612ee1101fbddd0ea62b3c08947d8bcd7d9c8de41c runtime_82269-mono-thread-coop-undefine-fortify-source.patch
|
||||
91f237afe642d0170dbf0e9a2706a4145c937d9d869d22959acaf092f1fd11941144b2b1d041102abe7b70349dd5869d558896e9d13d01f176cace39b21ef1ef runtime_enable-system-libunwind.diff
|
||||
d972e77df27748a80c9b23eca12f9fbd78be97f9034b79cc5703ba58eb6750171d9a115314300f883620ccbca89c65a99ca7a45d54a421b028b590190b4bed80 runtime_remove-usage-of-off64-t.patch
|
||||
d1b4ebcbb1a6815fc0ce4c471485c232618e60968a879309fb8336821a9351d2e0028d9f7726c0c041c750b497a0baa47400c78c9ceff550b91b4a6c2816fc41 sdk_14239-add-zsh-compdef-completion-script.patch
|
||||
815de1dad37412579b16d763debe2ecceffb44f5c46bd3f4ac00b3e431b20c677db435794eac41cea5601030b4e0f03f19e2d53c7a1ead896de2ffbca787eb84 sdk_telemetry-optout.patch
|
||||
"
|
|
@ -1,131 +0,0 @@
|
|||
# dotnet6-build
|
||||
|
||||
This is the .NET 6.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
|
||||
* dotnet6-build (aimed for internal use as bootstrap)
|
||||
* dotnet6-build-artifacts (aimed for internal use as bootstrap)
|
||||
* dotnet6-sdk
|
||||
* dotnet6-templates (required by sdk)
|
||||
* dotnet-zsh-completion
|
||||
* dotnet-bash-completion
|
||||
* dotnet-doc
|
||||
* netstandard21-targeting-pack
|
||||
|
||||
## How to build dotnet6 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, `dotnet6-cross`, a non-standard (read: never to be included in aports) aport, was created to
|
||||
faciliate cross-compiling bootstraps from `x86_64` to other dotnet supported platforms.
|
||||
It is [available here](https://gitlab.alpinelinux.org/ayakael/dotnet6-cross)
|
||||
|
||||
In summary, dotnet6 is built using four different aports, three of which are in aports proper:
|
||||
|
||||
* `dotnet6-cross` [available here](https://gitlab.alpinelinux.org/ayakael/dotnet6-cross)
|
||||
Builds minimum components for dotnet6, and packages these in a tar.gz that `dotnet6-stage0` then uses to build full bootstrap.
|
||||
* `community/dotnet6-stage0`
|
||||
Builds full bootstrap for dotnet6, and packages these in an initial `dotnet6-stage0-bootstrap` package that `dotnet6-build`
|
||||
pulls if `dotnet6-build` has not been built before.
|
||||
* `community/dotnet6-build
|
||||
Builds full and packages dotnet6 fully using either stage0 or previoulsy built dotnet6 build.
|
||||
* `community/dotnet6-runtime
|
||||
As abuild does not allow different versions for subpackages, a different aport is required to
|
||||
package runtime bits from dotnet6-build.
|
||||
|
||||
# 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 `dotnet6` as opposed to `dotnet-6.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/dotnet6-build`
|
||||
|
||||
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 dotnet6/<name>`
|
||||
- `git add` any new patches
|
||||
- `git remove` any now-unnecessary patches
|
||||
- `git commit -m 'community/dotnet6-build: 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/dotnet6-build`
|
||||
|
||||
|
||||
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 dotnet6/<name>`
|
||||
- `git add` any new patches
|
||||
- `git remove` any now-unnecessary patches
|
||||
- `git commit -m 'community/dotnet6-build: 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,208 +0,0 @@
|
|||
From 3008f7ef29e0a5593f6f0afbdc9343f573f1a375 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/dotnet/installer/pull/14816
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Tue, 15 Nov 2022 01:04:07 -0500
|
||||
Subject: [PATCH 1/3] Eliminate runtime portable build (backport dotnet#14549)
|
||||
|
||||
---
|
||||
.../tarball/content/Directory.Build.props | 8 --
|
||||
.../tarball/content/repos/aspnetcore.proj | 1 +
|
||||
.../tarball/content/repos/installer.proj | 2 +-
|
||||
.../tarball/content/repos/known-good.proj | 1 -
|
||||
.../content/repos/runtime-portable.proj | 47 -----------
|
||||
.../content/repos/runtime.common.props | 43 ----------
|
||||
.../content/repos/runtime.common.targets | 46 -----------
|
||||
.../tarball/content/repos/runtime.proj | 82 ++++++++++++++++++-
|
||||
.../source-build-reference-packages.proj | 4 +-
|
||||
src/redist/targets/Crossgen.targets | 2 +-
|
||||
src/redist/targets/GenerateLayout.targets | 3 +
|
||||
11 files changed, 88 insertions(+), 151 deletions(-)
|
||||
delete mode 100644 repos/runtime-portable.proj
|
||||
delete mode 100644 repos/runtime.common.props
|
||||
delete mode 100644 repos/runtime.common.targets
|
||||
|
||||
diff --git a/Directory.Build.props b/Directory.Build.props
|
||||
index 61cc6ff67..2e2d7e8bc 100644
|
||||
--- a/Directory.Build.props
|
||||
+++ b/Directory.Build.props
|
||||
@@ -22,14 +22,6 @@
|
||||
<Platform Condition="'$(Platform)' == ''">x64</Platform>
|
||||
|
||||
<UseStableVersions Condition="'$(UseStableVersions)' == ''">false</UseStableVersions>
|
||||
-
|
||||
- <!-- new supported portable/nonportable options. These control whether to build portable runtime
|
||||
- or portable SDK. The PortableBuild flag is only set in runtime-portable.proj and should
|
||||
- no longer be passed in. -->
|
||||
- <BuildPortableRuntime Condition="'$(BuildPortableRuntime)' == ''">false</BuildPortableRuntime>
|
||||
- <BuildPortableSdk Condition="'$(BuildPortableSdk)' == ''">false</BuildPortableSdk>
|
||||
- <UseSystemLibraries Condition="'$(UseSystemLibraries)' == '' AND '$(PortableRuntime)' != 'true'">true</UseSystemLibraries>
|
||||
- <UseSystemLibraries Condition="'$(UseSystemLibraries)' == ''">false</UseSystemLibraries>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- This repo's projects are entirely infrastructure and do not ship. -->
|
||||
diff --git a/repos/aspnetcore.proj b/repos/aspnetcore.proj
|
||||
index 480f3c713..52243024a 100644
|
||||
--- a/repos/aspnetcore.proj
|
||||
+++ b/repos/aspnetcore.proj
|
||||
@@ -9,6 +9,7 @@
|
||||
<BuildCommandArgs>$(BuildCommandArgs) --no-build-repo-tasks</BuildCommandArgs>
|
||||
<BuildCommandArgs>$(BuildCommandArgs) /p:BuildNodeJs=false</BuildCommandArgs>
|
||||
<BuildCommandArgs>$(BuildCommandArgs) /p:PublishCompressedFilesPathPrefix=$(SourceBuiltAspNetCoreRuntime)</BuildCommandArgs>
|
||||
+ <BuildCommandArgs>$(BuildCommandArgs) /p:PortableBuild=false /p:TargetRuntimeIdentifier=$(TargetRid)</BuildCommandArgs>
|
||||
<!-- Update to 1.0.0 version of reference assemblies which are built in SBRP instead of the preview.2 version
|
||||
included by Arcade -->
|
||||
<BuildCommandArgs>$(BuildCommandArgs) /p:MicrosoftNetFrameworkReferenceAssembliesVersion=1.0.0</BuildCommandArgs>
|
||||
diff --git a/repos/installer.proj.orig b/repos/installer.proj
|
||||
index 0df0c8f7c03..95d47c94152 100644
|
||||
--- a/repos/installer.proj.orig
|
||||
+++ b/repos/installer.proj
|
||||
@@ -30,7 +30,7 @@
|
||||
<BuildCommandArgs Condition="'$(TargetOS)' == 'Linux'">$(BuildCommandArgs) /p:Rid=$(TargetRid)</BuildCommandArgs>
|
||||
<BuildCommandArgs>$(BuildCommandArgs) /p:DOTNET_INSTALL_DIR=$(DotNetCliToolDir)</BuildCommandArgs>
|
||||
|
||||
- <BuildCommandArgs Condition="'$(TargetOS)' == 'Linux'">$(BuildCommandArgs) /p:AspNetCoreInstallerRid=$(PortableRid)</BuildCommandArgs>
|
||||
+ <BuildCommandArgs Condition="'$(TargetOS)' == 'Linux'">$(BuildCommandArgs) /p:AspNetCoreInstallerRid=$(TargetRid)</BuildCommandArgs>
|
||||
<!-- core-sdk always wants to build portable on OSX and FreeBSD -->
|
||||
<BuildCommandArgs Condition="'$(TargetOS)' == 'FreeBSD'">$(BuildCommandArgs) /p:CoreSetupRid=freebsd-x64 /p:PortableBuild=true</BuildCommandArgs>
|
||||
<BuildCommandArgs Condition="'$(TargetOS)' == 'OSX'">$(BuildCommandArgs) /p:CoreSetupRid=osx-x64</BuildCommandArgs>
|
||||
diff --git a/repos/known-good.proj b/repos/known-good.proj
|
||||
index eab516290..12d9943da 100644
|
||||
--- a/repos/known-good.proj
|
||||
+++ b/repos/known-good.proj
|
||||
@@ -44,7 +44,6 @@
|
||||
<!-- Tier 2 -->
|
||||
<RepositoryReference Include="linker" />
|
||||
<RepositoryReference Include="msbuild" />
|
||||
- <RepositoryReference Include="runtime-portable" />
|
||||
<RepositoryReference Include="runtime" />
|
||||
<RepositoryReference Include="templating" />
|
||||
|
||||
diff --git a/repos/runtime.proj b/repos/runtime.proj
|
||||
index f3ed143f8..efd8b66fa 100644
|
||||
--- a/repos/runtime.proj
|
||||
+++ b/repos/runtime.proj
|
||||
@@ -1,18 +1,53 @@
|
||||
<Project>
|
||||
- <Import Project="runtime.common.props"/>
|
||||
+ <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
|
||||
|
||||
+ <!-- Build arguments -->
|
||||
<PropertyGroup>
|
||||
+ <LogVerbosityOptOut>true</LogVerbosityOptOut>
|
||||
+
|
||||
+ <CleanCommand>$(ProjectDirectory)/clean$(ShellExtension)</CleanCommand>
|
||||
+
|
||||
<OverrideTargetRid>$(TargetRid)</OverrideTargetRid>
|
||||
<OverrideTargetRid Condition="'$(TargetOS)' == 'OSX'">osx-x64</OverrideTargetRid>
|
||||
<OverrideTargetRid Condition="'$(TargetOS)' == 'FreeBSD'">freebsd-x64</OverrideTargetRid>
|
||||
<OverrideTargetRid Condition="'$(TargetOS)' == 'Windows_NT'">win-x64</OverrideTargetRid>
|
||||
|
||||
+ <_platformIndex>$(NETCoreSdkRuntimeIdentifier.LastIndexOf('-'))</_platformIndex>
|
||||
+ <RuntimeOS>$(NETCoreSdkRuntimeIdentifier.Substring(0, $(_platformIndex)))</RuntimeOS>
|
||||
+
|
||||
+ <_platformIndex>$(NETCoreSdkPortableRuntimeIdentifier.LastIndexOf('-'))</_platformIndex>
|
||||
+ <BaseOS>$(NETCoreSdkPortableRuntimeIdentifier.Substring(0, $(_platformIndex)))</BaseOS>
|
||||
+
|
||||
<BuildCommandArgs>$(StandardSourceBuildArgs)</BuildCommandArgs>
|
||||
<BuildCommandArgs>$(BuildCommandArgs) /p:TargetRid=$(OverrideTargetRid)</BuildCommandArgs>
|
||||
+ <BuildCommandArgs>$(BuildCommandArgs) /p:RuntimeOS=$(RuntimeOS)</BuildCommandArgs>
|
||||
+ <BuildCommandArgs>$(BuildCommandArgs) /p:BaseOS=$(BaseOS)</BuildCommandArgs>
|
||||
<BuildCommandArgs>$(BuildCommandArgs) /p:SourceBuildNonPortable=true</BuildCommandArgs>
|
||||
<BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
|
||||
</PropertyGroup>
|
||||
|
||||
+ <!-- Output / source-build flags -->
|
||||
+ <PropertyGroup>
|
||||
+ <GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
|
||||
+ <NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
|
||||
+ <OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
|
||||
+ <DependencyVersionInputRepoApiImplemented>true</DependencyVersionInputRepoApiImplemented>
|
||||
+ </PropertyGroup>
|
||||
+
|
||||
+ <!-- SDK Overrides -->
|
||||
+ <ItemGroup>
|
||||
+ <UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
|
||||
+ <UseSourceBuiltSdkOverride Include="@(ArcadeCoreFxTestingOverride)" />
|
||||
+ <UseSourceBuiltSdkOverride Include="@(ArcadePackagingOverride)" />
|
||||
+ <UseSourceBuiltSdkOverride Include="@(ArcadeTargetFrameworkSdkOverride)" />
|
||||
+ <UseSourceBuiltSdkOverride Include="@(ArcadeSharedFrameworkSdkOverride)" />
|
||||
+ </ItemGroup>
|
||||
+
|
||||
+ <!-- Environment Variables -->
|
||||
+ <ItemGroup>
|
||||
+ <EnvironmentVariables Include="BuildInParallel=false" />
|
||||
+ </ItemGroup>
|
||||
+
|
||||
<!-- Repository References -->
|
||||
<ItemGroup>
|
||||
<RepositoryReference Include="arcade" />
|
||||
@@ -20,8 +55,49 @@
|
||||
<RepositoryReference Include="linker" />
|
||||
<RepositoryReference Include="source-build" />
|
||||
<RepositoryReference Include="roslyn" />
|
||||
- <RepositoryReference Include="runtime-portable" />
|
||||
</ItemGroup>
|
||||
|
||||
- <Import Project="runtime.common.targets" />
|
||||
+ <UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="AddRidToRuntimeJson" />
|
||||
+ <UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="PublishCoreSetupBinaries" />
|
||||
+
|
||||
+ <Target Name="SetOutputList" AfterTargets="Package" BeforeTargets="GatherBuiltPackages">
|
||||
+ <ItemGroup>
|
||||
+ <PackagesOutputList Include="$(ShippingPackagesOutput)" />
|
||||
+ <PackagesOutputList Include="$(NonShippingPackagesOutput)" />
|
||||
+ </ItemGroup>
|
||||
+ </Target>
|
||||
+
|
||||
+ <Target Name="UpdateRuntimeGraph"
|
||||
+ BeforeTargets="Build"
|
||||
+ Condition="'$(_IsBootstrapping)' == 'true'">
|
||||
+ <PropertyGroup>
|
||||
+ <RuntimeJsonFile>$(ProjectDirectory)pkg/Microsoft.NETCore.Platforms/runtime.json</RuntimeJsonFile>
|
||||
+ </PropertyGroup>
|
||||
+
|
||||
+ <Message Importance="High" Text="Adding rid, $(TargetRid), to $(RuntimeJsonFile)" />
|
||||
+ <AddRidToRuntimeJson RuntimeJson="$(RuntimeJsonFile)"
|
||||
+ Rid="$(TargetRid)-$(Platform)" />
|
||||
+ </Target>
|
||||
+
|
||||
+ <Target Name="CopyBinariesToBinFolder"
|
||||
+ AfterTargets="ExtractIntermediatePackages"
|
||||
+ Inputs="$(MSBuildProjectFullPath)"
|
||||
+ Outputs="$(RepoCompletedSemaphorePath)CopyBinariesToBinFolder.complete">
|
||||
+ <ItemGroup>
|
||||
+ <_builtRuntimePackages Include="$(SourceBuiltAssetsDir)*.symbols.nupkg" />
|
||||
+ <_builtRuntimePackages>
|
||||
+ <TransformedFileName>$([System.String]::Copy('%(FileName)').Replace('symbols', 'nupkg'))</TransformedFileName>
|
||||
+ </_builtRuntimePackages>
|
||||
+ <BinariesToCopy Include="$(SourceBuiltAssetsDir)*.*" Exclude="$(SourceBuiltAssetsDir)*.nupkg;$(SourceBuiltAssetsDir)*.requires_nupkg_signing" />
|
||||
+ <BinariesToCopy Include="@(_builtRuntimePackages->'$(SourceBuiltPackagesPath)%(TransformedFileName)')" />
|
||||
+ </ItemGroup>
|
||||
+
|
||||
+ <Copy SourceFiles="@(BinariesToCopy)"
|
||||
+ DestinationFolder="$(OutputPath)runtime"
|
||||
+ Condition="'@(BinariesToCopy)'!=''" />
|
||||
+
|
||||
+ <WriteLinesToFile File="$(RepoCompletedSemaphorePath)CopyBinariesToBinFolder.complete" Overwrite="true" />
|
||||
+ </Target>
|
||||
+
|
||||
+ <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
|
||||
</Project>
|
||||
diff --git a/repos/source-build-reference-packages.proj b/repos/source-build-reference-packages.proj
|
||||
index 69ab564a2..9545b50e4 100644
|
||||
--- a/repos/source-build-reference-packages.proj
|
||||
+++ b/repos/source-build-reference-packages.proj
|
||||
@@ -2,7 +2,9 @@
|
||||
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
|
||||
|
||||
<PropertyGroup>
|
||||
- <BuildCommand>$(StandardSourceBuildCommand) $(StandardSourceBuildArgs)</BuildCommand>
|
||||
+ <BuildCommandArgs>$(StandardSourceBuildArgs)</BuildCommandArgs>
|
||||
+ <BuildCommandArgs>$(BuildCommandArgs) /p:MicrosoftNetCoreIlasmPackageRuntimeId=$(NETCoreSdkRuntimeIdentifier)</BuildCommandArgs>
|
||||
+ <BuildCommand>$(StandardSourceBuildCommand) $(BuildCommandArgs)</BuildCommand>
|
||||
|
||||
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
|
||||
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
|
||||
--
|
||||
2.38.2
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
From 5ee269eef8bd02d066151deaa4d8c0fe6b6cbce4 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/dotnet/installer/pull/14816
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Tue, 15 Nov 2022 01:04:46 -0500
|
||||
Subject: [PATCH 2/3] BundledVersions: update portable rid logic (backport
|
||||
dotnet#14647)
|
||||
|
||||
---
|
||||
.../tarball/content/repos/installer.proj | 5 +++++
|
||||
src/redist/targets/GetRuntimeInformation.targets | 16 ++++++++++------
|
||||
2 files changed, 15 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/repos/installer.proj b/repos/installer.proj
|
||||
index 6c08a1f67..95d47c941 100644
|
||||
--- a/repos/installer.proj
|
||||
+++ b/repos/installer.proj
|
||||
@@ -10,6 +10,10 @@
|
||||
<OverrideTargetRid Condition="'$(TargetOS)' == 'OSX'">osx-x64</OverrideTargetRid>
|
||||
<OSNameOverride>$(OverrideTargetRid.Substring(0, $(OverrideTargetRid.IndexOf("-"))))</OSNameOverride>
|
||||
|
||||
+ <!-- Determine target portable rid based on bootstrap SDK's portable rid -->
|
||||
+ <_platformIndex>$(NETCoreSdkPortableRuntimeIdentifier.LastIndexOf('-'))</_platformIndex>
|
||||
+ <PortableOS Condition="'$(PortableOS)' == ''">$(NETCoreSdkPortableRuntimeIdentifier.Substring(0, $(_platformIndex)))</PortableOS>
|
||||
+
|
||||
<RuntimeArg>--runtime-id $(OverrideTargetRid)</RuntimeArg>
|
||||
<RuntimeArg Condition="'$(TargetOS)' == 'Linux'">--runtime-id $(TargetRid)</RuntimeArg>
|
||||
|
||||
@@ -22,6 +26,7 @@
|
||||
-->
|
||||
<BuildCommandArgs>$(BuildCommandArgs) /p:NETCoreAppMaximumVersion=99.9</BuildCommandArgs>
|
||||
<BuildCommandArgs>$(BuildCommandArgs) /p:OSName=$(OSNameOverride)</BuildCommandArgs>
|
||||
+ <BuildCommandArgs>$(BuildCommandArgs) /p:PortableOSName=$(PortableOS)</BuildCommandArgs>
|
||||
<BuildCommandArgs Condition="'$(TargetOS)' == 'Linux'">$(BuildCommandArgs) /p:Rid=$(TargetRid)</BuildCommandArgs>
|
||||
<BuildCommandArgs>$(BuildCommandArgs) /p:DOTNET_INSTALL_DIR=$(DotNetCliToolDir)</BuildCommandArgs>
|
||||
|
||||
--
|
||||
2.38.2
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
From 75c3e74ea35219f257c80daf9a236e0f518a7875 Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Wed, 9 Mar 2022 20:16:03 +0000
|
||||
Subject: [PATCH 1/1] Disable apphost
|
||||
|
||||
Disables use of apphost
|
||||
|
||||
---
|
||||
|
||||
--- a/src/fsharp/tests/benchmarks/MicroPerf/MicroPerf.fsproj
|
||||
+++ b/src/fsharp/tests/benchmarks/MicroPerf/MicroPerf.fsproj
|
||||
@@ -9,6 +9,7 @@
|
||||
<OtherFlags>$(OtherFlags) --nowarn:57</OtherFlags>
|
||||
<OtherFlags>$(OtherFlags) --langversion:preview</OtherFlags>
|
||||
<OtherFlags>$(OtherFlags) --define:PREVIEW</OtherFlags>
|
||||
+ <UseAppHost>false</UseAppHost>
|
||||
<!-- By default this project will compile with the proto compiler -->
|
||||
<!-- Uncommenting this will build with a previous installed compiler -->
|
||||
<!--
|
||||
--- a/src/fsharp/tests/benchmarks/TaskPerf/TaskPerf.fsproj
|
||||
+++ b/src/fsharp/tests/benchmarks/TaskPerf/TaskPerf.fsproj
|
||||
@@ -4,6 +4,7 @@
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
|
||||
+ <UseAppHost>false</UseAppHost>
|
||||
<!-- Turn off "This function is for use by compiled F# code and should not be used directly" -->
|
||||
<OtherFlags>$(OtherFlags) --nowarn:1204</OtherFlags>
|
||||
<!-- Turn off "Experimental" -->
|
||||
--- a/src/arcade/src/Microsoft.DotNet.GitSync.CommitManager/Microsoft.DotNet.GitSync.CommitManager.csproj
|
||||
+++ b/src/arcade/src/Microsoft.DotNet.GitSync.CommitManager/Microsoft.DotNet.GitSync.CommitManager.csproj
|
||||
@@ -5,6 +5,7 @@
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
|
||||
+ <UseAppHost>false</UseAppHost>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
--- a/src/arcade/src/Microsoft.DotNet.SwaggerGenerator/Microsoft.DotNet.SwaggerGenerator.CmdLine/Microsoft.DotNet.SwaggerGenerator.CmdLine.csproj
|
||||
+++ b/src/arcade/src/Microsoft.DotNet.SwaggerGenerator/Microsoft.DotNet.SwaggerGenerator.CmdLine/Microsoft.DotNet.SwaggerGenerator.CmdLine.csproj
|
||||
@@ -9,6 +9,7 @@
|
||||
<ToolCommandName>dotnet-swaggergen</ToolCommandName>
|
||||
<SignAssembly>false</SignAssembly>
|
||||
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
|
||||
+ <UseAppHost>false</UseAppHost>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
--- a/src/arcade/src/Microsoft.DotNet.XUnitConsoleRunner/src/Microsoft.DotNet.XUnitConsoleRunner.csproj
|
||||
+++ b/src/arcade/src/Microsoft.DotNet.XUnitConsoleRunner/src/Microsoft.DotNet.XUnitConsoleRunner.csproj
|
||||
@@ -11,6 +11,7 @@
|
||||
<VersionPrefix>2.5.1</VersionPrefix>
|
||||
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
|
||||
<RollForward>Major</RollForward>
|
||||
+ <UseAppHost>false</UseAppHost>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
--- a/src/roslyn-analyzers/src/Tools/ReleaseNotesUtil/ReleaseNotesUtil.csproj
|
||||
+++ b/src/roslyn-analyzers/src/Tools/ReleaseNotesUtil/ReleaseNotesUtil.csproj
|
||||
@@ -4,6 +4,7 @@
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<NonShipping>true</NonShipping>
|
||||
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
|
||||
+ <UseAppHost>false</UseAppHost>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis" Version="$(MicrosoftCodeAnalysisVersion)" />
|
||||
--- a/src/roslyn/src/Workspaces/Remote/ServiceHub.CoreComponents/Microsoft.CodeAnalysis.Remote.ServiceHub.CoreComponents.csproj
|
||||
+++ b/src/roslyn/src/Workspaces/Remote/ServiceHub.CoreComponents/Microsoft.CodeAnalysis.Remote.ServiceHub.CoreComponents.csproj
|
||||
@@ -5,6 +5,7 @@
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<!-- The purpose of this project is to include all dependecies of Microsoft.CodeAnalysis.Remote.ServiceHub targeting .Net Core -->
|
||||
+ <UseAppHost>false</UseAppHost>
|
||||
<IsShipping>false</IsShipping>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
|
@ -1,51 +0,0 @@
|
|||
From 5ee269eef8bd02d066151deaa4d8c0fe6b6cbce4 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/dotnet/installer/pull/14816
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Tue, 15 Nov 2022 01:04:46 -0500
|
||||
Subject: [PATCH 2/3] BundledVersions: update portable rid logic (backport
|
||||
dotnet#14647)
|
||||
|
||||
---
|
||||
.../tarball/content/repos/installer.proj | 5 +++++
|
||||
src/redist/targets/GetRuntimeInformation.targets | 16 ++++++++++------
|
||||
2 files changed, 15 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/installer/src/redist/targets/GetRuntimeInformation.targets b/src/installer/src/redist/targets/GetRuntimeInformation.targets
|
||||
index a99a7e9da..89f000119 100644
|
||||
--- a/src/installer/src/redist/targets/GetRuntimeInformation.targets
|
||||
+++ b/src/installer/src/redist/targets/GetRuntimeInformation.targets
|
||||
@@ -9,10 +9,15 @@
|
||||
<HostOSName Condition=" '$(HostOSName)' == '' AND $([MSBuild]::IsOSPlatform('OSX')) ">osx</HostOSName>
|
||||
<HostOSName Condition=" '$(HostOSName)' == '' AND $([MSBuild]::IsOSPlatform('FREEBSD')) ">freebsd</HostOSName>
|
||||
<HostOSName Condition=" '$(HostOSName)' == '' AND '$(IsLinux)' == 'True' ">linux</HostOSName>
|
||||
-
|
||||
+
|
||||
+ <OSName Condition=" '$(OSName)' == '' AND $(Rid) != '' ">$(Rid.Substring(0, $(Rid.LastIndexOf('-'))))</OSName>
|
||||
<OSName Condition=" '$(OSName)' == '' ">$(HostOSName)</OSName>
|
||||
|
||||
- <Rid Condition=" '$(Rid)' == '' ">$(OSName)-$(Architecture)</Rid>
|
||||
+ <PortableOSName Condition=" '$(PortableOSName)' == '' ">$(OSName)</PortableOSName>
|
||||
+
|
||||
+ <Rid>$(OSName)-$(Architecture)</Rid>
|
||||
+
|
||||
+ <PortableRid>$(PortableOSName)-$(Architecture)</PortableRid>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
@@ -23,10 +28,9 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
- <ProductMonikerRid Condition=" '$(Rid)' == 'ubuntu.16.04-x64' OR
|
||||
- '$(Rid)' == 'rhel.6-x64' OR
|
||||
- '$(Rid)' == 'linux-musl-x64' ">$(Rid)</ProductMonikerRid>
|
||||
- <ProductMonikerRid Condition=" '$(ProductMonikerRid)' == '' ">$(OSName)-$(Architecture)</ProductMonikerRid>
|
||||
+ <ProductMonikerRid Condition=" '$(ProductMonikerRid)' == '' ">$(Rid)</ProductMonikerRid>
|
||||
+
|
||||
+ <PortableProductMonikerRid Condition=" '$(PortableProductMonikerRid)' == '' ">$(PortableRid)</PortableProductMonikerRid>
|
||||
|
||||
<PortableProductMonikerRid Condition=" '$(PortableProductMonikerRid)' == '' ">$(HostOSName)-$(Architecture)</PortableProductMonikerRid>
|
||||
|
||||
--
|
||||
2.38.2
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
From 26a12cb531161e1fc3d6ec1f2a241e1c516ca775 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://src.fedoraproject.org/rpms/dotnet6.0/blob/src/msbuild/rawhide/f/msbuild-no-systemconfiguration.patch
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Fri, 21 Oct 2022 14:13:04 -0400
|
||||
Subject: [PATCH 1/2] optional-systemconfiguration
|
||||
|
||||
Fix mono-specific runtime crashes running msbuild. CoreCLR does not
|
||||
load types that are not actually used/invoked at runtime, while mono
|
||||
does. System.Configuration and System.Security are missing in
|
||||
source-build builds, which breaks msbuild.
|
||||
|
||||
---
|
||||
src/Build/Definition/ProjectCollection.cs | 4 ++++
|
||||
src/Build/Definition/ToolsetReader.cs | 8 ++++++++
|
||||
2 files changed, 12 insertions(+)
|
||||
|
||||
diff --git a/src/msbuild/src/Build/Definition/ProjectCollection.cs b/src/msbuild/src/Build/Definition/ProjectCollection.cs
|
||||
index 8629bd943..6a550e32d 100644
|
||||
--- a/src/msbuild/src/Build/Definition/ProjectCollection.cs
|
||||
+++ b/src/msbuild/src/Build/Definition/ProjectCollection.cs
|
||||
@@ -1754,7 +1754,11 @@ namespace Microsoft.Build.Evaluation
|
||||
#if FEATURE_WIN32_REGISTRY
|
||||
ToolsetRegistryReader registryReader = null,
|
||||
#endif
|
||||
+#if FEATURE_SYSTEM_CONFIGURATION
|
||||
ToolsetConfigurationReader configReader = null
|
||||
+#else
|
||||
+ object configReader = null
|
||||
+#endif
|
||||
)
|
||||
{
|
||||
_toolsets = new Dictionary<string, Toolset>(StringComparer.OrdinalIgnoreCase);
|
||||
diff --git a/src/msbuild/src/Build/Definition/ToolsetReader.cs b/src/msbuild/src/Build/Definition/ToolsetReader.cs
|
||||
index 869b3318e..c6b95d3cf 100644
|
||||
--- a/src/msbuild/src/Build/Definition/ToolsetReader.cs
|
||||
+++ b/src/msbuild/src/Build/Definition/ToolsetReader.cs
|
||||
@@ -101,7 +101,11 @@ namespace Microsoft.Build.Evaluation
|
||||
#if FEATURE_WIN32_REGISTRY
|
||||
ToolsetRegistryReader registryReader,
|
||||
#endif
|
||||
+#if FEATURE_SYSTEM_CONFIGURATION
|
||||
ToolsetConfigurationReader configurationReader,
|
||||
+#else
|
||||
+ object _configurationReader,
|
||||
+#endif
|
||||
PropertyDictionary<ProjectPropertyInstance> environmentProperties,
|
||||
PropertyDictionary<ProjectPropertyInstance> globalProperties,
|
||||
ToolsetDefinitionLocations locations
|
||||
@@ -120,6 +124,7 @@ namespace Microsoft.Build.Evaluation
|
||||
|
||||
if ((locations & ToolsetDefinitionLocations.ConfigurationFile) == ToolsetDefinitionLocations.ConfigurationFile)
|
||||
{
|
||||
+#if FEATURE_SYSTEM_CONFIGURATION
|
||||
if (configurationReader == null)
|
||||
{
|
||||
configurationReader = new ToolsetConfigurationReader(environmentProperties, globalProperties);
|
||||
@@ -129,6 +134,9 @@ namespace Microsoft.Build.Evaluation
|
||||
defaultToolsVersionFromConfiguration = configurationReader.ReadToolsets(toolsets, globalProperties,
|
||||
initialProperties, true /* accumulate properties */, out overrideTasksPathFromConfiguration,
|
||||
out defaultOverrideToolsVersionFromConfiguration);
|
||||
+#else
|
||||
+ throw new InvalidOperationException("ToolsetDefinitionLocations.ConfigurationFile not supported");
|
||||
+#endif
|
||||
}
|
||||
|
||||
string defaultToolsVersionFromRegistry = null;
|
||||
--
|
||||
2.36.3
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From 06707ec777769f1756230caf54391302e4378777 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://src.fedoraproject.org/rpms/dotnet6.0/blob/src/msbuild/rawhide/f/msbuild-no-systemsecurity.patch
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Fri, 21 Oct 2022 14:13:29 -0400
|
||||
Subject: [PATCH 2/2] optional-systemsecurity
|
||||
|
||||
Fix mono-specific runtime crashes running msbuild. CoreCLR does not
|
||||
load types that are not actually used/invoked at runtime, while mono
|
||||
does. System.Configuration and System.Security are missing in
|
||||
source-build builds, which breaks msbuild.
|
||||
|
||||
---
|
||||
src/Shared/ExceptionHandling.cs | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/msbuild/src/Shared/ExceptionHandling.cs b/src/msbuild/src/Shared/ExceptionHandling.cs
|
||||
index 16a0576b5..1c7cd5967 100644
|
||||
--- a/src/msbuild/src/Shared/ExceptionHandling.cs
|
||||
+++ b/src/msbuild/src/Shared/ExceptionHandling.cs
|
||||
@@ -153,7 +153,9 @@ namespace Microsoft.Build.Shared
|
||||
internal static bool IsXmlException(Exception e)
|
||||
{
|
||||
return e is XmlException
|
||||
+#if FEATURE_SECURITY_PERMISSIONS
|
||||
|| e is XmlSyntaxException
|
||||
+#endif
|
||||
|| e is XmlSchemaException
|
||||
|| e is UriFormatException; // XmlTextReader for example uses this under the covers
|
||||
}
|
||||
--
|
||||
2.36.3
|
||||
|
|
@ -1,470 +0,0 @@
|
|||
From 210c17ea60f525837a7525df73e7332598ad4089 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/dotnet/roslyn/pull/57003
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Sat, 27 Aug 2022 21:26:01 -0800
|
||||
Subject: [PATCH 1/1] mono-named-mutex
|
||||
|
||||
---
|
||||
.../InternalUtilities/PlatformInformation.cs | 19 ++
|
||||
.../VBCSCompilerTests/BuildClientTests.cs | 2 +-
|
||||
.../CompilerServerApiTest.cs | 4 +-
|
||||
.../VBCSCompilerTests/CompilerServerTests.cs | 4 +-
|
||||
.../VBCSCompilerServerTests.cs | 7 +-
|
||||
src/Compilers/Shared/BuildServerConnection.cs | 251 +++++++++++-------
|
||||
6 files changed, 182 insertions(+), 105 deletions(-)
|
||||
|
||||
diff --git a/src/roslyn/src/Compilers/Core/Portable/InternalUtilities/PlatformInformation.cs b/src/roslyn/src/Compilers/Core/Portable/InternalUtilities/PlatformInformation.cs
|
||||
index 033e66cd2f2..d4fa56413fb 100644
|
||||
--- a/src/roslyn/src/Compilers/Core/Portable/InternalUtilities/PlatformInformation.cs
|
||||
+++ b/src/roslyn/src/Compilers/Core/Portable/InternalUtilities/PlatformInformation.cs
|
||||
@@ -31,5 +31,24 @@ public static bool IsRunningOnMono
|
||||
}
|
||||
}
|
||||
}
|
||||
+ /// <summary>
|
||||
+ /// Are we running on .NET 5 or later using the Mono runtime?
|
||||
+ /// Will also return true when running on Mono itself; if necessary
|
||||
+ /// we can use IsRunningOnMono to distinguish.
|
||||
+ /// </summary>
|
||||
+ public static bool IsUsingMonoRuntime
|
||||
+ {
|
||||
+ get
|
||||
+ {
|
||||
+ try
|
||||
+ {
|
||||
+ return !(Type.GetType("Mono.RuntimeStructs", throwOnError: false) is null);
|
||||
+ }
|
||||
+ catch
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
diff --git a/src/roslyn/src/Compilers/Server/VBCSCompilerTests/BuildClientTests.cs b/src/roslyn/src/Compilers/Server/VBCSCompilerTests/BuildClientTests.cs
|
||||
index 669d1bfb676..7f1d0468823 100644
|
||||
--- a/src/roslyn/src/Compilers/Server/VBCSCompilerTests/BuildClientTests.cs
|
||||
+++ b/src/roslyn/src/Compilers/Server/VBCSCompilerTests/BuildClientTests.cs
|
||||
@@ -79,7 +79,7 @@ public void ConnectToServerFails()
|
||||
// to connect. When it fails it should fall back to in-proc
|
||||
// compilation.
|
||||
bool holdsMutex;
|
||||
- using (var serverMutex = new Mutex(initiallyOwned: true,
|
||||
+ using (var serverMutex = BuildServerConnection.OpenOrCreateMutex(
|
||||
name: BuildServerConnection.GetServerMutexName(_pipeName),
|
||||
createdNew: out holdsMutex))
|
||||
{
|
||||
diff --git a/src/roslyn/src/Compilers/Server/VBCSCompilerTests/CompilerServerApiTest.cs b/src/roslyn/src/Compilers/Server/VBCSCompilerTests/CompilerServerApiTest.cs
|
||||
index 0dbd1b2e143..c00b72e8434 100644
|
||||
--- a/src/roslyn/src/Compilers/Server/VBCSCompilerTests/CompilerServerApiTest.cs
|
||||
+++ b/src/roslyn/src/Compilers/Server/VBCSCompilerTests/CompilerServerApiTest.cs
|
||||
@@ -103,7 +103,7 @@ public void MutexStopsServerStarting()
|
||||
var mutexName = BuildServerConnection.GetServerMutexName(pipeName);
|
||||
|
||||
bool holdsMutex;
|
||||
- using (var mutex = new Mutex(initiallyOwned: true,
|
||||
+ using (var mutex = BuildServerConnection.OpenOrCreateMutex(
|
||||
name: mutexName,
|
||||
createdNew: out holdsMutex))
|
||||
{
|
||||
@@ -119,7 +119,7 @@ public void MutexStopsServerStarting()
|
||||
}
|
||||
finally
|
||||
{
|
||||
- mutex.ReleaseMutex();
|
||||
+ mutex.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/src/roslyn/src/Compilers/Server/VBCSCompilerTests/CompilerServerTests.cs b/src/roslyn/src/Compilers/Server/VBCSCompilerTests/CompilerServerTests.cs
|
||||
index 3b6f4f291ff..e97a6bf923f 100644
|
||||
--- a/src/roslyn/src/Compilers/Server/VBCSCompilerTests/CompilerServerTests.cs
|
||||
+++ b/src/roslyn/src/Compilers/Server/VBCSCompilerTests/CompilerServerTests.cs
|
||||
@@ -304,7 +304,7 @@ public async Task ServerFailsWithLongTempPathUnix()
|
||||
var newTempDir = _tempDirectory.CreateDirectory(new string('a', 100 - _tempDirectory.Path.Length));
|
||||
await ApplyEnvironmentVariables(
|
||||
new[] { new KeyValuePair<string, string>("TMPDIR", newTempDir.Path) },
|
||||
- async () =>
|
||||
+ async () => await Task.Run(async () =>
|
||||
{
|
||||
using var serverData = await ServerUtil.CreateServer(_logger);
|
||||
var result = RunCommandLineCompiler(
|
||||
@@ -317,7 +317,7 @@ public async Task ServerFailsWithLongTempPathUnix()
|
||||
|
||||
var listener = await serverData.Complete();
|
||||
Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single());
|
||||
- });
|
||||
+ }));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
diff --git a/src/roslyn/src/Compilers/Server/VBCSCompilerTests/VBCSCompilerServerTests.cs b/src/roslyn/src/Compilers/Server/VBCSCompilerTests/VBCSCompilerServerTests.cs
|
||||
index d5f493fed8a..73941972e48 100644
|
||||
--- a/src/roslyn/src/Compilers/Server/VBCSCompilerTests/VBCSCompilerServerTests.cs
|
||||
+++ b/src/roslyn/src/Compilers/Server/VBCSCompilerTests/VBCSCompilerServerTests.cs
|
||||
@@ -101,7 +101,7 @@ public async Task NoServerConnection()
|
||||
|
||||
var thread = new Thread(() =>
|
||||
{
|
||||
- using (var mutex = new Mutex(initiallyOwned: true, name: mutexName, createdNew: out created))
|
||||
+ using (var mutex = BuildServerConnection.OpenOrCreateMutex(name: mutexName, createdNew: out created))
|
||||
using (var stream = NamedPipeUtil.CreateServer(pipeName))
|
||||
{
|
||||
readyMre.Set();
|
||||
@@ -112,7 +112,7 @@ public async Task NoServerConnection()
|
||||
stream.Close();
|
||||
|
||||
doneMre.WaitOne();
|
||||
- mutex.ReleaseMutex();
|
||||
+ mutex.Dispose();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -153,7 +153,7 @@ public async Task ServerShutdownsDuringProcessing()
|
||||
{
|
||||
using (var stream = NamedPipeUtil.CreateServer(pipeName))
|
||||
{
|
||||
- var mutex = new Mutex(initiallyOwned: true, name: mutexName, createdNew: out created);
|
||||
+ var mutex = BuildServerConnection.OpenOrCreateMutex(name: mutexName, createdNew: out created);
|
||||
readyMre.Set();
|
||||
|
||||
stream.WaitForConnection();
|
||||
@@ -161,7 +161,6 @@ public async Task ServerShutdownsDuringProcessing()
|
||||
|
||||
// Client is waiting for a response. Close the mutex now. Then close the connection
|
||||
// so the client gets an error.
|
||||
- mutex.ReleaseMutex();
|
||||
mutex.Dispose();
|
||||
stream.Close();
|
||||
|
||||
diff --git a/src/roslyn/src/Compilers/Shared/BuildServerConnection.cs b/src/roslyn/src/Compilers/Shared/BuildServerConnection.cs
|
||||
index f67c2d83957..1fe609061ee 100644
|
||||
--- a/src/roslyn/src/Compilers/Shared/BuildServerConnection.cs
|
||||
+++ b/src/roslyn/src/Compilers/Shared/BuildServerConnection.cs
|
||||
@@ -543,19 +543,10 @@ internal static bool WasServerMutexOpen(string mutexName)
|
||||
{
|
||||
try
|
||||
{
|
||||
- if (PlatformInformation.IsRunningOnMono)
|
||||
+ if (PlatformInformation.IsUsingMonoRuntime)
|
||||
{
|
||||
- IServerMutex? mutex = null;
|
||||
- bool createdNew = false;
|
||||
- try
|
||||
- {
|
||||
- mutex = new ServerFileMutexPair(mutexName, false, out createdNew);
|
||||
- return !createdNew;
|
||||
- }
|
||||
- finally
|
||||
- {
|
||||
- mutex?.Dispose();
|
||||
- }
|
||||
+ using var mutex = new ServerFileMutex(mutexName);
|
||||
+ return !mutex.CouldLock();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -572,9 +563,11 @@ internal static bool WasServerMutexOpen(string mutexName)
|
||||
|
||||
internal static IServerMutex OpenOrCreateMutex(string name, out bool createdNew)
|
||||
{
|
||||
- if (PlatformInformation.IsRunningOnMono)
|
||||
+ if (PlatformInformation.IsUsingMonoRuntime)
|
||||
{
|
||||
- return new ServerFileMutexPair(name, initiallyOwned: true, out createdNew);
|
||||
+ var mutex = new ServerFileMutex(name);
|
||||
+ createdNew = mutex.TryLock(0);
|
||||
+ return mutex;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -648,19 +641,22 @@ internal interface IServerMutex : IDisposable
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
- /// An interprocess mutex abstraction based on OS advisory locking (FileStream.Lock/Unlock).
|
||||
+ /// An interprocess mutex abstraction based on file sharing permission (FileShare.None).
|
||||
/// If multiple processes running as the same user create FileMutex instances with the same name,
|
||||
/// those instances will all point to the same file somewhere in a selected temporary directory.
|
||||
- /// The TryLock method can be used to attempt to acquire the mutex, with Unlock or Dispose used to release.
|
||||
+ /// The TryLock method can be used to attempt to acquire the mutex, with Dispose used to release.
|
||||
+ /// The CouldLock method can be used to check whether an attempt to acquire the mutex would have
|
||||
+ /// succeeded at the current time, without actually acquiring it.
|
||||
/// Unlike Win32 named mutexes, there is no mechanism for detecting an abandoned mutex. The file
|
||||
/// will simply revert to being unlocked but remain where it is.
|
||||
/// </summary>
|
||||
- internal sealed class FileMutex : IDisposable
|
||||
+ internal sealed class ServerFileMutex : IServerMutex
|
||||
{
|
||||
- public readonly FileStream Stream;
|
||||
+ public FileStream? Stream;
|
||||
public readonly string FilePath;
|
||||
+ public readonly string GuardPath;
|
||||
|
||||
- public bool IsLocked { get; private set; }
|
||||
+ public bool IsDisposed { get; private set; }
|
||||
|
||||
internal static string GetMutexDirectory()
|
||||
{
|
||||
@@ -670,61 +666,176 @@ internal static string GetMutexDirectory()
|
||||
return result;
|
||||
}
|
||||
|
||||
- public FileMutex(string name)
|
||||
+ public ServerFileMutex(string name)
|
||||
{
|
||||
- FilePath = Path.Combine(GetMutexDirectory(), name);
|
||||
- Stream = new FileStream(FilePath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None);
|
||||
+ var mutexDirectory = GetMutexDirectory();
|
||||
+ FilePath = Path.Combine(mutexDirectory, name);
|
||||
+ GuardPath = Path.Combine(mutexDirectory, ".guard");
|
||||
}
|
||||
|
||||
- public bool TryLock(int timeoutMs)
|
||||
+ /// <summary>
|
||||
+ /// Acquire the guard by opening the guard file with FileShare.None. The guard must only ever
|
||||
+ /// be held for very brief amounts of time, so we can simply spin until it is acquired. The
|
||||
+ /// guard must be released by disposing the FileStream returned from this routine. Note the
|
||||
+ /// guard file is never deleted; this is a leak, but only of a single file.
|
||||
+ /// </summary>
|
||||
+ internal FileStream LockGuard()
|
||||
{
|
||||
- if (IsLocked)
|
||||
- throw new InvalidOperationException("Lock already held");
|
||||
-
|
||||
- var sw = Stopwatch.StartNew();
|
||||
- do
|
||||
+ // We should be able to acquire the guard quickly. Limit the number of retries anyway
|
||||
+ // by some arbitrary bound to avoid getting hung up in a possibly infinite loop.
|
||||
+ for (var i = 0; i < 100; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
- Stream.Lock(0, 0);
|
||||
- IsLocked = true;
|
||||
- return true;
|
||||
+ return new FileStream(GuardPath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None);
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
- // Lock currently held by someone else.
|
||||
+ // Guard currently held by someone else.
|
||||
// We want to sleep for a short period of time to ensure that other processes
|
||||
// have an opportunity to finish their work and relinquish the lock.
|
||||
// Spinning here (via Yield) would work but risks creating a priority
|
||||
// inversion if the lock is held by a lower-priority process.
|
||||
Thread.Sleep(1);
|
||||
}
|
||||
+ }
|
||||
+ // Handle unexpected failure to acquire guard as error.
|
||||
+ throw new InvalidOperationException("Unable to acquire guard");
|
||||
+ }
|
||||
+
|
||||
+ /// <summary>
|
||||
+ /// Attempt to acquire the lock by opening the lock file with FileShare.None. Sets "Stream"
|
||||
+ /// and returns true if successful, returns false if the lock is already held by another
|
||||
+ /// thread or process. Guard must be held when calling this routine.
|
||||
+ /// </summary>
|
||||
+ internal bool TryLockFile()
|
||||
+ {
|
||||
+ Debug.Assert(Stream is null);
|
||||
+ FileStream? stream = null;
|
||||
+ try
|
||||
+ {
|
||||
+ stream = new FileStream(FilePath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None);
|
||||
+ // On some targets, the file locking used to implement FileShare.None may not be
|
||||
+ // atomic with opening/creating the file. This creates a race window when another
|
||||
+ // thread holds the lock and is just about to unlock: we may be able to open the
|
||||
+ // file here, then the other thread unlocks and deletes the file, and then we
|
||||
+ // acquire the lock on our file handle - but the actual file is already deleted.
|
||||
+ // To close this race, we verify that the file does in fact still exist now that
|
||||
+ // we have successfull acquired the locked FileStream. (Note that this check is
|
||||
+ // safe because we cannot race with an other attempt to create the file since we
|
||||
+ // hold the guard, and after the FileStream constructor returned we can no race
|
||||
+ // with file deletion because we hold the lock.)
|
||||
+ if (!File.Exists(FilePath))
|
||||
+ {
|
||||
+ // To simplify the logic, we treat this case as "unable to acquire the lock"
|
||||
+ // because it we caught another process while it owned the lock and was just
|
||||
+ // giving it up. If the caller retries, we'll likely acquire the lock then.
|
||||
+ stream.Dispose();
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+ catch (Exception)
|
||||
+ {
|
||||
+ stream?.Dispose();
|
||||
+ return false;
|
||||
+ }
|
||||
+ Stream = stream;
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ /// <summary>
|
||||
+ /// Release the lock by deleting the lock file and disposing "Stream".
|
||||
+ /// </summary>
|
||||
+ internal void UnlockFile()
|
||||
+ {
|
||||
+ Debug.Assert(Stream is not null);
|
||||
+ try
|
||||
+ {
|
||||
+ // Delete the lock file while the stream is not yet disposed
|
||||
+ // and we therefore still hold the FileShare.None exclusion.
|
||||
+ // There may still be a race with another thread attempting a
|
||||
+ // TryLockFile in parallel, but that is safely handled there.
|
||||
+ File.Delete(FilePath);
|
||||
+ }
|
||||
+ finally
|
||||
+ {
|
||||
+ Stream.Dispose();
|
||||
+ Stream = null;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public bool TryLock(int timeoutMs)
|
||||
+ {
|
||||
+ if (IsDisposed)
|
||||
+ throw new ObjectDisposedException("Mutex");
|
||||
+ if (Stream is not null)
|
||||
+ throw new InvalidOperationException("Lock already held");
|
||||
+
|
||||
+ var sw = Stopwatch.StartNew();
|
||||
+ do
|
||||
+ {
|
||||
+ try
|
||||
+ {
|
||||
+ // Attempt to acquire lock while holding guard.
|
||||
+ using var guard = LockGuard();
|
||||
+ if (TryLockFile())
|
||||
+ return true;
|
||||
+ }
|
||||
catch (Exception)
|
||||
{
|
||||
- // Something else went wrong.
|
||||
return false;
|
||||
}
|
||||
+
|
||||
+ // See comment in LockGuard.
|
||||
+ Thread.Sleep(1);
|
||||
} while (sw.ElapsedMilliseconds < timeoutMs);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
- public void Unlock()
|
||||
+ public bool CouldLock()
|
||||
{
|
||||
- if (!IsLocked)
|
||||
- return;
|
||||
- Stream.Unlock(0, 0);
|
||||
- IsLocked = false;
|
||||
+ if (IsDisposed)
|
||||
+ return false;
|
||||
+ if (Stream is not null)
|
||||
+ return false;
|
||||
+
|
||||
+ try
|
||||
+ {
|
||||
+ // Attempt to acquire lock while holding guard, and if successful
|
||||
+ // immediately unlock again while still holding guard. This ensures
|
||||
+ // no other thread will spuriously observe the lock as held due to
|
||||
+ // the lock attempt here.
|
||||
+ using var guard = LockGuard();
|
||||
+ if (TryLockFile())
|
||||
+ {
|
||||
+ UnlockFile();
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ catch (Exception)
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
- var wasLocked = IsLocked;
|
||||
- if (wasLocked)
|
||||
- Unlock();
|
||||
- Stream.Dispose();
|
||||
- // We do not delete the lock file here because there is no reliable way to perform a
|
||||
- // 'delete if no one has the file open' operation atomically on *nix. This is a leak.
|
||||
+ if (IsDisposed)
|
||||
+ return;
|
||||
+ IsDisposed = true;
|
||||
+ if (Stream is not null)
|
||||
+ {
|
||||
+ try
|
||||
+ {
|
||||
+ UnlockFile();
|
||||
+ }
|
||||
+ catch (Exception)
|
||||
+ {
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -792,56 +903,4 @@ public void Dispose()
|
||||
}
|
||||
}
|
||||
}
|
||||
-
|
||||
- /// <summary>
|
||||
- /// Approximates a named mutex with 'locked', 'unlocked' and 'abandoned' states.
|
||||
- /// There is no reliable way to detect whether a mutex has been abandoned on some target platforms,
|
||||
- /// so we use the AliveMutex to manually track whether the creator of a mutex is still running,
|
||||
- /// while the HeldMutex represents the actual lock state of the mutex.
|
||||
- /// </summary>
|
||||
- internal sealed class ServerFileMutexPair : IServerMutex
|
||||
- {
|
||||
- public readonly FileMutex AliveMutex;
|
||||
- public readonly FileMutex HeldMutex;
|
||||
-
|
||||
- public bool IsDisposed { get; private set; }
|
||||
-
|
||||
- public ServerFileMutexPair(string mutexName, bool initiallyOwned, out bool createdNew)
|
||||
- {
|
||||
- AliveMutex = new FileMutex(mutexName + "-alive");
|
||||
- HeldMutex = new FileMutex(mutexName + "-held");
|
||||
- createdNew = AliveMutex.TryLock(0);
|
||||
- if (initiallyOwned && createdNew)
|
||||
- {
|
||||
- if (!TryLock(0))
|
||||
- throw new Exception("Failed to lock mutex after creating it");
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- public bool TryLock(int timeoutMs)
|
||||
- {
|
||||
- if (IsDisposed)
|
||||
- throw new ObjectDisposedException("Mutex");
|
||||
- return HeldMutex.TryLock(timeoutMs);
|
||||
- }
|
||||
-
|
||||
- public void Dispose()
|
||||
- {
|
||||
- if (IsDisposed)
|
||||
- return;
|
||||
- IsDisposed = true;
|
||||
-
|
||||
- try
|
||||
- {
|
||||
- HeldMutex.Unlock();
|
||||
- AliveMutex.Unlock();
|
||||
- }
|
||||
- finally
|
||||
- {
|
||||
- AliveMutex.Dispose();
|
||||
- HeldMutex.Dispose();
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
}
|
||||
--
|
||||
2.36.2
|
|
@ -1,48 +0,0 @@
|
|||
From 9a05b184f74fc299ddd33bccb74d153e0692d8c8 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Deseyn <tom.deseyn@gmail.com>
|
||||
Date: Wed, 14 Sep 2022 11:06:42 +0200
|
||||
Subject: [PATCH 1/8] source-build: support building runtime using non-portable
|
||||
runtime packages.
|
||||
|
||||
Currently source-build performs a 'runtime-portable' build that produces
|
||||
'linux-{arch}' packages that are used when building target runtime (non-portable).
|
||||
|
||||
With this change, we can use the non-portable packages that are produced by
|
||||
a previous (non-portable) 'runtime' build. This helps eliminate the
|
||||
'runtime-portable' build.
|
||||
|
||||
---
|
||||
src/runtime/Directory.Build.targets | 15 ++++
|
||||
src/runtime/Directory.Build.targets.orig | 96 ++++++++++++++++++++++++
|
||||
2 files changed, 111 insertions(+)
|
||||
create mode 100644 src/runtime/Directory.Build.targets.orig
|
||||
|
||||
diff --git a/src/runtime/Directory.Build.targets b/src/runtime/Directory.Build.targets
|
||||
index d0c698797..4337207a4 100644
|
||||
--- a/src/runtime/Directory.Build.targets
|
||||
+++ b/src/runtime/Directory.Build.targets
|
||||
@@ -11,6 +11,21 @@
|
||||
<Import Project="$(RepositoryEngineeringDir)liveBuilds.targets" />
|
||||
<Import Project="$(RepositoryEngineeringDir)python.targets" />
|
||||
|
||||
+ <!--
|
||||
+ When .NET gets built from source, make the SDK aware there are bootstrap packages
|
||||
+ for Microsoft.NETCore.App.Runtime.<rid> and Microsoft.NETCore.App.Crossgen2.<rid>.
|
||||
+ -->
|
||||
+ <ItemGroup Condition=" '$(DotNetBuildFromSource)' == 'true' " >
|
||||
+ <KnownFrameworkReference Update="@(KnownFrameworkReference->WithMetadataValue('Identity', 'Microsoft.NETCore.App')->WithMetadataValue('TargetFramework', '$(NetCoreAppCurrent)'))">
|
||||
+ <RuntimePackRuntimeIdentifiers>$(PackageRID)</RuntimePackRuntimeIdentifiers>
|
||||
+ </KnownFrameworkReference>
|
||||
+ <KnownCrossgen2Pack Update="@(KnownCrossgen2Pack->WithMetadataValue('Identity', 'Microsoft.NETCore.App.Crossgen2')->WithMetadataValue('TargetFramework', '$(NetCoreAppCurrent)'))">
|
||||
+ <Crossgen2RuntimeIdentifiers>$(PackageRID)</Crossgen2RuntimeIdentifiers>
|
||||
+ </KnownCrossgen2Pack>
|
||||
+ <!-- Avoid references to Microsoft.AspNetCore.App.Runtime.<rid> -->
|
||||
+ <KnownFrameworkReference Remove="Microsoft.AspNetCore.App" />
|
||||
+ </ItemGroup>
|
||||
+
|
||||
<PropertyGroup>
|
||||
<!--
|
||||
Define this here (not just in Versions.props) because the SDK resets it
|
||||
--
|
||||
2.38.0
|
||||
|
|
@ -1,189 +0,0 @@
|
|||
From f54977e2fc84527fe58024ed5537cb63244168e2 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/dotnet/runtime/pull/76500
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Tue, 13 Sep 2022 14:17:35 +0200
|
||||
Subject: [PATCH 1/1] Mono musl support
|
||||
|
||||
---
|
||||
src/coreclr/pal/src/misc/perfjitdump.cpp | 2 +-
|
||||
src/mono/CMakeLists.txt | 29 ++++++++++++++++++++++++
|
||||
src/mono/mono.proj | 18 +++++++++------
|
||||
src/mono/mono/metadata/domain.c | 10 ++++++++
|
||||
src/mono/mono/mini/CMakeLists.txt | 10 ++++++++
|
||||
src/mono/mono/utils/mono-context.h | 8 +++++++
|
||||
6 files changed, 69 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/runtime/src/coreclr/pal/src/misc/perfjitdump.cpp b/src/runtime/src/coreclr/pal/src/misc/perfjitdump.cpp
|
||||
index d80bd58038c..3488397b0da 100644
|
||||
--- a/src/runtime/src/coreclr/pal/src/misc/perfjitdump.cpp
|
||||
+++ b/src/runtime/src/coreclr/pal/src/misc/perfjitdump.cpp
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <sys/uio.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
-#include <linux/limits.h>
|
||||
+#include <limits.h>
|
||||
|
||||
#include "../inc/llvm/ELF.h"
|
||||
|
||||
diff --git a/src/runtime/src/mono/CMakeLists.txt b/src/runtime/src/mono/CMakeLists.txt
|
||||
index 49a73b1b709..7e596d69d35 100644
|
||||
--- a/src/runtime/src/mono/CMakeLists.txt
|
||||
+++ b/src/runtime/src/mono/CMakeLists.txt
|
||||
@@ -208,6 +208,35 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
# Enable the "full RELRO" options (RELRO & BIND_NOW) at link time
|
||||
add_link_options(-Wl,-z,relro)
|
||||
add_link_options(-Wl,-z,now)
|
||||
+ # Detect Linux ID
|
||||
+ # TODO: Eventually merge with eng/native/configureplatform.cmake
|
||||
+ set(LINUX_ID_FILE "/etc/os-release")
|
||||
+ if(CMAKE_CROSSCOMPILING)
|
||||
+ set(LINUX_ID_FILE "${CMAKE_SYSROOT}${LINUX_ID_FILE}")
|
||||
+ endif()
|
||||
+
|
||||
+ if(EXISTS ${LINUX_ID_FILE})
|
||||
+ execute_process(
|
||||
+ COMMAND bash -c "source ${LINUX_ID_FILE} && echo \$ID"
|
||||
+ OUTPUT_VARIABLE CLR_CMAKE_LINUX_ID
|
||||
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
+
|
||||
+ execute_process(
|
||||
+ COMMAND bash -c "if strings \"${CMAKE_SYSROOT}/usr/bin/ldd\" 2>&1 | grep -q musl; then echo musl; fi"
|
||||
+ OUTPUT_VARIABLE CLR_CMAKE_LINUX_MUSL
|
||||
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
+ endif()
|
||||
+
|
||||
+ if(DEFINED CLR_CMAKE_LINUX_ID)
|
||||
+ if(CLR_CMAKE_LINUX_ID STREQUAL alpine)
|
||||
+ set(CLR_CMAKE_HOST_ALPINE_LINUX 1)
|
||||
+ set(CLR_CMAKE_HOST_OS ${CLR_CMAKE_LINUX_ID})
|
||||
+ endif()
|
||||
+
|
||||
+ if(CLR_CMAKE_LINUX_MUSL STREQUAL musl)
|
||||
+ set(CLR_CMAKE_HOST_LINUX_MUSL 1)
|
||||
+ endif()
|
||||
+ endif(DEFINED CLR_CMAKE_LINUX_ID)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
set(HOST_LINUX 1)
|
||||
add_definitions(-D_GNU_SOURCE -D_REENTRANT)
|
||||
diff --git a/src/runtime/src/mono/mono.proj b/src/runtime/src/mono/mono.proj
|
||||
index d6a0c9a8ec2..933ed60cea7 100644
|
||||
--- a/src/runtime/src/mono/mono.proj
|
||||
+++ b/src/runtime/src/mono/mono.proj
|
||||
@@ -417,11 +417,15 @@
|
||||
<!-- Linux options -->
|
||||
<ItemGroup Condition="'$(TargetsLinux)' == true">
|
||||
<_MonoCFLAGS Include="-Wl,--build-id=sha1" />
|
||||
+ <_MonoCFLAGS Include="-Wno-strict-prototypes" />
|
||||
<_MonoCXXFLAGS Include="-Wl,--build-id=sha1" />
|
||||
+ <_MonoCXXFLAGS Include="-Wno-strict-prototypes" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(RealTargetOS)' == 'Linux'">
|
||||
<_MonoAOTCFLAGS Include="-Wl,--build-id=sha1" />
|
||||
+ <_MonoAOTCFLAGS Include="-Wno-strict-prototypes" />
|
||||
<_MonoAOTCXXFLAGS Include="-Wl,--build-id=sha1" />
|
||||
+ <_MonoAOTCXXFLAGS Include="-Wno-strict-prototypes" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Devloop features -->
|
||||
@@ -500,15 +504,15 @@
|
||||
<MonoToolchainPrebuiltOS Condition="$([MSBuild]::IsOSPlatform('OSX'))">darwin-x86_64</MonoToolchainPrebuiltOS>
|
||||
<MonoToolchainPrebuiltOS Condition="'$(OS)' == 'Windows_NT'">windows-x86_64</MonoToolchainPrebuiltOS>
|
||||
<_MonoRuntimeFilePath>$(MonoObjDir)out\lib\$(MonoFileName)</_MonoRuntimeFilePath>
|
||||
- <_LinuxAbi Condition="'$(TargetsAndroid)' != 'true'">gnu</_LinuxAbi>
|
||||
- <_LinuxAbi Condition="'$(TargetsAndroid)' == 'true'">android</_LinuxAbi>
|
||||
+ <_LinuxAbi Condition="'$(TargetsAndroid)' != 'true'">alpine-linux-musl</_LinuxAbi>
|
||||
+ <_LinuxAbi Condition="'$(TargetsAndroid)' == 'true'">linux-android</_LinuxAbi>
|
||||
<_LinuxFloatAbi Condition="'$(TargetsAndroid)' != 'true'">hf</_LinuxFloatAbi>
|
||||
<_Objcopy>objcopy</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 'arm'">arm-linux-$(_LinuxAbi)eabi$(_LinuxFloatAbi)-$(_Objcopy)</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 'arm64'">aarch64-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 's390x'">s390x-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 'x64'">x86_64-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 'x86'">i686-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 'arm' and '$(CrossBuild)' == 'true'">arm-$(_LinuxAbi)eabi$(_LinuxFloatAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 'arm64' and '$(CrossBuild)' == 'true'">aarch64-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 's390x' and '$(CrossBuild)' == 'true'">s390x-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 'x64' and '$(CrossBuild)' == 'true'">x86_64-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 'x86' and '$(CrossBuild)' == 'true'">i686-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
<_Objcopy Condition="'$(TargetsAndroid)' == 'true'">$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/$(MonoToolchainPrebuiltOS)/bin/$(_Objcopy)</_Objcopy>
|
||||
</PropertyGroup>
|
||||
<!-- test viability of objcopy command -->
|
||||
diff --git a/src/runtime/src/mono/mono/metadata/domain.c b/src/runtime/src/mono/mono/metadata/domain.c
|
||||
index 4a8e06d28ae..e9868bd1b2c 100644
|
||||
--- a/src/runtime/src/mono/mono/metadata/domain.c
|
||||
+++ b/src/runtime/src/mono/mono/metadata/domain.c
|
||||
@@ -138,6 +138,14 @@ create_root_domain (void)
|
||||
return domain;
|
||||
}
|
||||
|
||||
+static MONO_NO_OPTIMIZATION MONO_NEVER_INLINE void
|
||||
+ensure_stack_size (void)
|
||||
+{
|
||||
+ const int default_size = 5 * 1024 * 1024;
|
||||
+ volatile uint8_t *s = (uint8_t *)g_alloca(default_size);
|
||||
+ *s = 0;
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* mono_init_internal:
|
||||
*
|
||||
@@ -181,6 +189,8 @@ mono_init_internal (const char *filename, const char *exe_filename, const char *
|
||||
|
||||
mono_counters_register ("Max HashTable Chain Length", MONO_COUNTER_INT|MONO_COUNTER_METADATA, &mono_g_hash_table_max_chain_length);
|
||||
|
||||
+ ensure_stack_size ();
|
||||
+
|
||||
mono_gc_base_init ();
|
||||
mono_thread_info_attach ();
|
||||
|
||||
diff --git a/src/runtime/src/mono/mono/mini/CMakeLists.txt b/src/runtime/src/mono/mono/mini/CMakeLists.txt
|
||||
index 128ed08f45b..17cbe696c4b 100644
|
||||
--- a/src/runtime/src/mono/mono/mini/CMakeLists.txt
|
||||
+++ b/src/runtime/src/mono/mono/mini/CMakeLists.txt
|
||||
@@ -364,6 +364,11 @@ if(NOT DISABLE_SHARED_LIBS)
|
||||
set_target_properties(monosgen-shared PROPERTIES IMPORT_SUFFIX ".import.lib")
|
||||
endif()
|
||||
target_link_libraries(monosgen-shared PRIVATE ${OS_LIBS} ${ICONV_LIB} ${LLVM_LIBS} ${ICU_LIBS} ${Z_LIBS})
|
||||
+ # Alpine Linux implements ucontext in a different library
|
||||
+ if(CLR_CMAKE_HOST_ALPINE_LINUX AND TARGET_S390X)
|
||||
+ target_link_libraries(monosgen-shared PRIVATE ucontext)
|
||||
+ endif(CLR_CMAKE_HOST_ALPINE_LINUX AND TARGET_S390X)
|
||||
+
|
||||
if(ICU_LDFLAGS)
|
||||
set_property(TARGET monosgen-shared APPEND_STRING PROPERTY LINK_FLAGS " ${ICU_LDFLAGS}")
|
||||
endif()
|
||||
@@ -488,6 +493,11 @@ if(NOT DISABLE_EXECUTABLES)
|
||||
set_target_properties(mono-sgen PROPERTIES OUTPUT_NAME mono-aot-cross)
|
||||
endif()
|
||||
target_link_libraries(mono-sgen PRIVATE monosgen-static ${OS_LIBS} ${ICONV_LIB} ${LLVM_LIBS} ${ICU_LIBS} ${Z_LIBS})
|
||||
+ # Alpine Linux implements ucontext in a different library
|
||||
+ if(CLR_CMAKE_HOST_ALPINE_LINUX AND TARGET_S390X)
|
||||
+ target_link_libraries(mono-sgen PRIVATE ucontext)
|
||||
+ endif(CLR_CMAKE_HOST_ALPINE_LINUX 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}")
|
||||
diff --git a/src/runtime/src/mono/mono/utils/mono-context.h b/src/runtime/src/mono/mono/utils/mono-context.h
|
||||
index bd1a3cd0104..db4ba452bcb 100644
|
||||
--- a/src/runtime/src/mono/mono/utils/mono-context.h
|
||||
+++ b/src/runtime/src/mono/mono/utils/mono-context.h
|
||||
@@ -11,6 +11,14 @@
|
||||
#ifndef __MONO_MONO_CONTEXT_H__
|
||||
#define __MONO_MONO_CONTEXT_H__
|
||||
|
||||
+/*
|
||||
+ * Handle non-gnu libc versions with nothing in features.h
|
||||
+ * We have no idea what they're compatible with, so always fail.
|
||||
+ */
|
||||
+#ifndef __GLIBC_PREREQ
|
||||
+# define __GLIBC_PREREQ(x,y) 0
|
||||
+#endif
|
||||
+
|
||||
#include "mono-compiler.h"
|
||||
#include "mono-sigcontext.h"
|
||||
#include "mono-machine.h"
|
||||
--
|
||||
2.36.3
|
||||
|
|
@ -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.
|
||||
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>
|
|
@ -1,22 +0,0 @@
|
|||
From 75c3e74ea35219f257c80daf9a236e0f518a7875 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/dotnet/installer/pull/13378
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Wed, 9 Mar 2022 20:16:03 +0000
|
||||
Subject: [PATCH 1/1] Enable system libunwind
|
||||
|
||||
Forces use of system's libunwind
|
||||
|
||||
---
|
||||
|
||||
diff --git a/src/runtime/eng/SourceBuild.props b/src/runtime/eng/SourceBuild.props
|
||||
index f595e9b7d1..d90fd47dbd 100644
|
||||
--- a/src/runtime/eng/SourceBuild.props
|
||||
+++ b/src/runtime/eng/SourceBuild.props
|
||||
@@ -47,6 +47,7 @@
|
||||
<InnerBuildArgs>$(InnerBuildArgs) /p:BuildDebPackage=false</InnerBuildArgs>
|
||||
<InnerBuildArgs>$(InnerBuildArgs) /p:RuntimeOS=$(RuntimeOS)</InnerBuildArgs>
|
||||
<InnerBuildArgs>$(InnerBuildArgs) /p:AdditionalRuntimeIdentifierParent=$(BaseOS)</InnerBuildArgs>
|
||||
+ <InnerBuildArgs>$(InnerBuildArgs) --cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE</InnerBuildArgs>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
diff --git a/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp b/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp
|
||||
index 03712c3b684..99d8a457957 100644
|
||||
--- a/src/runtimr/src/coreclr/debug/createdump/crashinfounix.cpp
|
||||
+++ b/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp
|
||||
@@ -395,7 +395,7 @@ CrashInfo::ReadProcessMemory(void* address, void* buffer, size_t size, size_t* r
|
||||
// performance optimization.
|
||||
m_canUseProcVmReadSyscall = false;
|
||||
assert(m_fd != -1);
|
||||
- *read = pread64(m_fd, buffer, size, (off64_t)address);
|
||||
+ *read = pread(m_fd, buffer, size, (off_t)address);
|
||||
}
|
||||
|
||||
if (*read == (size_t)-1)
|
||||
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
From 4c74721e1f5da9642adab03075dda2f55719ac7b Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/dotnet/sdk/pull/14239
|
||||
From: Esgariot <esgariot@icloud.com>
|
||||
Date: Mon, 19 Oct 2020 23:42:37 +0200
|
||||
Subject: [PATCH 1/1] Add zsh compdef completion script.
|
||||
|
||||
Continuing off of PR 13384 in upstream.
|
||||
This commit is ready to be rebased to include appropriate co-authors
|
||||
before merging PR.
|
||||
|
||||
---
|
||||
scripts/register-completions.zsh | 13 +++----------
|
||||
1 file changed, 3 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/sdk/scripts/register-completions.zsh b/src/sdk/scripts/register-completions.zsh
|
||||
index 8eebe9a867..faa32fef71 100644
|
||||
--- a/src/sdk/scripts/register-completions.zsh
|
||||
+++ b/src/sdk/scripts/register-completions.zsh
|
||||
@@ -1,10 +1,3 @@
|
||||
-# zsh parameter completion for the dotnet CLI
|
||||
-
|
||||
-_dotnet_zsh_complete()
|
||||
-{
|
||||
- local completions=("$(dotnet complete "$words")")
|
||||
-
|
||||
- reply=( "${(ps:\n:)completions}" )
|
||||
-}
|
||||
-
|
||||
-compctl -K _dotnet_zsh_complete dotnet
|
||||
+#compdef dotnet
|
||||
+local completions=("$(dotnet complete "$words")")
|
||||
+[[ -n "$completions" ]] && compadd -- "${(ps:\n:)completions}"
|
||||
--
|
||||
2.34.1
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From eb7141ec561b9a2551d16ee661343b87c5e5f1b1 Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Sun, 23 Jan 2022 15:47:27 +0000
|
||||
Subject: [PATCH 1/1] SDK telemetry optout
|
||||
|
||||
Disables telemetry by default.
|
||||
|
||||
---
|
||||
src/Cli/dotnet/Program.cs | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/src/sdk/src/Cli/dotnet/Program.cs b/src/sdk/src/Cli/dotnet/Program.cs
|
||||
index c3be733b4a..2a157a75d5 100644
|
||||
--- a/src/sdk/src/Cli/dotnet/Program.cs
|
||||
+++ b/src/sdk/src/Cli/dotnet/Program.cs
|
||||
@@ -27,6 +27,13 @@ public class Program
|
||||
|
||||
public static int Main(string[] args)
|
||||
{
|
||||
+ // opt out of telemetry by default if the env var is unset
|
||||
+ string telemetryValue = Environment.GetEnvironmentVariable("DOTNET_CLI_TELEMETRY_OPTOUT");
|
||||
+ if (String.IsNullOrEmpty(telemetryValue))
|
||||
+ {
|
||||
+ Environment.SetEnvironmentVariable("DOTNET_CLI_TELEMETRY_OPTOUT", "1");
|
||||
+ }
|
||||
+
|
||||
DebugHelper.HandleDebugSwitch(ref args);
|
||||
|
||||
// Capture the current timestamp to calculate the host overhead.
|
||||
--
|
||||
2.35.1
|
||||
|
|
@ -1,173 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
# secfixes:
|
||||
# 6.0.6-r0:
|
||||
# - CVE-2022-30184
|
||||
# 6.0.8-r0:
|
||||
# - CVE-2022-34716
|
||||
# 6.0.9-r0:
|
||||
# - CVE-2022-38013
|
||||
# 6.0.10-r0:
|
||||
# - CVE-2022-41032
|
||||
# 6.0.12-r0:
|
||||
# - CVE-2022-41089
|
||||
# 6.0.13-r0:
|
||||
# - CVE-2023-21538
|
||||
# 6.0.14-r0:
|
||||
# - CVE-2023-21808
|
||||
# 6.0.16-r0:
|
||||
# - CVE-2023-28260
|
||||
# 6.0.18-r0:
|
||||
# - CVE-2023-24895
|
||||
# - CVE-2023-24897
|
||||
# - CVE-2023-24936
|
||||
# - CVE-2023-29331
|
||||
# - CVE-2023-29337
|
||||
# - CVE-2023-33126
|
||||
# - CVE-2023-33128
|
||||
# - CVE-2023-33135
|
||||
# 6.0.20-r0:
|
||||
# - CVE-2023-33127
|
||||
# - CVE-2023-33170
|
||||
# 6.0.21-r0:
|
||||
# - CVE-2023-35390
|
||||
# - CVE-2023-38180
|
||||
# - CVE-2023-35391
|
||||
# 6.0.22-r0:
|
||||
# - CVE-2023-36792
|
||||
# - CVE-2023-36793
|
||||
# - CVE-2023-36794
|
||||
# - CVE-2023-36796
|
||||
# - CVE-2023-36799
|
||||
# 6.0.23-r0:
|
||||
# - CVE-2023-44487
|
||||
# 6.0.24-r0:
|
||||
# - CVE-2023-36792
|
||||
# - CVE-2023-36793
|
||||
# - CVE-2023-36794
|
||||
# - CVE-2023-36796
|
||||
# - CVE-2023-36799
|
||||
# - CVE-2023-44487
|
||||
# 6.0.25-r0:
|
||||
# - CVE-2023-36049
|
||||
# - CVE-2023-36558
|
||||
|
||||
|
||||
pkgname=dotnet6-runtime
|
||||
pkgver=6.0.25
|
||||
_bldver=6.0.125-r0
|
||||
pkgrel=0
|
||||
|
||||
_pkgver_macro=${pkgver%.*}
|
||||
_pkgver_name=${_pkgver_macro//[.0]}
|
||||
_bldver_ver=${_bldver%%-*}
|
||||
pkgdesc="The .NET $_pkgver_macro Core runtime"
|
||||
arch="x86_64 aarch64 armv7"
|
||||
url="https://dotnet.microsoft.com/"
|
||||
license="MIT"
|
||||
depends="
|
||||
dotnet$_pkgver_name-hostfxr
|
||||
icu-data-full
|
||||
icu-libs
|
||||
"
|
||||
makedepends="dotnet$_pkgver_name-build=$_bldver"
|
||||
subpackages="
|
||||
aspnetcore$_pkgver_name-runtime:aspnetcore_runtime:noarch
|
||||
aspnetcore$_pkgver_name-targeting-pack:aspnetcore_targeting_pack:noarch
|
||||
dotnet$_pkgver_name-apphost-pack:apphost_pack
|
||||
dotnet$_pkgver_name-hostfxr
|
||||
dotnet$_pkgver_name-targeting-pack:targeting_pack:noarch
|
||||
dotnet-host:host
|
||||
"
|
||||
provides="dotnet$_pkgver_name=$pkgver-r$pkgrel"
|
||||
options="!check" # No test suite
|
||||
source="dotnet.sh.in"
|
||||
builddir="$srcdir"
|
||||
_libdir="/usr/lib"
|
||||
|
||||
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() {
|
||||
sed "s|%LIBDIR%|$_libdir/dotnet|" "$srcdir"/dotnet.sh.in > "$srcdir"/dotnet.sh
|
||||
}
|
||||
|
||||
package() {
|
||||
install -dm 755 "$pkgdir"/$_libdir/dotnet/shared
|
||||
|
||||
cp -r $_libdir/dotnet/bootstrap/$_bldver_ver/shared/Microsoft.NETCore.App "$pkgdir"/$_libdir/dotnet/shared/.
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
cp -r $_libdir/dotnet/bootstrap/$_bldver_ver/dotnet "$subpkgdir"/$_libdir/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
|
||||
install -Dm 644 "$srcdir"/dotnet.sh -t "$subpkgdir"/etc/profile.d/
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
cp -r $_libdir/dotnet/bootstrap/$_bldver_ver/host "$subpkgdir"/$_libdir/dotnet/.
|
||||
}
|
||||
|
||||
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/shared
|
||||
|
||||
cp -r $_libdir/dotnet/bootstrap/$_bldver_ver/shared/Microsoft.AspNetCore.App "$subpkgdir"/$_libdir/dotnet/shared/.
|
||||
}
|
||||
|
||||
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/packs
|
||||
|
||||
cp -r $_libdir/dotnet/bootstrap/$_bldver_ver/packs/Microsoft.NETCore.App.Host.* "$subpkgdir"/$_libdir/dotnet/packs/.
|
||||
}
|
||||
|
||||
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/packs
|
||||
|
||||
cp -r $_libdir/dotnet/bootstrap/$_bldver_ver/packs/Microsoft.NETCore.App.Ref "$subpkgdir"/$_libdir/dotnet/packs/.
|
||||
}
|
||||
|
||||
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/packs
|
||||
|
||||
cp -r $_libdir/dotnet/bootstrap/$_bldver_ver/packs/Microsoft.AspNetCore.App.Ref "$subpkgdir"/$_libdir/dotnet/packs/.
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
c3f31956976b77198e72a3fef3427338b6b2961f8c121416040c1105de0ce8073e46f4c2e9ef22a001aee69cbe39621c2ddac988522693110071dfae42f2e2b7 dotnet.sh.in
|
||||
"
|
|
@ -1,144 +0,0 @@
|
|||
# dotnet6-runtime
|
||||
|
||||
This is the .NET 6.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
|
||||
* `aspnetcore6-runtime`
|
||||
* `aspnetcore6-targeting-pack`
|
||||
* `dotnet6-apphost-pack` (used by dotnet6-runtime)
|
||||
* `dotnet6-hostfxr` (used by dotnet-host)
|
||||
* `dotnet6-runtime`
|
||||
* `dotnet6-targeting-pack`
|
||||
* `dotnet-host`
|
||||
|
||||
## How to build dotnet6 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, dotnet6 is built using three different aports.
|
||||
|
||||
* `community/dotnet6-stage0`
|
||||
Builds minimum components for full build of dotnet6, and packages these in an initial
|
||||
`dotnet6-stage0-bootstrap` package that `dotnet6-build` pulls.
|
||||
* `community/dotnet6-build`
|
||||
Builds full and packages dotnet6 fully using either stage0 or previoulsy built
|
||||
dotnet6 build.
|
||||
* `community/dotnet6-runtime`
|
||||
As abuild does not allow different versions for subpackages, a different aport
|
||||
is required to package runtime bits from dotnet6-build.
|
||||
|
||||
## 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 `dotnet6-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 `dotnet6` as opposed to `dotnet-6.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/dotnet6-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 dotnet6/<name>`
|
||||
- `git add` any new patches
|
||||
- `git remove` any now-unnecessary patches
|
||||
- `git commit -m 'community/dotnet6-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/dotnet6-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 dotnet6/<name>`
|
||||
- `git add` any new patches
|
||||
- `git remove` any now-unnecessary patches
|
||||
- `git commit -m 'community/dotnet6-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,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,514 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
pkgname=dotnet6-stage0
|
||||
pkgver=6.0.116
|
||||
pkgrel=4
|
||||
|
||||
[ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross=""
|
||||
|
||||
# Tag of tarball generator.
|
||||
_gittag=v$pkgver
|
||||
|
||||
# Versions of prebuilt artifacts and bootstrap tar
|
||||
_artifactsver=6.0.112
|
||||
_bootstrapver="6.0.116"
|
||||
_bootstraprel=0
|
||||
_installerver=${_gittag/v}
|
||||
|
||||
# Version of packages that aren't defined in git-info
|
||||
_iltoolsver=6.0.12-servicing.22579.1
|
||||
|
||||
# Patches to be used. String before '_' refers to repo to patch
|
||||
# Look for patch notes within each patch for what they fix / where they come from
|
||||
# build_* patches applies directly to $builddir
|
||||
_patches="
|
||||
roslyn_57003-mono-namedmutex.patch
|
||||
roslyn_revert-lift-version-codeanalysis.patch
|
||||
runtime_76500-mono-musl-support.patch
|
||||
runtime_76500-properly-set-toolchain-for-crossbuilding-on-alpine.patch
|
||||
runtime_82269-mono-thread-coop-undefine-fortify-source.patch
|
||||
runtime_84442-support-adding-rids-with-dash-in-base-part.patch
|
||||
runtime_84443-suppress-clang-16-warnings.patch
|
||||
runtime_remove-usage-of-off64-t.patch
|
||||
"
|
||||
_extra_nupkgs="
|
||||
https://globalcdn.nuget.org/packages/system.reactive.core.4.1.1.nupkg
|
||||
"
|
||||
|
||||
_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"
|
||||
url=https://www.microsoft.com/net/core
|
||||
_giturl="https://github.com/dotnet/installer"
|
||||
license="MIT"
|
||||
options="!check" # Testsuite in main -build aport
|
||||
subpackages="
|
||||
dotnet$_pkgver_name-stage0-artifacts:artifacts:noarch
|
||||
dotnet$_pkgver_name-stage0-bootstrap
|
||||
"
|
||||
source="
|
||||
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
|
||||
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
|
||||
$_extra_nupkgs
|
||||
$_patches
|
||||
"
|
||||
makedepends_host="
|
||||
bash
|
||||
binutils
|
||||
clang
|
||||
cmake
|
||||
findutils
|
||||
g++
|
||||
gcc
|
||||
grep
|
||||
icu-dev
|
||||
jq
|
||||
krb5-dev
|
||||
libintl
|
||||
libstdc++
|
||||
libucontext-dev
|
||||
libunwind-dev
|
||||
libxml2-dev
|
||||
libxml2-utils
|
||||
linux-headers
|
||||
lttng-ust-dev
|
||||
musl-dev
|
||||
musl-utils
|
||||
openssl-dev
|
||||
pigz
|
||||
unzip
|
||||
zip
|
||||
zlib-dev
|
||||
"
|
||||
case $CARCH in
|
||||
s390x|x86) makedepends_host="$makedepends_host libucontext-dev";;
|
||||
*) makedepends_host="$makedepends_host lld-dev";;
|
||||
esac
|
||||
makedepends_build="
|
||||
$makedepends_host
|
||||
binutils$_cross
|
||||
git
|
||||
gcc$_cross
|
||||
llvm
|
||||
llvm-dev
|
||||
python3
|
||||
xz
|
||||
"
|
||||
case $CBUILD_ARCH in
|
||||
x86_64) _dotnet_arch="x64";;
|
||||
aarch64) _dotnet_arch="arm64";;
|
||||
armv7|armhf) _dotnet_arch="arm";;
|
||||
i586) _dotnet_arch="x86";;
|
||||
*) _dotnet_arch=$CBUILD_ARCH;;
|
||||
esac
|
||||
case $CTARGET_ARCH in
|
||||
x86_64) _dotnet_target="x64";;
|
||||
aarch64) _dotnet_target="arm64";;
|
||||
armv7|armhf) _dotnet_target="arm";;
|
||||
i586) _dotnet_target="x86";;
|
||||
*) _dotnet_target=$CTARGET_ARCH;;
|
||||
esac
|
||||
|
||||
builddir="$srcdir"/dotnet-${_gittag/release\/}
|
||||
_packagesdir="$srcdir"/local-packages
|
||||
_libdir="/usr/lib"
|
||||
_nugetdir="$srcdir"/nuget
|
||||
_downloaddir="$srcdir"/local-downloads
|
||||
_cli_root="$srcdir"/bootstrap
|
||||
_nuget="$_cli_root/dotnet nuget"
|
||||
_outputdir="$srcdir"/artifacts
|
||||
# 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
|
||||
|
||||
# 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
|
||||
mkdir -p "$srcdir" && cd "$srcdir"
|
||||
fi
|
||||
if [ -d "installer" ]; then
|
||||
cd "$srcdir"/installer
|
||||
else
|
||||
git clone $_giturl --branch $_gittag && cd "$srcdir"/installer
|
||||
fi
|
||||
|
||||
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 \
|
||||
/p:ArcadeBuildTarball=true \
|
||||
/p:TarballDir=$builddir \
|
||||
/p:TarballFilePath=$_pkg
|
||||
|
||||
msg "Compressing ${builddir##*/}.tar to $SRCDEST"
|
||||
xz -T0 -9 -vv -e -c > "$SRCDEST"/${builddir##*/}.tar.xz < "$_pkg"
|
||||
|
||||
cd "$startdir"
|
||||
abuild checksum
|
||||
}
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
mkdir -p "$_cli_root"
|
||||
mkdir -p $_packagesdir $_downloaddir $_outputdir $_nugetdir
|
||||
|
||||
# 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
|
||||
|
||||
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 -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() {
|
||||
"$_cli_root"/dotnet build-server shutdown
|
||||
if [ -z "${_runtimever+x}" ]; then
|
||||
local _runtimever=$(grep OutputPackageVersion "$builddir"/git-info/runtime.props | sed -E 's|</?OutputPackageVersion>||g' | tr -d ' ')
|
||||
fi
|
||||
local _runtimever_ns=$(awk '{if($2 ~ "Name=\"VS.Redist.Common.NetCore.SharedFramework.x64.*\""){print $3}}' "$builddir"/src/installer/eng/Version.Details.xml | awk -F '"' '{print $2}')
|
||||
|
||||
msg "[$(date)] Building runtime version $_runtimever"
|
||||
cd "$builddir"/src/runtime
|
||||
|
||||
local args="
|
||||
-c Release
|
||||
-clang
|
||||
-arch $_dotnet_target
|
||||
-bl
|
||||
/consoleLoggerParameters:ShowTimestamp
|
||||
/p:NoPgoOptimize=true
|
||||
/p:EnableNgenOptimization=false
|
||||
/p:GitCommitHash=$(grep GitCommitHash "$builddir"/git-info/runtime.props | sed -E 's|</?GitCommitHash>||g' | tr -d ' ')
|
||||
/p:ILAsmToolPath=$_cli_root
|
||||
"
|
||||
if [ "$CBUILD" != "$CHOST" ]; then
|
||||
local args="$args -cross"
|
||||
# https://github.com/dotnet/runtime/pull/75597 broke crossbuilding when true
|
||||
local DotNetBuildFromSource=false
|
||||
# x86 build of mono broken, thus do not build mono
|
||||
case $_dotnet_target in
|
||||
x86) local args="$args /p:DefaultSubsets=clr+libs+host+packs";;
|
||||
esac
|
||||
fi
|
||||
if [ "$_runtimever" != "${_runtimever##*-}" ]; then
|
||||
local args="$args /p:VersionSuffix=${_runtimever##*-}"
|
||||
fi
|
||||
DotNetBuildFromSource=$DotNetBuildFromSource ROOTFS_DIR="$CBUILDROOT" ./build.sh $args
|
||||
|
||||
for i in artifacts/packages/*/*/*.nupkg; do
|
||||
$_nuget push $i --source="$_packagesdir"
|
||||
done
|
||||
mkdir -p "$_downloaddir"/Runtime/$_runtimever_ns
|
||||
cp artifacts/packages/*/*/dotnet-runtime-*-*.tar.gz $_downloaddir/Runtime/$_runtimever_ns
|
||||
}
|
||||
|
||||
_roslyn() {
|
||||
"$_cli_root"/dotnet build-server shutdown
|
||||
if [ -z "${_roslynver+x}" ]; then
|
||||
local _roslynver=$(grep OutputPackageVersion "$builddir"/git-info/roslyn.props | sed -E 's|</?OutputPackageVersion>||g' | tr -d ' ')
|
||||
fi
|
||||
local _roslynver_ns=$(awk '{if($2 == "Name=\"Microsoft.Net.Compilers.Toolset\""){print $3}}' "$builddir"/src/installer/eng/Version.Details.xml | awk -F '"' '{print $2}')
|
||||
|
||||
msg "[$(date)] Building roslyn version $_roslynver"
|
||||
cd "$builddir"/src/roslyn
|
||||
|
||||
local args="
|
||||
-c Release
|
||||
-bl
|
||||
/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##*-}"
|
||||
fi
|
||||
DotNetBuildFromSource=false ./eng/build.sh --restore /p:UseAppHost=false
|
||||
./eng/build.sh --restore --build --pack $args
|
||||
for i in artifacts/packages/*/*/*.nupkg; do
|
||||
$_nuget push $i --source="$_packagesdir"
|
||||
done
|
||||
}
|
||||
|
||||
_sdk() {
|
||||
"$_cli_root"/dotnet build-server shutdown
|
||||
if [ -z "${_sdkver+x}" ]; then
|
||||
local _sdkver=$(grep OutputPackageVersion "$builddir"/git-info/sdk.props | sed -E 's|</?OutputPackageVersion>||g' | tr -d ' ')
|
||||
fi
|
||||
local _sdkver_ns=$(awk '{if($2 == "Name=\"Microsoft.NET.Sdk\""){print $3}}' "$builddir"/src/installer/eng/Version.Details.xml | awk -F '"' '{print $2}')
|
||||
|
||||
msg "[$(date)] Building sdk version $_sdkver"
|
||||
cd "$builddir"/src/sdk
|
||||
|
||||
local args="
|
||||
-c Release
|
||||
-bl
|
||||
/consoleLoggerParameters:ShowTimestamp
|
||||
/p:GitCommitHash=$(grep GitCommitHash "$builddir"/git-info/sdk.props | sed -E 's|</?GitCommitHash>||g' | tr -d ' ')
|
||||
/p:Architecture=$_dotnet_target
|
||||
"
|
||||
if [ "$_sdkver" != "${_sdkver##*-}" ]; then
|
||||
local args="$args /p:VersionSuffix=${_sdkver##*-}"
|
||||
fi
|
||||
./build.sh --pack /p:Projects=$builddir/src/sdk/source-build.slnf $args
|
||||
|
||||
for i in artifacts/packages/*/*/*.nupkg; do
|
||||
$_nuget push $i --source="$_packagesdir"
|
||||
done
|
||||
mkdir -p "$_downloaddir"/Sdk/$_sdkver_ns
|
||||
cp artifacts/packages/*/*/dotnet-toolset-internal-*.zip "$_downloaddir"/Sdk/$_sdkver_ns
|
||||
}
|
||||
|
||||
_aspnetcore() {
|
||||
"$_cli_root"/dotnet build-server shutdown
|
||||
if [ -z "${_aspnetver+x}" ]; then
|
||||
local _aspnetver=$(grep OutputPackageVersion "$builddir"/git-info/aspnetcore.props | sed -E 's|</?OutputPackageVersion>||g' | tr -d ' ')
|
||||
fi
|
||||
local _aspnetver_ns=$(awk '{if($2 == "Name=\"Microsoft.AspNetCore.App.Ref.Internal\""){print $3}}' "$builddir"/src/installer/eng/Version.Details.xml | awk -F '"' '{print $2}')
|
||||
|
||||
msg "[$(date)] Build aspnetcore version $_aspnetver"
|
||||
cd "$builddir"/src/aspnetcore
|
||||
local args="
|
||||
--os-name linux-musl
|
||||
-arch $_dotnet_target
|
||||
-c Release
|
||||
-no-build-nodejs
|
||||
-bl
|
||||
/consoleLoggerParameters:ShowTimestamp
|
||||
/p:GitCommitHash=$(grep GitCommitHash "$builddir"/git-info/aspnetcore.props | sed -E 's|</?GitCommitHash>||g' | tr -d ' ')
|
||||
/p:DotNetAssetRootUrl=file://$_downloaddir/
|
||||
/p:BuildOSName=linux-musl
|
||||
"
|
||||
# x86 crossgen broken
|
||||
case $CARCH in
|
||||
x86) local args="$args /p:CrossgenOutput=false";;
|
||||
esac
|
||||
|
||||
if [ "$_aspnetver" != "${_aspnetver##*-}" ]; then
|
||||
local args="$args /p:VersionSuffix=${_aspnetver##*-}"
|
||||
fi
|
||||
./eng/build.sh --pack $args
|
||||
|
||||
for i in artifacts/packages/*/*/*.nupkg; do
|
||||
$_nuget push $i --source="$_packagesdir"
|
||||
done
|
||||
mkdir -p "$_downloaddir"/aspnetcore/Runtime/$_aspnetver_ns
|
||||
cp artifacts/installers/*/aspnetcore-runtime-internal-*-linux-musl-$_dotnet_target.tar.gz "$_downloaddir"/aspnetcore/Runtime/$_aspnetver_ns
|
||||
cp artifacts/installers/*/aspnetcore_base_runtime.version "$_downloaddir"/aspnetcore/Runtime/$_aspnetver_ns
|
||||
}
|
||||
|
||||
_installer() {
|
||||
"$_cli_root"/dotnet build-server shutdown
|
||||
msg "[$(date)] Building installer version $_installerver"
|
||||
cd "$builddir"/src/installer
|
||||
|
||||
local args="
|
||||
-c Release
|
||||
-bl
|
||||
/consoleLoggerParameters:ShowTimestamp
|
||||
/p:OSName=linux-musl
|
||||
/p:HostOSName=linux-musl
|
||||
/p:Architecture=$_dotnet_target
|
||||
/p:CoreSetupBlobRootUrl=file://$_downloaddir/
|
||||
/p:DotnetToolsetBlobRootUrl=file://$_downloaddir/
|
||||
/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/
|
||||
"
|
||||
if [ "$_installerver" != "${_installerver##*-}" ]; then
|
||||
local args="$args /p:VersionSuffix=${_installerver##*-}"
|
||||
fi
|
||||
|
||||
# x86 crossgen broken
|
||||
case $CARCH in
|
||||
x86) local args="$args /p:DISABLE_CROSSGEN=True";;
|
||||
esac
|
||||
./build.sh $args
|
||||
|
||||
mkdir -p "$_downloaddir"/installer/$_installerver
|
||||
cp artifacts/packages/*/*/dotnet-sdk-$_pkgver_macro*.tar.gz "$_downloaddir"/installer/$_installerver
|
||||
}
|
||||
|
||||
build() {
|
||||
export _InitializeDotNetCli=$_cli_root
|
||||
export DOTNET_INSTALL_DIR=$_cli_root
|
||||
export PATH="$_cli_root:$PATH"
|
||||
export NUGET_PACKAGES=$_nugetdir
|
||||
export DotNetBuildFromSource=true
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=true
|
||||
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
|
||||
export SHELL=/bin/bash
|
||||
export EXTRA_CPPFLAGS="${CPPFLAGS/--sysroot=$CBUILDROOT}"
|
||||
export EXTRA_CXXFLAGS="${CXXFLAGS/--sysroot=$CBUILDROOT}"
|
||||
export EXTRA_CFLAGS="${CFLAGS/--sysroot=$CBUILDROOT}"
|
||||
export EXTRA_LDFLAGS="$LDFLAGS"
|
||||
unset CXXFLAGS CFLAGS LDFLAGS CPPFLAGS
|
||||
|
||||
ulimit -n 4096
|
||||
|
||||
_runtime
|
||||
_roslyn
|
||||
_sdk
|
||||
_aspnetcore
|
||||
_installer
|
||||
}
|
||||
|
||||
package() {
|
||||
# lua-aports / buildrepo doesn't know to always build stage0 first when dealing
|
||||
# with virtual packages. Thus, we need to depend on an empty stage0 pkg that
|
||||
# dotnetx-build will pull, thus forcing build of stage0 first
|
||||
mkdir -p "$pkgdir"
|
||||
}
|
||||
|
||||
bootstrap() {
|
||||
# allows stage0 to be pulled by dotnetx-build if first build of dotnetx
|
||||
provides="dotnet$_pkgver_name-bootstrap"
|
||||
provider_priority=$_pkgver_prior
|
||||
|
||||
install -dm 755 \
|
||||
"$subpkgdir"/$_libdir/dotnet/bootstrap/$pkgver/docs \
|
||||
"$subpkgdir"/$_libdir/dotnet/bootstrap/$pkgver/comp \
|
||||
"$subpkgdir"/$_libdir/dotnet/artifacts/$pkgver
|
||||
|
||||
# unpack build artifacts to bootstrap subdir for use by future builds
|
||||
tar --use-compress-program="pigz" \
|
||||
-xf "$_downloaddir"/installer/$_installerver/dotnet-sdk-$_pkgver_macro*.tar.gz \
|
||||
-C "$subpkgdir"/$_libdir/dotnet/bootstrap/$pkgver/ \
|
||||
--no-same-owner
|
||||
|
||||
local _iltoolsArray="
|
||||
runtime.*.Microsoft.NETCore.TestHost.*.nupkg
|
||||
runtime.*.Microsoft.NETCore.ILAsm.*.nupkg
|
||||
runtime.*.Microsoft.NETCore.ILDAsm.*.nupkg
|
||||
"
|
||||
|
||||
local _nupkgsArray="
|
||||
$_iltoolsArray
|
||||
Microsoft.NETCore.App.Host.*.*.nupkg
|
||||
Microsoft.NETCore.App.Runtime.*.*.nupkg
|
||||
Microsoft.NETCore.App.Crossgen2.*.*.nupkg
|
||||
runtime.*.Microsoft.NETCore.DotNetHost.*.nupkg
|
||||
runtime.*.Microsoft.NETCore.DotNetHostPolicy.*.nupkg
|
||||
runtime.*.Microsoft.NETCore.DotNetHostResolver.*.nupkg
|
||||
runtime.*.Microsoft.NETCore.DotNetAppHost.*.nupkg
|
||||
Microsoft.AspNetCore.App.Runtime.linux-musl-*.*.nupkg
|
||||
"
|
||||
|
||||
# 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
|
||||
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
|
||||
# following adjusts version
|
||||
for i in $_iltoolsArray; do
|
||||
local nupath="$subpkgdir"$_libdir/dotnet/artifacts/$pkgver/$i
|
||||
local nupath=$(find $nupath || true)
|
||||
if [ ! "$nupath" ]; then continue; fi
|
||||
local nupkg="${nupath##*/}"
|
||||
local nuname="${nupkg%-*}"
|
||||
local nuname="${nuname%.*.*.*}"
|
||||
local nuver="${nupkg/$nuname.}"
|
||||
local nuver="${nuver/.nupkg}"
|
||||
local nuspec="$nuname.nuspec"
|
||||
# shellcheck disable=SC2094
|
||||
unzip -p "$nupath" $nuspec | sed "s|$nuver|$_iltoolsver|" > "$srcdir"/$nuspec
|
||||
cd "$srcdir"
|
||||
zip -u "$nupath" $nuspec
|
||||
mv "$nupath" "${nupath/$nuver/$_iltoolsver}"
|
||||
done
|
||||
}
|
||||
|
||||
# build relies on a plethora of nupkgs which are provided by this Artifacts file.
|
||||
# stage0 sources these from Microsoft, which then allows bootstrap to build
|
||||
# locally hosted versions. The following unpacks built tarball into directory
|
||||
# for use by future builds.
|
||||
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 \
|
||||
"$subpkgdir"/usr/share/licenses
|
||||
|
||||
# extract artifacts to artifacts dir for use by future dotnet builds
|
||||
tar --use-compress-program="pigz" \
|
||||
-xf "$srcdir"/Private.SourceBuilt.Artifacts.*.noextract \
|
||||
-C "$subpkgdir"/$_libdir/dotnet/artifacts/$pkgver/ \
|
||||
--no-same-owner \
|
||||
--exclude '*x64*'
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
8c03186212149ba38df996068d511c29bd9be31e40fd1d7d21fc15fd2c0f6272479e8145ccb9544bb48c2c90bc8001ba05af1a7d92a60018ba7a983bc6187731 dotnet-v6.0.116.tar.xz
|
||||
3b6f37aee5698d7ef794c74a6d914b914f0220346a2f37e66e4a29db63e284747d02856ea6cd461c76f2a9e18ab047f40cc739e7f8227d69ea7316bce2020201 dotnet-sdk-6.0.116-linux-musl-x64.noextract
|
||||
dd3ec888e0d6644f2d6ef17ca7ce540d62226bb459cc0bbfe938229e757a8f4a10fc314a078f9898143c2271b8a70de77ffbdaecfa8c4c87921421e729f53a64 dotnet-sdk-6.0.116-linux-musl-arm64.noextract
|
||||
a35480c68e9f156a33225e80dc166db3a2fbe860f0f35497357fa6b5594df16dad9cbc8b5a7569ee4b6262070e100bf3c9d57721c68bac5bfc83abf61e4ace5d dotnet-sdk-6.0.116-linux-musl-arm.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
|
||||
2a24e56ddf0f3e3ef7cb64523b7c6ebf02b91a73287c342783eb66e43a9bbe0cd23eb4b26f435e6b194bf1a40017e6aae60333ff087b18657672b243e8c8ce76 runtime.linux-musl-arm.microsoft.netcore.ilasm.6.0.0.nupkg
|
||||
a24efb7578e2020e17c877ffe00b49f8f476b0845fdc55c16404008a9566d8628a72c2208bd23df745c88592ebe9c922b0cf1bc1f95f834b539bbcc2cbf516c5 system.reactive.core.4.1.1.nupkg
|
||||
42779a7bf1004fe0f7054cfa4f09f49d7f2a57c0543ec994ffbd54fb349abb508295476098ed35d60e9676be8bcc15aa8a9ec5c814cd1e058357530b5cdfb2b6 roslyn_57003-mono-namedmutex.patch
|
||||
cf40e37b4adfc61e24e3b48a397b4d813726d190f271869d946035279bf662a694a0fca448f5ae06ad2bb2300595223109ad64f60f65dac5cddf9308e12147a3 roslyn_revert-lift-version-codeanalysis.patch
|
||||
e67e0114bd324dae65eb19f6fa8c74414bee77cd30e299931b0d82b4ca1b6b6f88358a0c47ffb180f46c5cb28f61f79bb4a59d43c1ae3011bfe491e757de293a runtime_76500-mono-musl-support.patch
|
||||
6c614a48565c0e10f8714244e538bb453f7914ff58d01e9fd1255ad24698be916fd9e0a438c732737576fde6c0d68bec8f8958ce1b1b11b70c4a3b8663bdb8e2 runtime_76500-properly-set-toolchain-for-crossbuilding-on-alpine.patch
|
||||
827e899a83103f666dc3d57c1ec695bebc659a574f4a1d754da0cafe8c18d7db79c3950267e905fa078f94612ee1101fbddd0ea62b3c08947d8bcd7d9c8de41c runtime_82269-mono-thread-coop-undefine-fortify-source.patch
|
||||
bfa4fca9987b4a1369e59abb3f872841ae994d47e5f873db43d9a0563f5e720cd85714e73aada912997da55077262e01f1ae120f8d32043d661ba89d12384caa runtime_84442-support-adding-rids-with-dash-in-base-part.patch
|
||||
153255e80c2d2a131c2985041132417573ee98fa4b90153a1417080dbfb4d9bd03db9d5e241e54f5e664c4136eaf7facca9d4dad7ededf99a8f9068f26283fdb runtime_84443-suppress-clang-16-warnings.patch
|
||||
d972e77df27748a80c9b23eca12f9fbd78be97f9034b79cc5703ba58eb6750171d9a115314300f883620ccbca89c65a99ca7a45d54a421b028b590190b4bed80 runtime_remove-usage-of-off64-t.patch
|
||||
"
|
|
@ -1,140 +0,0 @@
|
|||
# dotnet6-stage0
|
||||
|
||||
This is the .NET 6.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
|
||||
* `dotnet6` (empty package to go around `buildrepo` build ordering bug)
|
||||
* `dotnet6-stage0-bootstrap` (packages binary bootstrap artifacts)
|
||||
* `dotnet6-stage0-artifacts` (packages non-binary bootstrap artifacts)
|
||||
|
||||
## How to build dotnet6 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, dotnet6 is built using three different aports.
|
||||
|
||||
* `community/dotnet6-stage0`
|
||||
Builds minimum components for full build of dotnet6, and packages these in an initial
|
||||
`dotnet6-stage0-bootstrap` package that `dotnet7-build` pulls.
|
||||
* `community/dotnet6-build`
|
||||
Builds full and packages dotnet6 fully using either stage0 or previoulsy built
|
||||
dotnet6 build.
|
||||
* `community/dotnet6-runtime`
|
||||
As abuild does not allow different versions for subpackages, a different aport
|
||||
is required to package runtime bits from dotnet6-build.
|
||||
|
||||
## 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 `dotnet6-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 `dotnet6` as opposed to `dotnet-6.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/dotnet6-stage0`
|
||||
|
||||
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 dotnet6/<name>`
|
||||
- `git add` any new patches
|
||||
- `git remove` any now-unnecessary patches
|
||||
- `git commit -m 'community/dotnet6-stage0: 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/dotnet6-stage0`
|
||||
|
||||
|
||||
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 dotnet6/<name>`
|
||||
- `git add` any new patches
|
||||
- `git remove` any now-unnecessary patches
|
||||
- `git commit -m 'community/dotnet6-stage0: 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,470 +0,0 @@
|
|||
From 210c17ea60f525837a7525df73e7332598ad4089 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/dotnet/roslyn/pull/57003
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Sat, 27 Aug 2022 21:26:01 -0800
|
||||
Subject: [PATCH 1/1] mono-named-mutex
|
||||
|
||||
---
|
||||
.../InternalUtilities/PlatformInformation.cs | 19 ++
|
||||
.../VBCSCompilerTests/BuildClientTests.cs | 2 +-
|
||||
.../CompilerServerApiTest.cs | 4 +-
|
||||
.../VBCSCompilerTests/CompilerServerTests.cs | 4 +-
|
||||
.../VBCSCompilerServerTests.cs | 7 +-
|
||||
src/Compilers/Shared/BuildServerConnection.cs | 251 +++++++++++-------
|
||||
6 files changed, 182 insertions(+), 105 deletions(-)
|
||||
|
||||
diff --git a/src/roslyn/src/Compilers/Core/Portable/InternalUtilities/PlatformInformation.cs b/src/roslyn/src/Compilers/Core/Portable/InternalUtilities/PlatformInformation.cs
|
||||
index 033e66cd2f2..d4fa56413fb 100644
|
||||
--- a/src/roslyn/src/Compilers/Core/Portable/InternalUtilities/PlatformInformation.cs
|
||||
+++ b/src/roslyn/src/Compilers/Core/Portable/InternalUtilities/PlatformInformation.cs
|
||||
@@ -31,5 +31,24 @@ public static bool IsRunningOnMono
|
||||
}
|
||||
}
|
||||
}
|
||||
+ /// <summary>
|
||||
+ /// Are we running on .NET 5 or later using the Mono runtime?
|
||||
+ /// Will also return true when running on Mono itself; if necessary
|
||||
+ /// we can use IsRunningOnMono to distinguish.
|
||||
+ /// </summary>
|
||||
+ public static bool IsUsingMonoRuntime
|
||||
+ {
|
||||
+ get
|
||||
+ {
|
||||
+ try
|
||||
+ {
|
||||
+ return !(Type.GetType("Mono.RuntimeStructs", throwOnError: false) is null);
|
||||
+ }
|
||||
+ catch
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
diff --git a/src/roslyn/src/Compilers/Server/VBCSCompilerTests/BuildClientTests.cs b/src/roslyn/src/Compilers/Server/VBCSCompilerTests/BuildClientTests.cs
|
||||
index 669d1bfb676..7f1d0468823 100644
|
||||
--- a/src/roslyn/src/Compilers/Server/VBCSCompilerTests/BuildClientTests.cs
|
||||
+++ b/src/roslyn/src/Compilers/Server/VBCSCompilerTests/BuildClientTests.cs
|
||||
@@ -79,7 +79,7 @@ public void ConnectToServerFails()
|
||||
// to connect. When it fails it should fall back to in-proc
|
||||
// compilation.
|
||||
bool holdsMutex;
|
||||
- using (var serverMutex = new Mutex(initiallyOwned: true,
|
||||
+ using (var serverMutex = BuildServerConnection.OpenOrCreateMutex(
|
||||
name: BuildServerConnection.GetServerMutexName(_pipeName),
|
||||
createdNew: out holdsMutex))
|
||||
{
|
||||
diff --git a/src/roslyn/src/Compilers/Server/VBCSCompilerTests/CompilerServerApiTest.cs b/src/roslyn/src/Compilers/Server/VBCSCompilerTests/CompilerServerApiTest.cs
|
||||
index 0dbd1b2e143..c00b72e8434 100644
|
||||
--- a/src/roslyn/src/Compilers/Server/VBCSCompilerTests/CompilerServerApiTest.cs
|
||||
+++ b/src/roslyn/src/Compilers/Server/VBCSCompilerTests/CompilerServerApiTest.cs
|
||||
@@ -103,7 +103,7 @@ public void MutexStopsServerStarting()
|
||||
var mutexName = BuildServerConnection.GetServerMutexName(pipeName);
|
||||
|
||||
bool holdsMutex;
|
||||
- using (var mutex = new Mutex(initiallyOwned: true,
|
||||
+ using (var mutex = BuildServerConnection.OpenOrCreateMutex(
|
||||
name: mutexName,
|
||||
createdNew: out holdsMutex))
|
||||
{
|
||||
@@ -119,7 +119,7 @@ public void MutexStopsServerStarting()
|
||||
}
|
||||
finally
|
||||
{
|
||||
- mutex.ReleaseMutex();
|
||||
+ mutex.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/src/roslyn/src/Compilers/Server/VBCSCompilerTests/CompilerServerTests.cs b/src/roslyn/src/Compilers/Server/VBCSCompilerTests/CompilerServerTests.cs
|
||||
index 3b6f4f291ff..e97a6bf923f 100644
|
||||
--- a/src/roslyn/src/Compilers/Server/VBCSCompilerTests/CompilerServerTests.cs
|
||||
+++ b/src/roslyn/src/Compilers/Server/VBCSCompilerTests/CompilerServerTests.cs
|
||||
@@ -304,7 +304,7 @@ public async Task ServerFailsWithLongTempPathUnix()
|
||||
var newTempDir = _tempDirectory.CreateDirectory(new string('a', 100 - _tempDirectory.Path.Length));
|
||||
await ApplyEnvironmentVariables(
|
||||
new[] { new KeyValuePair<string, string>("TMPDIR", newTempDir.Path) },
|
||||
- async () =>
|
||||
+ async () => await Task.Run(async () =>
|
||||
{
|
||||
using var serverData = await ServerUtil.CreateServer(_logger);
|
||||
var result = RunCommandLineCompiler(
|
||||
@@ -317,7 +317,7 @@ public async Task ServerFailsWithLongTempPathUnix()
|
||||
|
||||
var listener = await serverData.Complete();
|
||||
Assert.Equal(CompletionData.RequestCompleted, listener.CompletionDataList.Single());
|
||||
- });
|
||||
+ }));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
diff --git a/src/roslyn/src/Compilers/Server/VBCSCompilerTests/VBCSCompilerServerTests.cs b/src/roslyn/src/Compilers/Server/VBCSCompilerTests/VBCSCompilerServerTests.cs
|
||||
index d5f493fed8a..73941972e48 100644
|
||||
--- a/src/roslyn/src/Compilers/Server/VBCSCompilerTests/VBCSCompilerServerTests.cs
|
||||
+++ b/src/roslyn/src/Compilers/Server/VBCSCompilerTests/VBCSCompilerServerTests.cs
|
||||
@@ -101,7 +101,7 @@ public async Task NoServerConnection()
|
||||
|
||||
var thread = new Thread(() =>
|
||||
{
|
||||
- using (var mutex = new Mutex(initiallyOwned: true, name: mutexName, createdNew: out created))
|
||||
+ using (var mutex = BuildServerConnection.OpenOrCreateMutex(name: mutexName, createdNew: out created))
|
||||
using (var stream = NamedPipeUtil.CreateServer(pipeName))
|
||||
{
|
||||
readyMre.Set();
|
||||
@@ -112,7 +112,7 @@ public async Task NoServerConnection()
|
||||
stream.Close();
|
||||
|
||||
doneMre.WaitOne();
|
||||
- mutex.ReleaseMutex();
|
||||
+ mutex.Dispose();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -153,7 +153,7 @@ public async Task ServerShutdownsDuringProcessing()
|
||||
{
|
||||
using (var stream = NamedPipeUtil.CreateServer(pipeName))
|
||||
{
|
||||
- var mutex = new Mutex(initiallyOwned: true, name: mutexName, createdNew: out created);
|
||||
+ var mutex = BuildServerConnection.OpenOrCreateMutex(name: mutexName, createdNew: out created);
|
||||
readyMre.Set();
|
||||
|
||||
stream.WaitForConnection();
|
||||
@@ -161,7 +161,6 @@ public async Task ServerShutdownsDuringProcessing()
|
||||
|
||||
// Client is waiting for a response. Close the mutex now. Then close the connection
|
||||
// so the client gets an error.
|
||||
- mutex.ReleaseMutex();
|
||||
mutex.Dispose();
|
||||
stream.Close();
|
||||
|
||||
diff --git a/src/roslyn/src/Compilers/Shared/BuildServerConnection.cs b/src/roslyn/src/Compilers/Shared/BuildServerConnection.cs
|
||||
index f67c2d83957..1fe609061ee 100644
|
||||
--- a/src/roslyn/src/Compilers/Shared/BuildServerConnection.cs
|
||||
+++ b/src/roslyn/src/Compilers/Shared/BuildServerConnection.cs
|
||||
@@ -543,19 +543,10 @@ internal static bool WasServerMutexOpen(string mutexName)
|
||||
{
|
||||
try
|
||||
{
|
||||
- if (PlatformInformation.IsRunningOnMono)
|
||||
+ if (PlatformInformation.IsUsingMonoRuntime)
|
||||
{
|
||||
- IServerMutex? mutex = null;
|
||||
- bool createdNew = false;
|
||||
- try
|
||||
- {
|
||||
- mutex = new ServerFileMutexPair(mutexName, false, out createdNew);
|
||||
- return !createdNew;
|
||||
- }
|
||||
- finally
|
||||
- {
|
||||
- mutex?.Dispose();
|
||||
- }
|
||||
+ using var mutex = new ServerFileMutex(mutexName);
|
||||
+ return !mutex.CouldLock();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -572,9 +563,11 @@ internal static bool WasServerMutexOpen(string mutexName)
|
||||
|
||||
internal static IServerMutex OpenOrCreateMutex(string name, out bool createdNew)
|
||||
{
|
||||
- if (PlatformInformation.IsRunningOnMono)
|
||||
+ if (PlatformInformation.IsUsingMonoRuntime)
|
||||
{
|
||||
- return new ServerFileMutexPair(name, initiallyOwned: true, out createdNew);
|
||||
+ var mutex = new ServerFileMutex(name);
|
||||
+ createdNew = mutex.TryLock(0);
|
||||
+ return mutex;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -648,19 +641,22 @@ internal interface IServerMutex : IDisposable
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
- /// An interprocess mutex abstraction based on OS advisory locking (FileStream.Lock/Unlock).
|
||||
+ /// An interprocess mutex abstraction based on file sharing permission (FileShare.None).
|
||||
/// If multiple processes running as the same user create FileMutex instances with the same name,
|
||||
/// those instances will all point to the same file somewhere in a selected temporary directory.
|
||||
- /// The TryLock method can be used to attempt to acquire the mutex, with Unlock or Dispose used to release.
|
||||
+ /// The TryLock method can be used to attempt to acquire the mutex, with Dispose used to release.
|
||||
+ /// The CouldLock method can be used to check whether an attempt to acquire the mutex would have
|
||||
+ /// succeeded at the current time, without actually acquiring it.
|
||||
/// Unlike Win32 named mutexes, there is no mechanism for detecting an abandoned mutex. The file
|
||||
/// will simply revert to being unlocked but remain where it is.
|
||||
/// </summary>
|
||||
- internal sealed class FileMutex : IDisposable
|
||||
+ internal sealed class ServerFileMutex : IServerMutex
|
||||
{
|
||||
- public readonly FileStream Stream;
|
||||
+ public FileStream? Stream;
|
||||
public readonly string FilePath;
|
||||
+ public readonly string GuardPath;
|
||||
|
||||
- public bool IsLocked { get; private set; }
|
||||
+ public bool IsDisposed { get; private set; }
|
||||
|
||||
internal static string GetMutexDirectory()
|
||||
{
|
||||
@@ -670,61 +666,176 @@ internal static string GetMutexDirectory()
|
||||
return result;
|
||||
}
|
||||
|
||||
- public FileMutex(string name)
|
||||
+ public ServerFileMutex(string name)
|
||||
{
|
||||
- FilePath = Path.Combine(GetMutexDirectory(), name);
|
||||
- Stream = new FileStream(FilePath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None);
|
||||
+ var mutexDirectory = GetMutexDirectory();
|
||||
+ FilePath = Path.Combine(mutexDirectory, name);
|
||||
+ GuardPath = Path.Combine(mutexDirectory, ".guard");
|
||||
}
|
||||
|
||||
- public bool TryLock(int timeoutMs)
|
||||
+ /// <summary>
|
||||
+ /// Acquire the guard by opening the guard file with FileShare.None. The guard must only ever
|
||||
+ /// be held for very brief amounts of time, so we can simply spin until it is acquired. The
|
||||
+ /// guard must be released by disposing the FileStream returned from this routine. Note the
|
||||
+ /// guard file is never deleted; this is a leak, but only of a single file.
|
||||
+ /// </summary>
|
||||
+ internal FileStream LockGuard()
|
||||
{
|
||||
- if (IsLocked)
|
||||
- throw new InvalidOperationException("Lock already held");
|
||||
-
|
||||
- var sw = Stopwatch.StartNew();
|
||||
- do
|
||||
+ // We should be able to acquire the guard quickly. Limit the number of retries anyway
|
||||
+ // by some arbitrary bound to avoid getting hung up in a possibly infinite loop.
|
||||
+ for (var i = 0; i < 100; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
- Stream.Lock(0, 0);
|
||||
- IsLocked = true;
|
||||
- return true;
|
||||
+ return new FileStream(GuardPath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None);
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
- // Lock currently held by someone else.
|
||||
+ // Guard currently held by someone else.
|
||||
// We want to sleep for a short period of time to ensure that other processes
|
||||
// have an opportunity to finish their work and relinquish the lock.
|
||||
// Spinning here (via Yield) would work but risks creating a priority
|
||||
// inversion if the lock is held by a lower-priority process.
|
||||
Thread.Sleep(1);
|
||||
}
|
||||
+ }
|
||||
+ // Handle unexpected failure to acquire guard as error.
|
||||
+ throw new InvalidOperationException("Unable to acquire guard");
|
||||
+ }
|
||||
+
|
||||
+ /// <summary>
|
||||
+ /// Attempt to acquire the lock by opening the lock file with FileShare.None. Sets "Stream"
|
||||
+ /// and returns true if successful, returns false if the lock is already held by another
|
||||
+ /// thread or process. Guard must be held when calling this routine.
|
||||
+ /// </summary>
|
||||
+ internal bool TryLockFile()
|
||||
+ {
|
||||
+ Debug.Assert(Stream is null);
|
||||
+ FileStream? stream = null;
|
||||
+ try
|
||||
+ {
|
||||
+ stream = new FileStream(FilePath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None);
|
||||
+ // On some targets, the file locking used to implement FileShare.None may not be
|
||||
+ // atomic with opening/creating the file. This creates a race window when another
|
||||
+ // thread holds the lock and is just about to unlock: we may be able to open the
|
||||
+ // file here, then the other thread unlocks and deletes the file, and then we
|
||||
+ // acquire the lock on our file handle - but the actual file is already deleted.
|
||||
+ // To close this race, we verify that the file does in fact still exist now that
|
||||
+ // we have successfull acquired the locked FileStream. (Note that this check is
|
||||
+ // safe because we cannot race with an other attempt to create the file since we
|
||||
+ // hold the guard, and after the FileStream constructor returned we can no race
|
||||
+ // with file deletion because we hold the lock.)
|
||||
+ if (!File.Exists(FilePath))
|
||||
+ {
|
||||
+ // To simplify the logic, we treat this case as "unable to acquire the lock"
|
||||
+ // because it we caught another process while it owned the lock and was just
|
||||
+ // giving it up. If the caller retries, we'll likely acquire the lock then.
|
||||
+ stream.Dispose();
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+ catch (Exception)
|
||||
+ {
|
||||
+ stream?.Dispose();
|
||||
+ return false;
|
||||
+ }
|
||||
+ Stream = stream;
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ /// <summary>
|
||||
+ /// Release the lock by deleting the lock file and disposing "Stream".
|
||||
+ /// </summary>
|
||||
+ internal void UnlockFile()
|
||||
+ {
|
||||
+ Debug.Assert(Stream is not null);
|
||||
+ try
|
||||
+ {
|
||||
+ // Delete the lock file while the stream is not yet disposed
|
||||
+ // and we therefore still hold the FileShare.None exclusion.
|
||||
+ // There may still be a race with another thread attempting a
|
||||
+ // TryLockFile in parallel, but that is safely handled there.
|
||||
+ File.Delete(FilePath);
|
||||
+ }
|
||||
+ finally
|
||||
+ {
|
||||
+ Stream.Dispose();
|
||||
+ Stream = null;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public bool TryLock(int timeoutMs)
|
||||
+ {
|
||||
+ if (IsDisposed)
|
||||
+ throw new ObjectDisposedException("Mutex");
|
||||
+ if (Stream is not null)
|
||||
+ throw new InvalidOperationException("Lock already held");
|
||||
+
|
||||
+ var sw = Stopwatch.StartNew();
|
||||
+ do
|
||||
+ {
|
||||
+ try
|
||||
+ {
|
||||
+ // Attempt to acquire lock while holding guard.
|
||||
+ using var guard = LockGuard();
|
||||
+ if (TryLockFile())
|
||||
+ return true;
|
||||
+ }
|
||||
catch (Exception)
|
||||
{
|
||||
- // Something else went wrong.
|
||||
return false;
|
||||
}
|
||||
+
|
||||
+ // See comment in LockGuard.
|
||||
+ Thread.Sleep(1);
|
||||
} while (sw.ElapsedMilliseconds < timeoutMs);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
- public void Unlock()
|
||||
+ public bool CouldLock()
|
||||
{
|
||||
- if (!IsLocked)
|
||||
- return;
|
||||
- Stream.Unlock(0, 0);
|
||||
- IsLocked = false;
|
||||
+ if (IsDisposed)
|
||||
+ return false;
|
||||
+ if (Stream is not null)
|
||||
+ return false;
|
||||
+
|
||||
+ try
|
||||
+ {
|
||||
+ // Attempt to acquire lock while holding guard, and if successful
|
||||
+ // immediately unlock again while still holding guard. This ensures
|
||||
+ // no other thread will spuriously observe the lock as held due to
|
||||
+ // the lock attempt here.
|
||||
+ using var guard = LockGuard();
|
||||
+ if (TryLockFile())
|
||||
+ {
|
||||
+ UnlockFile();
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ catch (Exception)
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
- var wasLocked = IsLocked;
|
||||
- if (wasLocked)
|
||||
- Unlock();
|
||||
- Stream.Dispose();
|
||||
- // We do not delete the lock file here because there is no reliable way to perform a
|
||||
- // 'delete if no one has the file open' operation atomically on *nix. This is a leak.
|
||||
+ if (IsDisposed)
|
||||
+ return;
|
||||
+ IsDisposed = true;
|
||||
+ if (Stream is not null)
|
||||
+ {
|
||||
+ try
|
||||
+ {
|
||||
+ UnlockFile();
|
||||
+ }
|
||||
+ catch (Exception)
|
||||
+ {
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -792,56 +903,4 @@ public void Dispose()
|
||||
}
|
||||
}
|
||||
}
|
||||
-
|
||||
- /// <summary>
|
||||
- /// Approximates a named mutex with 'locked', 'unlocked' and 'abandoned' states.
|
||||
- /// There is no reliable way to detect whether a mutex has been abandoned on some target platforms,
|
||||
- /// so we use the AliveMutex to manually track whether the creator of a mutex is still running,
|
||||
- /// while the HeldMutex represents the actual lock state of the mutex.
|
||||
- /// </summary>
|
||||
- internal sealed class ServerFileMutexPair : IServerMutex
|
||||
- {
|
||||
- public readonly FileMutex AliveMutex;
|
||||
- public readonly FileMutex HeldMutex;
|
||||
-
|
||||
- public bool IsDisposed { get; private set; }
|
||||
-
|
||||
- public ServerFileMutexPair(string mutexName, bool initiallyOwned, out bool createdNew)
|
||||
- {
|
||||
- AliveMutex = new FileMutex(mutexName + "-alive");
|
||||
- HeldMutex = new FileMutex(mutexName + "-held");
|
||||
- createdNew = AliveMutex.TryLock(0);
|
||||
- if (initiallyOwned && createdNew)
|
||||
- {
|
||||
- if (!TryLock(0))
|
||||
- throw new Exception("Failed to lock mutex after creating it");
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- public bool TryLock(int timeoutMs)
|
||||
- {
|
||||
- if (IsDisposed)
|
||||
- throw new ObjectDisposedException("Mutex");
|
||||
- return HeldMutex.TryLock(timeoutMs);
|
||||
- }
|
||||
-
|
||||
- public void Dispose()
|
||||
- {
|
||||
- if (IsDisposed)
|
||||
- return;
|
||||
- IsDisposed = true;
|
||||
-
|
||||
- try
|
||||
- {
|
||||
- HeldMutex.Unlock();
|
||||
- AliveMutex.Unlock();
|
||||
- }
|
||||
- finally
|
||||
- {
|
||||
- AliveMutex.Dispose();
|
||||
- HeldMutex.Dispose();
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
}
|
||||
--
|
||||
2.36.2
|
|
@ -1,32 +0,0 @@
|
|||
From 3e75c1b17777befc94689de319fff7a40a1f86bc Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Tue, 23 Aug 2022 14:17:51 -0800
|
||||
Subject: [PATCH 1/1] Revert "lift version of Microsoft.CodeAnalysis.Common
|
||||
dependencies to previously source built version"
|
||||
|
||||
This reverts commit 7b504d40a3876ce14323d77e282f0fb7ea1ec758, a patch
|
||||
applied by installer during tarball generation that only is only needed
|
||||
when building the whole source-build stack. Within stage0, this is
|
||||
breaks the build
|
||||
---
|
||||
.../Source/CSharpSyntaxGenerator/CSharpSyntaxGenerator.csproj | 4 ----
|
||||
1 file changed, 4 deletions(-)
|
||||
|
||||
diff --git a/src/roslyn/src/Tools/Source/CompilerGeneratorTools/Source/CSharpSyntaxGenerator/CSharpSyntaxGenerator.csproj b/src/roslyn/src/Tools/Source/CompilerGeneratorTools/Source/CSharpSyntaxGenerator/CSharpSyntaxGenerator.csproj
|
||||
index a50822a6aeb..7eae8afa275 100644
|
||||
--- a/src/roslyn/src/Tools/Source/CompilerGeneratorTools/Source/CSharpSyntaxGenerator/CSharpSyntaxGenerator.csproj
|
||||
+++ b/src/roslyn/src/Tools/Source/CompilerGeneratorTools/Source/CSharpSyntaxGenerator/CSharpSyntaxGenerator.csproj
|
||||
@@ -27,9 +27,5 @@
|
||||
<Compile Include="..\..\..\..\..\Compilers\CSharp\Portable\Syntax\SyntaxKindFacts.cs" Link="Grammar\SyntaxKindFacts.cs" Condition="'$(TargetFramework)' != 'netstandard2.0'" />
|
||||
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="$(SourceGeneratorMicrosoftCodeAnalysisVersion)" PrivateAssets="all" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
|
||||
- <PackageReference Include="System.Collections.Immutable" Version="$(SourceBuildLiftedSystemCollectionsImmutableVersion)" PrivateAssets="all" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
|
||||
- <PackageReference Include="System.Reflection.Metadata" Version="$(SourceBuildLiftedSystemReflectionMetadataVersion)" PrivateAssets="all" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
|
||||
- <PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="$(SourceBuildLiftedSystemRuntimeCompilerServicesUnsafeVersion)" PrivateAssets="all" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
|
||||
- <PackageReference Include="System.Text.Encoding.CodePages" Version="$(SourceBuildLiftedSystemTextEncodingCodePagesVersion)" PrivateAssets="all" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.36.2
|
||||
|
|
@ -1,189 +0,0 @@
|
|||
From f54977e2fc84527fe58024ed5537cb63244168e2 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/dotnet/runtime/pull/76500
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Tue, 13 Sep 2022 14:17:35 +0200
|
||||
Subject: [PATCH 1/1] Mono musl support
|
||||
|
||||
---
|
||||
src/coreclr/pal/src/misc/perfjitdump.cpp | 2 +-
|
||||
src/mono/CMakeLists.txt | 29 ++++++++++++++++++++++++
|
||||
src/mono/mono.proj | 18 +++++++++------
|
||||
src/mono/mono/metadata/domain.c | 10 ++++++++
|
||||
src/mono/mono/mini/CMakeLists.txt | 10 ++++++++
|
||||
src/mono/mono/utils/mono-context.h | 8 +++++++
|
||||
6 files changed, 69 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/runtime/src/coreclr/pal/src/misc/perfjitdump.cpp b/src/runtime/src/coreclr/pal/src/misc/perfjitdump.cpp
|
||||
index d80bd58038c..3488397b0da 100644
|
||||
--- a/src/runtime/src/coreclr/pal/src/misc/perfjitdump.cpp
|
||||
+++ b/src/runtime/src/coreclr/pal/src/misc/perfjitdump.cpp
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <sys/uio.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
-#include <linux/limits.h>
|
||||
+#include <limits.h>
|
||||
|
||||
#include "../inc/llvm/ELF.h"
|
||||
|
||||
diff --git a/src/runtime/src/mono/CMakeLists.txt b/src/runtime/src/mono/CMakeLists.txt
|
||||
index 49a73b1b709..7e596d69d35 100644
|
||||
--- a/src/runtime/src/mono/CMakeLists.txt
|
||||
+++ b/src/runtime/src/mono/CMakeLists.txt
|
||||
@@ -208,6 +208,35 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
# Enable the "full RELRO" options (RELRO & BIND_NOW) at link time
|
||||
add_link_options(-Wl,-z,relro)
|
||||
add_link_options(-Wl,-z,now)
|
||||
+ # Detect Linux ID
|
||||
+ # TODO: Eventually merge with eng/native/configureplatform.cmake
|
||||
+ set(LINUX_ID_FILE "/etc/os-release")
|
||||
+ if(CMAKE_CROSSCOMPILING)
|
||||
+ set(LINUX_ID_FILE "${CMAKE_SYSROOT}${LINUX_ID_FILE}")
|
||||
+ endif()
|
||||
+
|
||||
+ if(EXISTS ${LINUX_ID_FILE})
|
||||
+ execute_process(
|
||||
+ COMMAND bash -c "source ${LINUX_ID_FILE} && echo \$ID"
|
||||
+ OUTPUT_VARIABLE CLR_CMAKE_LINUX_ID
|
||||
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
+
|
||||
+ execute_process(
|
||||
+ COMMAND bash -c "if strings \"${CMAKE_SYSROOT}/usr/bin/ldd\" 2>&1 | grep -q musl; then echo musl; fi"
|
||||
+ OUTPUT_VARIABLE CLR_CMAKE_LINUX_MUSL
|
||||
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
+ endif()
|
||||
+
|
||||
+ if(DEFINED CLR_CMAKE_LINUX_ID)
|
||||
+ if(CLR_CMAKE_LINUX_ID STREQUAL alpine)
|
||||
+ set(CLR_CMAKE_HOST_ALPINE_LINUX 1)
|
||||
+ set(CLR_CMAKE_HOST_OS ${CLR_CMAKE_LINUX_ID})
|
||||
+ endif()
|
||||
+
|
||||
+ if(CLR_CMAKE_LINUX_MUSL STREQUAL musl)
|
||||
+ set(CLR_CMAKE_HOST_LINUX_MUSL 1)
|
||||
+ endif()
|
||||
+ endif(DEFINED CLR_CMAKE_LINUX_ID)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
set(HOST_LINUX 1)
|
||||
add_definitions(-D_GNU_SOURCE -D_REENTRANT)
|
||||
diff --git a/src/runtime/src/mono/mono.proj b/src/runtime/src/mono/mono.proj
|
||||
index d6a0c9a8ec2..933ed60cea7 100644
|
||||
--- a/src/runtime/src/mono/mono.proj
|
||||
+++ b/src/runtime/src/mono/mono.proj
|
||||
@@ -417,11 +417,15 @@
|
||||
<!-- Linux options -->
|
||||
<ItemGroup Condition="'$(TargetsLinux)' == true">
|
||||
<_MonoCFLAGS Include="-Wl,--build-id=sha1" />
|
||||
+ <_MonoCFLAGS Include="-Wno-strict-prototypes" />
|
||||
<_MonoCXXFLAGS Include="-Wl,--build-id=sha1" />
|
||||
+ <_MonoCXXFLAGS Include="-Wno-strict-prototypes" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(RealTargetOS)' == 'Linux'">
|
||||
<_MonoAOTCFLAGS Include="-Wl,--build-id=sha1" />
|
||||
+ <_MonoAOTCFLAGS Include="-Wno-strict-prototypes" />
|
||||
<_MonoAOTCXXFLAGS Include="-Wl,--build-id=sha1" />
|
||||
+ <_MonoAOTCXXFLAGS Include="-Wno-strict-prototypes" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Devloop features -->
|
||||
@@ -500,15 +504,15 @@
|
||||
<MonoToolchainPrebuiltOS Condition="$([MSBuild]::IsOSPlatform('OSX'))">darwin-x86_64</MonoToolchainPrebuiltOS>
|
||||
<MonoToolchainPrebuiltOS Condition="'$(OS)' == 'Windows_NT'">windows-x86_64</MonoToolchainPrebuiltOS>
|
||||
<_MonoRuntimeFilePath>$(MonoObjDir)out\lib\$(MonoFileName)</_MonoRuntimeFilePath>
|
||||
- <_LinuxAbi Condition="'$(TargetsAndroid)' != 'true'">gnu</_LinuxAbi>
|
||||
- <_LinuxAbi Condition="'$(TargetsAndroid)' == 'true'">android</_LinuxAbi>
|
||||
+ <_LinuxAbi Condition="'$(TargetsAndroid)' != 'true'">alpine-linux-musl</_LinuxAbi>
|
||||
+ <_LinuxAbi Condition="'$(TargetsAndroid)' == 'true'">linux-android</_LinuxAbi>
|
||||
<_LinuxFloatAbi Condition="'$(TargetsAndroid)' != 'true'">hf</_LinuxFloatAbi>
|
||||
<_Objcopy>objcopy</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 'arm'">arm-linux-$(_LinuxAbi)eabi$(_LinuxFloatAbi)-$(_Objcopy)</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 'arm64'">aarch64-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 's390x'">s390x-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 'x64'">x86_64-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 'x86'">i686-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 'arm' and '$(CrossBuild)' == 'true'">arm-$(_LinuxAbi)eabi$(_LinuxFloatAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 'arm64' and '$(CrossBuild)' == 'true'">aarch64-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 's390x' and '$(CrossBuild)' == 'true'">s390x-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 'x64' and '$(CrossBuild)' == 'true'">x86_64-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 'x86' and '$(CrossBuild)' == 'true'">i686-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
<_Objcopy Condition="'$(TargetsAndroid)' == 'true'">$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/$(MonoToolchainPrebuiltOS)/bin/$(_Objcopy)</_Objcopy>
|
||||
</PropertyGroup>
|
||||
<!-- test viability of objcopy command -->
|
||||
diff --git a/src/runtime/src/mono/mono/metadata/domain.c b/src/runtime/src/mono/mono/metadata/domain.c
|
||||
index 4a8e06d28ae..e9868bd1b2c 100644
|
||||
--- a/src/runtime/src/mono/mono/metadata/domain.c
|
||||
+++ b/src/runtime/src/mono/mono/metadata/domain.c
|
||||
@@ -138,6 +138,14 @@ create_root_domain (void)
|
||||
return domain;
|
||||
}
|
||||
|
||||
+static MONO_NO_OPTIMIZATION MONO_NEVER_INLINE void
|
||||
+ensure_stack_size (void)
|
||||
+{
|
||||
+ const int default_size = 5 * 1024 * 1024;
|
||||
+ volatile uint8_t *s = (uint8_t *)g_alloca(default_size);
|
||||
+ *s = 0;
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* mono_init_internal:
|
||||
*
|
||||
@@ -181,6 +189,8 @@ mono_init_internal (const char *filename, const char *exe_filename, const char *
|
||||
|
||||
mono_counters_register ("Max HashTable Chain Length", MONO_COUNTER_INT|MONO_COUNTER_METADATA, &mono_g_hash_table_max_chain_length);
|
||||
|
||||
+ ensure_stack_size ();
|
||||
+
|
||||
mono_gc_base_init ();
|
||||
mono_thread_info_attach ();
|
||||
|
||||
diff --git a/src/runtime/src/mono/mono/mini/CMakeLists.txt b/src/runtime/src/mono/mono/mini/CMakeLists.txt
|
||||
index 128ed08f45b..17cbe696c4b 100644
|
||||
--- a/src/runtime/src/mono/mono/mini/CMakeLists.txt
|
||||
+++ b/src/runtime/src/mono/mono/mini/CMakeLists.txt
|
||||
@@ -364,6 +364,11 @@ if(NOT DISABLE_SHARED_LIBS)
|
||||
set_target_properties(monosgen-shared PROPERTIES IMPORT_SUFFIX ".import.lib")
|
||||
endif()
|
||||
target_link_libraries(monosgen-shared PRIVATE ${OS_LIBS} ${ICONV_LIB} ${LLVM_LIBS} ${ICU_LIBS} ${Z_LIBS})
|
||||
+ # Alpine Linux implements ucontext in a different library
|
||||
+ if(CLR_CMAKE_HOST_ALPINE_LINUX AND TARGET_S390X)
|
||||
+ target_link_libraries(monosgen-shared PRIVATE ucontext)
|
||||
+ endif(CLR_CMAKE_HOST_ALPINE_LINUX AND TARGET_S390X)
|
||||
+
|
||||
if(ICU_LDFLAGS)
|
||||
set_property(TARGET monosgen-shared APPEND_STRING PROPERTY LINK_FLAGS " ${ICU_LDFLAGS}")
|
||||
endif()
|
||||
@@ -488,6 +493,11 @@ if(NOT DISABLE_EXECUTABLES)
|
||||
set_target_properties(mono-sgen PROPERTIES OUTPUT_NAME mono-aot-cross)
|
||||
endif()
|
||||
target_link_libraries(mono-sgen PRIVATE monosgen-static ${OS_LIBS} ${ICONV_LIB} ${LLVM_LIBS} ${ICU_LIBS} ${Z_LIBS})
|
||||
+ # Alpine Linux implements ucontext in a different library
|
||||
+ if(CLR_CMAKE_HOST_ALPINE_LINUX AND TARGET_S390X)
|
||||
+ target_link_libraries(mono-sgen PRIVATE ucontext)
|
||||
+ endif(CLR_CMAKE_HOST_ALPINE_LINUX 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}")
|
||||
diff --git a/src/runtime/src/mono/mono/utils/mono-context.h b/src/runtime/src/mono/mono/utils/mono-context.h
|
||||
index bd1a3cd0104..db4ba452bcb 100644
|
||||
--- a/src/runtime/src/mono/mono/utils/mono-context.h
|
||||
+++ b/src/runtime/src/mono/mono/utils/mono-context.h
|
||||
@@ -11,6 +11,14 @@
|
||||
#ifndef __MONO_MONO_CONTEXT_H__
|
||||
#define __MONO_MONO_CONTEXT_H__
|
||||
|
||||
+/*
|
||||
+ * Handle non-gnu libc versions with nothing in features.h
|
||||
+ * We have no idea what they're compatible with, so always fail.
|
||||
+ */
|
||||
+#ifndef __GLIBC_PREREQ
|
||||
+# define __GLIBC_PREREQ(x,y) 0
|
||||
+#endif
|
||||
+
|
||||
#include "mono-compiler.h"
|
||||
#include "mono-sigcontext.h"
|
||||
#include "mono-machine.h"
|
||||
--
|
||||
2.36.3
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
From d36fdab8d7ebc3dc18fddf6fd70af765b2717bd5 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/dotnet/arcade/pull/11608
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Thu, 6 Apr 2023 18:39:03 -0400
|
||||
Subject: [PATCH 1/1] properly set toolchain for crossbuilding on Alpine Linux
|
||||
|
||||
---
|
||||
eng/common/cross/toolchain.cmake | 19 +-
|
||||
3 files changed, 325 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/runtime/eng/common/cross/toolchain.cmake b/src/runtime/eng/common/cross/toolchain.cmake
|
||||
index 51f30e53dd4..b1369a2aa37 100644
|
||||
--- a/src/runtime/eng/common/cross/toolchain.cmake
|
||||
+++ b/src/runtime/eng/common/cross/toolchain.cmake
|
||||
@@ -45,10 +45,18 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64")
|
||||
endif()
|
||||
elseif(TARGET_ARCH_NAME STREQUAL "s390x")
|
||||
set(CMAKE_SYSTEM_PROCESSOR s390x)
|
||||
- set(TOOLCHAIN "s390x-linux-gnu")
|
||||
+ if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/s390x-alpine-linux-musl)
|
||||
+ set(TOOLCHAIN "s390x-alpine-linux-musl")
|
||||
+ else()
|
||||
+ set(TOOLCHAIN "s390x-linux-gnu")
|
||||
+ endif()
|
||||
elseif(TARGET_ARCH_NAME STREQUAL "x86")
|
||||
set(CMAKE_SYSTEM_PROCESSOR i686)
|
||||
- set(TOOLCHAIN "i686-linux-gnu")
|
||||
+ if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl)
|
||||
+ set(TOOLCHAIN "i586-alpine-linux-musl")
|
||||
+ else()
|
||||
+ set(TOOLCHAIN "i686-linux-gnu")
|
||||
+ endif()
|
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
|
||||
set(triple "x86_64-unknown-freebsd11")
|
||||
@@ -173,6 +181,10 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64")
|
||||
add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}")
|
||||
endif()
|
||||
elseif(TARGET_ARCH_NAME STREQUAL "x86")
|
||||
+ if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl)
|
||||
+ add_toolchain_linker_flag("--target=${TOOLCHAIN}")
|
||||
+ add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}")
|
||||
+ endif()
|
||||
add_toolchain_linker_flag(-m32)
|
||||
elseif(ILLUMOS)
|
||||
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib/amd64")
|
||||
@@ -204,6 +216,9 @@ if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$")
|
||||
add_compile_options(-mfloat-abi=softfp)
|
||||
endif()
|
||||
elseif(TARGET_ARCH_NAME STREQUAL "x86")
|
||||
+ if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl)
|
||||
+ add_compile_options(--target=${TOOLCHAIN})
|
||||
+ endif()
|
||||
add_compile_options(-m32)
|
||||
add_compile_options(-Wno-error=unused-command-line-argument)
|
||||
endif()
|
|
@ -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.
|
||||
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>
|
|
@ -1,164 +0,0 @@
|
|||
From abc761c2c5694e4029fea1a60dc1934951c66e26 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/dotnet/runtime/pull/84442
|
||||
From: Tom Deseyn <tom.deseyn@gmail.com>
|
||||
Date: Thu, 6 Apr 2023 13:18:11 +0200
|
||||
Subject: [PATCH 1/2] Microsoft.NETCore.Platforms: support adding rids with '-'
|
||||
in the base part.
|
||||
|
||||
Currently when trying to add a rid like 'linux-musl-x64'
|
||||
the rid is not understood to be base = 'linux-musl', arch = 'x64'.
|
||||
|
||||
Instead the parser considers a potential optional qualifier.
|
||||
This causes the rid to be parsed as base = 'linux', arch = 'musl',
|
||||
and qualifier = 'x64'.
|
||||
|
||||
We know the rids being added won't have a qualifier. If we take
|
||||
this into account while parsing, we can parse the rid correctly.
|
||||
---
|
||||
.../Microsoft.NETCore.Platforms/src/RID.cs | 11 +++-
|
||||
.../src/RuntimeGroupCollection.cs | 2 +-
|
||||
.../tests/RidTests.cs | 50 +++++++++++++------
|
||||
3 files changed, 47 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RID.cs b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RID.cs
|
||||
index 6457fd29cadf0..b464d5f0f54e3 100644
|
||||
--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RID.cs
|
||||
+++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RID.cs
|
||||
@@ -56,7 +56,7 @@ private enum RIDPart : int
|
||||
Max = Qualifier
|
||||
}
|
||||
|
||||
- public static RID Parse(string runtimeIdentifier)
|
||||
+ public static RID Parse(string runtimeIdentifier, bool noQualifier)
|
||||
{
|
||||
string[] parts = new string[(int)RIDPart.Max + 1];
|
||||
bool omitVersionDelimiter = true;
|
||||
@@ -90,6 +90,15 @@ public static RID Parse(string runtimeIdentifier)
|
||||
// version might be omitted
|
||||
else if (current == ArchitectureDelimiter)
|
||||
{
|
||||
+ // The qualifier delimiter and architecture delimiter are the same.
|
||||
+ // When there is no qualifier, there will be one delimiter past the base part
|
||||
+ // for the architecture.
|
||||
+ // So if we see another delimiter later in the string (for the architecture),
|
||||
+ // extend the base part instead of starting the architecture part.
|
||||
+ if (noQualifier && runtimeIdentifier.IndexOf(ArchitectureDelimiter, i + 1) != -1)
|
||||
+ {
|
||||
+ break;
|
||||
+ }
|
||||
// ensure there's no version later in the string
|
||||
if (runtimeIdentifier.IndexOf(VersionDelimiter, i) != -1)
|
||||
{
|
||||
diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
||||
index e069508053105..31009a8d28e5e 100644
|
||||
--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
||||
+++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
||||
@@ -34,7 +34,7 @@ public RuntimeGroupCollection(ICollection<RuntimeGroup> runtimeGroups)
|
||||
/// <param name="parent"></param>
|
||||
public void AddRuntimeIdentifier(string runtimeIdentifier, string parent)
|
||||
{
|
||||
- RID rid = RID.Parse(runtimeIdentifier);
|
||||
+ RID rid = RID.Parse(runtimeIdentifier, noQualifier: true);
|
||||
|
||||
AddRuntimeIdentifier(rid, parent);
|
||||
}
|
||||
diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/tests/RidTests.cs b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/tests/RidTests.cs
|
||||
index 227bcbdd10d4d..8dee0ebeda17a 100644
|
||||
--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/tests/RidTests.cs
|
||||
+++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/tests/RidTests.cs
|
||||
@@ -10,35 +10,57 @@ public class RidTests
|
||||
{
|
||||
public static IEnumerable<object[]> ValidRIDData()
|
||||
{
|
||||
- yield return new object[] { "win10-x64", new RID() { BaseRID = "win", OmitVersionDelimiter = true, Version = new RuntimeVersion("10"), Architecture = "x64" } };
|
||||
- yield return new object[] { "win10", new RID() { BaseRID = "win", OmitVersionDelimiter = true, Version = new RuntimeVersion("10")} };
|
||||
- yield return new object[] { "linux", new RID() { BaseRID = "linux" } };
|
||||
- yield return new object[] { "linux-x64", new RID() { BaseRID = "linux", Architecture = "x64" } };
|
||||
- yield return new object[] { "linux-x64", new RID() { BaseRID = "linux", Architecture = "x64" } };
|
||||
- yield return new object[] { "debian.10-x64", new RID() { BaseRID = "debian", Version = new RuntimeVersion("10"), Architecture = "x64" } };
|
||||
- yield return new object[] { "linuxmint.19.2-x64", new RID() { BaseRID = "linuxmint", Version = new RuntimeVersion("19.2"), Architecture = "x64" } };
|
||||
- yield return new object[] { "ubuntu.14.04-x64", new RID() { BaseRID = "ubuntu", Version = new RuntimeVersion("14.04"), Architecture = "x64" } };
|
||||
- yield return new object[] { "foo-bar.42-arm", new RID() { BaseRID = "foo-bar", Version = new RuntimeVersion("42"), Architecture = "arm" } };
|
||||
- yield return new object[] { "foo-bar-arm", new RID() { BaseRID = "foo", Architecture = "bar", Qualifier = "arm" } }; // demonstrates ambiguity, avoid using `-` in base
|
||||
- yield return new object[] { "linux-musl-x64", new RID() { BaseRID = "linux", Architecture = "musl", Qualifier = "x64" } }; // yes, we already have ambiguous RIDs
|
||||
+ yield return new object[] { "win10-x64", new RID() { BaseRID = "win", OmitVersionDelimiter = true, Version = new RuntimeVersion("10"), Architecture = "x64" }, null };
|
||||
+ yield return new object[] { "win10", new RID() { BaseRID = "win", OmitVersionDelimiter = true, Version = new RuntimeVersion("10")}, null };
|
||||
+ yield return new object[] { "linux", new RID() { BaseRID = "linux" }, null };
|
||||
+ yield return new object[] { "linux-x64", new RID() { BaseRID = "linux", Architecture = "x64" }, null };
|
||||
+ yield return new object[] { "linux-x64", new RID() { BaseRID = "linux", Architecture = "x64" }, null };
|
||||
+ yield return new object[] { "debian.10-x64", new RID() { BaseRID = "debian", Version = new RuntimeVersion("10"), Architecture = "x64" }, null };
|
||||
+ yield return new object[] { "linuxmint.19.2-x64", new RID() { BaseRID = "linuxmint", Version = new RuntimeVersion("19.2"), Architecture = "x64" }, null };
|
||||
+ yield return new object[] { "ubuntu.14.04-x64", new RID() { BaseRID = "ubuntu", Version = new RuntimeVersion("14.04"), Architecture = "x64" }, null };
|
||||
+ yield return new object[] { "foo-bar.42-arm", new RID() { BaseRID = "foo-bar", Version = new RuntimeVersion("42"), Architecture = "arm" }, null };
|
||||
+ yield return new object[] { "foo-bar-arm", new RID() { BaseRID = "foo", Architecture = "bar", Qualifier = "arm" }, // demonstrates ambiguity, avoid using `-` in base
|
||||
+ new RID() { BaseRID = "foo-bar", Architecture = "arm" } };
|
||||
+ yield return new object[] { "linux-musl-x64", new RID() { BaseRID = "linux", Architecture = "musl", Qualifier = "x64" }, // yes, we already have ambiguous RIDs
|
||||
+ new RID() { BaseRID = "linux-musl", Architecture = "x64" } };
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(ValidRIDData))]
|
||||
- internal void ParseCorrectly(string input, RID expected)
|
||||
+ internal void ParseCorrectly(string input, RID expected, RID? expectedNoQualifier)
|
||||
{
|
||||
- RID actual = RID.Parse(input);
|
||||
+ _ = expectedNoQualifier; // unused
|
||||
+
|
||||
+ RID actual = RID.Parse(input, noQualifier: false);
|
||||
|
||||
Assert.Equal(expected, actual);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(ValidRIDData))]
|
||||
- internal void ToStringAsExpected(string expected, RID rid)
|
||||
+ internal void ParseCorrectlyNoQualifier(string input, RID expected, RID? expectedNoQualifier)
|
||||
+ {
|
||||
+ expectedNoQualifier ??= expected;
|
||||
+
|
||||
+ RID actual = RID.Parse(input, noQualifier: true);
|
||||
+
|
||||
+ Assert.Equal(expectedNoQualifier, actual);
|
||||
+ }
|
||||
+
|
||||
+ [Theory]
|
||||
+ [MemberData(nameof(ValidRIDData))]
|
||||
+ internal void ToStringAsExpected(string expected, RID rid, RID? expectedNoQualifierRid)
|
||||
{
|
||||
string actual = rid.ToString();
|
||||
|
||||
Assert.Equal(expected, actual);
|
||||
+
|
||||
+ if (expectedNoQualifierRid is not null)
|
||||
+ {
|
||||
+ actual = expectedNoQualifierRid.ToString();
|
||||
+
|
||||
+ Assert.Equal(expected, actual);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
From f70da467ca94291039e0ea5b0723cb9db5e090e7 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Deseyn <tom.deseyn@gmail.com>
|
||||
Date: Thu, 6 Apr 2023 18:14:31 +0200
|
||||
Subject: [PATCH 2/2] Update
|
||||
src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
||||
|
||||
Co-authored-by: Eric StJohn <ericstj@microsoft.com>
|
||||
---
|
||||
.../Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
||||
index 31009a8d28e5e..ec4762d71424c 100644
|
||||
--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
||||
+++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
||||
@@ -34,6 +34,7 @@ public RuntimeGroupCollection(ICollection<RuntimeGroup> runtimeGroups)
|
||||
/// <param name="parent"></param>
|
||||
public void AddRuntimeIdentifier(string runtimeIdentifier, string parent)
|
||||
{
|
||||
+ // don't parse qualifier since we don't use them and they are ambiguous with `-` in base RID
|
||||
RID rid = RID.Parse(runtimeIdentifier, noQualifier: true);
|
||||
|
||||
AddRuntimeIdentifier(rid, parent);
|
|
@ -1,217 +0,0 @@
|
|||
From da120986f17d4016b44fdc91741ae1d999083eeb Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/dotnet/runtime/pull/84443
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Thu, 6 Apr 2023 15:46:31 -0400
|
||||
Subject: [PATCH 1/2] Suppress clang-16 warnings (#81573)
|
||||
|
||||
---
|
||||
eng/native/configurecompiler.cmake | 9 +++++++++
|
||||
eng/native/init-compiler.sh | 4 ++--
|
||||
src/coreclr/dlls/mscordbi/CMakeLists.txt | 5 +----
|
||||
src/coreclr/dlls/mscordbi/mscordbi.cpp | 15 +++++++++++++++
|
||||
src/libraries/Native/Unix/CMakeLists.txt | 9 +++++++++
|
||||
src/native/corehost/apphost/static/CMakeLists.txt | 4 ++--
|
||||
.../apphost/static/singlefilehost_OSXexports.src | 11 -----------
|
||||
.../apphost/static/singlefilehost_unixexports.src | 4 ----
|
||||
8 files changed, 38 insertions(+), 23 deletions(-)
|
||||
delete mode 100644 src/native/corehost/apphost/static/singlefilehost_OSXexports.src
|
||||
|
||||
diff --git a/src/runtime/eng/native/configurecompiler.cmake b/src/runtime/eng/native/configurecompiler.cmake
|
||||
index f3526deb19fa0..1a43b710c618b 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/eng/native/init-compiler.sh b/src/runtime/eng/native/init-compiler.sh
|
||||
index 567d18da4747a..e215bd75ff158 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/src/coreclr/dlls/mscordbi/CMakeLists.txt b/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
|
||||
index c7a23c9923fe1..4a03a788a71a5 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 afd2cfe800225..489c552a0bd3e 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/libraries/Native/Unix/CMakeLists.txt b/src/runtime/src/libraries/Native/Unix/CMakeLists.txt
|
||||
index 6931f62d24c87..e9ebefcf8243a 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()
|
||||
diff --git a/src/runtime/src/native/corehost/apphost/static/CMakeLists.txt b/src/runtime/src/native/corehost/apphost/static/CMakeLists.txt
|
||||
index a00c79139863f..6d491c086da98 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 18d5697e84580..0000000000000
|
||||
--- 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 1f9c517821855..18d5697e84580 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
|
||||
|
||||
From a6d9fbff551de1164ec9cc14bdd48f2ffad77d81 Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Thu, 6 Apr 2023 16:39:27 -0400
|
||||
Subject: [PATCH 2/2] Fix DBI loading problem on Linux (#82461)
|
||||
|
||||
---
|
||||
src/coreclr/dlls/mscordbi/CMakeLists.txt | 16 +++++++++++++++-
|
||||
src/coreclr/dlls/mscordbi/mscordbi.cpp | 15 ---------------
|
||||
2 files changed, 15 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt b/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
|
||||
index 4a03a788a71a5..b7618b324c260 100644
|
||||
--- a/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
|
||||
+++ b/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
|
||||
@@ -99,7 +99,21 @@ elseif(CLR_CMAKE_HOST_UNIX)
|
||||
mscordaccore
|
||||
)
|
||||
|
||||
- target_link_libraries(mscordbi ${COREDBI_LIBRARIES})
|
||||
+ # Before llvm 16, lld was setting `--undefined-version` by default. The default was
|
||||
+ # flipped to `--no-undefined-version` in lld 16, so we will explicitly set it to
|
||||
+ # `--undefined-version` for our use-case.
|
||||
+ include(CheckLinkerFlag OPTIONAL)
|
||||
+ if(COMMAND check_linker_flag)
|
||||
+ check_linker_flag(CXX -Wl,--undefined-version LINKER_SUPPORTS_UNDEFINED_VERSION)
|
||||
+ if (LINKER_SUPPORTS_UNDEFINED_VERSION)
|
||||
+ add_linker_flag(-Wl,--undefined-version)
|
||||
+ endif(LINKER_SUPPORTS_UNDEFINED_VERSION)
|
||||
+ endif(COMMAND check_linker_flag)
|
||||
+
|
||||
+ # 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})
|
||||
|
||||
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 489c552a0bd3e..afd2cfe800225 100644
|
||||
--- a/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp
|
||||
+++ b/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp
|
||||
@@ -26,18 +26,3 @@ 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
|
|
@ -1,15 +0,0 @@
|
|||
diff --git a/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp b/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp
|
||||
index 03712c3b684..99d8a457957 100644
|
||||
--- a/src/runtimr/src/coreclr/debug/createdump/crashinfounix.cpp
|
||||
+++ b/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp
|
||||
@@ -395,7 +395,7 @@ CrashInfo::ReadProcessMemory(void* address, void* buffer, size_t size, size_t* r
|
||||
// performance optimization.
|
||||
m_canUseProcVmReadSyscall = false;
|
||||
assert(m_fd != -1);
|
||||
- *read = pread64(m_fd, buffer, size, (off64_t)address);
|
||||
+ *read = pread(m_fd, buffer, size, (off_t)address);
|
||||
}
|
||||
|
||||
if (*read == (size_t)-1)
|
||||
|
||||
|
|
@ -1,584 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
# secfixes:
|
||||
# 7.0.103-r0:
|
||||
# - CVE-2023-21808
|
||||
# 7.0.105-r0:
|
||||
# - CVE-2023-28260
|
||||
# 7.0.107-r0:
|
||||
# - CVE-2023-24895
|
||||
# - CVE-2023-24897
|
||||
# - CVE-2023-24936
|
||||
# - CVE-2023-29331
|
||||
# - CVE-2023-29337
|
||||
# - CVE-2023-32032
|
||||
# - CVE-2023-33126
|
||||
# - CVE-2023-33128
|
||||
# - CVE-2023-33135
|
||||
# 7.0.109-r0:
|
||||
# - CVE-2023-33127
|
||||
# - CVE-2023-33170
|
||||
# 7.0.110-r0:
|
||||
# - CVE-2023-38178
|
||||
# - CVE-2023-35390
|
||||
# - CVE-2023-38180
|
||||
# - CVE-2023-35391
|
||||
# 7.0.111-r0:
|
||||
# - CVE-2023-36792
|
||||
# - CVE-2023-36793
|
||||
# - CVE-2023-36794
|
||||
# - CVE-2023-36796
|
||||
# - CVE-2023-36799
|
||||
# 7.0.112-r0:
|
||||
# - CVE-2023-36435
|
||||
# - CVE-2023-38171
|
||||
# - CVE-2023-44487
|
||||
# 7.0.113-r0:
|
||||
# - CVE-2023-36792
|
||||
# - CVE-2023-36793
|
||||
# - CVE-2023-36794
|
||||
# - CVE-2023-36796
|
||||
# - CVE-2023-36799
|
||||
# - CVE-2023-44487
|
||||
# - CVE-2023-38171
|
||||
# - CVE-2023-36435
|
||||
# 7.0.114-r0:
|
||||
# - CVE-2023-36049
|
||||
# - CVE-2023-36558
|
||||
|
||||
|
||||
pkgname=dotnet7-build
|
||||
pkgver=7.0.114
|
||||
pkgrel=0
|
||||
_gittag=v$pkgver
|
||||
_giturl="https://github.com/dotnet/installer"
|
||||
_testtag=e1cc0f181ffd4d755756d30d985513897d592ba4
|
||||
_bunnytag=v12
|
||||
_llvmver=16
|
||||
_patches="
|
||||
build_disable-package-validation.patch
|
||||
build_disable-source-link.patch
|
||||
build_enable-timestamps.patch
|
||||
roslyn-analyzer_disable-apphost.patch
|
||||
runtime_76500-mono-musl-support.patch
|
||||
runtime_82269-mono-thread-coop-undefine-fortify-source.patch
|
||||
runtime_enable-runtime-marshalling.diff
|
||||
runtime_enable-system-libunwind.diff
|
||||
runtime_remove-usage-of-off64-t.patch
|
||||
sdk_14239-add-zsh-compdef-completion-script.patch
|
||||
"
|
||||
|
||||
_pkgver_macro=${pkgver%.*}
|
||||
_pkgver_prior=${pkgver%.*.*}
|
||||
_pkgver_name=${_pkgver_macro//[.0]}
|
||||
pkgdesc="The .NET $_pkgver_macro bootstrap"
|
||||
# x86: blocked by https://github.com/dotnet/runtime/issues/77667
|
||||
# armhf: blocked by https://github.com/dotnet/runtime/issues/77663
|
||||
# riscv64: port WIP https://github.com/dotnet/runtime/issues/36748
|
||||
# s390x | ppc64le: no diskspace / lack maintainer resources
|
||||
arch="x86_64 armv7 aarch64"
|
||||
url=https://dotnet.microsoft.com
|
||||
license="MIT"
|
||||
# hack for dotnetx-build to be able to pull itself for bootstrapping
|
||||
provides="dotnet$_pkgver_name-bootstrap"
|
||||
provider_priority=$_pkgver_prior
|
||||
checkdepends="
|
||||
babeltrace
|
||||
binutils
|
||||
coreutils
|
||||
file
|
||||
gawk
|
||||
jq
|
||||
lttng-tools
|
||||
npm
|
||||
procps
|
||||
sed
|
||||
strace
|
||||
util-linux-misc
|
||||
which
|
||||
"
|
||||
makedepends="
|
||||
alpine-release
|
||||
bash
|
||||
clang$_llvmver
|
||||
cmake
|
||||
dotnet$_pkgver_name-bootstrap
|
||||
dotnet$_pkgver_name-bootstrap-artifacts
|
||||
dotnet$_pkgver_name-stage0
|
||||
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$_llvmver-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="
|
||||
dotnet$_pkgver_name-artifacts:artifacts:noarch
|
||||
dotnet$_pkgver_name-sdk
|
||||
dotnet$_pkgver_name-templates:templates:noarch
|
||||
dotnet-zsh-completion:zshcomp:noarch
|
||||
dotnet-bash-completion:bashcomp:noarch
|
||||
dotnet-doc
|
||||
netstandard21-targeting-pack:netstandard_targeting_pack:noarch
|
||||
"
|
||||
source="
|
||||
https://lab.ilot.io/dotnet/installer/-/releases/$_gittag/downloads/tarball/dotnet-$_gittag.tar.xz
|
||||
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
|
||||
$_patches
|
||||
"
|
||||
builddir="$srcdir"/dotnet-$_gittag
|
||||
_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 '{}' \;
|
||||
}
|
||||
|
||||
# generates tarball containing all components built by dotnet
|
||||
snapshot() {
|
||||
local _pkg="$srcdir"/${builddir##*/}.tar
|
||||
ulimit -n 4096
|
||||
if [ -d "$srcdir" ]; then
|
||||
cd "$srcdir"
|
||||
else
|
||||
mkdir -p "$srcdir" && cd "$srcdir"
|
||||
fi
|
||||
if [ -d "installer" ]; then
|
||||
cd "$srcdir"/installer
|
||||
else
|
||||
git clone $_giturl --branch $_gittag && cd "$srcdir"/installer
|
||||
fi
|
||||
|
||||
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 $_libdir/dotnet/bootstrap/${_pkgver_macro}* -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 \
|
||||
/p:ArcadeBuildTarball=true \
|
||||
/p:TarballDir=$builddir \
|
||||
/p:TarballFilePath=$_pkg
|
||||
|
||||
msg "Compressing ${builddir##*/}.tar to $SRCDEST"
|
||||
xz -T0 -9 -vv -e -c > "$SRCDEST"/${builddir##*/}.tar.xz < "$_pkg"
|
||||
|
||||
cd "$startdir"
|
||||
abuild checksum
|
||||
}
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
# Parallel restore is broken on mono-based builds since dotnet7
|
||||
# see https://github.com/dotnet/runtime/issues/77364
|
||||
# A workaround via runtime_enable-runtime-marshalling.diff
|
||||
case $CARCH in
|
||||
s390x|ppc64le)
|
||||
msg "runtime_enable-runtime-marshalling.diff"
|
||||
patch -p1 -i "$srcdir"/runtime_enable-runtime-marshalling.diff
|
||||
;;
|
||||
esac
|
||||
|
||||
# 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
|
||||
|
||||
export PATH="$PATH:/usr/lib/llvm$_llvmver/bin"
|
||||
|
||||
# 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
|
||||
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" \
|
||||
-- $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"
|
||||
# test broken: permission issue on lxc / pipelines
|
||||
local _disabled_tests="$_disabled_tests createdump-aspnet workload"
|
||||
# liblttng-ust_sys-sdt.h: no 'NT_STAPSDT' on Alpine's lttng-ust package
|
||||
# lttng: known issue, see https://github.com/dotnet/runtime/issues/57784
|
||||
local _disabled_tests="$_disabled_tests liblttng-ust_sys-sdt.h lttng"
|
||||
# {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
|
||||
# test unit broken currently
|
||||
local _disabled_tests="$_disabled_tests system-libunwind"
|
||||
# nativeaot is not supported on armv7
|
||||
case $CARCH in
|
||||
armv7) local _disabled_tests="$_disabled_tests nativeaot"
|
||||
esac
|
||||
# test unit hangs
|
||||
local _disabled_tests="$_disabled_tests debugging-via-dotnet-dump"
|
||||
|
||||
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 "$_checkdir"/turkey ]; then
|
||||
cd "$_checkdir"/Turkey
|
||||
dotnet publish -f netcoreapp3.1 -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 || local ERROR=true
|
||||
if [ $ERROR ]; then
|
||||
msg "Check error reported, dumping logs"
|
||||
for i in *.log; do
|
||||
msg "Dumping $i"
|
||||
cat "$i"
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
package() {
|
||||
# directory creation
|
||||
install -dm 755 \
|
||||
"$pkgdir"/$_libdir/dotnet/bootstrap/$pkgver \
|
||||
"$pkgdir"/usr/share/man/man1 \
|
||||
"$pkgdir"/$_libdir/dotnet/artifacts/$pkgver
|
||||
|
||||
# unpack sdk to bootstrap
|
||||
tar --use-compress-program="pigz" \
|
||||
-xf "$builddir"/artifacts/$_dotnet_arch/Release/dotnet-sdk-$_pkgver_macro*.tar.gz \
|
||||
-C "$pkgdir"/$_libdir/dotnet/bootstrap/$pkgver/ \
|
||||
--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 "$pkgdir"/$_libdir/dotnet/artifacts/$pkgver/ \
|
||||
--no-same-owner \
|
||||
--wildcards \
|
||||
'*alpine*'
|
||||
|
||||
# assemble docs
|
||||
find "$builddir" -iname 'dotnet*.1' -type f -exec cp '{}' "$pkgdir"/usr/share/man/man1/. \;
|
||||
|
||||
# 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/bootstrap/*/shared/Microsoft.NETCore.App/*/libcoreclrtraceptprovider.so
|
||||
fi
|
||||
}
|
||||
|
||||
sdk() {
|
||||
pkgdesc="The .NET $_pkgver_macro SDK"
|
||||
# libucontext isn't automatically detected on all platforms
|
||||
depends="
|
||||
aspnetcore$_pkgver_name-runtime
|
||||
aspnetcore$_pkgver_name-targeting-pack
|
||||
dotnet$_pkgver_name-apphost-pack
|
||||
dotnet$_pkgver_name-targeting-pack
|
||||
dotnet$_pkgver_name-templates
|
||||
netstandard21-targeting-pack
|
||||
libucontext
|
||||
"
|
||||
provides="
|
||||
dotnet-sdk-$_pkgver_macro=$pkgver-r$pkgrel
|
||||
dotnet$_pkgver_name-dev=$pkgver-r$pkgrel
|
||||
"
|
||||
|
||||
install -dm 755 "$subpkgdir"/$_libdir/dotnet
|
||||
|
||||
# sdk
|
||||
tar --use-compress-program="pigz" \
|
||||
-xf "$builddir"/artifacts/$_dotnet_arch/Release/dotnet-sdk-$_pkgver_macro*.tar.gz \
|
||||
-C "$subpkgdir"/$_libdir/dotnet/ \
|
||||
--no-same-owner \
|
||||
./sdk ./sdk-manifests
|
||||
|
||||
# some files either should or should not have executable bits
|
||||
_fix_executable "$subpkgdir"
|
||||
|
||||
# See https://github.com/dotnet/source-build/issues/2579
|
||||
find "$subpkgdir" -type f -name 'testhost.x86' -delete
|
||||
find "$subpkgdir" -type f -name 'vstest.console' -delete
|
||||
}
|
||||
|
||||
netstandard_targeting_pack() {
|
||||
pkgdesc="The .NET 2.1 Standard targeting pack"
|
||||
depends="dotnet-host"
|
||||
provides="netstandard-targeting-pack-2.1=$pkgver-r$pkgrel"
|
||||
|
||||
install -dm 755 "$subpkgdir"/$_libdir/dotnet/packs
|
||||
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/NETStandard.Library.Ref
|
||||
|
||||
# some files either should or should not have executable bits
|
||||
_fix_executable "$subpkgdir"
|
||||
}
|
||||
|
||||
templates() {
|
||||
pkgdesc="The .NET $_pkgver_macro templates"
|
||||
depends="dotnet-host"
|
||||
provides="dotnet-templates-$_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 \
|
||||
./templates
|
||||
|
||||
# some files either should or should not have executable bits
|
||||
_fix_executable "$subpkgdir"
|
||||
}
|
||||
|
||||
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 \
|
||||
"$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/ \
|
||||
--no-same-owner \
|
||||
--exclude '*Intermediate*' \
|
||||
--exclude '*alpine*'
|
||||
}
|
||||
|
||||
zshcomp() {
|
||||
depends=""
|
||||
pkgdesc="zsh completion for .NET"
|
||||
# netstandard21-targeting-pack will always be pulled by any dotnetx-sdk
|
||||
# thus pulling this with it for sdk
|
||||
install_if="netstandard21-targeting-pack zsh"
|
||||
depends="dotnet-host"
|
||||
|
||||
install -dm 755 "$subpkgdir"/usr/share/zsh/site-functions
|
||||
install -m 755 "$builddir"/src/sdk/scripts/register-completions.zsh "$subpkgdir"/usr/share/zsh/site-functions/_dotnet
|
||||
}
|
||||
|
||||
bashcomp() {
|
||||
depends=""
|
||||
pkgdesc="bash completion for .NET"
|
||||
# netstandard21-targeting-pack will always be pulled by any dotnetx-sdk
|
||||
# thus pulling this with it for sdk
|
||||
install_if="netstandard21-targeting-pack bash-completion"
|
||||
depends="dotnet-host"
|
||||
|
||||
install -dm 755 "$subpkgdir"/usr/share/bash-completion/completions
|
||||
install -m 755 "$builddir"/src/sdk/scripts/register-completions.bash "$subpkgdir"/usr/share/bash-completion/completions/_dotnet
|
||||
}
|
||||
|
||||
doc() {
|
||||
default_doc
|
||||
pkgdesc="Docs for .NET"
|
||||
|
||||
# licenses
|
||||
install -dm 755 "$subpkgdir"/usr/share/licenses/dotnet
|
||||
tar --use-compress-program="pigz" \
|
||||
-xf "$builddir"/artifacts/$_dotnet_arch/Release/dotnet-sdk-$_pkgver_macro*.tar.gz \
|
||||
-C "$subpkgdir"/usr/share/licenses/dotnet/ \
|
||||
--no-same-owner \
|
||||
./LICENSE.txt ./ThirdPartyNotices.txt
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
ff554ad65e09b5dbce2bc617a6ed548081a2078b23f04ef7812309fe98e21303d0a090118a283cf5123c4a28690e63e3f151b364c56f8ee1e56ae6e63a4f50bc dotnet-v7.0.114.tar.xz
|
||||
e9f3df13d093fac214778c1137857e065f58d4e0d2a48d540d8ed7bb41e2fd73b2b3f62a0aa5b0e80fa80a5b58ba77ff19b9d10a492802f8539e3a6ed79d299d dotnet-testsuite-e1cc0f181ffd4d755756d30d985513897d592ba4.tar.gz
|
||||
0028d5d97b814b122d73137b4e0d64ca5d788aa0ae5fde500de722e23522827f2538f06e75acb17cc39b8917961ee78d1f0bbc84b2b624ae0e9bf88adca2ba6f dotnet-bunny-v12.tar.gz
|
||||
429033f5f6a8e33eb849c29c1d6628faca13751e1b1e536179b491041034dcdee107cbff12f7e9f1ef68a178a0818c534113f63bc8bbc37de67ec900c23cacf4 build_disable-package-validation.patch
|
||||
ebab0364deab5d99131e2724b7fbac668bc27ddf74958623af1913e49850df98b2d077d27324b2bbabbbcdf77ea48bf7a7ca83d0ced6f48bdb66cc1e8bbce4a4 build_disable-source-link.patch
|
||||
86fbaa058f78bba100f534f4c4bd6d7254181909f70d264c0390d3dd89c878a14ba9b5d2de05271b2c07b73ead70e029488c926221f676d59e27e387e3e579e9 build_enable-timestamps.patch
|
||||
4ac92d2d9190a55ee20d3e145a28a6953c98d3eb838c8acfb808b8839316443cb64da4a2c5787df0171fce7ef96ff6381043085ed90c23ec09ce9ac81571e675 roslyn-analyzer_disable-apphost.patch
|
||||
b56d5053831c43b8fed48894735b9910020abbae62b2b57bc9a423cd5ef09f412025e56dd9ce1994f551b87155d682796203fd351ca7fb8a29658078a6d4b029 runtime_76500-mono-musl-support.patch
|
||||
d732df247c721c9f677baabdd7f36dbf4b564814ff64164361065bb1c196b767494a1d39f634eadf01a23032c7b3e64102614b7213065c81096bbf3f8022e6a0 runtime_82269-mono-thread-coop-undefine-fortify-source.patch
|
||||
1f7be536c4826638853f110ee88bbd554be015cc88c6491c1066830789be18ad324f8ed2b1b75ed7aad74457dcafc812730059cb25d36d6344bfae8a517c00c4 runtime_enable-runtime-marshalling.diff
|
||||
293742ab307bef459a21deadcc4ad7c7996cc4b490910a36c2763b8ad25cc8a91c4e03b6290567cd1030f69638d0156c5b6970887858fb091f8482b67356065d runtime_enable-system-libunwind.diff
|
||||
d972e77df27748a80c9b23eca12f9fbd78be97f9034b79cc5703ba58eb6750171d9a115314300f883620ccbca89c65a99ca7a45d54a421b028b590190b4bed80 runtime_remove-usage-of-off64-t.patch
|
||||
d1b4ebcbb1a6815fc0ce4c471485c232618e60968a879309fb8336821a9351d2e0028d9f7726c0c041c750b497a0baa47400c78c9ceff550b91b4a6c2816fc41 sdk_14239-add-zsh-compdef-completion-script.patch
|
||||
"
|
|
@ -1,145 +0,0 @@
|
|||
# dotnet7-build
|
||||
|
||||
This is the .NET 7.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
|
||||
* `dotnet7-build` (aimed for internal use as bootstrap)
|
||||
* `dotnet7-build-artifacts` (aimed for internal use as bootstrap)
|
||||
* `dotnet7-sdk`
|
||||
* `dotnet7-templates` (required by sdk)
|
||||
* `dotnet-zsh-completion`
|
||||
* `dotnet-bash-completion`
|
||||
* `dotnet-doc`
|
||||
* `netstandard21-targeting-pack`
|
||||
|
||||
## How to build dotnet7 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, dotnet7 is built using three different aports.
|
||||
|
||||
* `community/dotnet7-stage0`
|
||||
Builds minimum components for full build of dotnet7, and packages these in an initial
|
||||
`dotnet7-stage0-bootstrap` package that `dotnet7-build` pulls.
|
||||
* `community/dotnet7-build`
|
||||
Builds full and packages dotnet7 fully using either stage0 or previoulsy built
|
||||
dotnet7 build.
|
||||
* `community/dotnet7-runtime`
|
||||
As abuild does not allow different versions for subpackages, a different aport
|
||||
is required to package runtime bits from dotnet7-build.
|
||||
|
||||
## 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 `dotnet7-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 `dotnet7` as opposed to `dotnet-7.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/dotnet7-build`
|
||||
|
||||
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 dotnet7/<name>`
|
||||
- `git add` any new patches
|
||||
- `git remove` any now-unnecessary patches
|
||||
- `git commit -m 'community/dotnet7-build: descriptive description'`
|
||||
- `git push`
|
||||
|
||||
7. Create a merge request with your changes, tagging @ayakael for review.
|
||||
|
||||
8. Once the tests in the merge-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/dotnet7-build`
|
||||
|
||||
|
||||
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 dotnet7/<name>`
|
||||
- `git add` any new patches
|
||||
- `git remove` any now-unnecessary patches
|
||||
- `git commit -m 'community/dotnet7-build: upgrade to <new-version>`
|
||||
- `git push`
|
||||
|
||||
8. Create a merge request with your changes, tagging @ayakael for review.
|
||||
|
||||
9. Once the tests in the merge-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,12 +0,0 @@
|
|||
diff --git a/repos/aspnetcore.proj.orig b/repos/aspnetcore.proj
|
||||
index cea712c1bfa..cf5099da788 100644
|
||||
--- a/repos/aspnetcore.proj.orig
|
||||
+++ b/repos/aspnetcore.proj
|
||||
@@ -10,6 +10,7 @@
|
||||
<BuildCommandArgs>$(BuildCommandArgs) --no-build-nodejs</BuildCommandArgs>
|
||||
<BuildCommandArgs>$(BuildCommandArgs) /p:PublishCompressedFilesPathPrefix=$(SourceBuiltAspNetCoreRuntime)</BuildCommandArgs>
|
||||
<BuildCommandArgs>$(BuildCommandArgs) /p:PortableBuild=false /p:TargetRuntimeIdentifier=$(TargetRid)</BuildCommandArgs>
|
||||
+ <BuildCommandArgs>$(BuildCommandArgs) /p:EnablePackageValidation=false </BuildCommandArgs>
|
||||
<!-- Update to 1.0.0 version of reference assemblies which are built in SBRP instead of the preview.2 version
|
||||
included by Arcade -->
|
||||
<BuildCommandArgs>$(BuildCommandArgs) /p:MicrosoftNetFrameworkReferenceAssembliesVersion=1.0.0</BuildCommandArgs>
|
|
@ -1,20 +0,0 @@
|
|||
From 98054ea87ce70247bb09ceafd2ad1a0b36d2fef4 Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Sat, 1 Oct 2022 09:21:58 -0400
|
||||
Subject: [PATCH] Disable source link
|
||||
|
||||
Addresses undiagnosed "Source control information is not available" error
|
||||
|
||||
---
|
||||
diff --git a/repos/installer.proj b/repos/installer.proj
|
||||
index 3a9756a27b7..4968184b14e 100644
|
||||
--- a/repos/installer.proj
|
||||
+++ b/repos/installer.proj
|
||||
@@ -26,6 +26,7 @@
|
||||
-->
|
||||
<BuildCommandArgs>$(BuildCommandArgs) /p:NETCoreAppMaximumVersion=99.9</BuildCommandArgs>
|
||||
<BuildCommandArgs>$(BuildCommandArgs) /p:OSName=$(OSNameOverride)</BuildCommandArgs>
|
||||
+ <BuildCommandArgs>$(BuildCommandArgs) /p:EnableSourceLink=false</BuildCommandArgs>
|
||||
<BuildCommandArgs>$(BuildCommandArgs) /p:PortableOSName=$(PortableOS)</BuildCommandArgs>
|
||||
<BuildCommandArgs Condition="'$(TargetOS)' == 'Linux'">$(BuildCommandArgs) /p:Rid=$(TargetRid)</BuildCommandArgs>
|
||||
<BuildCommandArgs>$(BuildCommandArgs) /p:DOTNET_INSTALL_DIR=$(DotNetCliToolDir)</BuildCommandArgs>
|
|
@ -1,40 +0,0 @@
|
|||
diff --git a/repos/Directory.Build.props b/repos/Directory.Build.props
|
||||
index b70a3161fef..d57f9393299 100644
|
||||
--- a/repos/Directory.Build.props
|
||||
+++ b/repos/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,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 b/src/roslyn-analyzers/src/PerformanceTests/Tests/PerformanceTests.csproj
|
||||
index 044a2aba46..3d37e147b3 100644
|
||||
--- a/src/roslyn-analyzers/src/PerformanceTests/Tests/PerformanceTests.csproj
|
||||
+++ b/src/roslyn-analyzers/src/PerformanceTests/Tests/PerformanceTests.csproj
|
||||
@@ -15,6 +15,7 @@
|
||||
<Configuration>Release</Configuration>
|
||||
<IsPackable>false</IsPackable>
|
||||
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
|
||||
+ <UseAppHost>false</UseAppHost>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BenchmarkDotNet" Version="$(BenchmarkDotNetVersion)" />
|
||||
@@ -27,4 +28,4 @@
|
||||
<ProjectReference Include="..\Utilities\CSharp\CSharpPerfUtilities.csproj" />
|
||||
<ProjectReference Include="..\Utilities\VisualBasic\VisualBasicPerfUtilities.csproj" />
|
||||
</ItemGroup>
|
||||
-</Project>
|
||||
\ No newline at end of file
|
||||
+</Project>
|
|
@ -1,325 +0,0 @@
|
|||
From 98054ea87ce70247bb09ceafd2ad1a0b36d2fef4 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/dotnet/runtime/pull/76500
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Sat, 1 Oct 2022 09:21:58 -0400
|
||||
Subject: [PATCH] Mono musl support
|
||||
|
||||
---
|
||||
Directory.Build.props | 1 +
|
||||
eng/common/cross/toolchain.cmake | 38 +++++++++++++++++++-----
|
||||
eng/native/configurecompiler.cmake | 7 +++++
|
||||
eng/native/tryrun.cmake | 6 +++-
|
||||
src/coreclr/pal/src/CMakeLists.txt | 5 ++++
|
||||
src/coreclr/pal/src/misc/perfjitdump.cpp | 2 +-
|
||||
src/coreclr/vm/i386/cgenx86.cpp | 4 +++
|
||||
src/mono/CMakeLists.txt | 33 ++++++++++++++++++++
|
||||
src/mono/mono.proj | 32 +++++++++++++-------
|
||||
src/mono/mono/mini/mini-runtime.c | 29 ++++++++++++++++++
|
||||
src/mono/mono/utils/mono-context.h | 8 +++++
|
||||
11 files changed, 146 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/src/runtime/Directory.Build.props b/src/runtime/Directory.Build.props
|
||||
index 6f9b97c0a9c..4298a6df1d3 100644
|
||||
--- a/src/runtime/Directory.Build.props
|
||||
+++ b/src/runtime/Directory.Build.props
|
||||
@@ -22,7 +22,6 @@
|
||||
<TargetOS Condition="'$(TargetOS)' == ''">$(_hostOS)</TargetOS>
|
||||
<TargetsMobile Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'tvOSSimulator' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'Browser'">true</TargetsMobile>
|
||||
<TargetsAppleMobile Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'tvOSSimulator'">true</TargetsAppleMobile>
|
||||
- <TargetsLinuxBionic Condition="$(OutputRid.StartsWith('linux-bionic'))">true</TargetsLinuxBionic>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Platform property is required by RepoLayout.props in Arcade SDK. -->
|
||||
@@ -154,7 +154,7 @@
|
||||
<_runtimeOS Condition="'$(TargetsMobile)' == 'true'">$(TargetOS.ToLowerInvariant())</_runtimeOS>
|
||||
|
||||
<_portableOS>linux</_portableOS>
|
||||
- <_portableOS Condition="'$(_runtimeOS)' == 'linux-musl'">linux-musl</_portableOS>
|
||||
+ <_portableOS Condition="'$(_runtimeOS)' == 'linux-musl' or $(_runtimeOS.StartsWith('alpine'))">linux-musl</_portableOS>
|
||||
<_portableOS Condition="'$(_runtimeOS)' == 'linux-bionic'">linux-bionic</_portableOS>
|
||||
<_portableOS Condition="'$(_hostOS)' == 'OSX'">osx</_portableOS>
|
||||
<_portableOS Condition="'$(_runtimeOS)' == 'win' or '$(TargetOS)' == 'windows'">win</_portableOS>
|
||||
|
||||
@@ -200,6 +199,9 @@
|
||||
|
||||
<OutputRid Condition="'$(OutputRid)' == ''">$(PackageRID)</OutputRid>
|
||||
<OutputRid Condition="'$(PortableBuild)' == 'true'">$(_portableOS)-$(TargetArchitecture)</OutputRid>
|
||||
+
|
||||
+ <TargetsLinuxBionic Condition="$(OutputRid.StartsWith('linux-bionic'))">true</TargetsLinuxBionic>
|
||||
+ <TargetsLinuxMusl Condition="'$(_portableOS)' == 'linux-musl'">true</TargetsLinuxMusl>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Label="CalculateTargetOSName" Condition="'$(SkipInferTargetOSName)' != 'true'">
|
||||
diff --git a/src/runtime/eng/native/tryrun.cmake b/src/runtime/eng/native/tryrun.cmake
|
||||
index 6355b0988f7..056c6606b17 100644
|
||||
--- a/src/runtime/eng/native/tryrun.cmake
|
||||
+++ b/src/runtime/eng/native/tryrun.cmake
|
||||
@@ -8,7 +8,11 @@ endmacro()
|
||||
|
||||
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv7-alpine-linux-musleabihf OR
|
||||
EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv6-alpine-linux-musleabihf OR
|
||||
- EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/aarch64-alpine-linux-musl)
|
||||
+ EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/aarch64-alpine-linux-musl OR
|
||||
+ EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/s390x-alpine-linux-musl OR
|
||||
+ EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/ppc64le-alpine-linux-musl OR
|
||||
+ EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl OR
|
||||
+ EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/riscv64-alpine-linux-musl)
|
||||
|
||||
set(ALPINE_LINUX 1)
|
||||
elseif(EXISTS ${CROSS_ROOTFS}/bin/freebsd-version)
|
||||
diff --git a/src/runtime/src/coreclr/pal/src/CMakeLists.txt b/src/runtime/src/coreclr/pal/src/CMakeLists.txt
|
||||
index d9726460ccf..c28563f8619 100644
|
||||
--- a/src/runtime/src/coreclr/pal/src/CMakeLists.txt
|
||||
+++ b/src/runtime/src/coreclr/pal/src/CMakeLists.txt
|
||||
@@ -315,6 +315,11 @@ if(CLR_CMAKE_TARGET_LINUX)
|
||||
target_link_libraries(coreclrpal ${UNWIND_LIBS})
|
||||
endif(CLR_CMAKE_USE_SYSTEM_LIBUNWIND)
|
||||
|
||||
+ # bundled libunwind requires using libucontext on alpine and x86 and ppc64le
|
||||
+ if(CLR_CMAKE_TARGET_ALPINE_LINUX AND (CLR_CMAKE_TARGET_ARCH_I386 OR CLR_CMAKE_TARGET_ARCH_POWERPC64))
|
||||
+ target_link_libraries(coreclrpal ucontext)
|
||||
+ endif(CLR_CMAKE_TARGET_ALPINE_LINUX AND (CLR_CMAKE_TARGET_ARCH_I386 OR CLR_CMAKE_TARGET_ARCH_POWERPC64))
|
||||
+
|
||||
endif(CLR_CMAKE_TARGET_LINUX)
|
||||
|
||||
if(CLR_CMAKE_TARGET_NETBSD)
|
||||
diff --git a/src/runtime/src/coreclr/pal/src/misc/perfjitdump.cpp b/src/runtime/src/coreclr/pal/src/misc/perfjitdump.cpp
|
||||
index 8d7f79ed3f0..043939ad2da 100644
|
||||
--- a/src/runtime/src/coreclr/pal/src/misc/perfjitdump.cpp
|
||||
+++ b/src/runtime/src/coreclr/pal/src/misc/perfjitdump.cpp
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <sys/uio.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
-#include <linux/limits.h>
|
||||
+#include <limits.h>
|
||||
|
||||
#include "../inc/llvm/ELF.h"
|
||||
|
||||
diff --git a/src/runtime/src/coreclr/vm/i386/cgenx86.cpp b/src/runtime/src/coreclr/vm/i386/cgenx86.cpp
|
||||
index 811c84a140d..4e958a44b30 100644
|
||||
--- a/src/runtime/src/coreclr/vm/i386/cgenx86.cpp
|
||||
+++ b/src/runtime/src/coreclr/vm/i386/cgenx86.cpp
|
||||
@@ -1133,6 +1133,7 @@ extern "C" DWORD __stdcall avx512StateSupport()
|
||||
|
||||
#else // !TARGET_UNIX
|
||||
|
||||
+#if !__has_builtin(__cpuid)
|
||||
void __cpuid(int cpuInfo[4], int function_id)
|
||||
{
|
||||
// Based on the Clang implementation provided in cpuid.h:
|
||||
@@ -1143,7 +1144,9 @@ void __cpuid(int cpuInfo[4], int function_id)
|
||||
: "0"(function_id)
|
||||
);
|
||||
}
|
||||
+#endif
|
||||
|
||||
+#if !__has_builtin(__cpuidex)
|
||||
void __cpuidex(int cpuInfo[4], int function_id, int subFunction_id)
|
||||
{
|
||||
// Based on the Clang implementation provided in cpuid.h:
|
||||
@@ -1154,6 +1157,7 @@ void __cpuidex(int cpuInfo[4], int function_id, int subFunction_id)
|
||||
: "0"(function_id), "2"(subFunction_id)
|
||||
);
|
||||
}
|
||||
+#endif
|
||||
|
||||
extern "C" DWORD __stdcall xmmYmmStateSupport()
|
||||
{
|
||||
diff --git a/src/runtime/src/mono/CMakeLists.txt b/src/runtime/src/mono/CMakeLists.txt
|
||||
index cdff32677c0..08a82cd7e83 100644
|
||||
--- a/src/runtime/src/mono/CMakeLists.txt
|
||||
+++ b/src/runtime/src/mono/CMakeLists.txt
|
||||
@@ -216,6 +216,35 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
# Enable the "full RELRO" options (RELRO & BIND_NOW) at link time
|
||||
add_link_options(-Wl,-z,relro)
|
||||
add_link_options(-Wl,-z,now)
|
||||
+ # Detect Linux ID
|
||||
+ # TODO: Eventually merge with eng/native/configureplatform.cmake
|
||||
+ set(LINUX_ID_FILE "/etc/os-release")
|
||||
+ if(CMAKE_CROSSCOMPILING)
|
||||
+ set(LINUX_ID_FILE "${CMAKE_SYSROOT}${LINUX_ID_FILE}")
|
||||
+ endif()
|
||||
+
|
||||
+ if(EXISTS ${LINUX_ID_FILE})
|
||||
+ execute_process(
|
||||
+ COMMAND bash -c "source ${LINUX_ID_FILE} && echo \$ID"
|
||||
+ OUTPUT_VARIABLE CLR_CMAKE_LINUX_ID
|
||||
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
+
|
||||
+ execute_process(
|
||||
+ COMMAND bash -c "if strings \"${CMAKE_SYSROOT}/usr/bin/ldd\" 2>&1 | grep -q musl; then echo musl; fi"
|
||||
+ OUTPUT_VARIABLE CLR_CMAKE_LINUX_MUSL
|
||||
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
+ endif()
|
||||
+
|
||||
+ if(DEFINED CLR_CMAKE_LINUX_ID)
|
||||
+ if(CLR_CMAKE_LINUX_ID STREQUAL alpine)
|
||||
+ set(CLR_CMAKE_HOST_ALPINE_LINUX 1)
|
||||
+ set(CLR_CMAKE_HOST_OS ${CLR_CMAKE_LINUX_ID})
|
||||
+ endif()
|
||||
+
|
||||
+ if(CLR_CMAKE_LINUX_MUSL STREQUAL musl)
|
||||
+ set(CLR_CMAKE_HOST_LINUX_MUSL 1)
|
||||
+ endif()
|
||||
+ endif(DEFINED CLR_CMAKE_LINUX_ID)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
set(HOST_LINUX 1)
|
||||
add_definitions(-D_GNU_SOURCE -D_REENTRANT)
|
||||
@@ -900,6 +929,11 @@ else()
|
||||
set(DISABLE_DLLMAP 1)
|
||||
endif()
|
||||
|
||||
+if(CLR_CMAKE_HOST_ALPINE_LINUX)
|
||||
+ # On Alpine Linux, 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()
|
||||
if(TARGET_DARWIN)
|
||||
check_c_compiler_flag(-fno-objc-msgsend-selector-stubs COMPILER_SUPPORTS_FNO_OBJC_MSGSEND_SELECTOR_STUBS)
|
||||
if(COMPILER_SUPPORTS_FNO_OBJC_MSGSEND_SELECTOR_STUBS)
|
||||
diff --git a/src/runtime/src/mono/mono.proj b/src/runtime/src/mono/mono.proj
|
||||
index 59fea4a2f72..5bac7fdf1c6 100644
|
||||
--- a/src/runtime/src/mono/mono.proj
|
||||
+++ b/src/runtime/src/mono/mono.proj
|
||||
@@ -554,19 +560,21 @@
|
||||
<MonoToolchainPrebuiltOS Condition="$([MSBuild]::IsOSPlatform('OSX'))">darwin-x86_64</MonoToolchainPrebuiltOS>
|
||||
<MonoToolchainPrebuiltOS Condition="'$(HostOS)' == 'windows'">windows-x86_64</MonoToolchainPrebuiltOS>
|
||||
<_MonoRuntimeFilePath>$(MonoObjDir)out\lib\$(MonoFileName)</_MonoRuntimeFilePath>
|
||||
- <_LinuxAbi Condition="'$(TargetsAndroid)' != 'true' and '$(TargetsLinuxBionic)' != 'true'">gnu</_LinuxAbi>
|
||||
- <_LinuxAbi Condition="'$(TargetsAndroid)' == 'true' or '$(TargetsLinuxBionic)' == 'true'">android</_LinuxAbi>
|
||||
+ <_LinuxAbi Condition="'$(TargetsAndroid)' != 'true' and '$(TargetsLinuxBionic)' != 'true' and '$(TargetsLinuxMusl)' != 'true'">linux-gnu</_LinuxAbi>
|
||||
+ <_LinuxAbi Condition="'$(TargetsAndroid)' != 'true' and '$(TargetsLinuxBionic)' != 'true' and '$(TargetsLinuxMusl)' == 'true'">alpine-linux-musl</_LinuxAbi>
|
||||
+ <_LinuxAbi Condition="'$(TargetsAndroid)' == 'true' or '$(TargetsLinuxBionic)' == 'true'">linux-android</_LinuxAbi>
|
||||
<_LinuxFloatAbi Condition="'$(TargetsAndroid)' != 'true' and '$(TargetsLinuxBionic)' != 'true'">hf</_LinuxFloatAbi>
|
||||
<_Objcopy>objcopy</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 'arm'">arm-linux-$(_LinuxAbi)eabi$(_LinuxFloatAbi)-$(_Objcopy)</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 'armv6'">arm-linux-$(_LinuxAbi)eabi$(_LinuxFloatAbi)-$(_Objcopy)</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 'arm64'">aarch64-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 'riscv64'">riscv64-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 's390x'">s390x-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 'ppc64le'">powerpc64le-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 'x64'">x86_64-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 'x86'">i686-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 'arm'">arm-$(_LinuxAbi)eabi$(_LinuxFloatAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 'armv6'">arm-$(_LinuxAbi)eabi$(_LinuxFloatAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 'arm64'">aarch64-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 'riscv64'">riscv64-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 's390x'">s390x-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 'ppc64le'">powerpc64le-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 'x64'">x86_64-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 'x86'">i686-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
<_Objcopy Condition="'$(TargetsAndroid)' == 'true' or '$(TargetsLinuxBionic)' == 'true'">$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/$(MonoToolchainPrebuiltOS)/bin/llvm-objcopy</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(TargetsLinuxMusl)' == 'true' and '$(CrossBuild)' != 'true'">objcopy</_Objcopy>
|
||||
|
||||
<_ObjcopyPrefix Condition="'$(MonoCrossDir)' != '' and '$(Platform)' == 'riscv64'">llvm-objcopy-</_ObjcopyPrefix>
|
||||
</PropertyGroup>
|
||||
diff --git a/src/runtime/src/mono/mono/mini/CMakeLists.txt b/src/runtime/src/mono/mono/mini/CMakeLists.txt
|
||||
index 30df4bac1f7..8698fd81206 100644
|
||||
--- a/src/runtime/src/mono/mono/mini/CMakeLists.txt
|
||||
+++ b/src/runtime/src/mono/mono/mini/CMakeLists.txt
|
||||
@@ -368,6 +368,11 @@ if(NOT DISABLE_SHARED_LIBS)
|
||||
target_sources(monosgen-shared PRIVATE $<TARGET_OBJECTS:eglib_objects>)
|
||||
set_target_properties(monosgen-shared PROPERTIES OUTPUT_NAME ${MONO_SHARED_LIB_NAME})
|
||||
target_link_libraries (monosgen-shared PRIVATE monoapi)
|
||||
+ # Alpine Linux implements ucontext in a different library
|
||||
+ if(CLR_CMAKE_HOST_ALPINE_LINUX AND TARGET_S390X)
|
||||
+ target_link_libraries(monosgen-shared PRIVATE ucontext)
|
||||
+ endif(CLR_CMAKE_HOST_ALPINE_LINUX AND TARGET_S390X)
|
||||
+
|
||||
target_include_directories (monosgen-shared PRIVATE monoapi)
|
||||
if(TARGET_WIN32)
|
||||
# on Windows the import library for the shared mono library will have the same name as the static library,
|
||||
@@ -527,6 +532,10 @@ if(NOT DISABLE_EXECUTABLES)
|
||||
set_target_properties(mono-sgen PROPERTIES OUTPUT_NAME mono-aot-cross)
|
||||
endif()
|
||||
target_link_libraries(mono-sgen PRIVATE monoapi monosgen-static ${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)
|
||||
+ target_link_libraries(mono-sgen PRIVATE ucontext)
|
||||
+ endif(CLR_CMAKE_HOST_ALPINE_LINUX 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}")
|
||||
diff --git a/src/runtime/src/mono/mono/mini/mini-runtime.c b/src/runtime/src/mono/mono/mini/mini-runtime.c
|
||||
index c481f69adc8..4db6c9a0ae7 100644
|
||||
--- a/src/runtime/src/mono/mono/mini/mini-runtime.c
|
||||
+++ b/src/runtime/src/mono/mono/mini/mini-runtime.c
|
||||
@@ -4383,6 +4383,30 @@ mini_llvm_init (void)
|
||||
#endif
|
||||
}
|
||||
|
||||
+#ifdef ENSURE_PRIMARY_STACK_SIZE
|
||||
+/*++
|
||||
+ Function:
|
||||
+ EnsureStackSize
|
||||
+
|
||||
+ Abstract:
|
||||
+ This fixes a problem on MUSL where the initial stack size reported by the
|
||||
+ pthread_attr_getstack is about 128kB, but this limit is not fixed and
|
||||
+ the stack can grow dynamically. The problem is that it makes the
|
||||
+ functions ReflectionInvocation::[Try]EnsureSufficientExecutionStack
|
||||
+ to fail for real life scenarios like e.g. compilation of corefx.
|
||||
+ Since there is no real fixed limit for the stack, the code below
|
||||
+ ensures moving the stack limit to a value that makes reasonable
|
||||
+ real life scenarios work.
|
||||
+
|
||||
+ --*/
|
||||
+static MONO_NO_OPTIMIZATION MONO_NEVER_INLINE void
|
||||
+ensure_stack_size (size_t size)
|
||||
+{
|
||||
+ volatile uint8_t *s = (uint8_t *)g_alloca(size);
|
||||
+ *s = 0;
|
||||
+}
|
||||
+#endif // ENSURE_PRIMARY_STACK_SIZE
|
||||
+
|
||||
void
|
||||
mini_add_profiler_argument (const char *desc)
|
||||
{
|
||||
@@ -4544,6 +4568,11 @@ mini_init (const char *filename)
|
||||
mono_w32handle_init ();
|
||||
#endif
|
||||
|
||||
+#ifdef ENSURE_PRIMARY_STACK_SIZE
|
||||
+ // TODO: https://github.com/dotnet/runtime/issues/72920
|
||||
+ ensure_stack_size (5 * 1024 * 1024);
|
||||
+#endif // ENSURE_PRIMARY_STACK_SIZE
|
||||
+
|
||||
mono_thread_info_runtime_init (&ticallbacks);
|
||||
|
||||
if (g_hasenv ("MONO_DEBUG")) {
|
||||
diff --git a/src/runtime/src/mono/mono/utils/mono-context.h b/src/runtime/src/mono/mono/utils/mono-context.h
|
||||
index a1f0fe6f68e..a9db2d336ca 100644
|
||||
--- a/src/runtime/src/mono/mono/utils/mono-context.h
|
||||
+++ b/src/runtime/src/mono/mono/utils/mono-context.h
|
||||
@@ -11,6 +11,14 @@
|
||||
#ifndef __MONO_MONO_CONTEXT_H__
|
||||
#define __MONO_MONO_CONTEXT_H__
|
||||
|
||||
+/*
|
||||
+ * Handle non-gnu libc versions with nothing in features.h
|
||||
+ * We have no idea what they're compatible with, so always fail.
|
||||
+ */
|
||||
+#ifndef __GLIBC_PREREQ
|
||||
+# define __GLIBC_PREREQ(x,y) 0
|
||||
+#endif
|
||||
+
|
||||
#include "mono-compiler.h"
|
||||
#include "mono-sigcontext.h"
|
||||
#include "mono-machine.h"
|
||||
diff --git a/src/runtime/src/native/libs/System.Native/pal_io.c b/src/runtime/src/native/libs/System.Native/pal_io.c
|
||||
index 0929a0b49ec..86311e19507 100644
|
||||
--- a/src/runtime/src/native/libs/System.Native/pal_io.c
|
||||
+++ b/src/runtime/src/native/libs/System.Native/pal_io.c
|
||||
@@ -1267,7 +1267,7 @@ int32_t SystemNative_CopyFile(intptr_t sourceFd, intptr_t destinationFd, int64_t
|
||||
// Try copying data using a copy-on-write clone. This shares storage between the files.
|
||||
if (sourceLength != 0)
|
||||
{
|
||||
- while ((ret = ioctl(outFd, FICLONE, inFd)) < 0 && errno == EINTR);
|
||||
+ while ((ret = ioctl(outFd, (int)FICLONE, inFd)) < 0 && errno == EINTR);
|
||||
copied = ret == 0;
|
||||
}
|
||||
#endif
|
||||
--
|
||||
2.36.3
|
||||
|
|
@ -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.orig b/src/runtime/src/coreclr/CMakeLists.txt
|
||||
index 7d1ce8d..5cacc78 100644
|
||||
--- a/src/runtime/src/coreclr/CMakeLists.txt.orig
|
||||
+++ b/src/runtime/src/coreclr/CMakeLists.txt
|
||||
@@ -105,6 +105,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()
|
||||
+
|
||||
add_subdirectory(pal)
|
||||
add_subdirectory(hosts)
|
||||
else()
|
File diff suppressed because it is too large
Load diff
|
@ -1,12 +0,0 @@
|
|||
diff --git a/src/runtime/eng/SourceBuild.props b/src/runtime/eng/SourceBuild.props
|
||||
index 32e6d9c0ba..8e2a7f9931 100644
|
||||
--- a/src/runtime/eng/SourceBuild.props
|
||||
+++ b/src/runtime/eng/SourceBuild.props
|
||||
@@ -51,6 +51,7 @@
|
||||
<InnerBuildArgs>$(InnerBuildArgs) /p:DisableSourceLink=false</InnerBuildArgs>
|
||||
<InnerBuildArgs>$(InnerBuildArgs) /p:AdditionalRuntimeIdentifierParent=$(BaseOS)</InnerBuildArgs>
|
||||
<InnerBuildArgs Condition="'$(SourceBuildUseMonoRuntime)' == 'true'">$(InnerBuildArgs) /p:PrimaryRuntimeFlavor=Mono /p:RuntimeFlavor=Mono</InnerBuildArgs>
|
||||
+ <InnerBuildArgs>$(InnerBuildArgs) --cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE</InnerBuildArgs>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
diff --git a/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp b/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp
|
||||
index 03712c3b684..99d8a457957 100644
|
||||
--- a/src/runtimr/src/coreclr/debug/createdump/crashinfounix.cpp
|
||||
+++ b/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp
|
||||
@@ -395,7 +395,7 @@ CrashInfo::ReadProcessMemory(void* address, void* buffer, size_t size, size_t* r
|
||||
// performance optimization.
|
||||
m_canUseProcVmReadSyscall = false;
|
||||
assert(m_fd != -1);
|
||||
- *read = pread64(m_fd, buffer, size, (off64_t)address);
|
||||
+ *read = pread(m_fd, buffer, size, (off_t)address);
|
||||
}
|
||||
|
||||
if (*read == (size_t)-1)
|
||||
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
From 4c74721e1f5da9642adab03075dda2f55719ac7b Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/dotnet/sdk/pull/14239
|
||||
From: Esgariot <esgariot@icloud.com>
|
||||
Date: Mon, 19 Oct 2020 23:42:37 +0200
|
||||
Subject: [PATCH 1/1] Add zsh compdef completion script.
|
||||
|
||||
Continuing off of PR 13384 in upstream.
|
||||
This commit is ready to be rebased to include appropriate co-authors
|
||||
before merging PR.
|
||||
|
||||
---
|
||||
scripts/register-completions.zsh | 13 +++----------
|
||||
1 file changed, 3 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/sdk/scripts/register-completions.zsh b/src/sdk/scripts/register-completions.zsh
|
||||
index 8eebe9a867..faa32fef71 100644
|
||||
--- a/src/sdk/scripts/register-completions.zsh
|
||||
+++ b/src/sdk/scripts/register-completions.zsh
|
||||
@@ -1,10 +1,3 @@
|
||||
-# zsh parameter completion for the dotnet CLI
|
||||
-
|
||||
-_dotnet_zsh_complete()
|
||||
-{
|
||||
- local completions=("$(dotnet complete "$words")")
|
||||
-
|
||||
- reply=( "${(ps:\n:)completions}" )
|
||||
-}
|
||||
-
|
||||
-compctl -K _dotnet_zsh_complete dotnet
|
||||
+#compdef dotnet
|
||||
+local completions=("$(dotnet complete "$words")")
|
||||
+[[ -n "$completions" ]] && compadd -- "${(ps:\n:)completions}"
|
||||
--
|
||||
2.34.1
|
||||
|
|
@ -1,172 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
# secfixes:
|
||||
# 7.0.3-r0:
|
||||
# - CVE-2023-21808
|
||||
# 7.0.5-r0:
|
||||
# - CVE-2023-28260
|
||||
# 7.0.7-r0:
|
||||
# - CVE-2023-24895
|
||||
# - CVE-2023-24897
|
||||
# - CVE-2023-24936
|
||||
# - CVE-2023-29331
|
||||
# - CVE-2023-29337
|
||||
# - CVE-2023-32032
|
||||
# - CVE-2023-33126
|
||||
# - CVE-2023-33128
|
||||
# - CVE-2023-33135
|
||||
# 7.0.9-r0:
|
||||
# - CVE-2023-33127
|
||||
# - CVE-2023-33170
|
||||
# 7.0.10-r0:
|
||||
# - CVE-2023-38178
|
||||
# - CVE-2023-35390
|
||||
# - CVE-2023-38180
|
||||
# - CVE-2023-35391
|
||||
# 7.0.11-r0:
|
||||
# - CVE-2023-36792
|
||||
# - CVE-2023-36793
|
||||
# - CVE-2023-36794
|
||||
# - CVE-2023-36796
|
||||
# - CVE-2023-36799
|
||||
# 7.0.12-r0:
|
||||
# - CVE-2023-36435
|
||||
# - CVE-2023-38171
|
||||
# - CVE-2023-44487
|
||||
# 7.0.13-r0:
|
||||
# - CVE-2023-36792
|
||||
# - CVE-2023-36793
|
||||
# - CVE-2023-36794
|
||||
# - CVE-2023-36796
|
||||
# - CVE-2023-36799
|
||||
# - CVE-2023-44487
|
||||
# - CVE-2023-38171
|
||||
# - CVE-2023-36435
|
||||
# 7.0.14-r0:
|
||||
# - CVE-2023-36049
|
||||
# - CVE-2023-36558
|
||||
|
||||
|
||||
pkgname=dotnet7-runtime
|
||||
pkgver=7.0.14
|
||||
_bldver=7.0.114-r0
|
||||
pkgrel=0
|
||||
|
||||
# Following for dotnet build version 6.0 and up
|
||||
_pkgver_macro=${pkgver%.*}
|
||||
_pkgver_name=${_pkgver_macro//[.0]}
|
||||
_bldver_ver=${_bldver%%-*}
|
||||
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: port WIP https://github.com/dotnet/runtime/issues/36748
|
||||
# s390x: no diskspace
|
||||
arch="x86_64 armv7 aarch64"
|
||||
url=https://dotnet.microsoft.com
|
||||
license="MIT"
|
||||
depends="
|
||||
dotnet$_pkgver_name-hostfxr
|
||||
icu-data-full
|
||||
icu-libs
|
||||
"
|
||||
makedepends="dotnet$_pkgver_name-build=$_bldver"
|
||||
subpackages="
|
||||
aspnetcore$_pkgver_name-runtime:aspnetcore_runtime:noarch
|
||||
aspnetcore$_pkgver_name-targeting-pack:aspnetcore_targeting_pack:noarch
|
||||
dotnet$_pkgver_name-apphost-pack:apphost_pack
|
||||
dotnet$_pkgver_name-hostfxr
|
||||
dotnet$_pkgver_name-targeting-pack:targeting_pack:noarch
|
||||
dotnet-host:host
|
||||
"
|
||||
provides="dotnet$_pkgver_name=$pkgver-r$pkgrel"
|
||||
options="!check" # No test suite
|
||||
source="dotnet.sh.in"
|
||||
builddir="$srcdir"
|
||||
_libdir="/usr/lib"
|
||||
|
||||
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() {
|
||||
sed "s|%LIBDIR%|$_libdir/dotnet|" "$srcdir"/dotnet.sh.in > "$srcdir"/dotnet.sh
|
||||
}
|
||||
|
||||
package() {
|
||||
install -dm 755 "$pkgdir"/$_libdir/dotnet/shared
|
||||
|
||||
cp -r $_libdir/dotnet/bootstrap/$_bldver_ver/shared/Microsoft.NETCore.App "$pkgdir"/$_libdir/dotnet/shared/.
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
cp -r $_libdir/dotnet/bootstrap/$_bldver_ver/dotnet "$subpkgdir"/$_libdir/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
|
||||
install -Dm 644 "$srcdir"/dotnet.sh -t "$subpkgdir"/etc/profile.d/
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
cp -r $_libdir/dotnet/bootstrap/$_bldver_ver/host "$subpkgdir"/$_libdir/dotnet/.
|
||||
}
|
||||
|
||||
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/shared
|
||||
|
||||
cp -r $_libdir/dotnet/bootstrap/$_bldver_ver/shared/Microsoft.AspNetCore.App "$subpkgdir"/$_libdir/dotnet/shared/.
|
||||
}
|
||||
|
||||
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/packs
|
||||
|
||||
cp -r $_libdir/dotnet/bootstrap/$_bldver_ver/packs/Microsoft.NETCore.App.Host.* "$subpkgdir"/$_libdir/dotnet/packs/.
|
||||
}
|
||||
|
||||
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/packs
|
||||
|
||||
cp -r $_libdir/dotnet/bootstrap/$_bldver_ver/packs/Microsoft.NETCore.App.Ref "$subpkgdir"/$_libdir/dotnet/packs/.
|
||||
}
|
||||
|
||||
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/packs
|
||||
|
||||
cp -r $_libdir/dotnet/bootstrap/$_bldver_ver/packs/Microsoft.AspNetCore.App.Ref "$subpkgdir"/$_libdir/dotnet/packs/.
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
c3f31956976b77198e72a3fef3427338b6b2961f8c121416040c1105de0ce8073e46f4c2e9ef22a001aee69cbe39621c2ddac988522693110071dfae42f2e2b7 dotnet.sh.in
|
||||
"
|
|
@ -1,144 +0,0 @@
|
|||
# dotnet7-runtime
|
||||
|
||||
This is the .NET 7.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
|
||||
* `aspnetcore7-runtime`
|
||||
* `aspnetcore7-targeting-pack`
|
||||
* `dotnet7-apphost-pack` (used by dotnet7-runtime)
|
||||
* `dotnet7-hostfxr` (used by dotnet-host)
|
||||
* `dotnet7-runtime`
|
||||
* `dotnet7-targeting-pack`
|
||||
* `dotnet-host`
|
||||
|
||||
## How to build dotnet7 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, dotnet7 is built using three different aports.
|
||||
|
||||
* `community/dotnet7-stage0`
|
||||
Builds minimum components for full build of dotnet7, and packages these in an initial
|
||||
`dotnet7-stage0-bootstrap` package that `dotnet7-build` pulls.
|
||||
* `community/dotnet7-build`
|
||||
Builds full and packages dotnet7 fully using either stage0 or previoulsy built
|
||||
dotnet7 build.
|
||||
* `community/dotnet7-runtime`
|
||||
As abuild does not allow different versions for subpackages, a different aport
|
||||
is required to package runtime bits from dotnet7-build.
|
||||
|
||||
## 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 `dotnet7-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 `dotnet7` as opposed to `dotnet-7.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/dotnet7-build`
|
||||
|
||||
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 dotnet7/<name>`
|
||||
- `git add` any new patches
|
||||
- `git remove` any now-unnecessary patches
|
||||
- `git commit -m 'community/dotnet7-build: 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/dotnet7-build`
|
||||
|
||||
|
||||
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 dotnet7/<name>`
|
||||
- `git add` any new patches
|
||||
- `git remove` any now-unnecessary patches
|
||||
- `git commit -m 'community/dotnet7-build: 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,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,535 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
pkgname=dotnet7-stage0
|
||||
pkgver=7.0.105
|
||||
pkgrel=4
|
||||
|
||||
[ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross=""
|
||||
|
||||
# Tag of tarball generator.
|
||||
_gittag=v$pkgver
|
||||
|
||||
# Versions of prebuilt artifacts and bootstrap tar
|
||||
_artifactsver=7.0.102
|
||||
_bootstrapver="7.0.105"
|
||||
_bootstraprel=0
|
||||
_installerver=${_gittag/v}
|
||||
|
||||
# Version of packages that aren't defined in git-info or badly defined
|
||||
_iltoolsver=7.0.2-servicing.22607.1
|
||||
_aspnetver=7.0.4
|
||||
|
||||
# Patches to be used. String before '_' refers to repo to patch
|
||||
# Look for patch notes within each patch for what they fix / where they come from
|
||||
# build_* patches applies directly to $builddir
|
||||
_patches="
|
||||
installer_set-crossgen2rid-using-buildarchitecture.patch
|
||||
runtime_76500-mono-musl-support.patch
|
||||
runtime_76500-properly-set-toolchain-for-alpine.patch
|
||||
runtime_82269-mono-thread-coop-undefine-fortify-source.patch
|
||||
runtime_83682-specify-notext-on-linux-musl-x86.patch
|
||||
runtime_84413-support-adding-rids-with-dash-in-base-part.patch
|
||||
runtime_84444-suppress-clang-16-warnings.patch
|
||||
runtime_enable-runtime-marshalling.diff
|
||||
runtime_remove-usage-of-off64-t.patch
|
||||
"
|
||||
_extra_nupkgs="https://globalcdn.nuget.org/packages/stylecop.analyzers.1.2.0-beta.435.nupkg"
|
||||
|
||||
_pkgver_macro=${pkgver%.*}
|
||||
_pkgver_prior=1
|
||||
_pkgver_name="${_pkgver_macro//[.0]}"
|
||||
pkgdesc="The .NET Core stage0 bits for dotnet build"
|
||||
# armhf: blocked by https://github.com/dotnet/runtime/issues/77663
|
||||
# x86: blocked by https://github.com/dotnet/runtime/issues/83509
|
||||
# riscv64: port WIP https://github.com/dotnet/runtime/issues/36748
|
||||
# s390x: no diskspace | lack maintainer resources
|
||||
arch="x86_64 armv7 aarch64"
|
||||
url=https://dotnet.microsoft.com
|
||||
_giturl=https://github.com/dotnet/installer
|
||||
license="MIT"
|
||||
options="!check" # Testsuite in main -build aport
|
||||
subpackages="
|
||||
dotnet$_pkgver_name-stage0-artifacts:artifacts:noarch
|
||||
dotnet$_pkgver_name-stage0-bootstrap
|
||||
"
|
||||
source="
|
||||
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
|
||||
Private.SourceBuilt.Artifacts.$_artifactsver.noextract::https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.$_artifactsver.tar.gz
|
||||
$_extra_nupkgs
|
||||
$_patches
|
||||
"
|
||||
|
||||
makedepends_host="
|
||||
alpine-release
|
||||
autoconf
|
||||
automake
|
||||
bash
|
||||
binutils
|
||||
clang
|
||||
cmake
|
||||
findutils
|
||||
g++
|
||||
gcc
|
||||
grep
|
||||
icu-dev
|
||||
krb5-dev
|
||||
libintl
|
||||
libstdc++
|
||||
libucontext-dev
|
||||
libunwind-dev
|
||||
libxml2-dev
|
||||
libxml2-utils
|
||||
linux-headers
|
||||
lttng-ust-dev
|
||||
musl-dev
|
||||
musl-utils
|
||||
openssl-dev
|
||||
pigz
|
||||
unzip
|
||||
zip
|
||||
zlib-dev
|
||||
"
|
||||
case $CARCH in
|
||||
s390x) ;;
|
||||
*) makedepends_host="$makedepends_host lld-dev";;
|
||||
esac
|
||||
makedepends_build="
|
||||
$makedepends_host
|
||||
binutils$_cross
|
||||
git
|
||||
gcc$_cross
|
||||
jq
|
||||
llvm
|
||||
llvm-dev
|
||||
python3
|
||||
sed
|
||||
xz
|
||||
"
|
||||
case $CBUILD_ARCH in
|
||||
x86_64) _dotnet_arch="x64";;
|
||||
aarch64) _dotnet_arch="arm64";;
|
||||
armv7|armhf) _dotnet_arch="arm";;
|
||||
i586) _dotnet_arch="x86";;
|
||||
*) _dotnet_arch=$CBUILD_ARCH;;
|
||||
esac
|
||||
case $CTARGET_ARCH in
|
||||
x86_64) _dotnet_target="x64";;
|
||||
aarch64) _dotnet_target="arm64";;
|
||||
armv7|armhf) _dotnet_target="arm";;
|
||||
i586) _dotnet_target="x86";;
|
||||
*) _dotnet_target=$CTARGET_ARCH;;
|
||||
esac
|
||||
|
||||
builddir="$srcdir"/dotnet-${_gittag/release\/}
|
||||
_packagesdir="$srcdir"/local-packages
|
||||
_libdir="/usr/lib"
|
||||
_nugetdir="$srcdir"/nuget
|
||||
_downloaddir="$srcdir"/local-downloads
|
||||
_cli_root="$srcdir"/bootstrap
|
||||
_nuget="$_cli_root/dotnet nuget"
|
||||
_outputdir="$srcdir"/artifacts
|
||||
# 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
|
||||
|
||||
# generates tarball containing all components built by dotnet
|
||||
snapshot() {
|
||||
local _pkg="$srcdir"/${builddir##*/}.tar
|
||||
ulimit -n 4096
|
||||
if [ -d "$srcdir" ]; then
|
||||
cd "$srcdir"
|
||||
else
|
||||
mkdir -p "$srcdir" && cd "$srcdir"
|
||||
fi
|
||||
if [ -d "installer" ]; then
|
||||
cd "$srcdir"/installer
|
||||
else
|
||||
git clone $_giturl --branch $_gittag && cd "$srcdir"/installer
|
||||
fi
|
||||
|
||||
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 $_libdir/dotnet/bootstrap/${_pkgver_macro}* -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 \
|
||||
/p:ArcadeBuildTarball=true \
|
||||
/p:TarballDir=$builddir \
|
||||
/p:TarballFilePath=$_pkg
|
||||
|
||||
msg "Compressing ${builddir##*/}.tar to $SRCDEST"
|
||||
xz -T0 -9 -vv -e -c > "$SRCDEST"/${builddir##*/}.tar.xz < "$_pkg"
|
||||
|
||||
cd "$startdir"
|
||||
abuild checksum
|
||||
}
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
# Parallel restore is broken on mono-based builds since dotnet7
|
||||
# see https://github.com/dotnet/runtime/issues/77364
|
||||
# fixed by https://github.com/dotnet/runtime/pull/79856 on dotnet8
|
||||
# A workaround via runtime_enable-runtime-marshalling.diff
|
||||
case $CARCH in
|
||||
s390x|ppc64le)
|
||||
msg "runtime_enable-runtime-marshalling.diff"
|
||||
patch -p1 -i "$srcdir"/runtime_enable-runtime-marshalling.diff
|
||||
;;
|
||||
esac
|
||||
|
||||
# sdk insists on downloading its own dotnet unless ArcadeBuildFromSource
|
||||
# is true, which opens up a can of worms
|
||||
sed 's|ArcadeBuildFromSource=true|Architecture|' -i src/sdk/eng/restore-toolset.sh
|
||||
|
||||
mkdir -p "$_cli_root"
|
||||
mkdir -p $_packagesdir $_downloaddir $_outputdir $_nugetdir $_logdir
|
||||
|
||||
# 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
|
||||
|
||||
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() {
|
||||
"$_cli_root"/dotnet build-server shutdown
|
||||
if [ -z "${_runtimever+x}" ]; then
|
||||
local _runtimever=$(grep OutputPackageVersion "$builddir"/git-info/runtime.props | sed -E 's|</?OutputPackageVersion>||g' | tr -d ' ')
|
||||
fi
|
||||
local _runtimever_ns=$(awk '{if($2 ~ "Name=\"VS.Redist.Common.NetCore.SharedFramework.x64.*\""){print $3}}' "$builddir"/src/installer/eng/Version.Details.xml | awk -F '"' '{print $2}')
|
||||
|
||||
msg "[$(date)] Building runtime version $_runtimever"
|
||||
cd "$builddir"/src/runtime
|
||||
|
||||
local args="
|
||||
-c Release
|
||||
-bl
|
||||
-clang
|
||||
-arch $_dotnet_target
|
||||
/consoleLoggerParameters:ShowTimestamp
|
||||
/p:NoPgoOptimize=true
|
||||
/p:EnableNgenOptimization=false
|
||||
/p:ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch=none
|
||||
/p:RunApiCompat=false
|
||||
/p:GitCommitHash=$(grep GitCommitHash "$builddir"/git-info/runtime.props | sed -E 's|</?GitCommitHash>||g' | tr -d ' ')
|
||||
"
|
||||
if [ "$CBUILD" != "$CHOST" ]; then
|
||||
local args="$args -cross"
|
||||
local DotNetBuildFromSource=false
|
||||
# x86 build of mono broken, thus do not build mono
|
||||
case $_dotnet_target in
|
||||
x86) local args="$args /p:DefaultSubsets=clr+libs+host+packs";;
|
||||
esac
|
||||
fi
|
||||
if [ "$_runtimever" != "${_runtimever##*-}" ]; then
|
||||
local args="$args /p:VersionSuffix=${_runtimever##*-}"
|
||||
fi
|
||||
DotNetBuildFromSource=$DotNetBuildFromSource ROOTFS_DIR="$CBUILDROOT" ./build.sh $args
|
||||
|
||||
for i in artifacts/packages/*/*/*.nupkg; do
|
||||
$_nuget push $i --source="$_packagesdir"
|
||||
done
|
||||
mkdir -p "$_downloaddir"/Runtime/$_runtimever_ns
|
||||
cp artifacts/packages/*/*/dotnet-runtime-*-*.tar.gz $_downloaddir/Runtime/$_runtimever_ns
|
||||
}
|
||||
|
||||
_roslyn() {
|
||||
"$_cli_root"/dotnet build-server shutdown
|
||||
if [ -z "${_roslynver+x}" ]; then
|
||||
local _roslynver=$(grep OutputPackageVersion "$builddir"/git-info/roslyn.props | sed -E 's|</?OutputPackageVersion>||g' | tr -d ' ')
|
||||
fi
|
||||
local _roslynver_ns=$(awk '{if($2 == "Name=\"Microsoft.Net.Compilers.Toolset\""){print $3}}' "$builddir"/src/installer/eng/Version.Details.xml | awk -F '"' '{print $2}')
|
||||
|
||||
msg "[$(date)] Building roslyn version $_roslynver"
|
||||
cd "$builddir"/src/roslyn
|
||||
|
||||
local args="
|
||||
-c Release
|
||||
-bl
|
||||
/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##*-}"
|
||||
fi
|
||||
DotNetBuildFromSource=false ./eng/build.sh --restore $args /p:UseAppHost=false
|
||||
./eng/build.sh --restore --build --pack $args
|
||||
for i in artifacts/packages/*/*/*.nupkg; do
|
||||
$_nuget push $i --source="$_packagesdir"
|
||||
done
|
||||
}
|
||||
|
||||
_sdk() {
|
||||
"$_cli_root"/dotnet build-server shutdown
|
||||
if [ -z "${_sdkver+x}" ]; then
|
||||
local _sdkver=$(grep OutputPackageVersion "$builddir"/git-info/sdk.props | sed -E 's|</?OutputPackageVersion>||g' | tr -d ' ')
|
||||
fi
|
||||
local _sdkver_ns=$(awk '{if($2 == "Name=\"Microsoft.NET.Sdk\""){print $3}}' "$builddir"/src/installer/eng/Version.Details.xml | awk -F '"' '{print $2}')
|
||||
|
||||
msg "[$(date)] Building sdk version $_sdkver"
|
||||
cd "$builddir"/src/sdk
|
||||
|
||||
local args="
|
||||
-c Release
|
||||
-bl
|
||||
/consoleLoggerParameters:ShowTimestamp
|
||||
/p:GitCommitHash=$(grep GitCommitHash "$builddir"/git-info/sdk.props | sed -E 's|</?GitCommitHash>||g' | tr -d ' ')
|
||||
/p:Architecture=$_dotnet_target
|
||||
"
|
||||
if [ "$_sdkver" != "${_sdkver##*-}" ]; then
|
||||
local args="$args /p:VersionSuffix=${_sdkver##*-}"
|
||||
fi
|
||||
|
||||
./build.sh --pack /p:Projects=$builddir/src/sdk/source-build.slnf $args
|
||||
|
||||
for i in artifacts/packages/*/*/*.nupkg; do
|
||||
$_nuget push $i --source="$_packagesdir"
|
||||
done
|
||||
mkdir -p "$_downloaddir"/Sdk/$_sdkver_ns
|
||||
cp artifacts/packages/*/*/dotnet-toolset-internal-*.zip "$_downloaddir"/Sdk/$_sdkver_ns
|
||||
}
|
||||
|
||||
_aspnetcore() {
|
||||
"$_cli_root"/dotnet build-server shutdown
|
||||
if [ -z "${_aspnetver+x}" ]; then
|
||||
local _aspnetver=$(grep OutputPackageVersion "$builddir"/git-info/aspnetcore.props | sed -E 's|</?OutputPackageVersion>||g' | tr -d ' ')
|
||||
fi
|
||||
local _aspnetver_ns=$(awk '{if($2 == "Name=\"Microsoft.AspNetCore.App.Ref.Internal\""){print $3}}' "$builddir"/src/installer/eng/Version.Details.xml | awk -F '"' '{print $2}')
|
||||
|
||||
msg "[$(date)] Build aspnetcore version $_aspnetver"
|
||||
cd "$builddir"/src/aspnetcore
|
||||
local args="
|
||||
-c Release
|
||||
-bl
|
||||
--os-name linux-musl
|
||||
-arch $_dotnet_target
|
||||
-no-build-nodejs
|
||||
/consoleLoggerParameters:ShowTimestamp
|
||||
/p:BuildOSName=linux-musl
|
||||
/p:BuildNodeJs=false
|
||||
/p:GitCommitHash=$(grep GitCommitHash "$builddir"/git-info/aspnetcore.props | sed -E 's|</?GitCommitHash>||g' | tr -d ' ')
|
||||
/p:DotNetAssetRootUrl=file://$_downloaddir/
|
||||
/p:EnablePackageValidation=false
|
||||
"
|
||||
# x86 crossgen broken; ppc64le insists on using crossgen
|
||||
case $_dotnet_target in
|
||||
x86|ppc64le) local args="$args /p:DISABLE_CROSSGEN=True";;
|
||||
esac
|
||||
if [ "$_aspnetver" != "${_aspnetver##*-}" ]; then
|
||||
local args="$args /p:VersionSuffix=${_aspnetver##*-}"
|
||||
fi
|
||||
./eng/build.sh --pack $args
|
||||
|
||||
for i in artifacts/packages/*/*/*.nupkg; do
|
||||
$_nuget push $i --source="$_packagesdir"
|
||||
done
|
||||
mkdir -p "$_downloaddir"/aspnetcore/Runtime/$_aspnetver_ns
|
||||
cp artifacts/installers/*/aspnetcore-runtime-internal-*-linux-musl-$_dotnet_target.tar.gz "$_downloaddir"/aspnetcore/Runtime/$_aspnetver_ns
|
||||
cp artifacts/installers/*/aspnetcore_base_runtime.version "$_downloaddir"/aspnetcore/Runtime/$_aspnetver_ns
|
||||
}
|
||||
|
||||
_installer() {
|
||||
"$_cli_root"/dotnet build-server shutdown
|
||||
msg "[$(date)] Building installer version $_installerver"
|
||||
cd "$builddir"/src/installer
|
||||
|
||||
local args="
|
||||
-c Release
|
||||
-bl
|
||||
/consoleLoggerParameters:ShowTimestamp
|
||||
/p:OSName=linux-musl
|
||||
/p:HostOSName=linux-musl
|
||||
/p:Architecture=$_dotnet_target
|
||||
/p:CoreSetupBlobRootUrl=file://$_downloaddir/
|
||||
/p:DotnetToolsetBlobRootUrl=file://$_downloaddir/
|
||||
/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/
|
||||
"
|
||||
if [ "$_installerver" != "${_installerver##*-}" ]; then
|
||||
local args="$args /p:VersionSuffix=${_installerver##*-}"
|
||||
fi
|
||||
|
||||
# x86 crossgen broken
|
||||
case $_dotnet_target in
|
||||
x86) local args="$args /p:DISABLE_CROSSGEN=True";;
|
||||
esac
|
||||
|
||||
./build.sh $args
|
||||
|
||||
mkdir -p "$_downloaddir"/installer/$_installerver
|
||||
cp artifacts/packages/*/*/dotnet-sdk-$_pkgver_macro*.tar.gz "$_downloaddir"/installer/$_installerver
|
||||
}
|
||||
|
||||
build() {
|
||||
export _InitializeDotNetCli=$_cli_root
|
||||
export DOTNET_INSTALL_DIR=$_cli_root
|
||||
export PATH="$_cli_root:$PATH"
|
||||
export NUGET_PACKAGES=$_nugetdir
|
||||
export DotNetBuildFromSource=true
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=true
|
||||
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
|
||||
export SHELL=/bin/bash
|
||||
export EXTRA_CPPFLAGS="${CPPFLAGS/--sysroot=$CBUILDROOT}"
|
||||
export EXTRA_CXXFLAGS="${CXXFLAGS/--sysroot=$CBUILDROOT}"
|
||||
export EXTRA_CFLAGS="${CFLAGS/--sysroot=$CBUILDROOT}"
|
||||
export EXTRA_LDFLAGS="$LDFLAGS"
|
||||
unset CXXFLAGS CFLAGS LDFLAGS CPPFLAGS
|
||||
|
||||
ulimit -n 4096
|
||||
|
||||
_runtime
|
||||
_roslyn
|
||||
_sdk
|
||||
_aspnetcore
|
||||
_installer
|
||||
}
|
||||
|
||||
package() {
|
||||
# lua-aports / buildrepo doesn't know to always build stage0 first when dealing
|
||||
# with virtual packages. Thus, we need to depend on an empty stage0 pkg that
|
||||
# dotnetx-build will pull, thus forcing build of stage0 first
|
||||
mkdir -p "$pkgdir"
|
||||
}
|
||||
|
||||
bootstrap() {
|
||||
# allows stage0 to be pulled by dotnetx-build if first build of dotnetx
|
||||
provides="dotnet$_pkgver_name-bootstrap"
|
||||
provider_priority=$_pkgver_prior
|
||||
|
||||
install -dm 755 \
|
||||
"$subpkgdir"/$_libdir/dotnet/bootstrap/$pkgver/docs \
|
||||
"$subpkgdir"/$_libdir/dotnet/bootstrap/$pkgver/comp \
|
||||
"$subpkgdir"/$_libdir/dotnet/artifacts/$pkgver
|
||||
|
||||
# unpack build artifacts to bootstrap subdir for use by future builds
|
||||
tar --use-compress-program="pigz" \
|
||||
-xf "$_downloaddir"/installer/$_installerver/dotnet-sdk-$_pkgver_macro*.tar.gz \
|
||||
-C "$subpkgdir"/$_libdir/dotnet/bootstrap/$pkgver/ \
|
||||
--no-same-owner
|
||||
|
||||
local _iltoolsArray="
|
||||
runtime.*.Microsoft.NETCore.TestHost.*.nupkg
|
||||
runtime.*.Microsoft.NETCore.ILAsm.*.nupkg
|
||||
runtime.*.Microsoft.NETCore.ILDAsm.*.nupkg
|
||||
"
|
||||
|
||||
local _nupkgsArray="
|
||||
$_iltoolsArray
|
||||
Microsoft.NETCore.App.Host.*.*.nupkg
|
||||
Microsoft.NETCore.App.Runtime.*.*.nupkg
|
||||
Microsoft.NETCore.App.Crossgen2.*.*.nupkg
|
||||
runtime.*.Microsoft.NETCore.DotNetHost.*.nupkg
|
||||
runtime.*.Microsoft.NETCore.DotNetHostPolicy.*.nupkg
|
||||
runtime.*.Microsoft.NETCore.DotNetHostResolver.*.nupkg
|
||||
runtime.*.Microsoft.NETCore.DotNetAppHost.*.nupkg
|
||||
Microsoft.AspNetCore.App.Runtime.linux-musl-*.*.nupkg
|
||||
"
|
||||
|
||||
# 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
|
||||
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
|
||||
# following adjusts version
|
||||
for i in $_iltoolsArray; do
|
||||
local nupath="$subpkgdir"$_libdir/dotnet/artifacts/$pkgver/$i
|
||||
local nupath=$(find $nupath || true)
|
||||
local nupkg="${nupath##*/}"
|
||||
local nuname="${nupkg/.nupkg}"
|
||||
if [ -z "${nuname/*rtm*}" ] || [ -z "${nuname/*servicing*}" ]; then
|
||||
nuname=${nuname%-*}
|
||||
fi
|
||||
local nuname="${nuname%.*.*.*}"
|
||||
local nuver="${nupkg/$nuname.}"
|
||||
local nuver="${nuver/.nupkg}"
|
||||
local nuspec="$nuname.nuspec"
|
||||
if [ ! "$nupath" ] || [ "$nupath" = "${nupath/$nuver/$_iltoolsver}" ]; then
|
||||
continue
|
||||
fi
|
||||
# shellcheck disable=SC2094
|
||||
unzip -p "$nupath" $nuspec | sed "s|$nuver|$_iltoolsver|" > "$srcdir"/$nuspec
|
||||
cd "$srcdir"
|
||||
zip -u "$nupath" $nuspec
|
||||
mv "$nupath" "${nupath/$nuver/$_iltoolsver}"
|
||||
done
|
||||
}
|
||||
|
||||
# build relies on a plethora of nupkgs which are provided by this Artifacts file.
|
||||
# stage0 sources these from Microsoft, which then allows bootstrap to build
|
||||
# locally hosted versions. The following unpacks built tarball into directory
|
||||
# for use by future builds.
|
||||
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 \
|
||||
"$subpkgdir"/usr/share/licenses
|
||||
|
||||
# extract artifacts to artifacts dir for use by future dotnet builds
|
||||
tar --use-compress-program="pigz" \
|
||||
-xf "$srcdir"/Private.SourceBuilt.Artifacts.*.noextract \
|
||||
-C "$subpkgdir"/$_libdir/dotnet/artifacts/$pkgver/ \
|
||||
--no-same-owner \
|
||||
--exclude '*x64*'
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
bfc122f316673fe4014e891eb101ecf40efc2ed4ecaff0cbd4bb5c17f547ccaa867ae8af22f41813565630cdb68e2972633703a88478fadde39584f91588589d dotnet-v7.0.105.tar.xz
|
||||
8fb7d1754359e3fda35b7a07e13d2a5e9e723196b980dd922b30919aedaddbedd4d82e28b37471437b69cb93e4b1d136ac701e221924e44d0be6b6ba94dc3654 dotnet-sdk-7.0.105-linux-musl-x64.noextract
|
||||
c8120c20939232b53a3cdc607d812d93fadd6dea9466f9454df559f8b7eb334c69fdfd31bc60e4c70b6cf4fc519a25a0439902b04cf5c5bd0c29de020024fbe2 dotnet-sdk-7.0.105-linux-musl-arm64.noextract
|
||||
9ffa724ccc02dc3e40afe22f0546a9bdf68b6314cf6da03d9387fb010fe3e5935154a5c06c4a2d588ff4ac77f34120a4ae9bc0237fb24452d78e6698435acf72 dotnet-sdk-7.0.105-linux-musl-arm.noextract
|
||||
e5d8f11d5da842309c1e7cf9936eb0cf3cfb56aaa17aeee64fe264b3e6771ee56dd6c405a4c16950b4e4607dab21bc0ec40783f69b0865a6112d7d03b1b57487 Private.SourceBuilt.Artifacts.7.0.102.noextract
|
||||
2ede8d9352a51861a5b2550010ff55da8241381a6fa6cc49e025f1c289b230b8c0177e93850de4ea8b6f702c1f2d50d81a9f4d890ca9441c257b614f2a5e05dd stylecop.analyzers.1.2.0-beta.435.nupkg
|
||||
b6a2dfeccac329546f87f1019c1f2cf07e2f294dd33914449ad08d92269c8713b6fa1e330ef257c24e189023fd0b824df97688b0ba6e578a6d0292b07a72b4c1 installer_set-crossgen2rid-using-buildarchitecture.patch
|
||||
43355fdb9531a08a9a141b016c049cc61d779e797f182456f56e5dc3af76fd31643d84d7ad7982080921681d2bbfc7bbaaa64f50c3899b023222eb0d841fbb2a runtime_76500-mono-musl-support.patch
|
||||
24f3fed752922d2ca3c151f21fedf6a257c7c74a155105a1aa09cdc847ba24e496212cb2d8548b134a8901c7da8d78c27fa93579211f7bdeadc598f808fed4a8 runtime_76500-properly-set-toolchain-for-alpine.patch
|
||||
d732df247c721c9f677baabdd7f36dbf4b564814ff64164361065bb1c196b767494a1d39f634eadf01a23032c7b3e64102614b7213065c81096bbf3f8022e6a0 runtime_82269-mono-thread-coop-undefine-fortify-source.patch
|
||||
2dd195d5275245fe85bea2f75019fd3cbadcef7f5691b44c08db470265c6e7fcb2a50b3276a96df7547af76953623fdc92bd1ad51ccef6738813b78d22327fa3 runtime_83682-specify-notext-on-linux-musl-x86.patch
|
||||
2ed962096eb9d8ae61831d224ceb05b8f77f5692f38a3457048d1b4abef705e8e4f676b81bb1a833e338e75ac8dc80b0631b1a45ad9a15c5597740b7320bfbb5 runtime_84413-support-adding-rids-with-dash-in-base-part.patch
|
||||
929d5be2e4a213ad726652c24478e45abe1bf1d444c01a8975da007f246cb056916ad4681e541436faa89447e35c5e0a6101ae4ecaecc8083155b04e7138beb8 runtime_84444-suppress-clang-16-warnings.patch
|
||||
1f7be536c4826638853f110ee88bbd554be015cc88c6491c1066830789be18ad324f8ed2b1b75ed7aad74457dcafc812730059cb25d36d6344bfae8a517c00c4 runtime_enable-runtime-marshalling.diff
|
||||
d972e77df27748a80c9b23eca12f9fbd78be97f9034b79cc5703ba58eb6750171d9a115314300f883620ccbca89c65a99ca7a45d54a421b028b590190b4bed80 runtime_remove-usage-of-off64-t.patch
|
||||
"
|
|
@ -1,140 +0,0 @@
|
|||
# dotnet7-stage0
|
||||
|
||||
This is the .NET 7.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
|
||||
* `dotnet7` (empty package to go around `buildrepo` build ordering bug)
|
||||
* `dotnet7-stage0-bootstrap` (packages binary bootstrap artifacts)
|
||||
* `dotnet7-stage0-artifacts` (packages non-binary bootstrap artifacts)
|
||||
|
||||
## How to build dotnet7 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, dotnet7 is built using three different aports.
|
||||
|
||||
* `community/dotnet7-stage0`
|
||||
Builds minimum components for full build of dotnet7, and packages these in an initial
|
||||
`dotnet7-stage0-bootstrap` package that `dotnet7-build` pulls.
|
||||
* `community/dotnet7-build`
|
||||
Builds full and packages dotnet7 fully using either stage0 or previoulsy built
|
||||
dotnet7 build.
|
||||
* `community/dotnet7-runtime`
|
||||
As abuild does not allow different versions for subpackages, a different aport
|
||||
is required to package runtime bits from dotnet7-build.
|
||||
|
||||
## 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 `dotnet7-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 `dotnet7` as opposed to `dotnet-7.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/dotnet7-build`
|
||||
|
||||
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 dotnet7/<name>`
|
||||
- `git add` any new patches
|
||||
- `git remove` any now-unnecessary patches
|
||||
- `git commit -m 'community/dotnet7-build: 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/dotnet7-build`
|
||||
|
||||
|
||||
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 dotnet7/<name>`
|
||||
- `git add` any new patches
|
||||
- `git remove` any now-unnecessary patches
|
||||
- `git commit -m 'community/dotnet7-build: 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,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,325 +0,0 @@
|
|||
From 98054ea87ce70247bb09ceafd2ad1a0b36d2fef4 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/dotnet/runtime/pull/76500
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Sat, 1 Oct 2022 09:21:58 -0400
|
||||
Subject: [PATCH] Mono musl support
|
||||
|
||||
---
|
||||
Directory.Build.props | 1 +
|
||||
eng/common/cross/toolchain.cmake | 38 +++++++++++++++++++-----
|
||||
eng/native/configurecompiler.cmake | 7 +++++
|
||||
eng/native/tryrun.cmake | 6 +++-
|
||||
src/coreclr/pal/src/CMakeLists.txt | 5 ++++
|
||||
src/coreclr/pal/src/misc/perfjitdump.cpp | 2 +-
|
||||
src/coreclr/vm/i386/cgenx86.cpp | 4 +++
|
||||
src/mono/CMakeLists.txt | 33 ++++++++++++++++++++
|
||||
src/mono/mono.proj | 32 +++++++++++++-------
|
||||
src/mono/mono/mini/mini-runtime.c | 29 ++++++++++++++++++
|
||||
src/mono/mono/utils/mono-context.h | 8 +++++
|
||||
11 files changed, 146 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/src/runtime/Directory.Build.props b/src/runtime/Directory.Build.props
|
||||
index 6f9b97c0a9c..4298a6df1d3 100644
|
||||
--- a/src/runtime/Directory.Build.props
|
||||
+++ b/src/runtime/Directory.Build.props
|
||||
@@ -22,7 +22,6 @@
|
||||
<TargetOS Condition="'$(TargetOS)' == ''">$(_hostOS)</TargetOS>
|
||||
<TargetsMobile Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'tvOSSimulator' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'Browser'">true</TargetsMobile>
|
||||
<TargetsAppleMobile Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'tvOSSimulator'">true</TargetsAppleMobile>
|
||||
- <TargetsLinuxBionic Condition="$(OutputRid.StartsWith('linux-bionic'))">true</TargetsLinuxBionic>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Platform property is required by RepoLayout.props in Arcade SDK. -->
|
||||
@@ -154,7 +154,7 @@
|
||||
<_runtimeOS Condition="'$(TargetsMobile)' == 'true'">$(TargetOS.ToLowerInvariant())</_runtimeOS>
|
||||
|
||||
<_portableOS>linux</_portableOS>
|
||||
- <_portableOS Condition="'$(_runtimeOS)' == 'linux-musl'">linux-musl</_portableOS>
|
||||
+ <_portableOS Condition="'$(_runtimeOS)' == 'linux-musl' or $(_runtimeOS.StartsWith('alpine'))">linux-musl</_portableOS>
|
||||
<_portableOS Condition="'$(_runtimeOS)' == 'linux-bionic'">linux-bionic</_portableOS>
|
||||
<_portableOS Condition="'$(_hostOS)' == 'OSX'">osx</_portableOS>
|
||||
<_portableOS Condition="'$(_runtimeOS)' == 'win' or '$(TargetOS)' == 'windows'">win</_portableOS>
|
||||
@@ -200,6 +199,9 @@
|
||||
|
||||
<OutputRid Condition="'$(OutputRid)' == ''">$(PackageRID)</OutputRid>
|
||||
<OutputRid Condition="'$(PortableBuild)' == 'true'">$(_portableOS)-$(TargetArchitecture)</OutputRid>
|
||||
+
|
||||
+ <TargetsLinuxBionic Condition="$(OutputRid.StartsWith('linux-bionic'))">true</TargetsLinuxBionic>
|
||||
+ <TargetsLinuxMusl Condition="'$(_portableOS)' == 'linux-musl'">true</TargetsLinuxMusl>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Label="CalculateTargetOSName" Condition="'$(SkipInferTargetOSName)' != 'true'">
|
||||
diff --git a/src/runtime/eng/native/tryrun.cmake b/src/runtime/eng/native/tryrun.cmake
|
||||
index 6355b0988f7..056c6606b17 100644
|
||||
--- a/src/runtime/eng/native/tryrun.cmake
|
||||
+++ b/src/runtime/eng/native/tryrun.cmake
|
||||
@@ -8,7 +8,11 @@ endmacro()
|
||||
|
||||
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv7-alpine-linux-musleabihf OR
|
||||
EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv6-alpine-linux-musleabihf OR
|
||||
- EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/aarch64-alpine-linux-musl)
|
||||
+ EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/aarch64-alpine-linux-musl OR
|
||||
+ EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/s390x-alpine-linux-musl OR
|
||||
+ EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/ppc64le-alpine-linux-musl OR
|
||||
+ EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl OR
|
||||
+ EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/riscv64-alpine-linux-musl)
|
||||
|
||||
set(ALPINE_LINUX 1)
|
||||
elseif(EXISTS ${CROSS_ROOTFS}/bin/freebsd-version)
|
||||
diff --git a/src/runtime/src/coreclr/pal/src/CMakeLists.txt b/src/runtime/src/coreclr/pal/src/CMakeLists.txt
|
||||
index d9726460ccf..c28563f8619 100644
|
||||
--- a/src/runtime/src/coreclr/pal/src/CMakeLists.txt
|
||||
+++ b/src/runtime/src/coreclr/pal/src/CMakeLists.txt
|
||||
@@ -315,6 +315,11 @@ if(CLR_CMAKE_TARGET_LINUX)
|
||||
target_link_libraries(coreclrpal ${UNWIND_LIBS})
|
||||
endif(CLR_CMAKE_USE_SYSTEM_LIBUNWIND)
|
||||
|
||||
+ # bundled libunwind requires using libucontext on alpine and x86 and ppc64le
|
||||
+ if(CLR_CMAKE_TARGET_ALPINE_LINUX AND (CLR_CMAKE_TARGET_ARCH_I386 OR CLR_CMAKE_TARGET_ARCH_POWERPC64))
|
||||
+ target_link_libraries(coreclrpal ucontext)
|
||||
+ endif(CLR_CMAKE_TARGET_ALPINE_LINUX AND (CLR_CMAKE_TARGET_ARCH_I386 OR CLR_CMAKE_TARGET_ARCH_POWERPC64))
|
||||
+
|
||||
endif(CLR_CMAKE_TARGET_LINUX)
|
||||
|
||||
if(CLR_CMAKE_TARGET_NETBSD)
|
||||
diff --git a/src/runtime/src/coreclr/pal/src/misc/perfjitdump.cpp b/src/runtime/src/coreclr/pal/src/misc/perfjitdump.cpp
|
||||
index 8d7f79ed3f0..043939ad2da 100644
|
||||
--- a/src/runtime/src/coreclr/pal/src/misc/perfjitdump.cpp
|
||||
+++ b/src/runtime/src/coreclr/pal/src/misc/perfjitdump.cpp
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <sys/uio.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
-#include <linux/limits.h>
|
||||
+#include <limits.h>
|
||||
|
||||
#include "../inc/llvm/ELF.h"
|
||||
|
||||
diff --git a/src/runtime/src/coreclr/vm/i386/cgenx86.cpp b/src/runtime/src/coreclr/vm/i386/cgenx86.cpp
|
||||
index 811c84a140d..4e958a44b30 100644
|
||||
--- a/src/runtime/src/coreclr/vm/i386/cgenx86.cpp
|
||||
+++ b/src/runtime/src/coreclr/vm/i386/cgenx86.cpp
|
||||
@@ -1133,6 +1133,7 @@ extern "C" DWORD __stdcall avx512StateSupport()
|
||||
|
||||
#else // !TARGET_UNIX
|
||||
|
||||
+#if !__has_builtin(__cpuid)
|
||||
void __cpuid(int cpuInfo[4], int function_id)
|
||||
{
|
||||
// Based on the Clang implementation provided in cpuid.h:
|
||||
@@ -1143,7 +1144,9 @@ void __cpuid(int cpuInfo[4], int function_id)
|
||||
: "0"(function_id)
|
||||
);
|
||||
}
|
||||
+#endif
|
||||
|
||||
+#if !__has_builtin(__cpuidex)
|
||||
void __cpuidex(int cpuInfo[4], int function_id, int subFunction_id)
|
||||
{
|
||||
// Based on the Clang implementation provided in cpuid.h:
|
||||
@@ -1154,6 +1157,7 @@ void __cpuidex(int cpuInfo[4], int function_id, int subFunction_id)
|
||||
: "0"(function_id), "2"(subFunction_id)
|
||||
);
|
||||
}
|
||||
+#endif
|
||||
|
||||
extern "C" DWORD __stdcall xmmYmmStateSupport()
|
||||
{
|
||||
diff --git a/src/runtime/src/mono/CMakeLists.txt b/src/runtime/src/mono/CMakeLists.txt
|
||||
index cdff32677c0..08a82cd7e83 100644
|
||||
--- a/src/runtime/src/mono/CMakeLists.txt
|
||||
+++ b/src/runtime/src/mono/CMakeLists.txt
|
||||
@@ -216,6 +216,35 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
# Enable the "full RELRO" options (RELRO & BIND_NOW) at link time
|
||||
add_link_options(-Wl,-z,relro)
|
||||
add_link_options(-Wl,-z,now)
|
||||
+ # Detect Linux ID
|
||||
+ # TODO: Eventually merge with eng/native/configureplatform.cmake
|
||||
+ set(LINUX_ID_FILE "/etc/os-release")
|
||||
+ if(CMAKE_CROSSCOMPILING)
|
||||
+ set(LINUX_ID_FILE "${CMAKE_SYSROOT}${LINUX_ID_FILE}")
|
||||
+ endif()
|
||||
+
|
||||
+ if(EXISTS ${LINUX_ID_FILE})
|
||||
+ execute_process(
|
||||
+ COMMAND bash -c "source ${LINUX_ID_FILE} && echo \$ID"
|
||||
+ OUTPUT_VARIABLE CLR_CMAKE_LINUX_ID
|
||||
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
+
|
||||
+ execute_process(
|
||||
+ COMMAND bash -c "if strings \"${CMAKE_SYSROOT}/usr/bin/ldd\" 2>&1 | grep -q musl; then echo musl; fi"
|
||||
+ OUTPUT_VARIABLE CLR_CMAKE_LINUX_MUSL
|
||||
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
+ endif()
|
||||
+
|
||||
+ if(DEFINED CLR_CMAKE_LINUX_ID)
|
||||
+ if(CLR_CMAKE_LINUX_ID STREQUAL alpine)
|
||||
+ set(CLR_CMAKE_HOST_ALPINE_LINUX 1)
|
||||
+ set(CLR_CMAKE_HOST_OS ${CLR_CMAKE_LINUX_ID})
|
||||
+ endif()
|
||||
+
|
||||
+ if(CLR_CMAKE_LINUX_MUSL STREQUAL musl)
|
||||
+ set(CLR_CMAKE_HOST_LINUX_MUSL 1)
|
||||
+ endif()
|
||||
+ endif(DEFINED CLR_CMAKE_LINUX_ID)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
set(HOST_LINUX 1)
|
||||
add_definitions(-D_GNU_SOURCE -D_REENTRANT)
|
||||
@@ -893,6 +922,12 @@ if(HOST_IOS OR HOST_ANDROID OR HOST_MACCAT)
|
||||
else()
|
||||
set(DISABLE_DLLMAP 1)
|
||||
endif()
|
||||
+
|
||||
+if(CLR_CMAKE_HOST_ALPINE_LINUX)
|
||||
+ # On Alpine Linux, 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()
|
||||
### End of OS specific checks
|
||||
|
||||
include_directories("${CLR_SRC_NATIVE_DIR}")
|
||||
diff --git a/src/runtime/src/mono/mono.proj b/src/runtime/src/mono/mono.proj
|
||||
index 59fea4a2f72..5bac7fdf1c6 100644
|
||||
--- a/src/runtime/src/mono/mono.proj
|
||||
+++ b/src/runtime/src/mono/mono.proj
|
||||
@@ -554,19 +560,21 @@
|
||||
<MonoToolchainPrebuiltOS Condition="$([MSBuild]::IsOSPlatform('OSX'))">darwin-x86_64</MonoToolchainPrebuiltOS>
|
||||
<MonoToolchainPrebuiltOS Condition="'$(HostOS)' == 'windows'">windows-x86_64</MonoToolchainPrebuiltOS>
|
||||
<_MonoRuntimeFilePath>$(MonoObjDir)out\lib\$(MonoFileName)</_MonoRuntimeFilePath>
|
||||
- <_LinuxAbi Condition="'$(TargetsAndroid)' != 'true' and '$(TargetsLinuxBionic)' != 'true'">gnu</_LinuxAbi>
|
||||
- <_LinuxAbi Condition="'$(TargetsAndroid)' == 'true' or '$(TargetsLinuxBionic)' == 'true'">android</_LinuxAbi>
|
||||
+ <_LinuxAbi Condition="'$(TargetsAndroid)' != 'true' and '$(TargetsLinuxBionic)' != 'true' and '$(TargetsLinuxMusl)' != 'true'">linux-gnu</_LinuxAbi>
|
||||
+ <_LinuxAbi Condition="'$(TargetsAndroid)' != 'true' and '$(TargetsLinuxBionic)' != 'true' and '$(TargetsLinuxMusl)' == 'true'">alpine-linux-musl</_LinuxAbi>
|
||||
+ <_LinuxAbi Condition="'$(TargetsAndroid)' == 'true' or '$(TargetsLinuxBionic)' == 'true'">linux-android</_LinuxAbi>
|
||||
<_LinuxFloatAbi Condition="'$(TargetsAndroid)' != 'true' and '$(TargetsLinuxBionic)' != 'true'">hf</_LinuxFloatAbi>
|
||||
<_Objcopy>objcopy</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 'arm'">arm-linux-$(_LinuxAbi)eabi$(_LinuxFloatAbi)-$(_Objcopy)</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 'armv6'">arm-linux-$(_LinuxAbi)eabi$(_LinuxFloatAbi)-$(_Objcopy)</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 'arm64'">aarch64-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 'riscv64'">riscv64-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 's390x'">s390x-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 'ppc64le'">powerpc64le-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 'x64'">x86_64-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
- <_Objcopy Condition="'$(Platform)' == 'x86'">i686-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 'arm'">arm-$(_LinuxAbi)eabi$(_LinuxFloatAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 'armv6'">arm-$(_LinuxAbi)eabi$(_LinuxFloatAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 'arm64'">aarch64-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 'riscv64'">riscv64-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 's390x'">s390x-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 'ppc64le'">powerpc64le-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 'x64'">x86_64-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(Platform)' == 'x86'">i686-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
|
||||
<_Objcopy Condition="'$(TargetsAndroid)' == 'true' or '$(TargetsLinuxBionic)' == 'true'">$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/$(MonoToolchainPrebuiltOS)/bin/llvm-objcopy</_Objcopy>
|
||||
+ <_Objcopy Condition="'$(TargetsLinuxMusl)' == 'true' and '$(CrossBuild)' != 'true'">objcopy</_Objcopy>
|
||||
|
||||
<_ObjcopyPrefix Condition="'$(MonoCrossDir)' != '' and '$(Platform)' == 'riscv64'">llvm-objcopy-</_ObjcopyPrefix>
|
||||
</PropertyGroup>
|
||||
diff --git a/src/runtime/src/mono/mono/mini/CMakeLists.txt b/src/runtime/src/mono/mono/mini/CMakeLists.txt
|
||||
index 30df4bac1f7..8698fd81206 100644
|
||||
--- a/src/runtime/src/mono/mono/mini/CMakeLists.txt
|
||||
+++ b/src/runtime/src/mono/mono/mini/CMakeLists.txt
|
||||
@@ -368,6 +368,11 @@ if(NOT DISABLE_SHARED_LIBS)
|
||||
target_sources(monosgen-shared PRIVATE $<TARGET_OBJECTS:eglib_objects>)
|
||||
set_target_properties(monosgen-shared PROPERTIES OUTPUT_NAME ${MONO_SHARED_LIB_NAME})
|
||||
target_link_libraries (monosgen-shared PRIVATE monoapi)
|
||||
+ # Alpine Linux implements ucontext in a different library
|
||||
+ if(CLR_CMAKE_HOST_ALPINE_LINUX AND TARGET_S390X)
|
||||
+ target_link_libraries(monosgen-shared PRIVATE ucontext)
|
||||
+ endif(CLR_CMAKE_HOST_ALPINE_LINUX AND TARGET_S390X)
|
||||
+
|
||||
target_include_directories (monosgen-shared PRIVATE monoapi)
|
||||
if(TARGET_WIN32)
|
||||
# on Windows the import library for the shared mono library will have the same name as the static library,
|
||||
@@ -527,6 +532,10 @@ if(NOT DISABLE_EXECUTABLES)
|
||||
set_target_properties(mono-sgen PROPERTIES OUTPUT_NAME mono-aot-cross)
|
||||
endif()
|
||||
target_link_libraries(mono-sgen PRIVATE monoapi monosgen-static ${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)
|
||||
+ target_link_libraries(mono-sgen PRIVATE ucontext)
|
||||
+ endif(CLR_CMAKE_HOST_ALPINE_LINUX 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}")
|
||||
diff --git a/src/runtime/src/mono/mono/mini/mini-runtime.c b/src/runtime/src/mono/mono/mini/mini-runtime.c
|
||||
index c481f69adc8..4db6c9a0ae7 100644
|
||||
--- a/src/runtime/src/mono/mono/mini/mini-runtime.c
|
||||
+++ b/src/runtime/src/mono/mono/mini/mini-runtime.c
|
||||
@@ -4383,6 +4383,30 @@ mini_llvm_init (void)
|
||||
#endif
|
||||
}
|
||||
|
||||
+#ifdef ENSURE_PRIMARY_STACK_SIZE
|
||||
+/*++
|
||||
+ Function:
|
||||
+ EnsureStackSize
|
||||
+
|
||||
+ Abstract:
|
||||
+ This fixes a problem on MUSL where the initial stack size reported by the
|
||||
+ pthread_attr_getstack is about 128kB, but this limit is not fixed and
|
||||
+ the stack can grow dynamically. The problem is that it makes the
|
||||
+ functions ReflectionInvocation::[Try]EnsureSufficientExecutionStack
|
||||
+ to fail for real life scenarios like e.g. compilation of corefx.
|
||||
+ Since there is no real fixed limit for the stack, the code below
|
||||
+ ensures moving the stack limit to a value that makes reasonable
|
||||
+ real life scenarios work.
|
||||
+
|
||||
+ --*/
|
||||
+static MONO_NO_OPTIMIZATION MONO_NEVER_INLINE void
|
||||
+ensure_stack_size (size_t size)
|
||||
+{
|
||||
+ volatile uint8_t *s = (uint8_t *)g_alloca(size);
|
||||
+ *s = 0;
|
||||
+}
|
||||
+#endif // ENSURE_PRIMARY_STACK_SIZE
|
||||
+
|
||||
void
|
||||
mini_add_profiler_argument (const char *desc)
|
||||
{
|
||||
@@ -4544,6 +4568,11 @@ mini_init (const char *filename)
|
||||
mono_w32handle_init ();
|
||||
#endif
|
||||
|
||||
+#ifdef ENSURE_PRIMARY_STACK_SIZE
|
||||
+ // TODO: https://github.com/dotnet/runtime/issues/72920
|
||||
+ ensure_stack_size (5 * 1024 * 1024);
|
||||
+#endif // ENSURE_PRIMARY_STACK_SIZE
|
||||
+
|
||||
mono_thread_info_runtime_init (&ticallbacks);
|
||||
|
||||
if (g_hasenv ("MONO_DEBUG")) {
|
||||
diff --git a/src/runtime/src/mono/mono/utils/mono-context.h b/src/runtime/src/mono/mono/utils/mono-context.h
|
||||
index a1f0fe6f68e..a9db2d336ca 100644
|
||||
--- a/src/runtime/src/mono/mono/utils/mono-context.h
|
||||
+++ b/src/runtime/src/mono/mono/utils/mono-context.h
|
||||
@@ -11,6 +11,14 @@
|
||||
#ifndef __MONO_MONO_CONTEXT_H__
|
||||
#define __MONO_MONO_CONTEXT_H__
|
||||
|
||||
+/*
|
||||
+ * Handle non-gnu libc versions with nothing in features.h
|
||||
+ * We have no idea what they're compatible with, so always fail.
|
||||
+ */
|
||||
+#ifndef __GLIBC_PREREQ
|
||||
+# define __GLIBC_PREREQ(x,y) 0
|
||||
+#endif
|
||||
+
|
||||
#include "mono-compiler.h"
|
||||
#include "mono-sigcontext.h"
|
||||
#include "mono-machine.h"
|
||||
diff --git a/src/runtime/src/native/libs/System.Native/pal_io.c b/src/runtime/src/native/libs/System.Native/pal_io.c
|
||||
index 0929a0b49ec..86311e19507 100644
|
||||
--- a/src/runtime/src/native/libs/System.Native/pal_io.c
|
||||
+++ b/src/runtime/src/native/libs/System.Native/pal_io.c
|
||||
@@ -1267,7 +1267,7 @@ int32_t SystemNative_CopyFile(intptr_t sourceFd, intptr_t destinationFd, int64_t
|
||||
// Try copying data using a copy-on-write clone. This shares storage between the files.
|
||||
if (sourceLength != 0)
|
||||
{
|
||||
- while ((ret = ioctl(outFd, FICLONE, inFd)) < 0 && errno == EINTR);
|
||||
+ while ((ret = ioctl(outFd, (int)FICLONE, inFd)) < 0 && errno == EINTR);
|
||||
copied = ret == 0;
|
||||
}
|
||||
#endif
|
||||
--
|
||||
2.36.3
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
From 98054ea87ce70247bb09ceafd2ad1a0b36d2fef4 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/dotnet/arcade/pull/11608
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Sat, 1 Oct 2022 09:21:58 -0400
|
||||
Subject: [PATCH] Mono musl support
|
||||
|
||||
---
|
||||
Directory.Build.props | 1 +
|
||||
eng/common/cross/toolchain.cmake | 38 +++++++++++++++++++-----
|
||||
eng/native/configurecompiler.cmake | 7 +++++
|
||||
eng/native/tryrun.cmake | 6 +++-
|
||||
src/coreclr/pal/src/CMakeLists.txt | 5 ++++
|
||||
src/coreclr/pal/src/misc/perfjitdump.cpp | 2 +-
|
||||
src/coreclr/vm/i386/cgenx86.cpp | 4 +++
|
||||
src/mono/CMakeLists.txt | 33 ++++++++++++++++++++
|
||||
src/mono/mono.proj | 32 +++++++++++++-------
|
||||
src/mono/mono/mini/mini-runtime.c | 29 ++++++++++++++++++
|
||||
src/mono/mono/utils/mono-context.h | 8 +++++
|
||||
11 files changed, 146 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/src/runtime/eng/common/cross/toolchain.cmake b/src/runtime/eng/common/cross/toolchain.cmake
|
||||
index 561576be97c..a9db659f869 100644
|
||||
--- a/src/runtime/eng/common/cross/toolchain.cmake
|
||||
+++ b/src/runtime/eng/common/cross/toolchain.cmake
|
||||
@@ -60,13 +60,25 @@ elseif(TARGET_ARCH_NAME STREQUAL "armv6")
|
||||
endif()
|
||||
elseif(TARGET_ARCH_NAME STREQUAL "ppc64le")
|
||||
set(CMAKE_SYSTEM_PROCESSOR ppc64le)
|
||||
- set(TOOLCHAIN "powerpc64le-linux-gnu")
|
||||
+ if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/powerpc64le-alpine-linux-musl)
|
||||
+ set(TOOLCHAIN "powerpc64le-alpine-linux-musl")
|
||||
+ else()
|
||||
+ set(TOOLCHAIN "powerpc64le-linux-gnu")
|
||||
+ endif()
|
||||
elseif(TARGET_ARCH_NAME STREQUAL "riscv64")
|
||||
set(CMAKE_SYSTEM_PROCESSOR riscv64)
|
||||
- set(TOOLCHAIN "riscv64-linux-gnu")
|
||||
+ if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/riscv64-alpine-linux-musl)
|
||||
+ set(TOOLCHAIN "riscv64-alpine-linux-musl")
|
||||
+ else()
|
||||
+ set(TOOLCHAIN "riscv64-linux-gnu")
|
||||
+ endif()
|
||||
elseif(TARGET_ARCH_NAME STREQUAL "s390x")
|
||||
set(CMAKE_SYSTEM_PROCESSOR s390x)
|
||||
- set(TOOLCHAIN "s390x-linux-gnu")
|
||||
+ if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/s390x-alpine-linux-musl)
|
||||
+ set(TOOLCHAIN "s390x-alpine-linux-musl")
|
||||
+ else()
|
||||
+ set(TOOLCHAIN "s390x-linux-gnu")
|
||||
+ endif()
|
||||
elseif(TARGET_ARCH_NAME STREQUAL "x64")
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
if(LINUX)
|
||||
@@ -83,7 +95,11 @@ elseif(TARGET_ARCH_NAME STREQUAL "x64")
|
||||
endif()
|
||||
elseif(TARGET_ARCH_NAME STREQUAL "x86")
|
||||
set(CMAKE_SYSTEM_PROCESSOR i686)
|
||||
- set(TOOLCHAIN "i686-linux-gnu")
|
||||
+ if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl)
|
||||
+ set(TOOLCHAIN "i586-alpine-linux-musl")
|
||||
+ else()
|
||||
+ set(TOOLCHAIN "i686-linux-gnu")
|
||||
+ endif()
|
||||
if(TIZEN)
|
||||
set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu/9.2.0")
|
||||
endif()
|
||||
@@ -253,8 +269,12 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64")
|
||||
add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}")
|
||||
endif()
|
||||
elseif(TARGET_ARCH_NAME STREQUAL "x86")
|
||||
- add_toolchain_linker_flag(-m32)
|
||||
-
|
||||
+ if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl)
|
||||
+ add_toolchain_linker_flag("--target=${TOOLCHAIN}")
|
||||
+ add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}")
|
||||
+ else()
|
||||
+ add_toolchain_linker_flag(-m32)
|
||||
+ endif()
|
||||
if(TIZEN)
|
||||
add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
|
||||
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib")
|
||||
@@ -291,7 +311,11 @@ if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$")
|
||||
add_compile_options(-mfloat-abi=softfp)
|
||||
endif()
|
||||
elseif(TARGET_ARCH_NAME STREQUAL "x86")
|
||||
- add_compile_options(-m32)
|
||||
+ if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl)
|
||||
+ add_compile_options(--target=${TOOLCHAIN})
|
||||
+ else()
|
||||
+ add_compile_options(-m32)
|
||||
+ endif()
|
||||
add_compile_options(-Wno-error=unused-command-line-argument)
|
||||
endif()
|
||||
|
||||
--
|
||||
2.36.3
|
||||
|
|
@ -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.orig b/src/runtime/src/coreclr/CMakeLists.txt
|
||||
index 7d1ce8d..5cacc78 100644
|
||||
--- a/src/runtime/src/coreclr/CMakeLists.txt.orig
|
||||
+++ b/src/runtime/src/coreclr/CMakeLists.txt
|
||||
@@ -105,6 +105,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()
|
||||
+
|
||||
add_subdirectory(pal)
|
||||
add_subdirectory(hosts)
|
||||
else()
|
|
@ -1,164 +0,0 @@
|
|||
From abc761c2c5694e4029fea1a60dc1934951c66e26 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/dotnet/runtime/pull/84413
|
||||
From: Tom Deseyn <tom.deseyn@gmail.com>
|
||||
Date: Thu, 6 Apr 2023 13:18:11 +0200
|
||||
Subject: [PATCH 1/2] Microsoft.NETCore.Platforms: support adding rids with '-'
|
||||
in the base part.
|
||||
|
||||
Currently when trying to add a rid like 'linux-musl-x64'
|
||||
the rid is not understood to be base = 'linux-musl', arch = 'x64'.
|
||||
|
||||
Instead the parser considers a potential optional qualifier.
|
||||
This causes the rid to be parsed as base = 'linux', arch = 'musl',
|
||||
and qualifier = 'x64'.
|
||||
|
||||
We know the rids being added won't have a qualifier. If we take
|
||||
this into account while parsing, we can parse the rid correctly.
|
||||
---
|
||||
.../Microsoft.NETCore.Platforms/src/RID.cs | 11 +++-
|
||||
.../src/RuntimeGroupCollection.cs | 2 +-
|
||||
.../tests/RidTests.cs | 50 +++++++++++++------
|
||||
3 files changed, 47 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RID.cs b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RID.cs
|
||||
index 6457fd29cadf0..b464d5f0f54e3 100644
|
||||
--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RID.cs
|
||||
+++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RID.cs
|
||||
@@ -56,7 +56,7 @@ private enum RIDPart : int
|
||||
Max = Qualifier
|
||||
}
|
||||
|
||||
- public static RID Parse(string runtimeIdentifier)
|
||||
+ public static RID Parse(string runtimeIdentifier, bool noQualifier)
|
||||
{
|
||||
string[] parts = new string[(int)RIDPart.Max + 1];
|
||||
bool omitVersionDelimiter = true;
|
||||
@@ -90,6 +90,15 @@ public static RID Parse(string runtimeIdentifier)
|
||||
// version might be omitted
|
||||
else if (current == ArchitectureDelimiter)
|
||||
{
|
||||
+ // The qualifier delimiter and architecture delimiter are the same.
|
||||
+ // When there is no qualifier, there will be one delimiter past the base part
|
||||
+ // for the architecture.
|
||||
+ // So if we see another delimiter later in the string (for the architecture),
|
||||
+ // extend the base part instead of starting the architecture part.
|
||||
+ if (noQualifier && runtimeIdentifier.IndexOf(ArchitectureDelimiter, i + 1) != -1)
|
||||
+ {
|
||||
+ break;
|
||||
+ }
|
||||
// ensure there's no version later in the string
|
||||
if (runtimeIdentifier.IndexOf(VersionDelimiter, i) != -1)
|
||||
{
|
||||
diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
||||
index e069508053105..31009a8d28e5e 100644
|
||||
--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
||||
+++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
||||
@@ -34,7 +34,7 @@ public RuntimeGroupCollection(ICollection<RuntimeGroup> runtimeGroups)
|
||||
/// <param name="parent"></param>
|
||||
public void AddRuntimeIdentifier(string runtimeIdentifier, string parent)
|
||||
{
|
||||
- RID rid = RID.Parse(runtimeIdentifier);
|
||||
+ RID rid = RID.Parse(runtimeIdentifier, noQualifier: true);
|
||||
|
||||
AddRuntimeIdentifier(rid, parent);
|
||||
}
|
||||
diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/tests/RidTests.cs b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/tests/RidTests.cs
|
||||
index 227bcbdd10d4d..8dee0ebeda17a 100644
|
||||
--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/tests/RidTests.cs
|
||||
+++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/tests/RidTests.cs
|
||||
@@ -10,35 +10,57 @@ public class RidTests
|
||||
{
|
||||
public static IEnumerable<object[]> ValidRIDData()
|
||||
{
|
||||
- yield return new object[] { "win10-x64", new RID() { BaseRID = "win", OmitVersionDelimiter = true, Version = new RuntimeVersion("10"), Architecture = "x64" } };
|
||||
- yield return new object[] { "win10", new RID() { BaseRID = "win", OmitVersionDelimiter = true, Version = new RuntimeVersion("10")} };
|
||||
- yield return new object[] { "linux", new RID() { BaseRID = "linux" } };
|
||||
- yield return new object[] { "linux-x64", new RID() { BaseRID = "linux", Architecture = "x64" } };
|
||||
- yield return new object[] { "linux-x64", new RID() { BaseRID = "linux", Architecture = "x64" } };
|
||||
- yield return new object[] { "debian.10-x64", new RID() { BaseRID = "debian", Version = new RuntimeVersion("10"), Architecture = "x64" } };
|
||||
- yield return new object[] { "linuxmint.19.2-x64", new RID() { BaseRID = "linuxmint", Version = new RuntimeVersion("19.2"), Architecture = "x64" } };
|
||||
- yield return new object[] { "ubuntu.14.04-x64", new RID() { BaseRID = "ubuntu", Version = new RuntimeVersion("14.04"), Architecture = "x64" } };
|
||||
- yield return new object[] { "foo-bar.42-arm", new RID() { BaseRID = "foo-bar", Version = new RuntimeVersion("42"), Architecture = "arm" } };
|
||||
- yield return new object[] { "foo-bar-arm", new RID() { BaseRID = "foo", Architecture = "bar", Qualifier = "arm" } }; // demonstrates ambiguity, avoid using `-` in base
|
||||
- yield return new object[] { "linux-musl-x64", new RID() { BaseRID = "linux", Architecture = "musl", Qualifier = "x64" } }; // yes, we already have ambiguous RIDs
|
||||
+ yield return new object[] { "win10-x64", new RID() { BaseRID = "win", OmitVersionDelimiter = true, Version = new RuntimeVersion("10"), Architecture = "x64" }, null };
|
||||
+ yield return new object[] { "win10", new RID() { BaseRID = "win", OmitVersionDelimiter = true, Version = new RuntimeVersion("10")}, null };
|
||||
+ yield return new object[] { "linux", new RID() { BaseRID = "linux" }, null };
|
||||
+ yield return new object[] { "linux-x64", new RID() { BaseRID = "linux", Architecture = "x64" }, null };
|
||||
+ yield return new object[] { "linux-x64", new RID() { BaseRID = "linux", Architecture = "x64" }, null };
|
||||
+ yield return new object[] { "debian.10-x64", new RID() { BaseRID = "debian", Version = new RuntimeVersion("10"), Architecture = "x64" }, null };
|
||||
+ yield return new object[] { "linuxmint.19.2-x64", new RID() { BaseRID = "linuxmint", Version = new RuntimeVersion("19.2"), Architecture = "x64" }, null };
|
||||
+ yield return new object[] { "ubuntu.14.04-x64", new RID() { BaseRID = "ubuntu", Version = new RuntimeVersion("14.04"), Architecture = "x64" }, null };
|
||||
+ yield return new object[] { "foo-bar.42-arm", new RID() { BaseRID = "foo-bar", Version = new RuntimeVersion("42"), Architecture = "arm" }, null };
|
||||
+ yield return new object[] { "foo-bar-arm", new RID() { BaseRID = "foo", Architecture = "bar", Qualifier = "arm" }, // demonstrates ambiguity, avoid using `-` in base
|
||||
+ new RID() { BaseRID = "foo-bar", Architecture = "arm" } };
|
||||
+ yield return new object[] { "linux-musl-x64", new RID() { BaseRID = "linux", Architecture = "musl", Qualifier = "x64" }, // yes, we already have ambiguous RIDs
|
||||
+ new RID() { BaseRID = "linux-musl", Architecture = "x64" } };
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(ValidRIDData))]
|
||||
- internal void ParseCorrectly(string input, RID expected)
|
||||
+ internal void ParseCorrectly(string input, RID expected, RID? expectedNoQualifier)
|
||||
{
|
||||
- RID actual = RID.Parse(input);
|
||||
+ _ = expectedNoQualifier; // unused
|
||||
+
|
||||
+ RID actual = RID.Parse(input, noQualifier: false);
|
||||
|
||||
Assert.Equal(expected, actual);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(ValidRIDData))]
|
||||
- internal void ToStringAsExpected(string expected, RID rid)
|
||||
+ internal void ParseCorrectlyNoQualifier(string input, RID expected, RID? expectedNoQualifier)
|
||||
+ {
|
||||
+ expectedNoQualifier ??= expected;
|
||||
+
|
||||
+ RID actual = RID.Parse(input, noQualifier: true);
|
||||
+
|
||||
+ Assert.Equal(expectedNoQualifier, actual);
|
||||
+ }
|
||||
+
|
||||
+ [Theory]
|
||||
+ [MemberData(nameof(ValidRIDData))]
|
||||
+ internal void ToStringAsExpected(string expected, RID rid, RID? expectedNoQualifierRid)
|
||||
{
|
||||
string actual = rid.ToString();
|
||||
|
||||
Assert.Equal(expected, actual);
|
||||
+
|
||||
+ if (expectedNoQualifierRid is not null)
|
||||
+ {
|
||||
+ actual = expectedNoQualifierRid.ToString();
|
||||
+
|
||||
+ Assert.Equal(expected, actual);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
From f70da467ca94291039e0ea5b0723cb9db5e090e7 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Deseyn <tom.deseyn@gmail.com>
|
||||
Date: Thu, 6 Apr 2023 18:14:31 +0200
|
||||
Subject: [PATCH 2/2] Update
|
||||
src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
||||
|
||||
Co-authored-by: Eric StJohn <ericstj@microsoft.com>
|
||||
---
|
||||
.../Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
||||
index 31009a8d28e5e..ec4762d71424c 100644
|
||||
--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
||||
+++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
||||
@@ -34,6 +34,7 @@ public RuntimeGroupCollection(ICollection<RuntimeGroup> runtimeGroups)
|
||||
/// <param name="parent"></param>
|
||||
public void AddRuntimeIdentifier(string runtimeIdentifier, string parent)
|
||||
{
|
||||
+ // don't parse qualifier since we don't use them and they are ambiguous with `-` in base RID
|
||||
RID rid = RID.Parse(runtimeIdentifier, noQualifier: true);
|
||||
|
||||
AddRuntimeIdentifier(rid, parent);
|
|
@ -1,192 +0,0 @@
|
|||
From 4b82b0b1173981ea5f2c7baf003a66fad31208c9 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/dotnet/runtime/pull/84443
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Thu, 6 Apr 2023 16:01:47 -0400
|
||||
Subject: [PATCH 1/2] Suppress clang-16 warnings (#81573)
|
||||
|
||||
---
|
||||
eng/common/native/init-compiler.sh | 2 +-
|
||||
eng/native/configurecompiler.cmake | 9 +++++++++
|
||||
src/coreclr/dlls/mscordbi/CMakeLists.txt | 5 +----
|
||||
src/coreclr/dlls/mscordbi/mscordbi.cpp | 15 +++++++++++++++
|
||||
src/native/corehost/apphost/static/CMakeLists.txt | 4 ++--
|
||||
...orts.src => singlefilehost_freebsdexports.src} | 4 ++++
|
||||
.../apphost/static/singlefilehost_unixexports.src | 4 ----
|
||||
7 files changed, 32 insertions(+), 11 deletions(-)
|
||||
rename src/native/corehost/apphost/static/{singlefilehost_OSXexports.src => singlefilehost_freebsdexports.src} (81%)
|
||||
|
||||
diff --git a/src/runtime/eng/common/native/init-compiler.sh b/src/runtime/eng/common/native/init-compiler.sh
|
||||
index 41a26d802a93f..f13b74080edf9 100644
|
||||
--- a/src/runtime/eng/common/native/init-compiler.sh
|
||||
+++ b/src/runtime/eng/common/native/init-compiler.sh
|
||||
@@ -71,7 +71,7 @@ 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=( 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 )
|
||||
+ 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
|
||||
diff --git a/src/runtime/eng/native/configurecompiler.cmake b/src/runtime/eng/native/configurecompiler.cmake
|
||||
index 9090289f50e34..eaf5a867c5f6d 100644
|
||||
--- a/src/runtime/eng/native/configurecompiler.cmake
|
||||
+++ b/src/runtime/eng/native/configurecompiler.cmake
|
||||
@@ -447,6 +447,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-uninitialized)
|
||||
add_compile_options(-Wno-strict-aliasing)
|
||||
diff --git a/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt b/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
|
||||
index c24a90cf70409..95e92034e238f 100644
|
||||
--- a/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
|
||||
+++ b/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
|
||||
@@ -100,10 +100,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 891c01e144f5c..109fe6a5b5417 100644
|
||||
--- a/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp
|
||||
+++ b/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp
|
||||
@@ -32,3 +32,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 c37885bf5691c..a632d993c0f2a 100644
|
||||
--- a/src/runtime/src/native/corehost/apphost/static/CMakeLists.txt
|
||||
+++ b/src/runtime/src/native/corehost/apphost/static/CMakeLists.txt
|
||||
@@ -65,8 +65,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_freebsdexports.src
|
||||
similarity index 81%
|
||||
rename from src/native/corehost/apphost/static/singlefilehost_OSXexports.src
|
||||
rename to src/native/corehost/apphost/static/singlefilehost_freebsdexports.src
|
||||
index 18d5697e84580..1f9c517821855 100644
|
||||
--- a/src/runtime/src/native/corehost/apphost/static/singlefilehost_OSXexports.src
|
||||
+++ b/src/runtime/src/native/corehost/apphost/static/singlefilehost_freebsdexports.src
|
||||
@@ -9,3 +9,7 @@ g_dacTable
|
||||
|
||||
; Used by profilers
|
||||
MetaDataGetDispenser
|
||||
+
|
||||
+; FreeBSD needs to reexport these
|
||||
+__progname
|
||||
+environ
|
||||
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 1f9c517821855..18d5697e84580 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
|
||||
|
||||
From b5b3114e6866ac0058b5e18da52f92a1738a915b Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Thu, 6 Apr 2023 16:35:18 -0400
|
||||
Subject: [PATCH 2/2] Fix DBI loading problem on Linux (#82461)
|
||||
|
||||
---
|
||||
src/coreclr/dlls/mscordbi/CMakeLists.txt | 16 +++++++++++++++-
|
||||
src/coreclr/dlls/mscordbi/mscordbi.cpp | 15 ---------------
|
||||
2 files changed, 15 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt b/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
|
||||
index 95e92034e238f..c577651141e5c 100644
|
||||
--- a/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
|
||||
+++ b/src/runtime/src/coreclr/dlls/mscordbi/CMakeLists.txt
|
||||
@@ -100,7 +100,21 @@ elseif(CLR_CMAKE_HOST_UNIX)
|
||||
mscordaccore
|
||||
)
|
||||
|
||||
- target_link_libraries(mscordbi ${COREDBI_LIBRARIES})
|
||||
+ # Before llvm 16, lld was setting `--undefined-version` by default. The default was
|
||||
+ # flipped to `--no-undefined-version` in lld 16, so we will explicitly set it to
|
||||
+ # `--undefined-version` for our use-case.
|
||||
+ include(CheckLinkerFlag OPTIONAL)
|
||||
+ if(COMMAND check_linker_flag)
|
||||
+ check_linker_flag(CXX -Wl,--undefined-version LINKER_SUPPORTS_UNDEFINED_VERSION)
|
||||
+ if (LINKER_SUPPORTS_UNDEFINED_VERSION)
|
||||
+ add_linker_flag(-Wl,--undefined-version)
|
||||
+ endif(LINKER_SUPPORTS_UNDEFINED_VERSION)
|
||||
+ endif(COMMAND check_linker_flag)
|
||||
+
|
||||
+ # 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})
|
||||
|
||||
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 109fe6a5b5417..891c01e144f5c 100644
|
||||
--- a/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp
|
||||
+++ b/src/runtime/src/coreclr/dlls/mscordbi/mscordbi.cpp
|
||||
@@ -32,18 +32,3 @@ 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
|
File diff suppressed because it is too large
Load diff
|
@ -1,15 +0,0 @@
|
|||
diff --git a/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp b/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp
|
||||
index 03712c3b684..99d8a457957 100644
|
||||
--- a/src/runtimr/src/coreclr/debug/createdump/crashinfounix.cpp
|
||||
+++ b/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp
|
||||
@@ -395,7 +395,7 @@ CrashInfo::ReadProcessMemory(void* address, void* buffer, size_t size, size_t* r
|
||||
// performance optimization.
|
||||
m_canUseProcVmReadSyscall = false;
|
||||
assert(m_fd != -1);
|
||||
- *read = pread64(m_fd, buffer, size, (off64_t)address);
|
||||
+ *read = pread(m_fd, buffer, size, (off_t)address);
|
||||
}
|
||||
|
||||
if (*read == (size_t)-1)
|
||||
|
||||
|
|
@ -1,112 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=git-annex
|
||||
pkgver=10.20231129
|
||||
pkgrel=0
|
||||
pkgdesc="Manage files with git, without checking their contents into git"
|
||||
url="http://git-annex.branchable.com"
|
||||
arch="x86_64 aarch64" # limited by ghc
|
||||
license="AGPL-3.0-or-later"
|
||||
options="net"
|
||||
depends="
|
||||
curl
|
||||
git
|
||||
rsync
|
||||
"
|
||||
makedepends="
|
||||
alex
|
||||
cabal
|
||||
dbus-dev
|
||||
file-dev
|
||||
ghc
|
||||
gmp-dev
|
||||
gnutls-dev
|
||||
happy
|
||||
libffi-dev
|
||||
libgsasl-dev
|
||||
libxml2-dev
|
||||
ncurses-dev
|
||||
zlib-dev
|
||||
"
|
||||
source="
|
||||
https://git.joeyh.name/index.cgi/git-annex.git/snapshot/git-annex-$pkgver.tar.gz
|
||||
https://lab.ilot.io/mirrors/git-annex/-/releases/$pkgver/downloads/config/git-annex-$pkgver-edge.config
|
||||
fix-makefile.patch
|
||||
"
|
||||
subpackages="$pkgname-doc $pkgname-bash-completion $pkgname-fish-completion $pkgname-zsh-completion"
|
||||
|
||||
# Add / remove '-' between "-f" and "FeatureName" to adjust feature build
|
||||
_feature_flags="
|
||||
-fAssistant \
|
||||
-fWebApp \
|
||||
-fPairing \
|
||||
-fProduction \
|
||||
-fTorrentParser \
|
||||
-fMagicMime \
|
||||
-fBenchmark \
|
||||
-f-DebugLocks \
|
||||
-fDbus \
|
||||
-fNetworkBSD \
|
||||
-fGitLfs \
|
||||
-fHttpClientRestricted \
|
||||
"
|
||||
_cabal_home="$srcdir/dist"
|
||||
|
||||
cabal_update() {
|
||||
default_prepare
|
||||
msg "Freezing $pkgname dependencies"
|
||||
|
||||
# Resolve deps and generate fresh cabal.config with version constraints.
|
||||
HOME="$_cabal_home" cabal update
|
||||
cd "$srcdir/git-annex"*
|
||||
HOME="$_cabal_home" cabal v1-freeze --shadow-installed-packages
|
||||
|
||||
mv "cabal.config" "$startdir/git-annex-$pkgver.config"
|
||||
cd "$startdir"
|
||||
|
||||
if ! abuild checksum; then
|
||||
die "Failed to update checksum, run 'abuild checksum' manually"
|
||||
fi
|
||||
}
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
ln -sf "$srcdir"/git-annex-*.config cabal.config
|
||||
|
||||
# ghc version path
|
||||
export PATH="$PATH:/usr/lib/llvm14/bin"
|
||||
|
||||
# problematic depend install
|
||||
HOME="$_cabal_home" cabal update
|
||||
}
|
||||
|
||||
build() {
|
||||
# ghc version path
|
||||
export PATH="$PATH:/usr/lib/llvm14/bin"
|
||||
|
||||
msg "Building git-annex-$pkgver"
|
||||
HOME="$_cabal_home" cabal update
|
||||
HOME="$_cabal_home" cabal v1-install \
|
||||
--only-dependencies \
|
||||
--allow-newer=feed:base-compat \
|
||||
$_feature_flags
|
||||
HOME="$_cabal_home" cabal v1-configure $_feature_flags
|
||||
HOME="$_cabal_home" cabal v1-build -j
|
||||
mv dist/build/git-annex/git-annex .
|
||||
ln -s git-annex git-annex-shell
|
||||
}
|
||||
|
||||
check() {
|
||||
"$builddir"/git-annex test
|
||||
}
|
||||
|
||||
package() {
|
||||
HOME="$_cabal_home" make DESTDIR="$pkgdir" install
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
aa30fb5ccf140d90242528e19bc4a9d07c7a5de658cd3b1ff3ae666165f1a039bf22bc1a6aa7394128b495f60eb1c91472e42f32edb53b4b18f9ef81b730039b git-annex-10.20231129.tar.gz
|
||||
8e3307300fa5be81c51031d0b5376518627e0c11abf4b879a47dfae98a5bc4f7ef3d45f82ca95e03ed7e91786c8e502700c22f7fe54f40e9b6f1f3b8f4e13815 git-annex-10.20231129-edge.config
|
||||
9300f883746d8726f47be6d194b5ac9550e2894669097f3202eca944221665bd3087a81b3f97b21f013eccaa6b5b1fb050e253ac18999c136db20056fadf2ed8 fix-makefile.patch
|
||||
"
|
|
@ -1,24 +0,0 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index 5688430..54fe3c8 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -87,16 +87,16 @@ install-docs: docs install-mans
|
||||
rsync -a --delete html/ $(DESTDIR)$(PREFIX)/$(SHAREDIR)/doc/git-annex/html/; \
|
||||
fi
|
||||
|
||||
-install-bins: build
|
||||
+install-bins:
|
||||
install -d $(DESTDIR)$(PREFIX)/bin
|
||||
install git-annex $(DESTDIR)$(PREFIX)/bin
|
||||
ln -sf git-annex $(DESTDIR)$(PREFIX)/bin/git-annex-shell
|
||||
ln -sf git-annex $(DESTDIR)$(PREFIX)/bin/git-remote-tor-annex
|
||||
|
||||
-install-desktop: build Build/InstallDesktopFile
|
||||
+install-desktop: Build/InstallDesktopFile
|
||||
./Build/InstallDesktopFile $(PREFIX)/bin/git-annex || true
|
||||
|
||||
-install-completions: build
|
||||
+install-completions:
|
||||
install -d $(DESTDIR)$(PREFIX)/$(SHAREDIR)/bash-completion/completions
|
||||
install -m 0644 bash-completion.bash $(DESTDIR)$(PREFIX)/$(SHAREDIR)/bash-completion/completions/git-annex
|
||||
install -d $(DESTDIR)$(ZSH_COMPLETIONS_PATH)
|
|
@ -1,130 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=powershell
|
||||
pkgver=7.3.9
|
||||
pkgrel=0
|
||||
pkgdesc="A cross-platform automation and configuration tool/framework"
|
||||
arch="x86_64 aarch64 armv7" # blocked by dotnet runtime
|
||||
url="https://github.com/PowerShell/PowerShell"
|
||||
license="MIT"
|
||||
depends="
|
||||
dotnet7-runtime
|
||||
libpsl-native
|
||||
"
|
||||
makedepends="
|
||||
dotnet7-sdk
|
||||
git
|
||||
"
|
||||
source="
|
||||
$pkgname-$pkgver.tar.gz::https://github.com/PowerShell/PowerShell/archive/v$pkgver.tar.gz
|
||||
dependency-gatherer.targets
|
||||
fix-filesystem-test.patch
|
||||
update-sdk-test-ppc64le.patch
|
||||
"
|
||||
builddir="$srcdir/PowerShell-$pkgver"
|
||||
# if true, then within pipeline environment, in which case send logs there
|
||||
# to be scooped
|
||||
if [ -d "$APORTSDIR/logs" ]; then
|
||||
_logdir="$APORTSDIR"/logs
|
||||
else
|
||||
_logdir="$srcdir"/logs
|
||||
fi
|
||||
|
||||
# mono-flavored runtime does not support crossgen2
|
||||
case $CARCH in
|
||||
armhf|s390x|ppc64le) _use_crossgen2=false;;
|
||||
esac
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
# build expects to be in git directory
|
||||
git init
|
||||
git config user.name "example"
|
||||
git config user.email "example@example.com"
|
||||
git add ./*
|
||||
git commit -m 'Initial'
|
||||
git tag -a "v$pkgver" -m "Initial"
|
||||
rm "global.json"
|
||||
mkdir -p "$_logdir"
|
||||
}
|
||||
|
||||
build() {
|
||||
msg "Building $pkgname"
|
||||
# change nuget cache
|
||||
export NUGET_PACKAGES="$srcdir"/nuget_cache
|
||||
|
||||
# Restore
|
||||
dotnet restore src/powershell-unix
|
||||
dotnet restore src/ResGen
|
||||
dotnet restore src/TypeCatalogGen
|
||||
|
||||
# Setup the build target to gather dependency information
|
||||
cp "$srcdir/dependency-gatherer.targets" \
|
||||
"src/Microsoft.PowerShell.SDK/obj/Microsoft.PowerShell.SDK.csproj.TypeCatalog.targets"
|
||||
dotnet msbuild src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj \
|
||||
/t:_GetDependencies \
|
||||
"/property:DesignTimeBuild=true;_DependencyFile=$PWD/src/TypeCatalogGen/powershell.inc" \
|
||||
/nologo
|
||||
|
||||
# Generate 'powershell.version'
|
||||
echo "v$pkgver" > powershell.version
|
||||
|
||||
# Generate resource binding C# files
|
||||
cd "$builddir"/src/ResGen
|
||||
dotnet run
|
||||
|
||||
# Generate 'CorePsTypeCatalog.cs'
|
||||
cd "$builddir"/src/TypeCatalogGen
|
||||
dotnet run ../System.Management.Automation/CoreCLR/CorePsTypeCatalog.cs powershell.inc
|
||||
|
||||
# Build powershell core
|
||||
cd "$builddir"
|
||||
|
||||
dotnet build-server shutdown
|
||||
dotnet publish --configuration Linux "src/powershell-unix/" \
|
||||
--output bin \
|
||||
--no-self-contained \
|
||||
--runtime "$(dotnet --info | awk '$1=="RID:"{print $2}')" \
|
||||
-p:PublishReadyToRun=$_use_crossgen2 \
|
||||
/bl:"$_logdir"/powershell-build.binlog \
|
||||
/consoleLoggerParameters:ShowTimestamp
|
||||
}
|
||||
|
||||
check() {
|
||||
msg "Checking $pkgname"
|
||||
cd "$builddir"/test/xUnit
|
||||
dotnet build-server shutdown
|
||||
dotnet test \
|
||||
-c Release \
|
||||
--runtime "$(dotnet --info | awk '$1=="RID:"{print $2}')" \
|
||||
-p:PublishReadyToRun=$_use_crossgen2 \
|
||||
/bl:"$_logdir"/powershell-check.binlog \
|
||||
/consoleLoggerParameters:ShowTimestamp
|
||||
}
|
||||
|
||||
package() {
|
||||
# directory creation
|
||||
install -dm 755 \
|
||||
"$pkgdir"/usr/lib \
|
||||
"$pkgdir"/usr/bin
|
||||
|
||||
# libary copy
|
||||
cp -ar "$builddir"/src/powershell-unix/bin/Linux/*/alpine* "$pkgdir"/usr/lib/$pkgname
|
||||
|
||||
# already provided by 'libpsl-native' aport
|
||||
rm -f "$pkgdir"/usr/lib/$pkgname/libpsl-native.so
|
||||
|
||||
# does not build for linux-musl, thus points to libc.so rather than musl
|
||||
# see https://github.com/dotnet/runtime/issues/63187
|
||||
rm -f "$pkgdir"/usr/lib/$pkgname/libSystem.IO.Ports.Native.so
|
||||
|
||||
# binary link
|
||||
ln -s "/usr/lib/$pkgname/pwsh" "$pkgdir"/usr/bin/pwsh
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
8d17899925b037e1c7a9a6a77a8a6fd15b9f1418ab6342854f7452614c4c2cecb98710fb5e30c52334493d54e53164b60182c60b07a0937ed232c798fa888588 powershell-7.3.9.tar.gz
|
||||
e9c4aeebd4fead1542b2c48c70134efcdb6c573273d8d05b1f8a2ece070e26899876b30264749992beac3044059716ca8c07b3bf970a419e525057c422f843c6 dependency-gatherer.targets
|
||||
0e7550d8b702eeb9ebbd42100b32cbf7a0be676c5922cd6ee03ecdd3ba11d20d42a468f73ee428c6c92c8b7b18f9b022591a368191c2a358034ba4d7e78d2b84 fix-filesystem-test.patch
|
||||
1aa10d32a37da0e7fd9d587105833d0a7ed9b71701018259d3efa2be90977808eb54a7d3e2d8bf03b693eeeac469f2e9ee88aa93006b7a2c22ae4720a8f62561 update-sdk-test-ppc64le.patch
|
||||
"
|
|
@ -1,9 +0,0 @@
|
|||
<Project>
|
||||
<Target Name="_GetDependencies"
|
||||
DependsOnTargets="ResolveAssemblyReferencesDesignTime">
|
||||
<ItemGroup>
|
||||
<_RefAssemblyPath Include="%(_ReferencesFromRAR.HintPath)%3B" Condition=" '%(_ReferencesFromRAR.NuGetPackageId)' != 'Microsoft.Management.Infrastructure' "/>
|
||||
</ItemGroup>
|
||||
<WriteLinesToFile File="$(_DependencyFile)" Lines="@(_RefAssemblyPath)" Overwrite="true" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,40 +0,0 @@
|
|||
From 04b0c8b1274918015c91f609cd63fdda6099ab95 Mon Sep 17 00:00:00 2001
|
||||
Patch-Source: https://github.com/PowerShell/PowerShell/issues/17889
|
||||
From: Antoine Martin <dev@ayakael.net>
|
||||
Date: Tue, 26 Jul 2022 20:34:30 -0400
|
||||
Subject: [PATCH 1/1] Neutralize PSTests.Parallel.FileSystemProviderTests.TestMode
|
||||
|
||||
PSTests.Parallel.FileSystemProviderTests.TestMode prints error:
|
||||
[xUnit.net 00:00:06.26] PSTests.Parallel.FileSystemProviderTests.TestMode [FAIL]
|
||||
Failed PSTests.Parallel.FileSystemProviderTests.TestMode [5 ms]
|
||||
Error Message:
|
||||
Assert.Equal() Failure
|
||||
↓ (pos 0)
|
||||
Expected: -----
|
||||
Actual: l----
|
||||
↑ (pos 0)
|
||||
Stack Trace:
|
||||
at PSTests.Parallel.FileSystemProviderTests.TestMode() in /home/user/projects/powershell/testing/powershell/src/PowerShell-7.2.5/test/xUnit/csharp/test_FileSystemProvider.cs:line 123
|
||||
|
||||
This patch fixes this failed test by pointing the to-be-tested file to
|
||||
/bin/busybox rather than /bin/echo, as the latter is a symbolic link
|
||||
|
||||
---
|
||||
test/xUnit/csharp/test_FileSystemProvider.cs | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/test/xUnit/csharp/test_FileSystemProvider.cs b/test/xUnit/csharp/test_FileSystemProvider.cs
|
||||
index 85ab0b2ee..160862146 100644
|
||||
--- a/test/xUnit/csharp/test_FileSystemProvider.cs
|
||||
+++ b/test/xUnit/csharp/test_FileSystemProvider.cs
|
||||
@@ -109,7 +109,7 @@ namespace PSTests.Parallel
|
||||
{
|
||||
directoryObject = new DirectoryInfo(@"/");
|
||||
fileObject = new FileInfo(@"/etc/hosts");
|
||||
- executableObject = new FileInfo(@"/bin/echo");
|
||||
+ executableObject = new FileInfo(@"/bin/busybox");
|
||||
}
|
||||
else
|
||||
{
|
||||
--
|
||||
2.36.2
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/test/xUnit/xUnit.tests.csproj.orig b/test/xUnit/xUnit.tests.csproj
|
||||
index 2dff043..8a28dc0 100644
|
||||
--- a/test/xUnit/xUnit.tests.csproj.orig
|
||||
+++ b/test/xUnit/xUnit.tests.csproj
|
||||
@@ -28,7 +28,7 @@
|
||||
<PackageReference Include="Xunit.SkippableFact" Version="1.4.13" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
|
||||
<PackageReference Include="XunitXml.TestLogger" Version="3.0.78" />
|
||||
- <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.3" />
|
||||
+ <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
|
@ -1,35 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
pkgname=yadm
|
||||
pkgver=3.2.2
|
||||
pkgrel=1
|
||||
pkgdesc="Yet Another Dotfiles Manager"
|
||||
arch="noarch"
|
||||
url="https://github.com/TheLocehiliosan/yadm"
|
||||
license="GPL-3.0-only"
|
||||
depends="
|
||||
bash
|
||||
git
|
||||
gawk
|
||||
"
|
||||
options="!check" # No testsuite
|
||||
subpackages="
|
||||
$pkgname-bash-completion
|
||||
$pkgname-doc
|
||||
$pkgname-fish-completion
|
||||
$pkgname-zsh-completion
|
||||
"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/TheLocehiliosan/yadm/archive/$pkgver.tar.gz"
|
||||
|
||||
package() {
|
||||
install -vDm755 yadm -t "$pkgdir/usr/bin"
|
||||
install -vDm644 yadm.1 -t "$pkgdir/usr/share/man/man1"
|
||||
install -vDm644 completion/bash/yadm -t "$pkgdir/usr/share/bash-completion/completions"
|
||||
install -vDm644 completion/zsh/_yadm -t "$pkgdir/usr/share/zsh/site-functions"
|
||||
install -vDm644 completion/fish/yadm.fish -t "$pkgdir/usr/share/fish/vendor_completions.d"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
c61da3f644c2f587079fd717d4ef566861f20224f287906ef5b6d07169bc5f02aef7974afd8d4441267a92417a4fd0c7edda562b8f0cf2fc104c91fc0f5f85ff yadm-3.2.2.tar.gz
|
||||
"
|
|
@ -1,45 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
pkgname=hsxkpasswd
|
||||
pkgver=3.6
|
||||
pkgrel=0
|
||||
pkgdesc="Generate secure, memorable passwords inspired by XKCD and Password Haystacks"
|
||||
#arch="noarch"
|
||||
# needs updating with new depends
|
||||
url="https://www.bartbusschots.ie/s/publications/software/xkpasswd/"
|
||||
license="BSD-2-Clause"
|
||||
depends="
|
||||
perl
|
||||
perl-clone
|
||||
perl-datetime
|
||||
perl-file-homedir
|
||||
perl-file-share
|
||||
perl-json
|
||||
perl-list-moreutils
|
||||
perl-math-round
|
||||
perl-readonly
|
||||
perl-text-unidecode
|
||||
perl-type-tiny
|
||||
"
|
||||
makedepends="perl-module-build"
|
||||
subpackages="$pkgname-doc"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/bbusschots/hsxkpasswd/archive/v$pkgver.tar.gz"
|
||||
|
||||
build() {
|
||||
PERL_MM_USE_DEFAULT=1 MODULEBUILDRC=/dev/null perl ./Build.PL
|
||||
./Build
|
||||
}
|
||||
|
||||
check() {
|
||||
PERL_MM_USE_DEFAULT=1 ./Build test
|
||||
}
|
||||
|
||||
package() {
|
||||
./Build install --installdirs=vendor --destdir="$pkgdir"
|
||||
find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
b93f3e8a209152def43040d05f27ed404ff7d596f69f831d1666cbd1dcb06907558b0e9ab9b256cfa25aa528fc92e13b816a0b8d476f4334a53f69b44612708f hsxkpasswd-3.6.tar.gz
|
||||
"
|
|
@ -1,46 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
pkgname=ikiwiki
|
||||
pkgver=3.20200202.3
|
||||
pkgrel=0
|
||||
pkgdesc="Ikiwiki is a wiki compiler. It converts wiki pages into HTML pages suitable for publishing on a website."
|
||||
arch="noarch"
|
||||
license="GPL-2.0-later"
|
||||
url="https://ikiwiki.info"
|
||||
depends="
|
||||
perl-yaml
|
||||
perl-text-markdown
|
||||
perl-cgi-session
|
||||
perl-cgi-formbuilder
|
||||
perl-timedate
|
||||
perl-html-parser
|
||||
perl-html-scrubber
|
||||
perl-mail-sendmail
|
||||
perl-time-duration
|
||||
perl-uri
|
||||
perl-html-template
|
||||
perl-locale-gettext
|
||||
perl-rpc-xml
|
||||
perl-yaml-libyaml
|
||||
"
|
||||
source="https://git.joeyh.name/index.cgi/ikiwiki.git/snapshot/ikiwiki-$pkgver.tar.gz"
|
||||
subpackages="$pkgname-doc"
|
||||
|
||||
build() {
|
||||
# Install module into the vendor directories
|
||||
sed -i -e 's/sbin/bin/g' Makefile.PL
|
||||
|
||||
perl Makefile.PL PREFIX="/usr" INSTALL_BASE= INSTALLDIRS=vendor
|
||||
make PREFIX="/usr"
|
||||
}
|
||||
|
||||
package() {
|
||||
make install DESTDIR="$pkgdir"
|
||||
|
||||
# otherwise perl breaks
|
||||
find "$pkgdir" \( -name '.packlist' -or -name '*.pod' \) -exec rm '{}' +
|
||||
}
|
||||
sha512sums="
|
||||
2d78b98f0f24823e29566b6abc20e09abee45da684adff4dcb708ae3c127adea08cb56c68429b94613b36410bc88a3ce27f718e82f4344a533307d3846f64572 ikiwiki-3.20200202.3.tar.gz
|
||||
"
|
|
@ -1,37 +0,0 @@
|
|||
# Automatically generated by apkbuild-cpan, template 3
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=perl-file-share
|
||||
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
|
||||
_pkgreal=File-Share
|
||||
pkgver=0.27
|
||||
pkgrel=1
|
||||
pkgdesc="Extend File::ShareDir to Local Libraries"
|
||||
url="https://metacpan.org/release/File-Share/"
|
||||
arch="noarch"
|
||||
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
|
||||
depends="perl perl-file-sharedir perl-readonly"
|
||||
makedepends="perl-dev"
|
||||
subpackages="$pkgname-doc"
|
||||
source="https://cpan.metacpan.org/authors/id/I/IN/INGY/File-Share-$pkgver.tar.gz"
|
||||
builddir="$srcdir/$_pkgreal-$pkgver"
|
||||
|
||||
build() {
|
||||
export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
|
||||
PERL_MM_USE_DEFAULT=1 perl -I. Makefile.PL INSTALLDIRS=vendor
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
|
||||
make test
|
||||
}
|
||||
|
||||
package() {
|
||||
make DESTDIR="$pkgdir" install
|
||||
find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
7c321de08e49f252e8e2126da00ea05ced13db362de758a693ee7f40452827fbf2591fb9e6c80caa27bb8767b3596893fc8762993a167583a0b40091e5db5ec7 File-Share-0.27.tar.gz
|
||||
"
|
|
@ -1,41 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
pkgname=py3-aenum
|
||||
_pyname=aenum
|
||||
pkgver=3.1.15
|
||||
pkgrel=0
|
||||
pkgdesc="Advanced Enumerations for Python"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
arch="noarch"
|
||||
depends="python3"
|
||||
makedepends="
|
||||
py3-setuptools
|
||||
py3-gpep517
|
||||
py3-wheel
|
||||
py3-installer
|
||||
"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
options="!check" # Failing test unit
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir .dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
check() {
|
||||
pytest -v
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
.dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
3bee86fbe5e4dacf0109f3fb7e7eec069addea7dc8e4516be3eb643315e38d5eb3a23f347ac8c6bde65e294e4f237cc830109c30a5a6c1b3d9c85dc68067dbf3 py3-aenum-3.1.15.tar.gz
|
||||
"
|
|
@ -1,44 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=backports_abc
|
||||
pkgname=py3-backports-abc
|
||||
pkgver=0.5
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="A backport of recent additions to the 'collections.abc' module."
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
makedepends="
|
||||
py3-setuptools
|
||||
py3-gpep517
|
||||
py3-installer
|
||||
py3-wheel
|
||||
python3-dev
|
||||
"
|
||||
checkdepends="
|
||||
py3-pytest
|
||||
"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver \
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
check() {
|
||||
python3 ./tests.py
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
5c2bc01bce8d3ed482bf5d8361a20f9afa3edc1c50280f0a01ffb890690b92296fcbfa68f79677fc3ebba851617f339cb6367ccdd0fadf1127a4e3c030784b7d py3-backports-abc-0.5.tar.gz
|
||||
"
|
|
@ -1,35 +0,0 @@
|
|||
# Contributor: psykose <alice@ayaya.dev>
|
||||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=py3-click-didyoumean
|
||||
pkgver=0.3.0
|
||||
pkgrel=3
|
||||
pkgdesc="Git-like did-you-mean feature in click"
|
||||
url="https://github.com/click-contrib/click-didyoumean"
|
||||
arch="noarch"
|
||||
license="MIT"
|
||||
depends="python3 py3-click"
|
||||
makedepends="py3-gpep517 py3-poetry-core"
|
||||
checkdepends="py3-pytest"
|
||||
subpackages="$pkgname-pyc"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/click-contrib/click-didyoumean/archive/refs/tags/v$pkgver.tar.gz"
|
||||
builddir="$srcdir/click-didyoumean-$pkgver"
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir .dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH=src \
|
||||
pytest
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
.dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
4927ee392f27950c3f7ef5e0f1d5a5e2421172f3e9d34ec76986c9c7ea698cfa1981678a06fb8682577d6ed04c242c42bdd1d796d7623a1c99dfdbdb61c80fca py3-click-didyoumean-0.3.0.tar.gz
|
||||
"
|
|
@ -1,35 +0,0 @@
|
|||
# Contributor: psykose <alice@ayaya.dev>
|
||||
# Maintainer: Antoien Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=py3-click-repl
|
||||
pkgver=0.3.0
|
||||
pkgrel=2
|
||||
pkgdesc="Subcommand REPL for click apps"
|
||||
url="https://github.com/click-contrib/click-repl"
|
||||
arch="noarch"
|
||||
license="MIT"
|
||||
depends="python3 py3-click py3-prompt_toolkit"
|
||||
makedepends="py3-gpep517 py3-setuptools py3-wheel"
|
||||
checkdepends="py3-pytest py3-pytest-cov"
|
||||
subpackages="$pkgname-pyc"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/click-contrib/click-repl/archive/refs/tags/$pkgver.tar.gz"
|
||||
builddir="$srcdir/click-repl-$pkgver"
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir .dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH=. \
|
||||
pytest
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
.dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
4135cfd4a0b041d9e6446b4c938bb5863d851703f47f204cd78fc9e5ae6b7fd71215abbf08863d9a5cdb664f92df5fca2380a6efa7ddeb67dd6c9b1d4f210f65 py3-click-repl-0.3.0.tar.gz
|
||||
"
|
|
@ -1,47 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=concurrent-log-handler
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=0.9.24
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="The lightning-fast ASGI server"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="Apache-2.0"
|
||||
depends="
|
||||
py3-portalocker
|
||||
"
|
||||
makedepends="
|
||||
py3-setuptools
|
||||
py3-installer
|
||||
py3-gpep517
|
||||
py3-wheel
|
||||
"
|
||||
checkdepends="
|
||||
py3-pytest
|
||||
py3-stresstest
|
||||
"
|
||||
options="!check" # Missing depend stresstest
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$builddir" pytest
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
370003f3c3778f99ba85f8d1fa8331eeee39f76f7ecc6f30ce2cb809790a80cc288005098bbb1b4e737957f08e29b7dbec055bcd685ae50611f909b6c74f8d78 py3-concurrent-log-handler-0.9.24.tar.gz
|
||||
"
|
|
@ -1,45 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=dacite
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=1.8.1
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="This module simplifies creation of data classes (PEP 557) from dictionaries."
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
makedepends="
|
||||
py3-setuptools
|
||||
py3-gpep517
|
||||
py3-installer
|
||||
py3-wheel
|
||||
"
|
||||
checkdepends="
|
||||
py3-pytest
|
||||
py3-pytest-benchmark
|
||||
py3-pytest-cov
|
||||
py3-coveralls
|
||||
"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/konradhalas/dacite/archive/refs/tags/v$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
check() {
|
||||
pytest -v
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
4b40c0bdcf5490bcc77de9e7f04b7267642bcfd41e4168607a5457f38abe3ad4b3041d8a23cb43af76de14eabee45f900ad5ddf7af8f70a2be4850bccc2d3af1 py3-dacite-1.8.1.tar.gz
|
||||
"
|
|
@ -1,50 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
pkgname=py3-django-allauth
|
||||
_pyname="django-allauth"
|
||||
pkgver=0.58.2
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="Integrated set of Django applications addressing SSO"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
depends="
|
||||
py3-django
|
||||
py3-openid
|
||||
py3-requests
|
||||
py3-requests-oauthlib
|
||||
py3-jwt
|
||||
py3-cryptography
|
||||
"
|
||||
makedepends="
|
||||
py3-setuptools
|
||||
py3-build
|
||||
py3-installer
|
||||
py3-wheel
|
||||
"
|
||||
checkdepends="
|
||||
py3-qrcode
|
||||
py3-pytest
|
||||
py3-pytest-django
|
||||
py3-onelogin
|
||||
"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/pennersr/$_pyname/archive/$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
options="!check" # Failing test unit
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
python3 -m build --wheel --skip-dependency-check --no-isolation
|
||||
}
|
||||
|
||||
check() {
|
||||
python3 manage.py test allauth
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer --destdir="$pkgdir" dist/*.whl
|
||||
}
|
||||
sha512sums="
|
||||
33793619f5d1fd424d215ed16b67a8215a2a5875e54ece7163dc5250e6b03fd3c6e671669fc16b3d255b0844d235fa57409cb280410cbbc87231c1f2daf112ad py3-django-allauth-0.58.2.tar.gz
|
||||
"
|
|
@ -1,54 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
pkgname=py3-django-celery-results
|
||||
_pyname="django_celery_results"
|
||||
pkgver=2.5.1
|
||||
pkgrel=0
|
||||
arch="noarch !s390x" # Missing py3-celery depend
|
||||
pkgdesc="Celery result backends for Django."
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="BSD-3-Clause"
|
||||
depends="
|
||||
py3-django
|
||||
py3-celery
|
||||
"
|
||||
makedepends="
|
||||
py3-setuptools
|
||||
py3-gpep517
|
||||
py3-wheel
|
||||
py3-installer
|
||||
"
|
||||
checkdepends="
|
||||
py3-pytest
|
||||
py3-pytest-django
|
||||
py3-pytest-benchmark
|
||||
py3-pytest-cov
|
||||
py3-pytz
|
||||
py3-psycopg2
|
||||
py3-pyscopg
|
||||
py3-case
|
||||
"
|
||||
options="!check" # Broken testsuite
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
check() {
|
||||
python3 manage.py test
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
2da39098a36847ab171a0758b37daafd0a7e17c905b599efebb582226a7adce5f1b5b941bd59db29e5d502d896f8474d2b9771454ef409cdef03b952f0a42526 py3-django-celery-results-2.5.1.tar.gz
|
||||
"
|
|
@ -1,49 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
pkgname=py3-django-channels-redis
|
||||
_pyname="channels_redis"
|
||||
pkgver=4.1.0
|
||||
pkgrel=0
|
||||
arch='noarch'
|
||||
pkgdesc="Redis-backed ASGI channel layer implementation"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="BSD-3-Clause"
|
||||
depends="
|
||||
py3-django-channels
|
||||
py3-asgiref
|
||||
py3-redis
|
||||
py3-msgpack
|
||||
py3-cryptography
|
||||
"
|
||||
checkdepends="
|
||||
py3-async-timeout
|
||||
py3-pytest
|
||||
py3-pytest-timeout
|
||||
py3-pytest-asyncio
|
||||
"
|
||||
makedepends="
|
||||
py3-setuptools
|
||||
py3-gpep517
|
||||
py3-installer
|
||||
py3-wheel
|
||||
"
|
||||
options="!check" # No testsuite
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
558ccdb36cad7cb4d97fdc41ed25cfebbc8b381c867ad0b8704dfde8e6d754a4e53a79726260a748b70f906750702c0226774a8574e09bd6933b6ab797ce29df py3-django-channels-redis-4.1.0.tar.gz
|
||||
"
|
|
@ -1,41 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
pkgname=py3-django-channels
|
||||
_pyname="channels"
|
||||
pkgver=4.0.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="Developer-friendly asynchrony for Django"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="BSD-3-Clause"
|
||||
depends="
|
||||
py3-django
|
||||
py3-asgiref
|
||||
py3-daphne
|
||||
"
|
||||
makedepends="
|
||||
py3-setuptools
|
||||
py3-gpep517
|
||||
py3-installer
|
||||
py3-wheel
|
||||
"
|
||||
options="!check" # No testsuite
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
903d7e8cc95de8d2754afc665dac828cc9ee19f0938f4908a16e40b5b0e18c62bf45380311c0cc318f106e2ba4997bb5784e31c85914779bd76f69473e4636f5 py3-django-channels-4.0.0.tar.gz
|
||||
"
|
|
@ -1,47 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
pkgname=py3-django-compression-middleware
|
||||
_pyname="django-compression-middleware"
|
||||
pkgver=0.5.0
|
||||
pkgrel=0
|
||||
arch="noarch !s390x !armhf" # Missing checkdepends on s390x and armhf
|
||||
pkgdesc="Django middleware to compress responses using several algorithms."
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MPL-2.0"
|
||||
depends="
|
||||
py3-django
|
||||
"
|
||||
makedepends="
|
||||
py3-setuptools
|
||||
py3-gpep517
|
||||
py3-installer
|
||||
py3-wheel
|
||||
"
|
||||
checkdepends="
|
||||
py3-pytest
|
||||
py3-zstandard
|
||||
py3-brotli
|
||||
"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
check() {
|
||||
pytest -v
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
070e7f19daf4811188e12b657b0dd53069b851a9c5f315d44aec87b92ccdc4d053c0a64fede2a40702963f86286b3bbbebe69722ac1b720febf93d0870d2f50e py3-django-compression-middleware-0.5.0.tar.gz
|
||||
"
|
|
@ -1,57 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=drf-spectacular
|
||||
pkgname="py3-django-$_pyname"
|
||||
pkgver=0.26.5
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="Sane and flexible OpenAPI 3 schema generation for Django REST framework"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="BSD-3-Clause"
|
||||
depends="
|
||||
py3-django-rest-framework
|
||||
py3-jsonschema
|
||||
py3-uritemplate
|
||||
py3-yaml
|
||||
py3-inflection
|
||||
py3-django-oauth-toolkit
|
||||
py3-jwcrypto
|
||||
"
|
||||
makedepends="
|
||||
py3-setuptools
|
||||
py3-gpep517
|
||||
py3-wheel
|
||||
py3-installer
|
||||
"
|
||||
checkdepends="
|
||||
py3-pytest
|
||||
py3-pytest-django
|
||||
py3-pytest-cov
|
||||
py3-flake8
|
||||
py3-mypy
|
||||
py3-isort
|
||||
"
|
||||
options="!check" # Failing test units
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
check() {
|
||||
pytest -v
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
a346652a142f43574e31d9f8497ebd831cb0fdc58c67c931eae3aebd298ef05dfa88c83e9965174806ad0326d2bd2f13f5e21ee5c3f524f4a93fccc35460792d py3-django-drf-spectacular-0.26.5.tar.gz
|
||||
"
|
|
@ -1,42 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=django-environ
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=0.11.2
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="A package that allows you to utilize 12factor inspired environment variables to configure your Django application."
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
depends="
|
||||
py3-django
|
||||
"
|
||||
makedepends="
|
||||
py3-build
|
||||
py3-installer
|
||||
py3-setuptools
|
||||
py3-wheel
|
||||
"
|
||||
checkdepends="
|
||||
py3-pytest
|
||||
"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
python3 -m build --wheel --no-isolation
|
||||
}
|
||||
|
||||
check() {
|
||||
pytest -v
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d="$pkgdir" \
|
||||
dist/*.whl
|
||||
}
|
||||
sha512sums="
|
||||
d024858514b2a6edd99a7a2f1ae26e9e7cc007b1454a1c3f2cd2ae061b4e961f16c4acc8c77ee6449e4b11b3d98c72aae849e337339cb5e275b85077a02b59d0 py3-django-environ-0.11.2.tar.gz
|
||||
"
|
|
@ -1,48 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
pkgname=py3-django-extensions
|
||||
_pyname="django-extensions"
|
||||
pkgver=3.2.3
|
||||
pkgrel=1
|
||||
arch="noarch"
|
||||
pkgdesc="A collection of custom extensions for the Django Framework"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
depends="
|
||||
python3
|
||||
py3-django
|
||||
"
|
||||
makedepends="
|
||||
py3-setuptools
|
||||
py3-wheel
|
||||
py3-gpep517
|
||||
py3-installer
|
||||
"
|
||||
checkdepends="
|
||||
py3-pytest
|
||||
py3-shortuuid
|
||||
"
|
||||
options="!check" # Missing shortuuid depend
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
check() {
|
||||
pytest -v
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
b4c575c200a9d0903db34038fd52877dfe2581d4b5c9f98ee0ef191bf4f2c615ba3cd11277a5b6621b4ccba4d3a27286fb3e08fac216d3ee48417583134e899f py3-django-extensions-3.2.3.tar.gz
|
||||
"
|
|
@ -1,48 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=django-guardian
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=2.4.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="Implementation of per object permissions on top of Django’s authorization backend"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
depends="
|
||||
py3-django
|
||||
py3-django-environ
|
||||
"
|
||||
makedepends="
|
||||
py3-setuptools
|
||||
py3-wheel
|
||||
py3-gpep517
|
||||
py3-installer
|
||||
"
|
||||
checkdepends="
|
||||
py3-pytest
|
||||
py3-pytest-django
|
||||
"
|
||||
subpackages="$pkgname-doc"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
check() {
|
||||
pytest -v
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
7e65a27fbb485a047dd02466b7e36daceb4a27b5ff30ec035fa37b7d300e78e43de213606e54d0b1be2e64ae8835a55cef98788ae45ec2446e502fdd312d8ed6 py3-django-guardian-2.4.0.tar.gz
|
||||
"
|
|
@ -1,45 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
pkgname=py3-django-otp
|
||||
_pyname=django_otp
|
||||
pkgver=1.3.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="A pluggable framework for adding two-factor authentication to Django using one-time passwords."
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="BSD-2-Clause"
|
||||
depends="
|
||||
py3-django
|
||||
py3-qrcode
|
||||
"
|
||||
makedepends="
|
||||
py3-build
|
||||
py3-installer
|
||||
py3-hatchling
|
||||
"
|
||||
checkdepends="
|
||||
py3-freezegun
|
||||
"
|
||||
options="!check" # Can't find module for some reason
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
python3 -m build --wheel --no-isolation
|
||||
}
|
||||
|
||||
check() {
|
||||
DJANGO_SETTINGS_MODULE="test_project.settings" \
|
||||
PYTHONPATH="test" \
|
||||
python3 -s -m django test django_otp
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer --destdir="$pkgdir" dist/*.whl
|
||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
sha512sums="
|
||||
ef63c5db096ce7d1b10d6b2a99ab6db46b779d4221f509452921fcbf338decbd5c799aec7476587a03b34288ef3f5ff1964dee72105b65f04a22cbd53d445fa4 py3-django-otp-1.3.0.tar.gz
|
||||
"
|
|
@ -1,39 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
pkgname=py3-django-picklefield
|
||||
_pyname="django-picklefield"
|
||||
pkgver=3.1
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="A pickled object field for Django"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
depends="
|
||||
py3-django
|
||||
"
|
||||
makedepends="
|
||||
py3-setuptools
|
||||
py3-gpep517
|
||||
py3-wheel
|
||||
py3-installer
|
||||
"
|
||||
options="!check" # No testsuite
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
1445a21e60a714cb6ac0cbc71bb44c3a2b51f169621bcc0183c788e70e9eaae2d07949e4b6f7ad4ba5dae99d91a2a7225d897771e4f9fb2230481365ee304b53 py3-django-picklefield-3.1.tar.gz
|
||||
"
|
|
@ -1,50 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=django-prometheus
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=2.3.1
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="Django middlewares to monitor your application with Prometheus.io."
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
depends="
|
||||
py3-django
|
||||
py3-prometheus-client
|
||||
py3-psycopg2
|
||||
py3-mysqlclient
|
||||
py3-memcached
|
||||
py3-django-redis
|
||||
"
|
||||
makedepends="
|
||||
py3-setuptools
|
||||
py3-gpep517
|
||||
py3-installer
|
||||
py3-wheel
|
||||
"
|
||||
checkdepends="
|
||||
py3-pytest
|
||||
"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
check() {
|
||||
pytest -v
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
523cfa7023e1e8921c687bd010a4c6384e1e4142fb702887d1d0bd60194b5111e92e53fec07df89eaea07cd7aa806edef79ab303a67d866d18eacde257db3c03 py3-django-prometheus-2.3.1.tar.gz
|
||||
"
|
|
@ -1,63 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
pkgname=py3-django-q
|
||||
_pyname="django-q"
|
||||
pkgver=1.6.1
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="A multiprocessing distributed task queue for Django"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
depends="
|
||||
py3-asgiref
|
||||
py3-blessed
|
||||
py3-dateutil
|
||||
py3-django
|
||||
py3-django-picklefield
|
||||
py3-django-redis
|
||||
py3-future
|
||||
py3-tz
|
||||
py3-redis
|
||||
py3-six
|
||||
py3-sqlparse
|
||||
py3-wcwidth
|
||||
"
|
||||
makedepends="
|
||||
py3-gpep517
|
||||
py3-installer
|
||||
py3-wheel
|
||||
py3-poetry-core
|
||||
"
|
||||
checkdepends="
|
||||
py3-pytest
|
||||
"
|
||||
# 'python-boto3: Amazon Simple Queue Service message queue support'
|
||||
# 'python-psutil: resource usage limit support'
|
||||
# 'python-pymongo: MongoDB as a message broker support'
|
||||
options="!check" # Missing check depends
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/django-q2/django-q2/archive/refs/tags/v$pkgver.tar.gz
|
||||
build-system.patch
|
||||
"
|
||||
builddir="$srcdir"/django-q2-$pkgver
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$builddir" pytest -v
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
063739b53df5365eb38f01f0506786683059fcab62ec53e5839f19b97974b3b23358c0340166801d95e432abbda60f1fbed6a4e85c0d8f3a7f91046ad877c0fa py3-django-q-1.6.1.tar.gz
|
||||
6c517f2abda689031fe4d62a7a7aa5db4885e1bcaedb575463eb1d065e4e7504ca0548395046d8f5efe2dd9fc7e073fbceb7447019fdde63a34d35894f14057e build-system.patch
|
||||
"
|
|
@ -1,21 +0,0 @@
|
|||
Patch-Source: https://github.com/django-q2/django-q2/pull/131
|
||||
From 2c2594348ebed7194afdda31e1d303f24f68935c Mon Sep 17 00:00:00 2001
|
||||
From: ptrcnull <git@ptrcnull.me>
|
||||
Date: Thu, 19 Oct 2023 17:06:29 +0200
|
||||
Subject: [PATCH] Specify build system in pyproject.toml
|
||||
|
||||
Otherwise, trying to build the project with a tool like gpep517 or build
|
||||
results in using the setuptools legacy backend instead
|
||||
|
||||
diff --git a/pyproject.toml b/pyproject.toml
|
||||
index e785688..8de3163 100644
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -1,3 +1,7 @@
|
||||
+[build-system]
|
||||
+requires = ["poetry-core>=1.0.0"]
|
||||
+build-backend = "poetry.core.masonry.api"
|
||||
+
|
||||
[tool.poetry]
|
||||
name = "django-q2"
|
||||
version = "1.5.4"
|
|
@ -1,47 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=django-redis
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=5.4.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="Full featured redis cache backend for Django."
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="BSD-3-Clause"
|
||||
depends="
|
||||
py3-django
|
||||
"
|
||||
makedepends="
|
||||
py3-setuptools
|
||||
py3-wheel
|
||||
py3-gpep517
|
||||
py3-installer
|
||||
py3-redis
|
||||
"
|
||||
checkdepends="
|
||||
py3-pytest
|
||||
"
|
||||
options="!check" # Missing depends for test
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
check() {
|
||||
PYTHONPATH="$PYTHONPATH/dist" pytest -v
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
12eb85ee3ce2c8fcf013c804a630bd3eb943de0980d1f6d365b5b5ed762ab956db80329f3e170f330ccc5b9e6f178ffa7938b1880477b7fb609d2cc3680b984a py3-django-redis-5.4.0.tar.gz
|
||||
"
|
|
@ -1,44 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=djangorestframework-guardian
|
||||
pkgname=py3-django-rest-framework-guardian
|
||||
pkgver=0.3.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="django-guardian support for Django REST Framework"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
depends="
|
||||
py3-django-rest-framework
|
||||
py3-django-guardian
|
||||
"
|
||||
makedepends="
|
||||
py3-setuptools
|
||||
py3-gpep517
|
||||
py3-wheel
|
||||
py3-installer
|
||||
"
|
||||
options="!check" # Broken testsuite
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/rpkilby/django-rest-framework-guardian/archive/refs/tags/$pkgver.tar.gz"
|
||||
builddir="$srcdir"/django-rest-framework-guardian-$pkgver
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
check() {
|
||||
python3 ./manage.py --no-input -v 2
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
ce196162f42671e6eeb56b17dd432380ff99626dd541b8d2e7e80e4ec7bfc5c884fd3c37652632363173368f9eb1ae0aa82dc25cb1c46ba927f2170d1abbce94 py3-django-rest-framework-guardian-0.3.0.tar.gz
|
||||
"
|
|
@ -1,36 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=dumb-init
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=1.2.5
|
||||
_pkgver=1.2.5.post1
|
||||
pkgrel=0
|
||||
arch="all"
|
||||
pkgdesc="Simple wrapper script which proxies signals to a child"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="MIT"
|
||||
makedepends="
|
||||
py3-setuptools
|
||||
py3-gpep517
|
||||
py3-installer
|
||||
py3-wheel
|
||||
"
|
||||
options="!check" # No testsuite
|
||||
source="$pkgname-$_pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$_pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$_pkgver
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
8527ac64a4219d0bde3612b8153056b44203656aed86b1bd047b4649ee3f7e04e0c0a669841fc2f176875993d61d8d80c980a410bcd92bb8ddc9577b6980fa42 py3-dumb-init-1.2.5.post1.tar.gz
|
||||
"
|
|
@ -1,50 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=duo_client
|
||||
pkgname=py3-duo-client
|
||||
pkgver=5.2.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="Reference client for Duo Security APIs"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="BSD-3-Clause"
|
||||
depends="
|
||||
py3-six
|
||||
"
|
||||
makedepends="
|
||||
py3-setuptools
|
||||
py3-wheel
|
||||
py3-gpep517
|
||||
py3-installer
|
||||
"
|
||||
checkdepends="
|
||||
py3-pytest
|
||||
py3-nose2
|
||||
py3-flake8
|
||||
py3-mock
|
||||
py3-tz
|
||||
py3-freezegun
|
||||
"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/duosecurity/duo_client_python/archive/refs/tags/$pkgver.tar.gz"
|
||||
builddir="$srcdir"/${_pyname}_python-$pkgver
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
check() {
|
||||
pytest -v
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
78729409ccc28c85f1456ea1203404228a4c6b58a8b63ac0b090af9eb515ea36d2ed372338f72ca3da3b864a67d391d0782254670b9448c272c819f2410fe7a2 py3-duo-client-5.2.0.tar.gz
|
||||
"
|
|
@ -1,46 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=facebook-sdk
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=3.1.0
|
||||
pkgrel=0
|
||||
arch="noarch"
|
||||
pkgdesc="Python SDK for Facebook's Graph API"
|
||||
url="https://pypi.python.org/project/$_pyname"
|
||||
license="Apache-2.0"
|
||||
depends="
|
||||
py3-requests
|
||||
"
|
||||
makedepends="
|
||||
py3-setuptools
|
||||
py3-wheel
|
||||
py3-gpep517
|
||||
py3-installer
|
||||
"
|
||||
checkdepends="
|
||||
py3-pytest
|
||||
"
|
||||
options="!check" # Testsuite requires API access
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/mobolic/facebook-sdk/archive/refs/tags/v$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
check() {
|
||||
pytest -v
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
90bb8242107ba37e0b3e05b91f2f8be07b359aa7c60646c1319f38a0ad910eb18b432af75515947109745539a6728b6571ceeb0239e8b94a669455d809cfab59 py3-facebook-sdk-3.1.0.tar.gz
|
||||
"
|
|
@ -1,50 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
_pyname=flower
|
||||
pkgname="py3-$_pyname"
|
||||
pkgver=2.0.1
|
||||
pkgrel=0
|
||||
arch="noarch !s390x" # Missing py3-celery for tests
|
||||
pkgdesc="Real-time monitor and web admin for Celery distributed task queue"
|
||||
url="https://flower.readthedocs.io/"
|
||||
license="BSD-3-Clause"
|
||||
depends="
|
||||
py3-redis
|
||||
py3-humanize
|
||||
py3-prometheus-client
|
||||
py3-click
|
||||
"
|
||||
makedepends="
|
||||
py3-setuptools
|
||||
py3-gpep517
|
||||
py3-wheel
|
||||
py3-installer
|
||||
"
|
||||
checkdepends="
|
||||
py3-pytest
|
||||
py3-tornado
|
||||
py3-celery
|
||||
"
|
||||
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
|
||||
builddir="$srcdir"/$_pyname-$pkgver
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
check() {
|
||||
pytest -v
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
4321962ee9c01f93cc978a17e61e4ec8ed32e9e615a619078b8b758963ff397f72c386f64e625db48265064d1d93598f89945294887f747521450a1dcf4c4bba py3-flower-2.0.1.tar.gz
|
||||
"
|
|
@ -1,40 +0,0 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
pkgname=py3-goodreads
|
||||
_pkgname=goodreads
|
||||
pkgver=0.3.2
|
||||
pkgrel=1
|
||||
pkgdesc="Python wrapper for Goodreads API"
|
||||
url="https://pypi.python.org/pypi/Goodreads"
|
||||
license="MIT"
|
||||
arch="noarch"
|
||||
makedepends="
|
||||
py3-setuptools
|
||||
py3-gpep517
|
||||
py3-wheel
|
||||
py3-installer
|
||||
python3-dev
|
||||
py3-xmltodict
|
||||
py3-requests
|
||||
py3-rauth
|
||||
"
|
||||
source="$_pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/g/$_pkgname/$_pkgname-$pkgver.tar.gz"
|
||||
options="!check" # No testsuite
|
||||
builddir="$srcdir"/$_pkgname-$pkgver
|
||||
subpackages="$pkgname-pyc"
|
||||
|
||||
build() {
|
||||
gpep517 build-wheel \
|
||||
--wheel-dir dist \
|
||||
--output-fd 3 3>&1 >&2
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 -m installer -d "$pkgdir" \
|
||||
dist/*.whl
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
2c1f7be226bbbac3d60247a5dddc06c48ad1d72790e4ce61c8c369100358965926422958563f153661b91b561414e4b573b95098808cc25ac5c7e6edfc46e344 goodreads-0.3.2.tar.gz
|
||||
"
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue