This commit is contained in:
build@apk-groulx 2022-02-07 01:02:56 +00:00
parent d7dae362c9
commit d04cc65e14
145 changed files with 2261 additions and 2857 deletions

88
apk/main/abuild/APKBUILD Normal file
View file

@ -0,0 +1,88 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=abuild
pkgver=3.9.1
_ver=${pkgver%_git*}
_gittag=c7b5f6f61eddfc00f22587d93ff44cb202a1ffde
pkgrel=0
pkgdesc="Script to build Alpine Packages"
url="https://git.alpinelinux.org/cgit/abuild/"
arch="all"
license="GPL-2.0-only"
depends="fakeroot scanelf openssl apk-tools>=2.0.7-r1 libc-utils
attr tar pkgconf patch lzip"
if [ "$CBUILD" = "$CHOST" ]; then
depends="$depends curl"
fi
makedepends_build="pkgconfig scdoc"
makedepends_host="openssl1.1-compat-dev zlib-dev"
makedepends="$makedepends_host $makedepends_build"
checkdepends="bats"
install="$pkgname.pre-install $pkgname.pre-upgrade"
subpackages="
apkbuild-cpan:cpan:noarch
apkbuild-gem-resolver:gems:noarch
apkbuild-pypi:pypi:noarch
abuild-rootbld:_rootbld:noarch
$pkgname-doc
"
options="suid"
pkggroups="abuild"
source="https://gitlab.alpinelinux.org/alpine/abuild/-/archive/$_gittag/abuild-$_gittag.tar.gz"
builddir="$srcdir"/abuild-$_gittag
prepare() {
default_prepare
sed -i -e "/^CHOST=/s/=.*/=$CHOST/" abuild.conf
}
build() {
make VERSION="$pkgver-r$pkgrel"
}
check() {
make check
}
package() {
make install VERSION="$pkgver-r$pkgrel" DESTDIR="$pkgdir"
install -m 644 abuild.conf "$pkgdir"/etc/abuild.conf
install -d -m 775 -g abuild "$pkgdir"/var/cache/distfiles
}
cpan() {
pkgdesc="Script to generate perl APKBUILD from CPAN"
depends="perl perl-libwww perl-json perl-module-build perl-module-build-tiny
perl-lwp-protocol-https"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/apkbuild-cpan "$subpkgdir"/usr/bin/
}
gems() {
pkgdesc="APKBUILD dependency resolver for RubyGems"
depends="ruby ruby-augeas"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/apkbuild-gem-resolver "$subpkgdir"/usr/bin/
}
pypi() {
pkgdesc="Script to generate python3 APKBUILD from PYPI"
depends="perl perl-libwww perl-json perl-module-build-tiny perl-lwp-protocol-https
perl-ipc-system-simple"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/apkbuild-pypi "$subpkgdir"/usr/bin/
}
_rootbld() {
pkgdesc="Build packages in chroot"
depends="abuild bubblewrap gettext git"
mkdir -p "$subpkgdir"
}
sha512sums="
df121c466bfb4e1b628ecdb1fe522a9f74279e7db7899e01a522592b7083097c485912d52a8ba4b8b20ba879d97bf14f5c2f5d5b5ff997de78af3edf46a41bf0 abuild-c7b5f6f61eddfc00f22587d93ff44cb202a1ffde.tar.gz
"

View file

@ -0,0 +1,5 @@
#!/bin/sh
addgroup -S abuild 2>/dev/null
exit 0

View file

@ -0,0 +1 @@
abuild.pre-install

View file

