From 36f91cf6b6ed99965623e988c6403fc2e387e87b Mon Sep 17 00:00:00 2001 From: Omair Majid Date: Jun 30 2019 02:58:33 +0000 Subject: [PATCH 1/3] Update to .NET Core 3.0 preview 6 --- diff --git a/core-setup-version-order.patch b/core-setup-version-order.patch deleted file mode 100644 index 500a519..0000000 --- a/core-setup-version-order.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/dir.props -+++ b/dir.props -@@ -52,8 +52,8 @@ - - - -- - -+ - - - diff --git a/corefx-add-fedora-runtime-ids.patch b/corefx-add-fedora-runtime-ids.patch deleted file mode 100644 index 1ba5738..0000000 --- a/corefx-add-fedora-runtime-ids.patch +++ /dev/null @@ -1,97 +0,0 @@ -diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json -index 64512cb82d..390182b140 100644 ---- a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json -+++ b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json -@@ -596,6 +596,46 @@ - "any", - "base" - ], -+ "fedora.30": [ -+ "fedora.30", -+ "fedora", -+ "linux", -+ "unix", -+ "any", -+ "base" -+ ], -+ "fedora.30-x64": [ -+ "fedora.30-x64", -+ "fedora.30", -+ "fedora-x64", -+ "fedora", -+ "linux-x64", -+ "linux", -+ "unix-x64", -+ "unix", -+ "any", -+ "base" -+ ], -+ "fedora.31": [ -+ "fedora.31", -+ "fedora", -+ "linux", -+ "unix", -+ "any", -+ "base" -+ ], -+ "fedora.31-x64": [ -+ "fedora.31-x64", -+ "fedora.31", -+ "fedora-x64", -+ "fedora", -+ "linux-x64", -+ "linux", -+ "unix-x64", -+ "unix", -+ "any", -+ "base" -+ ], - "freebsd": [ - "freebsd", - "unix", -diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.json b/pkg/Microsoft.NETCore.Platforms/runtime.json -index f9ee87f9fe..de2390eb62 100644 ---- a/pkg/Microsoft.NETCore.Platforms/runtime.json -+++ b/pkg/Microsoft.NETCore.Platforms/runtime.json -@@ -319,6 +319,28 @@ - "fedora-x64" - ] - }, -+ "fedora.30": { -+ "#import": [ -+ "fedora" -+ ] -+ }, -+ "fedora.30-x64": { -+ "#import": [ -+ "fedora.30", -+ "fedora-x64" -+ ] -+ }, -+ "fedora.31": { -+ "#import": [ -+ "fedora" -+ ] -+ }, -+ "fedora.31-x64": { -+ "#import": [ -+ "fedora.31", -+ "fedora-x64" -+ ] -+ }, - "freebsd": { - "#import": [ - "unix" -diff --git a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props -index 737c04e8f6..25c1509fdd 100644 ---- a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props -+++ b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props -@@ -43,7 +43,7 @@ - - linux - x64 -- 23;24;25;26;27;28;29 -+ 23;24;25;26;27;28;29;30;31 - false - - diff --git a/dotnet3.0.spec b/dotnet3.0.spec index de10fa9..3f21a94 100644 --- a/dotnet3.0.spec +++ b/dotnet3.0.spec @@ -14,41 +14,47 @@ # Filter flags not supported by clang/dotnet: # -fcf-protection is not supported by clang +# -fstack-clash-protection is not supported by clang # -specs= is not supported by clang %global dotnet_cflags %(echo %optflags | sed -e 's/-fcf-protection//' | 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.0.0-preview4-27615-11 -%global runtime_version 3.0.0-preview4-27615-11 -%global sdk_version 3.0.100-preview4-011223 +%global host_version 3.0.0-preview6-27804-01 +%global runtime_version 3.0.0-preview6-27804-01 +%global sdk_version 3.0.100-preview6-012264 %global host_rpm_version 3.0.0 %global runtime_rpm_version 3.0.0 -%global sdk_rpm_version 3.0.0 +%global sdk_rpm_version 3.0.100 + +%if 0%{?fedora} || 0%{?rhel} < 8 +%global use_bundled_libunwind 0 +%else +%global use_bundled_libunwind 1 +%endif + +%if 0%{?fedora} +%global runtime_id fedora.%{fedora}-x64 +%else +%global runtime_id rhel.%{rhel}-x64 +%endif Name: dotnet3.0 Version: %{sdk_rpm_version} -Release: 0.3.preview4%{?dist} +Release: 0.6.preview6%{?dist} Summary: .NET Core CLI tools and runtime License: MIT and ASL 2.0 and BSD URL: https://github.com/dotnet/ # The source is generated on a Fedora box via: -# - git clone https://github.com/dotnet/source-build -# - git checkout v%%{runtime_version} -# - (optional: set environment variables + tweak sources to build) -# - ./build-source-tarball.sh dotnet-%%{sdk_version} -# - tar cvzf dotnet-%%{runtime_version}.tar.gz dotnet-%%{runtime_version} - -Source0: dotnet-%{sdk_version}.tar.gz +# ./build-dotnet-tarball dotnet-v%%{runtime_version} +Source0: dotnet-v%{runtime_version}.tar.gz Source1: check-debug-symbols.py Source2: dotnet.sh Patch100: corefx-optflags-support.patch -Patch101: corefx-add-fedora-runtime-ids.patch Patch300: core-setup-do-not-strip.patch -Patch301: core-setup-version-order.patch Patch500: cli-telemetry-optout.patch @@ -56,29 +62,50 @@ ExclusiveArch: x86_64 BuildRequires: clang BuildRequires: cmake -BuildRequires: glibc-langpack-en +# Bootstrap SDK needs OpenSSL 1.0 to run, but we can build and then +# run with either OpenSSL 1.0 or 1.1 +%if 0%{?fedora} >= 26 || 0%{?rhel} >= 8 +BuildRequires: compat-openssl10 +%endif +BuildRequires: coreutils BuildRequires: git +BuildRequires: glibc-langpack-en BuildRequires: hostname BuildRequires: krb5-devel BuildRequires: libcurl-devel BuildRequires: libicu-devel +%if ! %{use_bundled_libunwind} BuildRequires: libunwind-devel +%endif BuildRequires: libuuid-devel BuildRequires: lldb-devel BuildRequires: llvm BuildRequires: lttng-ust-devel -BuildRequires: python +BuildRequires: openssl-devel +BuildRequires: python3 BuildRequires: strace BuildRequires: tar BuildRequires: zlib-devel -BuildRequires: openssl-devel -%if 0%{fedora} >= 26 -BuildRequires: compat-openssl10 -%endif + +%description +.NET Core is a fast, lightweight and modular platform for creating +cross platform applications that work on Linux, macOS and Windows. + +It particularly focuses on creating console applications, web +applications and micro-services. + +.NET Core contains a runtime conforming to .NET Standards a set of +framework libraries, an SDK containing compilers and a 'dotnet' +application to drive everything. + +%package -n dotnet + +Version: %{sdk_rpm_version} +Summary: .NET Core CLI tools and runtime Requires: dotnet-sdk-3.0%{?_isa} >= %{sdk_rpm_version}-%{release} -%description +%description -n dotnet .NET Core is a fast, lightweight and modular platform for creating cross platform applications that work on Linux, macOS and Windows. @@ -89,6 +116,7 @@ applications and micro-services. framework libraries, an SDK containing compilers and a 'dotnet' application to drive everything. + %package -n dotnet-host Version: %{host_rpm_version} @@ -133,6 +161,9 @@ Requires: dotnet-host-fxr-3.0%{?_isa} >= %{host_rpm_version}-%{release} # libicu is dlopen()ed Requires: libicu +%if %{use_bundled_libunwind} +Provides: bundled(libunwind) = 1.3 +%endif %description -n dotnet-runtime-3.0 The .NET Core runtime contains everything needed to run .NET Core applications. @@ -180,31 +211,34 @@ It particularly focuses on creating console applications, web applications and micro-services. %prep -%setup -q -n dotnet-%{sdk_version} +%setup -q -n dotnet-v%{runtime_version} # Fix bad hardcoded path in build -sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/core-setup/src/corehost/common/pal.unix.cpp +sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/core-setup.*/src/corehost/common/pal.unix.cpp # Disable warnings sed -i 's|skiptests|skiptests ignorewarnings|' repos/coreclr.proj -pushd src/corefx +pushd src/corefx.* %patch100 -p1 -%patch101 -p1 popd -pushd src/coreclr +pushd src/coreclr.* popd -pushd src/core-setup +pushd src/core-setup.* %patch300 -p1 -%patch301 -p1 popd -pushd src/cli +pushd src/cli.* %patch500 -p1 popd +%if %{use_bundled_libunwind} +# Use bundled libunwind +sed -i 's|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=FALSE|' repos/coreclr.proj +%endif + cat source-build-info.txt find -iname 'nuget.config' -exec echo {}: \; -exec cat {} \; -exec echo \; @@ -216,37 +250,50 @@ export LDFLAGS="%{dotnet_ldflags}" VERBOSE=1 ./build.sh \ /v:n \ - /p:MinimalConsoleLogOutput=false + /p:LogVerbosity=n \ + /p:MinimalConsoleLogOutput=false \ + /p:ContinueOnPrebuiltBaselineError=true \ + + %install -install -d -m 0755 %{buildroot}%{_libdir}/dotnet +install -dm 0755 %{buildroot}%{_libdir}/dotnet ls bin/x64/Release tar xf bin/x64/Release/dotnet-sdk-%{sdk_version}-*.tar.gz -C %{buildroot}%{_libdir}/dotnet/ -# Fix permissions on files -find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.props' -exec chmod -x {} \; -find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.targets' -exec chmod -x {} \; +# Install managed symbols +tar xf bin/x64/Release/runtime/dotnet-runtime-symbols-%{runtime_version}-%{runtime_id}.tar.gz \ + -C %{buildroot}/%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/ + +# Fix executable permissions on files find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.dll' -exec chmod -x {} \; +find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pdb' -exec chmod -x {} \; +find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.props' -exec chmod -x {} \; find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pubxml' -exec chmod -x {} \; +find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.targets' -exec chmod -x {} \; # Add ~/.dotnet/tools to $PATH for all users install -dm 0755 %{buildroot}%{_sysconfdir}/profile.d/ install %{SOURCE2} %{buildroot}%{_sysconfdir}/profile.d/ -install -dm 755 %{buildroot}/%{_datadir}/bash-completion/completions +install -dm 0755 %{buildroot}/%{_datadir}/bash-completion/completions # dynamic completion needs the file to be named the same as the base command -install src/cli/scripts/register-completions.bash %{buildroot}/%{_datadir}/bash-completion/completions/dotnet +install src/cli.*/scripts/register-completions.bash %{buildroot}/%{_datadir}/bash-completion/completions/dotnet # TODO: the zsh completion script needs to be ported to use #compdef #install -dm 755 %%{buildroot}/%%{_datadir}/zsh/site-functions #install src/cli/scripts/register-completions.zsh %%{buildroot}/%%{_datadir}/zsh/site-functions/_dotnet -install -d -m 0755 %{buildroot}%{_bindir} +install -dm 0755 %{buildroot}%{_bindir} ln -s %{_libdir}/dotnet/dotnet %{buildroot}%{_bindir}/ -install -d -m 0755 %{buildroot}%{_mandir}/man1/ +install -dm 0755 %{buildroot}%{_mandir}/man1/ find -iname 'dotnet*.1' -type f -exec cp {} %{buildroot}%{_mandir}/man1/ \; +echo "%{_libdir}/dotnet" >> install_location +install -dm 0755 %{buildroot}%{_sysconfdir}/dotnet +install install_location %{buildroot}%{_sysconfdir}/dotnet/ + # 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. @@ -256,7 +303,7 @@ echo "Testing build results for debug symbols..." %check %{buildroot}%{_libdir}/dotnet/dotnet --info -%files +%files -n dotnet # empty package useful for dependencies %files -n dotnet-host @@ -269,6 +316,7 @@ echo "Testing build results for debug symbols..." %license %{_libdir}/dotnet/ThirdPartyNotices.txt %doc %{_mandir}/man1/dotnet*.1.gz %{_sysconfdir}/profile.d/dotnet.sh +%{_sysconfdir}/dotnet %dir %{_datadir}/bash-completion %dir %{_datadir}/bash-completion/completions %{_datadir}/bash-completion/completions/dotnet @@ -289,11 +337,19 @@ echo "Testing build results for debug symbols..." %dir %{_libdir}/dotnet/sdk %{_libdir}/dotnet/sdk/%{sdk_version} %{_libdir}/dotnet/packs/Microsoft.AspNetCore.App.Ref +%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id} %{_libdir}/dotnet/packs/Microsoft.NETCore.App.Ref %{_libdir}/dotnet/packs/Microsoft.WindowsDesktop.App.Ref -%{_libdir}/dotnet/packs/runtime.fedora.28-x64.Microsoft.NETCore.DotNetAppHost +%{_libdir}/dotnet/packs/NETStandard.Library.Ref %changelog +* Wed Jun 26 2019 omajid - 3.0.0-0.4.preview4 +- Update to .NET Core Runtime 3.0.0-preview6-27804-01 and SDK 3.0.100-preview6-012264 +- Set dotnet installation location in /etc/dotnet/install_location +- Update targetting packs +- Install managed symbols +- Completely conditionalize libunwind bundling + * Tue May 07 2019 Omair Majid - 3.0.0-0.3.preview4 - Update to .NET Core 3.0 preview 4 diff --git a/update-release b/update-release index ab518a6..be3a0a0 100755 --- a/update-release +++ b/update-release @@ -1,14 +1,14 @@ #!/bin/bash # Usage: -# ./update-release runtime-version sdk-version bug-id +# ./update-release runtime-version sdk-version set -euo pipefail IFS=$'\n\t' print_usage() { echo " Usage:" - echo " ./update-release runtime-version sdk-version bug-id" + echo " ./update-release runtime-version sdk-version" } positional_args=() @@ -26,7 +26,7 @@ while [[ "$#" -gt 0 ]]; do esac done -spec_file=dotnet.spec +spec_file=dotnet3.0.spec runtime_version=${positional_args[0]:-} if [[ -z ${runtime_version} ]]; then @@ -41,12 +41,6 @@ if [[ -z ${sdk_version} ]]; then exit 1 fi -bug_id=${positional_args[2]:-} -if [[ -z ${bug_id} ]]; then - echo "error: missing bug id" - exit 1 -fi - if [[ ! -f "dotnet-v${runtime_version}.tar.gz" ]] && [[ -f "dotnet-${runtime_version}.tar.gz" ]]; then ./rename-tarball "dotnet-${runtime_version}.tar.gz" "dotnet-v${runtime_version}.tar.gz" fi @@ -57,12 +51,11 @@ fi set -x -sed -i -E "s|^%global host_version [[:digit:]]\.[[:digit:]]\.[[:digit:]]+|%global host_version ${host_version}|" "$spec_file" -sed -i -E "s|^%global runtime_version [[:digit:]]\.[[:digit:]]\.[[:digit:]]+|%global runtime_version ${runtime_version}|" "$spec_file" +sed -i -E "s|^%global host_version [[:digit:]]\.[[:digit:]]\.[[:digit:]]|%global host_version ${host_version}|" "$spec_file" +sed -i -E "s|^%global runtime_version [[:digit:]]\.[[:digit:]]\.[[:digit:]]|%global runtime_version ${runtime_version}|" "$spec_file" sed -i -E "s|^%global sdk_version [[:digit:]]\.[[:digit:]]\.[[:digit:]][[:digit:]][[:digit:]]|%global sdk_version ${sdk_version}|" "$spec_file" -comment="Update to .NET Core Runtime ${runtime_version} and SDK ${sdk_version} -- Resolves: RHBZ#$bug_id" +comment="Update to .NET Core Runtime ${runtime_version} and SDK ${sdk_version}" rpmdev-bumpspec --comment="$comment" $spec_file From ae7b29f8681db39f1662b7d9918ac602f866d8cc Mon Sep 17 00:00:00 2001 From: Omair Majid Date: Sep 16 2019 04:06:22 +0000 Subject: [PATCH 2/3] Update to .NET Core 3.0.0 Preview 9 --- diff --git a/dotnet3.0.spec b/dotnet3.0.spec index 3f21a94..1436c21 100644 --- a/dotnet3.0.spec +++ b/dotnet3.0.spec @@ -13,17 +13,24 @@ %global __requires_exclude ^(%{privlibs})\\.so # Filter flags not supported by clang/dotnet: -# -fcf-protection is not supported by clang # -fstack-clash-protection is not supported by clang # -specs= is not supported by clang -%global dotnet_cflags %(echo %optflags | sed -e 's/-fcf-protection//' | sed -e 's/-fstack-clash-protection//' | sed -re 's/-specs=[^ ]*//g') +%global dotnet_cflags %(echo %optflags | sed -e 's/-fstack-clash-protection//' | sed -re 's/-specs=[^ ]*//g') +%if 0%{?fedora} < 30 +# on Fedora 29, clang, -fcf-protection and binutils interact in strage ways leading to +# "" errors. +%global dotnet_cflags %(echo %dotnet_cflags | sed -e 's/ -fcf-protection//') +%endif %global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g') -%global host_version 3.0.0-preview6-27804-01 -%global runtime_version 3.0.0-preview6-27804-01 -%global sdk_version 3.0.100-preview6-012264 +%global host_version 3.0.0-preview9-19423-09 +%global runtime_version 3.0.0-preview9-19423-09 +%global aspnetcore_runtime_version 3.0.0-preview9.19424.4 +%global sdk_version 3.0.100-preview9-014004 +%global templates_version 3.0.0-preview9-014004 %global host_rpm_version 3.0.0 +%global aspnetcore_runtime_rpm_version 3.0.0 %global runtime_rpm_version 3.0.0 %global sdk_rpm_version 3.0.100 @@ -41,7 +48,7 @@ Name: dotnet3.0 Version: %{sdk_rpm_version} -Release: 0.6.preview6%{?dist} +Release: 0.15.preview9%{?dist} Summary: .NET Core CLI tools and runtime License: MIT and ASL 2.0 and BSD URL: https://github.com/dotnet/ @@ -98,6 +105,7 @@ applications and micro-services. framework libraries, an SDK containing compilers and a 'dotnet' application to drive everything. + %package -n dotnet Version: %{sdk_rpm_version} @@ -132,7 +140,8 @@ cross platform applications that work on Linux, Mac and Windows. It particularly focuses on creating console applications, web applications and micro-services. -%package -n dotnet-host-fxr-3.0 + +%package -n dotnet-hostfxr-3.0 Version: %{host_rpm_version} Summary: .NET Core command line host resolver @@ -141,7 +150,10 @@ Summary: .NET Core command line host resolver # provided by this package, or from a newer version of .NET Core Requires: dotnet-host%{?_isa} >= %{host_rpm_version}-%{release} -%description -n dotnet-host-fxr-3.0 +Obsoletes: dotnet-host-fxr-3.0 < 3.0.100-0.13 +Provides: dotnet-host-fxr-3.0 = %{host_rpm_version}-%{release} + +%description -n dotnet-hostfxr-3.0 The .NET Core host resolver contains the logic to resolve and select the right version of the .NET Core SDK or runtime to use. @@ -151,12 +163,13 @@ cross platform applications that work on Linux, Mac and Windows. It particularly focuses on creating console applications, web applications and micro-services. + %package -n dotnet-runtime-3.0 Version: %{runtime_rpm_version} Summary: NET Core 3.0 runtime -Requires: dotnet-host-fxr-3.0%{?_isa} >= %{host_rpm_version}-%{release} +Requires: dotnet-hostfxr-3.0%{?_isa} >= %{host_rpm_version}-%{release} # libicu is dlopen()ed Requires: libicu @@ -176,31 +189,64 @@ cross platform applications that work on Linux, Mac and Windows. It particularly focuses on creating console applications, web applications and micro-services. -%package -n dotnet-sdk-3.0 + +%package -n aspnetcore-runtime-3.0 + +Version: %{aspnetcore_runtime_rpm_version} +Summary: ASP.NET Core 3.0 runtime + +Requires: dotnet-runtime-3.0%{?_isa} >= %{runtime_rpm_version}-%{release} + +%description -n aspnetcore-runtime-3.0 +The ASP.NET Core runtime contains everything needed to run .NET Core +web applications. It includes a high performance Virtual Machine as +well as the framework libraries used by .NET Core applications. + +ASP.NET Core is a fast, lightweight and modular platform for creating +cross platform web applications that work on Linux, Mac and Windows. + +It particularly focuses on creating console applications, web +applications and micro-services. + + +%package -n dotnet-templates-3.0 Version: %{sdk_rpm_version} -Summary: .NET Core 3.0 Software Development Kit +Summary: .NET Core 3.0 templates -Requires: dotnet-sdk-3.0.1xx%{?_isa} >= %{sdk_rpm_version}-%{release} +# Theoretically any version of the host should work. But lets aim for the one +# provided by this package, or from a newer version of .NET Core +Requires: dotnet-host%{?_isa} >= %{host_rpm_version}-%{release} -%description -n dotnet-sdk-3.0 -The .NET Core SDK is a collection of command line applications to -create, build, publish and run .NET Core applications. +%description -n dotnet-templates-3.0 +This package contains templates used by the .NET Core SDK. -.NET Core is a fast, lightweight and modular platform for creating -cross platform applications that work on Linux, Mac and Windows. +ASP.NET Core is a fast, lightweight and modular platform for creating +cross platform web applications that work on Linux, Mac and Windows. It particularly focuses on creating console applications, web applications and micro-services. -%package -n dotnet-sdk-3.0.1xx + +%package -n dotnet-sdk-3.0 Version: %{sdk_rpm_version} -Summary: .NET Core 3.0.1xx Software Development Kit +Summary: .NET Core 3.0 Software Development Kit Requires: dotnet-runtime-3.0%{?_isa} >= %{runtime_rpm_version}-%{release} +Requires: aspnetcore-runtime-3.0%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release} + +Requires: dotnet-apphost-pack-3.0%{?_isa} >= %{sdk_rpm_version}-%{release} +Requires: dotnet-targeting-pack-3.0%{?_isa} >= %{sdk_rpm_version}-%{release} +Requires: aspnetcore-targeting-pack-3.0%{?_isa} >= %{sdk_rpm_version}-%{release} +Requires: netstandard-targeting-pack-2.1%{?_isa} >= %{sdk_rpm_version}-%{release} + +Requires: dotnet-templates-3.0%{?_isa} >= %{sdk_rpm_version}-%{release} + +Obsoletes: dotnet-sdk-3.0.1xx < 3.0.100-0.7 +Provides: dotnet-sdk-3.0.1xx = %{sdk_rpm_version}-%{release} -%description -n dotnet-sdk-3.0.1xx +%description -n dotnet-sdk-3.0 The .NET Core SDK is a collection of command line applications to create, build, publish and run .NET Core applications. @@ -210,6 +256,31 @@ cross platform applications that work on Linux, Mac and Windows. It particularly focuses on creating console applications, web applications and micro-services. + +%define dotnet_targeting_pack() %{expand: +%package -n %{1} + +Version: %{2} +Summary: Targeting Pack for %{3} %{4} + +Requires: dotnet-host + +%description -n %{1} +This package provides a targetting pack for %{3} %{4} +that allows developers to compile against and target %{3} %{4} +applications using the .NET Core SDK. + +%files -n %{1} +%dir %{_libdir}/dotnet/packs +%{_libdir}/dotnet/packs/%{3}* +} + +%dotnet_targeting_pack dotnet-apphost-pack-3.0 %{runtime_rpm_version} Microsoft.NETCore.App.Host.%{runtime_id} 3.0 +%dotnet_targeting_pack dotnet-targeting-pack-3.0 %{runtime_rpm_version} Microsoft.NETCore.App 3.0 +%dotnet_targeting_pack aspnetcore-targeting-pack-3.0 %{aspnetcore_runtime_rpm_version} Microsoft.AspNetCore.App 3.0 +%dotnet_targeting_pack netstandard-targeting-pack-2.1 %{sdk_rpm_version} NETStandard.Library 2.1 + + %prep %setup -q -n dotnet-v%{runtime_version} @@ -243,7 +314,10 @@ cat source-build-info.txt find -iname 'nuget.config' -exec echo {}: \; -exec cat {} \; -exec echo \; + %build +cat /etc/os-release + export CFLAGS="%{dotnet_cflags}" export CXXFLAGS="%{dotnet_cflags}" export LDFLAGS="%{dotnet_ldflags}" @@ -259,7 +333,7 @@ VERBOSE=1 ./build.sh \ %install install -dm 0755 %{buildroot}%{_libdir}/dotnet ls bin/x64/Release -tar xf bin/x64/Release/dotnet-sdk-%{sdk_version}-*.tar.gz -C %{buildroot}%{_libdir}/dotnet/ +tar xf bin/x64/Release/dotnet-sdk-%{sdk_version}-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/ # Install managed symbols tar xf bin/x64/Release/runtime/dotnet-runtime-symbols-%{runtime_version}-%{runtime_id}.tar.gz \ @@ -300,9 +374,11 @@ install install_location %{buildroot}%{_sysconfdir}/dotnet/ echo "Testing build results for debug symbols..." %{SOURCE1} -v %{buildroot}%{_libdir}/dotnet/ + %check %{buildroot}%{_libdir}/dotnet/dotnet --info + %files -n dotnet # empty package useful for dependencies @@ -321,7 +397,7 @@ echo "Testing build results for debug symbols..." %dir %{_datadir}/bash-completion/completions %{_datadir}/bash-completion/completions/dotnet -%files -n dotnet-host-fxr-3.0 +%files -n dotnet-hostfxr-3.0 %dir %{_libdir}/dotnet/host/fxr %{_libdir}/dotnet/host/fxr/%{host_version} @@ -330,20 +406,42 @@ echo "Testing build results for debug symbols..." %dir %{_libdir}/dotnet/shared/Microsoft.NETCore.App %{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version} -%files -n dotnet-sdk-3.0 -# empty package useful for dependencies +%files -n aspnetcore-runtime-3.0 +%dir %{_libdir}/dotnet/shared +%dir %{_libdir}/dotnet/shared/Microsoft.AspNetCore.App +%{_libdir}/dotnet/shared/Microsoft.AspNetCore.App/%{aspnetcore_runtime_version} + +%files -n dotnet-templates-3.0 +%dir %{_libdir}/dotnet/templates +%{_libdir}/dotnet/templates/%{templates_version} -%files -n dotnet-sdk-3.0.1xx +%files -n dotnet-sdk-3.0 %dir %{_libdir}/dotnet/sdk %{_libdir}/dotnet/sdk/%{sdk_version} -%{_libdir}/dotnet/packs/Microsoft.AspNetCore.App.Ref -%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id} -%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Ref -%{_libdir}/dotnet/packs/Microsoft.WindowsDesktop.App.Ref -%{_libdir}/dotnet/packs/NETStandard.Library.Ref +%dir %{_libdir}/dotnet/packs %changelog -* Wed Jun 26 2019 omajid - 3.0.0-0.4.preview4 +* Mon Sep 16 2019 Omair Majid - 3.0.100-0.15.preview9 +- Update to .NET Core Runtime 3.0.0-preview 9 and SDK 3.0.100-preview9 + +* Mon Aug 19 2019 Omair Majid - 3.0.100-0.11.preview8 +- Update to .NET Core Runtime 3.0.0-preview8-28405-07 and SDK + 3.0.100-preview8-013656 + +* Tue Jul 30 2019 Omair Majid - 3.0.100-0.9.preview7 +- Update to .NET Core Runtime 3.0.0-preview7-27912-14 and SDK + 3.0.100-preview7-012821 + +* Fri Jul 26 2019 Omair Majid - 3.0.100-0.8.preview7 +- Update to .NET Core Runtime 3.0.0-preview7-27902-19 and SDK + 3.0.100-preview7-012802 + +* Wed Jun 26 2019 Omair Majid - 3.0.0-0.7.preview6 +- Obsolete dotnet-sdk-3.0.1xx +- Add supackages for targeting packs +- Add -fcf-protection to CFLAGS + +* Wed Jun 26 2019 Omair Majid - 3.0.0-0.6.preview6 - Update to .NET Core Runtime 3.0.0-preview6-27804-01 and SDK 3.0.100-preview6-012264 - Set dotnet installation location in /etc/dotnet/install_location - Update targetting packs From 146bd5812d9383bd365869ded6c940f436ec728f Mon Sep 17 00:00:00 2001 From: Omair Majid Date: Sep 17 2019 22:36:59 +0000 Subject: [PATCH 3/3] Fix broken dependencies - Fix files duplicated between dotnet-apphost-pack-3.0 and dotnet-targeting-pack-3.0 - Fix dependencies between .NET SDK and the targeting pack --- diff --git a/dotnet3.0.spec b/dotnet3.0.spec index 1436c21..9402ba4 100644 --- a/dotnet3.0.spec +++ b/dotnet3.0.spec @@ -48,7 +48,7 @@ Name: dotnet3.0 Version: %{sdk_rpm_version} -Release: 0.15.preview9%{?dist} +Release: 0.16.preview9%{?dist} Summary: .NET Core CLI tools and runtime License: MIT and ASL 2.0 and BSD URL: https://github.com/dotnet/ @@ -236,9 +236,9 @@ Summary: .NET Core 3.0 Software Development Kit Requires: dotnet-runtime-3.0%{?_isa} >= %{runtime_rpm_version}-%{release} Requires: aspnetcore-runtime-3.0%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release} -Requires: dotnet-apphost-pack-3.0%{?_isa} >= %{sdk_rpm_version}-%{release} -Requires: dotnet-targeting-pack-3.0%{?_isa} >= %{sdk_rpm_version}-%{release} -Requires: aspnetcore-targeting-pack-3.0%{?_isa} >= %{sdk_rpm_version}-%{release} +Requires: dotnet-apphost-pack-3.0%{?_isa} >= %{runtime_rpm_version}-%{release} +Requires: dotnet-targeting-pack-3.0%{?_isa} >= %{runtime_rpm_version}-%{release} +Requires: aspnetcore-targeting-pack-3.0%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release} Requires: netstandard-targeting-pack-2.1%{?_isa} >= %{sdk_rpm_version}-%{release} Requires: dotnet-templates-3.0%{?_isa} >= %{sdk_rpm_version}-%{release} @@ -272,13 +272,13 @@ applications using the .NET Core SDK. %files -n %{1} %dir %{_libdir}/dotnet/packs -%{_libdir}/dotnet/packs/%{3}* +%{_libdir}/dotnet/packs/%{5} } -%dotnet_targeting_pack dotnet-apphost-pack-3.0 %{runtime_rpm_version} Microsoft.NETCore.App.Host.%{runtime_id} 3.0 -%dotnet_targeting_pack dotnet-targeting-pack-3.0 %{runtime_rpm_version} Microsoft.NETCore.App 3.0 -%dotnet_targeting_pack aspnetcore-targeting-pack-3.0 %{aspnetcore_runtime_rpm_version} Microsoft.AspNetCore.App 3.0 -%dotnet_targeting_pack netstandard-targeting-pack-2.1 %{sdk_rpm_version} NETStandard.Library 2.1 +%dotnet_targeting_pack dotnet-apphost-pack-3.0 %{runtime_rpm_version} Microsoft.NETCore.App 3.0 Microsoft.NETCore.App.Host.%{runtime_id} +%dotnet_targeting_pack dotnet-targeting-pack-3.0 %{runtime_rpm_version} Microsoft.NETCore.App 3.0 Microsoft.NETCore.App.Ref +%dotnet_targeting_pack aspnetcore-targeting-pack-3.0 %{aspnetcore_runtime_rpm_version} Microsoft.AspNetCore.App 3.0 Microsoft.AspNetCore.App.Ref +%dotnet_targeting_pack netstandard-targeting-pack-2.1 %{sdk_rpm_version} NETStandard.Library 2.1 NETStandard.Library.Ref %prep @@ -421,6 +421,10 @@ echo "Testing build results for debug symbols..." %dir %{_libdir}/dotnet/packs %changelog +* Tue Sep 17 2019 Omair Majid - 3.0.100-0.16.preview9 +- Fix files duplicated between dotnet-apphost-pack-3.0 and dotnet-targeting-pack-3.0 +- Fix dependencies between .NET SDK and the targeting packs + * Mon Sep 16 2019 Omair Majid - 3.0.100-0.15.preview9 - Update to .NET Core Runtime 3.0.0-preview 9 and SDK 3.0.100-preview9