From 9bc7689eec09735652c954ea3d97febebb4dc0f5 Mon Sep 17 00:00:00 2001 From: Omair Majid Date: Tue, 28 Sep 2021 14:23:03 -0400 Subject: [PATCH] Make it easier to build on RHEL 8 as well using the system libunwind --- build-dotnet-tarball | 5 ++++- dotnet6.0.spec | 11 ++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/build-dotnet-tarball b/build-dotnet-tarball index 4279bba..826752b 100755 --- a/build-dotnet-tarball +++ b/build-dotnet-tarball @@ -148,7 +148,10 @@ if [[ ${build_bootstrap} == true ]]; then mkdir -p fixup-previously-source-built-artifacts pushd fixup-previously-source-built-artifacts tar xf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz - find -iname '*fedora*nupkg' -delete + find . -iname '*fedora*nupkg' -delete + rm runtime.linux-x64.Microsoft.NETCore.IL*sm.*.nupkg + wget https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2//runtime.linux-x64.Microsoft.NETCore.ILAsm/6.0.0-rc.2.21459.6/runtime.linux-x64.microsoft.netcore.ilasm.6.0.0-rc.2.21459.6.nupkg + wget https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2//runtime.linux-x64.Microsoft.NETCore.ILDAsm/6.0.0-rc.2.21459.6/runtime.linux-x64.microsoft.netcore.ildasm.6.0.0-rc.2.21459.6.nupkg # We must keep the original file names in the archive, even prepending a ./ leads to issues tar -I 'gzip -9' -cf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz * popd diff --git a/dotnet6.0.spec b/dotnet6.0.spec index d1d6994..6f523a3 100644 --- a/dotnet6.0.spec +++ b/dotnet6.0.spec @@ -197,7 +197,8 @@ Requires: dotnet-hostfxr-6.0%{?_isa} >= %{host_rpm_version}-%{release} Requires: libicu%{?_isa} %if %{use_bundled_libunwind} -Provides: bundled(libunwind) = 1.3 +# See runtime.*/src/coreclr/pal/src/libunwind/libunwind-version.txt +Provides: bundled(libunwind) = 1.5.rc1.28.g9165d2a1 %endif %description -n dotnet-runtime-6.0 @@ -383,6 +384,14 @@ cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch} %endif %endif +# Disable package validation which breaks our build, even though we +# are injecting "blessed" nuget packages produced by Microsoft. +# There's no need to run validation in RPM packages anyway. +sed -i -E 's|( /p:BuildDebPackage=false)|\1 /p:EnablePackageValidation=false|' src/runtime.*/eng/SourceBuild.props + +%if ! %{use_bundled_libunwind} +sed -i -E 's|( /p:BuildDebPackage=false)|\1 --cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|' src/runtime.*/eng/SourceBuild.props +%endif %build cat /etc/os-release