@ -1,8 +1,16 @@
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Variables for dotnet-references build version 3.1
# This APKBUILD is designed to be the same for version 5.0 and under
# except for the variables in this first section
pkgname=dotnet31-references
pkgver=3.1.20420
pkgrel=0
_gittag=045b2888ccfaf4c203c945a09b3f41f0e6393d1c
# Following for dotnet-references build version 5.0 and below
_pkgver_macro=${pkgver%.*}
_pkgver_prior=${pkgver%.*.*}
_pkgver_name=${_pkgver_macro//[.0]}
@ -18,36 +26,47 @@ makedepends="
dotnet$_pkgver_name-bootstrap-artifacts
findutils
icu-dev
"
"
provides=dotnet$_pkgver_name-bootstrap-references
provider_priority=$_pkgver_prior
options="!check" # No test suite
source="
source-build-reference-packages-$_gittag.tar.gz::https://github.com/dotnet/source-build-reference-packages/archive/$_gittag.tar.gz
sh-build-fix.patch
"
"
builddir="$srcdir"/source-build-reference-packages-$_gittag
prepare() {
default_prepare
# Link source-built-artifacts
local _artifactsver=$(find /usr/share/dotnet/artifacts/$_pkgver_macro* -maxdepth 0 -type d | tail -n1 | sed 's|..*\/||')
tar cvzf Private.SourceBuilt.Artifacts.tar.gz -C "/usr/share/dotnet/artifacts/$_artifactsver" . >/dev/null 2>&1
}
build() {
# Disable tracing, which is incompatible with certain versions of
# lttng See https://github.com/dotnet/runtime/issues/57784. The
# suggested compile-time change doesn't work, unfrotunately.
export COMPlus_LTTng=0
msg "Building $pkgname-$pkgver"
cd "$srcdir"/source-build-reference*
./build.sh \
--with-sdk "/usr/share/dotnet" \
--with-packages "$builddir"/Private.SourceBuilt.Artifacts.tar.gz \
| tee -a build.log
}
package() {
install -dm 755 "$pkgdir"/usr/share/dotnet/reference-packages/$_pkgver_macro "$pkgdir"/usr/share/licenses
cd $builddir/artifacts/reference-packages
install ./* "$pkgdir"/usr/share/dotnet/reference-packages/$_pkgver_macro/.
ln -s dotnet-host "$pkgdir"/usr/share/licenses/dotnet$_pkgver_name-references
}
sha512sums="
9d7ae29c311cd9550389225cab891df359385e098aaccb8100c77832ea7b7b1f6a7984d811cb1f45bd323182149246c33f2016b4ee85d97ee9b29243acc644bc source-build-reference-packages-045b2888ccfaf4c203c945a09b3f41f0e6393d1c.tar.gz
175eb7b8121cdf36569580e0d3ddd96f2ff8d280e4f72bcb0e8bfcdbb81a10b1302b7d0e1b0fc64c16481b9c6035f266265ab214069403cfc8f8a701a216f480 sh-build-fix.patch
441528c42256f30dda83854f78d53d2507b6e7a159aea4456c3872a8be3690f8f222709a6ec70503cd1875d7d8c2f43d7a54ef0c30761fbdfc3c2a394136f7fc sh-build-fix.patch
"

View file

@ -11,9 +11,6 @@ APKBUILD for dotnet31-references
* Build testing/dotnet31 (with repo bootstraps, provides full repo
versions)
# Special functions
* ./build_apkbuild: Builds APKBUILD using scripts in lib
# Known issues
* While dotnet31 supports musl-arm64, builds for that architecture hasn't been
attempted due to lack of bootstrap SDK

View file

@ -1,9 +0,0 @@
#/bin/bash
echo "# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>" > APKBUILD
apkbuild-lint lib/*
# Build APKBUILD
sed 's:^\s*#.*$::g' lib/* >> APKBUILD
sed -i '/^[[:space:]]*$/d' APKBUILD
abuild checksum

View file

@ -1,8 +0,0 @@
#
# Main variables for dotnet-references build version 3.1
#
pkgname=dotnet31-references
pkgver=3.1.20420
pkgrel=0
_gittag=045b2888ccfaf4c203c945a09b3f41f0e6393d1c

View file

@ -1,63 +0,0 @@
#
# Build functions for dotnet-references version 5.0 and under
#
_pkgver_macro=${pkgver%.*}
_pkgver_prior=${pkgver%.*.*}
_pkgver_name=${_pkgver_macro//[.0]}
pkgdesc="Reference packages needed by the .NET $_pkgver_name SDK build"
arch="x86_64"
url=https://www.microsoft.com/net/core
license="MIT"
makedepends="
bash
dotnet$_pkgver_name-stage1
dotnet$_pkgver_name-bootstrap-sdk
dotnet$_pkgver_name-bootstrap-runtime
dotnet$_pkgver_name-bootstrap-artifacts
findutils
icu-dev
"
provides=dotnet$_pkgver_name-bootstrap-references
provider_priority=$_pkgver_prior
options="!check" # No test suite
source="
source-build-reference-packages-$_gittag.tar.gz::https://github.com/dotnet/source-build-reference-packages/archive/$_gittag.tar.gz
sh-build-fix.patch
"
builddir="$srcdir"/source-build-reference-packages-$_gittag
prepare() {
default_prepare
# Link source-built-artifacts
local _artifactsver=$(find /usr/share/dotnet/artifacts/$_pkgver_macro* -maxdepth 0 -type d | tail -n1 | sed 's|..*\/||')
tar cvzf Private.SourceBuilt.Artifacts.tar.gz -C "/usr/share/dotnet/artifacts/$_artifactsver" . >/dev/null 2>&1
}
build() {
# Disable tracing, which is incompatible with certain versions of
# lttng See https://github.com/dotnet/runtime/issues/57784. The
# suggested compile-time change doesn't work, unfrotunately.
export COMPlus_LTTng=0
msg "Building $pkgname-$pkgver"
cd "$srcdir"/source-build-reference*
./build.sh \
--with-sdk "/usr/share/dotnet" \
--with-packages "$builddir"/Private.SourceBuilt.Artifacts.tar.gz \
| tee -a build.log
}
package() {
install -dm 755 "$pkgdir"/usr/share/dotnet/reference-packages/$_pkgver_macro "$pkgdir"/usr/share/licenses
cd $builddir/artifacts/reference-packages
install ./* "$pkgdir"/usr/share/dotnet/reference-packages/$_pkgver_macro/.
ln -s dotnet-host "$pkgdir"/usr/share/licenses/dotnet$_pkgver_name-references
}
sha512sums="
9d7ae29c311cd9550389225cab891df359385e098aaccb8100c77832ea7b7b1f6a7984d811cb1f45bd323182149246c33f2016b4ee85d97ee9b29243acc644bc source-build-reference-packages-045b2888ccfaf4c203c945a09b3f41f0e6393d1c.tar.gz
6f4dbf64a190dd0676cbd4fc8d0e6e20f673e0c52bf572039057ce7712fc71d358b81d816493c8b2f79b4a7e3e4e5ec06479a8dbeb257ebefb8b87abc20e6fdc sh-build-fix.patch
"

View file

@ -1,5 +1,5 @@
From 7b1f102db70fd8c86f21c722669c9f7337367eee Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
From: Antoine Martin <dev@ayakael.net>
Date: Sat, 8 Jan 2022 17:02:38 +0000
Subject: [PATCH 1/1] patched for sh

View file

@ -1,11 +1,20 @@
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Variables for dotnet-stage0 build version 3.1
# This APKBUILD is designed to be the same for version 5.0 and under
# except for the variables in this first section
pkgname=dotnet31-stage0
pkgver=3.1.120
pkgver=3.1.416
pkgrel=0
_runtimever=3.1.20
_source_artifactsver=0.1.0-3.1.119-1372838-20210920.4
_source_referencesver=1.0.0-beta.21479.1
_runtimever=3.1.22
_source_artifactsver="0.1.0-3.1.120-1440359-20211022.3"
_source_referencesver="1.0.0-beta.21479.1"
_nappo_get=''
_nappo_exclude='*Intermediate* runtime.linux-x64.Microsoft.NETCore.Runtime.CoreCLR*'
# Following for dotnet-stage0 build version 5.0 and below
_pkgver_macro=${pkgver%.*}
_pkgver_prior=1
_pkgver_name=${_pkgver_macro//[.0]}
@ -20,7 +29,7 @@ _default_source="
https://dotnetfeed.blob.core.windows.net/dotnet-core/assets/Private.SourceBuild.ReferencePackages.$_source_referencesver.tar.gz
https://gist.githubusercontent.com/omajid/c04b6025de49d0b7b18ab4a7e789484e/raw/b33c57f6bf9c00bb8633375123d2d3594fe81c26/nappo.py
dotnet.sh
"
"
makedepends="
krb5-libs
libcurl
@ -28,33 +37,25 @@ makedepends="
lttng-ust
py3-packaging
zlib
"
"
subpackages="
dotnet$_pkgver_name-stage0-runtime:runtime:$_runtimever
dotnet$_pkgver_name-stage0-sdk:sdk:$_sdkver
dotnet$_pkgver_name-stage0-host:host:$_runtimever
dotnet$_pkgver_name-stage0-hostfxr:hostfxr:$_runtimever
dotnet$_pkgver_name-stage0-artifacts:artifacts:$_artifactsver
dotnet$_pkgver_name-stage0-references:references:$_referencesver
"
options="!strip !check" # No test suite
builddir="$srcdir"
_get_arch() {
case $1 in
x86_64) local arch=x64;;
aarch64) local arch=arm64;;
armv7) local arch=arm;;
esac
echo $arch
}
unpack() {
verify
initdcheck
mkdir -p "$srcdir"
msg "Unpacking Private.SourceBuilt.Artifacts"
gunzip Private.SourceBuilt.Artifacts.*.tar.gz
msg "Unpacking Private.SourceBuild.Reference.Packages"
gunzip Private.SourceBuild.Reference*.tar.gz
}
scan_symlink_targets() {
local name="$1" dir="$2"
local ver=$(pkginfo_val pkgver "$dir"/.PKGINFO)
local subpkgarch=$(pkginfo_val arch "$dir"/.PKGINFO)
[ -d "$REPODEST"/${repo:?}/${subpkgarch/noarch/$CARCH} ] || mkdir -p "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}
[ "$ver" = "$pkgver-r$pkgrel" ] || ln -sf "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}/$name-$ver.apk "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}/$name-$pkgver-r$pkgrel.apk
}
# custom source updater function for all dotnet versions
#
# Prebuilt artifacts only provides linux-x64 nukgs. As Alpine uses linux-musl,
# the below scripts updates source to fetch the musl version of those packages,
# allowing packaging of the correct architecture. Thus, everytime Artifacts
# is updated, or new architectures are added, this function needs to be
# executed using 'abuild _update_source'
_update_source() {
[ -z "$source" ] \
&& msg "Removing source from APKBUILD"
@ -65,11 +66,16 @@ _update_source() {
-e "/^source='.*'\$/d" \
-e "/^source='/,/'\$/d" \
APKBUILD
source="$_default_source"
fetch
local nuget_source="$_default_source"
msg "Updating source"
local nappo_get="$_nappo_get $(tar --list -f "$srcdir"/Private.SourceBuilt.Artifacts.*.tar.gz --wildcards '*.linux-x64.*' --exclude '*Intermediate*' --exclude 'runtime.linux-x64.Microsoft.NETCore.Runtime.CoreCLR*' 2>/dev/null)"
local nappo_exclude="$_nappo_exclude"
# shellcheck disable=3045
local nappo_exclude="$(printf '--exclude %s ' $nappo_exclude)"
local nappo_get=$(tar --list -f "$srcdir"/Private.SourceBuilt.Artifacts.*.tar.gz --wildcards '*.linux-x64.*' $nappo_exclude)
local nappo_get="$_nappo_get $nappo_get"
for package in $nappo_get; do
for _arch in $arch; do
local filename=${package##*/} # Extracts just filename
@ -79,9 +85,9 @@ _update_source() {
local name=${nupkg%*.*.*.*} # Extracts name without version
local version=${nupkg/$name.} # Extracts version out of nupkg using name
local name=${name/linux-x64/linux-musl-$(_get_arch $_arch)} # Converts to current arch
[ -z "${filename##*servicing*}" ] && local version=''
echo "Getting url for $name version $version, replaces $package"
local nappo_out=$(python3 "$srcdir"/nappo.py download --verbose "$name" "$version")
[ -z "${filename##*servicing*}" ] && unset version
echo "Getting $name [${version:-latest}] (replaces $package)"
local nappo_out="$(python3 "$srcdir"/nappo.py download --verbose $name ${version:-})"
local nupkg="${nappo_out#*.nupkg}"
local uri=${nappo_out/$nupkg}
local nupkg=$(echo $nupkg | tr -d '\n')
@ -96,77 +102,98 @@ _update_source() {
local nuget_source="$(printf '%s\n' $nuget_source)"
printf 'source="\n%s\n"\n' "$nuget_source" >>"$APKBUILD"
}
subpackages="
dotnet$_pkgver_name-stage0-runtime:runtime
dotnet$_pkgver_name-stage0-sdk:sdk
dotnet$_pkgver_name-stage0-host:host
dotnet$_pkgver_name-stage0-hostfxr:hostfxr
dotnet$_pkgver_name-stage0-artifacts:artifacts
dotnet$_pkgver_name-stage0-references:references
"
# 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) local arch=arm;;
esac
echo $arch
}
unpack() {
verify
initdcheck
mkdir -p "$srcdir"
msg "Unpacking Private.SourceBuilt.Artifacts"
gunzip Private.SourceBuilt.Artifacts.*.tar.gz
msg "Unpacking Private.SourceBuild.Reference.Packages"
gunzip Private.SourceBuild.Reference*.tar.gz
}
package() {
mkdir -p "$pkgdir"
}
host() {
pkgdesc="A generic driver for the .NET Core Command Line Interface, Microsoft build for use by dotnet$_pkgver_name aport"
pkgver=$_runtimever
provides="dotnet-host"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/etc/profile.d "$subpkgdir"/usr/bin "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses/dotnet-host
tar -xzf "$srcdir"/dotnet-sdk-*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./dotnet
tar -xzf "$srcdir"/dotnet-sdk-*.tar.gz -C "$subpkgdir"/usr/share/licenses/dotnet-host/ --no-same-owner ./LICENSE.txt ./ThirdPartyNotices.txt
ln -s /usr/share/dotnet/dotnet "$subpkgdir"/usr/bin/dotnet
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."
pkgver=$_runtimever
depends="dotnet-host"
provides="dotnet$_pkgver_name-hostfxr"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./host
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-hostfxr
}
sdk() {
depends="dotnet$_pkgver_name-bootstrap-runtime"
provides="dotnet$_pkgver_name-bootstrap-sdk"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./sdk ./templates
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-sdk
}
runtime() {
pkgdesc="The .NET $_pkgver_macro Core runtime, Microsoft build for use by dotnet$_pkgver_name aport"
pkgver=$_runtimever
depends="dotnet$_pkgver_name-hostfxr"
provides="dotnet$_pkgver_name-bootstrap-runtime"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./shared/Microsoft.NETCore.App
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-runtime
}
artifacts() {
pkgdesc="Internal package for building .NET $_pkgver_macro Software Development Kit, Microsoft build for use by dotnet$_pkgver_name aport"
pkgver=$_artifactsver
provides="dotnet$_pkgver_name-bootstrap-artifacts"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver "$subpkgdir"/usr/share/licenses
tar -xf "$srcdir"/Private.SourceBuilt.Artifacts.*.tar -C "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver/ --no-same-owner --exclude '*.linux-x64*'
install -m 644 "$srcdir"/*"$(_get_arch $CARCH)"*.nupkg "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver/.
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-artifacts
}
references() {
pkgdesc="Reference packages needed by the .NET $_pkgver_macro SDK build, Microsoft build for use by dotnet$_pkgver_name aport"
pkgver=$_referencesver
provides="dotnet$_pkgver_name-bootstrap-references"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet/reference-packages/$_pkgver_macro "$subpkgdir"/usr/share/licenses
tar -xf "$srcdir"/Private.SourceBuild.Reference*.tar -C "$subpkgdir"/usr/share/dotnet/reference-packages/$_pkgver_macro/ --no-same-owner
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-reference
}
source="
https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.0.1.0-3.1.119-1372838-20210920.4.tar.gz
https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.0.1.0-3.1.120-1440359-20211022.3.tar.gz
https://dotnetfeed.blob.core.windows.net/dotnet-core/assets/Private.SourceBuild.ReferencePackages.1.0.0-beta.21479.1.tar.gz
https://gist.githubusercontent.com/omajid/c04b6025de49d0b7b18ab4a7e789484e/raw/b33c57f6bf9c00bb8633375123d2d3594fe81c26/nappo.py
dotnet.sh
@ -190,10 +217,10 @@ https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packagin
https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a8a526e9-91b3-4569-ba2d-ff08dbb7c110/nuget/v3/flat2//transport.runtime.linux-musl-x64.Microsoft.NETCore.Native/5.0.0-alpha1.19459.9/transport.runtime.linux-musl-x64.microsoft.netcore.native.5.0.0-alpha1.19459.9.nupkg
https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a8a526e9-91b3-4569-ba2d-ff08dbb7c110/nuget/v3/flat2//transport.runtime.linux-musl-x64.Microsoft.NETCore.Runtime.CoreCLR/5.0.0-alpha1.19459.9/transport.runtime.linux-musl-x64.microsoft.netcore.runtime.coreclr.5.0.0-alpha1.19459.9.nupkg
https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a8a526e9-91b3-4569-ba2d-ff08dbb7c110/nuget/v3/flat2//transport.runtime.linux-musl-x64.Microsoft.NETCore.TestHost/5.0.0-alpha1.19459.9/transport.runtime.linux-musl-x64.microsoft.netcore.testhost.5.0.0-alpha1.19459.9.nupkg
https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.120/dotnet-sdk-3.1.120-linux-musl-x64.tar.gz
https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.416/dotnet-sdk-3.1.416-linux-musl-x64.tar.gz
"
sha512sums="
f349e52745305ec3a853d16968e1f415b70a8fb7cf8640f9a19586a36ecccba015fd623c85f851f3ab2a5c13b05a3a5d0357d0d188046493db371596ed212ac5 Private.SourceBuilt.Artifacts.0.1.0-3.1.119-1372838-20210920.4.tar.gz
ba5af3c6b68b90d6eae837a8cea7baaa7cdd6e44c35fc1667a41d4fad0c7d24f90e117259015f0e23db8b11bdeb67e2328e8d1e1e77e9b76600bc87a4dbc068d Private.SourceBuilt.Artifacts.0.1.0-3.1.120-1440359-20211022.3.tar.gz
bf2b971537f2aeb0d391686794026837f3603da17f2463f2e684af0bf5a3475af22293f67ad34e874eae2b5fb793eb4552b3ad5a086fc5f5641c3a13d88fc3f4 Private.SourceBuild.ReferencePackages.1.0.0-beta.21479.1.tar.gz
90b3ec14fd02cbef8af2086c26ef2f4f23c4c5ce83dac39cacbb36e506ea9914aae6c3b3580af2e71141b8f0435b4910f60970333011b4ddd594839f5fd7ec8e nappo.py
f58bd83b709dcb4b0b67830756069c34258a167b33cb290cbf30f21d69d75402d38e013fd7bbf00640fe19e397f78df6ff787cf8484ee8967d5b8809f033eafb dotnet.sh
@ -217,5 +244,5 @@ c701fc3ec4f4c1a29bca2a45d752207fedb6c4437ded9ea5ae928d184772ee6b63432ae214e5ef1a
98061582947420e265a28fb2eedf4d6bb3420e8fb9baf6660f6c7489110cbe1683024a3882b4d7faecbb3f85a30e1552ff3fdf67fd7b28c8bb028db0c100a18e transport.runtime.linux-musl-x64.microsoft.netcore.native.5.0.0-alpha1.19459.9.nupkg
097bf3c61b855ddf97e254be5cd982603ca8e90af5c018a8d090d95f727ae1a3c023b6154cdc031af6ed1371a7f20ae60de96c5ff136bdf10b40cb5f36d99c2d transport.runtime.linux-musl-x64.microsoft.netcore.runtime.coreclr.5.0.0-alpha1.19459.9.nupkg
e6b6928a30a1eae6b0d91dfdcc9ed0e91615ed4f01fe7a73d66f72569a6f4feb001d6cf79437fa2ae7269039e9e50a9afed86f0cd9fc6fa343174a39450720a2 transport.runtime.linux-musl-x64.microsoft.netcore.testhost.5.0.0-alpha1.19459.9.nupkg
d1f5565fef5a496643ef5c67cc54d8bf33bb7b59d9d04c24a91f54624a8cd673ddf98e4369a7c10ef9f31aa30041b20ef04cb6be563f2043bf123460c9e7f4a5 dotnet-sdk-3.1.120-linux-musl-x64.tar.gz
252837690f099ee756705559a030715dd19836c8f7b2d0364beb9998fc78596586d045e2a7f23e16143be2dbccf19470eec1818486790bf8d9160c166eeb72dc dotnet-sdk-3.1.416-linux-musl-x64.tar.gz
"

View file

@ -16,9 +16,8 @@ APKBUILD for dotnet31-stage0
versions)
# Special functions
* ./build_apkbuild.sh: Builds APKBUILD using scripts in lib
* abuild _update_source: Stage0 adapts prebuilt artifacts packages by replacing
linux-x64 nupkgs with linux-musl-x64 versions. Any updates to artifacts will
linux nupkgs with linux-musl versions. Any updates to artifacts will
require executing this function to update source with up to date nuget packages
# Known issues

View file

@ -1,14 +0,0 @@
#/bin/bash
source APKBUILD
echo "# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>" > APKBUILD
apkbuild-lint lib/*
# Build APKBUILD
sed 's:^\s*#.*$::g' lib/* >> APKBUILD
source="$(printf '%s\n' $source)"
printf 'source="\n%s\n"\n' "$source" >> APKBUILD
printf 'sha512sums="%s\n"\n' "$sha512sums" >> APKBUILD
# Strip whitespace
sed -i '/^[[:space:]]*$/d' APKBUILD

View file

@ -1,11 +0,0 @@
#
# Build variables for dotnet-stage0 version 3.1
#
pkgname=dotnet31-stage0
pkgver=3.1.120
pkgrel=0
_runtimever=3.1.20
_source_artifactsver=0.1.0-3.1.119-1372838-20210920.4
_source_referencesver=1.0.0-beta.21479.1
_nappo_get=''

View file

@ -1,29 +0,0 @@
#
# Building variables for dotnet-stage0 version 5.0 and under
#
_pkgver_macro=${pkgver%.*}
_pkgver_prior=1
_pkgver_name=${_pkgver_macro//[.0]}
_artifactsver=${_source_artifactsver:6:7}
_referencesver=$_pkgver_macro.${_source_referencesver:11:5}
pkgdesc="The .NET $_pkgver_macro SDK, Microsoft build for use by dotnet$_pkgver_name aport"
arch="x86_64"
url=https://www.microsoft.com/net/core
license="MIT"
_default_source="
https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.$_source_artifactsver.tar.gz
https://dotnetfeed.blob.core.windows.net/dotnet-core/assets/Private.SourceBuild.ReferencePackages.$_source_referencesver.tar.gz
https://gist.githubusercontent.com/omajid/c04b6025de49d0b7b18ab4a7e789484e/raw/b33c57f6bf9c00bb8633375123d2d3594fe81c26/nappo.py
dotnet.sh
"
makedepends="
krb5-libs
libcurl
libintl
lttng-ust
py3-packaging
zlib
"
options="!strip !check" # No test suite
builddir="$srcdir"

View file

@ -1,22 +0,0 @@
#
# Building functions for dotnet-stage0 version 5.0 and under
#
_get_arch() {
case $1 in
x86_64) local arch=x64;;
aarch64) local arch=arm64;;
armv7) local arch=arm;;
esac
echo $arch
}
unpack() {
verify
initdcheck
mkdir -p "$srcdir"
msg "Unpacking Private.SourceBuilt.Artifacts"
gunzip Private.SourceBuilt.Artifacts.*.tar.gz
msg "Unpacking Private.SourceBuild.Reference.Packages"
gunzip Private.SourceBuild.Reference*.tar.gz
}

View file

@ -1,23 +0,0 @@
# abuild / buildrepo gets confused when setting pkgver var from within subpkgs
# This expresses itself in two ways:
# 1) scan_symlink_targets, when it detects symlink dependencies between subpkgs
# sets a hard dependency to that specific version of subpackage. Fixing this
# involves simply neutralizing scan_symlink_targets, leaving the maintainer
# to set those dependencies explicitely
# 2) abuild / buildrepo has logics to determine if a package should be rebuilt
# abuild uses apk_up2date and abuildindex_up2date, and buildrepo uses
# pkg.each_need_rebuild, then pkg.apk_file_exists. All of these rely on if
# there's a readable file at $repo/$CARCH/$name-$pkgver-r$pkgrel.apk
# Fixing this involves creating a symbolic link at that location that points
# to where the subpackage actually is.
# Fortunately, scan_symlink_targes has all the hooks necessary to create a
# symbolic link: it resides within a for loop that's based around subpkgdir,
# and feeds function with .PKGINFO info that allows for creation of symbolic
# link when necessary
scan_symlink_targets() {
local name="$1" dir="$2"
local ver=$(pkginfo_val pkgver "$dir"/.PKGINFO)
local subpkgarch=$(pkginfo_val arch "$dir"/.PKGINFO)
[ -d "$REPODEST"/${repo:?}/${subpkgarch/noarch/$CARCH} ] || mkdir -p "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}
[ "$ver" = "$pkgver-r$pkgrel" ] || ln -sf "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}/$name-$ver.apk "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}/$name-$pkgver-r$pkgrel.apk
}

View file

@ -1,48 +0,0 @@
# Prebuilt artifacts only provides linux-x64 nukgs. As Alpine uses linux-musl,
# the below scripts updates source to fetch the musl version of those packages,
# allowing packaging of the correct architecture. Thus, everytime Artifacts
# is updated, or new architectures are added, this function needs to be
# executed using 'abuild _update_source'
_update_source() {
[ -z "$source" ] \
&& msg "Removing source from APKBUILD"
sed -E -i \
-e '/^source=".*"$/d' \
-e '/^source="/,/"$/d' \
\
-e "/^source='.*'\$/d" \
-e "/^source='/,/'\$/d" \
APKBUILD
source="$_default_source"
fetch
local nuget_source="$_default_source"
msg "Updating source"
local nappo_get="$_nappo_get $(tar --list -f "$srcdir"/Private.SourceBuilt.Artifacts.*.tar.gz --wildcards '*.linux-x64.*' --exclude '*Intermediate*' --exclude 'runtime.linux-x64.Microsoft.NETCore.Runtime.CoreCLR*' 2>/dev/null)"
for package in $nappo_get; do
for _arch in $arch; do
local filename=${package##*/} # Extracts just filename
local suffix=${filename##*[0-9]} # Extracts what's after version number
local nupkg=${filename/$suffix} # Extracts nupkg name with version
[ -z "${filename##*servicing*}" ] && local nupkg=${filename%%-servicing*}
local name=${nupkg%*.*.*.*} # Extracts name without version
local version=${nupkg/$name.} # Extracts version out of nupkg using name
local name=${name/linux-x64/linux-musl-$(_get_arch $_arch)} # Converts to current arch
[ -z "${filename##*servicing*}" ] && local version=''
echo "Getting url for $name version $version, replaces $package"
local nappo_out=$(python3 "$srcdir"/nappo.py download --verbose "$name" "$version")
local nupkg="${nappo_out#*.nupkg}"
local uri=${nappo_out/$nupkg}
local nupkg=$(echo $nupkg | tr -d '\n')
[ -f "$nupkg" ] && mv $nupkg "$SRCDEST"/.
local nuget_source="$nuget_source $uri"
[ -z "${name##*linux*}" ] || break
done
done
for _arch in $arch; do
local nuget_source="$nuget_source https://dotnetcli.azureedge.net/dotnet/Sdk/$pkgver/dotnet-sdk-$pkgver-linux-musl-$(_get_arch $_arch).tar.gz"
done
local nuget_source="$(printf '%s\n' $nuget_source)"
printf 'source="\n%s\n"\n' "$nuget_source" >>"$APKBUILD"
}

View file

@ -1,87 +0,0 @@
#
# Packaging functions for dotnet-stage0 version 5.0 and under
#
subpackages="
dotnet$_pkgver_name-stage0-runtime:runtime
dotnet$_pkgver_name-stage0-sdk:sdk
dotnet$_pkgver_name-stage0-host:host
dotnet$_pkgver_name-stage0-hostfxr:hostfxr
dotnet$_pkgver_name-stage0-artifacts:artifacts
dotnet$_pkgver_name-stage0-references:references
"
package() {
mkdir -p "$pkgdir"
}
host() {
pkgdesc="A generic driver for the .NET Core Command Line Interface, Microsoft build for use by dotnet$_pkgver_name aport"
pkgver=$_runtimever
provides="dotnet-host"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/etc/profile.d "$subpkgdir"/usr/bin "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses/dotnet-host
tar -xzf "$srcdir"/dotnet-sdk-*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./dotnet
tar -xzf "$srcdir"/dotnet-sdk-*.tar.gz -C "$subpkgdir"/usr/share/licenses/dotnet-host/ --no-same-owner ./LICENSE.txt ./ThirdPartyNotices.txt
ln -s /usr/share/dotnet/dotnet "$subpkgdir"/usr/bin/dotnet
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."
pkgver=$_runtimever
depends="dotnet-host"
provides="dotnet$_pkgver_name-hostfxr"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./host
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-hostfxr
}
sdk() {
depends="dotnet$_pkgver_name-bootstrap-runtime"
provides="dotnet$_pkgver_name-bootstrap-sdk"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./sdk ./templates
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-sdk
}
runtime() {
pkgdesc="The .NET $_pkgver_macro Core runtime, Microsoft build for use by dotnet$_pkgver_name aport"
pkgver=$_runtimever
depends="dotnet$_pkgver_name-hostfxr"
provides="dotnet$_pkgver_name-bootstrap-runtime"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./shared/Microsoft.NETCore.App
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-runtime
}
artifacts() {
pkgdesc="Internal package for building .NET $_pkgver_macro Software Development Kit, Microsoft build for use by dotnet$_pkgver_name aport"
pkgver=$_artifactsver
provides="dotnet$_pkgver_name-bootstrap-artifacts"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver "$subpkgdir"/usr/share/licenses
tar -xf "$srcdir"/Private.SourceBuilt.Artifacts.*.tar -C "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver/ --no-same-owner --exclude '*.linux-x64*'
install -m 644 "$srcdir"/*"$(_get_arch $CARCH)"*.nupkg "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver/.
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-artifacts
}
references() {
pkgdesc="Reference packages needed by the .NET $_pkgver_macro SDK build, Microsoft build for use by dotnet$_pkgver_name aport"
pkgver=$_referencesver
provides="dotnet$_pkgver_name-bootstrap-references"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet/reference-packages/$_pkgver_macro "$subpkgdir"/usr/share/licenses
tar -xf "$srcdir"/Private.SourceBuild.Reference*.tar -C "$subpkgdir"/usr/share/dotnet/reference-packages/$_pkgver_macro/ --no-same-owner
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-reference
}

View file

@ -1,11 +1,18 @@
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
. ../dotnet31/APKBUILD
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
#
# Main functions for dotnet build version 3.1
# This is generated from dotnet31's APKBUILD.
# Any modifications to be done in main APKBUILD and propagated by
# executing 'abuild _update_stage1'
#
# Variables for dotnet build version 3.1
# This APKBUILD is designed to be the same for version 5.0 and under
# except for the variables in this first section
#
pkgname=dotnet31-stage1
pkgver=3.1.120
pkgver=3.1.416
pkgrel=0
_pkgrel="-SDK"
_runtimever=3.1.20
@ -17,28 +24,380 @@ _patches="
build_darc-fix-alpine.patch
build_ignore-warnings.patch
coreclr_non-portable-distrorid-fix-alpine.patch
coreclr_fix-build-on-Alpine-edge-45352.patch
core-sdk_generate-layout-core-setup-blob-path-fix.patch
core-setup_rid-plat-generation-on-alpine-fix.patch
corefx_fix-build-clang10.patch
corefx_added-alpine-315-rid.patch
"
"
# Custom prepare
default_prepare() {
return
}
makedepends="${makedepends//31-bootstrap/31-stage0}"
# Following for for dotnet builds version 5.0 and under
_pkgver_macro=${pkgver%.*}
_pkgver_prior=${pkgver%.*.*}
_pkgver_name=${_pkgver_macro//[.0]}
pkgdesc="The .NET $_pkgver_macro SDK"
arch="x86_64"
url=https://www.microsoft.com/net/core
license="MIT"
_bootstrap_pkg="stage0"
makedepends="
bash
clang
cmake
dotnet$_pkgver_name-$_bootstrap_pkg-runtime
dotnet$_pkgver_name-$_bootstrap_pkg-sdk
dotnet$_pkgver_name-$_bootstrap_pkg-artifacts
dotnet$_pkgver_name-$_bootstrap_pkg-references
findutils
git
icu-dev
inetutils-syslogd
krb5-dev
libgit2-dev
libintl
libunwind-dev
libxml2-dev
libxml2-utils
linux-headers
lldb-dev
llvm$_llvmver-dev
lttng-ust-dev
nodejs
openssl-dev
zlib-dev
"
options="!check" # No test suite
source="
source-build-v$pkgver$_pkgrel.tar.gz::https://github.com/dotnet/source-build/archive/refs/tags/v$pkgver$_pkgrel.tar.gz
completions.zsh::https://raw.githubusercontent.com/dotnet/sdk/7cec6d9fe5cb326a88091ae44204f52e1f00e69c/scripts/_dotnet
dotnet.sh
$_patches
"
subpackages="
aspnetcore$_pkgver_name-runtime:aspnetcore_runtime:noarch:$_aspnetver
aspnetcore$_pkgver_name-targeting-pack:aspnetcore_targeting_pack:noarch:$_aspnetver
dotnet$_pkgver_name-apphost-pack:apphost_pack:$_runtimever
dotnet$_pkgver_name-artifacts:artifacts:$_sdkver
dotnet$_pkgver_name-host:host:$_runtimever
dotnet$_pkgver_name-host-zsh-completion:zshcomp:$_runtimever
dotnet$_pkgver_name-host-bash-completion:bashcomp:$_runtimever
dotnet$_pkgver_name-host-doc:doc:$_runtimever
dotnet$_pkgver_name-hostfxr:hostfxr:$_runtimever
dotnet$_pkgver_name-runtime:runtime:$_runtimever
dotnet$_pkgver_name-sdk:sdk:$_sdkver
dotnet$_pkgver_name-targeting-pack:targeting_pack:noarch:$_runtimever
dotnet$_pkgver_name-templates:templates:noarch:$_sdkver
netstandard$_pkgver_name-targeting-pack:netstandard_targeting_pack:noarch:$_sdkver
"
builddir="$srcdir/source-build-$pkgver$_pkgrel"
# Custom patch logics for dotnet version 5.0 and under
_patch() {
local i failed=
if ! have_patches; then
return 0
fi
[ -d "$builddir" ] || { error "Is \$builddir set correctly?"; return 1; }
msg "Deploying patches"
for i in $source; do
case ${i%::*} in
build_*.patch)
echo "applying $i to sourcebuild"
patch ${patch_args:--p1} -i "$srcdir/$(filename_from_uri $i)" || failed="$failed $i"
;;
*.patch)
local _package=$(echo $i | sed 's|_.*||')
local _patch=$(echo $i | sed "s|$_package\_||")
echo "deploying $_patch to $_package for application by sourcebuild"
[ -d patches/$_package ] || mkdir patches/$_package
cp "$srcdir"/"$i" patches/$_package/$_patch
;;
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
}
# custom function that updates stage1 for all dotnet versions
#
# buildrepo doesn't know to rebuild dotnet after first build with stage1
# this creates another package that forces the a first build of dotnet
# so that the final build of dotnet is guaranteed to be built with
# Alpine binaries.
_update_stage1() {
msg "Updating stage1 APKBUILD"
# Copy patches
rm ../dotnet$_pkgver_name-stage1/*.patch ../dotnet$_pkgver_name-stage1/dotnet.sh
for i in ../dotnet"$_pkgver_name"/*.patch ../dotnet"$_pkgver_name"/dotnet.sh; do
cp $i ${i/$_pkgver_name/$_pkgver_name-stage1}
done
# Generate stage1
{
echo -n "# "
echo "Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>"
echo "# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>"
echo
echo "#"
echo "# This is generated from dotnet$_pkgver_name's APKBUILD."
echo "# Any modifications to be done in main APKBUILD and propagated by"
echo -n "# executing 'abuild _update_stage1'"
sed \
-e "s/pkgname=dotnet$_pkgver_name/pkgname=dotnet$_pkgver_name-stage1/" \
-e "s/_bootstrap_pkg=\"bootstrap\"/_bootstrap_pkg=\"stage0\"/" \
-e "1,2d" \
../dotnet$_pkgver_name/APKBUILD
} > ../dotnet$_pkgver_name-stage1/APKBUILD
}
prepare() {
default_prepare
# source-build expects to be in a git repo
git init
git add ./*
git commit -m 'initial commit'
git remote add origin https://github.com/dotnet/source-build.git
_patch
msg "Settings up bootstrap"
mkdir -p bootstrap/sdk
cp /usr/share/dotnet/dotnet bootstrap/.
local _bootstrapver=$(find /usr/share/dotnet/sdk/$_pkgver_macro* -maxdepth 0 -type d | tail -n1 | sed 's|..*\/||')
for i in sdk/$_bootstrapver host shared; do cp -r /usr/share/dotnet/$i bootstrap/$i; done
mkdir -p packages/archive
local _artifactsver=$(find /usr/share/dotnet/artifacts/$_pkgver_macro* -maxdepth 0 -type d | tail -n1 | sed 's|..*\/||')
tar cvzf packages/archive/Private.SourceBuilt.Artifacts.tar.gz -C "/usr/share/dotnet/artifacts/$_artifactsver" .
tar cvzf packages/archive/Private.SourceBuild.ReferencePackages.tar.gz -C "/usr/share/dotnet/reference-packages/$_pkgver_macro" .
}
build() {
msg "Building $pkgname-$pkgver"
export SOURCE_BUILD_SKIP_SUBMODULE_CHECK=1
# Disable tracing, which is incompatible with certain versions of
# lttng See https://github.com/dotnet/runtime/issues/57784. The
# suggested compile-time change doesn't work, unfortunately.
export COMPlus_LTTng=0
./build.sh \
--with-sdk bootstrap \
/p:SkipDownloadingPreviouslySourceBuiltPackages=true \
/p:SkipDownloadingReferencePackages=true \
/p:ContinueOnPrebuiltBaselineError=true \
/p:SkipPortableRuntimeBuild=true \
/p:SkipPrebuiltEnforcement=true \
/p:UseSystemLibraries=true \
/p:UseSystemLibunwind=true
}
package() {
depends="dotnet$_pkgver_name-sdk"
provides=dotnet-$_pkgver_macro
install -dm 755 "$pkgdir"/usr/share/zsh/site-functions "$pkgdir"/usr/share/bash-completion/completions "$pkgdir"/usr/share/man/man1
find "$builddir" -iname 'dotnet*.1' -type f -exec cp '{}' "$pkgdir"/usr/share/man/man1/ \;
install -m 755 "$srcdir"/completions.zsh "$pkgdir"/usr/share/zsh/site-functions/_dotnet
install -m 755 "$builddir"/artifacts/src/sdk/scripts/register-completions.bash "$pkgdir"/usr/share/bash-completion/completions/_dotnet
}
sdk() {
depends="
aspnetcore$_pkgver_name-runtime
aspnetcore$_pkgver_name-targeting-pack
dotnet$_pkgver_name-apphost-pack
dotnet$_pkgver_name-runtime
dotnet$_pkgver_name-targeting-pack
dotnet$_pkgver_name-templates
netstandard21-targeting-pack
"
provider_priority=$_pkgver_prior
provides="dotnet$_pkgver_name-bootstrap-sdk dotnet-sdk-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./sdk
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-sdk
}
host() {
pkgdesc="A generic driver for the .NET Core Command Line Interface"
provides="dotnet-host"
provider_priority=$_pkgver_prior
cd $builddir/artifacts/x64/Release
install -dm 755 "$subpkgdir"/etc/profile.d "$subpkgdir"/usr/bin "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses/dotnet-host
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./dotnet
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/licenses/dotnet-host/ --no-same-owner ./LICENSE.txt ./ThirdPartyNotices.txt
ln -s /usr/share/dotnet/dotnet "$subpkgdir"/usr/bin/dotnet
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"
provider_priority=$_pkgver_prior
cd $builddir/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./host
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-hostfxr
}
runtime() {
pkgdesc="The .NET $_pkgver_macro Core runtime"
depends="dotnet$_pkgver_name-hostfxr"
provides="
dotnet$_pkgver_name-bootstrap-runtime
dotnet-runtime-$_pkgver_macro
"
provider_priority=$_pkgver_prior
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./shared/Microsoft.NETCore.App
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-runtime
}
aspnetcore_runtime() {
pkgdesc="The ASP.NET $_pkgver_macro Core runtime"
depends="dotnet$_pkgver_name-runtime"
provides="aspnetcore-runtime-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./shared/Microsoft.AspNetCore.App
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/aspnetcore$_pkgver_name-runtime
}
apphost_pack() {
pkgdesc="The .NET $_pkgver_macro Core apphost pack"
provides="dotnet-apphost-pack-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner --wildcards ./packs/Microsoft.NETCore.App.Host.*
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-apphost-pack
}
targeting_pack() {
pkgdesc="The .NET $_pkgver_macro Core targeting pack"
provides="dotnet-targeting-pack-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/Microsoft.NETCore.App.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-targeting-pack
}
netstandard_targeting_pack() {
pkgdesc="The .NET $_pkgver_macro Standard targeting pack"
depends="dotnet-host"
provides="
netstandard21-targeting-pack
netstandard-targeting-pack-2.1
"
provider_priority=$_pkgver_prior
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/NETStandard.Library.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/netstandard21-targeting-pack
}
aspnetcore_targeting_pack() {
pkgdesc="The ASP.NET $_pkgver_macro Core targeting pack"
provides="aspnetcore-targeting-pack-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/Microsoft.AspNetCore.App.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/aspnetcore$_pkgver_name-targeting-pack
}
templates() {
pkgdesc="The .NET $_pkgver_macro templates"
depends="dotnet-host"
provider_priority=$_pkgver_prior
provides="dotnet-templates-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./templates
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-templates
}
artifacts() {
pkgdesc="Internal package for building .NET $_pkgver_macro Software Development Kit"
depends="dotnet-host"
provides="dotnet$_pkgver_name-bootstrap-artifacts"
provider_priority=$_pkgver_prior
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver "$subpkgdir"/usr/share/licenses
tar -xzf Private.SourceBuilt.Artifacts.*.tar.gz -C "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver/
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-artifacts
}
zshcomp() {
default_zshcomp
pkgdesc="zsh completion for .NET $_pkgver_macro"
depends="dotnet-host"
provides="dotnet-host-zsh-completion"
provider_priority=$_pkgver_prior
}
bashcomp() {
default_bashcomp
pkgdesc="bash completion for .NET $_pkgver_macro"
depends="dotnet-host"
provides="dotnet-host-bash-completion"
provider_priority=$_pkgver_prior
}
doc() {
default_doc
pkgdesc="Docs for .NET $_pkgver_macro"
provides="dotnet-host-doc"
provider_priority=$_pkgver_prior
}
sha512sums="
33b0f76ca72e6b2ebef50338b6c4208e02f513ebfc67525481f945c12359ea030fe48017971d9f64522dc2f829beff790f10ba79e3b579c2ef90703fe9b4b27d source-build-v3.1.120-SDK.tar.gz
651c59c44ec2492efbcbea86e1c42f27add2ea9dbe76d4123d24ee868538c707e82e3c7538f2183a6482e62f1038475af46717005938d77c7900ae3a5a1cc3a7 source-build-v3.1.416-SDK.tar.gz
d0aecbf13e6781ef867021085e0d4a55e5f24dddfd175e4d0ce651fdb9c8e330636b2c69e3c4491442e5dd32c6859f38388006b3fe36fac2226837e1bc4107c9 completions.zsh
e61b9e3e5a2305646a616d598378230c9755c5dd5363692cc363f8f4add3807563c324dd86f3a7ae9d358c82d730608e7b293935a2b6c81c0c0f62d752a0a1cf dotnet.sh
09e8ba94973d4ab1017818eba7e13c4bda97b658dc6e0c15becb5211d15cad42df484b4c18f25f5dca1a02e647221013378ceb5c77a4046a107ff36df92641d2 application-insights_fix-net40-location.patch
42a52f1e47acf71287c13fadd9ddcd1481b88f9a3dbcebf6b43fc6cf712b19036020b544db582fb63ab9bb9e94d13b88938c5c82df3cb760a4d5cb14098653dd build_darc-fix-alpine.patch
eddb4c2ea4788c74b290112751831c0cced057470c0f514f103d8efd583e555fddb63544a9c1b1afee87f7ad96d8b3546ac46e60744aca25a1d977f7b1341f61 build_ignore-warnings.patch
6fb903f5abb0c377f1eac6df7e1eef8e15090a0dc1b6b4d65b887290e44e5ea525110c506e8d93dedc1f9ec9299e44a4091dea809210dd8cb40ee26e302e54dc coreclr_non-portable-distrorid-fix-alpine.patch
3eb003e31ac4dc782c0724c92be626279accddb589455d6457b18ad4afd5b97304de93a309359bccb7000f379aad9648cd07f0e047458875643e22182dfeb891 coreclr_fix-build-on-Alpine-edge-45352.patch
64de5c40ea00f725d570b60304b1017681fe6f7915c8c854f6892838505561e577e93904c03fd626a37dac3a1dcf000f1dcea5560cd3498b18c58d705b252776 core-sdk_generate-layout-core-setup-blob-path-fix.patch
0ebbf375936ffa1c274746139127a361bec065f7a7f729ab98ba6252f06b59ceaba17f981e36722d34a652f8e704a9ffe08bf381bc9c82a2b7cdbe910ef54397 core-setup_rid-plat-generation-on-alpine-fix.patch
b15845a35b6b8232d492c0df172bcf7d4a8abd0f1d4c3678aa7ea25175075b89b6bec2481c7fc63d57c922bc0f6f5a5d5411e88981138c01dc724cee938f93af corefx_fix-build-clang10.patch
d1ed367df3842df4aa06917bfcf849e4b87b6c2b6c8f94c148d16dd813d8e55beca599ed431c23c8ee398385e3ee2010341dda1f459f68c8db1943383a57e5f2 corefx_added-alpine-315-rid.patch
1ef3cb59231b7462167f782cbfcacee4a7bc7d73ec635de4ea3f4510cc6d46c5548ce2ec2ce3d3943bf6d1c29cb288dc1c82f1b22fe1c61fb6013e2df728467e application-insights_fix-net40-location.patch
f945552c083828e80031bdae584514aa8e7eb64544cc1fc3ca658a4162303f2a1caf076f44bc567c34ed2cf4c42323eaaafae0719adf9855756af125a566e99b build_darc-fix-alpine.patch
bd28775f37c9d448eab52922d0b8e0a6a32a3e16f772337850c48bd886e0302f97423b7b58dbc010c30764772f0bc00115ace72422dd12f447a5282ae62da4b3 build_ignore-warnings.patch
dcbb3824acb432739b08d329a5b2f95a32d806bdb4a11d3cdd0245724e6ee92ee85bbf30f5a0f6607598f5252cd9cdaf92cea5101d33b4bf5161b7b22b853c0e coreclr_non-portable-distrorid-fix-alpine.patch
5dffe94647daebd0a56ffd63db7f7f64ac7c4b279aa7189396d792fe4143989a91ffdb86f687dea3caa2475ac2ad43b95abcddacd175fef392bd24b52c957964 core-sdk_generate-layout-core-setup-blob-path-fix.patch
c31456b3480507f94bce18bacb714553fb4e26d4ad8cdc54ea83fa2e1651bf4c079f81e48b499d39de32d3ebc70418e4fc07ce75f781b4d65d36f8b8da4e895e core-setup_rid-plat-generation-on-alpine-fix.patch
2e05046b087670ff95c9df585b0d5d153518e1b2d7abc3288217e067728620fb85bf9bd8ec1541433fdae694fcb11dacaf5448fa4acd812afcfaa869f17e7fcd corefx_fix-build-clang10.patch
2fd67942f2f93e950e5977296b553ebbd9316f9e9be380a74673e18836bacebfa005cab0d6e8f02d1dd4a67a92d6d526522393dd2fa8b7bc22f1165af87b7dac corefx_added-alpine-315-rid.patch
"

View file

@ -1,13 +1,12 @@
From 387efb0ac01e40cd85cf9f5ce770be6437265ca4 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Patch-Source: https://github.com/microsoft/ApplicationInsights-dotnet/issues/2498
From: Antoine Martin <dev@ayakael.net>
Date: Fri, 4 Jun 2021 13:32:53 +0000
Subject: [PATCH] FIxed Net40 location
Because paths on Linux are case sensitive. Applications insights looks
for <dotnet/applicationsinsights>/src/Core/Managed/net40 in net40
while the repo has a Net40. Patch moves whatever is in Net40 to net40
(see https://github.com/microsoft/ApplicationInsights-dotnet/issues/2498)
---
src/Core/Managed/{Net40 => net40}/CorrelationHelper.cs | 0
1 file changed, 0 insertions(+), 0 deletions(-)

View file

@ -1,5 +1,6 @@
From d07d50c6f8a5793badc50fb2c964b87dec87a3a1 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Patch-Source: https://github.com/dotnet/source-build/issues/1868)
From: Antoine Martin <dev@ayakael.net>
Date: Thu, 15 Jul 2021 15:37:33 +0000
Subject: [PATCH 1/1] Fixed darc init for Alpine
@ -8,8 +9,6 @@ binary architecture. This patch deletes all the wrong ones so that it
is forced to chose the correct one. This issue only occurs when using
dotnet-stage0-runtime, thus libunwind is suspected to be the issue as
stage0 wasn't built with system libunwind.
(see https://github.com/dotnet/source-build/issues/1868)
---
eng/common/darc-init.sh | 3 +++
1 file changed, 3 insertions(+)

View file

@ -1,5 +1,5 @@
From 764e5310c8059931cd542c5cdc869972d3520696 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
From: Antoine Martin <dev@ayakael.net>
Date: Mon, 10 Jan 2022 23:21:55 +0000
Subject: [PATCH 1/1] ignore warnings

View file

@ -1,5 +1,5 @@
From 94e8b5473285f0ae97204c726b2f8119f178f197 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
From: Antoine Martin <dev@ayakael.net>
Date: Sun, 5 Dec 2021 15:33:35 +0000
Subject: [PATCH 1/1] GenerateLayout CoreSetup blob path fix

View file

@ -1,5 +1,6 @@
From c65a25ff18fa16dd0f134897b93919eab6a57bb9 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Patch-Source: https://github.com/dotnet/core-setup/pull/9195
From: Antoine Martin <dev@ayakael.net>
Date: Sat, 4 Dec 2021 06:12:30 +0000
Subject: [PATCH 1/1] Fixed __rid_plat generation on alpine for core-setup
@ -7,7 +8,6 @@ Subject: [PATCH 1/1] Fixed __rid_plat generation on alpine for core-setup
Generated RID is expected to be alpine.x.xx-xx, while the computed RID
is linux-musl-xxx. This patches it by matching what's expected.
(see https://github.com/dotnet/core-setup/pull/9195)
---
src/corehost/build.sh | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

View file

@ -1,34 +0,0 @@
From 1c1678176e499ef0709edc7d35fec0d69d17f636 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Date: Sat, 10 Jul 2021 06:02:50 +0000
Subject: [PATCH] Fix build on Alpine edge (#45352)
Fixes a build error for Alpine Linux. It has since been fixed in dotnet-5.0,
(see https://github.com/runtime/pull/45352
---
src/pal/src/include/pal/palinternal.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/pal/src/include/pal/palinternal.h b/src/pal/src/include/pal/palinternal.h
index 77978f30d7..bcc8d0d947 100644
--- a/src/pal/src/include/pal/palinternal.h
+++ b/src/pal/src/include/pal/palinternal.h
@@ -173,6 +173,7 @@ function_name() to call the system's implementation
#define memset DUMMY_memset
#define memmove DUMMY_memmove
#define memchr DUMMY_memchr
+#define atoll DUMMY_atoll
#define strlen DUMMY_strlen
#define stricmp DUMMY_stricmp
#define strstr DUMMY_strstr
@@ -371,6 +372,7 @@ function_name() to call the system's implementation
#undef memset
#undef memmove
#undef memchr
+#undef atoll
#undef strlen
#undef strnlen
#undef wcsnlen
--
2.30.2

View file

@ -1,5 +1,6 @@
From 88a1cd85cbc73631d67406b3ad740ee7bd36bc8b Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Patch-Source: https://github.com/dotnet/coreclr/pull/28227
From: Antoine Martin <dev@ayakael.net>
Date: Sat, 4 Dec 2021 05:03:48 +0000
Subject: [PATCH 1/1] Fix non-portable distrorid alpine generation
@ -9,8 +10,6 @@ version, init-distro-id.sh includes the micro version. This patches it
to cut off the trailing subversion off of VERSION_ID by treating it
the same way RHEL's VERSION_ID is treated.
(see https://github.com/dotnet/coreclr/pull/28227)
---
init-distro-rid.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

View file

@ -1,11 +1,11 @@
From 4243324d64dda9fbcaa76c37cf1e5090205d0320 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Patch-Source: https://github.com/dotnet/corefx/pull/43129
From: Antoine Martin <dev@ayakael.net>
Date: Sat, 4 Dec 2021 04:59:26 +0000
Subject: [PATCH 1/1] Added Alpine 3.15 rid
Adds RID for Alpine 3.15
(see https://github.com/dotnet/corefx/pull/43129)
---
.../runtime.compatibility.json | 53 ++++++++++++++++++-
pkg/Microsoft.NETCore.Platforms/runtime.json | 13 ++++-

View file

@ -1,11 +1,11 @@
From cfd492403e5a0f8d7d170937ca71a2bbe40563a3 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Patch-Source: https://github.com/dotnet/corefx/pull/43130
From: Antoine Martin <dev@ayakael.net>
Date: Thu, 29 Jul 2021 19:49:08 +0000
Subject: [PATCH 1/1] fix build clang10
Fixes a build error for clang 10
(see https://github.com/dotnet/corefx/pull/43130)
---
src/Native/Unix/CMakeLists.txt | 2 ++
1 file changed, 2 insertions(+)

View file

@ -1,6 +1,14 @@
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
#
# Variables for dotnet build version 3.1
# This APKBUILD is designed to be the same for version 5.0 and under
# except for the variables in this first section
#
pkgname=dotnet31
pkgver=3.1.120
pkgver=3.1.416
pkgrel=0
_pkgrel="-SDK"
_runtimever=3.1.20
@ -12,15 +20,17 @@ _patches="
build_darc-fix-alpine.patch
build_ignore-warnings.patch
coreclr_non-portable-distrorid-fix-alpine.patch
coreclr_fix-build-on-Alpine-edge-45352.patch
core-sdk_generate-layout-core-setup-blob-path-fix.patch
core-setup_rid-plat-generation-on-alpine-fix.patch
corefx_fix-build-clang10.patch
corefx_added-alpine-315-rid.patch
"
"
# Custom prepare
default_prepare() {
return
}
# Following for for dotnet builds version 5.0 and under
_pkgver_macro=${pkgver%.*}
_pkgver_prior=${pkgver%.*.*}
_pkgver_name=${_pkgver_macro//[.0]}
@ -28,14 +38,15 @@ pkgdesc="The .NET $_pkgver_macro SDK"
arch="x86_64"
url=https://www.microsoft.com/net/core
license="MIT"
_bootstrap_pkg="bootstrap"
makedepends="
bash
clang
cmake
dotnet$_pkgver_name-bootstrap-runtime
dotnet$_pkgver_name-bootstrap-sdk
dotnet$_pkgver_name-bootstrap-artifacts
dotnet$_pkgver_name-bootstrap-references
dotnet$_pkgver_name-$_bootstrap_pkg-runtime
dotnet$_pkgver_name-$_bootstrap_pkg-sdk
dotnet$_pkgver_name-$_bootstrap_pkg-artifacts
dotnet$_pkgver_name-$_bootstrap_pkg-references
findutils
git
icu-dev
@ -53,15 +64,33 @@ makedepends="
nodejs
openssl-dev
zlib-dev
"
"
options="!check" # No test suite
source="
source-build-v$pkgver$_pkgrel.tar.gz::https://github.com/dotnet/source-build/archive/refs/tags/v$pkgver$_pkgrel.tar.gz
completions.zsh::https://raw.githubusercontent.com/dotnet/sdk/7cec6d9fe5cb326a88091ae44204f52e1f00e69c/scripts/_dotnet
dotnet.sh
$_patches
"
"
subpackages="
aspnetcore$_pkgver_name-runtime:aspnetcore_runtime:noarch:$_aspnetver
aspnetcore$_pkgver_name-targeting-pack:aspnetcore_targeting_pack:noarch:$_aspnetver
dotnet$_pkgver_name-apphost-pack:apphost_pack:$_runtimever
dotnet$_pkgver_name-artifacts:artifacts:$_sdkver
dotnet$_pkgver_name-host:host:$_runtimever
dotnet$_pkgver_name-host-zsh-completion:zshcomp:$_runtimever
dotnet$_pkgver_name-host-bash-completion:bashcomp:$_runtimever
dotnet$_pkgver_name-host-doc:doc:$_runtimever
dotnet$_pkgver_name-hostfxr:hostfxr:$_runtimever
dotnet$_pkgver_name-runtime:runtime:$_runtimever
dotnet$_pkgver_name-sdk:sdk:$_sdkver
dotnet$_pkgver_name-targeting-pack:targeting_pack:noarch:$_runtimever
dotnet$_pkgver_name-templates:templates:noarch:$_sdkver
netstandard$_pkgver_name-targeting-pack:netstandard_targeting_pack:noarch:$_sdkver
"
builddir="$srcdir/source-build-$pkgver$_pkgrel"
# Custom patch logics for dotnet version 5.0 and under
_patch() {
local i failed=
if ! have_patches; then
@ -84,6 +113,7 @@ _patch() {
;;
esac
done
if [ -z "$failed" ]; then
return 0
fi
@ -92,27 +122,71 @@ _patch() {
printf " %s\n" "$i"
done
}
# custom function that updates stage1 for all dotnet versions
#
# buildrepo doesn't know to rebuild dotnet after first build with stage1
# this creates another package that forces the a first build of dotnet
# so that the final build of dotnet is guaranteed to be built with
# Alpine binaries.
_update_stage1() {
msg "Updating stage1 APKBUILD"
# Copy patches
rm ../dotnet$_pkgver_name-stage1/*.patch ../dotnet$_pkgver_name-stage1/dotnet.sh
for i in ../dotnet"$_pkgver_name"/*.patch ../dotnet"$_pkgver_name"/dotnet.sh; do
cp $i ${i/$_pkgver_name/$_pkgver_name-stage1}
done
# Generate stage1
{
echo -n "# "
echo "Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>"
echo "# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>"
echo
echo "#"
echo "# This is generated from dotnet$_pkgver_name's APKBUILD."
echo "# Any modifications to be done in main APKBUILD and propagated by"
echo -n "# executing 'abuild _update_stage1'"
sed \
-e "s/pkgname=dotnet$_pkgver_name/pkgname=dotnet$_pkgver_name-stage1/" \
-e "s/_bootstrap_pkg=\"bootstrap\"/_bootstrap_pkg=\"stage0\"/" \
-e "1,2d" \
../dotnet$_pkgver_name/APKBUILD
} > ../dotnet$_pkgver_name-stage1/APKBUILD
}
prepare() {
default_prepare
# source-build expects to be in a git repo
git init
git add ./* >/dev/null 2>&1
git commit -m 'initial commit' >/dev/null 2>&1
git remote add origin https://github.com/dotnet/source-build.git > /dev/null 2>&1
git add ./*
git commit -m 'initial commit'
git remote add origin https://github.com/dotnet/source-build.git
_patch
msg "Settings up bootstrap"
mkdir -p bootstrap/sdk
cp /usr/share/dotnet/dotnet bootstrap/.
local _bootstrapver=$(find /usr/share/dotnet/sdk/$_pkgver_macro* -maxdepth 0 -type d | tail -n1 | sed 's|..*\/||')
for i in sdk/$_bootstrapver host shared; do cp -r /usr/share/dotnet/$i bootstrap/$i; done
mkdir -p packages/archive
local _artifactsver=$(find /usr/share/dotnet/artifacts/$_pkgver_macro* -maxdepth 0 -type d | tail -n1 | sed 's|..*\/||')
tar cvzf packages/archive/Private.SourceBuilt.Artifacts.tar.gz -C "/usr/share/dotnet/artifacts/$_artifactsver" . >/dev/null 2>&1
tar cvzf packages/archive/Private.SourceBuild.ReferencePackages.tar.gz -C "/usr/share/dotnet/reference-packages/$_pkgver_macro" . >/dev/null 2>&1
tar cvzf packages/archive/Private.SourceBuilt.Artifacts.tar.gz -C "/usr/share/dotnet/artifacts/$_artifactsver" .
tar cvzf packages/archive/Private.SourceBuild.ReferencePackages.tar.gz -C "/usr/share/dotnet/reference-packages/$_pkgver_macro" .
}
build() {
msg "Building $pkgname-$pkgver"
export SOURCE_BUILD_SKIP_SUBMODULE_CHECK=1
# Disable tracing, which is incompatible with certain versions of
# lttng See https://github.com/dotnet/runtime/issues/57784. The
# suggested compile-time change doesn't work, unfortunately.
export COMPlus_LTTng=0
./build.sh \
--with-sdk bootstrap \
/p:SkipDownloadingPreviouslySourceBuiltPackages=true \
@ -123,56 +197,18 @@ build() {
/p:UseSystemLibraries=true \
/p:UseSystemLibunwind=true
}
scan_symlink_targets() {
local name="$1" dir="$2"
local ver=$(pkginfo_val pkgver "$dir"/.PKGINFO)
local subpkgarch=$(pkginfo_val arch "$dir"/.PKGINFO)
[ -d "$REPODEST"/${repo:?}/${subpkgarch/noarch/$CARCH} ] || mkdir -p "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}
[ "$ver" = "$pkgver-r$pkgrel" ] || ln -sf "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}/$name-$ver.apk "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}/$name-$pkgver-r$pkgrel.apk
}
_update_stage1() {
local pwd=$(pwd)
rm ../dotnet$_pkgver_name-stage1/*.patch ../dotnet$_pkgver_name-stage1/dotnet.sh
for i in ../dotnet"$_pkgver_name"/*.patch ../dotnet"$_pkgver_name"/dotnet.sh; do
cp $i ${i/$_pkgver_name/$_pkgver_name-stage1}
done
{
echo -n "# "
echo "Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>"
echo ". ../dotnet$_pkgver_name/APKBUILD"
sed "s/pkgname=dotnet$_pkgver_name/pkgname=dotnet$_pkgver_name-stage1/" ../dotnet$_pkgver_name/lib/00_main.sh
echo "makedepends=\"\${makedepends//$_pkgver_name-bootstrap/$_pkgver_name-stage0}\""
} > ../dotnet$_pkgver_name-stage1/APKBUILD
cd ../dotnet$_pkgver_name-stage1
abuild checksum
cd "$pwd"
}
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-artifacts:artifacts
dotnet$_pkgver_name-host:host
dotnet$_pkgver_name-host-zsh-completion:zshcomp
dotnet$_pkgver_name-host-bash-completion:bashcomp
dotnet$_pkgver_name-host-doc:doc
dotnet$_pkgver_name-hostfxr:hostfxr
dotnet$_pkgver_name-runtime:runtime
dotnet$_pkgver_name-sdk:sdk
dotnet$_pkgver_name-targeting-pack:targeting_pack:noarch
dotnet$_pkgver_name-templates:templates:noarch
netstandard$_pkgver_name-targeting-pack:netstandard_targeting_pack:noarch
"
package() {
depends="dotnet$_pkgver_name-sdk"
provides=dotnet-$_pkgver_macro
install -dm 755 "$pkgdir"/usr/share/zsh/site-functions "$pkgdir"/usr/share/bash-completion/completions "$pkgdir"/usr/share/man/man1
find "$builddir" -iname 'dotnet*.1' -type f -exec cp '{}' "$pkgdir"/usr/share/man/man1/ \;
install -m 755 "$srcdir"/completions.zsh "$pkgdir"/usr/share/zsh/site-functions/_dotnet
install -m 755 "$builddir"/artifacts/src/sdk/scripts/register-completions.bash "$pkgdir"/usr/share/bash-completion/completions/_dotnet
}
sdk() {
pkgver="$_sdkver"
depends="
aspnetcore$_pkgver_name-runtime
aspnetcore$_pkgver_name-targeting-pack
@ -181,158 +217,183 @@ sdk() {
dotnet$_pkgver_name-targeting-pack
dotnet$_pkgver_name-templates
netstandard21-targeting-pack
"
"
provider_priority=$_pkgver_prior
provides="dotnet$_pkgver_name-bootstrap-sdk dotnet-sdk-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./sdk
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-sdk
}
host() {
pkgdesc="A generic driver for the .NET Core Command Line Interface"
pkgver=$_runtimever
provides="dotnet-host"
provider_priority=$_pkgver_prior
cd $builddir/artifacts/x64/Release
install -dm 755 "$subpkgdir"/etc/profile.d "$subpkgdir"/usr/bin "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses/dotnet-host
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./dotnet
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/licenses/dotnet-host/ --no-same-owner ./LICENSE.txt ./ThirdPartyNotices.txt
ln -s /usr/share/dotnet/dotnet "$subpkgdir"/usr/bin/dotnet
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."
pkgver=$_runtimever
depends="dotnet-host"
provides="dotnet-hostfxr-$_pkgver_macro"
provider_priority=$_pkgver_prior
cd $builddir/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./host
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-hostfxr
}
runtime() {
pkgdesc="The .NET $_pkgver_macro Core runtime"
pkgver=$_runtimever
depends="dotnet$_pkgver_name-hostfxr"
provides="
dotnet$_pkgver_name-bootstrap-runtime
dotnet-runtime-$_pkgver_macro
"
"
provider_priority=$_pkgver_prior
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./shared/Microsoft.NETCore.App
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-runtime
}
aspnetcore_runtime() {
pkgdesc="The ASP.NET $_pkgver_macro Core runtime"
pkgver=$_aspnetver
depends="dotnet$_pkgver_name-runtime"
provides="aspnetcore-runtime-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./shared/Microsoft.AspNetCore.App
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/aspnetcore$_pkgver_name-runtime
}
apphost_pack() {
pkgdesc="The .NET $_pkgver_macro Core apphost pack"
pkgver=$_aspnetver
provides="dotnet-apphost-pack-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner --wildcards ./packs/Microsoft.NETCore.App.Host.*
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-apphost-pack
}
targeting_pack() {
pkgdesc="The .NET $_pkgver_macro Core targeting pack"
pkgver=$_runtimever
provides="dotnet-targeting-pack-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/Microsoft.NETCore.App.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-targeting-pack
}
netstandard_targeting_pack() {
pkgdesc="The .NET $_pkgver_macro Standard targeting pack"
pkgver=$_sdkver
depends="dotnet-host"
provides="
netstandard21-targeting-pack
netstandard-targeting-pack-2.1
"
"
provider_priority=$_pkgver_prior
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/NETStandard.Library.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/netstandard21-targeting-pack
}
aspnetcore_targeting_pack() {
pkgdesc="The ASP.NET $_pkgver_macro Core targeting pack"
pkgver=$_runtimever
provides="aspnetcore-targeting-pack-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/Microsoft.AspNetCore.App.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/aspnetcore$_pkgver_name-targeting-pack
}
templates() {
pkgdesc="The .NET $_pkgver_macro templates"
depends="dotnet-host"
pkgver="$_sdkver"
provider_priority=$_pkgver_prior
provides="dotnet-templates-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./templates
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-templates
}
artifacts() {
pkgdesc="Internal package for building .NET $_pkgver_macro Software Development Kit"
depends="dotnet-host"
pkgver=$_sdkver
provides="dotnet$_pkgver_name-bootstrap-artifacts"
provider_priority=$_pkgver_prior
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver "$subpkgdir"/usr/share/licenses
tar -xzf Private.SourceBuilt.Artifacts.*.tar.gz -C "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver/
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-artifacts
}
zshcomp() {
default_zshcomp
pkgdesc="zsh completion for .NET $_pkgver_macro"
pkgver=$_runtimever
depends="dotnet-host"
provides="dotnet-host-zsh-completion"
provider_priority=$_pkgver_prior
}
bashcomp() {
default_bashcomp
pkgdesc="bash completion for .NET $_pkgver_macro"
pkgver=$_runtimever
depends="dotnet-host"
provides="dotnet-host-bash-completion"
provider_priority=$_pkgver_prior
}
doc() {
default_doc
pkgdesc="Docs for .NET $_pkgver_macro"
pkgver="$_runtimever"
provides="dotnet-host-doc"
provider_priority=$_pkgver_prior
}
sha512sums="
33b0f76ca72e6b2ebef50338b6c4208e02f513ebfc67525481f945c12359ea030fe48017971d9f64522dc2f829beff790f10ba79e3b579c2ef90703fe9b4b27d source-build-v3.1.120-SDK.tar.gz
651c59c44ec2492efbcbea86e1c42f27add2ea9dbe76d4123d24ee868538c707e82e3c7538f2183a6482e62f1038475af46717005938d77c7900ae3a5a1cc3a7 source-build-v3.1.416-SDK.tar.gz
d0aecbf13e6781ef867021085e0d4a55e5f24dddfd175e4d0ce651fdb9c8e330636b2c69e3c4491442e5dd32c6859f38388006b3fe36fac2226837e1bc4107c9 completions.zsh
e61b9e3e5a2305646a616d598378230c9755c5dd5363692cc363f8f4add3807563c324dd86f3a7ae9d358c82d730608e7b293935a2b6c81c0c0f62d752a0a1cf dotnet.sh
09e8ba94973d4ab1017818eba7e13c4bda97b658dc6e0c15becb5211d15cad42df484b4c18f25f5dca1a02e647221013378ceb5c77a4046a107ff36df92641d2 application-insights_fix-net40-location.patch
42a52f1e47acf71287c13fadd9ddcd1481b88f9a3dbcebf6b43fc6cf712b19036020b544db582fb63ab9bb9e94d13b88938c5c82df3cb760a4d5cb14098653dd build_darc-fix-alpine.patch
eddb4c2ea4788c74b290112751831c0cced057470c0f514f103d8efd583e555fddb63544a9c1b1afee87f7ad96d8b3546ac46e60744aca25a1d977f7b1341f61 build_ignore-warnings.patch
6fb903f5abb0c377f1eac6df7e1eef8e15090a0dc1b6b4d65b887290e44e5ea525110c506e8d93dedc1f9ec9299e44a4091dea809210dd8cb40ee26e302e54dc coreclr_non-portable-distrorid-fix-alpine.patch
3eb003e31ac4dc782c0724c92be626279accddb589455d6457b18ad4afd5b97304de93a309359bccb7000f379aad9648cd07f0e047458875643e22182dfeb891 coreclr_fix-build-on-Alpine-edge-45352.patch
64de5c40ea00f725d570b60304b1017681fe6f7915c8c854f6892838505561e577e93904c03fd626a37dac3a1dcf000f1dcea5560cd3498b18c58d705b252776 core-sdk_generate-layout-core-setup-blob-path-fix.patch
0ebbf375936ffa1c274746139127a361bec065f7a7f729ab98ba6252f06b59ceaba17f981e36722d34a652f8e704a9ffe08bf381bc9c82a2b7cdbe910ef54397 core-setup_rid-plat-generation-on-alpine-fix.patch
b15845a35b6b8232d492c0df172bcf7d4a8abd0f1d4c3678aa7ea25175075b89b6bec2481c7fc63d57c922bc0f6f5a5d5411e88981138c01dc724cee938f93af corefx_fix-build-clang10.patch
d1ed367df3842df4aa06917bfcf849e4b87b6c2b6c8f94c148d16dd813d8e55beca599ed431c23c8ee398385e3ee2010341dda1f459f68c8db1943383a57e5f2 corefx_added-alpine-315-rid.patch
1ef3cb59231b7462167f782cbfcacee4a7bc7d73ec635de4ea3f4510cc6d46c5548ce2ec2ce3d3943bf6d1c29cb288dc1c82f1b22fe1c61fb6013e2df728467e application-insights_fix-net40-location.patch
f945552c083828e80031bdae584514aa8e7eb64544cc1fc3ca658a4162303f2a1caf076f44bc567c34ed2cf4c42323eaaafae0719adf9855756af125a566e99b build_darc-fix-alpine.patch
bd28775f37c9d448eab52922d0b8e0a6a32a3e16f772337850c48bd886e0302f97423b7b58dbc010c30764772f0bc00115ace72422dd12f447a5282ae62da4b3 build_ignore-warnings.patch
dcbb3824acb432739b08d329a5b2f95a32d806bdb4a11d3cdd0245724e6ee92ee85bbf30f5a0f6607598f5252cd9cdaf92cea5101d33b4bf5161b7b22b853c0e coreclr_non-portable-distrorid-fix-alpine.patch
5dffe94647daebd0a56ffd63db7f7f64ac7c4b279aa7189396d792fe4143989a91ffdb86f687dea3caa2475ac2ad43b95abcddacd175fef392bd24b52c957964 core-sdk_generate-layout-core-setup-blob-path-fix.patch
c31456b3480507f94bce18bacb714553fb4e26d4ad8cdc54ea83fa2e1651bf4c079f81e48b499d39de32d3ebc70418e4fc07ce75f781b4d65d36f8b8da4e895e core-setup_rid-plat-generation-on-alpine-fix.patch
2e05046b087670ff95c9df585b0d5d153518e1b2d7abc3288217e067728620fb85bf9bd8ec1541433fdae694fcb11dacaf5448fa4acd812afcfaa869f17e7fcd corefx_fix-build-clang10.patch
2fd67942f2f93e950e5977296b553ebbd9316f9e9be380a74673e18836bacebfa005cab0d6e8f02d1dd4a67a92d6d526522393dd2fa8b7bc22f1165af87b7dac corefx_added-alpine-315-rid.patch
"

View file

@ -25,7 +25,6 @@ APKBUILD for dotnet31
versions)
# Special functions
* ./build_apkbuild.sh: Builds APKBUILD using scripts in lib
* abuild _update_stage1: Updates dotnet31-stage1 to current version
# Known issues

View file

@ -1,13 +1,12 @@
From 387efb0ac01e40cd85cf9f5ce770be6437265ca4 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Patch-Source: https://github.com/microsoft/ApplicationInsights-dotnet/issues/2498
From: Antoine Martin <dev@ayakael.net>
Date: Fri, 4 Jun 2021 13:32:53 +0000
Subject: [PATCH] FIxed Net40 location
Because paths on Linux are case sensitive. Applications insights looks
for <dotnet/applicationsinsights>/src/Core/Managed/net40 in net40
while the repo has a Net40. Patch moves whatever is in Net40 to net40
(see https://github.com/microsoft/ApplicationInsights-dotnet/issues/2498)
---
src/Core/Managed/{Net40 => net40}/CorrelationHelper.cs | 0
1 file changed, 0 insertions(+), 0 deletions(-)

View file

@ -1,9 +0,0 @@
#/bin/bash
echo "# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>" > APKBUILD
apkbuild-lint lib/*
# Build APKBUILD
sed 's:^\s*#.*$::g' lib/* >> APKBUILD
sed -i '/^[[:space:]]*$/d' APKBUILD
abuild checksum

View file

@ -1,5 +1,6 @@
From d07d50c6f8a5793badc50fb2c964b87dec87a3a1 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Patch-Source: https://github.com/dotnet/source-build/issues/1868)
From: Antoine Martin <dev@ayakael.net>
Date: Thu, 15 Jul 2021 15:37:33 +0000
Subject: [PATCH 1/1] Fixed darc init for Alpine
@ -8,8 +9,6 @@ binary architecture. This patch deletes all the wrong ones so that it
is forced to chose the correct one. This issue only occurs when using
dotnet-stage0-runtime, thus libunwind is suspected to be the issue as
stage0 wasn't built with system libunwind.
(see https://github.com/dotnet/source-build/issues/1868)
---
eng/common/darc-init.sh | 3 +++
1 file changed, 3 insertions(+)

View file

@ -1,5 +1,5 @@
From 764e5310c8059931cd542c5cdc869972d3520696 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
From: Antoine Martin <dev@ayakael.net>
Date: Mon, 10 Jan 2022 23:21:55 +0000
Subject: [PATCH 1/1] ignore warnings

View file

@ -1,5 +1,5 @@
From 94e8b5473285f0ae97204c726b2f8119f178f197 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
From: Antoine Martin <dev@ayakael.net>
Date: Sun, 5 Dec 2021 15:33:35 +0000
Subject: [PATCH 1/1] GenerateLayout CoreSetup blob path fix

View file

@ -1,5 +1,6 @@
From c65a25ff18fa16dd0f134897b93919eab6a57bb9 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Patch-Source: https://github.com/dotnet/core-setup/pull/9195
From: Antoine Martin <dev@ayakael.net>
Date: Sat, 4 Dec 2021 06:12:30 +0000
Subject: [PATCH 1/1] Fixed __rid_plat generation on alpine for core-setup
@ -7,7 +8,6 @@ Subject: [PATCH 1/1] Fixed __rid_plat generation on alpine for core-setup
Generated RID is expected to be alpine.x.xx-xx, while the computed RID
is linux-musl-xxx. This patches it by matching what's expected.
(see https://github.com/dotnet/core-setup/pull/9195)
---
src/corehost/build.sh | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

View file

@ -1,34 +0,0 @@
From 1c1678176e499ef0709edc7d35fec0d69d17f636 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Date: Sat, 10 Jul 2021 06:02:50 +0000
Subject: [PATCH] Fix build on Alpine edge (#45352)
Fixes a build error for Alpine Linux. It has since been fixed in dotnet-5.0,
(see https://github.com/runtime/pull/45352
---
src/pal/src/include/pal/palinternal.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/pal/src/include/pal/palinternal.h b/src/pal/src/include/pal/palinternal.h
index 77978f30d7..bcc8d0d947 100644
--- a/src/pal/src/include/pal/palinternal.h
+++ b/src/pal/src/include/pal/palinternal.h
@@ -173,6 +173,7 @@ function_name() to call the system's implementation
#define memset DUMMY_memset
#define memmove DUMMY_memmove
#define memchr DUMMY_memchr
+#define atoll DUMMY_atoll
#define strlen DUMMY_strlen
#define stricmp DUMMY_stricmp
#define strstr DUMMY_strstr
@@ -371,6 +372,7 @@ function_name() to call the system's implementation
#undef memset
#undef memmove
#undef memchr
+#undef atoll
#undef strlen
#undef strnlen
#undef wcsnlen
--
2.30.2

View file

@ -1,5 +1,6 @@
From 88a1cd85cbc73631d67406b3ad740ee7bd36bc8b Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Patch-Source: https://github.com/dotnet/coreclr/pull/28227
From: Antoine Martin <dev@ayakael.net>
Date: Sat, 4 Dec 2021 05:03:48 +0000
Subject: [PATCH 1/1] Fix non-portable distrorid alpine generation
@ -9,8 +10,6 @@ version, init-distro-id.sh includes the micro version. This patches it
to cut off the trailing subversion off of VERSION_ID by treating it
the same way RHEL's VERSION_ID is treated.
(see https://github.com/dotnet/coreclr/pull/28227)
---
init-distro-rid.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

View file

@ -1,11 +1,11 @@
From 4243324d64dda9fbcaa76c37cf1e5090205d0320 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Patch-Source: https://github.com/dotnet/corefx/pull/43129
From: Antoine Martin <dev@ayakael.net>
Date: Sat, 4 Dec 2021 04:59:26 +0000
Subject: [PATCH 1/1] Added Alpine 3.15 rid
Adds RID for Alpine 3.15
(see https://github.com/dotnet/corefx/pull/43129)
---
.../runtime.compatibility.json | 53 ++++++++++++++++++-
pkg/Microsoft.NETCore.Platforms/runtime.json | 13 ++++-

View file

@ -1,11 +1,11 @@
From cfd492403e5a0f8d7d170937ca71a2bbe40563a3 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Patch-Source: https://github.com/dotnet/corefx/pull/43130
From: Antoine Martin <dev@ayakael.net>
Date: Thu, 29 Jul 2021 19:49:08 +0000
Subject: [PATCH 1/1] fix build clang10
Fixes a build error for clang 10
(see https://github.com/dotnet/corefx/pull/43130)
---
src/Native/Unix/CMakeLists.txt | 2 ++
1 file changed, 2 insertions(+)

View file

@ -1,27 +0,0 @@
#
# Main functions for dotnet build version 3.1
#
pkgname=dotnet31
pkgver=3.1.120
pkgrel=0
_pkgrel="-SDK"
_runtimever=3.1.20
_sdkver=$pkgver
_aspnetver=$_runtimever
_llvmver=12
_patches="
application-insights_fix-net40-location.patch
build_darc-fix-alpine.patch
build_ignore-warnings.patch
coreclr_non-portable-distrorid-fix-alpine.patch
coreclr_fix-build-on-Alpine-edge-45352.patch
core-sdk_generate-layout-core-setup-blob-path-fix.patch
core-setup_rid-plat-generation-on-alpine-fix.patch
corefx_fix-build-clang10.patch
corefx_added-alpine-315-rid.patch
"
# Custom prepare
default_prepare() {
return
}

View file

@ -1,46 +0,0 @@
#
# Build variables for dotnet builds version 5.0 and under
#
# APKBuild
_pkgver_macro=${pkgver%.*}
_pkgver_prior=${pkgver%.*.*}
_pkgver_name=${_pkgver_macro//[.0]}
pkgdesc="The .NET $_pkgver_macro SDK"
arch="x86_64"
url=https://www.microsoft.com/net/core
license="MIT"
makedepends="
bash
clang
cmake
dotnet$_pkgver_name-bootstrap-runtime
dotnet$_pkgver_name-bootstrap-sdk
dotnet$_pkgver_name-bootstrap-artifacts
dotnet$_pkgver_name-bootstrap-references
findutils
git
icu-dev
inetutils-syslogd
krb5-dev
libgit2-dev
libintl
libunwind-dev
libxml2-dev
libxml2-utils
linux-headers
lldb-dev
llvm$_llvmver-dev
lttng-ust-dev
nodejs
openssl-dev
zlib-dev
"
options="!check" # No test suite
source="
source-build-v$pkgver$_pkgrel.tar.gz::https://github.com/dotnet/source-build/archive/refs/tags/v$pkgver$_pkgrel.tar.gz
completions.zsh::https://raw.githubusercontent.com/dotnet/sdk/7cec6d9fe5cb326a88091ae44204f52e1f00e69c/scripts/_dotnet
dotnet.sh
$_patches
"
builddir="$srcdir/source-build-$pkgver$_pkgrel"

View file

@ -1,79 +0,0 @@
#
# Build functions for dotnet builds version 5.0 and under
#
_patch() {
local i failed=
if ! have_patches; then
return 0
fi
[ -d "$builddir" ] || { error "Is \$builddir set correctly?"; return 1; }
msg "Deploying patches"
for i in $source; do
case ${i%::*} in
build_*.patch)
echo "applying $i to sourcebuild"
patch ${patch_args:--p1} -i "$srcdir/$(filename_from_uri $i)" || failed="$failed $i"
;;
*.patch)
local _package=$(echo $i | sed 's|_.*||')
local _patch=$(echo $i | sed "s|$_package\_||")
echo "deploying $_patch to $_package for application by sourcebuild"
[ -d patches/$_package ] || mkdir patches/$_package
cp "$srcdir"/"$i" patches/$_package/$_patch
;;
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
}
prepare() {
default_prepare
# source-build expects to be in a git repo
git init
git add ./* >/dev/null 2>&1
git commit -m 'initial commit' >/dev/null 2>&1
git remote add origin https://github.com/dotnet/source-build.git > /dev/null 2>&1
_patch
msg "Settings up bootstrap"
mkdir -p bootstrap/sdk
cp /usr/share/dotnet/dotnet bootstrap/.
local _bootstrapver=$(find /usr/share/dotnet/sdk/$_pkgver_macro* -maxdepth 0 -type d | tail -n1 | sed 's|..*\/||')
for i in sdk/$_bootstrapver host shared; do cp -r /usr/share/dotnet/$i bootstrap/$i; done
mkdir -p packages/archive
local _artifactsver=$(find /usr/share/dotnet/artifacts/$_pkgver_macro* -maxdepth 0 -type d | tail -n1 | sed 's|..*\/||')
tar cvzf packages/archive/Private.SourceBuilt.Artifacts.tar.gz -C "/usr/share/dotnet/artifacts/$_artifactsver" . >/dev/null 2>&1
tar cvzf packages/archive/Private.SourceBuild.ReferencePackages.tar.gz -C "/usr/share/dotnet/reference-packages/$_pkgver_macro" . >/dev/null 2>&1
}
build() {
msg "Building $pkgname-$pkgver"
export SOURCE_BUILD_SKIP_SUBMODULE_CHECK=1
# Disable tracing, which is incompatible with certain versions of
# lttng See https://github.com/dotnet/runtime/issues/57784. The
# suggested compile-time change doesn't work, unfrotunately.
export COMPlus_LTTng=0
./build.sh \
--with-sdk bootstrap \
/p:SkipDownloadingPreviouslySourceBuiltPackages=true \
/p:SkipDownloadingReferencePackages=true \
/p:ContinueOnPrebuiltBaselineError=true \
/p:SkipPortableRuntimeBuild=true \
/p:SkipPrebuiltEnforcement=true \
/p:UseSystemLibraries=true \
/p:UseSystemLibunwind=true
}

View file

@ -1,23 +0,0 @@
# abuild / buildrepo gets confused when setting pkgver var from within subpkgs
# This expresses itself in two ways:
# 1) scan_symlink_targets, when it detects symlink dependencies between subpkgs
# sets a hard dependency to that specific version of subpackage. Fixing this
# involves simply neutralizing scan_symlink_targets, leaving the maintainer
# to set those dependencies explicitely
# 2) abuild / buildrepo has logics to determine if a package should be rebuilt
# abuild uses apk_up2date and abuildindex_up2date, and buildrepo uses
# pkg.each_need_rebuild, then pkg.apk_file_exists. All of these rely on if
# there's a readable file at $repo/$CARCH/$name-$pkgver-r$pkgrel.apk
# Fixing this involves creating a symbolic link at that location that points
# to where the subpackage actually is.
# Fortunately, scan_symlink_targes has all the hooks necessary to create a
# symbolic link: it resides within a for loop that's based around subpkgdir,
# and feeds function with .PKGINFO info that allows for creation of symbolic
# link when necessary
scan_symlink_targets() {
local name="$1" dir="$2"
local ver=$(pkginfo_val pkgver "$dir"/.PKGINFO)
local subpkgarch=$(pkginfo_val arch "$dir"/.PKGINFO)
[ -d "$REPODEST"/${repo:?}/${subpkgarch/noarch/$CARCH} ] || mkdir -p "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}
[ "$ver" = "$pkgver-r$pkgrel" ] || ln -sf "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}/$name-$ver.apk "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}/$name-$pkgver-r$pkgrel.apk
}

View file

@ -1,20 +0,0 @@
_update_stage1() {
local pwd=$(pwd)
# Update symbolic link to patches
rm ../dotnet$_pkgver_name-stage1/*.patch ../dotnet$_pkgver_name-stage1/dotnet.sh
for i in ../dotnet"$_pkgver_name"/*.patch ../dotnet"$_pkgver_name"/dotnet.sh; do
cp $i ${i/$_pkgver_name/$_pkgver_name-stage1}
done
# Generate stage1
{
echo -n "# "
echo "Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>"
echo ". ../dotnet$_pkgver_name/APKBUILD"
sed "s/pkgname=dotnet$_pkgver_name/pkgname=dotnet$_pkgver_name-stage1/" ../dotnet$_pkgver_name/lib/00_main.sh
echo "makedepends=\"\${makedepends//$_pkgver_name-bootstrap/$_pkgver_name-stage0}\""
} > ../dotnet$_pkgver_name-stage1/APKBUILD
cd ../dotnet$_pkgver_name-stage1
abuild checksum
cd "$pwd"
}

View file

@ -1,221 +0,0 @@
#
# Packaging functions for dotnet builds 5.0 and under
#
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-artifacts:artifacts
dotnet$_pkgver_name-host:host
dotnet$_pkgver_name-host-zsh-completion:zshcomp
dotnet$_pkgver_name-host-bash-completion:bashcomp
dotnet$_pkgver_name-host-doc:doc
dotnet$_pkgver_name-hostfxr:hostfxr
dotnet$_pkgver_name-runtime:runtime
dotnet$_pkgver_name-sdk:sdk
dotnet$_pkgver_name-targeting-pack:targeting_pack:noarch
dotnet$_pkgver_name-templates:templates:noarch
netstandard$_pkgver_name-targeting-pack:netstandard_targeting_pack:noarch
"
package() {
depends="dotnet$_pkgver_name-sdk"
provides=dotnet-$_pkgver_macro
install -dm 755 "$pkgdir"/usr/share/zsh/site-functions "$pkgdir"/usr/share/bash-completion/completions "$pkgdir"/usr/share/man/man1
find "$builddir" -iname 'dotnet*.1' -type f -exec cp '{}' "$pkgdir"/usr/share/man/man1/ \;
install -m 755 "$srcdir"/completions.zsh "$pkgdir"/usr/share/zsh/site-functions/_dotnet
install -m 755 "$builddir"/artifacts/src/sdk/scripts/register-completions.bash "$pkgdir"/usr/share/bash-completion/completions/_dotnet
}
sdk() {
pkgver="$_sdkver"
depends="
aspnetcore$_pkgver_name-runtime
aspnetcore$_pkgver_name-targeting-pack
dotnet$_pkgver_name-apphost-pack
dotnet$_pkgver_name-runtime
dotnet$_pkgver_name-targeting-pack
dotnet$_pkgver_name-templates
netstandard21-targeting-pack
"
provider_priority=$_pkgver_prior
provides="dotnet$_pkgver_name-bootstrap-sdk dotnet-sdk-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./sdk
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-sdk
}
host() {
pkgdesc="A generic driver for the .NET Core Command Line Interface"
pkgver=$_runtimever
provides="dotnet-host"
provider_priority=$_pkgver_prior
cd $builddir/artifacts/x64/Release
install -dm 755 "$subpkgdir"/etc/profile.d "$subpkgdir"/usr/bin "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses/dotnet-host
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./dotnet
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/licenses/dotnet-host/ --no-same-owner ./LICENSE.txt ./ThirdPartyNotices.txt
ln -s /usr/share/dotnet/dotnet "$subpkgdir"/usr/bin/dotnet
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."
pkgver=$_runtimever
depends="dotnet-host"
provides="dotnet-hostfxr-$_pkgver_macro"
provider_priority=$_pkgver_prior
cd $builddir/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./host
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-hostfxr
}
runtime() {
pkgdesc="The .NET $_pkgver_macro Core runtime"
pkgver=$_runtimever
depends="dotnet$_pkgver_name-hostfxr"
provides="
dotnet$_pkgver_name-bootstrap-runtime
dotnet-runtime-$_pkgver_macro
"
provider_priority=$_pkgver_prior
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./shared/Microsoft.NETCore.App
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-runtime
}
aspnetcore_runtime() {
pkgdesc="The ASP.NET $_pkgver_macro Core runtime"
pkgver=$_aspnetver
depends="dotnet$_pkgver_name-runtime"
provides="aspnetcore-runtime-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./shared/Microsoft.AspNetCore.App
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/aspnetcore$_pkgver_name-runtime
}
apphost_pack() {
pkgdesc="The .NET $_pkgver_macro Core apphost pack"
pkgver=$_aspnetver
provides="dotnet-apphost-pack-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner --wildcards ./packs/Microsoft.NETCore.App.Host.*
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-apphost-pack
}
targeting_pack() {
pkgdesc="The .NET $_pkgver_macro Core targeting pack"
pkgver=$_runtimever
provides="dotnet-targeting-pack-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/Microsoft.NETCore.App.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-targeting-pack
}
netstandard_targeting_pack() {
pkgdesc="The .NET $_pkgver_macro Standard targeting pack"
pkgver=$_sdkver
depends="dotnet-host"
provides="
netstandard21-targeting-pack
netstandard-targeting-pack-2.1
"
provider_priority=$_pkgver_prior
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/NETStandard.Library.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/netstandard21-targeting-pack
}
aspnetcore_targeting_pack() {
pkgdesc="The ASP.NET $_pkgver_macro Core targeting pack"
pkgver=$_runtimever
provides="aspnetcore-targeting-pack-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/Microsoft.AspNetCore.App.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/aspnetcore$_pkgver_name-targeting-pack
}
templates() {
pkgdesc="The .NET $_pkgver_macro templates"
depends="dotnet-host"
pkgver="$_sdkver"
provider_priority=$_pkgver_prior
provides="dotnet-templates-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./templates
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-templates
}
artifacts() {
pkgdesc="Internal package for building .NET $_pkgver_macro Software Development Kit"
depends="dotnet-host"
pkgver=$_sdkver
provides="dotnet$_pkgver_name-bootstrap-artifacts"
provider_priority=$_pkgver_prior
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver "$subpkgdir"/usr/share/licenses
tar -xzf Private.SourceBuilt.Artifacts.*.tar.gz -C "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver/
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-artifacts
}
zshcomp() {
default_zshcomp
pkgdesc="zsh completion for .NET $_pkgver_macro"
pkgver=$_runtimever
depends="dotnet-host"
provides="dotnet-host-zsh-completion"
provider_priority=$_pkgver_prior
}
bashcomp() {
default_bashcomp
pkgdesc="bash completion for .NET $_pkgver_macro"
pkgver=$_runtimever
depends="dotnet-host"
provides="dotnet-host-bash-completion"
provider_priority=$_pkgver_prior
}
doc() {
default_doc
pkgdesc="Docs for .NET $_pkgver_macro"
pkgver="$_runtimever"
provides="dotnet-host-doc"
provider_priority=$_pkgver_prior
}

View file

@ -1,8 +1,16 @@
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Variables for dotnet-references build version 5.0
# This APKBUILD is designed to be the same for version 5.0 and under
# except for the variables in this first section
pkgname=dotnet5-references
pkgver=5.0.21566
pkgrel=0
_gittag=6ce5818b1c1828ccdc8ac63d460d029c6391a401
# Following for dotnet-references build version 5.0 and below
_pkgver_macro=${pkgver%.*}
_pkgver_prior=${pkgver%.*.*}
_pkgver_name=${_pkgver_macro//[.0]}
@ -18,36 +26,47 @@ makedepends="
dotnet$_pkgver_name-bootstrap-artifacts
findutils
icu-dev
"
"
provides=dotnet$_pkgver_name-bootstrap-references
provider_priority=$_pkgver_prior
options="!check" # No test suite
source="
source-build-reference-packages-$_gittag.tar.gz::https://github.com/dotnet/source-build-reference-packages/archive/$_gittag.tar.gz
sh-build-fix.patch
"
"
builddir="$srcdir"/source-build-reference-packages-$_gittag
prepare() {
default_prepare
# Link source-built-artifacts
local _artifactsver=$(find /usr/share/dotnet/artifacts/$_pkgver_macro* -maxdepth 0 -type d | tail -n1 | sed 's|..*\/||')
tar cvzf Private.SourceBuilt.Artifacts.tar.gz -C "/usr/share/dotnet/artifacts/$_artifactsver" . >/dev/null 2>&1
}
build() {
# Disable tracing, which is incompatible with certain versions of
# lttng See https://github.com/dotnet/runtime/issues/57784. The
# suggested compile-time change doesn't work, unfrotunately.
export COMPlus_LTTng=0
msg "Building $pkgname-$pkgver"
cd "$srcdir"/source-build-reference*
./build.sh \
--with-sdk "/usr/share/dotnet" \
--with-packages "$builddir"/Private.SourceBuilt.Artifacts.tar.gz \
| tee -a build.log
}
package() {
install -dm 755 "$pkgdir"/usr/share/dotnet/reference-packages/$_pkgver_macro "$pkgdir"/usr/share/licenses
cd $builddir/artifacts/reference-packages
install ./* "$pkgdir"/usr/share/dotnet/reference-packages/$_pkgver_macro/.
ln -s dotnet-host "$pkgdir"/usr/share/licenses/dotnet$_pkgver_name-references
}
sha512sums="
4d15c4a62342c6186053a5d9391567e0ee2c916382a1c81d6a8aff0dc0092f7889d49d7d5b357abda85d4c709d9599726bba8c2593236360b0373c35e3261208 source-build-reference-packages-6ce5818b1c1828ccdc8ac63d460d029c6391a401.tar.gz
2532e95dbe28be13089537afa60908450ac2ebc92016a3e2dcdb2c476b4e87eac8a306fb7b6fcb0f2d9b87ce20133c4627fa8912076de10706973832a4564e02 sh-build-fix.patch
8acf2f6df8310eee7a786715b304100247cfbaebae17c51449b0c81085763e5babd17774f995668f487107ebd5ac7a1cda77ebc8b91409c88725fcf63581d1ce sh-build-fix.patch
"

View file

@ -11,9 +11,6 @@ APKBUILD for dotnet5-references
* Build testing/dotnet5 (with repo bootstraps, provides full repo
versions)
# Special functions
* ./build_apkbuild.sh: Builds APKBUILD using scripts in lib
# Known issues
* While dotnet5 supports musl-arm64, builds for that architecture hasn't been
attempted due to lack of bootstrap SDK

View file

@ -1,9 +0,0 @@
#/bin/bash
echo "# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>" > APKBUILD
apkbuild-lint lib/*
# Build APKBUILD
sed 's:^\s*#.*$::g' lib/* >> APKBUILD
sed -i '/^[[:space:]]*$/d' APKBUILD
abuild checksum

View file

@ -1,8 +0,0 @@
#
# Main variables for dotnet-references build version 5.0
#
pkgname=dotnet5-references
pkgver=5.0.21566
pkgrel=0
_gittag=6ce5818b1c1828ccdc8ac63d460d029c6391a401

View file

@ -1,63 +0,0 @@
#
# Build functions for dotnet-references version 5.0 and under
#
_pkgver_macro=${pkgver%.*}
_pkgver_prior=${pkgver%.*.*}
_pkgver_name=${_pkgver_macro//[.0]}
pkgdesc="Reference packages needed by the .NET $_pkgver_name SDK build"
arch="x86_64"
url=https://www.microsoft.com/net/core
license="MIT"
makedepends="
bash
dotnet$_pkgver_name-stage1
dotnet$_pkgver_name-bootstrap-sdk
dotnet$_pkgver_name-bootstrap-runtime
dotnet$_pkgver_name-bootstrap-artifacts
findutils
icu-dev
"
provides=dotnet$_pkgver_name-bootstrap-references
provider_priority=$_pkgver_prior
options="!check" # No test suite
source="
source-build-reference-packages-$_gittag.tar.gz::https://github.com/dotnet/source-build-reference-packages/archive/$_gittag.tar.gz
sh-build-fix.patch
"
builddir="$srcdir"/source-build-reference-packages-$_gittag
prepare() {
default_prepare
# Link source-built-artifacts
local _artifactsver=$(find /usr/share/dotnet/artifacts/$_pkgver_macro* -maxdepth 0 -type d | tail -n1 | sed 's|..*\/||')
tar cvzf Private.SourceBuilt.Artifacts.tar.gz -C "/usr/share/dotnet/artifacts/$_artifactsver" . >/dev/null 2>&1
}
build() {
# Disable tracing, which is incompatible with certain versions of
# lttng See https://github.com/dotnet/runtime/issues/57784. The
# suggested compile-time change doesn't work, unfrotunately.
export COMPlus_LTTng=0
msg "Building $pkgname-$pkgver"
cd "$srcdir"/source-build-reference*
./build.sh \
--with-sdk "/usr/share/dotnet" \
--with-packages "$builddir"/Private.SourceBuilt.Artifacts.tar.gz \
| tee -a build.log
}
package() {
install -dm 755 "$pkgdir"/usr/share/dotnet/reference-packages/$_pkgver_macro "$pkgdir"/usr/share/licenses
cd $builddir/artifacts/reference-packages
install ./* "$pkgdir"/usr/share/dotnet/reference-packages/$_pkgver_macro/.
ln -s dotnet-host "$pkgdir"/usr/share/licenses/dotnet$_pkgver_name-references
}
sha512sums="
9d7ae29c311cd9550389225cab891df359385e098aaccb8100c77832ea7b7b1f6a7984d811cb1f45bd323182149246c33f2016b4ee85d97ee9b29243acc644bc source-build-reference-packages-045b2888ccfaf4c203c945a09b3f41f0e6393d1c.tar.gz
6f4dbf64a190dd0676cbd4fc8d0e6e20f673e0c52bf572039057ce7712fc71d358b81d816493c8b2f79b4a7e3e4e5ec06479a8dbeb257ebefb8b87abc20e6fdc sh-build-fix.patch
"

View file

@ -1,5 +1,5 @@
From f46cf7c4d6e8c92053993ff2081b820aae4ed886 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
From: Antoine Martin <dev@ayakael.net>
Date: Sat, 8 Jan 2022 17:18:05 +0000
Subject: [PATCH 1/1] fix for sh

View file

@ -1,4 +1,10 @@
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Variables for dotnet-stage0 build version 5.0
# This APKBUILD is designed to be the same for version 5.0 and under
# except for the variables in this first section
pkgname=dotnet5-stage0
pkgver=5.0.209
pkgrel=0
@ -6,6 +12,9 @@ _runtimever=5.0.12
_source_artifactsver=0.1.0-5.0.208-1454404-20211104.5
_source_referencesver=1.0.0-beta.21566.2
_nappo_get=''
_nappo_exclude='*Intermediate*'
# Following for dotnet-stage0 build version 5.0 and below
_pkgver_macro=${pkgver%.*}
_pkgver_prior=1
_pkgver_name=${_pkgver_macro//[.0]}
@ -20,7 +29,7 @@ _default_source="
https://dotnetfeed.blob.core.windows.net/dotnet-core/assets/Private.SourceBuild.ReferencePackages.$_source_referencesver.tar.gz
https://gist.githubusercontent.com/omajid/c04b6025de49d0b7b18ab4a7e789484e/raw/b33c57f6bf9c00bb8633375123d2d3594fe81c26/nappo.py
dotnet.sh
"
"
makedepends="
krb5-libs
libcurl
@ -28,33 +37,25 @@ makedepends="
lttng-ust
py3-packaging
zlib
"
"
subpackages="
dotnet$_pkgver_name-stage0-runtime:runtime:$_runtimever
dotnet$_pkgver_name-stage0-sdk:sdk:$_sdkver
dotnet$_pkgver_name-stage0-host:host:$_runtimever
dotnet$_pkgver_name-stage0-hostfxr:hostfxr:$_runtimever
dotnet$_pkgver_name-stage0-artifacts:artifacts:$_artifactsver
dotnet$_pkgver_name-stage0-references:references:$_referencesver
"
options="!strip !check" # No test suite
builddir="$srcdir"
_get_arch() {
case $1 in
x86_64) local arch=x64;;
aarch64) local arch=arm64;;
armv7) local arch=arm;;
esac
echo $arch
}
unpack() {
verify
initdcheck
mkdir -p "$srcdir"
msg "Unpacking Private.SourceBuilt.Artifacts"
gunzip Private.SourceBuilt.Artifacts.*.tar.gz
msg "Unpacking Private.SourceBuild.Reference.Packages"
gunzip Private.SourceBuild.Reference*.tar.gz
}
scan_symlink_targets() {
local name="$1" dir="$2"
local ver=$(pkginfo_val pkgver "$dir"/.PKGINFO)
local subpkgarch=$(pkginfo_val arch "$dir"/.PKGINFO)
[ -d "$REPODEST"/${repo:?}/${subpkgarch/noarch/$CARCH} ] || mkdir -p "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}
[ "$ver" = "$pkgver-r$pkgrel" ] || ln -sf "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}/$name-$ver.apk "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}/$name-$pkgver-r$pkgrel.apk
}
# custom source updater function for all dotnet versions
#
# Prebuilt artifacts only provides linux-x64 nukgs. As Alpine uses linux-musl,
# the below scripts updates source to fetch the musl version of those packages,
# allowing packaging of the correct architecture. Thus, everytime Artifacts
# is updated, or new architectures are added, this function needs to be
# executed using 'abuild _update_source'
_update_source() {
[ -z "$source" ] \
&& msg "Removing source from APKBUILD"
@ -65,11 +66,16 @@ _update_source() {
-e "/^source='.*'\$/d" \
-e "/^source='/,/'\$/d" \
APKBUILD
source="$_default_source"
fetch
local nuget_source="$_default_source"
msg "Updating source"
local nappo_get="$_nappo_get $(tar --list -f "$srcdir"/Private.SourceBuilt.Artifacts.*.tar.gz --wildcards '*.linux-x64.*' --exclude '*Intermediate*' --exclude 'runtime.linux-x64.Microsoft.NETCore.Runtime.CoreCLR*' 2>/dev/null)"
local nappo_exclude="$_nappo_exclude"
# shellcheck disable=SC3045
local nappo_exclude="$(printf '--exclude %s ' $nappo_exclude)"
local nappo_get=$(tar --list -f "$srcdir"/Private.SourceBuilt.Artifacts.*.tar.gz --wildcards '*.linux-x64.*' $nappo_exclude)
local nappo_get="$_nappo_get $nappo_get"
for package in $nappo_get; do
for _arch in $arch; do
local filename=${package##*/} # Extracts just filename
@ -79,9 +85,9 @@ _update_source() {
local name=${nupkg%*.*.*.*} # Extracts name without version
local version=${nupkg/$name.} # Extracts version out of nupkg using name
local name=${name/linux-x64/linux-musl-$(_get_arch $_arch)} # Converts to current arch
[ -z "${filename##*servicing*}" ] && local version=''
echo "Getting url for $name version $version, replaces $package"
local nappo_out=$(python3 "$srcdir"/nappo.py download --verbose "$name" "$version")
[ -z "${filename##*servicing*}" ] && unset version
echo "Getting $name [${version:-latest}] (replaces $package)"
local nappo_out="$(python3 "$srcdir"/nappo.py download --verbose $name ${version:-})"
local nupkg="${nappo_out#*.nupkg}"
local uri=${nappo_out/$nupkg}
local nupkg=$(echo $nupkg | tr -d '\n')
@ -96,72 +102,92 @@ _update_source() {
local nuget_source="$(printf '%s\n' $nuget_source)"
printf 'source="\n%s\n"\n' "$nuget_source" >>"$APKBUILD"
}
subpackages="
dotnet$_pkgver_name-stage0-runtime:runtime
dotnet$_pkgver_name-stage0-sdk:sdk
dotnet$_pkgver_name-stage0-host:host
dotnet$_pkgver_name-stage0-hostfxr:hostfxr
dotnet$_pkgver_name-stage0-artifacts:artifacts
dotnet$_pkgver_name-stage0-references:references
"
# 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) local arch=arm;;
esac
echo $arch
}
unpack() {
verify
initdcheck
mkdir -p "$srcdir"
msg "Unpacking Private.SourceBuilt.Artifacts"
gunzip Private.SourceBuilt.Artifacts.*.tar.gz
msg "Unpacking Private.SourceBuild.Reference.Packages"
gunzip Private.SourceBuild.Reference*.tar.gz
}
package() {
mkdir -p "$pkgdir"
}
host() {
pkgdesc="A generic driver for the .NET Core Command Line Interface, Microsoft build for use by dotnet$_pkgver_name aport"
pkgver=$_runtimever
provides="dotnet-host"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/etc/profile.d "$subpkgdir"/usr/bin "$subpkgdir"/usr/lib "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses/dotnet-host
install -dm 755 "$subpkgdir"/etc/profile.d "$subpkgdir"/usr/bin "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses/dotnet-host
tar -xzf "$srcdir"/dotnet-sdk-*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./dotnet
tar -xzf "$srcdir"/dotnet-sdk-*.tar.gz -C "$subpkgdir"/usr/share/licenses/dotnet-host/ --no-same-owner ./LICENSE.txt ./ThirdPartyNotices.txt
ln -s /usr/share/dotnet/dotnet "$subpkgdir"/usr/bin/dotnet
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."
pkgver=$_runtimever
depends="dotnet-host"
provides="dotnet$_pkgver_name-hostfxr"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses "$subpkgdir"/usr/lib
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./host
ln -s /usr/share/dotnet/host/fxr/$pkgver/libhostfxr.so "$subpkgdir"/usr/lib/libhostfxr.so
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-hostfxr
}
sdk() {
depends="dotnet$_pkgver_name-bootstrap-runtime"
provides="dotnet$_pkgver_name-bootstrap-sdk"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./sdk ./templates
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-sdk
}
runtime() {
pkgdesc="The .NET $_pkgver_macro Core runtime, Microsoft build for use by dotnet$_pkgver_name aport"
pkgver=$_runtimever
depends="dotnet$_pkgver_name-hostfxr"
provides="dotnet$_pkgver_name-bootstrap-runtime"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./shared/Microsoft.NETCore.App
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-runtime
}
artifacts() {
pkgdesc="Internal package for building .NET $_pkgver_macro Software Development Kit, Microsoft build for use by dotnet$_pkgver_name aport"
pkgver=$_artifactsver
provides="dotnet$_pkgver_name-bootstrap-artifacts"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver "$subpkgdir"/usr/share/licenses
tar -xf "$srcdir"/Private.SourceBuilt.Artifacts.*.tar -C "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver/ --no-same-owner --exclude '*.linux-x64*'
install -m 644 "$srcdir"/*"$(_get_arch $CARCH)"*.nupkg "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver/.
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-artifacts
}
references() {
pkgdesc="Reference packages needed by the .NET $_pkgver_macro SDK build, Microsoft build for use by dotnet$_pkgver_name aport"
pkgver=$_referencesver
provides="dotnet$_pkgver_name-bootstrap-references"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet/reference-packages/$_pkgver_macro "$subpkgdir"/usr/share/licenses
tar -xf "$srcdir"/Private.SourceBuild.Reference*.tar -C "$subpkgdir"/usr/share/dotnet/reference-packages/$_pkgver_macro/ --no-same-owner
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-reference

View file

@ -16,9 +16,8 @@ APKBUILD for dotnet5-stage0
versions)
# Special functions
* ./build_apkbuild.sh: Builds APKBUILD using scripts in lib
* abuild _update_source: Stage0 adapts prebuilt artifacts packages by replacing
linux-x64 nupkgs with linux-musl-x64 versions. Any updates to artifacts will
linux nupkgs with linux-musl versions. Any updates to artifacts will
require executing this function to update source with up to date nuget packages
# Known issues

View file

@ -1,14 +0,0 @@
#/bin/bash
source APKBUILD
echo "# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>" > APKBUILD
apkbuild-lint lib/*
# Build APKBUILD
sed 's:^\s*#.*$::g' lib/* >> APKBUILD
source="$(printf '%s\n' $source)"
printf 'source="\n%s\n"\n' "$source" >> APKBUILD
printf 'sha512sums="%s\n"\n' "$sha512sums" >> APKBUILD
# Strip whitespace
sed -i '/^[[:space:]]*$/d' APKBUILD

View file

@ -1,11 +0,0 @@
#
# Build variables for dotnet-stage0 version 5.0
#
pkgname=dotnet5-stage0
pkgver=5.0.209
pkgrel=0
_runtimever=5.0.12
_source_artifactsver=0.1.0-5.0.208-1454404-20211104.5
_source_referencesver=1.0.0-beta.21566.2
_nappo_get=''

View file

@ -1,29 +0,0 @@
#
# Building variables for dotnet-stage0 version 5.0 and under
#
_pkgver_macro=${pkgver%.*}
_pkgver_prior=1
_pkgver_name=${_pkgver_macro//[.0]}
_artifactsver=${_source_artifactsver:6:7}
_referencesver=$_pkgver_macro.${_source_referencesver:11:5}
pkgdesc="The .NET $_pkgver_macro SDK, Microsoft build for use by dotnet$_pkgver_name aport"
arch="x86_64"
url=https://www.microsoft.com/net/core
license="MIT"
_default_source="
https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.$_source_artifactsver.tar.gz
https://dotnetfeed.blob.core.windows.net/dotnet-core/assets/Private.SourceBuild.ReferencePackages.$_source_referencesver.tar.gz
https://gist.githubusercontent.com/omajid/c04b6025de49d0b7b18ab4a7e789484e/raw/b33c57f6bf9c00bb8633375123d2d3594fe81c26/nappo.py
dotnet.sh
"
makedepends="
krb5-libs
libcurl
libintl
lttng-ust
py3-packaging
zlib
"
options="!strip !check" # No test suite
builddir="$srcdir"

View file

@ -1,22 +0,0 @@
#
# Building functions for dotnet-stage0 version 5.0 and under
#
_get_arch() {
case $1 in
x86_64) local arch=x64;;
aarch64) local arch=arm64;;
armv7) local arch=arm;;
esac
echo $arch
}
unpack() {
verify
initdcheck
mkdir -p "$srcdir"
msg "Unpacking Private.SourceBuilt.Artifacts"
gunzip Private.SourceBuilt.Artifacts.*.tar.gz
msg "Unpacking Private.SourceBuild.Reference.Packages"
gunzip Private.SourceBuild.Reference*.tar.gz
}

View file

@ -1,23 +0,0 @@
# abuild / buildrepo gets confused when setting pkgver var from within subpkgs
# This expresses itself in two ways:
# 1) scan_symlink_targets, when it detects symlink dependencies between subpkgs
# sets a hard dependency to that specific version of subpackage. Fixing this
# involves simply neutralizing scan_symlink_targets, leaving the maintainer
# to set those dependencies explicitely
# 2) abuild / buildrepo has logics to determine if a package should be rebuilt
# abuild uses apk_up2date and abuildindex_up2date, and buildrepo uses
# pkg.each_need_rebuild, then pkg.apk_file_exists. All of these rely on if
# there's a readable file at $repo/$CARCH/$name-$pkgver-r$pkgrel.apk
# Fixing this involves creating a symbolic link at that location that points
# to where the subpackage actually is.
# Fortunately, scan_symlink_targes has all the hooks necessary to create a
# symbolic link: it resides within a for loop that's based around subpkgdir,
# and feeds function with .PKGINFO info that allows for creation of symbolic
# link when necessary
scan_symlink_targets() {
local name="$1" dir="$2"
local ver=$(pkginfo_val pkgver "$dir"/.PKGINFO)
local subpkgarch=$(pkginfo_val arch "$dir"/.PKGINFO)
[ -d "$REPODEST"/${repo:?}/${subpkgarch/noarch/$CARCH} ] || mkdir -p "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}
[ "$ver" = "$pkgver-r$pkgrel" ] || ln -sf "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}/$name-$ver.apk "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}/$name-$pkgver-r$pkgrel.apk
}

View file

@ -1,48 +0,0 @@
# Prebuilt artifacts only provides linux-x64 nukgs. As Alpine uses linux-musl,
# the below scripts updates source to fetch the musl version of those packages,
# allowing packaging of the correct architecture. Thus, everytime Artifacts
# is updated, or new architectures are added, this function needs to be
# executed using 'abuild _update_source'
_update_source() {
[ -z "$source" ] \
&& msg "Removing source from APKBUILD"
sed -E -i \
-e '/^source=".*"$/d' \
-e '/^source="/,/"$/d' \
\
-e "/^source='.*'\$/d" \
-e "/^source='/,/'\$/d" \
APKBUILD
source="$_default_source"
fetch
local nuget_source="$_default_source"
msg "Updating source"
local nappo_get="$_nappo_get $(tar --list -f "$srcdir"/Private.SourceBuilt.Artifacts.*.tar.gz --wildcards '*.linux-x64.*' --exclude '*Intermediate*' --exclude 'runtime.linux-x64.Microsoft.NETCore.Runtime.CoreCLR*' 2>/dev/null)"
for package in $nappo_get; do
for _arch in $arch; do
local filename=${package##*/} # Extracts just filename
local suffix=${filename##*[0-9]} # Extracts what's after version number
local nupkg=${filename/$suffix} # Extracts nupkg name with version
[ -z "${filename##*servicing*}" ] && local nupkg=${filename%%-servicing*}
local name=${nupkg%*.*.*.*} # Extracts name without version
local version=${nupkg/$name.} # Extracts version out of nupkg using name
local name=${name/linux-x64/linux-musl-$(_get_arch $_arch)} # Converts to current arch
[ -z "${filename##*servicing*}" ] && local version=''
echo "Getting url for $name version $version, replaces $package"
local nappo_out=$(python3 "$srcdir"/nappo.py download --verbose "$name" "$version")
local nupkg="${nappo_out#*.nupkg}"
local uri=${nappo_out/$nupkg}
local nupkg=$(echo $nupkg | tr -d '\n')
[ -f "$nupkg" ] && mv $nupkg "$SRCDEST"/.
local nuget_source="$nuget_source $uri"
[ -z "${name##*linux*}" ] || break
done
done
for _arch in $arch; do
local nuget_source="$nuget_source https://dotnetcli.azureedge.net/dotnet/Sdk/$pkgver/dotnet-sdk-$pkgver-linux-musl-$(_get_arch $_arch).tar.gz"
done
local nuget_source="$(printf '%s\n' $nuget_source)"
printf 'source="\n%s\n"\n' "$nuget_source" >>"$APKBUILD"
}

View file

@ -1,87 +0,0 @@
#
# Packaging functions for dotnet-stage0 version 5.0 and under
#
subpackages="
dotnet$_pkgver_name-stage0-runtime:runtime
dotnet$_pkgver_name-stage0-sdk:sdk
dotnet$_pkgver_name-stage0-host:host
dotnet$_pkgver_name-stage0-hostfxr:hostfxr
dotnet$_pkgver_name-stage0-artifacts:artifacts
dotnet$_pkgver_name-stage0-references:references
"
package() {
mkdir -p "$pkgdir"
}
host() {
pkgdesc="A generic driver for the .NET Core Command Line Interface, Microsoft build for use by dotnet$_pkgver_name aport"
pkgver=$_runtimever
provides="dotnet-host"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/etc/profile.d "$subpkgdir"/usr/bin "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses/dotnet-host
tar -xzf "$srcdir"/dotnet-sdk-*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./dotnet
tar -xzf "$srcdir"/dotnet-sdk-*.tar.gz -C "$subpkgdir"/usr/share/licenses/dotnet-host/ --no-same-owner ./LICENSE.txt ./ThirdPartyNotices.txt
ln -s /usr/share/dotnet/dotnet "$subpkgdir"/usr/bin/dotnet
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."
pkgver=$_runtimever
depends="dotnet-host"
provides="dotnet$_pkgver_name-hostfxr"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./host
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-hostfxr
}
sdk() {
depends="dotnet$_pkgver_name-bootstrap-runtime"
provides="dotnet$_pkgver_name-bootstrap-sdk"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./sdk ./templates
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-sdk
}
runtime() {
pkgdesc="The .NET $_pkgver_macro Core runtime, Microsoft build for use by dotnet$_pkgver_name aport"
pkgver=$_runtimever
depends="dotnet$_pkgver_name-hostfxr"
provides="dotnet$_pkgver_name-bootstrap-runtime"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./shared/Microsoft.NETCore.App
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-runtime
}
artifacts() {
pkgdesc="Internal package for building .NET $_pkgver_macro Software Development Kit, Microsoft build for use by dotnet$_pkgver_name aport"
pkgver=$_artifactsver
provides="dotnet$_pkgver_name-bootstrap-artifacts"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver "$subpkgdir"/usr/share/licenses
tar -xf "$srcdir"/Private.SourceBuilt.Artifacts.*.tar -C "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver/ --no-same-owner --exclude '*.linux-x64*'
install -m 644 "$srcdir"/*"$(_get_arch $CARCH)"*.nupkg "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver/.
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-artifacts
}
references() {
pkgdesc="Reference packages needed by the .NET $_pkgver_macro SDK build, Microsoft build for use by dotnet$_pkgver_name aport"
pkgver=$_referencesver
provides="dotnet$_pkgver_name-bootstrap-references"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet/reference-packages/$_pkgver_macro "$subpkgdir"/usr/share/licenses
tar -xf "$srcdir"/Private.SourceBuild.Reference*.tar -C "$subpkgdir"/usr/share/dotnet/reference-packages/$_pkgver_macro/ --no-same-owner
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-reference
}

View file

@ -1,7 +1,14 @@
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
. ../dotnet5/APKBUILD
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
#
# Main functions for dotnet build version 5.0
# This is generated from dotnet5's APKBUILD.
# Any modifications to be done in main APKBUILD and propagated by
# executing 'abuild _update_stage1'
#
# Variables for dotnet build version 5.0
# This APKBUILD is designed to be the same for version 5.0 and under
# except for the variables in this first section
#
pkgname=dotnet5-stage1
@ -22,25 +29,379 @@ _patches="
runtime_link-order.patch
runtime_non-portable-distrorid-fix-alpine.patch
sdk_telemetry-optout.patch
"
"
# Custom preparation
# Custom prepare
default_prepare() {
local _artifactsver=$(find /usr/share/dotnet/artifacts/$_pkgver_macro* -maxdepth 0 -type d | tail -n1 | sed 's|..*\/||')
sed -i "s|/path/to/artifacts|/usr/share/dotnet/artifacts/$_artifactsver|" "$srcdir"/roslyn_added-previously-built-artifacts-repo.patch
}
makedepends="${makedepends//5-bootstrap/5-stage0}"
# Following for for dotnet builds version 5.0 and under
_pkgver_macro=${pkgver%.*}
_pkgver_prior=${pkgver%.*.*}
_pkgver_name=${_pkgver_macro//[.0]}
pkgdesc="The .NET $_pkgver_macro SDK"
arch="x86_64"
url=https://www.microsoft.com/net/core
license="MIT"
_bootstrap_pkg="stage0"
makedepends="
bash
clang
cmake
dotnet$_pkgver_name-$_bootstrap_pkg-runtime
dotnet$_pkgver_name-$_bootstrap_pkg-sdk
dotnet$_pkgver_name-$_bootstrap_pkg-artifacts
dotnet$_pkgver_name-$_bootstrap_pkg-references
findutils
git
icu-dev
inetutils-syslogd
krb5-dev
libgit2-dev
libintl
libunwind-dev
libxml2-dev
libxml2-utils
linux-headers
lldb-dev
llvm$_llvmver-dev
lttng-ust-dev
nodejs
openssl-dev
zlib-dev
"
options="!check" # No test suite
source="
source-build-v$pkgver$_pkgrel.tar.gz::https://github.com/dotnet/source-build/archive/refs/tags/v$pkgver$_pkgrel.tar.gz
completions.zsh::https://raw.githubusercontent.com/dotnet/sdk/7cec6d9fe5cb326a88091ae44204f52e1f00e69c/scripts/_dotnet
dotnet.sh
$_patches
"
subpackages="
aspnetcore$_pkgver_name-runtime:aspnetcore_runtime:noarch:$_aspnetver
aspnetcore$_pkgver_name-targeting-pack:aspnetcore_targeting_pack:noarch:$_aspnetver
dotnet$_pkgver_name-apphost-pack:apphost_pack:$_runtimever
dotnet$_pkgver_name-artifacts:artifacts:$_sdkver
dotnet$_pkgver_name-host:host:$_runtimever
dotnet$_pkgver_name-host-zsh-completion:zshcomp:$_runtimever
dotnet$_pkgver_name-host-bash-completion:bashcomp:$_runtimever
dotnet$_pkgver_name-host-doc:doc:$_runtimever
dotnet$_pkgver_name-hostfxr:hostfxr:$_runtimever
dotnet$_pkgver_name-runtime:runtime:$_runtimever
dotnet$_pkgver_name-sdk:sdk:$_sdkver
dotnet$_pkgver_name-targeting-pack:targeting_pack:noarch:$_runtimever
dotnet$_pkgver_name-templates:templates:noarch:$_sdkver
netstandard$_pkgver_name-targeting-pack:netstandard_targeting_pack:noarch:$_sdkver
"
builddir="$srcdir/source-build-$pkgver$_pkgrel"
# Custom patch logics for dotnet version 5.0 and under
_patch() {
local i failed=
if ! have_patches; then
return 0
fi
[ -d "$builddir" ] || { error "Is \$builddir set correctly?"; return 1; }
msg "Deploying patches"
for i in $source; do
case ${i%::*} in
build_*.patch)
echo "applying $i to sourcebuild"
patch ${patch_args:--p1} -i "$srcdir/$(filename_from_uri $i)" || failed="$failed $i"
;;
*.patch)
local _package=$(echo $i | sed 's|_.*||')
local _patch=$(echo $i | sed "s|$_package\_||")
echo "deploying $_patch to $_package for application by sourcebuild"
[ -d patches/$_package ] || mkdir patches/$_package
cp "$srcdir"/"$i" patches/$_package/$_patch
;;
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
}
# custom function that updates stage1 for all dotnet versions
#
# buildrepo doesn't know to rebuild dotnet after first build with stage1
# this creates another package that forces the a first build of dotnet
# so that the final build of dotnet is guaranteed to be built with
# Alpine binaries.
_update_stage1() {
msg "Updating stage1 APKBUILD"
# Copy patches
rm ../dotnet$_pkgver_name-stage1/*.patch ../dotnet$_pkgver_name-stage1/dotnet.sh
for i in ../dotnet"$_pkgver_name"/*.patch ../dotnet"$_pkgver_name"/dotnet.sh; do
cp $i ${i/$_pkgver_name/$_pkgver_name-stage1}
done
# Generate stage1
{
echo -n "# "
echo "Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>"
echo "# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>"
echo
echo "#"
echo "# This is generated from dotnet$_pkgver_name's APKBUILD."
echo "# Any modifications to be done in main APKBUILD and propagated by"
echo -n "# executing 'abuild _update_stage1'"
sed \
-e "s/pkgname=dotnet$_pkgver_name/pkgname=dotnet$_pkgver_name-stage1/" \
-e "s/_bootstrap_pkg=\"bootstrap\"/_bootstrap_pkg=\"stage0\"/" \
-e "1,2d" \
../dotnet$_pkgver_name/APKBUILD
} > ../dotnet$_pkgver_name-stage1/APKBUILD
}
prepare() {
default_prepare
# source-build expects to be in a git repo
git init
git add ./*
git commit -m 'initial commit'
git remote add origin https://github.com/dotnet/source-build.git
_patch
msg "Settings up bootstrap"
mkdir -p bootstrap/sdk
cp /usr/share/dotnet/dotnet bootstrap/.
local _bootstrapver=$(find /usr/share/dotnet/sdk/$_pkgver_macro* -maxdepth 0 -type d | tail -n1 | sed 's|..*\/||')
for i in sdk/$_bootstrapver host shared; do cp -r /usr/share/dotnet/$i bootstrap/$i; done
mkdir -p packages/archive
local _artifactsver=$(find /usr/share/dotnet/artifacts/$_pkgver_macro* -maxdepth 0 -type d | tail -n1 | sed 's|..*\/||')
tar cvzf packages/archive/Private.SourceBuilt.Artifacts.tar.gz -C "/usr/share/dotnet/artifacts/$_artifactsver" .
tar cvzf packages/archive/Private.SourceBuild.ReferencePackages.tar.gz -C "/usr/share/dotnet/reference-packages/$_pkgver_macro" .
}
build() {
msg "Building $pkgname-$pkgver"
export SOURCE_BUILD_SKIP_SUBMODULE_CHECK=1
# Disable tracing, which is incompatible with certain versions of
# lttng See https://github.com/dotnet/runtime/issues/57784. The
# suggested compile-time change doesn't work, unfortunately.
export COMPlus_LTTng=0
./build.sh \
--with-sdk bootstrap \
/p:SkipDownloadingPreviouslySourceBuiltPackages=true \
/p:SkipDownloadingReferencePackages=true \
/p:ContinueOnPrebuiltBaselineError=true \
/p:SkipPortableRuntimeBuild=true \
/p:SkipPrebuiltEnforcement=true \
/p:UseSystemLibraries=true \
/p:UseSystemLibunwind=true
}
package() {
depends="dotnet$_pkgver_name-sdk"
provides=dotnet-$_pkgver_macro
install -dm 755 "$pkgdir"/usr/share/zsh/site-functions "$pkgdir"/usr/share/bash-completion/completions "$pkgdir"/usr/share/man/man1
find "$builddir" -iname 'dotnet*.1' -type f -exec cp '{}' "$pkgdir"/usr/share/man/man1/ \;
install -m 755 "$srcdir"/completions.zsh "$pkgdir"/usr/share/zsh/site-functions/_dotnet
install -m 755 "$builddir"/artifacts/src/sdk/scripts/register-completions.bash "$pkgdir"/usr/share/bash-completion/completions/_dotnet
}
sdk() {
depends="
aspnetcore$_pkgver_name-runtime
aspnetcore$_pkgver_name-targeting-pack
dotnet$_pkgver_name-apphost-pack
dotnet$_pkgver_name-runtime
dotnet$_pkgver_name-targeting-pack
dotnet$_pkgver_name-templates
netstandard21-targeting-pack
"
provider_priority=$_pkgver_prior
provides="dotnet$_pkgver_name-bootstrap-sdk dotnet-sdk-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./sdk
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-sdk
}
host() {
pkgdesc="A generic driver for the .NET Core Command Line Interface"
provides="dotnet-host"
provider_priority=$_pkgver_prior
cd $builddir/artifacts/x64/Release
install -dm 755 "$subpkgdir"/etc/profile.d "$subpkgdir"/usr/bin "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses/dotnet-host
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./dotnet
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/licenses/dotnet-host/ --no-same-owner ./LICENSE.txt ./ThirdPartyNotices.txt
ln -s /usr/share/dotnet/dotnet "$subpkgdir"/usr/bin/dotnet
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"
provider_priority=$_pkgver_prior
cd $builddir/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./host
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-hostfxr
}
runtime() {
pkgdesc="The .NET $_pkgver_macro Core runtime"
depends="dotnet$_pkgver_name-hostfxr"
provides="
dotnet$_pkgver_name-bootstrap-runtime
dotnet-runtime-$_pkgver_macro
"
provider_priority=$_pkgver_prior
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./shared/Microsoft.NETCore.App
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-runtime
}
aspnetcore_runtime() {
pkgdesc="The ASP.NET $_pkgver_macro Core runtime"
depends="dotnet$_pkgver_name-runtime"
provides="aspnetcore-runtime-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./shared/Microsoft.AspNetCore.App
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/aspnetcore$_pkgver_name-runtime
}
apphost_pack() {
pkgdesc="The .NET $_pkgver_macro Core apphost pack"
provides="dotnet-apphost-pack-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner --wildcards ./packs/Microsoft.NETCore.App.Host.*
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-apphost-pack
}
targeting_pack() {
pkgdesc="The .NET $_pkgver_macro Core targeting pack"
provides="dotnet-targeting-pack-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/Microsoft.NETCore.App.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-targeting-pack
}
netstandard_targeting_pack() {
pkgdesc="The .NET $_pkgver_macro Standard targeting pack"
depends="dotnet-host"
provides="
netstandard21-targeting-pack
netstandard-targeting-pack-2.1
"
provider_priority=$_pkgver_prior
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/NETStandard.Library.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/netstandard21-targeting-pack
}
aspnetcore_targeting_pack() {
pkgdesc="The ASP.NET $_pkgver_macro Core targeting pack"
provides="aspnetcore-targeting-pack-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/Microsoft.AspNetCore.App.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/aspnetcore$_pkgver_name-targeting-pack
}
templates() {
pkgdesc="The .NET $_pkgver_macro templates"
depends="dotnet-host"
provider_priority=$_pkgver_prior
provides="dotnet-templates-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./templates
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-templates
}
artifacts() {
pkgdesc="Internal package for building .NET $_pkgver_macro Software Development Kit"
depends="dotnet-host"
provides="dotnet$_pkgver_name-bootstrap-artifacts"
provider_priority=$_pkgver_prior
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver "$subpkgdir"/usr/share/licenses
tar -xzf Private.SourceBuilt.Artifacts.*.tar.gz -C "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver/
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-artifacts
}
zshcomp() {
default_zshcomp
pkgdesc="zsh completion for .NET $_pkgver_macro"
depends="dotnet-host"
provides="dotnet-host-zsh-completion"
provider_priority=$_pkgver_prior
}
bashcomp() {
default_bashcomp
pkgdesc="bash completion for .NET $_pkgver_macro"
depends="dotnet-host"
provides="dotnet-host-bash-completion"
provider_priority=$_pkgver_prior
}
doc() {
default_doc
pkgdesc="Docs for .NET $_pkgver_macro"
provides="dotnet-host-doc"
provider_priority=$_pkgver_prior
}
sha512sums="
9e5a762ae9e90bac51b586cb084d92581ee9eaabd620852273eab5a463f676e285f071ec734f4f18b587584edfde44597a1d21ce10af5dc7cb4dba2c1a187436 source-build-v5.0.209.1-SDK.tar.gz
d0aecbf13e6781ef867021085e0d4a55e5f24dddfd175e4d0ce651fdb9c8e330636b2c69e3c4491442e5dd32c6859f38388006b3fe36fac2226837e1bc4107c9 completions.zsh
f58bd83b709dcb4b0b67830756069c34258a167b33cb290cbf30f21d69d75402d38e013fd7bbf00640fe19e397f78df6ff787cf8484ee8967d5b8809f033eafb dotnet.sh
09e8ba94973d4ab1017818eba7e13c4bda97b658dc6e0c15becb5211d15cad42df484b4c18f25f5dca1a02e647221013378ceb5c77a4046a107ff36df92641d2 application-insights_fix-net40-location.patch
d7ade1fea4bdf983e34827e5b729b406cdc08a36582a7c60510663742bcd6f0ad6720e8eca95399eb5d1ca05468e984ba622e92f6e964834c02df2e2db4e4f3e build_darc-use-available-runtime.patch
3a9ad06c927aafba4bf8fff3b369de2f8c114bd50037dff611491ce5cf65e6849a82a6752d49224e5dc75b6f08b6ec671ec12e73bd9b33a8829ee7347892cbe3 build_darc-fix-alpine.patch
25bc54272a74a7f3be686936d7c6465fb0f5f14238143738ce668159289f4567aec3f81dc12bd04bb158dd2d7f1a4f340ba541724410d029868775dcdc657003 roslyn_added-previously-built-artifacts-repo.patch
5a1c560b8078ba17d18f50ec78c8da45ed4d39b430ab47a31d829a3e9ce38cc7e3a92ee6a1f89f249e49b95e653bcf2409f4781c872134a69ce24e617dc49b32 runtime_add-rid-for-alpine-315.patch
2accd945ab49c3ac70e9ef8e5040b8f608771fac87525490804df7bc2607ca4e733502624b7c54b27b31ed907f5cb285e863eda0ee396aa8bce6d4dfaffec499 runtime_use-latest-microsoftnetcoreplatformspackage.patch
19a4b0e74f4e118a252c7c2231f955c3dc8ef9a0471e626f46dc7d7b3a34291ee479401966d4b58f1495daacbe7855ed5862522affd714dd11d8e2ef75151f1b runtime_link-order.patch
eaac9669bf68df73ffa242d452f1bd471e3aa346d7f8a57fa42463ac1fda1484d91447644d773911e7e5c94c7947caa0e45cac26f31ad7986bcd22884cda14d9 runtime_non-portable-distrorid-fix-alpine.patch
8865df32367e0e404f2fb020cfee77cc2a06cf3fcb579ae5b8df94fa701ab7877be11310181f0b628d140353c9a4f54e802ae8129e410bfee431c8ddc0bb5800 sdk_telemetry-optout.patch
fb1cffcacba8cf6439c05781442167905b8147d36665aef8df4fc7a573c26fa3dd0f1ed2ec680039715d25d73646c3633f5ad9f658f6e9ec85f6850efec87935 application-insights_fix-net40-location.patch
7010a0262b3c4cf7b45140e50052bb8b194266639544e37f1f3ff1ffe74e606b1e71e53b5cd9436d986f325a9749a48f055c8b90d42e705264c99c851244013e build_darc-use-available-runtime.patch
d77500c50ce9a9ce35281d54a1f6d9c00e1ca391567f1a05f3b0509aa6212353f48c2163fc277103930ee21ee143304997c55522fdf8e3de83d0ea9d7e2a6b13 build_darc-fix-alpine.patch
72ee7064fb9042d4c37ca22c1fe8cd5c393db51086279db3c965142ac8367f6b34b3e6f7d1f36269d945d65587cd0cda068fa0f5e94a203a2383db530f805964 roslyn_added-previously-built-artifacts-repo.patch
70ca8f5177f9ef3b40c9d0ad0d527877a4179e61db7e4e90e69fb7a0ed214034b6a963ff1fd93dca197ef1b9ea03ca1fa85f84dea685d6f02589a88f84aa732d runtime_add-rid-for-alpine-315.patch
8cb8e38fb0d4bfc10b3a214ed2deabbcabaef85cbe2f2ad02cac9589a3e9a613116ef79e38122474fd5c3d6d1a24a2f7efe8f5c61855bb386e90198388bfcd4d runtime_use-latest-microsoftnetcoreplatformspackage.patch
619ebecf68bac7bd4ecf68effe31e84d1d338f3b850bc49288b957a5528fe3ed27ed844032f99c2c337c3ed214d1163db81923507100e6ec5f78af502dd610e1 runtime_link-order.patch
4a480d9502ad9d8c0c9a11879de29f181c2f7eff2e88ef7bd61611dc62ac23fbff9cf904b59186a05d4f5bb7a48d74aae4e09105f16d85a7a95082e2a9af2dd0 runtime_non-portable-distrorid-fix-alpine.patch
9fabfa18197f5a8104f816e2cd64156c72565709470b81fa323516b3cd5c55dbaf5383b065e2b7ae995303ee1020205995a5b52987b539abecc3700c261b59e4 sdk_telemetry-optout.patch
"

View file

@ -1,5 +1,5 @@
From 387efb0ac01e40cd85cf9f5ce770be6437265ca4 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
From: Antoine Martin <dev@ayakael.net>
Date: Fri, 4 Jun 2021 13:32:53 +0000
Subject: [PATCH] FIxed Net40 location

View file

@ -1,5 +1,6 @@
From d07d50c6f8a5793badc50fb2c964b87dec87a3a1 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Patch-Source: https://github.com/dotnet/source-build/issues/1868
From: Antoine Martin <dev@ayakael.net>
Date: Thu, 15 Jul 2021 15:37:33 +0000
Subject: [PATCH 1/1] Fixed darc init for Alpine
@ -8,8 +9,6 @@ binary architecture. This patch deletes all the wrong ones so that it
is forced to chose the correct one. This issue only occurs when using
dotnet-stage0-runtime, thus libunwind is suspected to be the issue as
stage0 wasn't built with system libunwind.
(see https://github.com/dotnet/source-build/issues/1868)
---
eng/common/darc-init.sh | 3 +++
1 file changed, 3 insertions(+)

View file

@ -1,5 +1,6 @@
From 970fa4290ee6b4d43a0fbb19b919f4f260edf6a5 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Patch-Source: https://github.com/dotnet/source-build/pull/2698
From: Antoine Martin <dev@ayakael.net>
Date: Wed, 15 Dec 2021 18:04:02 +0000
Subject: [PATCH 1/1] Makes darc use whatever runtime is available
@ -7,8 +8,6 @@ Default version of Darc needs dotnet 3.1 runtimes, and fails to run on
Alpine. This patch fixes this by pushing Darc's version and disabling runtime
retrieval. Can't push it too much, though, as latest version breaks with
application-insights as it doesn't include a eng/Version.Details.xml file
(see https://github.com/dotnet/source-build/pull/2698)
---
DarcVersion.txt | 2 +-
build.sh | 3 ---

View file

@ -1,5 +1,6 @@
From cd89c9d2f0a1692a8e12b7c00ba93168de716e0a Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Patch-Source: https://github.com/dotnet/source-build/issues/2695
From: Antoine Martin <dev@ayakael.net>
Date: Thu, 20 Jan 2022 14:24:10 +0000
Subject: [PATCH 1/1] roslyn_added-previously-built-artifacts-repo
@ -8,8 +9,6 @@ usually provided by artifacts. Thus, this adds a nuget repo that points
to a yet-to-be-defined /path/to/artifacts. APKBUILD, using sed, adds
correct path to /usr/share/dotnet/artifacts/$_artifactsver in
default_prepare() function
(see https://github.com/dotnet/source-build/issues/2695)
---
NuGet.config | 1 +
1 file changed, 1 insertion(+)

View file

@ -1,12 +1,12 @@
From 01a517aee9ad501c2b7dd90e44e316ffb8e2c35d Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Patch-Source: https://github.com/dotnet/runtime/pull/62938
From: Antoine Martin <dev@ayakael.net>
Date: Sun, 2 Jan 2022 22:00:09 +0000
Subject: [PATCH 2/2] add RID for Alpine 3.15
As of version 5.0.12, runtime does not have the RIDs for Alpine Linux 3.15.
This patch adds them. See dotnet/core issue #6985
This patch adds them.
(see https://github.com/dotnet/runtime/pull/62938)
---
.../runtime.compatibility.json | 114 ++++++++++++++++++
.../Microsoft.NETCore.Platforms/runtime.json | 23 ++++

View file

@ -1,5 +1,5 @@
From 6e549ddb51fbebe1778143bc91b8cd434d751870 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
From: Antoine Martin <dev@ayakael.net>
Date: Wed, 1 Dec 2021 02:34:39 +0000
Subject: [PATCH 1/1] Runtime link order patch for alpine

View file

@ -1,13 +1,13 @@
From a557508590dca1536345e13ba1b043f33defe13a Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Patch-Source: https://github.com/dotnet/runtime/pull/62942
From: Antoine Martin <dev@ayakael.net>
Date: Wed, 1 Dec 2021 02:52:05 +0000
Subject: [PATCH] Fix last version digit present on alpine non-portable
untime adds the extra subversion in its calculation of Alpine's
Runtime adds the extra subversion in its calculation of Alpine's
DistroRID when a non-portable build, but does so inconsistently.
This creates an error when it generates its nuget package.
(https://github.com/dotnet/runtime/pull/62942)
---
eng/native/init-distro-rid.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

View file

@ -1,5 +1,5 @@
From c897096d5bac2bab228779a2c5602fc4bd296a0a Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
From: Antoine Martin <dev@ayakael.net>
Date: Sun, 2 Jan 2022 21:59:58 +0000
Subject: [PATCH 1/2] use version 5.0.4 of
MicrosoftNETCorePlatformsPackageVersion for up-to-date RIDs

View file

@ -1,5 +1,5 @@
From f4cd793116461ec3794799e89d0b213516c94868 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
From: Antoine Martin <dev@ayakael.net>
Date: Fri, 21 Jan 2022 19:22:34 +0000
Subject: [PATCH 1/1] Optouts of telemetry

View file

@ -1,4 +1,12 @@
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
#
# Variables for dotnet build version 5.0
# This APKBUILD is designed to be the same for version 5.0 and under
# except for the variables in this first section
#
pkgname=dotnet5
pkgver=5.0.209
pkgrel=0
@ -17,11 +25,15 @@ _patches="
runtime_link-order.patch
runtime_non-portable-distrorid-fix-alpine.patch
sdk_telemetry-optout.patch
"
"
# Custom prepare
default_prepare() {
local _artifactsver=$(find /usr/share/dotnet/artifacts/$_pkgver_macro* -maxdepth 0 -type d | tail -n1 | sed 's|..*\/||')
sed -i "s|/path/to/artifacts|/usr/share/dotnet/artifacts/$_artifactsver|" "$srcdir"/roslyn_added-previously-built-artifacts-repo.patch
}
# Following for for dotnet builds version 5.0 and under
_pkgver_macro=${pkgver%.*}
_pkgver_prior=${pkgver%.*.*}
_pkgver_name=${_pkgver_macro//[.0]}
@ -29,14 +41,15 @@ pkgdesc="The .NET $_pkgver_macro SDK"
arch="x86_64"
url=https://www.microsoft.com/net/core
license="MIT"
_bootstrap_pkg="bootstrap"
makedepends="
bash
clang
cmake
dotnet$_pkgver_name-bootstrap-runtime
dotnet$_pkgver_name-bootstrap-sdk
dotnet$_pkgver_name-bootstrap-artifacts
dotnet$_pkgver_name-bootstrap-references
dotnet$_pkgver_name-$_bootstrap_pkg-runtime
dotnet$_pkgver_name-$_bootstrap_pkg-sdk
dotnet$_pkgver_name-$_bootstrap_pkg-artifacts
dotnet$_pkgver_name-$_bootstrap_pkg-references
findutils
git
icu-dev
@ -54,15 +67,33 @@ makedepends="
nodejs
openssl-dev
zlib-dev
"
"
options="!check" # No test suite
source="
source-build-v$pkgver$_pkgrel.tar.gz::https://github.com/dotnet/source-build/archive/refs/tags/v$pkgver$_pkgrel.tar.gz
completions.zsh::https://raw.githubusercontent.com/dotnet/sdk/7cec6d9fe5cb326a88091ae44204f52e1f00e69c/scripts/_dotnet
dotnet.sh
$_patches
"
"
subpackages="
aspnetcore$_pkgver_name-runtime:aspnetcore_runtime:noarch:$_aspnetver
aspnetcore$_pkgver_name-targeting-pack:aspnetcore_targeting_pack:noarch:$_aspnetver
dotnet$_pkgver_name-apphost-pack:apphost_pack:$_runtimever
dotnet$_pkgver_name-artifacts:artifacts:$_sdkver
dotnet$_pkgver_name-host:host:$_runtimever
dotnet$_pkgver_name-host-zsh-completion:zshcomp:$_runtimever
dotnet$_pkgver_name-host-bash-completion:bashcomp:$_runtimever
dotnet$_pkgver_name-host-doc:doc:$_runtimever
dotnet$_pkgver_name-hostfxr:hostfxr:$_runtimever
dotnet$_pkgver_name-runtime:runtime:$_runtimever
dotnet$_pkgver_name-sdk:sdk:$_sdkver
dotnet$_pkgver_name-targeting-pack:targeting_pack:noarch:$_runtimever
dotnet$_pkgver_name-templates:templates:noarch:$_sdkver
netstandard$_pkgver_name-targeting-pack:netstandard_targeting_pack:noarch:$_sdkver
"
builddir="$srcdir/source-build-$pkgver$_pkgrel"
# Custom patch logics for dotnet version 5.0 and under
_patch() {
local i failed=
if ! have_patches; then
@ -85,6 +116,7 @@ _patch() {
;;
esac
done
if [ -z "$failed" ]; then
return 0
fi
@ -93,27 +125,71 @@ _patch() {
printf " %s\n" "$i"
done
}
# custom function that updates stage1 for all dotnet versions
#
# buildrepo doesn't know to rebuild dotnet after first build with stage1
# this creates another package that forces the a first build of dotnet
# so that the final build of dotnet is guaranteed to be built with
# Alpine binaries.
_update_stage1() {
msg "Updating stage1 APKBUILD"
# Copy patches
rm ../dotnet$_pkgver_name-stage1/*.patch ../dotnet$_pkgver_name-stage1/dotnet.sh
for i in ../dotnet"$_pkgver_name"/*.patch ../dotnet"$_pkgver_name"/dotnet.sh; do
cp $i ${i/$_pkgver_name/$_pkgver_name-stage1}
done
# Generate stage1
{
echo -n "# "
echo "Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>"
echo "# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>"
echo
echo "#"
echo "# This is generated from dotnet$_pkgver_name's APKBUILD."
echo "# Any modifications to be done in main APKBUILD and propagated by"
echo -n "# executing 'abuild _update_stage1'"
sed \
-e "s/pkgname=dotnet$_pkgver_name/pkgname=dotnet$_pkgver_name-stage1/" \
-e "s/_bootstrap_pkg=\"bootstrap\"/_bootstrap_pkg=\"stage0\"/" \
-e "1,2d" \
../dotnet$_pkgver_name/APKBUILD
} > ../dotnet$_pkgver_name-stage1/APKBUILD
}
prepare() {
default_prepare
# source-build expects to be in a git repo
git init
git add ./* >/dev/null 2>&1
git commit -m 'initial commit' >/dev/null 2>&1
git remote add origin https://github.com/dotnet/source-build.git > /dev/null 2>&1
git add ./*
git commit -m 'initial commit'
git remote add origin https://github.com/dotnet/source-build.git
_patch
msg "Settings up bootstrap"
mkdir -p bootstrap/sdk
cp /usr/share/dotnet/dotnet bootstrap/.
local _bootstrapver=$(find /usr/share/dotnet/sdk/$_pkgver_macro* -maxdepth 0 -type d | tail -n1 | sed 's|..*\/||')
for i in sdk/$_bootstrapver host shared; do cp -r /usr/share/dotnet/$i bootstrap/$i; done
mkdir -p packages/archive
local _artifactsver=$(find /usr/share/dotnet/artifacts/$_pkgver_macro* -maxdepth 0 -type d | tail -n1 | sed 's|..*\/||')
tar cvzf packages/archive/Private.SourceBuilt.Artifacts.tar.gz -C "/usr/share/dotnet/artifacts/$_artifactsver" . >/dev/null 2>&1
tar cvzf packages/archive/Private.SourceBuild.ReferencePackages.tar.gz -C "/usr/share/dotnet/reference-packages/$_pkgver_macro" . >/dev/null 2>&1
tar cvzf packages/archive/Private.SourceBuilt.Artifacts.tar.gz -C "/usr/share/dotnet/artifacts/$_artifactsver" .
tar cvzf packages/archive/Private.SourceBuild.ReferencePackages.tar.gz -C "/usr/share/dotnet/reference-packages/$_pkgver_macro" .
}
build() {
msg "Building $pkgname-$pkgver"
export SOURCE_BUILD_SKIP_SUBMODULE_CHECK=1
# Disable tracing, which is incompatible with certain versions of
# lttng See https://github.com/dotnet/runtime/issues/57784. The
# suggested compile-time change doesn't work, unfortunately.
export COMPlus_LTTng=0
./build.sh \
--with-sdk bootstrap \
/p:SkipDownloadingPreviouslySourceBuiltPackages=true \
@ -124,56 +200,18 @@ build() {
/p:UseSystemLibraries=true \
/p:UseSystemLibunwind=true
}
scan_symlink_targets() {
local name="$1" dir="$2"
local ver=$(pkginfo_val pkgver "$dir"/.PKGINFO)
local subpkgarch=$(pkginfo_val arch "$dir"/.PKGINFO)
[ -d "$REPODEST"/${repo:?}/${subpkgarch/noarch/$CARCH} ] || mkdir -p "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}
[ "$ver" = "$pkgver-r$pkgrel" ] || ln -sf "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}/$name-$ver.apk "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}/$name-$pkgver-r$pkgrel.apk
}
_update_stage1() {
local pwd=$(pwd)
rm ../dotnet$_pkgver_name-stage1/*.patch ../dotnet$_pkgver_name-stage1/dotnet.sh
for i in ../dotnet"$_pkgver_name"/*.patch ../dotnet"$_pkgver_name"/dotnet.sh; do
cp $i ${i/$_pkgver_name/$_pkgver_name-stage1}
done
{
echo -n "# "
echo "Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>"
echo ". ../dotnet$_pkgver_name/APKBUILD"
sed "s/pkgname=dotnet$_pkgver_name/pkgname=dotnet$_pkgver_name-stage1/" ../dotnet$_pkgver_name/lib/00_main.sh
echo "makedepends=\"\${makedepends//$_pkgver_name-bootstrap/$_pkgver_name-stage0}\""
} > ../dotnet$_pkgver_name-stage1/APKBUILD
cd ../dotnet$_pkgver_name-stage1
abuild checksum
cd "$pwd"
}
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-artifacts:artifacts
dotnet$_pkgver_name-host:host
dotnet$_pkgver_name-host-zsh-completion:zshcomp
dotnet$_pkgver_name-host-bash-completion:bashcomp
dotnet$_pkgver_name-host-doc:doc
dotnet$_pkgver_name-hostfxr:hostfxr
dotnet$_pkgver_name-runtime:runtime
dotnet$_pkgver_name-sdk:sdk
dotnet$_pkgver_name-targeting-pack:targeting_pack:noarch
dotnet$_pkgver_name-templates:templates:noarch
netstandard$_pkgver_name-targeting-pack:netstandard_targeting_pack:noarch
"
package() {
depends="dotnet$_pkgver_name-sdk"
provides=dotnet-$_pkgver_macro
install -dm 755 "$pkgdir"/usr/share/zsh/site-functions "$pkgdir"/usr/share/bash-completion/completions "$pkgdir"/usr/share/man/man1
find "$builddir" -iname 'dotnet*.1' -type f -exec cp '{}' "$pkgdir"/usr/share/man/man1/ \;
install -m 755 "$srcdir"/completions.zsh "$pkgdir"/usr/share/zsh/site-functions/_dotnet
install -m 755 "$builddir"/artifacts/src/sdk/scripts/register-completions.bash "$pkgdir"/usr/share/bash-completion/completions/_dotnet
}
sdk() {
pkgver="$_sdkver"
depends="
aspnetcore$_pkgver_name-runtime
aspnetcore$_pkgver_name-targeting-pack
@ -182,144 +220,170 @@ sdk() {
dotnet$_pkgver_name-targeting-pack
dotnet$_pkgver_name-templates
netstandard21-targeting-pack
"
"
provider_priority=$_pkgver_prior
provides="dotnet$_pkgver_name-bootstrap-sdk dotnet-sdk-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./sdk
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-sdk
}
host() {
pkgdesc="A generic driver for the .NET Core Command Line Interface"
pkgver=$_runtimever
provides="dotnet-host"
provider_priority=$_pkgver_prior
cd $builddir/artifacts/x64/Release
install -dm 755 "$subpkgdir"/etc/profile.d "$subpkgdir"/usr/bin "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses/dotnet-host
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./dotnet
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/licenses/dotnet-host/ --no-same-owner ./LICENSE.txt ./ThirdPartyNotices.txt
ln -s /usr/share/dotnet/dotnet "$subpkgdir"/usr/bin/dotnet
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."
pkgver=$_runtimever
depends="dotnet-host"
provides="dotnet-hostfxr-$_pkgver_macro"
provider_priority=$_pkgver_prior
cd $builddir/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./host
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-hostfxr
}
runtime() {
pkgdesc="The .NET $_pkgver_macro Core runtime"
pkgver=$_runtimever
depends="dotnet$_pkgver_name-hostfxr"
provides="
dotnet$_pkgver_name-bootstrap-runtime
dotnet-runtime-$_pkgver_macro
"
"
provider_priority=$_pkgver_prior
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./shared/Microsoft.NETCore.App
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-runtime
}
aspnetcore_runtime() {
pkgdesc="The ASP.NET $_pkgver_macro Core runtime"
pkgver=$_aspnetver
depends="dotnet$_pkgver_name-runtime"
provides="aspnetcore-runtime-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./shared/Microsoft.AspNetCore.App
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/aspnetcore$_pkgver_name-runtime
}
apphost_pack() {
pkgdesc="The .NET $_pkgver_macro Core apphost pack"
pkgver=$_aspnetver
provides="dotnet-apphost-pack-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner --wildcards ./packs/Microsoft.NETCore.App.Host.*
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-apphost-pack
}
targeting_pack() {
pkgdesc="The .NET $_pkgver_macro Core targeting pack"
pkgver=$_runtimever
provides="dotnet-targeting-pack-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/Microsoft.NETCore.App.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-targeting-pack
}
netstandard_targeting_pack() {
pkgdesc="The .NET $_pkgver_macro Standard targeting pack"
pkgver=$_sdkver
depends="dotnet-host"
provides="
netstandard21-targeting-pack
netstandard-targeting-pack-2.1
"
"
provider_priority=$_pkgver_prior
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/NETStandard.Library.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/netstandard21-targeting-pack
}
aspnetcore_targeting_pack() {
pkgdesc="The ASP.NET $_pkgver_macro Core targeting pack"
pkgver=$_runtimever
provides="aspnetcore-targeting-pack-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/Microsoft.AspNetCore.App.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/aspnetcore$_pkgver_name-targeting-pack
}
templates() {
pkgdesc="The .NET $_pkgver_macro templates"
depends="dotnet-host"
pkgver="$_sdkver"
provider_priority=$_pkgver_prior
provides="dotnet-templates-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./templates
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-templates
}
artifacts() {
pkgdesc="Internal package for building .NET $_pkgver_macro Software Development Kit"
depends="dotnet-host"
pkgver=$_sdkver
provides="dotnet$_pkgver_name-bootstrap-artifacts"
provider_priority=$_pkgver_prior
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver "$subpkgdir"/usr/share/licenses
tar -xzf Private.SourceBuilt.Artifacts.*.tar.gz -C "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver/
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-artifacts
}
zshcomp() {
default_zshcomp
pkgdesc="zsh completion for .NET $_pkgver_macro"
pkgver=$_runtimever
depends="dotnet-host"
provides="dotnet-host-zsh-completion"
provider_priority=$_pkgver_prior
}
bashcomp() {
default_bashcomp
pkgdesc="bash completion for .NET $_pkgver_macro"
pkgver=$_runtimever
depends="dotnet-host"
provides="dotnet-host-bash-completion"
provider_priority=$_pkgver_prior
}
doc() {
default_doc
pkgdesc="Docs for .NET $_pkgver_macro"
pkgver="$_runtimever"
provides="dotnet-host-doc"
provider_priority=$_pkgver_prior
}
@ -327,13 +391,13 @@ sha512sums="
9e5a762ae9e90bac51b586cb084d92581ee9eaabd620852273eab5a463f676e285f071ec734f4f18b587584edfde44597a1d21ce10af5dc7cb4dba2c1a187436 source-build-v5.0.209.1-SDK.tar.gz
d0aecbf13e6781ef867021085e0d4a55e5f24dddfd175e4d0ce651fdb9c8e330636b2c69e3c4491442e5dd32c6859f38388006b3fe36fac2226837e1bc4107c9 completions.zsh
f58bd83b709dcb4b0b67830756069c34258a167b33cb290cbf30f21d69d75402d38e013fd7bbf00640fe19e397f78df6ff787cf8484ee8967d5b8809f033eafb dotnet.sh
09e8ba94973d4ab1017818eba7e13c4bda97b658dc6e0c15becb5211d15cad42df484b4c18f25f5dca1a02e647221013378ceb5c77a4046a107ff36df92641d2 application-insights_fix-net40-location.patch
d7ade1fea4bdf983e34827e5b729b406cdc08a36582a7c60510663742bcd6f0ad6720e8eca95399eb5d1ca05468e984ba622e92f6e964834c02df2e2db4e4f3e build_darc-use-available-runtime.patch
3a9ad06c927aafba4bf8fff3b369de2f8c114bd50037dff611491ce5cf65e6849a82a6752d49224e5dc75b6f08b6ec671ec12e73bd9b33a8829ee7347892cbe3 build_darc-fix-alpine.patch
25bc54272a74a7f3be686936d7c6465fb0f5f14238143738ce668159289f4567aec3f81dc12bd04bb158dd2d7f1a4f340ba541724410d029868775dcdc657003 roslyn_added-previously-built-artifacts-repo.patch
5a1c560b8078ba17d18f50ec78c8da45ed4d39b430ab47a31d829a3e9ce38cc7e3a92ee6a1f89f249e49b95e653bcf2409f4781c872134a69ce24e617dc49b32 runtime_add-rid-for-alpine-315.patch
2accd945ab49c3ac70e9ef8e5040b8f608771fac87525490804df7bc2607ca4e733502624b7c54b27b31ed907f5cb285e863eda0ee396aa8bce6d4dfaffec499 runtime_use-latest-microsoftnetcoreplatformspackage.patch
19a4b0e74f4e118a252c7c2231f955c3dc8ef9a0471e626f46dc7d7b3a34291ee479401966d4b58f1495daacbe7855ed5862522affd714dd11d8e2ef75151f1b runtime_link-order.patch
eaac9669bf68df73ffa242d452f1bd471e3aa346d7f8a57fa42463ac1fda1484d91447644d773911e7e5c94c7947caa0e45cac26f31ad7986bcd22884cda14d9 runtime_non-portable-distrorid-fix-alpine.patch
8865df32367e0e404f2fb020cfee77cc2a06cf3fcb579ae5b8df94fa701ab7877be11310181f0b628d140353c9a4f54e802ae8129e410bfee431c8ddc0bb5800 sdk_telemetry-optout.patch
fb1cffcacba8cf6439c05781442167905b8147d36665aef8df4fc7a573c26fa3dd0f1ed2ec680039715d25d73646c3633f5ad9f658f6e9ec85f6850efec87935 application-insights_fix-net40-location.patch
7010a0262b3c4cf7b45140e50052bb8b194266639544e37f1f3ff1ffe74e606b1e71e53b5cd9436d986f325a9749a48f055c8b90d42e705264c99c851244013e build_darc-use-available-runtime.patch
d77500c50ce9a9ce35281d54a1f6d9c00e1ca391567f1a05f3b0509aa6212353f48c2163fc277103930ee21ee143304997c55522fdf8e3de83d0ea9d7e2a6b13 build_darc-fix-alpine.patch
72ee7064fb9042d4c37ca22c1fe8cd5c393db51086279db3c965142ac8367f6b34b3e6f7d1f36269d945d65587cd0cda068fa0f5e94a203a2383db530f805964 roslyn_added-previously-built-artifacts-repo.patch
70ca8f5177f9ef3b40c9d0ad0d527877a4179e61db7e4e90e69fb7a0ed214034b6a963ff1fd93dca197ef1b9ea03ca1fa85f84dea685d6f02589a88f84aa732d runtime_add-rid-for-alpine-315.patch
8cb8e38fb0d4bfc10b3a214ed2deabbcabaef85cbe2f2ad02cac9589a3e9a613116ef79e38122474fd5c3d6d1a24a2f7efe8f5c61855bb386e90198388bfcd4d runtime_use-latest-microsoftnetcoreplatformspackage.patch
619ebecf68bac7bd4ecf68effe31e84d1d338f3b850bc49288b957a5528fe3ed27ed844032f99c2c337c3ed214d1163db81923507100e6ec5f78af502dd610e1 runtime_link-order.patch
4a480d9502ad9d8c0c9a11879de29f181c2f7eff2e88ef7bd61611dc62ac23fbff9cf904b59186a05d4f5bb7a48d74aae4e09105f16d85a7a95082e2a9af2dd0 runtime_non-portable-distrorid-fix-alpine.patch
9fabfa18197f5a8104f816e2cd64156c72565709470b81fa323516b3cd5c55dbaf5383b065e2b7ae995303ee1020205995a5b52987b539abecc3700c261b59e4 sdk_telemetry-optout.patch
"

View file

@ -25,7 +25,6 @@ APKBUILD for dotnet5
versions)
# Special functions
* ./build_apkbuild.sh: Builds APKBUILD using scripts in lib
* abuild _update_stage1: Updates dotnet5-stage1 to current version
# Known issues

View file

@ -1,5 +1,5 @@
From 387efb0ac01e40cd85cf9f5ce770be6437265ca4 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
From: Antoine Martin <dev@ayakael.net>
Date: Fri, 4 Jun 2021 13:32:53 +0000
Subject: [PATCH] FIxed Net40 location

View file

@ -1,9 +0,0 @@
#/bin/bash
echo "# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>" > APKBUILD
apkbuild-lint lib/*
# Build APKBUILD
sed 's:^\s*#.*$::g' lib/* >> APKBUILD
sed -i '/^[[:space:]]*$/d' APKBUILD
abuild checksum

View file

@ -1,5 +1,6 @@
From d07d50c6f8a5793badc50fb2c964b87dec87a3a1 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Patch-Source: https://github.com/dotnet/source-build/issues/1868
From: Antoine Martin <dev@ayakael.net>
Date: Thu, 15 Jul 2021 15:37:33 +0000
Subject: [PATCH 1/1] Fixed darc init for Alpine
@ -8,8 +9,6 @@ binary architecture. This patch deletes all the wrong ones so that it
is forced to chose the correct one. This issue only occurs when using
dotnet-stage0-runtime, thus libunwind is suspected to be the issue as
stage0 wasn't built with system libunwind.
(see https://github.com/dotnet/source-build/issues/1868)
---
eng/common/darc-init.sh | 3 +++
1 file changed, 3 insertions(+)

View file

@ -1,5 +1,6 @@
From 970fa4290ee6b4d43a0fbb19b919f4f260edf6a5 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Patch-Source: https://github.com/dotnet/source-build/pull/2698
From: Antoine Martin <dev@ayakael.net>
Date: Wed, 15 Dec 2021 18:04:02 +0000
Subject: [PATCH 1/1] Makes darc use whatever runtime is available
@ -7,8 +8,6 @@ Default version of Darc needs dotnet 3.1 runtimes, and fails to run on
Alpine. This patch fixes this by pushing Darc's version and disabling runtime
retrieval. Can't push it too much, though, as latest version breaks with
application-insights as it doesn't include a eng/Version.Details.xml file
(see https://github.com/dotnet/source-build/pull/2698)
---
DarcVersion.txt | 2 +-
build.sh | 3 ---

View file

@ -1,29 +0,0 @@
#
# Main functions for dotnet build version 5.0
#
pkgname=dotnet5
pkgver=5.0.209
pkgrel=0
_pkgrel=".1-SDK"
_runtimever=5.0.12
_sdkver=$pkgver
_aspnetver=$_runtimever
_llvmver=12
_patches="
application-insights_fix-net40-location.patch
build_darc-use-available-runtime.patch
build_darc-fix-alpine.patch
roslyn_added-previously-built-artifacts-repo.patch
runtime_add-rid-for-alpine-315.patch
runtime_use-latest-microsoftnetcoreplatformspackage.patch
runtime_link-order.patch
runtime_non-portable-distrorid-fix-alpine.patch
sdk_telemetry-optout.patch
"
# Custom preparation
default_prepare() {
local _artifactsver=$(find /usr/share/dotnet/artifacts/$_pkgver_macro* -maxdepth 0 -type d | tail -n1 | sed 's|..*\/||')
sed -i "s|/path/to/artifacts|/usr/share/dotnet/artifacts/$_artifactsver|" "$srcdir"/roslyn_added-previously-built-artifacts-repo.patch
}

View file

@ -1,46 +0,0 @@
#
# Build variables for dotnet builds version 5.0 and under
#
# APKBuild
_pkgver_macro=${pkgver%.*}
_pkgver_prior=${pkgver%.*.*}
_pkgver_name=${_pkgver_macro//[.0]}
pkgdesc="The .NET $_pkgver_macro SDK"
arch="x86_64"
url=https://www.microsoft.com/net/core
license="MIT"
makedepends="
bash
clang
cmake
dotnet$_pkgver_name-bootstrap-runtime
dotnet$_pkgver_name-bootstrap-sdk
dotnet$_pkgver_name-bootstrap-artifacts
dotnet$_pkgver_name-bootstrap-references
findutils
git
icu-dev
inetutils-syslogd
krb5-dev
libgit2-dev
libintl
libunwind-dev
libxml2-dev
libxml2-utils
linux-headers
lldb-dev
llvm$_llvmver-dev
lttng-ust-dev
nodejs
openssl-dev
zlib-dev
"
options="!check" # No test suite
source="
source-build-v$pkgver$_pkgrel.tar.gz::https://github.com/dotnet/source-build/archive/refs/tags/v$pkgver$_pkgrel.tar.gz
completions.zsh::https://raw.githubusercontent.com/dotnet/sdk/7cec6d9fe5cb326a88091ae44204f52e1f00e69c/scripts/_dotnet
dotnet.sh
$_patches
"
builddir="$srcdir/source-build-$pkgver$_pkgrel"

View file

@ -1,79 +0,0 @@
#
# Build functions for dotnet builds version 5.0 and under
#
_patch() {
local i failed=
if ! have_patches; then
return 0
fi
[ -d "$builddir" ] || { error "Is \$builddir set correctly?"; return 1; }
msg "Deploying patches"
for i in $source; do
case ${i%::*} in
build_*.patch)
echo "applying $i to sourcebuild"
patch ${patch_args:--p1} -i "$srcdir/$(filename_from_uri $i)" || failed="$failed $i"
;;
*.patch)
local _package=$(echo $i | sed 's|_.*||')
local _patch=$(echo $i | sed "s|$_package\_||")
echo "deploying $_patch to $_package for application by sourcebuild"
[ -d patches/$_package ] || mkdir patches/$_package
cp "$srcdir"/"$i" patches/$_package/$_patch
;;
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
}
prepare() {
default_prepare
# source-build expects to be in a git repo
git init
git add ./* >/dev/null 2>&1
git commit -m 'initial commit' >/dev/null 2>&1
git remote add origin https://github.com/dotnet/source-build.git > /dev/null 2>&1
_patch
msg "Settings up bootstrap"
mkdir -p bootstrap/sdk
cp /usr/share/dotnet/dotnet bootstrap/.
local _bootstrapver=$(find /usr/share/dotnet/sdk/$_pkgver_macro* -maxdepth 0 -type d | tail -n1 | sed 's|..*\/||')
for i in sdk/$_bootstrapver host shared; do cp -r /usr/share/dotnet/$i bootstrap/$i; done
mkdir -p packages/archive
local _artifactsver=$(find /usr/share/dotnet/artifacts/$_pkgver_macro* -maxdepth 0 -type d | tail -n1 | sed 's|..*\/||')
tar cvzf packages/archive/Private.SourceBuilt.Artifacts.tar.gz -C "/usr/share/dotnet/artifacts/$_artifactsver" . >/dev/null 2>&1
tar cvzf packages/archive/Private.SourceBuild.ReferencePackages.tar.gz -C "/usr/share/dotnet/reference-packages/$_pkgver_macro" . >/dev/null 2>&1
}
build() {
msg "Building $pkgname-$pkgver"
export SOURCE_BUILD_SKIP_SUBMODULE_CHECK=1
# Disable tracing, which is incompatible with certain versions of
# lttng See https://github.com/dotnet/runtime/issues/57784. The
# suggested compile-time change doesn't work, unfrotunately.
export COMPlus_LTTng=0
./build.sh \
--with-sdk bootstrap \
/p:SkipDownloadingPreviouslySourceBuiltPackages=true \
/p:SkipDownloadingReferencePackages=true \
/p:ContinueOnPrebuiltBaselineError=true \
/p:SkipPortableRuntimeBuild=true \
/p:SkipPrebuiltEnforcement=true \
/p:UseSystemLibraries=true \
/p:UseSystemLibunwind=true
}

View file

@ -1,23 +0,0 @@
# abuild / buildrepo gets confused when setting pkgver var from within subpkgs
# This expresses itself in two ways:
# 1) scan_symlink_targets, when it detects symlink dependencies between subpkgs
# sets a hard dependency to that specific version of subpackage. Fixing this
# involves simply neutralizing scan_symlink_targets, leaving the maintainer
# to set those dependencies explicitely
# 2) abuild / buildrepo has logics to determine if a package should be rebuilt
# abuild uses apk_up2date and abuildindex_up2date, and buildrepo uses
# pkg.each_need_rebuild, then pkg.apk_file_exists. All of these rely on if
# there's a readable file at $repo/$CARCH/$name-$pkgver-r$pkgrel.apk
# Fixing this involves creating a symbolic link at that location that points
# to where the subpackage actually is.
# Fortunately, scan_symlink_targes has all the hooks necessary to create a
# symbolic link: it resides within a for loop that's based around subpkgdir,
# and feeds function with .PKGINFO info that allows for creation of symbolic
# link when necessary
scan_symlink_targets() {
local name="$1" dir="$2"
local ver=$(pkginfo_val pkgver "$dir"/.PKGINFO)
local subpkgarch=$(pkginfo_val arch "$dir"/.PKGINFO)
[ -d "$REPODEST"/${repo:?}/${subpkgarch/noarch/$CARCH} ] || mkdir -p "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}
[ "$ver" = "$pkgver-r$pkgrel" ] || ln -sf "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}/$name-$ver.apk "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}/$name-$pkgver-r$pkgrel.apk
}

View file

@ -1,20 +0,0 @@
_update_stage1() {
local pwd=$(pwd)
# Update symbolic link to patches
rm ../dotnet$_pkgver_name-stage1/*.patch ../dotnet$_pkgver_name-stage1/dotnet.sh
for i in ../dotnet"$_pkgver_name"/*.patch ../dotnet"$_pkgver_name"/dotnet.sh; do
cp $i ${i/$_pkgver_name/$_pkgver_name-stage1}
done
# Generate stage1
{
echo -n "# "
echo "Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>"
echo ". ../dotnet$_pkgver_name/APKBUILD"
sed "s/pkgname=dotnet$_pkgver_name/pkgname=dotnet$_pkgver_name-stage1/" ../dotnet$_pkgver_name/lib/00_main.sh
echo "makedepends=\"\${makedepends//$_pkgver_name-bootstrap/$_pkgver_name-stage0}\""
} > ../dotnet$_pkgver_name-stage1/APKBUILD
cd ../dotnet$_pkgver_name-stage1
abuild checksum
cd "$pwd"
}

View file

@ -1,221 +0,0 @@
#
# Packaging functions for dotnet builds 5.0 and under
#
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-artifacts:artifacts
dotnet$_pkgver_name-host:host
dotnet$_pkgver_name-host-zsh-completion:zshcomp
dotnet$_pkgver_name-host-bash-completion:bashcomp
dotnet$_pkgver_name-host-doc:doc
dotnet$_pkgver_name-hostfxr:hostfxr
dotnet$_pkgver_name-runtime:runtime
dotnet$_pkgver_name-sdk:sdk
dotnet$_pkgver_name-targeting-pack:targeting_pack:noarch
dotnet$_pkgver_name-templates:templates:noarch
netstandard$_pkgver_name-targeting-pack:netstandard_targeting_pack:noarch
"
package() {
depends="dotnet$_pkgver_name-sdk"
provides=dotnet-$_pkgver_macro
install -dm 755 "$pkgdir"/usr/share/zsh/site-functions "$pkgdir"/usr/share/bash-completion/completions "$pkgdir"/usr/share/man/man1
find "$builddir" -iname 'dotnet*.1' -type f -exec cp '{}' "$pkgdir"/usr/share/man/man1/ \;
install -m 755 "$srcdir"/completions.zsh "$pkgdir"/usr/share/zsh/site-functions/_dotnet
install -m 755 "$builddir"/artifacts/src/sdk/scripts/register-completions.bash "$pkgdir"/usr/share/bash-completion/completions/_dotnet
}
sdk() {
pkgver="$_sdkver"
depends="
aspnetcore$_pkgver_name-runtime
aspnetcore$_pkgver_name-targeting-pack
dotnet$_pkgver_name-apphost-pack
dotnet$_pkgver_name-runtime
dotnet$_pkgver_name-targeting-pack
dotnet$_pkgver_name-templates
netstandard21-targeting-pack
"
provider_priority=$_pkgver_prior
provides="dotnet$_pkgver_name-bootstrap-sdk dotnet-sdk-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./sdk
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-sdk
}
host() {
pkgdesc="A generic driver for the .NET Core Command Line Interface"
pkgver=$_runtimever
provides="dotnet-host"
provider_priority=$_pkgver_prior
cd $builddir/artifacts/x64/Release
install -dm 755 "$subpkgdir"/etc/profile.d "$subpkgdir"/usr/bin "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses/dotnet-host
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./dotnet
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/licenses/dotnet-host/ --no-same-owner ./LICENSE.txt ./ThirdPartyNotices.txt
ln -s /usr/share/dotnet/dotnet "$subpkgdir"/usr/bin/dotnet
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."
pkgver=$_runtimever
depends="dotnet-host"
provides="dotnet-hostfxr-$_pkgver_macro"
provider_priority=$_pkgver_prior
cd $builddir/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./host
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-hostfxr
}
runtime() {
pkgdesc="The .NET $_pkgver_macro Core runtime"
pkgver=$_runtimever
depends="dotnet$_pkgver_name-hostfxr"
provides="
dotnet$_pkgver_name-bootstrap-runtime
dotnet-runtime-$_pkgver_macro
"
provider_priority=$_pkgver_prior
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./shared/Microsoft.NETCore.App
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-runtime
}
aspnetcore_runtime() {
pkgdesc="The ASP.NET $_pkgver_macro Core runtime"
pkgver=$_aspnetver
depends="dotnet$_pkgver_name-runtime"
provides="aspnetcore-runtime-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./shared/Microsoft.AspNetCore.App
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/aspnetcore$_pkgver_name-runtime
}
apphost_pack() {
pkgdesc="The .NET $_pkgver_macro Core apphost pack"
pkgver=$_aspnetver
provides="dotnet-apphost-pack-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner --wildcards ./packs/Microsoft.NETCore.App.Host.*
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-apphost-pack
}
targeting_pack() {
pkgdesc="The .NET $_pkgver_macro Core targeting pack"
pkgver=$_runtimever
provides="dotnet-targeting-pack-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/Microsoft.NETCore.App.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-targeting-pack
}
netstandard_targeting_pack() {
pkgdesc="The .NET $_pkgver_macro Standard targeting pack"
pkgver=$_sdkver
depends="dotnet-host"
provides="
netstandard21-targeting-pack
netstandard-targeting-pack-2.1
"
provider_priority=$_pkgver_prior
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/NETStandard.Library.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/netstandard21-targeting-pack
}
aspnetcore_targeting_pack() {
pkgdesc="The ASP.NET $_pkgver_macro Core targeting pack"
pkgver=$_runtimever
provides="aspnetcore-targeting-pack-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/Microsoft.AspNetCore.App.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/aspnetcore$_pkgver_name-targeting-pack
}
templates() {
pkgdesc="The .NET $_pkgver_macro templates"
depends="dotnet-host"
pkgver="$_sdkver"
provider_priority=$_pkgver_prior
provides="dotnet-templates-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./templates
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-templates
}
artifacts() {
pkgdesc="Internal package for building .NET $_pkgver_macro Software Development Kit"
depends="dotnet-host"
pkgver=$_sdkver
provides="dotnet$_pkgver_name-bootstrap-artifacts"
provider_priority=$_pkgver_prior
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver "$subpkgdir"/usr/share/licenses
tar -xzf Private.SourceBuilt.Artifacts.*.tar.gz -C "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver/
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-artifacts
}
zshcomp() {
default_zshcomp
pkgdesc="zsh completion for .NET $_pkgver_macro"
pkgver=$_runtimever
depends="dotnet-host"
provides="dotnet-host-zsh-completion"
provider_priority=$_pkgver_prior
}
bashcomp() {
default_bashcomp
pkgdesc="bash completion for .NET $_pkgver_macro"
pkgver=$_runtimever
depends="dotnet-host"
provides="dotnet-host-bash-completion"
provider_priority=$_pkgver_prior
}
doc() {
default_doc
pkgdesc="Docs for .NET $_pkgver_macro"
pkgver="$_runtimever"
provides="dotnet-host-doc"
provider_priority=$_pkgver_prior
}

View file

@ -1,5 +1,6 @@
From cd89c9d2f0a1692a8e12b7c00ba93168de716e0a Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Patch-Source: https://github.com/dotnet/source-build/issues/2695
From: Antoine Martin <dev@ayakael.net>
Date: Thu, 20 Jan 2022 14:24:10 +0000
Subject: [PATCH 1/1] roslyn_added-previously-built-artifacts-repo
@ -8,8 +9,6 @@ usually provided by artifacts. Thus, this adds a nuget repo that points
to a yet-to-be-defined /path/to/artifacts. APKBUILD, using sed, adds
correct path to /usr/share/dotnet/artifacts/$_artifactsver in
default_prepare() function
(see https://github.com/dotnet/source-build/issues/2695)
---
NuGet.config | 1 +
1 file changed, 1 insertion(+)

View file

@ -1,12 +1,12 @@
From 01a517aee9ad501c2b7dd90e44e316ffb8e2c35d Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Patch-Source: https://github.com/dotnet/runtime/pull/62938
From: Antoine Martin <dev@ayakael.net>
Date: Sun, 2 Jan 2022 22:00:09 +0000
Subject: [PATCH 2/2] add RID for Alpine 3.15
As of version 5.0.12, runtime does not have the RIDs for Alpine Linux 3.15.
This patch adds them. See dotnet/core issue #6985
This patch adds them.
(see https://github.com/dotnet/runtime/pull/62938)
---
.../runtime.compatibility.json | 114 ++++++++++++++++++
.../Microsoft.NETCore.Platforms/runtime.json | 23 ++++

View file

@ -1,5 +1,5 @@
From 6e549ddb51fbebe1778143bc91b8cd434d751870 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
From: Antoine Martin <dev@ayakael.net>
Date: Wed, 1 Dec 2021 02:34:39 +0000
Subject: [PATCH 1/1] Runtime link order patch for alpine

View file

@ -1,13 +1,13 @@
From a557508590dca1536345e13ba1b043f33defe13a Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Patch-Source: https://github.com/dotnet/runtime/pull/62942
From: Antoine Martin <dev@ayakael.net>
Date: Wed, 1 Dec 2021 02:52:05 +0000
Subject: [PATCH] Fix last version digit present on alpine non-portable
untime adds the extra subversion in its calculation of Alpine's
Runtime adds the extra subversion in its calculation of Alpine's
DistroRID when a non-portable build, but does so inconsistently.
This creates an error when it generates its nuget package.
(https://github.com/dotnet/runtime/pull/62942)
---
eng/native/init-distro-rid.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

View file

@ -1,5 +1,5 @@
From c897096d5bac2bab228779a2c5602fc4bd296a0a Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
From: Antoine Martin <dev@ayakael.net>
Date: Sun, 2 Jan 2022 21:59:58 +0000
Subject: [PATCH 1/2] use version 5.0.4 of
MicrosoftNETCorePlatformsPackageVersion for up-to-date RIDs

View file

@ -1,5 +1,5 @@
From f4cd793116461ec3794799e89d0b213516c94868 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
From: Antoine Martin <dev@ayakael.net>
Date: Fri, 21 Jan 2022 19:22:34 +0000
Subject: [PATCH 1/1] Optouts of telemetry

View file

@ -1,4 +1,10 @@
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Variables for dotnet-stage0 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
pkgname=dotnet6-stage0
pkgdesc="The .NET Core SDK"
pkgver=6.0.100
@ -7,7 +13,10 @@ _runtimever=6.0.0
_sdkver=$pkgver
_aspnetver=$_runtimever
_nappo_get="system.reactive.core.4.1.1.nupkg"
_nappo_exclude=''
_bootstrapver=0.1.0-6.0.100-bootstrap.29
# Following for dotnet-stage0 build version 6.0 and up
_pkgver_macro=${pkgver%.*}
_pkgver_prior=1
_pkgver_name="${_pkgver_macro//[.0]}"
@ -22,14 +31,29 @@ makedepends="
zlib
py3-packaging
"
subpackages="
aspnetcore$_pkgver_name-stage0-runtime:aspnetcore_runtime:noarch:$_aspnetver
aspnetcore$_pkgver_name-stage0-targeting-pack:aspnetcore_targeting_pack:noarch:$_aspnetver
dotnet$_pkgver_name-stage0-apphost-pack:apphost_pack:$_runtimever
dotnet$_pkgver_name-stage0-artifacts:artifacts:noarch:$_sdkver
dotnet$_pkgver_name-stage0-host:host:$_runtimever
dotnet$_pkgver_name-stage0-hostfxr:hostfxr:$_runtimever
dotnet$_pkgver_name-stage0-runtime:runtime:$_runtimever
dotnet$_pkgver_name-stage0-sdk:sdk:$_sdkver
dotnet$_pkgver_name-stage0-targeting-pack:targeting_pack:noarch:$_runtimever
dotnet$_pkgver_name-stage0-templates:templates:noarch:$_sdkver
netstandard$_pkgver_name-stage0-targeting-pack:netstandard_targeting_pack:noarch:$_sdkver
"
options="!check" # No test suite
_default_source="
https://pagure.io/dotnet-sig/dotnet6.0/raw/main/f/build-dotnet-tarball
https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.$_bootstrapver.tar.gz
https://gist.githubusercontent.com/omajid/c04b6025de49d0b7b18ab4a7e789484e/raw/b33c57f6bf9c00bb8633375123d2d3594fe81c26/nappo.py
dotnet.sh
"
"
builddir="$srcdir"
# custom function that converts Alpine arch syntax to dotnet arch syntax
_get_arch() {
case $1 in
x86_64) local arch=x64;;
@ -38,20 +62,14 @@ _get_arch() {
esac
echo $arch
}
unpack() {
verify
initdcheck
mkdir -p "$srcdir"
msg "Unpacking Private.SourceBuilt.Artifacts"
gunzip Private.SourceBuilt.Artifacts.*.tar.gz
}
scan_symlink_targets() {
local name="$1" dir="$2"
local ver=$(pkginfo_val pkgver "$dir"/.PKGINFO)
local subpkgarch=$(pkginfo_val arch "$dir"/.PKGINFO)
[ -d "$REPODEST"/${repo:?}/${subpkgarch/noarch/$CARCH} ] || mkdir -p "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}
[ "$ver" = "$pkgver-r$pkgrel" ] || ln -sf "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}/$name-$ver.apk "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}/$name-$pkgver-r$pkgrel.apk
}
# custom source updater function for all dotnet versions
#
# Prebuilt artifacts only provides linux-x64 nukgs. As Alpine uses linux-musl,
# the below scripts updates source to fetch the musl version of those packages,
# allowing packaging of the correct architecture. Thus, everytime Artifacts
# is updated, or new architectures are added, this function needs to be
# executed using 'abuild _update_source'
_update_source() {
[ -z "$source" ] \
&& msg "Removing source from APKBUILD"
@ -62,11 +80,16 @@ _update_source() {
-e "/^source='.*'\$/d" \
-e "/^source='/,/'\$/d" \
APKBUILD
source="$_default_source"
fetch
local nuget_source="$_default_source"
msg "Updating source"
local nappo_get="$_nappo_get $(tar --list -f "$srcdir"/Private.SourceBuilt.Artifacts.*.tar.gz --wildcards '*.linux-x64.*' --exclude '*Intermediate*' 2>/dev/null)"
local nappo_exclude="*Intermediate* $_nappo_exclude"
# shellcheck disable=SC3045
local nappo_exclude="$(printf '--exclude %s ' $nappo_exclude)"
local nappo_get=$(tar --list -f "$srcdir"/Private.SourceBuilt.Artifacts.*.tar.gz --wildcards '*.linux-x64.*' $nappo_exclude)
local nappo_get="$_nappo_get $nappo_get"
for package in $nappo_get; do
for _arch in $arch; do
local filename=${package##*/} # Extracts just filename
@ -76,9 +99,9 @@ _update_source() {
local name=${nupkg%*.*.*.*} # Extracts name without version
local version=${nupkg/$name.} # Extracts version out of nupkg using name
local name=${name/linux-x64/linux-musl-$(_get_arch $_arch)} # Converts to current arch
[ -z "${filename##*servicing*}" ] && local version=''
echo "Getting url for $name version $version, replaces $package"
local nappo_out=$(python3 "$srcdir"/nappo.py download --verbose "$name" "$version")
[ -z "${filename##*servicing*}" ] && unset version
echo "Getting $name [${version:-latest}] (replaces $package)"
local nappo_out="$(python3 "$srcdir"/nappo.py download --verbose $name ${version:-})"
local nupkg="${nappo_out#*.nupkg}"
local uri=${nappo_out/$nupkg}
local nupkg=$(echo $nupkg | tr -d '\n')
@ -93,26 +116,22 @@ _update_source() {
local nuget_source="$(printf '%s\n' $nuget_source)"
printf 'source="\n%s\n"\n' "$nuget_source" >>"$APKBUILD"
}
subpackages="
aspnetcore$_pkgver_name-stage0-runtime:aspnetcore_runtime:noarch
aspnetcore$_pkgver_name-stage0-targeting-pack:aspnetcore_targeting_pack:noarch
dotnet$_pkgver_name-stage0-apphost-pack:apphost_pack
dotnet$_pkgver_name-stage0-artifacts:artifacts:noarch
dotnet$_pkgver_name-stage0-host:host
dotnet$_pkgver_name-stage0-hostfxr:hostfxr
dotnet$_pkgver_name-stage0-runtime:runtime
dotnet$_pkgver_name-stage0-sdk:sdk
dotnet$_pkgver_name-stage0-targeting-pack:targeting_pack:noarch
dotnet$_pkgver_name-stage0-templates:templates:noarch
netstandard$_pkgver_name-stage0-targeting-pack:netstandard_targeting_pack:noarch
"
unpack() {
verify
initdcheck
mkdir -p "$srcdir"
msg "Unpacking Private.SourceBuilt.Artifacts"
gunzip Private.SourceBuilt.Artifacts.*.tar.gz
}
package() {
depends="dotnet$_pkgver_name-sdk"
provides="dotnet-$_pkgver_macro"
mkdir -p "$pkgdir"
}
sdk() {
pkgver="$_sdkver"
depends="
aspnetcore$_pkgver_name-stage0-runtime
aspnetcore$_pkgver_name-stage0-targeting-pack
@ -120,95 +139,110 @@ sdk() {
dotnet$_pkgver_name-stage0-targeting-pack
dotnet$_pkgver_name-stage0-templates
netstandard21-targeting-pack
"
"
provider_priority=$_pkgver_prior
provides="dotnet$_pkgver_name-bootstrap-sdk"
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*"$(_get_arch $CARCH)".tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./sdk ./sdk-manifests
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-sdk
}
host() {
pkgdesc="A generic driver for the .NET Core Command Line Interface"
pkgver=$_runtimever
provides="dotnet-host"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/etc/profile.d "$subpkgdir"/usr/bin "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses/dotnet-host
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*"$(_get_arch $CARCH)".tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./dotnet
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*"$(_get_arch $CARCH)".tar.gz -C "$subpkgdir"/usr/share/licenses/dotnet-host/ --no-same-owner ./LICENSE.txt ./ThirdPartyNotices.txt
ln -s /usr/share/dotnet/dotnet "$subpkgdir"/usr/bin/dotnet
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."
pkgver=$_runtimever
depends="dotnet-host"
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*"$(_get_arch $CARCH)".tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./host
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-hostfxr
}
runtime() {
pkgdesc="The .NET $_pkgver_macro Core runtime"
pkgver=$_runtimever
depends="dotnet$_pkgver_name-stage0-hostfxr"
provides="dotnet$_pkgver_name-bootstrap-runtime"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*"$(_get_arch $CARCH)".tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./shared/Microsoft.NETCore.App
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-runtime
}
aspnetcore_runtime() {
pkgdesc="The ASP.NET $_pkgver_macro Core runtime"
pkgver=$_aspnetver
depends="dotnet$_pkgver_name-bootstrap-runtime"
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*"$(_get_arch $CARCH)".tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./shared/Microsoft.AspNetCore.App
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/aspnetcore$_pkgver_name-runtime
}
apphost_pack() {
pkgdesc="The .NET $_pkgver_macro Core apphost pack"
pkgver=$_aspnetver
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*"$(_get_arch $CARCH)".tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner --wildcards ./packs/Microsoft.NETCore.App.Host.*
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-apphost-pack
}
targeting_pack() {
pkgdesc="The .NET $_pkgver_macro Core targeting pack"
pkgver=$_runtimever
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*"$(_get_arch $CARCH)".tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/Microsoft.NETCore.App.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-targeting-pack
}
netstandard_targeting_pack() {
pkgdesc="The .NET $_pkgver_macro Standard targeting pack"
pkgver=$_sdkver
depends="dotnet-host"
provides="netstandard21-targeting-pack"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*"$(_get_arch $CARCH)".tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/NETStandard.Library.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/netstandard21-targeting-pack
}
aspnetcore_targeting_pack() {
pkgdesc="The ASP.NET $_pkgver_macro Core targeting pack"
pkgver=$_runtimever
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*"$(_get_arch $CARCH)".tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/Microsoft.AspNetCore.App.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/aspnetcore$_pkgver_name-targeting-pack
}
templates() {
pkgdesc="The .NET $_pkgver_macro templates"
depends="dotnet-host"
pkgver="$_sdkver"
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*"$(_get_arch $CARCH)".tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./templates
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-templates
}
artifacts() {
pkgdesc="Internal package for building .NET $_pkgver_macro Software Development Kit"
depends="dotnet-host"
pkgver=$_sdkver
provides="dotnet$_pkgver_name-bootstrap-artifacts"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver "$subpkgdir"/usr/share/licenses
tar -xf "$srcdir"/Private.SourceBuilt.Artifacts.*.tar -C "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver/ --no-same-owner --exclude '*.linux-x64*'
install -m 644 "$srcdir"/*"$(_get_arch $CARCH)"*.nupkg "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver/.

View file

@ -21,7 +21,6 @@ APKBUILD for dotnet6-stage0
versions)
# Special functions
* ./build_apkbuild.sh: Builds APKBUILD using scripts in lib
* abuild _update_source: Stage0 adapts prebuilt artifacts packages by replacing
linux-x64 nupkgs with linux-musl-x64 versions. Any updates to artifacts will
require executing this function to update source with up to date nuget packages

View file

@ -1,14 +0,0 @@
#/bin/bash
source APKBUILD
echo "# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>" > APKBUILD
apkbuild-lint lib/*
# Build APKBUILD
sed 's:^\s*#.*$::g' lib/* >> APKBUILD
source="$(printf '%s\n' $source)"
printf 'source="\n%s\n"\n' "$source" >> APKBUILD
printf 'sha512sums="%s\n"\n' "$sha512sums" >> APKBUILD
# Strip whitespace
sed -i '/^[[:space:]]*$/d' APKBUILD

View file

@ -1,13 +0,0 @@
#
# Build variables for dotnet-stage0 version 6.0
#
pkgname=dotnet6-stage0
pkgdesc="The .NET Core SDK"
pkgver=6.0.100
pkgrel=0
_runtimever=6.0.0
_sdkver=$pkgver
_aspnetver=$_runtimever
_nappo_get="system.reactive.core.4.1.1.nupkg"
_bootstrapver=0.1.0-6.0.100-bootstrap.29

View file

@ -1,26 +0,0 @@
#
# Build variables for dotnet-stage0 version 6.0 and up
#
_pkgver_macro=${pkgver%.*}
_pkgver_prior=1
_pkgver_name="${_pkgver_macro//[.0]}"
arch="x86_64 armv7 aarch64"
url=https://www.microsoft.com/net/core
license="MIT"
makedepends="
libcurl
krb5-libs
libintl
lttng-ust
zlib
py3-packaging
"
options="!check" # No test suite
_default_source="
https://pagure.io/dotnet-sig/dotnet6.0/raw/main/f/build-dotnet-tarball
https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.$_bootstrapver.tar.gz
https://gist.githubusercontent.com/omajid/c04b6025de49d0b7b18ab4a7e789484e/raw/b33c57f6bf9c00bb8633375123d2d3594fe81c26/nappo.py
dotnet.sh
"
builddir="$srcdir"

View file

@ -1,20 +0,0 @@
#
# Build functions for dotnet-stage0 version 6.0 and up
#
_get_arch() {
case $1 in
x86_64) local arch=x64;;
aarch64) local arch=arm64;;
armv7) local arch=arm;;
esac
echo $arch
}
unpack() {
verify
initdcheck
mkdir -p "$srcdir"
msg "Unpacking Private.SourceBuilt.Artifacts"
gunzip Private.SourceBuilt.Artifacts.*.tar.gz
}

View file

@ -1,23 +0,0 @@
# abuild / buildrepo gets confused when setting pkgver var from within subpkgs
# This expresses itself in two ways:
# 1) scan_symlink_targets, when it detects symlink dependencies between subpkgs
# sets a hard dependency to that specific version of subpackage. Fixing this
# involves simply neutralizing scan_symlink_targets, leaving the maintainer
# to set those dependencies explicitely
# 2) abuild / buildrepo has logics to determine if a package should be rebuilt
# abuild uses apk_up2date and abuildindex_up2date, and buildrepo uses
# pkg.each_need_rebuild, then pkg.apk_file_exists. All of these rely on if
# there's a readable file at $repo/$CARCH/$name-$pkgver-r$pkgrel.apk
# Fixing this involves creating a symbolic link at that location that points
# to where the subpackage actually is.
# Fortunately, scan_symlink_targes has all the hooks necessary to create a
# symbolic link: it resides within a for loop that's based around subpkgdir,
# and feeds function with .PKGINFO info that allows for creation of symbolic
# link when necessary
scan_symlink_targets() {
local name="$1" dir="$2"
local ver=$(pkginfo_val pkgver "$dir"/.PKGINFO)
local subpkgarch=$(pkginfo_val arch "$dir"/.PKGINFO)
[ -d "$REPODEST"/${repo:?}/${subpkgarch/noarch/$CARCH} ] || mkdir -p "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}
[ "$ver" = "$pkgver-r$pkgrel" ] || ln -sf "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}/$name-$ver.apk "$REPODEST"/$repo/${subpkgarch/noarch/$CARCH}/$name-$pkgver-r$pkgrel.apk
}

View file

@ -1,48 +0,0 @@
# Prebuilt artifacts only provides linux-x64 nukgs. As Alpine uses linux-musl,
# the below scripts updates source to fetch the musl version of those packages,
# allowing packaging of the correct architecture. Thus, everytime Artifacts
# is updated, or new architectures are added, this function needs to be
# executed using 'abuild _update_source'
_update_source() {
[ -z "$source" ] \
&& msg "Removing source from APKBUILD"
sed -E -i \
-e '/^source=".*"$/d' \
-e '/^source="/,/"$/d' \
\
-e "/^source='.*'\$/d" \
-e "/^source='/,/'\$/d" \
APKBUILD
source="$_default_source"
fetch
local nuget_source="$_default_source"
msg "Updating source"
local nappo_get="$_nappo_get $(tar --list -f "$srcdir"/Private.SourceBuilt.Artifacts.*.tar.gz --wildcards '*.linux-x64.*' --exclude '*Intermediate*' 2>/dev/null)"
for package in $nappo_get; do
for _arch in $arch; do
local filename=${package##*/} # Extracts just filename
local suffix=${filename##*[0-9]} # Extracts what's after version number
local nupkg=${filename/$suffix} # Extracts nupkg name with version
[ -z "${filename##*servicing*}" ] && local nupkg=${filename%%-servicing*}
local name=${nupkg%*.*.*.*} # Extracts name without version
local version=${nupkg/$name.} # Extracts version out of nupkg using name
local name=${name/linux-x64/linux-musl-$(_get_arch $_arch)} # Converts to current arch
[ -z "${filename##*servicing*}" ] && local version=''
echo "Getting url for $name version $version, replaces $package"
local nappo_out=$(python3 "$srcdir"/nappo.py download --verbose "$name" "$version")
local nupkg="${nappo_out#*.nupkg}"
local uri=${nappo_out/$nupkg}
local nupkg=$(echo $nupkg | tr -d '\n')
[ -f "$nupkg" ] && mv $nupkg "$SRCDEST"/.
local nuget_source="$nuget_source $uri"
[ -z "${name##*linux*}" ] || break
done
done
for _arch in $arch; do
local nuget_source="$nuget_source https://dotnetcli.azureedge.net/dotnet/Sdk/$pkgver/dotnet-sdk-$pkgver-linux-musl-$(_get_arch $_arch).tar.gz"
done
local nuget_source="$(printf '%s\n' $nuget_source)"
printf 'source="\n%s\n"\n' "$nuget_source" >>"$APKBUILD"
}

View file

@ -1,153 +0,0 @@
#
# Packaging functions for dotnet-stage0 builds 6.0 and over
#
subpackages="
aspnetcore$_pkgver_name-stage0-runtime:aspnetcore_runtime:noarch
aspnetcore$_pkgver_name-stage0-targeting-pack:aspnetcore_targeting_pack:noarch
dotnet$_pkgver_name-stage0-apphost-pack:apphost_pack
dotnet$_pkgver_name-stage0-artifacts:artifacts:noarch
dotnet$_pkgver_name-stage0-host:host
dotnet$_pkgver_name-stage0-hostfxr:hostfxr
dotnet$_pkgver_name-stage0-runtime:runtime
dotnet$_pkgver_name-stage0-sdk:sdk
dotnet$_pkgver_name-stage0-targeting-pack:targeting_pack:noarch
dotnet$_pkgver_name-stage0-templates:templates:noarch
netstandard$_pkgver_name-stage0-targeting-pack:netstandard_targeting_pack:noarch
"
package() {
depends="dotnet$_pkgver_name-sdk"
provides="dotnet-$_pkgver_macro"
mkdir -p "$pkgdir"
}
sdk() {
pkgver="$_sdkver"
depends="
aspnetcore$_pkgver_name-stage0-runtime
aspnetcore$_pkgver_name-stage0-targeting-pack
dotnet$_pkgver_name-stage0-apphost-pack
dotnet$_pkgver_name-stage0-targeting-pack
dotnet$_pkgver_name-stage0-templates
netstandard21-targeting-pack
"
provider_priority=$_pkgver_prior
provides="dotnet$_pkgver_name-bootstrap-sdk"
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*"$(_get_arch $CARCH)".tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./sdk ./sdk-manifests
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-sdk
}
host() {
pkgdesc="A generic driver for the .NET Core Command Line Interface"
pkgver=$_runtimever
provides="dotnet-host"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/etc/profile.d "$subpkgdir"/usr/bin "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses/dotnet-host
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*"$(_get_arch $CARCH)".tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./dotnet
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*"$(_get_arch $CARCH)".tar.gz -C "$subpkgdir"/usr/share/licenses/dotnet-host/ --no-same-owner ./LICENSE.txt ./ThirdPartyNotices.txt
ln -s /usr/share/dotnet/dotnet "$subpkgdir"/usr/bin/dotnet
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."
pkgver=$_runtimever
depends="dotnet-host"
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*"$(_get_arch $CARCH)".tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./host
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-hostfxr
}
runtime() {
pkgdesc="The .NET $_pkgver_macro Core runtime"
pkgver=$_runtimever
depends="dotnet$_pkgver_name-stage0-hostfxr"
provides="dotnet$_pkgver_name-bootstrap-runtime"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*"$(_get_arch $CARCH)".tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./shared/Microsoft.NETCore.App
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-runtime
}
aspnetcore_runtime() {
pkgdesc="The ASP.NET $_pkgver_macro Core runtime"
pkgver=$_aspnetver
depends="dotnet$_pkgver_name-bootstrap-runtime"
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*"$(_get_arch $CARCH)".tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./shared/Microsoft.AspNetCore.App
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/aspnetcore$_pkgver_name-runtime
}
apphost_pack() {
pkgdesc="The .NET $_pkgver_macro Core apphost pack"
pkgver=$_aspnetver
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*"$(_get_arch $CARCH)".tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner --wildcards ./packs/Microsoft.NETCore.App.Host.*
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-apphost-pack
}
targeting_pack() {
pkgdesc="The .NET $_pkgver_macro Core targeting pack"
pkgver=$_runtimever
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*"$(_get_arch $CARCH)".tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/Microsoft.NETCore.App.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-targeting-pack
}
netstandard_targeting_pack() {
pkgdesc="The .NET $_pkgver_macro Standard targeting pack"
pkgver=$_sdkver
depends="dotnet-host"
provides="netstandard21-targeting-pack"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*"$(_get_arch $CARCH)".tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/NETStandard.Library.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/netstandard21-targeting-pack
}
aspnetcore_targeting_pack() {
pkgdesc="The ASP.NET $_pkgver_macro Core targeting pack"
pkgver=$_runtimever
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*"$(_get_arch $CARCH)".tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/Microsoft.AspNetCore.App.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/aspnetcore$_pkgver_name-targeting-pack
}
templates() {
pkgdesc="The .NET $_pkgver_macro templates"
depends="dotnet-host"
pkgver="$_sdkver"
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf "$srcdir"/dotnet-sdk-$_pkgver_macro*"$(_get_arch $CARCH)".tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./templates
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-templates
}
artifacts() {
pkgdesc="Internal package for building .NET $_pkgver_macro Software Development Kit"
depends="dotnet-host"
pkgver=$_sdkver
provides="dotnet$_pkgver_name-bootstrap-artifacts"
provider_priority=$_pkgver_prior
install -dm 755 "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver "$subpkgdir"/usr/share/licenses
tar -xf "$srcdir"/Private.SourceBuilt.Artifacts.*.tar -C "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver/ --no-same-owner --exclude '*.linux-x64*'
install -m 644 "$srcdir"/*"$(_get_arch $CARCH)"*.nupkg "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver/.
for i in $_nappo_get; do install -m 644 "$srcdir"/$i* "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver/. ; done
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-artifacts
}

View file

@ -1,7 +1,14 @@
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
. ../dotnet6/APKBUILD
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
#
# Main functions for dotnet build version 6.0
# This is generated from dotnet6's APKBUILD.
# Any modifications to be done in main APKBUILD and propagated by
# executing 'abuild _update_stage1'
#
# 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
#
pkgname=dotnet6-stage1
@ -30,33 +37,415 @@ _patches="
source-build-reference-packages_musl-check.patch
vstest_use-work-tree-with-git.patch
xliff-tasks_use-work-tree-with.git.patch
"
"
# Custom prepare
default_prepare() {
return
}
makedepends="${makedepends//6-bootstrap/6-stage0}"
# 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 SDK"
pkgrel=0
arch="x86_64"
url=https://www.microsoft.com/net/core
license="MIT"
_bootstrap_pkg="stage0"
makedepends="
bash
clang
cmake
dotnet$_pkgver_name-$_bootstrap_pkg-artifacts
dotnet$_pkgver_name-$_bootstrap_pkg-runtime
dotnet$_pkgver_name-$_bootstrap_pkg-sdk
dotnet$_pkgver_name-stage1
findutils
git
icu-dev
inetutils-syslogd
krb5-dev
libgit2-dev
libintl
libunwind-dev
libxml2-dev
libxml2-utils
linux-headers
lldb-dev
llvm$_llvmver-dev
lttng-ust-dev
nodejs
openssl-dev
zlib-dev
"
subpackages="
aspnetcore$_pkgver_name-runtime:aspnetcore_runtime:noarch:$_aspnetver
aspnetcore$_pkgver_name-targeting-pack:aspnetcore_targeting_pack:noarch:$_aspnetver
dotnet$_pkgver_name-apphost-pack:apphost_pack:$_runtimever
dotnet$_pkgver_name-artifacts:artifacts:noarch:$_sdkver
dotnet$_pkgver_name-host:host:$_runtimever
dotnet$_pkgver_name-host-zsh-completion:zshcomp:$_runtimever
dotnet$_pkgver_name-host-bash-completion:bashcomp:$_runtimever
dotnet$_pkgver_name-host-doc:doc:$_runtimever
dotnet$_pkgver_name-hostfxr:hostfxr:$_runtimever
dotnet$_pkgver_name-runtime:runtime:$_runtimever
dotnet$_pkgver_name-sdk:sdk:$_sdkver
dotnet$_pkgver_name-targeting-pack:targeting_pack:noarch:$_runtimever
dotnet$_pkgver_name-templates:templates:noarch:$_sdkver
netstandard$_pkgver_name-targeting-pack:netstandard_targeting_pack:noarch:$_sdkver
"
options="!check" # No test suite
source="
installer-v$pkgver.tar.gz::https://github.com/dotnet/installer/archive/refs/tags/v$pkgver.tar.gz
completions.zsh::https://raw.githubusercontent.com/dotnet/sdk/7cec6d9fe5cb326a88091ae44204f52e1f00e69c/scripts/_dotnet
dotnet.sh
$_patches
"
builddir="$srcdir/sources"
_installerdir=$srcdir/installer-$pkgver
# 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) local arch=arm;;
esac
echo $arch
}
# Custom patch logics for dotnet version 6.0 and up
_patch() {
cd "$builddir"
local i failed=
if ! have_patches; then
return 0
fi
msg "Deploying patches"
for i in $source; do
case ${i%::*} in
build_*.patch)
cd "$builddir"
patch ${patch_args:--p1} -i "$srcdir/$(filename_from_uri $i)" || failed="$failed $i"
;;
*.patch)
local _package=$(echo $i | sed 's|_.*||')
local _patch=$(echo $i | sed "s|${_package}_||")
echo "Applying $_patch -> $_package"
cd src/$_package.* || { echo "$_package does not exist for patch"; continue; }
patch -Np1 -i "$srcdir"/$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
}
# custom function that updates stage1 for all dotnet versions
#
# buildrepo doesn't know to rebuild dotnet after first build with stage1
# this creates another package that forces the a first build of dotnet
# so that the final build of dotnet is guaranteed to be built with
# Alpine binaries.
_update_stage1() {
msg "Updating stage1 APKBUILD"
# Copy patches
rm ../dotnet$_pkgver_name-stage1/*.patch ../dotnet$_pkgver_name-stage1/dotnet.sh
for i in ../dotnet"$_pkgver_name"/*.patch ../dotnet"$_pkgver_name"/dotnet.sh; do
cp $i ${i/$_pkgver_name/$_pkgver_name-stage1}
done
# Generate stage1
{
echo -n "# "
echo "Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>"
echo "# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>"
echo
echo "#"
echo "# This is generated from dotnet$_pkgver_name's APKBUILD."
echo "# Any modifications to be done in main APKBUILD and propagated by"
echo -n "# executing 'abuild _update_stage1'"
sed \
-e "s/pkgname=dotnet$_pkgver_name/pkgname=dotnet$_pkgver_name-stage1/" \
-e "s/_bootstrap_pkg=\"bootstrap\"/_bootstrap_pkg=\"stage0\"/" \
-e "1,2d" \
../dotnet$_pkgver_name/APKBUILD
} > ../dotnet$_pkgver_name-stage1/APKBUILD
}
prepare() {
default_prepare
cd "$_installerdir"
msg "Initializing"
# installer expects to be in a git repo
git init > /dev/null 2>&1
git add ./* > /dev/null 1>&1
git commit -m 'initial commit' > /dev/null 2>&1
git remote add origin https://github.com/dotnet/installer.git > /dev/null 2>&1
# Disabling use of sudo in build.sh
sed -i 's/sudo -E//g' build.sh
# Disabling internal repos
patch -p1 -i "$srcdir"/installer_internal-repo-fix.patch
msg "Settings up bootstrap"
cp -r /usr/share/dotnet/* "$_installerdir"/.
msg "Setting up source directory"
export _InitializeDotNetCli=$(pwd)
export DOTNET_INSTALL_DIR=$(pwd)
export DotNetBuildFromSource=true
# disable tracing, which is incompatible with certain versions of
# lttng see https://github.com/dotnet/runtime/issues/57784. the
# suggested compile-time change doesn't work, unfrotunately.
export complus_lttng=0
./build.sh \
/p:ArcadeBuildTarball=true \
/p:TarballDir="$builddir" \
/p:DotNetBuildFromSource=true
_patch
rm -r "$builddir"/packages/archive
}
build() {
msg "Building $pkgname-$pkgver"
export _InitializeDotNetCli="$_installerdir"
export DotNetBuildFromSource=true
local _artifactsver=$(find /usr/share/dotnet/artifacts/$_pkgver_macro* -maxdepth 0 -type d | tail -n1 | sed 's|..*\/||')
# disable tracing, which is incompatible with certain versions of
# lttng see https://github.com/dotnet/runtime/issues/57784. the
# suggested compile-time change doesn't work, unfrotunately.
export complus_lttng=0
./build.sh \
--with-sdk "$_installerdir" \
--with-packages /usr/share/dotnet/artifacts/$_artifactsver
}
package() {
depends="dotnet$_pkgver_name-sdk"
provides=dotnet-$_pkgver_macro
install -dm 755 "$pkgdir"/usr/share/zsh/site-functions "$pkgdir"/usr/share/bash-completion/completions "$pkgdir"/usr/share/man/man1
find "$builddir" -iname 'dotnet*.1' -type f -exec cp '{}' "$pkgdir"/usr/share/man/man1/ \;
install -m 755 "$srcdir"/completions.zsh "$pkgdir"/usr/share/zsh/site-functions/_dotnet
install -m 755 "$builddir"/src/sdk.*/scripts/register-completions.bash "$pkgdir"/usr/share/bash-completion/completions/_dotnet
}
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
"
provider_priority=$_pkgver_prior
provides="dotnet$_pkgver_name-bootstrap-sdk dotnet-sdk-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./sdk ./sdk-manifests
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-sdk
}
host() {
pkgdesc="A generic driver for the .NET Core Command Line Interface"
provides="dotnet-host"
provider_priority=$_pkgver_prior
cd $builddir/artifacts/x64/Release
install -dm 755 "$subpkgdir"/etc/profile.d "$subpkgdir"/usr/bin "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses/dotnet-host
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./dotnet
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/licenses/dotnet-host/ --no-same-owner ./LICENSE.txt ./ThirdPartyNotices.txt
ln -s /usr/share/dotnet/dotnet "$subpkgdir"/usr/bin/dotnet
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"
provider_priority=$_pkgver_prior
cd $builddir/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./host
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-hostfxr
}
runtime() {
pkgdesc="The .NET $_pkgver_macro Core runtime"
depends="dotnet$_pkgver_name-hostfxr"
provides="
dotnet$_pkgver_name-bootstrap-runtime
dotnet-runtime-$_pkgver_macro
"
provider_priority=$_pkgver_prior
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./shared/Microsoft.NETCore.App
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-runtime
}
aspnetcore_runtime() {
pkgdesc="The ASP.NET $_pkgver_macro Core runtime"
depends="dotnet$_pkgver_name-runtime"
provides="aspnetcore-runtime-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./shared/Microsoft.AspNetCore.App
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/aspnetcore$_pkgver_name-runtime
}
apphost_pack() {
pkgdesc="The .NET $_pkgver_macro Core apphost pack"
provides="dotnet-apphost-pack-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner --wildcards ./packs/Microsoft.NETCore.App.Host.*
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-apphost-pack
}
targeting_pack() {
pkgdesc="The .NET $_pkgver_macro Core targeting pack"
provides="dotnet-targeting-pack-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/Microsoft.NETCore.App.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-targeting-pack
}
netstandard_targeting_pack() {
pkgdesc="The .NET $_pkgver_macro Standard targeting pack"
depends="dotnet-host"
provides="
netstandard21-targeting-pack
netstandard-targeting-pack-2.1
"
provider_priority=$_pkgver_prior
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/NETStandard.Library.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/netstandard21-targeting-pack
}
aspnetcore_targeting_pack() {
pkgdesc="The ASP.NET $_pkgver_macro Core targeting pack"
provides="aspnetcore-targeting-pack-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./packs/Microsoft.AspNetCore.App.Ref
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/aspnetcore$_pkgver_name-targeting-pack
}
templates() {
pkgdesc="The .NET $_pkgver_macro templates"
depends="dotnet-host"
provider_priority=$_pkgver_prior
provides="dotnet-templates-$_pkgver_macro"
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet "$subpkgdir"/usr/share/licenses
tar -xzf dotnet-sdk-$_pkgver_macro*.tar.gz -C "$subpkgdir"/usr/share/dotnet/ --no-same-owner ./templates
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-templates
}
artifacts() {
pkgdesc="Internal package for building .NET $_pkgver_macro Software Development Kit"
depends="dotnet-host"
provides="dotnet$_pkgver_name-bootstrap-artifacts"
provider_priority=$_pkgver_prior
cd "$builddir"/artifacts/x64/Release
install -dm 755 "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver "$subpkgdir"/usr/share/licenses
tar -xf Private.SourceBuilt.Artifacts.*.tar.gz -C "$subpkgdir"/usr/share/dotnet/artifacts/$pkgver/ --no-same-owner
ln -s dotnet-host "$subpkgdir"/usr/share/licenses/dotnet$_pkgver_name-artifacts
}
zshcomp() {
default_zshcomp
pkgdesc="zsh completion for .NET $_pkgver_macro"
depends="dotnet-host"
provides="dotnet-host-zsh-completion"
provider_priority=$_pkgver_prior
}
bashcomp() {
default_bashcomp
pkgdesc="bash completion for .NET $_pkgver_macro"
depends="dotnet-host"
provides="dotnet-host-bash-completion"
provider_priority=$_pkgver_prior
}
doc() {
default_doc
pkgdesc="Docs for .NET $_pkgver_macro"
provides="dotnet-host-doc"
provider_priority=$_pkgver_prior
}
sha512sums="
26ad152ce2d8de003dd43033633c73cb1d2607163e6bd7856e568d77b3d7312fad3705d4619804ec5806e6a61a8a3fae6d3ef6cab27da34bba8095fbf8cba1a9 installer-v6.0.101.tar.gz
d0aecbf13e6781ef867021085e0d4a55e5f24dddfd175e4d0ce651fdb9c8e330636b2c69e3c4491442e5dd32c6859f38388006b3fe36fac2226837e1bc4107c9 completions.zsh
e61b9e3e5a2305646a616d598378230c9755c5dd5363692cc363f8f4add3807563c324dd86f3a7ae9d358c82d730608e7b293935a2b6c81c0c0f62d752a0a1cf dotnet.sh
845db3ccff9da249f39fe24dfebe3202374f4fcfe1d3e765519c32d4dcf12de8862818594ea437356818d426c60458ad612fb6b8421f08e9e2f1be014766a839 aspnetcore_always-build-App.Ref-and-the-targeting-packs.patch
4d0ae9ae56944585c50c4c00568e09965dcbd97c1766d583a17b740d6ad4f1744a909c5cf4d769868def51f71903c010981be74364d6402a95afc7497da8aaed build_copy-sbrp-from-artifacts-instead-of-move.patch
301e691fa1e9380643a5e8e684be651d541ff63c5a81a15f2c6c7ff201f4ca9a62ba2f61eb1fcad1fd78a2d72c65c69d2d50161c05311f21a00b144b8e46a245 build_fix-musl-build.patch
a5f3736fb462314ce1c57daaf86ea82b8bb531b891bed15ab7ef199f261ac69ed9b0936330eae95e1a527a713326f61286a48e7d748d45b3917d2e445ae09e12 command-line-api_fix-musl.build.patch
b14def2fd180a718e6f119c3c4091975d209fceb7518d9813ca1d09ab4192c082d909cdaf658a7805c87aa8ebcbc6b74b173b04c417d8f69e2d3f1590cb9f5a0 command-line-api_use-work-tree-with-git.patch
01b298097e35411c5d00221f8b4f87d788cef81e83a952834325ff8e405861c6efb709adc5dc2235bfbdb0425b22efffe9ad339d08d75084e6f25281cc72fc59 fsharp_use-work-tree-with-git.patch
76f3443dbcd8bb85be0fd4d37e4735b3e079651ca827f7cf2cf3159010d34b719e8f5c2cef52282b8676ae33f8fd59c585edc917c2c942abd29d66455fe05074 installer_include-musl-bits-in-source-build-bootstrap-tarball.patch
c6d49a76e0ae0953b6081861f80f6a481cf416e6b1e7882f829868b9e247d498fdaddb855a400aa2806d5408456498fd7eb6fcbde332a798634bd40f5802c439 installer_internal-repo-fix.patch
7ffc8d50543d5b3a8c9f7bf8127b58083bec76246caddaa0711b2da39bd25bd21096cce1b278427d896230938b13e2c8340f208b846aaea136636e0066061e15 installer_musl-build-fix.patch
561e30faf5080ccd1be797261a16d812cb480049cc0f402a863747705a01a34898c5d2ce98a9a1d8bfc67428851c502f90c3b14ec3f842e5e9eaf9bdc85e303c runtime_add-rid-for-alpine-315.patch
e147764a54ff6008e3faff898d1e7c13ca9b95ffbc8c2abe184c24e0f9e4b4fa97a23b4919343831985fb66ec9497aaaadf0c566c291170d39fc39a31f190bf4 runtime_disable-package-validation.patch
8b2a71a14a1de604cf82523e0040b8e6cdf26b98d0b64345335a0715644ac9fb421ee919938d039adf9dd7ce9619691bee6f81b0d7528d97f28d0c8de1f189e0 runtime_force-microsoftnetcoreilasmpackageruntimeid-as-musl.patch
9eb825d6e10a68209e2dd42c0c9067468667af0b5ecd137213c37c4afb884b2a82ee82fe7cf375e913e3c163008bc0294f2e86af3c1ea76ac49f479a2edc55cf runtime_non-portable-distrorid-fix-alpine.patch
b3c7929b920feefca595a6acbead212bfa8df9d1ad238523482617d438b4b8b8a449e18a4d4a8e9cd8bb4650f4a4280766875f48ff9838ba35ad54a18e438b67 runtime_release-6.0-Build-all-packages-when-in-source-build.patch
ec8fdf712b996bfec8384edca3de6c1f9e77c1b7b3569bf461380932a163416920132d7d83843d86b212a0d54542304c754544f2a1f8f881654d352c4adff73d sdk_telemetry-optout.patch
56a07680af6108997333e74d1354c96c558c0a5b13f6d7986e5b64fdc272d148f9e7807ab8873196c1dac5c442e453e8dba79aa2aafe783c057d914c8cbbb53b source-build-reference-packages_musl-check.patch
3e0279821c2f3823ef00dde2f698360fba91577619c84102dc793e87dc2d7e6342026702d5b761b3728bf1f3a806d2c2a77dec43bef92fb61806f9d00759c4fa vstest_use-work-tree-with-git.patch
99f20ca511455fa16838ca883a2d81b6119a23ebbb76bda68182afee8f2e5af202e0e8857926833e1c343c308f48c847ffda416877c9106f820c6ac10c26269b xliff-tasks_use-work-tree-with.git.patch
3807556b5d0e1bba93c6d4822562ed4958fdbc4acea0f5c02c668ae2e7ca37f81575e72314bfd0ae461201ccb04d09c96a0d3d213fa42edaebd9b343f7cabbfc aspnetcore_always-build-App.Ref-and-the-targeting-packs.patch
0c7d590f7803adea003ea58df1881134ac61bfdf7738d40e902e3de3bc5f02557e21ac31c3edd0c11c25b563f974030218c9d49dc4a1fe9dedbcaffeff70201c build_copy-sbrp-from-artifacts-instead-of-move.patch
31302c5feb5d80e4754f6fe886084f439566e4874e459e50a7d4073d7c57c2c0edba32f9fa9aadbc39c4b722bc8649498ad72485e798fbcd5aeb9489b218887b build_fix-musl-build.patch
5ae47767dc61b589a26bb93a27735cc865925854dc03716232283b15bc6109a1d59f3426542b4818c29fb30825914683c9971f48d12a193f5343b6efc54d5e64 command-line-api_fix-musl.build.patch
71612ac1d9933335583cf722dc5ecfb37739f662a165cd2afb62bf342e83946955269370da57d3295fa4f781683a2fb6027068584b996efcb33d71e18f7191e2 command-line-api_use-work-tree-with-git.patch
06ed5091e461c160930746768a1f296bdf7f876b0578cdeb93077e623212c0c535b24e406f9408c402e83eac361a33dba2d7dda7ce7140dd23061ebd8a4a466d fsharp_use-work-tree-with-git.patch
c94f2ddf2d8997c506790ca0c323da837117b05b23be61d98d62ae3951797e0c550e2cb7b95b7caafdf68214297ba5598bc5ef50ee41d4403ea20aa437ec83c4 installer_include-musl-bits-in-source-build-bootstrap-tarball.patch
1a0254e70c29c367cae45257289a31bd45ffd769c4437c11031f0b90604095fd94a5695d1c0e4acf1ffb7e30eaa7f452e520f860a9b1ef52bcda8a41f0a424c4 installer_internal-repo-fix.patch
c8a9464e7de2894ac3a7b75496befd3af3e829815bac86036cf3ab65f31a3398e92705eae468e50e136374a296a3ee8279f11e2d6ae77400c13d90f8b80f2f2e installer_musl-build-fix.patch
c52ee082d61e05098422d3e826023e620c42db02c9a043864968651e7846dc818ce6bb76396812a358690e8d07cda2ca7cfdcbd559c51866c931d4e5e52f384a runtime_add-rid-for-alpine-315.patch
79dacbaeb9af252e515028f800efc5c1628be9290007418bf4a219f49d4264b2abab2a89af6cd9ff3c74451fe40d6811f7d3c13b9237da187c419295f4ba1280 runtime_disable-package-validation.patch
aef6a7257f6582f45f30486ec54d80e65c8514804499fef189c99ca0331e80bffdd946550cab2e5a7f7b5cf086c2d6fcaf75caf3ad797b070c473fd8c495b148 runtime_force-microsoftnetcoreilasmpackageruntimeid-as-musl.patch
bc48541a19c934d1d7a5ecc7d4bbb7adcd2dd2917ddeda7a1c5a6b28bfbbd4056fe431feca749b854d6b40badd464cd7f8aacd28ea9ca59839d556c5f90193f3 runtime_non-portable-distrorid-fix-alpine.patch
c61abb40560de035f1224c962adb91241d11e0eeba31833278ad9e6cba728a81da3be38cce277cfe25c203d0fbf2dee8bb31ac68b77bbb0a43988a7bb36600cf runtime_release-6.0-Build-all-packages-when-in-source-build.patch
0f49a9e7e9cec6faf515b4bb399be7965e32ff163c11ff162b735f20c5fd9cffc8711dd2acef4490943be67f247bdc942df7fe63c1b9152af0ba271b3230b90a sdk_telemetry-optout.patch
c73050acb63fab466dffa30468d83a6274436f1fa8ab1669081b5a0e42d2b6fd8690a8f748df6565206e9f99451eded7ec29119fe0b704ec3a726938e6d863e9 source-build-reference-packages_musl-check.patch
d41ed2c7f4b81be2770d1c6b4bba17cea0772131bee994ebce9ca7acc302b2c15cc1adac6a814b866af04728cd4beb0ca411d218d113922fe32001c485b89c67 vstest_use-work-tree-with-git.patch
4d85a411c4add10072c8b411e05b9ece4696c9409c9a363a0f5ecf2adc6ccb815d868c96941da31a6c4e9d981cede144222155eadac1fbed851989086835d101 xliff-tasks_use-work-tree-with.git.patch
"

View file

@ -1,4 +1,5 @@
From c5211f8557f2fb019416cf1f6c01142965270479 Mon Sep 17 00:00:00 2001
Patch-Source: https://github.com/dotnet/aspnetcore/issues/39471
From: Doug Bunting <6431421+dougbu@users.noreply.github.com>
Date: Sun, 16 Jan 2022 22:55:10 -0800
Subject: [PATCH] Always build App.Ref and the targeting packs - set

Some files were not shown because too many files have changed in this diff Show more