#4 Update .NET to the v3.1.103 SDK and v3.1.3 runtime.
Merged 2 years ago by crummel. Opened 2 years ago by crummel.
rpms/ crummel/dotnet3.1 master  into  master

file modified
+1
@@ -1,2 +1,3 @@ 

  /dotnet-v3.1.101-SDK.tar.gz

  /dotnet-v3.1.102-SDK.tar.gz

+ /dotnet-v3.1.103.2-SDK.tar.gz

file modified
+7 -3
@@ -94,7 +94,11 @@ 

      sed -i -e 's|cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE||' repos/coreclr.proj

      mkdir -p patches/coreclr/

      cp ../../build-coreclr-clang10.patch patches/coreclr

-     ./build-source-tarball.sh "${unmodified_tarball_name}"

+     mkdir -p patches/corefx/

+     cp ../../corefx-42900-clang-10.patch patches/corefx

+     cp -r /usr/lib64/dotnet "${temp_dir}"

+     ./build.sh --with-sdk ../dotnet /p:ArchiveDownloadedPackages=true

+     ./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build --with-sdk ../dotnet

      popd

      popd

  
@@ -111,8 +115,8 @@ 

  # Remove files with funny licenses, crypto implementations and other

  # not-very-useful artifacts to reduce tarball size

  find -type f -iname '*.tar.gz' -delete

- rm -r src/AspNetCore.*/src/SignalR/clients/java/signalr/gradle*

- find src/AspNetCore.*/src -type d -name samples -print0 | xargs -0 rm -r

+ rm -r src/aspnetcore.*/src/SignalR/clients/java/signalr/gradle*

+ find src/aspnetcore.*/src -type d -name samples -print0 | xargs -0 rm -r

  rm -r src/NuGet.Client.*/test/EndToEnd/ProjectTemplates/NetCoreWebApplication1.0.zip

  find src/coreclr.*/ -depth -name tests -print0 | xargs -0 rm -r

  popd

@@ -0,0 +1,70 @@ 

+ From 58d6cd09bd2d5b1085c6572c1d97b8533cf8294b Mon Sep 17 00:00:00 2001

+ From: Omair Majid <omajid@redhat.com>

+ Date: Fri, 3 Apr 2020 13:53:09 -0400

+ Subject: [PATCH] Fix corefx to build on clang 10

+ 

+ Clang 10 adds/enables new warnings, some of which is affecting

+ the corefx code.

+ 

+ Clang 10 has added -Walloca to warn about uses of alloca. This commit

+ replaces the only non-compliant use of that with a single fixed

+ stack-allocated buffer.

+ 

+ Clang 10 has also added -Wimplicit-int-float-conversion. This commit

+ uses explicit casts to double to avoid the warnings.

+ 

+ This is a backport of dotnet/runtime#33734 to corefx.

+ 

+ After this commit, I can build all of corefx with Clang 10.

+ ---

+  src/Native/Unix/System.Native/pal_io.c   | 20 +++++++++++---------

+  src/Native/Unix/System.Native/pal_time.c |  2 +-

+  2 files changed, 12 insertions(+), 10 deletions(-)

+ 

+ diff --git a/src/Native/Unix/System.Native/pal_io.c b/src/Native/Unix/System.Native/pal_io.c

+ index 2d51edacf5ee..c7c42eb3e72b 100644

+ --- a/src/Native/Unix/System.Native/pal_io.c

+ +++ b/src/Native/Unix/System.Native/pal_io.c

+ @@ -906,18 +906,20 @@ int32_t SystemNative_Poll(PollEvent* pollEvents, uint32_t eventCount, int32_t mi

+          return Error_EINVAL;

+      }

+  

+ -    size_t bufferSize;

+ -    if (!multiply_s(sizeof(struct pollfd), (size_t)eventCount, &bufferSize))

+ +    struct pollfd stackBuffer[(uint32_t)(2048/sizeof(struct pollfd))];

+ +    int useStackBuffer = eventCount <= (sizeof(stackBuffer)/sizeof(stackBuffer[0]));

+ +    struct pollfd* pollfds = NULL;

+ +    if (useStackBuffer)

+      {

+ -        return SystemNative_ConvertErrorPlatformToPal(EOVERFLOW);

+ +        pollfds = (struct pollfd*)&stackBuffer[0];

+      }

+ -

+ -

+ -    int useStackBuffer = bufferSize <= 2048;

+ -    struct pollfd* pollfds = (struct pollfd*)(useStackBuffer ? alloca(bufferSize) : malloc(bufferSize));

+ -    if (pollfds == NULL)

+ +    else

+      {

+ -        return Error_ENOMEM;

+ +        pollfds = (struct pollfd*)calloc(eventCount, sizeof(*pollfds));

+ +        if (pollfds == NULL)

+ +        {

+ +            return Error_ENOMEM;

+ +        }

+      }

+  

+      for (uint32_t i = 0; i < eventCount; i++)

+ diff --git a/src/Native/Unix/System.Native/pal_time.c b/src/Native/Unix/System.Native/pal_time.c

+ index 1a7c862749d1..54ebde60a83b 100644

+ --- a/src/Native/Unix/System.Native/pal_time.c

+ +++ b/src/Native/Unix/System.Native/pal_time.c

+ @@ -169,7 +169,7 @@ int32_t SystemNative_GetCpuUtilization(ProcessCpuInformation* previousCpuInfo)

+      uint64_t resolution = SystemNative_GetTimestampResolution();

