Initial commit on c9s
Resolves: RHEL-192313
This commit is contained in:
parent
da20ae258b
commit
457ff2bc83
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
@ -0,0 +1,6 @@
|
||||
/dotnet-11.0.100-preview.6.26359.118.tar.gz
|
||||
/dotnet-prebuilts-11.0.100-preview.5.26302.115-arm64.tar.gz
|
||||
/dotnet-prebuilts-11.0.100-preview.5.26302.115-x64.tar.gz
|
||||
/dotnet-prebuilts-11.0.100-preview.6.26366.102-ppc64le.tar.gz
|
||||
/dotnet-prebuilts-11.0.100-preview.6.26366.102-s390x.tar.gz
|
||||
/dotnet-11.0.100-preview.6.26359.118.tar.gz.sig
|
||||
140
check-debug-symbols.py
Executable file
140
check-debug-symbols.py
Executable file
@ -0,0 +1,140 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
"""
|
||||
Check debug symbols are present in shared object and can identify
|
||||
code.
|
||||
|
||||
It starts scanning from a directory and recursively scans all ELF
|
||||
files found in it for various symbols to ensure all debuginfo is
|
||||
present and nothing has been stripped.
|
||||
|
||||
Usage:
|
||||
|
||||
./check-debug-symbols /path/of/dir/to/scan/
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
./check-debug-symbols /usr/lib64
|
||||
"""
|
||||
|
||||
# This technique was explained to me by Mark Wielaard (mjw).
|
||||
|
||||
import collections
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
ScanResult = collections.namedtuple('ScanResult',
|
||||
'file_name debug_info debug_abbrev file_symbols gnu_debuglink')
|
||||
|
||||
file_symbol_exclude_list = [
|
||||
'ilc',
|
||||
]
|
||||
|
||||
def scan_file(file):
|
||||
"Scan the provided file and return a ScanResult containing results of the scan."
|
||||
|
||||
# Test for .debug_* sections in the shared object. This is the main test.
|
||||
# Stripped objects will not contain these.
|
||||
readelf_S_result = subprocess.run(['eu-readelf', '-S', file],
|
||||
stdout=subprocess.PIPE, encoding='utf-8', check=True)
|
||||
has_debug_info = any(line for line in readelf_S_result.stdout.split('\n') if '] .debug_info' in line)
|
||||
|
||||
has_debug_abbrev = any(line for line in readelf_S_result.stdout.split('\n') if '] .debug_abbrev' in line)
|
||||
|
||||
# Test FILE symbols. These will most likely be removed by anyting that
|
||||
# manipulates symbol tables because it's generally useless. So a nice test
|
||||
# that nothing has messed with symbols.
|
||||
def contains_file_symbols(line):
|
||||
parts = line.split()
|
||||
if len(parts) < 8:
|
||||
return False
|
||||
return \
|
||||
parts[2] == '0' and parts[3] == 'FILE' and parts[4] == 'LOCAL' and parts[5] == 'DEFAULT' and \
|
||||
parts[6] == 'ABS' and re.match(r'((.*/)?[-_a-zA-Z0-9]+\.(c|cc|cpp|cxx))?', parts[7])
|
||||
|
||||
readelf_s_result = subprocess.run(["eu-readelf", '-s', file],
|
||||
stdout=subprocess.PIPE, encoding='utf-8', check=True)
|
||||
has_file_symbols = True
|
||||
if not os.path.basename(file) in file_symbol_exclude_list:
|
||||
has_file_symbols = any(line for line in readelf_s_result.stdout.split('\n') if contains_file_symbols(line))
|
||||
|
||||
# Test that there are no .gnu_debuglink sections pointing to another
|
||||
# debuginfo file. There shouldn't be any debuginfo files, so the link makes
|
||||
# no sense either.
|
||||
has_gnu_debuglink = any(line for line in readelf_s_result.stdout.split('\n') if '] .gnu_debuglink' in line)
|
||||
|
||||
return ScanResult(file, has_debug_info, has_debug_abbrev, has_file_symbols, has_gnu_debuglink)
|
||||
|
||||
def is_elf(file):
|
||||
result = subprocess.run(['file', file], stdout=subprocess.PIPE, encoding='utf-8', check=True)
|
||||
return re.search(r'ELF 64-bit [LM]SB (?:pie )?(?:executable|shared object)', result.stdout)
|
||||
|
||||
def scan_file_if_sensible(file):
|
||||
if is_elf(file):
|
||||
return scan_file(file)
|
||||
return None
|
||||
|
||||
def scan_dir(dir):
|
||||
results = []
|
||||
for root, _, files in os.walk(dir):
|
||||
for name in files:
|
||||
result = scan_file_if_sensible(os.path.join(root, name))
|
||||
if result:
|
||||
results.append(result)
|
||||
return results
|
||||
|
||||
def scan(file):
|
||||
file = os.path.abspath(file)
|
||||
if os.path.isdir(file):
|
||||
return scan_dir(file)
|
||||
elif os.path.isfile(file):
|
||||
return [scan_file_if_sensible(file)]
|
||||
|
||||
def is_bad_result(result):
|
||||
return not result.debug_info or not result.debug_abbrev or not result.file_symbols or result.gnu_debuglink
|
||||
|
||||
def print_scan_results(results, verbose):
|
||||
# print(results)
|
||||
for result in results:
|
||||
file_name = result.file_name
|
||||
found_issue = False
|
||||
if not result.debug_info:
|
||||
found_issue = True
|
||||
print('error: missing .debug_info section in', file_name)
|
||||
if not result.debug_abbrev:
|
||||
found_issue = True
|
||||
print('error: missing .debug_abbrev section in', file_name)
|
||||
if not result.file_symbols:
|
||||
found_issue = True
|
||||
print('error: missing FILE symbols in', file_name)
|
||||
if result.gnu_debuglink:
|
||||
found_issue = True
|
||||
print('error: unexpected .gnu_debuglink section in', file_name)
|
||||
if verbose and not found_issue:
|
||||
print('OK: ', file_name)
|
||||
|
||||
def main(args):
|
||||
verbose = False
|
||||
files = []
|
||||
for arg in args:
|
||||
if arg == '--verbose' or arg == '-v':
|
||||
verbose = True
|
||||
else:
|
||||
files.append(arg)
|
||||
|
||||
results = []
|
||||
for file in files:
|
||||
results.extend(scan(file))
|
||||
|
||||
print_scan_results(results, verbose)
|
||||
|
||||
if any(is_bad_result(result) for result in results):
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv[1:]))
|
||||
92
dotnet-7357-mono-no-aot.patch
Normal file
92
dotnet-7357-mono-no-aot.patch
Normal file
@ -0,0 +1,92 @@
|
||||
From 6c2ab8a03cde381de73ce654fe34afc349025659 Mon Sep 17 00:00:00 2001
|
||||
From: Adeel <3840695+am11@users.noreply.github.com>
|
||||
Date: Wed, 24 Jun 2026 19:39:37 +0300
|
||||
Subject: [PATCH] Add mono platforms to exclude list
|
||||
|
||||
---
|
||||
src/arcade/eng/common/native/NativeAotSupported.props | 2 ++
|
||||
src/aspnetcore/eng/common/native/NativeAotSupported.props | 2 ++
|
||||
src/efcore/eng/common/native/NativeAotSupported.props | 2 ++
|
||||
src/runtime/eng/common/native/NativeAotSupported.props | 2 ++
|
||||
src/runtime/src/coreclr/CMakeLists.txt | 2 +-
|
||||
src/sdk/eng/common/native/NativeAotSupported.props | 2 ++
|
||||
6 files changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/arcade/eng/common/native/NativeAotSupported.props b/src/arcade/eng/common/native/NativeAotSupported.props
|
||||
index 559a6663929e..cdff9ef03612 100644
|
||||
--- a/src/arcade/eng/common/native/NativeAotSupported.props
|
||||
+++ b/src/arcade/eng/common/native/NativeAotSupported.props
|
||||
@@ -13,6 +13,8 @@
|
||||
<!-- Reject unsupported architectures via RID suffix match -->
|
||||
<_NativeAotSupportedArch Condition="
|
||||
'$(TargetArchitecture)' != 'wasm' and
|
||||
+ '$(TargetArchitecture)' != 's390x' and
|
||||
+ '$(TargetArchitecture)' != 'ppc64le' and
|
||||
('$(TargetArchitecture)' != 'x86' or '$(TargetOS)' == 'windows')
|
||||
">true</_NativeAotSupportedArch>
|
||||
|
||||
diff --git a/src/aspnetcore/eng/common/native/NativeAotSupported.props b/src/aspnetcore/eng/common/native/NativeAotSupported.props
|
||||
index 559a6663929e..cdff9ef03612 100644
|
||||
--- a/src/aspnetcore/eng/common/native/NativeAotSupported.props
|
||||
+++ b/src/aspnetcore/eng/common/native/NativeAotSupported.props
|
||||
@@ -13,6 +13,8 @@
|
||||
<!-- Reject unsupported architectures via RID suffix match -->
|
||||
<_NativeAotSupportedArch Condition="
|
||||
'$(TargetArchitecture)' != 'wasm' and
|
||||
+ '$(TargetArchitecture)' != 's390x' and
|
||||
+ '$(TargetArchitecture)' != 'ppc64le' and
|
||||
('$(TargetArchitecture)' != 'x86' or '$(TargetOS)' == 'windows')
|
||||
">true</_NativeAotSupportedArch>
|
||||
|
||||
diff --git a/src/efcore/eng/common/native/NativeAotSupported.props b/src/efcore/eng/common/native/NativeAotSupported.props
|
||||
index 559a6663929e..cdff9ef03612 100644
|
||||
--- a/src/efcore/eng/common/native/NativeAotSupported.props
|
||||
+++ b/src/efcore/eng/common/native/NativeAotSupported.props
|
||||
@@ -13,6 +13,8 @@
|
||||
<!-- Reject unsupported architectures via RID suffix match -->
|
||||
<_NativeAotSupportedArch Condition="
|
||||
'$(TargetArchitecture)' != 'wasm' and
|
||||
+ '$(TargetArchitecture)' != 's390x' and
|
||||
+ '$(TargetArchitecture)' != 'ppc64le' and
|
||||
('$(TargetArchitecture)' != 'x86' or '$(TargetOS)' == 'windows')
|
||||
">true</_NativeAotSupportedArch>
|
||||
|
||||
diff --git a/src/runtime/eng/common/native/NativeAotSupported.props b/src/runtime/eng/common/native/NativeAotSupported.props
|
||||
index 559a6663929e..cdff9ef03612 100644
|
||||
--- a/src/runtime/eng/common/native/NativeAotSupported.props
|
||||
+++ b/src/runtime/eng/common/native/NativeAotSupported.props
|
||||
@@ -13,6 +13,8 @@
|
||||
<!-- Reject unsupported architectures via RID suffix match -->
|
||||
<_NativeAotSupportedArch Condition="
|
||||
'$(TargetArchitecture)' != 'wasm' and
|
||||
+ '$(TargetArchitecture)' != 's390x' and
|
||||
+ '$(TargetArchitecture)' != 'ppc64le' and
|
||||
('$(TargetArchitecture)' != 'x86' or '$(TargetOS)' == 'windows')
|
||||
">true</_NativeAotSupportedArch>
|
||||
|
||||
diff --git a/src/runtime/src/coreclr/CMakeLists.txt b/src/runtime/src/coreclr/CMakeLists.txt
|
||||
index 4c275c6611ef..60fe8cee3fca 100644
|
||||
--- a/src/runtime/src/coreclr/CMakeLists.txt
|
||||
+++ b/src/runtime/src/coreclr/CMakeLists.txt
|
||||
@@ -156,7 +156,7 @@ endif ()
|
||||
if(NOT CLR_CROSS_COMPONENTS_BUILD)
|
||||
# NativeAOT is buildable for all CoreCLR-supported configurations except a known reject list.
|
||||
# Keep this in sync with the NativeAotSupported reject list in eng/common/native/NativeAotSupported.props.
|
||||
- if(NOT (CLR_CMAKE_HOST_ARCH_WASM OR (CLR_CMAKE_HOST_ARCH_I386 AND NOT CLR_CMAKE_HOST_WIN32)))
|
||||
+ if(NOT (CLR_CMAKE_HOST_ARCH_WASM OR CLR_CMAKE_HOST_ARCH_S390X OR CLR_CMAKE_HOST_ARCH_POWERPC64 OR (CLR_CMAKE_HOST_ARCH_I386 AND NOT CLR_CMAKE_HOST_WIN32)))
|
||||
add_subdirectory(nativeaot)
|
||||
endif()
|
||||
endif(NOT CLR_CROSS_COMPONENTS_BUILD)
|
||||
diff --git a/src/sdk/eng/common/native/NativeAotSupported.props b/src/sdk/eng/common/native/NativeAotSupported.props
|
||||
index 559a6663929e..cdff9ef03612 100644
|
||||
--- a/src/sdk/eng/common/native/NativeAotSupported.props
|
||||
+++ b/src/sdk/eng/common/native/NativeAotSupported.props
|
||||
@@ -13,6 +13,8 @@
|
||||
<!-- Reject unsupported architectures via RID suffix match -->
|
||||
<_NativeAotSupportedArch Condition="
|
||||
'$(TargetArchitecture)' != 'wasm' and
|
||||
+ '$(TargetArchitecture)' != 's390x' and
|
||||
+ '$(TargetArchitecture)' != 'ppc64le' and
|
||||
('$(TargetArchitecture)' != 'x86' or '$(TargetOS)' == 'windows')
|
||||
">true</_NativeAotSupportedArch>
|
||||
|
||||
14
dotnet.sh.in
Normal file
14
dotnet.sh.in
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
# Set location for AppHost lookup
|
||||
[ -z "$DOTNET_ROOT" ] && export DOTNET_ROOT=@LIBDIR@/dotnet
|
||||
|
||||
# Add dotnet tools directory to PATH
|
||||
DOTNET_TOOLS_PATH="$HOME/.dotnet/tools"
|
||||
case "$PATH" in
|
||||
*"$DOTNET_TOOLS_PATH"* ) true ;;
|
||||
* ) PATH="$PATH:$DOTNET_TOOLS_PATH" ;;
|
||||
esac
|
||||
|
||||
# Extract self-contained executables under HOME
|
||||
# to avoid multi-user issues from using the default '/var/tmp'.
|
||||
[ -z "$DOTNET_BUNDLE_EXTRACT_BASE_DIR" ] && export DOTNET_BUNDLE_EXTRACT_BASE_DIR="${XDG_CACHE_HOME:-"$HOME"/.cache}/dotnet_bundle_extract"
|
||||
1495
dotnet11.0.spec
Normal file
1495
dotnet11.0.spec
Normal file
File diff suppressed because it is too large
Load Diff
22
gating.yaml
Normal file
22
gating.yaml
Normal file
@ -0,0 +1,22 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_testing
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis}
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_stable
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis}
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-*
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||
18
macros.dotnet
Normal file
18
macros.dotnet
Normal file
@ -0,0 +1,18 @@
|
||||
# .NET's name for the architecture
|
||||
%dotnet_runtime_arch %{lua:
|
||||
local target = rpm.expand("%{_target_cpu}")
|
||||
local arch = "x64"
|
||||
if target == "aarch64" then
|
||||
arch = "arm64"
|
||||
elseif target == "ppc64le" then
|
||||
arch = "ppc64le"
|
||||
elseif target == "s390x" then
|
||||
arch = "s390x"
|
||||
elseif target == "x86_64" then
|
||||
arch = "x64"
|
||||
end
|
||||
print(arch)
|
||||
}
|
||||
|
||||
# .NET's identifier for the OS+architecture combination
|
||||
%dotnet_runtime_id %(. /etc/os-release ; echo "${ID}.${VERSION_ID%%.*}")-%{dotnet_runtime_arch}
|
||||
29
release-key-2023.asc
Normal file
29
release-key-2023.asc
Normal file
@ -0,0 +1,29 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: BSN Pgp v1.1.0.0
|
||||
|
||||
mQINBGUKsUYBEADVCJm4EhXALr1ld42kWeh/vM0XMZ2orNT6NRLDRYjpE4mm4UqA
|
||||
vpjfGCwt5fLcrT4yZng8ABkB3QwTsZzmxesAMD5AZR/gdU1G96DuDGsjp6zJvTuX
|
||||
zvz3PXUYfcl9n5X32acA6N9J5Xfp10xqX3oitUODBdYy/vKW/v/y87ZxgaR6a3wp
|
||||
pPJBJIVKwFJx13v4BHRsGp1fepliQcXPvmNKFNI20le5+FbLq6C9hY5wcwGHGfQr
|
||||
EokH79GsmqgSImqxDOIh06J5VfWA+JwV+3vf95pD8IUrRfGQ+GK7b1/bySxtM5Qa
|
||||
b/IDgvl/Qq3AzEpGarMBaqGbqMz1C7jd8Y6nyKMP/V+OCjbEdYNM8GRz6kBP3Un+
|
||||
Frat5Lc2o4DF+zB3PKIJS3hku5gwlJu6IU1F23vmYFtjUcpRGmyQZDoWyBbOWlB5
|
||||
4SXqVu16amUsRFYmOK8BJMjdotcVbriVIv6WRmugfhIMoRJzVGxYkdbuiuMAX69V
|
||||
xDoGpxX5A8S5A79y0USUVtadQfFavMTyb/gUuUe8oDsqK9gdI3ETxLYG4gYwauVX
|
||||
fCGfoLOKsq5dPzEuEA7GCRrMau+rHKFaM7BigSdnHFW7xNZ4v0YnXAagoqM2G5o5
|
||||
9sak0l57vxxTVk2V3iZzkoU2J2Zlyxyh72n5vjRmb7aNwmQh4Eav6a8ssQARAQAB
|
||||
tBlvbm54Y29yZWRldkBtaWNyb3NvZnQuY29tiQI4BBMBCAAiBQJlCrFGAhsDBgsJ
|
||||
CAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRD9v1PCTbSHLtfzEADIKq15XDeQxLSo
|
||||
BG1aFa9n82K1YADVcu1LeddfhDmQWLnZNgyHtQlKN2n59282CXtgymzae3uc05s2
|
||||
feIJaqF4M4NnCX8Ct3K7Hq1jI7ZktlquPCCy9XHq9aQY8XTxmdtRevtclKgYTwDh
|
||||
w+D/KbE8vTZ6o7JoubA3MKf4k3S8qL/0rIyaC6h0EpiWoMy1TdNMMK7BT4kl6Vz4
|
||||
W6KmNgOux1Pzku5ULM4WuOzmwW+NAzpOLJowfDs1ZC2RM3+g9i1/DmwWtCHngvGD
|
||||
+clA0I0agXxo05toOBTfwxd2gWYczuo/Ole16fYTzqT6n0DHqOjjcc9A7EmC72fQ
|
||||
J+hHAqM+4+CbEGuMpNnTMpCZs98bcK3Rqx/bDJYtbclZzm5O/V4nVbDrJZKzpgA1
|
||||
KuzNMLkr62P6/t15UsStgmrlTILmE5NG0CR1mj/46+mNbsMZCel3dcvnT1Zf4rTq
|
||||
QxMC7Dd/DECKQVC339G/BRfNyhOk2S1mZR/g1uS4bznL+tiwudDh/TAi5C3ZBDMh
|
||||
0muwD9caXS/QFIBWtb2ai3IcpU357R/ERPKLcWYtoYJ80RuKi6XYr1WxSPBmd5Qm
|
||||
wuncye+wR2dveo2jnIXZGUSgz50ZNgBxs/cYWAQ8J6KMgIBa+JY2qalzvIGbrC5x
|
||||
Sr+CkhS8vrktfnRgc8yBssJnvNfqXA==
|
||||
=pKgS
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
11
release.json
Normal file
11
release.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"release": "11.0.0-preview.6",
|
||||
"channel": "11.0",
|
||||
"tag": "v11.0.100-preview.6.26359.118",
|
||||
"sdkVersion": "11.0.100-preview.6.26359.118",
|
||||
"runtimeVersion": "11.0.0-preview.6.26359.118",
|
||||
"aspNetCoreVersion": "11.0.0-preview.6.26359.118",
|
||||
"sourceRepository": "https://github.com/dotnet/dotnet",
|
||||
"sourceVersion": "ba53d0ed335bed4ab7bfd01988c8e3953ee5ffbe",
|
||||
"officialBuildId": "20260709.18"
|
||||
}
|
||||
20
rpminspect.yaml
Normal file
20
rpminspect.yaml
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
inspections:
|
||||
# We patch upstream a lot, no need to reject patches
|
||||
patches: off
|
||||
badfuncs:
|
||||
allowed:
|
||||
# The Mono runtime (used on s390x, for example), uses inet_addr for
|
||||
# debugging (such as sending the control flow graph to a remote process).
|
||||
# See runtime/src/mono/mono/mini/cfgdump.c. This isn't part of any
|
||||
# standard networking facility; networking APIs are implemented/used in
|
||||
# libSystem*so.
|
||||
/usr/lib64/dotnet/shared/Microsoft.NETCore.App/*/libcoreclr.so:
|
||||
- inet_addr
|
||||
/usr/lib64/dotnet/packs/Microsoft.NETCore.App.Runtime.*/*/runtimes/*/native/libcoreclr.so:
|
||||
- inet_addr
|
||||
runpath:
|
||||
# Upstream explicitly sets $ORIGIN/netcoredeps as an RPATH
|
||||
# See https://github.com/dotnet/core/blob/main/Documentation/self-contained-linux-apps.md
|
||||
allowed_origin_paths:
|
||||
- /netcoredeps
|
||||
12
runtime-disable-fortify-on-ilasm-parser.patch
Normal file
12
runtime-disable-fortify-on-ilasm-parser.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git dotnet/src/runtime/src/coreclr/ilasm/CMakeLists.txt dotnet/src/runtime/src/coreclr/ilasm/CMakeLists.txt
|
||||
index cca2c6da185..d31e6cb2070 100644
|
||||
--- dotnet/src/runtime/src/coreclr/ilasm/CMakeLists.txt
|
||||
+++ dotnet/src/runtime/src/coreclr/ilasm/CMakeLists.txt
|
||||
@@ -52,6 +52,7 @@ if(CLR_CMAKE_HOST_UNIX)
|
||||
add_compile_options(-Wno-array-bounds)
|
||||
add_compile_options(-Wno-unused-label)
|
||||
set_source_files_properties( prebuilt/asmparse.cpp PROPERTIES COMPILE_FLAGS "-O0" )
|
||||
+ set_source_files_properties( prebuilt/asmparse.cpp PROPERTIES COMPILE_FLAGS "-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=0" )
|
||||
endif(CLR_CMAKE_HOST_UNIX)
|
||||
|
||||
if(CLR_CMAKE_HOST_LINUX OR CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS OR CLR_CMAKE_HOST_HAIKU)
|
||||
34
runtime-openssl-sha1.patch
Normal file
34
runtime-openssl-sha1.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From d7805229ffe6906cd0832c0482b963caf4b4fd82 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Deseyn <tom.deseyn@gmail.com>
|
||||
Date: Wed, 28 Feb 2024 14:08:15 +0100
|
||||
Subject: [PATCH] Allow certificate validation with SHA-1 signatures.
|
||||
|
||||
RHEL OpenSSL builds disable SHA-1 signatures. This causes certificate
|
||||
validation to fail when using the X509_V_FLAG_CHECK_SS_SIGNATURE flag
|
||||
with a chain where the last certificate uses a SHA-1 signature.
|
||||
|
||||
This removes X509_V_FLAG_CHECK_SS_SIGNATURE flag to have the default
|
||||
OpenSSL behavior for certificate validation.
|
||||
---
|
||||
.../libs/System.Security.Cryptography.Native/pal_x509.c | 5 -----
|
||||
1 file changed, 5 deletions(-)
|
||||
|
||||
diff --git a/src/runtime/src/native/libs/System.Security.Cryptography.Native/pal_x509.c b/src/runtime/src/native/libs/System.Security.Cryptography.Native/pal_x509.c
|
||||
index 04c6ba06cd..2cd3413dae 100644
|
||||
--- a/src/runtime/src/native/libs/System.Security.Cryptography.Native/pal_x509.c
|
||||
+++ b/src/runtime/src/native/libs/System.Security.Cryptography.Native/pal_x509.c
|
||||
@@ -272,11 +272,6 @@ int32_t CryptoNative_X509StoreCtxInit(X509_STORE_CTX* ctx, X509_STORE* store, X5
|
||||
|
||||
int32_t val = X509_STORE_CTX_init(ctx, store, x509, extraStore);
|
||||
|
||||
- if (val != 0)
|
||||
- {
|
||||
- X509_STORE_CTX_set_flags(ctx, X509_V_FLAG_CHECK_SS_SIGNATURE);
|
||||
- }
|
||||
-
|
||||
return val;
|
||||
}
|
||||
|
||||
--
|
||||
2.43.2
|
||||
|
||||
142
runtime-re-enable-implicit-rejection.patch
Normal file
142
runtime-re-enable-implicit-rejection.patch
Normal file
@ -0,0 +1,142 @@
|
||||
From 5fdc289903bd3a77d455583650b00297da0cae8f Mon Sep 17 00:00:00 2001
|
||||
From: Omair Majid <omajid@redhat.com>
|
||||
Date: Fri, 2 Feb 2024 15:51:23 -0500
|
||||
Subject: [PATCH] Revert "Disable implicit rejection for RSA PKCS#1 (#95216)"
|
||||
|
||||
This reverts commit a5fc8ff9b03ffb2fdb81dad524ad1a20a0714995.
|
||||
|
||||
To quote Clemens Lang:
|
||||
|
||||
> [Disabling implcit rejection] re-enables a Bleichenbacher timing oracle
|
||||
> attack against PKCS#1v1.5 decryption. See
|
||||
> https://people.redhat.com/~hkario/marvin/ for details and
|
||||
> https://github.com/dotnet/runtime/pull/95157#issuecomment-1842784399 for a
|
||||
> comment by the researcher who published the vulnerability and proposed the
|
||||
> change in OpenSSL.
|
||||
|
||||
For more details, see:
|
||||
https://github.com/dotnet/runtime/pull/95216#issuecomment-1842799314
|
||||
---
|
||||
.../RSA/EncryptDecrypt.cs | 49 ++++---------------
|
||||
.../opensslshim.h | 6 ---
|
||||
.../pal_evp_pkey_rsa.c | 13 -----
|
||||
3 files changed, 10 insertions(+), 58 deletions(-)
|
||||
|
||||
|
||||
index 0aaffebe5..011206433 100644
|
||||
--- a/src/runtime/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/EncryptDecrypt.cs
|
||||
+++ b/src/runtime/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/EncryptDecrypt.cs
|
||||
@@ -355,10 +355,19 @@ private void RsaCryptRoundtrip(RSAEncryptionPadding paddingMode, bool expectSucc
|
||||
Assert.Equal(TestData.HelloBytes, output);
|
||||
}
|
||||
|
||||
- [ConditionalFact(typeof(EncryptDecrypt), nameof(PlatformSupportsEmptyRSAEncryption))]
|
||||
+ [ConditionalFact]
|
||||
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
|
||||
public void RoundtripEmptyArray()
|
||||
{
|
||||
+ if (OperatingSystem.IsIOS() && !OperatingSystem.IsIOSVersionAtLeast(13, 6))
|
||||
+ {
|
||||
+ throw new SkipTestException("iOS prior to 13.6 does not reliably support RSA encryption of empty data.");
|
||||
+ }
|
||||
+ if (OperatingSystem.IsTvOS() && !OperatingSystem.IsTvOSVersionAtLeast(14, 0))
|
||||
+ {
|
||||
+ throw new SkipTestException("tvOS prior to 14.0 does not reliably support RSA encryption of empty data.");
|
||||
+ }
|
||||
+
|
||||
using (RSA rsa = RSAFactory.Create(TestData.RSA2048Params))
|
||||
{
|
||||
void RoundtripEmpty(RSAEncryptionPadding paddingMode)
|
||||
@@ -852,23 +861,5 @@ public static IEnumerable<object[]> OaepPaddingModes
|
||||
}
|
||||
}
|
||||
}
|
||||
-
|
||||
- public static bool PlatformSupportsEmptyRSAEncryption
|
||||
- {
|
||||
- get
|
||||
- {
|
||||
- if (OperatingSystem.IsIOS() && !OperatingSystem.IsIOSVersionAtLeast(13, 6))
|
||||
- {
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- if (OperatingSystem.IsTvOS() && !OperatingSystem.IsTvOSVersionAtLeast(14, 0))
|
||||
- {
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- return true;
|
||||
- }
|
||||
- }
|
||||
}
|
||||
}
|
||||
diff --git a/src/runtime/src/native/libs/System.Security.Cryptography.Native/opensslshim.h b/src/runtime/src/native/libs/System.Security.Cryptography.Native/opensslshim.h
|
||||
index db613a21d..db1ceb1a3 100644
|
||||
--- a/src/runtime/src/native/libs/System.Security.Cryptography.Native/opensslshim.h
|
||||
+++ b/src/runtime/src/native/libs/System.Security.Cryptography.Native/opensslshim.h
|
||||
@@ -397,10 +397,8 @@ extern bool g_libSslUses32BitTime;
|
||||
REQUIRED_FUNCTION(ERR_peek_error) \
|
||||
REQUIRED_FUNCTION(ERR_peek_error_line) \
|
||||
REQUIRED_FUNCTION(ERR_peek_last_error) \
|
||||
- REQUIRED_FUNCTION(ERR_pop_to_mark) \
|
||||
FALLBACK_FUNCTION(ERR_put_error) \
|
||||
REQUIRED_FUNCTION(ERR_reason_error_string) \
|
||||
- REQUIRED_FUNCTION(ERR_set_mark) \
|
||||
LIGHTUP_FUNCTION(ERR_set_debug) \
|
||||
LIGHTUP_FUNCTION(ERR_set_error) \
|
||||
REQUIRED_FUNCTION(EVP_aes_128_cbc) \
|
||||
@@ -471,7 +469,6 @@ extern bool g_libSslUses32BitTime;
|
||||
REQUIRED_FUNCTION(EVP_PKCS82PKEY) \
|
||||
REQUIRED_FUNCTION(EVP_PKEY2PKCS8) \
|
||||
REQUIRED_FUNCTION(EVP_PKEY_CTX_ctrl) \
|
||||
- REQUIRED_FUNCTION(EVP_PKEY_CTX_ctrl_str) \
|
||||
REQUIRED_FUNCTION(EVP_PKEY_CTX_free) \
|
||||
REQUIRED_FUNCTION(EVP_PKEY_CTX_get0_pkey) \
|
||||
REQUIRED_FUNCTION(EVP_PKEY_CTX_new) \
|
||||
@@ -953,10 +950,8 @@ extern TYPEOF(OPENSSL_gmtime)* OPENSSL_gmtime_ptr;
|
||||
#define ERR_peek_error_line ERR_peek_error_line_ptr
|
||||
#define ERR_peek_last_error ERR_peek_last_error_ptr
|
||||
#define ERR_put_error ERR_put_error_ptr
|
||||
-#define ERR_pop_to_mark ERR_pop_to_mark_ptr
|
||||
#define ERR_reason_error_string ERR_reason_error_string_ptr
|
||||
#define ERR_set_debug ERR_set_debug_ptr
|
||||
-#define ERR_set_mark ERR_set_mark_ptr
|
||||
#define ERR_set_error ERR_set_error_ptr
|
||||
#define EVP_aes_128_cbc EVP_aes_128_cbc_ptr
|
||||
#define EVP_aes_128_cfb8 EVP_aes_128_cfb8_ptr
|
||||
@@ -1026,7 +1021,6 @@ extern TYPEOF(OPENSSL_gmtime)* OPENSSL_gmtime_ptr;
|
||||
#define EVP_PKCS82PKEY EVP_PKCS82PKEY_ptr
|
||||
#define EVP_PKEY2PKCS8 EVP_PKEY2PKCS8_ptr
|
||||
#define EVP_PKEY_CTX_ctrl EVP_PKEY_CTX_ctrl_ptr
|
||||
-#define EVP_PKEY_CTX_ctrl_str EVP_PKEY_CTX_ctrl_str_ptr
|
||||
#define EVP_PKEY_CTX_free EVP_PKEY_CTX_free_ptr
|
||||
#define EVP_PKEY_CTX_get0_pkey EVP_PKEY_CTX_get0_pkey_ptr
|
||||
#define EVP_PKEY_CTX_new EVP_PKEY_CTX_new_ptr
|
||||
diff --git a/src/runtime/src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey_rsa.c b/src/runtime/src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey_rsa.c
|
||||
index a6040b939..34cf0087a 100644
|
||||
--- a/src/runtime/src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey_rsa.c
|
||||
+++ b/src/runtime/src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey_rsa.c
|
||||
@@ -69,19 +69,6 @@ static bool ConfigureEncryption(EVP_PKEY_CTX* ctx, RsaPaddingMode padding, const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
-
|
||||
- // OpenSSL 3.2 introduced a change where PKCS#1 RSA decryption does not fail for invalid padding.
|
||||
- // If the padding is invalid, the decryption operation returns random data.
|
||||
- // See https://github.com/openssl/openssl/pull/13817 for background.
|
||||
- // Some Linux distributions backported this change to previous versions of OpenSSL.
|
||||
- // Here we do a best-effort to set a flag to revert the behavior to failing if the padding is invalid.
|
||||
- ERR_set_mark();
|
||||
-
|
||||
- EVP_PKEY_CTX_ctrl_str(ctx, "rsa_pkcs1_implicit_rejection", "0");
|
||||
-
|
||||
- // Undo any changes to the error queue that may have occurred while configuring implicit rejection if the
|
||||
- // current version does not support implicit rejection.
|
||||
- ERR_pop_to_mark();
|
||||
}
|
||||
else
|
||||
{
|
||||
--
|
||||
2.53.0
|
||||
|
||||
6
sources
Normal file
6
sources
Normal file
@ -0,0 +1,6 @@
|
||||
SHA512 (dotnet-11.0.100-preview.6.26359.118.tar.gz) = f04b2da3e504a705c637913c2b8d3114a6c860178ff79af16d73c8412b43790f8afa5ef4e8d430511e64f1f7d580b147dcf80437ff07d9a1dee2bacb87eb8354
|
||||
SHA512 (dotnet-11.0.100-preview.6.26359.118.tar.gz.sig) = fa464b98338224ae67cf141d8aa4177db4216bdf0bc705777ae64f33b6d268e82f45b004fafdb1e304d39f337d020fa4173cf184a65980caad20b3b8551bd09e
|
||||
SHA512 (dotnet-prebuilts-11.0.100-preview.5.26302.115-arm64.tar.gz) = b34cbed524f2c8745f3f542d811a9cce48d5166a05ba5f8286c4a50b316800076fdbb53928c2f095240db7f872bedd232f69ffadc7858bc537720d1731982c72
|
||||
SHA512 (dotnet-prebuilts-11.0.100-preview.5.26302.115-x64.tar.gz) = 8e2c05033d7a67fa37bcd2c33c8e4f74850c53972b928e583ab3497a708357eb553806ad9af5286c5edf1206581f8955ee3267856c1e7607a2a6e6d0fefb4b89
|
||||
SHA512 (dotnet-prebuilts-11.0.100-preview.6.26366.102-ppc64le.tar.gz) = 7725b10dbf249d97d2fe15d26f13ef7aaf727668fb64fa07ee4ea9c9ebb2e6cf85af8ae87f80ea82346e0f72e7d3f8b84628d24cdd7e13efe97ac125acc77a54
|
||||
SHA512 (dotnet-prebuilts-11.0.100-preview.6.26366.102-s390x.tar.gz) = aafdd21d602c80eb66138bb62bb503eb40af4312d6c3774eb8d08d4b5af067d03a417cc7904ddbd2911650aebf75f629671e409a6baee97e5c8d985076c78372
|
||||
45
tests/ci.fmf
Normal file
45
tests/ci.fmf
Normal file
@ -0,0 +1,45 @@
|
||||
summary: Basic smoke test
|
||||
provision:
|
||||
hardware:
|
||||
disk:
|
||||
- size: ">= 20 GiB"
|
||||
memory: ">= 5120 MiB"
|
||||
prepare:
|
||||
how: install
|
||||
package:
|
||||
- aspnetcore-runtime-11.0
|
||||
- bash-completion
|
||||
- bc
|
||||
- binutils
|
||||
- dotnet-runtime-11.0
|
||||
- dotnet-sdk-11.0
|
||||
- expect
|
||||
- file
|
||||
- findutils
|
||||
- gcc-c++
|
||||
- git
|
||||
- jq
|
||||
- libstdc++-devel
|
||||
- lldb
|
||||
- npm
|
||||
- postgresql-odbc
|
||||
- postgresql-server
|
||||
- procps-ng
|
||||
- python3
|
||||
- strace
|
||||
- util-linux
|
||||
- wget
|
||||
- which
|
||||
- zlib-devel
|
||||
execute:
|
||||
script:
|
||||
- dotnet --info
|
||||
- wget --no-verbose https://github.com/redhat-developer/dotnet-bunny/releases/latest/download/turkey.tar.gz
|
||||
- tar xf turkey.tar.gz
|
||||
- dotnet turkey/Turkey.dll --version
|
||||
- git clone "https://github.com/redhat-developer/dotnet-regular-tests.git"
|
||||
- dotnet turkey/Turkey.dll -l="$TMT_TEST_DATA" dotnet-regular-tests --timeout=1200
|
||||
- dnf remove -yq 'dotnet*'
|
||||
- set -x; if command -v dotnet ; then exit 1; fi
|
||||
- set -x; if [ -d /usr/lib64/dotnet ]; then exit 1; fi
|
||||
- set -x; if man dotnet; then exit 1; fi
|
||||
Loading…
Reference in New Issue
Block a user