aboutsummaryrefslogtreecommitdiffstats
path: root/community/dotnet6-build/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/dotnet6-build/APKBUILD')
-rw-r--r--community/dotnet6-build/APKBUILD575
1 files changed, 294 insertions, 281 deletions
diff --git a/community/dotnet6-build/APKBUILD b/community/dotnet6-build/APKBUILD
index e5a15b46817..d72c35bd04b 100644
--- a/community/dotnet6-build/APKBUILD
+++ b/community/dotnet6-build/APKBUILD
@@ -1,90 +1,36 @@
-# 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
-
-#
-# Variables for dotnet build version 6.0
-# This APKBUILD is designed to be the same for version 6.0 and up
-# except for the variables in this first section
-#
-
+# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=dotnet6-build
-pkgver=6.0.108
-pkgrel=1
-
-# Tag of tarball generator. This may change from usual due to mistakes from upstream
-_installertag=v$pkgver
-
-# Test suite tags
-_testtag=ddc8576cc4ffccf6b102eed55125b2596336e684
-_turkeytag=71880bd94711519f7b786248a88a827a401207a2
-
-# Tests timeout (in seconds)
-_tests_timeout=600
-# Test suite disable flags
-# following tests can only work after packaging step
-_disabled_tests="man-pages distribution-package bash-completion"
-# we don't care if not latest release and not installed location
-_disabled_tests="$_disabled_tests release-version-sane install-location"
-# test broken: no musl release for omnisharp
-_disabled_tests="$_disabled_tests omnisharp"
-# test broken: permission issue on lxc / pipelines
-_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
-_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
-[ "$CARCH" = "aarch64" ] && _disabled_tests="$_disabled_tests system-libunwind"
-[ "$CARCH" = "armv7" ] && _disabled_tests="$_disabled_tests system-libunwind"
-[ "$CARCH" = "x86_64" ] && _disabled_tests="$_disabled_tests bundled-libunwind"
-# 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
-[ "$CARCH" = "aarch64" ] && _disabled_tests="$_disabled_tests publish-ready-to-run publish-ready-to-run-linux"
-[ "$CARCH" = "armv7" ] && _disabled_tests="$_disabled_tests publish-ready-to-run publish-ready-to-run-linux"
-
-# 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
+pkgver=6.0.129
+pkgrel=0
+# remember to upgrade dotnet6-runtime $_bldver when upgrading dotnet6-build
+_gittag=v$pkgver
+_giturl="https://github.com/dotnet/installer"
+_testtag=4f2372af276898d8acbe92d77af30da86920bbce
+_bunnytag=v15
+_llvmver=16
_patches="
- aspnetcore_musl-build-fix.patch
- build_arm-build.patch
- build_musl-build-fix.patch
- check_rid-alpine-generation.patch
- command-line-api_fix-musl-build.patch
- installer_arm-build.patch
- installer_forgotten-MicrosoftAspNetCoreAppRuntimePac.patch
- installer_musl-build-fix.patch
- installer_portable-runtime-id.patch
- installer_reprodicible-tarball.patch
- runtime_detect-armv8.patch
- runtime_fix-musl-123.patch
- runtime_lld-fix.patch
- runtime_non-portable-distrorid-fix-alpine.patch
- runtime_rid-alpine-317.patch
- runtime_x86-64-use-system-libunwind.patch
- sdk_add-zsh-compdef-completion-script.patch
- sdk_portable-runtime-id.patch
+ 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
"
-# Custom prepare
-default_prepare() {
- return
-}
-
-# Following for dotnet build version 6.0 and up
_pkgver_macro=${pkgver%.*}
_pkgver_prior=${pkgver%.*.*}
_pkgver_name=${_pkgver_macro//[.0]}
pkgdesc="The .NET $_pkgver_macro bootstrap"
arch="x86_64 aarch64 armv7"
-url=https://www.microsoft.com/net/core
+url=https://dotnet.microsoft.com
license="MIT"
# hack for dotnetx-build to be able to pull itself for bootstrapping
provides="dotnet$_pkgver_name-bootstrap"
@@ -105,8 +51,9 @@ checkdepends="
which
"
makedepends="
+ alpine-release
bash
- clang
+ clang$_llvmver
cmake
dotnet$_pkgver_name-bootstrap
dotnet$_pkgver_name-bootstrap-artifacts
@@ -120,22 +67,30 @@ makedepends="
krb5-dev
libgit2-dev
libintl
+ libucontext-dev
libunwind-dev
libxml2-dev
libxml2-utils
linux-headers
- lld-dev
lldb-dev
- llvm-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
+ dotnet$_pkgver_name-artifacts:artifacts:noarch
dotnet$_pkgver_name-sdk
dotnet$_pkgver_name-templates:templates:noarch
dotnet-zsh-completion:zshcomp:noarch
@@ -144,90 +99,95 @@ subpackages="
netstandard21-targeting-pack:netstandard_targeting_pack:noarch
"
source="
- source-build-tarball-$pkgver.tar.gz::https://tarball
- source-build-testssuite-$_testtag.tar.gz::https://github.com/redhat-developer/dotnet-regular-tests/archive/$_testtag.tar.gz
- source-build-turkey-$_turkeytag.tar.gz::https://github.com/redhat-developer/dotnet-bunny/archive/$_turkeytag.tar.gz
+ 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"/source-build-tarball-$pkgver
-_checkdir="$srcdir/dotnet-bunny-${_turkeytag/v}"
+builddir="$srcdir"/dotnet-$_gittag
+
+# 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
+# 6.0.126-r0:
+# - CVE-2024-0056
+# - CVE-2024-0057
+# - CVE-2024-21319
+# 6.0.127-r0:
+# - CVE-2024-21386
+# - CVE-2024-21404
+# 6.0.129-r0:
+# - CVE-2024-21409
+
+_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"
-
-# custom function that converts Alpine arch syntax to dotnet arch syntax
-_get_arch() {
- case $1 in
- x86_64) local arch=x64;;
- aarch64) local arch=arm64;;
- armv7|armhf) local arch=arm;;
- esac
- echo $arch
-}
-_dotnet_arch=$(_get_arch $CARCH)
-
-# Custom patch logics
-_patch() {
- local i failed=
- if ! have_patches; then
- return 0
- fi
- if [ ! -d "$builddir" ]; then
- error "Is \$builddir set correctly?"
- return 1
- fi
-
- msg "Deploying patches"
- for i in $source; do
- case ${i%::*} in
- *.patch)
- local package=${i%%_*}
-
- # checks if patch is arch specific
- unset arch_spec
- for j in ${arch/_/-}; do [ -z "${i##*"$j"*}" ] && local arch_spec=true; done
- # if arch specific, checks if patch is applicable to this exact arch
- if [ -n "${i##*"${CARCH/_/-}"*}" ] && [ "$arch_spec" ]; then continue; fi
-
- msg "Applying $i to $package"
- cd "$builddir"
- case $package in
- check*)cd "$_testdir" || { echo "$_testdir does not exist"; failed=$failed $i; continue; };;
- build*)cd "$builddir";;
- *) cd src/$package || { echo "$package does not exist for patch"; failed=$failed $i; continue; };;
- esac
- patch -Np1 -i "$srcdir/$(filename_from_uri $i)" || failed="$failed $i"
- cd "$builddir"
- ;;
- esac
- done
-
- if [ -z "$failed" ]; then
- return 0
- fi
- error "The following patches failed to apply:"
- for i in $failed; do
- printf " %s\n" "$i"
- done
-}
-
-# dotnet relies on itself when building, we thus need a bootstrap runtime
-# that is copied to write-capable folder
-_prepare_bootstrap() {
- msg "Settings up bootstrap"
-
- _bootstrapdir=$(find $_libdir/dotnet/bootstrap/$_pkgver_macro* -maxdepth 0 | sort -r | head -n 1)
- cp -r "$_bootstrapdir" "$_cli_root"
-
- # Corrupt libcoreclrtraceptprovider.so when lttng <=2.13.0
- # is detected as tracing is broken on dotnet platform
- # due to ABI changes
- # See https://github.com/dotnet/runtime/issues/57784.
- if [ -f "/usr/lib/liblttng-ust.so.1 " ]; then
- rm "$_cli_root"/shared/Microsoft.NETCore.App/*/libcoreclrtraceptprovider.so
- fi
-}
+# 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() {
@@ -255,107 +215,141 @@ _fix_executable() {
-exec chmod -x '{}' \;
}
-# dotnet build is a two step process. The first step involves sourcing the
-# source code to various components, and then the build can proceed as a second
-# step. To be able to assure integrity of sources and permit caching, we want to
-# build a tarball that can be checked with checksum. Following function is
-# executed automatically in fetch() if tarball is not in SRCDEST.
-_build_tarball() {
- deps
- [ -d "$srcdir" ] || { mkdir -p "$srcdir" && cd "$srcdir"; } && cd "$srcdir"
+# generates tarball containing all components built by dotnet
+snapshot() {
+ local _pkg="$srcdir"/${builddir##*/}.tar
- # preparations
- [ -d "installer" ] || { git clone https://github.com/dotnet/installer --branch $_installertag && cd "$srcdir"/installer; } && cd "$srcdir"/installer
- _prepare_bootstrap
+ ulimit -n 4096
+ export NUGET_PACKAGES=$_nugetdir
- # makes tarball reproducible
- patch -Np1 -i "$startdir"/installer_reprodicible-tarball.patch || true
+ 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
- # without these exports, build still attempts a download of dotnet sdk
- export _InitializeDotNetCli="$_cli_root"
- export DOTNET_INSTALL_DIR="$_cli_root"
- export DotNetBuildFromSource=true
+ 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
- # following args activate tarball build
- local args="
- /p:ArcadeBuildTarball=true
- /p:TarballDir=$builddir
- /p:TarballFilePath=$SRCDEST/${builddir##*/}.tar.gz
- "
- ./build.sh $args | tee -a "$srcdir"/installer/build.log
+ 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
- # unsets export so they don't bleed into other steps
- unset _InitializeDotNetCli DOTNET_INSTALL_DIR DotNetBuildFromSource
-}
+ _InitializeDotNetCli="$_cli_root" DOTNET_INSTALL_DIR="$_cli_root" DotNetBuildFromSource=true ./build.sh \
+ /p:ArcadeBuildTarball=true \
+ /p:TarballDir=$builddir \
+ /p:TarballFilePath=$_pkg
-fetch() {
- # Builds tarball if not built
- [ -f "$SRCDEST"/${builddir##*/}.tar.gz ] || _build_tarball
+ msg "Compressing ${builddir##*/}.tar to $SRCDEST"
+ xz -T0 -9 -vv -e -c > "$SRCDEST"/${builddir##*/}.tar.xz < "$_pkg"
- default_fetch
+ cd "$startdir"
+ abuild checksum
}
prepare() {
default_prepare
+ ulimit -n 4096
- _patch
- _prepare_bootstrap
-
- # makes sure Artifacts archive is not expected, else build fails as it
- # expected a file that tells it what artifacts tarball it should unpack
- # As artifacts in Alpine's build process are provided by a package, and
- # installed in a folder, this is pulled using --with-packages
- [ -d "$builddir"/packages/archive ] && rm -r "$builddir"/packages/archive
-
- # readjusts OfficialBuildId back to current date. By default this is not
- # necessary. Unfortunately, by default source tarball isn't reproducible
- # installer_reprodicible-tarball.patch makes it so, but at the cost of
- # setting OfficialBuildId of certain volatile packages to a date in 1990.
- # Thus, to adequately prepare tarball we have to reset git-info build ids
- # to current date, as expected.
- for i in "$builddir"/git-info/*; do
- sed -i "s|<OfficialBuildId>19900101.1</OfficialBuildId>|<OfficialBuildId>$(date +"%Y%m%d.1")</OfficialBuildId>|" "$i"
+ # 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
- _artifactsdir=$(find $_libdir/dotnet/artifacts/$_pkgver_macro* -maxdepth 0 | sort -r | head -n 1)
+ local _artifactsdir=$(find $_libdir/dotnet/artifacts/$_pkgver_macro* -maxdepth 0 | sort -r | head -n 1)
- # logs args, else the output is forwarded to log files which isn't ideal in a
- # pipeline environment
+ # 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
- # Build uses a lot of storage space. This cleans-up as we build for pipelines.
- local args="$args /p:CleanWhileBuilding=true"
-
- # PrebuiltPackagesPath needs to be set despite --with-packages,
- # as build tools has an error
- local args="$args /p:PrebuiltPackagesPath=$_artifactsdir"
-
- # between releases, /etc/os-release sometimes has a VERSION_ID that is
- # unsupported by dotnet's Rid format. As mitigation, TargetRid is set
- # manually, rather than letting source-build compute it itself
+ # Sets TargetRid manually as dotnet cannot be trusted to reliably compute
+ # the machine's runtime ID between releases.
# shellcheck disable=SC2034
. /etc/os-release
- [ -n "${VERSION_ID//[^_]}" ] && local args="$args /p:TargetRid=alpine.${VERSION_ID%_*}-$_dotnet_arch"
-
- # by default, build sources artifacts from tarball in packages/archive
- # SDK from Microsoft. Due to wanting to use self-hosted versions of
- # both of these, they are packaged by stage0 and bootstrap and provided
- # in $_libdir/dotnet/{bootstrap,artifacts}. SDK is then sourced
- # using _prepare_bootstrap function, and then pointed to using
- # --with-sdk arg. Artifacts are sourced using --with-packages. Due to
- # this being a read-only folder, this breaks without build_copy-sbrp.patch
- # which makes build copy SBRP subfolder rather than move it.
+ 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" \
@@ -363,43 +357,62 @@ build() {
}
check() {
- msg "Unpacking produced dotnet"
+ ulimit -n 4096
+ # Tests timeout (in seconds)
+ local _tests_timeout=1000
+ # Test suite disable flags
+ # following tests only work via Github actions on upstream repo
+ # see https://github.com/redhat-developer/dotnet-regular-tests/actions
+ local _disabled_tests="
+ man-pages distribution-package bash-completion
+ install-location release-version-sane managed-symbols-available
+ tools-in-path createdump-aspnet system-data-odbc
+ "
+ # 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
+ local _disabled_tests="$_disabled_tests lttng"
+ fi
+ # TODO: Investigate build failure in builders
+ local _disabled_tests="$_disabled_tests debugging-sos-lldb-via-core debugging-via-dotnet-dump"
+
export DOTNET_ROOT="$_checkdir/release"
if [ ! -d "$DOTNET_ROOT" ]; then
+ msg "Unpacking produced dotnet"
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
+ # some files either should or should not have executable bits
+ # (done again during packaging - this is for tests)
+ _fix_executable "$DOTNET_ROOT"
fi
export PATH="$DOTNET_ROOT:$PATH"
- # some files either should or should not have executable bits
- # (done again during packaging - this is for tests)
- _fix_executable "$DOTNET_ROOT"
- msg "Building turkey test suite"
+ if [ ! -d "$_logdir/check" ]; then
+ mkdir -p "$_logdir"/check
+ fi
if [ ! -d "$_checkdir"/turkey ]; then
+ msg "Building turkey test suite"
cd "$_checkdir"/Turkey
- dotnet publish \
- -f netcoreapp3.1 \
- -c Release \
- -p:VersionPrefix=1 \
- -p:VersionSuffix="$(git rev-parse --short HEAD)" \
- -o "$_checkdir"/turkey
+ dotnet publish -bl:"$_logdir"/check/turkey.binlog -f net6.0 -c Release -p:VersionPrefix=1 -p:VersionSuffix="$(git rev-parse --short HEAD)" -o "$_checkdir"/turkey
fi
msg "Running test suite"
cd "$_testdir"
for i in $_disabled_tests; do
- [ -d "$i" ] && sed -i 's|"enabled": true|"enabled": false|' $i/test.json
+ 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
+
+ # do not source /etc/profile
+ sed '/if \[ -f \/etc\/profile \]/,+2d' -i ./*/test.sh
+
+ dotnet "$_checkdir"/turkey/Turkey.dll -t $_tests_timeout -l "$_logdir"/check || local ERROR=true
if [ $ERROR ]; then
- msg "Check error reported, dumping logs"
- for i in *.log; do
- msg "Dumping $i"
- cat "$i"
- done
+ msg "Check error reported, please check logs"
return 1
fi
}
@@ -408,16 +421,25 @@ package() {
# directory creation
install -dm 755 \
"$pkgdir"/$_libdir/dotnet/bootstrap/$pkgver \
- "$pkgdir"/usr/share/man/man1/dotnet
+ "$pkgdir"/usr/share/man/man1 \
+ "$pkgdir"/$_libdir/dotnet/artifacts/$pkgver
- # unpack build artifacts to bootstrap
+ # 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/dotnet/. \;
+ 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"
@@ -487,10 +509,6 @@ templates() {
_fix_executable "$subpkgdir"
}
-# 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
@@ -502,12 +520,13 @@ artifacts() {
"$subpkgdir"/$_libdir/dotnet/artifacts/$pkgver \
"$subpkgdir"/usr/share/licenses
- # extract artifacts to artifacts dir for use by future dotnet builds
+ # 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 '*Intermediate*' \
+ --exclude '*alpine*'
}
zshcomp() {
@@ -515,7 +534,7 @@ zshcomp() {
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"
+ install_if="netstandard21-targeting-pack=$pkgver-r$pkgrel zsh"
depends="dotnet-host"
install -dm 755 "$subpkgdir"/usr/share/zsh/site-functions
@@ -527,7 +546,7 @@ bashcomp() {
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"
+ install_if="netstandard21-targeting-pack=$pkgver-r$pkgrel bash-completion"
depends="dotnet-host"
install -dm 755 "$subpkgdir"/usr/share/bash-completion/completions
@@ -548,26 +567,20 @@ doc() {
}
sha512sums="
-d512ff34c630632c35a58367e5a3375a1ab92ae13874e47e1591660afbfae6a537818fa0be30a4bd27ca7a9d403d05ec732103a8aa9f1dff56ad4be5bcd3058d source-build-tarball-6.0.108.tar.gz
-fff94ca2b01ab360f0ef7d8b5408e49d867733f0008b8b70ebcc8eaaa8e832001510275f075848d24f9f71eb968daf57e30fe24f1ea9d0a38405936f9a2caf26 source-build-testssuite-ddc8576cc4ffccf6b102eed55125b2596336e684.tar.gz
-fc281df5fcf0d31dc9ff7f5b0e870960cfbe3c4fa0f6a6bb50b22c4ee18d2c608c827205bc79bd7f686d77ac917582fc26f68432cdd86c4a33b910c0c7416d09 source-build-turkey-71880bd94711519f7b786248a88a827a401207a2.tar.gz
-a2b21c38ed739f9bd18b39a28ef21b940ae32beeb2c8f99575289111e5ecaae40e017a500b3b452ef5df7c7e12dff2f8385acada92ca7507d1ed351c6aa9e311 aspnetcore_musl-build-fix.patch
-6e9663f466007fc5fa7010e6859f054b6a4e59affa7aae7fd4d9ab4ba8410d4855b680f58f938ad21d0b3d2a7c7b097c7e9494a4dde2c43478ddddbf37539545 build_arm-build.patch
-d25690181c9a19d78d1bd757f4add966cf07457c955546b2f1eafcc37a0a5856f04f87e5997f2300f40013237675d2bf4605caab01ad04a90a526cb38d8fc55a build_musl-build-fix.patch
-49b4eb0f4abacaf134aae35e7f7dea755a052aaf684f9cb430705c0afe690d039e55ca1515d47ca20643bd003ee6b5b65da8af5e5254b4dde715044ee4646e61 check_rid-alpine-generation.patch
-ce36d0233d33cdc96888a64ab83a4099f877413269bcb5602704cedfb6aa89bf6d86157545f6f6243c226b2d714acf66a2bcfb65576afd0c6cda345b76bb5c07 command-line-api_fix-musl-build.patch
-9b22bbfcb93c402c14f389d8b23a7d612cca1153fcb76df2f85dd3ba7df2583b092c77534b145eb3d4f5d6e4f3a90355ed45a0b998df23b58639cca0d6c3704f installer_arm-build.patch
-385599c3b35cf34c7cc008ce1e28ab724f51567d759cbd04d64bd9977a139fa9c1d97e4038fc1249b3fca04e0abb99b7abfdde57d1ae4d83742ca76e6b7c40e0 installer_forgotten-MicrosoftAspNetCoreAppRuntimePac.patch
-a1e89c860bd6526293038746ed9a963e139b3f199931244b8a3d27e31c9eacba7484523e4151a1a0d7d3137edd271d907954b116619426f5db48361053740e27 installer_musl-build-fix.patch
-e14c5861c389c7e1d9a7ec96446be96335723bde403b685b16028a3f87ff6f6614400c876432d7302d3e2b4cd38e8d24979597c8ba909c0ad1d7b6cf2b4c3bfc installer_portable-runtime-id.patch
-49893f1824f3626885bb248fb6a279b6ac455988747028af4a0da63a7e93d8c50c72313b2e261c9154c07ccd11e8bd9c730fd41f8f1897d6a8cf785ba0502c31 installer_reprodicible-tarball.patch
-2e79e27b201a3e4423d63666b3dd575d0cb5ddbe258af24d9a2d0f9eb4cc8d177070249cfd08536fa7c3c6debdf939239a7e2c1aadd692d3e903bbb168f241b5 runtime_detect-armv8.patch
-aef649d2480d71ce68b030c0d67c2bfd965349a7ab52dbdca7c954edadb308ee6fbebf357113292d1323bfa9b2f8f01fe28d3904b2ebcc7a555742135bfdc726 runtime_fix-musl-123.patch
-dda6b463af8e0c8342b9c0d1a584f6d6410fb48df9fb0ef3c07d5ee7eb4abf2a29a01bf7a39fc70c2f5986c0b24c7bfe602cbfbeb1157cb0e0fb0eaa7fb03d1c runtime_lld-fix.patch
-27d47e33fcef6024e05d07e68972f619ff81a211ce9d0d296816b8ed602c61bf57e6ffcaf885a272adc56f1618f8583420a0013101a74538e490113551929c29 runtime_non-portable-distrorid-fix-alpine.patch
-1fb414e925a516577240425739242af29eb22507c61c3fc9f7f8eb1f8c34650b00251148f6629704183959a6415bafcfc7442583ad7b1182c1c7c5b8bfd92b6a runtime_rid-alpine-317.patch
-e8fba8748c600696a529dd9b861b2e4bffed9f6a56c1e6ec58c1444b567b92a00e6c310f835eb7915db5f924409782d6ec3d7ae98082bde22401ce7836ee7acb runtime_x86-64-use-system-libunwind.patch
-55afa9c74be6f5a87f1ff5aa44caad094cf620eb4388f6407218acf3d58a878f5565a0e875e95c3dbe0efca1879c120ee4b8076c521bfc9d6069a652c4a4fdd8 sdk_add-zsh-compdef-completion-script.patch
-532534ed88fda70b5088b655af00a7218c72f99a65b35194ebcd960b354b24f043c4b63e72b915aaf69ba847f7befa7d650495a0741d7526accb58b425f74a26 sdk_portable-runtime-id.patch
-2d651813c6a46e885636fe141d90a33c92d0fa450611cadd944b45ec6929a169e49a6cba18afdd708e3359d5ee204f1c1f6e3bfce2ba9d1bdb083edf78d0337e sdk_telemetry-optout.patch
+1e9f9a7098efa397cb0220286a2314683b8b3dd4a3fa971ceddfada50edeea139bf10a53db7455ab584a9ccdbe04cd4e5eedd12b4c9cfa258fbaf201b6b34d38 dotnet-v6.0.129.tar.xz
+69181ea34dafaacf95a267675a2c1dc75c37fcf331e540a9e3ee4f80709572c7523dd4370a786ad5c885356d05ec83b27c9bbcae6adac01b78d9aa2ac69ed719 dotnet-testsuite-4f2372af276898d8acbe92d77af30da86920bbce.tar.gz
+7f59b10878aa90a6953ee4d88d08fa932910a24018dace92b173ee87c847d14734f93dc5fc031982a3d0a5cb4ac223b83d0e548531c23c4e3326dc83510989a9 dotnet-bunny-v15.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
"