Skip to content

Instantly share code, notes, and snippets.

@tesfaye
Created March 22, 2020 19:21
Show Gist options
  • Save tesfaye/9f9b37a67948860111049f55ed6f60d8 to your computer and use it in GitHub Desktop.
Save tesfaye/9f9b37a67948860111049f55ed6f60d8 to your computer and use it in GitHub Desktop.
From c70ef244c862e8e13ff6552ee829e968186e0f45 Mon Sep 17 00:00:00 2001
From: Omair Majid <omajid@redhat.com>
Date: Fri, 8 Nov 2019 21:01:11 -0500
Subject: [PATCH] Add runtime id for Arch Linux
Like gentoo, Arch Linux is a rolling release and doesn't have explicit
version numbers.
$ cat /etc/os-release
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="0;36"
HOME_URL="https://www.archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
LOGO=archlinux
---
.../runtime.compatibility.json | 17 +++++++++++++++++
.../Microsoft.NETCore.Platforms/runtime.json | 11 +++++++++++
.../runtimeGroups.props | 5 +++++
3 files changed, 33 insertions(+)
diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
index 2a196ecc9fc7..d273634527ef 100644
--- a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
+++ b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
@@ -270,6 +270,23 @@
"any",
"base"
],
+ "void": [
+ "void",
+ "linux",
+ "unix",
+ "any",
+ "base"
+ ],
+ "void-x64": [
+ "void-x64",
+ "void",
+ "linux-x64",
+ "linux",
+ "unix-x64",
+ "unix",
+ "any",
+ "base"
+ ],
"base": [
"base"
],
diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.json b/pkg/Microsoft.NETCore.Platforms/runtime.json
index e70f2da7e668..5b2f70f44b9e 100644
--- a/pkg/Microsoft.NETCore.Platforms/runtime.json
+++ b/pkg/Microsoft.NETCore.Platforms/runtime.json
@@ -121,6 +121,17 @@
"any"
]
},
+ "arch": {
+ "#import": [
+ "linux"
+ ]
+ },
+ "void-x64": {
+ "#import": [
+ "void",
+ "linux-x64"
+ ]
+ },
"base": {
"#import": []
},
diff --git a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
index 6c95b67819be..aa31cac61f34 100644
--- a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
+++ b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
@@ -25,6 +25,11 @@
<Versions>21</Versions>
</RuntimeGroup>
+ <RuntimeGroup Include="void">
+ <Parent>linux</Parent>
+ <Architectures>x64</Architectures>
+ </RuntimeGroup>
+
<RuntimeGroup Include="centos">
<Parent>rhel</Parent>
<Architectures>x64</Architectures>
diff --git a/src/corehost/build.sh b/src/corehost/build.sh
index fb503e74..9a6ec590 100755
--- a/src/corehost/build.sh
+++ b/src/corehost/build.sh
@@ -25,7 +25,7 @@ init_rid_plat()
# remove the last version number
VERSION_ID=${VERSION_ID%.*}
fi
- __rid_plat="$ID.$VERSION_ID"
+ __rid_plat="$ID${VERSION_ID:+.$VERSION_ID}"
if [[ "$ID" == "alpine" ]]; then
__rid_plat="linux-musl"
fi
# Template file for 'dotnet-core'
pkgname=dotnet-core
pkgver=3.1.2.sdk102
_runtimever=3.1.2
_sdkver=3.1.102
version=3.1.102
revision=1
archs="x86_64"
homepage="https://www.microsoft.com/net/core"
create_wrksrc=yes
license="MIT"
short_desc="Provides the .NET Core"
hostmakedepends="
clang
cmake
curl
git
icu
inetutils
mit-krb5
libgit2
libunwind
lldb
llvm
lttng-ust
libressl-devel
zlib
tar
"
options=(staticlibs)
distfiles="
https://github.com/dotnet/source-build/archive/release/3.1.zip>dotnet-source-build.zip
"
checksum="
88cbb6e7378efa8cb29dc55cbc43de31bc405e5fc9d674d11de5988a2592f024"
do_fetch() {
git clone https://github.com/dotnet/source-build.git ${wrksrc}
cd ${wrksrc}
git submodule update --init --recursive
}
do_build() {
#cd source-build-release-3.1
cd ${wrksrc}
cp "${FILESDIR}/9999-Fix-versionless-RID-computation.patch" patches/core-setup/
cp "${FILESDIR}/9999-Add-arch-RIDs.patch" patches/core-setup/
#git -help
export SOURCE_BUILD_SKIP_SUBMODULE_CHECK=1
export CLR_OPENSSL_VERSION_OVERRIDE=47
./build.sh
}
do_install() {
vmkdr "/usr/lib/${pkgname}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment