Make it easier to build on RHEL 8 as well using the system libunwind

This commit is contained in:
Omair Majid 2021-09-28 14:23:03 -04:00
parent 0fffd382bf
commit 9bc7689eec
2 changed files with 14 additions and 2 deletions

View File

@ -148,7 +148,10 @@ if [[ ${build_bootstrap} == true ]]; then
mkdir -p fixup-previously-source-built-artifacts mkdir -p fixup-previously-source-built-artifacts
pushd fixup-previously-source-built-artifacts pushd fixup-previously-source-built-artifacts
tar xf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz 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 # 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 * tar -I 'gzip -9' -cf ../packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz *
popd popd

View File

@ -197,7 +197,8 @@ Requires: dotnet-hostfxr-6.0%{?_isa} >= %{host_rpm_version}-%{release}
Requires: libicu%{?_isa} Requires: libicu%{?_isa}
%if %{use_bundled_libunwind} %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 %endif
%description -n dotnet-runtime-6.0 %description -n dotnet-runtime-6.0
@ -383,6 +384,14 @@ cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}
%endif %endif
%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 %build
cat /etc/os-release cat /etc/os-release