+      uint64_t timestamp = SystemNative_GetTimestamp();

+  

+ -    uint64_t currentTime = (uint64_t)(timestamp * ((double)SecondsToNanoSeconds / resolution));

+ +    uint64_t currentTime = (uint64_t)((double)timestamp * ((double)SecondsToNanoSeconds / (double)resolution));

+  

+      uint64_t lastRecordedCurrentTime = previousCpuInfo->lastRecordedCurrentTime;

+      uint64_t lastRecordedKernelTime = previousCpuInfo->lastRecordedKernelTime;

@@ -2,9 +2,10 @@ 

  index 7d804a1e54..717c2718d7 100644

  --- a/src/Native/Unix/CMakeLists.txt

  +++ b/src/Native/Unix/CMakeLists.txt

- @@ -25,7 +25,6 @@ add_compile_options(-fPIC)

+ @@ -25,7 +25,7 @@ add_compile_options(-fPIC)

       add_compile_options(-Wthread-safety)

       add_compile_options(-Wno-thread-safety-analysis)

+ +    add_compile_options(-Wno-alloca)

   endif()

  -add_compile_options(-Werror)

   

file modified
+13 -8
@@ -20,10 +20,12 @@ 

  %global dotnet_cflags %(echo %optflags | sed -e 's/-fstack-clash-protection//' | sed -re 's/-specs=[^ ]*//g')

  %global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g')

  

- %global host_version 3.1.2

- %global runtime_version 3.1.2

+ %global host_version 3.1.3

+ %global runtime_version 3.1.3

  %global aspnetcore_runtime_version %{runtime_version}

- %global sdk_version 3.1.102

+ %global sdk_version 3.1.103

+ # upstream respun this release, so the tag doesn't exactly match

+ %global src_version %{sdk_version}.2

  %global templates_version %(echo %{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')

  

  %global host_rpm_version %{host_version}
@@ -62,8 +64,8 @@ 

  URL:            https://github.com/dotnet/

  

  # The source is generated on a Fedora box via:

- # ./build-dotnet-tarball v%%{sdk_version}-SDK

- Source0:        dotnet-v%{sdk_version}-SDK.tar.gz

+ # ./build-dotnet-tarball v%%{src_version}-SDK

+ Source0:        dotnet-v%{src_version}-SDK.tar.gz

  Source1:        check-debug-symbols.py

  Source2:        dotnet.sh.in

  
@@ -319,7 +321,7 @@ 

  

  

  %prep

- %setup -q -n dotnet-v%{sdk_version}-SDK

+ %setup -q -n dotnet-v%{src_version}-SDK

  

  %if %{without bootstrap}

  # Remove all prebuilts
@@ -328,12 +330,12 @@ 

  find -iname '*.tar.gz' -type f -delete

  find -iname '*.nupkg' -type f -delete

  find -iname '*.zip' -type f -delete

- rm -r .dotnet/

+ rm -rf .dotnet/

  rm -r packages/source-built

  %endif

  

  %if %{without bootstrap}

- sed -i -e 's|3.1.100-preview1-014459|3.1.101|' global.json

+ sed -i -e 's|3.1.100-preview1-014459|3.1.102|' global.json

  mkdir -p packages/archive

  ln -s %{_libdir}/dotnet/source-built-artifacts/*.tar.gz packages/archive/

  ln -s %{_libdir}/dotnet/reference-packages/Private.SourceBuild.ReferencePackages*.tar.gz packages/archive
@@ -514,6 +516,9 @@ 

  

  

  %changelog

+ * Thu Apr 09 2020 Chris Rummel <crummel@microsoft.com> - 3.1.103-1

+ - Update to .NET Core Runtime 3.1.3 and SDK 3.1.103

+ 

  * Mon Mar 16 2020 Omair Majid <omajid@redhat.com> - 3.1.102-1

  - Update to .NET Core Runtime 3.1.2 and SDK 3.1.102

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (dotnet-v3.1.102-SDK.tar.gz) = f46f54b996883ecced44d377e2052b59461781bd2a0c8453a31e90e6822998ca5e97957a4b16a2aa00f7e803c17ce68c2128b8aad9aa2e0a399b7b15ea5af168

+ SHA512 (dotnet-v3.1.103.2-SDK.tar.gz) = 6c4de4914f6d107e59300efb43fae24fffdbb983a5ffeb36fbe26c8071a87e76162ebde0f0aa270ab7cbb666b4ee0ab65cfab98f1dbba2ea9d48809372417ec2

This is mostly a straightforward version update. There was additionally a casing change from upstream and I modified build_dotnet_tarball to build and produce the tarball separately for easier debugging of build issues. I also included omajid's patch to fix compilation with clang 10.

Generally, we dont add anything to the .gitignore file. fedpkg new-sources will add the tarball, and we leave it at that.

I try and keep this sdk_version consistent with the dotnet --version output. That would still be 3.1.103, right?

2 new commits added

  • Don't use respun tag for our version number.
  • Revert manual changes to gitignore.
2 years ago

1 new commit added

  • Update sources.
2 years ago

2 new commits added

  • Fix one more place.
  • Try separating source version.
2 years ago

Looks good to me! CI is passing too. If you can, please squash these changes and merge it into master and f32 branches. Please also run fedpkg build for both of them to get official builds.

If you can, please also create an update for "Fedora 32". Otherwise, I will be happy to do it instead. (Updates for rawhide (master) are automatic.)

rebased onto 835f5d7

2 years ago

Pull-Request has been merged by crummel

2 years ago