aports/testing/dotnet31-bootstrap/core-setup_rid-plat-generation-on-alpine-fix.patch
2022-02-23 09:06:44 +00:00

50 lines
1.8 KiB
Diff

From 0bbf075007df7313cceccfc9ad0512db912dfcbd Mon Sep 17 00:00:00 2001
Patch-Source: https://github.com/dotnet/core-setup/pull/9195
From: Antoine Martin <dev@ayakael.net>
Date: Tue, 22 Feb 2022 01:18:45 +0000
Subject: [PATCH 1/1] Fixed __rid_plat generation on alpine for core-setup
<dotnet/core-setup>/src/corehost/build.sh generates wrong plat_rid on Alpine
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.
On portable builds it also broken as computed RID is linux rather
than the expected linux-musl
---
src/corehost/build.sh | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/corehost/build.sh b/src/corehost/build.sh
index fb503e74..c3b34321 100755
--- a/src/corehost/build.sh
+++ b/src/corehost/build.sh
@@ -21,14 +21,11 @@ init_rid_plat()
__rid_plat=""
if [ -e /etc/os-release ]; then
source /etc/os-release
- if [[ "$ID" == "rhel" ]]; then
+ if [ "$ID" == "rhel" ] || [ "$ID" == "alpine" ] ; then
# remove the last version number
VERSION_ID=${VERSION_ID%.*}
fi
__rid_plat="$ID.$VERSION_ID"
- if [[ "$ID" == "alpine" ]]; then
- __rid_plat="linux-musl"
- fi
elif [ -e /etc/redhat-release ]; then
local redhatRelease=$(</etc/redhat-release)
if [[ $redhatRelease == "CentOS release 6."* || $redhatRelease == "Red Hat Enterprise Linux Server release 6."* ]]; then
@@ -50,6 +47,8 @@ init_rid_plat()
__rid_plat="osx"
elif [ "$(uname -s)" == "FreeBSD" ]; then
__rid_plat="freebsd"
+ elif [[ "$ID" == "alpine" ]]; then
+ __rid_plat="linux-musl"
else
__rid_plat="linux"
fi
--
2.34.1