From 77f8652edd5390390c7244bcfb1b203bf35d6d9c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 13 2021 20:36:33 +0000 Subject: import rh-dotnet31-dotnet-3.1.120-1.el7_9 --- diff --git a/.gitignore b/.gitignore index 8814cd4..654b4b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/dotnet-v3.1.119-SDK.tar.gz +SOURCES/dotnet-v3.1.120-SDK.tar.gz diff --git a/.rh-dotnet31-dotnet.metadata b/.rh-dotnet31-dotnet.metadata index 2844b31..2707c2c 100644 --- a/.rh-dotnet31-dotnet.metadata +++ b/.rh-dotnet31-dotnet.metadata @@ -1 +1 @@ -d860e14091807e12f2d319b73d2dc57d999e7868 SOURCES/dotnet-v3.1.119-SDK.tar.gz +ebc730cfb8f37957b9dc0153ece3fad137cc3168 SOURCES/dotnet-v3.1.120-SDK.tar.gz diff --git a/SPECS/dotnet.spec b/SPECS/dotnet.spec index a258a8f..1ff52c0 100644 --- a/SPECS/dotnet.spec +++ b/SPECS/dotnet.spec @@ -1,6 +1,8 @@ %{?scl:%scl_package dotnet} %{!?scl:%global pkg_name %{name}} +%bcond_with bootstrap + # Avoid provides/requires from private libraries %global privlibs libhostfxr %global privlibs %{privlibs}|libclrjit @@ -26,10 +28,10 @@ %endif %global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g') -%global host_version 3.1.19 -%global runtime_version 3.1.19 +%global host_version 3.1.20 +%global runtime_version 3.1.20 %global aspnetcore_runtime_version %{runtime_version} -%global sdk_version 3.1.119 +%global sdk_version 3.1.120 %global templates_version %(echo %{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }') %global host_rpm_version %{host_version} @@ -81,6 +83,11 @@ BuildRequires: llvm-toolset-7.0-cmake BuildRequires: compat-openssl10 %endif BuildRequires: coreutils +%if %{without bootstrap} +BuildRequires: %{?scl_prefix}dotnet-build-reference-packages +BuildRequires: %{?scl_prefix}dotnet-sdk-3.1 +BuildRequires: %{?scl_prefix}dotnet-sdk-3.1-source-built-artifacts +%endif BuildRequires: git %if 0%{?fedora} || 0%{?rhel} > 7 BuildRequires: glibc-langpack-en @@ -265,10 +272,39 @@ applications using the .NET Core SDK. %dotnet_targeting_pack aspnetcore-targeting-pack-3.1 %{aspnetcore_runtime_rpm_version} Microsoft.AspNetCore.App 3.1 Microsoft.AspNetCore.App.Ref %dotnet_targeting_pack netstandard-targeting-pack-2.1 %{sdk_rpm_version} NETStandard.Library 2.1 NETStandard.Library.Ref +%package -n %{?scl_prefix}dotnet-sdk-3.1-source-built-artifacts + +Version: %{sdk_rpm_version} +Summary: Internal package for building the .NET Core 3.1 Software Development Kit + +%description -n %{?scl_prefix}dotnet-sdk-3.1-source-built-artifacts +The .NET Core source-built archive is a collection of packages needed +to build the .NET Core SDK itself. + +These are not meant for general use. + %prep %setup -q -n dotnet-v%{sdk_version}-SDK +%if %{without bootstrap} +# Remove all prebuilts +find -iname '*.dll' -type f -delete +find -iname '*.so' -type f -delete +find -iname '*.tar.gz' -type f -delete +find -iname '*.nupkg' -type f -delete +find -iname '*.zip' -type f -delete +rm -rf .dotnet/ +rm -rf packages/source-built +%endif + +%if %{without bootstrap} +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 +%endif + + # Fix bad hardcoded path in build sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/dotnet-core-setup.*/src/corehost/common/pal.unix.cpp @@ -312,6 +348,12 @@ set -xe cat /etc/os-release +%if %{without bootstrap} +# We need to create a copy because we will mutate this +cp -a %{_libdir}/dotnet previously-built-dotnet +%endif + + export CFLAGS="%{dotnet_cflags}" export CXXFLAGS="%{dotnet_cflags}" export LDFLAGS="%{dotnet_ldflags}" @@ -321,8 +363,12 @@ export LLVM_HOME=/opt/rh/llvm-toolset-7.0/root/usr export CMAKE_PREFIX_PATH="%{_prefix}" VERBOSE=1 ./build.sh \ +%if %{without bootstrap} + --with-sdk previously-built-dotnet \ +%endif -- \ /v:n \ + /p:SkipPortableRuntimeBuild=true \ /p:LogVerbosity=n \ /p:MinimalConsoleLogOutput=false \ /p:ContinueOnPrebuiltBaselineError=true \ @@ -371,7 +417,7 @@ install src/dotnet-cli.*/scripts/register-completions.bash %{buildroot}/%{_root_ # TODO: the zsh completion script needs to be ported to use #compdef #install -dm 755 %%{buildroot}/%%{_datadir}/zsh/site-functions -#install src/dotnet-cli.*/scripts/register-completions.zsh %%{buildroot}/%%{_datadir}/zsh/site-functions/_dotnet +#install src/cli.*/scripts/register-completions.zsh %%{buildroot}/%%{_datadir}/zsh/site-functions/_dotnet install -dm 0755 %{buildroot}%{_bindir} ln -s ../../../../../../%{_libdir}/dotnet/dotnet %{buildroot}%{_bindir}/ @@ -383,6 +429,10 @@ echo "%{_libdir}/dotnet" >> install_location install -dm 0755 %{buildroot}%{_sysconfdir}/dotnet install install_location %{buildroot}%{_sysconfdir}/dotnet/ +install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts +install artifacts/x64/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/ + + # Check debug symbols in all elf objects. This is not in %%check # because native binaries are stripped by rpm-build after %%install. # So we need to do this check earlier. @@ -435,7 +485,23 @@ echo "Testing build results for debug symbols..." %{_libdir}/dotnet/sdk/%{sdk_version} %dir %{_libdir}/dotnet/packs +%files -n %{?scl_prefix}dotnet-sdk-3.1-source-built-artifacts +%dir %{_libdir}/dotnet +%{_libdir}/dotnet/source-built-artifacts + %changelog +* Fri Oct 08 2021 Omair Majid - 3.1.120-1 +- Update to .NET SDK 3.1.120 and Runtime 3.1.20 +- Resolves: RHBZ#2011819 + +* Mon Oct 04 2021 Omair Majid - 3.1.119-3 +- Bootstrap package; remove all prebuilt binaries +- Resolves: RHBZ#2006868 + +* Wed Sep 22 2021 Omair Majid - 3.1.119-2 +- Add initial support for bootstrapping and -source-built-artifacts subpackage +- Related: RHBZ#2006868 + * Fri Sep 03 2021 Omair Majid - 3.1.119-1 - Update to .NET SDK 3.1.119 and Runtime 3.1.19 - Resolves: RHBZ#2000312