diff --git a/.gitignore b/.gitignore index faa0263..6578a82 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/dotnet-9e8b04bbff820c93c142f99a507a46b976f5c14c.tar.gz +SOURCES/dotnet-v6.0.101-SDK.tar.gz diff --git a/.rh-dotnet60-dotnet.metadata b/.rh-dotnet60-dotnet.metadata index c6b8af0..8007dee 100644 --- a/.rh-dotnet60-dotnet.metadata +++ b/.rh-dotnet60-dotnet.metadata @@ -1 +1 @@ -4521a07f53136d83916b1a044ed6cba3b8a41813 SOURCES/dotnet-9e8b04bbff820c93c142f99a507a46b976f5c14c.tar.gz +7d3d94b23e201a688cd492e9d42b3fd513a5d08a SOURCES/dotnet-v6.0.101-SDK.tar.gz diff --git a/SOURCES/installer-12516-portablerid.patch b/SOURCES/installer-12516-portablerid.patch new file mode 100644 index 0000000..4cb4ab6 --- /dev/null +++ b/SOURCES/installer-12516-portablerid.patch @@ -0,0 +1,23 @@ +From 892222071f73062f969f4f6ed1df8f759b9327b7 Mon Sep 17 00:00:00 2001 +From: Tom Deseyn +Date: Wed, 3 Nov 2021 15:12:59 +0100 +Subject: [PATCH] GetRuntimeInformation.targets: determine + PortableProductMonikerRid based on HostOSName and Architecture. + +--- + src/redist/targets/GetRuntimeInformation.targets | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/redist/targets/GetRuntimeInformation.targets b/src/redist/targets/GetRuntimeInformation.targets +index 5133c3a3841..01f704c7d8e 100644 +--- a/src/redist/targets/GetRuntimeInformation.targets ++++ b/src/redist/targets/GetRuntimeInformation.targets +@@ -28,6 +28,8 @@ + '$(Rid)' == 'linux-musl-x64' ">$(Rid) + $(OSName)-$(Architecture) + ++ $(HostOSName)-$(Architecture) ++ + dotnet-sdk-internal$(PgoTerm) + dotnet-sdk$(PgoTerm) + diff --git a/SOURCES/installer-12736-no-sudo.patch b/SOURCES/installer-12736-no-sudo.patch new file mode 100644 index 0000000..34d583a --- /dev/null +++ b/SOURCES/installer-12736-no-sudo.patch @@ -0,0 +1,39 @@ +From f8e115fadf6e8b392fa007e78d9b77fc64590cdd Mon Sep 17 00:00:00 2001 +From: Daniel Plaisted +Date: Mon, 29 Nov 2021 20:19:30 -0800 +Subject: [PATCH] Don't set ulimit + +1ES pools should now have ulimit set already now +--- + build.sh | 4 +--- + run-build.sh | 4 ---- + 2 files changed, 1 insertion(+), 7 deletions(-) + +diff --git a/build.sh b/build.sh +index 594a355fafa..7ff647c4060 100755 +--- a/build.sh ++++ b/build.sh +@@ -53,7 +53,5 @@ dockerbuild() + if [ ! -z "$BUILD_IN_DOCKER" ]; then + dockerbuild $args + else +- # Run under sudo so we can set ulimit +- # See https://github.com/dotnet/core-eng/issues/14808 +- sudo -E $DIR/run-build.sh $args ++ $DIR/run-build.sh $args + fi +diff --git a/run-build.sh b/run-build.sh +index fe839eb8009..7b98aedc0be 100755 +--- a/run-build.sh ++++ b/run-build.sh +@@ -25,10 +25,6 @@ CUSTOM_BUILD_ARGS= + # Set nuget package cache under the repo + [ -z $NUGET_PACKAGES ] && export NUGET_PACKAGES="$REPOROOT/.nuget/packages" + +-# Set max number of files open, helps avoid errors during NuGet restore +-# See https://github.com/dotnet/core-eng/issues/14808 +-ulimit -n 16384 +- + args=( ) + + while [[ $# > 0 ]]; do diff --git a/SOURCES/sdk-22373-portablerid.patch b/SOURCES/sdk-22373-portablerid.patch new file mode 100644 index 0000000..8b39eb3 --- /dev/null +++ b/SOURCES/sdk-22373-portablerid.patch @@ -0,0 +1,22 @@ +From 499fcf6e3b0e4b01a9c340a06f00cfc3e1fcc5d2 Mon Sep 17 00:00:00 2001 +From: Tom Deseyn +Date: Tue, 5 Oct 2021 09:04:14 +0200 +Subject: [PATCH] Use the portable rid for --use-current-runtime. + +--- + .../targets/Microsoft.NET.RuntimeIdentifierInference.targets | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets +index 17308aa9160..e764b2d9845 100644 +--- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets ++++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets +@@ -62,7 +62,7 @@ Copyright (c) .NET Foundation. All rights reserved. + + + +- $(NETCoreSdkRuntimeIdentifier) ++ $(NETCoreSdkPortableRuntimeIdentifier) + + + diff --git a/SOURCES/sdk-23080-userlocal-workload.patch b/SOURCES/sdk-23080-userlocal-workload.patch new file mode 100644 index 0000000..e874f20 --- /dev/null +++ b/SOURCES/sdk-23080-userlocal-workload.patch @@ -0,0 +1,23 @@ +From 6e57b7c1d7f9b5ce82eef106d465af81382794b3 Mon Sep 17 00:00:00 2001 +From: Tom Deseyn +Date: Wed, 15 Dec 2021 15:06:51 +0100 +Subject: [PATCH] userlocal detection: also force last digits to zero for + non-preview versions. + +--- + src/Common/WorkloadFileBasedInstall.cs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Common/WorkloadFileBasedInstall.cs b/src/Common/WorkloadFileBasedInstall.cs +index f0d82c1fa9..0b27b0939c 100644 +--- a/src/Common/WorkloadFileBasedInstall.cs ++++ b/src/Common/WorkloadFileBasedInstall.cs +@@ -21,7 +21,7 @@ internal static void SetUserLocal(string dotnetDir, string sdkFeatureBand) + + private static string GetUserInstallFilePath(string dotnetDir, string sdkFeatureBand) + { +- if (sdkFeatureBand.Contains("-")) ++ if (sdkFeatureBand.Contains("-") || !sdkFeatureBand.EndsWith("00", StringComparison.Ordinal)) + { + // The user passed in the sdk version. Derive the feature band version. + if (!Version.TryParse(sdkFeatureBand.Split('-')[0], out var sdkVersionParsed)) diff --git a/SPECS/dotnet.spec b/SPECS/dotnet.spec index ca5d150..5afb7fd 100644 --- a/SPECS/dotnet.spec +++ b/SPECS/dotnet.spec @@ -23,11 +23,12 @@ # until that's done, disable LTO. This has to happen before setting the flags below. %define _lto_cflags %{nil} -%global host_version 6.0.0 -%global runtime_version 6.0.0 -%global aspnetcore_runtime_version 6.0.0 -%global sdk_version 6.0.100 -%global templates_version 6.0.0 +%global host_version 6.0.1 +%global runtime_version 6.0.1 +%global aspnetcore_runtime_version %{runtime_version} +%global sdk_version 6.0.101 +%global sdk_feature_band_version %(echo %{sdk_version} | 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 }') %global host_rpm_version %{host_version} @@ -36,8 +37,7 @@ %global sdk_rpm_version %{sdk_version} # upstream can update releases without revving the SDK version so these don't always match -#%%global upstream_tag v%%{sdk_version}-SDK -%global upstream_tag 9e8b04bbff820c93c142f99a507a46b976f5c14c +%global upstream_tag v%{sdk_version}-SDK %if 0%{?fedora} || 0%{?rhel} < 8 %global use_bundled_libunwind 0 @@ -108,8 +108,18 @@ Patch900: roslyn-analyzers-no-apphost.patch # Disable telemetry by default; make it opt-in Patch1500: sdk-telemetry-optout.patch +# https://github.com/dotnet/sdk/pull/22373 +Patch1501: sdk-22373-portablerid.patch +# https://github.com/dotnet/sdk/pull/23080 +Patch1502: sdk-23080-userlocal-workload.patch -%if 0%{?fedora} || 0%{?rhel} > 8 +# https://github.com/dotnet/installer/pull/12516 +Patch1600: installer-12516-portablerid.patch +# https://github.com/dotnet/installer/pull/12736 +Patch1601: installer-12736-no-sudo.patch + + +%if 0%{?fedora} || 0%{?rhel} >= 8 ExclusiveArch: aarch64 x86_64 s390x %else ExclusiveArch: x86_64 @@ -405,6 +415,13 @@ popd pushd src/sdk.* %patch1500 -p1 +%patch1501 -p1 +%patch1502 -p1 +popd + +pushd src/installer.* +%patch1600 -p1 +%patch1601 -p1 popd # Disable package validation which breaks our build, even though we @@ -491,9 +508,11 @@ tar xf artifacts/%{runtime_arch}/Release/dotnet-sdk-%{sdk_version}-%{runtime_id} find %{buildroot}%{_libdir}/dotnet/ -iname testhost.x86 -delete find %{buildroot}%{_libdir}/dotnet/ -iname vstest.console -delete -# Install managed symbols -tar xf artifacts/%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-*%{runtime_version}*.tar.gz \ - -C %{buildroot}/%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/ +# Install managed symbols. Disabled until we find a fix for the build +# system embedding hardcoded source code paths. More at +# https://github.com/dotnet/source-build/issues/2623 +# tar xf artifacts/%%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-*%%{runtime_version}*.tar.gz \ +# -C %%{buildroot}/%%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%%{runtime_version}/ # Fix executable permissions on files find %{buildroot}%{_libdir}/dotnet/ -type f -name 'apphost' -exec chmod +x {} \; @@ -546,6 +565,7 @@ echo "Testing build results for debug symbols..." %check %{buildroot}%{_libdir}/dotnet/dotnet --info +%{buildroot}%{_libdir}/dotnet/dotnet --version %files -n %{?scl_prefix}dotnet @@ -588,8 +608,7 @@ echo "Testing build results for debug symbols..." %dir %{_libdir}/dotnet/sdk %{_libdir}/dotnet/sdk/%{sdk_version} %dir %{_libdir}/dotnet/sdk-manifests -# FIXME hardcoded version? -%{_libdir}/dotnet/sdk-manifests/6.0.100 +%{_libdir}/dotnet/sdk-manifests/%{sdk_feature_band_version} %{_libdir}/dotnet/metadata %dir %{_libdir}/dotnet/packs @@ -599,6 +618,14 @@ echo "Testing build results for debug symbols..." %changelog +* Thu Dec 16 2021 Omair Majid - 6.0.101-2 +- Fix userlocal sdk installation +- Related: RHBZ#2030381 + +* Wed Dec 08 2021 Omair Majid - 6.0.101-1 +- Update to .NET SDK 6.0.101 and Runtime 6.0.1 +- Resolves: RHBZ#2030381 + * Wed Nov 03 2021 Omair Majid - 6.0.100-2 - Disable bootstrap - Related: RHBZ#2016419