Aspnetcore doesn't look for linux-musl nupkgs when building on linux-musl platform
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
Aspnetcore looks for linux-x64 version of nupkgs that, under Alpine, should be linux-musl-x64.
Provisional patch follows:
```
From 9f21622ae208f49adddf9e8465295229661579ec Mon Sep 17 00:00:00 2001
From: "build@apk-groulx"
Date: Thu, 20 Jan 2022 01:12:07 +0000
Subject: [PATCH 1/1] build_fix-musl-build
---
repos/aspnetcore.proj | 1 +
repos/installer.proj | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/repos/aspnetcore.proj b/repos/aspnetcore.proj
index ad9d77885..0cefccee1 100644
--- a/repos/aspnetcore.proj
+++ b/repos/aspnetcore.proj
@@ -5,6 +5,7 @@
$(StandardSourceBuildArgs.Replace('--publish', ''))
+ $(BuildCommandArgs) --os-name linux-musl
$(BuildCommandArgs) --arch $(Platform)
$(BuildCommandArgs) --no-build-repo-tasks
$(BuildCommandArgs) /p:BuildNodeJs=false
diff --git a/repos/installer.proj b/repos/installer.proj
index 712d7cd14..cca5295f9 100644
--- a/repos/installer.proj
+++ b/repos/installer.proj
@@ -25,7 +25,7 @@
$(BuildCommandArgs) /p:Rid=$(TargetRid)
$(BuildCommandArgs) /p:DOTNET_INSTALL_DIR=$(DotNetCliToolDir)
- $(BuildCommandArgs) /p:AspNetCoreSharedFxInstallerRid=linux-$(Platform)
+ $(BuildCommandArgs) /p:AspNetCoreSharedFxInstallerRid=linux-musl-$(Platform)
$(BuildCommandArgs) /p:CoreSetupRid=freebsd-x64 /p:PortableBuild=true
$(BuildCommandArgs) /p:CoreSetupRid=osx-x64
--
```
Better implementation would involve, either Aspnetcore automatically setting os-name to linux-musl when building, or repos/aspnetcore.proj automaticallty adds the above BuildCommandArg. Ditto on repos/installer.proj for setting AspNetCoreSharedFxInstallerRid,
Made as part of Alpine Linux dotnet6 packaging project, see dotnet/source-build#2782
Contributor guide
Assessment
This issue has not been assessed yet.