From b4e1c4204aa6b144736392b039257320e415624c Mon Sep 17 00:00:00 2001 From: Omair Majid Date: Fri, 22 Dec 2023 12:12:45 -0500 Subject: [PATCH] Update to .NET SDK 7.0.114 and Runtime 7.0.14 Resolves: RHEL-15350 --- .gitignore | 1 + dotnet7.0.spec | 17 +++++++++--- runtime-clang-17.patch | 11 ++++++++ sources | 2 +- update-release | 62 ++++++++++++++++++++++++++++-------------- 5 files changed, 67 insertions(+), 26 deletions(-) create mode 100644 runtime-clang-17.patch diff --git a/.gitignore b/.gitignore index 7a5b412..06c5a7f 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ /dotnet-v7.0.111.tar.gz /dotnet-v7.0.112.tar.gz /dotnet-v7.0.113.tar.gz +/dotnet-v7.0.114.tar.gz diff --git a/dotnet7.0.spec b/dotnet7.0.spec index 6b178c4..3260b78 100644 --- a/dotnet7.0.spec +++ b/dotnet7.0.spec @@ -7,10 +7,10 @@ # until that's done, disable LTO. This has to happen before setting the flags below. %define _lto_cflags %{nil} -%global host_version 7.0.13 -%global runtime_version 7.0.13 +%global host_version 7.0.14 +%global runtime_version 7.0.14 %global aspnetcore_runtime_version %{runtime_version} -%global sdk_version 7.0.113 +%global sdk_version 7.0.114 %global sdk_feature_band_version %(echo %{sdk_version} | cut -d '-' -f 1 | sed -e 's|[[:digit:]][[:digit:]]$|00|') %global templates_version %{runtime_version} #%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }') @@ -79,7 +79,11 @@ Source11: dotnet.sh.in # Disable apphost; there's no net6.0 apphost for ppc64le Patch1: roslyn-analyzers-ppc64le-apphost.patch - +# Support building with clang 17. Without this, runtime will not use lld on +# aarch64. That leads to the .text and .rodata sections being placed in the +# same segment, leading to crashes involving GS cookie +# https://github.com/dotnet/runtime/pull/52244 +Patch2: runtime-clang-17.patch %if 0%{?fedora} || 0%{?rhel} >= 8 @@ -401,6 +405,7 @@ popd %endif %patch1 -p1 +%patch2 -p1 # Fix bad hardcoded path in build sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime/src/native/corehost/hostmisc/pal.unix.cpp @@ -613,6 +618,10 @@ rm -rf %{buildroot}%{_libdir}/dotnet/packs/NETStandard.Library.Ref/2.1.0 %changelog +* Fri Dec 22 2023 Omair Majid - 7.0.114-2 +- Update to .NET SDK 7.0.114 and Runtime 7.0.14 +- Resolves: RHEL-15350 + * Tue Oct 24 2023 Omair Majid - 7.0.113-2 - Update to .NET SDK 7.0.113 and Runtime 7.0.13 - Resolves: RHEL-14474 diff --git a/runtime-clang-17.patch b/runtime-clang-17.patch new file mode 100644 index 0000000..86e79b4 --- /dev/null +++ b/runtime-clang-17.patch @@ -0,0 +1,11 @@ +--- a/src/runtime/eng/common/native/init-compiler.sh ++++ b/src/runtime/eng/common/native/init-compiler.sh +@@ -71,7 +71,7 @@ + # Set default versions + if [[ -z "$majorVersion" ]]; then + # note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero. +- if [[ "$compiler" == "clang" ]]; then versions=( 16 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 ) ++ if [[ "$compiler" == "clang" ]]; then versions=( 17 16 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 ) + elif [[ "$compiler" == "gcc" ]]; then versions=( 12 11 10 9 8 7 6 5 4.9 ); fi + + for version in "${versions[@]}"; do diff --git a/sources b/sources index 11eb172..8463558 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (dotnet-v7.0.113.tar.gz) = acdafc40d15643f6afb5edc10f13d7550faa5f56331ddab85246838a673bcac595436d0243dd6c3ee72c33681aa1d5e4b1189646f440ea3e19ccccf85881f07b +SHA512 (dotnet-v7.0.114.tar.gz) = d7f18592b739e81c183736cab96800261e2137b4184f2a1dcf90a13e10647e3ab12e4c1afbc54ad6be4a1f2968c730b29db20c30a9dfc7d9b904cc088753d8ba diff --git a/update-release b/update-release index 3e02e9c..5725315 100755 --- a/update-release +++ b/update-release @@ -8,7 +8,7 @@ IFS=$'\n\t' print_usage() { echo " Usage:" - echo " ./update-release sdk-version runtime-version [--bug bug-id] [--tarball tarball-name] [--larger-rpm-release]" + echo " ./update-release sdk-version runtime-version [--bug bug-id] [--tarball tarball-name] [--release-json release-json] [--larger-rpm-release]" } user_provided_tarball_name="" @@ -28,6 +28,11 @@ while [[ "$#" -gt 0 ]]; do print_usage exit 0 ;; + --release-json) + release_json="$2" + shift; + shift; + ;; --tarball) user_provided_tarball_name="$2" shift; @@ -61,28 +66,10 @@ fi host_version="$runtime_version" -if [[ "$runtime_version" == "3.1"* ]]; then - tag=v${sdk_version}-SDK -else +if [[ "$runtime_version" == "6.0"* ]] || [[ "$runtime_version" == "7.0"* ]] ; then tag=v${sdk_version} -fi - -if [[ -f "dotnet-${tag}-original.tar.gz" ]]; then - echo "dotnet-${tag}-original.tar.gz alredy exists, not rebuilding tarball" else - if [[ -n "${user_provided_tarball_name}" ]]; then - cp -a "$user_provided_tarball_name" "dotnet-${tag}-original.tar.gz" - elif [[ -f "dotnet-${sdk_version}-SDK.tar.gz" ]]; then - cp -a "dotnet-${sdk_version}-SDK.tar.gz" "dotnet-${tag}-original.tar.gz" - elif [[ -f "dotnet-${sdk_version}.tar.gz" ]]; then - cp -a "dotnet-${sdk_version}.tar.gz" "dotnet-${tag}-original.tar.gz" - elif [[ -f "dotnet-${runtime_version}.tar.gz" ]]; then - cp -a "dotnet-${runtime_version}.tar.gz" "dotnet-${tag}-original.tar.gz" - fi -fi - -if [[ ! -f "dotnet-${tag}.tar.gz" ]]; then - ./build-dotnet-tarball "${tag}" + tag=v${runtime_version} fi set -x @@ -91,6 +78,39 @@ sed -i -E "s|^%global host_version [[:digit:]]\.[[:digit:]]\.[[:digit:]]+|%globa sed -i -E "s|^%global runtime_version [[:digit:]]\.[[:digit:]]\.[[:digit:]]+|%global runtime_version ${runtime_version}|" "$spec_file" sed -i -E "s|^%global sdk_version [[:digit:]]\.[[:digit:]]\.[[:digit:]][[:digit:]][[:digit:]]|%global sdk_version ${sdk_version}|" "$spec_file" + +if [[ "$runtime_version" == "6.0"* ]] || [[ "$runtime_version" == "7.0"* ]] ; then + if [[ -f "dotnet-${tag}.tar.gz" ]]; then + echo "dotnet-${tag}.tar.gz already exists, not rebuilding tarball" + else + if [[ -f "dotnet-${tag}-original.tar.gz" ]]; then + echo "dotnet-${tag}-original.tar.gz alredy exists, not rebuilding tarball" + else + if [[ -n "${user_provided_tarball_name}" ]]; then + cp -a "$user_provided_tarball_name" "dotnet-${tag}-original.tar.gz" + elif [[ -f "dotnet-${sdk_version}-SDK.tar.gz" ]]; then + cp -a "dotnet-${sdk_version}-SDK.tar.gz" "dotnet-${tag}-original.tar.gz" + elif [[ -f "dotnet-${sdk_version}.tar.gz" ]]; then + cp -a "dotnet-${sdk_version}.tar.gz" "dotnet-${tag}-original.tar.gz" + elif [[ -f "dotnet-${runtime_version}.tar.gz" ]]; then + cp -a "dotnet-${runtime_version}.tar.gz" "dotnet-${tag}-original.tar.gz" + fi + fi + + ./build-dotnet-tarball "${tag}" + fi +else + if [[ -f "dotnet-${tag}.tar.gz" ]]; then + echo "dotnet-${tag}.tar.gz already exists, not rebuilding tarball" + elif [[ -n ${user_provided_tarball_name} ]]; then + cp -a "${user_provided_tarball_name}" "dotnet-${tag}.tar.gz" + cp -a "${release_json}" release.json + else + rm -f release.json + spectool -g "$spec_file" + fi +fi + comment="Update to .NET SDK ${sdk_version} and Runtime ${runtime_version}" commit_message="$comment "