Repository navigation
Append version to RID only with valid characters - #80901
Conversation
|
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov Issue DetailsOn some distros with rolling release model has This makes assembly launched with Fix is to validate that string containing valid characters (not necessarily confirming to any particular versioning standard), before inserting version into the RID string.
|
|
@elinor-fung / @janvorli could you please take a look at this (you're much more of Linux experts than I am). |
|
@elinor-fung, @ViktorHofer, I tested it with a workaround on Arch Linux by renaming --- before
+++ after
$ COREHOST_TRACE=1 COREHOST_TRACE_VERBOSITY=4 dotnet run 2>&1 | grep 'HostRID is'
- HostRID is arch.TEMPLATE_VERSION_ID-x64
+ HostRID is arch-x64
- exit code: 134
+ exit code: 0 |
elinor-fung
left a comment
There was a problem hiding this comment.
Thank you! I imagine this will fix some really confusing failures.
|
@am11 Do you know what other distros this affects? And if there are specific open issues on this already? This seems like something worth backporting. |
|
@elinor-fung, there is one scenario in #79196 which I was investigating. My attempt to manually test with source-build failed, so once VMR is ready after preview 1, I will retry. Meanwhile I did some improvised testing #80901 (comment) to make sure it solved at least the corehost side of the problem (even if it is a partial fix, we have a workaround for user: edit The problem is that RID is calculated in multiple places with different conditions and non-portable RIDs only make things more harder (there are hundreds of (600+) linux distros out there). All these varied implementations have different outcomes in different situations:
|
* Append version to RID only with valid characters * Handle empty version case
On some distros with rolling release model,
VERSION_IDis set to a sentinel indicating their versioning model. Arch Linux is one of those distros withVERSION_ID=TEMPLATE_VERSION_IDline in/etc/os-release.This makes assembly launched with
dotnet,dotnet execordotnet rununable to function properly, when corehost is built with non-portable flag set: https://github.com/archlinux/svntogit-community/blob/ca544978888af3d305f8ef5051622ff1d04b102c/dotnet-core/trunk/PKGBUILD#L128 (dotnet/source-build recommended) and assembly has a dependency on package with native runtime assets.Fix is to validate that string contains valid characters (not necessarily conforming to any particular versioning standard), before inserting version into the RID string.