Blame SPECS/dotnet3.1.spec

debe55
%bcond_with bootstrap
debe55
debe55
# Avoid provides/requires from private libraries
debe55
%global privlibs             libhostfxr
debe55
%global privlibs %{privlibs}|libclrjit
debe55
%global privlibs %{privlibs}|libcoreclr
debe55
%global privlibs %{privlibs}|libcoreclrtraceptprovider
debe55
%global privlibs %{privlibs}|libdbgshim
debe55
%global privlibs %{privlibs}|libhostpolicy
debe55
%global privlibs %{privlibs}|libmscordaccore
debe55
%global privlibs %{privlibs}|libmscordbi
debe55
%global privlibs %{privlibs}|libsos
debe55
%global privlibs %{privlibs}|libsosplugin
debe55
%global __provides_exclude ^(%{privlibs})\\.so
debe55
%global __requires_exclude ^(%{privlibs})\\.so
debe55
debe55
# LTO triggers a compilation error for a source level issue.  Given that LTO should not
debe55
# change the validity of any given source and the nature of the error (undefined enum), I
debe55
# suspect a generator program is mis-behaving in some way.  This needs further debugging,
debe55
# until that's done, disable LTO.  This has to happen before setting the flags below.
debe55
%define _lto_cflags %{nil}
debe55
debe55
debe55
%global host_version 3.1.18
debe55
%global runtime_version 3.1.18
debe55
%global aspnetcore_runtime_version %{runtime_version}
debe55
%global sdk_version 3.1.118
debe55
# upstream can update releases without revving the SDK version so these don't always match
debe55
%global src_version %{sdk_version}
debe55
%global templates_version %(echo %{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
debe55
debe55
%global host_rpm_version %{host_version}
debe55
%global aspnetcore_runtime_rpm_version %{aspnetcore_runtime_version}
debe55
%global runtime_rpm_version %{runtime_version}
debe55
%global sdk_rpm_version %{sdk_version}
debe55
debe55
%if 0%{?fedora} || 0%{?rhel} < 8
debe55
%global use_bundled_libunwind 0
debe55
%else
debe55
%global use_bundled_libunwind 1
debe55
%endif
debe55
debe55
%ifarch aarch64
debe55
%global use_bundled_libunwind 1
debe55
%endif
debe55
debe55
%ifarch x86_64
debe55
%global runtime_arch x64
debe55
%endif
debe55
%ifarch aarch64
debe55
%global runtime_arch arm64
debe55
%endif
debe55
debe55
%{!?runtime_id:%global runtime_id %(. /etc/os-release ; echo "${ID}.${VERSION_ID%%.*}")-%{runtime_arch}}
debe55
debe55
Name:           dotnet3.1
debe55
Version:        %{sdk_rpm_version}
debe55
Release:        1%{?dist}
debe55
Summary:        .NET Core Runtime and SDK
debe55
License:        MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
debe55
URL:            https://github.com/dotnet/
debe55
debe55
# The source is generated on a Fedora box via:
debe55
# ./build-dotnet-tarball v%%{src_version}-SDK
debe55
Source0:        dotnet-v%{src_version}-SDK.tar.gz
debe55
Source1:        check-debug-symbols.py
debe55
Source2:        dotnet.sh.in
debe55
debe55
Patch1:         source-build-warnings-are-not-errors.patch
debe55
Patch2:         source-build-ilasm-ildasm-path-fix.patch
debe55
debe55
# Fix building with our additional CFLAGS/CXXFLAGS/LDFLAGS
debe55
Patch100:       corefx-optflags-support.patch
debe55
debe55
# Add some support for cgroupv2 in corefx
debe55
# All these patches are upstreamed for 5.0
debe55
Patch101:       corefx-39686-cgroupv2-01.patch
debe55
Patch102:       corefx-39686-cgroupv2-02.patch
debe55
Patch103:       corefx-39633-cgroupv2-mountpoints.patch
debe55
debe55
# https://github.com/dotnet/corefx/pull/43078
debe55
Patch106:       corefx-openssl-0001-Use-EVP_PKEY-for-RSA-key-generation.patch
debe55
Patch107:       corefx-openssl-0002-Use-EVP_PKEY-for-RSA-Decrypt.patch
debe55
Patch108:       corefx-openssl-0003-Use-EVP_PKEY-for-RSA-signing-operations.patch
debe55
Patch109:       corefx-openssl-0004-Support-compiling-against-OpenSSL-3-headers.patch
debe55
Patch110:       corefx-openssl-0005-Make-portable-builds-work-across-OpenSSL-1.0.2-1.1.1.patch
debe55
Patch111:       corefx-openssl-0006-Fix-merge-issues-and-make-the-build-work.patch
debe55
Patch112:       corefx-openssl-0007-OpenSSL3-Register-legacy-algorithms-when-needed.patch
debe55
Patch113:       corefx-openssl-0008-Work-around-OpenSSL-3.0-ciphers-not-restoring-origin.patch
debe55
Patch114:       corefx-openssl-0009-Use-1-instead-of-true-for-more-portable-code.patch
debe55
Patch115:       corefx-openssl-0010-Stop-using-ERR_GET_FUNC-since-it-has-been-removed-in.patch
debe55
Patch116:       corefx-openssl-0011-Adjust-crypto-shim-for-functions-renamed-for-OSSL3-b.patch
debe55
debe55
# Fix build with clang 10; Already applied at tarball-build time
debe55
# Patch200:       coreclr-clang10.patch
debe55
# Fix build on recent versions of gcc/clang
debe55
# https://github.com/libunwind/libunwind/pull/166
debe55
# Already applied
debe55
#Patch201:       coreclr-libunwind-fno-common.patch
debe55
debe55
# Disable telemetry by default; make it opt-in
debe55
Patch500:       cli-telemetry-optout.patch
debe55
debe55
debe55
%if 0%{?fedora} > 32 || 0%{?rhel} > 8
debe55
ExclusiveArch:  aarch64 x86_64
debe55
%else
debe55
ExclusiveArch:  x86_64
debe55
%endif
debe55
debe55
BuildRequires:  clang
debe55
BuildRequires:  cmake
debe55
BuildRequires:  coreutils
debe55
%if %{without bootstrap}
debe55
BuildRequires:  dotnet-build-reference-packages
debe55
BuildRequires:  dotnet-sdk-3.1
debe55
BuildRequires:  dotnet-sdk-3.1-source-built-artifacts
debe55
%endif
debe55
BuildRequires:  findutils
debe55
BuildRequires:  git
debe55
%if 0%{?fedora} || 0%{?rhel} > 7
debe55
BuildRequires:  glibc-langpack-en
debe55
%endif
debe55
BuildRequires:  hostname
debe55
BuildRequires:  krb5-devel
debe55
BuildRequires:  libcurl-devel
debe55
BuildRequires:  libicu-devel
debe55
%if ! %{use_bundled_libunwind}
debe55
BuildRequires:  libunwind-devel
debe55
%endif
debe55
BuildRequires:  lldb-devel
debe55
BuildRequires:  llvm
debe55
BuildRequires:  lttng-ust-devel
debe55
BuildRequires:  make
debe55
BuildRequires:  openssl-devel
debe55
%if 0%{?rhel} > 8
debe55
BuildRequires:  compat-openssl11
debe55
%endif
debe55
BuildRequires:  python3
debe55
BuildRequires:  systemtap-sdt-devel
debe55
BuildRequires:  tar
debe55
BuildRequires:  zlib-devel
debe55
debe55
%description
debe55
.NET Core is a fast, lightweight and modular platform for creating
debe55
cross platform applications that work on Linux, macOS and Windows.
debe55
debe55
It particularly focuses on creating console applications, web
debe55
applications and micro-services.
debe55
debe55
.NET Core contains a runtime conforming to .NET Standards a set of
debe55
framework libraries, an SDK containing compilers and a 'dotnet'
debe55
application to drive everything.
debe55
debe55
debe55
%package -n dotnet
debe55
debe55
Version:        %{sdk_rpm_version}
debe55
Summary:        .NET Core CLI tools and runtime
debe55
debe55
Requires:       dotnet-sdk-3.1%{?_isa} >= %{sdk_rpm_version}-%{release}
debe55
debe55
%description -n dotnet
debe55
.NET Core is a fast, lightweight and modular platform for creating
debe55
cross platform applications that work on Linux, macOS and Windows.
debe55
debe55
It particularly focuses on creating console applications, web
debe55
applications and micro-services.
debe55
debe55
.NET Core contains a runtime conforming to .NET Standards a set of
debe55
framework libraries, an SDK containing compilers and a 'dotnet'
debe55
application to drive everything.
debe55
debe55
debe55
%package -n dotnet-host
debe55
debe55
Version:        %{host_rpm_version}
debe55
Summary:        .NET command line launcher
debe55
debe55
%description -n dotnet-host
debe55
The .NET Core host is a command line program that runs a standalone
debe55
.NET core application or launches the SDK.
debe55
debe55
.NET Core is a fast, lightweight and modular platform for creating
debe55
cross platform applications that work on Linux, Mac and Windows.
debe55
debe55
It particularly focuses on creating console applications, web
debe55
applications and micro-services.
debe55
debe55
debe55
%package -n dotnet-hostfxr-3.1
debe55
debe55
Version:        %{host_rpm_version}
debe55
Summary:        .NET Core command line host resolver
debe55
debe55
# Theoretically any version of the host should work. But lets aim for the one
debe55
# provided by this package, or from a newer version of .NET Core
debe55
Requires:       dotnet-host%{?_isa} >= %{host_rpm_version}-%{release}
debe55
debe55
%description -n dotnet-hostfxr-3.1
debe55
The .NET Core host resolver contains the logic to resolve and select
debe55
the right version of the .NET Core SDK or runtime to use.
debe55
debe55
.NET Core is a fast, lightweight and modular platform for creating
debe55
cross platform applications that work on Linux, Mac and Windows.
debe55
debe55
It particularly focuses on creating console applications, web
debe55
applications and micro-services.
debe55
debe55
debe55
%package -n dotnet-runtime-3.1
debe55
debe55
Version:        %{runtime_rpm_version}
debe55
Summary:        NET Core 3.1 runtime
debe55
debe55
Requires:       dotnet-hostfxr-3.1%{?_isa} >= %{host_rpm_version}-%{release}
debe55
debe55
# libicu is dlopen()ed
debe55
Requires:       libicu%{?_isa}
debe55
debe55
%if %{use_bundled_libunwind}
debe55
Provides: bundled(libunwind) = 1.3
debe55
%endif
debe55
debe55
%description -n dotnet-runtime-3.1
debe55
The .NET Core runtime contains everything needed to run .NET Core applications.
debe55
It includes a high performance Virtual Machine as well as the framework
debe55
libraries used by .NET Core applications.
debe55
debe55
.NET Core is a fast, lightweight and modular platform for creating
debe55
cross platform applications that work on Linux, Mac and Windows.
debe55
debe55
It particularly focuses on creating console applications, web
debe55
applications and micro-services.
debe55
debe55
debe55
%package -n aspnetcore-runtime-3.1
debe55
debe55
Version:        %{aspnetcore_runtime_rpm_version}
debe55
Summary:        ASP.NET Core 3.1 runtime
debe55
debe55
Requires:       dotnet-runtime-3.1%{?_isa} >= %{runtime_rpm_version}-%{release}
debe55
debe55
%description -n aspnetcore-runtime-3.1
debe55
The ASP.NET Core runtime contains everything needed to run .NET Core
debe55
web applications. It includes a high performance Virtual Machine as
debe55
well as the framework libraries used by .NET Core applications.
debe55
debe55
ASP.NET Core is a fast, lightweight and modular platform for creating
debe55
cross platform web applications that work on Linux, Mac and Windows.
debe55
debe55
It particularly focuses on creating console applications, web
debe55
applications and micro-services.
debe55
debe55
debe55
%package -n dotnet-templates-3.1
debe55
debe55
Version:        %{sdk_rpm_version}
debe55
Summary:        .NET Core 3.1 templates
debe55
debe55
# Theoretically any version of the host should work. But lets aim for the one
debe55
# provided by this package, or from a newer version of .NET Core
debe55
Requires:       dotnet-host%{?_isa} >= %{host_rpm_version}-%{release}
debe55
debe55
%description -n dotnet-templates-3.1
debe55
This package contains templates used by the .NET Core SDK.
debe55
debe55
ASP.NET Core is a fast, lightweight and modular platform for creating
debe55
cross platform web applications that work on Linux, Mac and Windows.
debe55
debe55
It particularly focuses on creating console applications, web
debe55
applications and micro-services.
debe55
debe55
debe55
%package -n dotnet-sdk-3.1
debe55
debe55
Version:        %{sdk_rpm_version}
debe55
Summary:        .NET Core 3.1 Software Development Kit
debe55
debe55
Provides:       bundled(js-jquery)
debe55
Provides:       bundled(npm)
debe55
debe55
Requires:       dotnet-runtime-3.1%{?_isa} >= %{runtime_rpm_version}-%{release}
debe55
Requires:       aspnetcore-runtime-3.1%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release}
debe55
debe55
Requires:       dotnet-apphost-pack-3.1%{?_isa} >= %{runtime_rpm_version}-%{release}
debe55
Requires:       dotnet-targeting-pack-3.1%{?_isa} >= %{runtime_rpm_version}-%{release}
debe55
Requires:       aspnetcore-targeting-pack-3.1%{?_isa} >= %{aspnetcore_runtime_rpm_version}-%{release}
debe55
Requires:       netstandard-targeting-pack-2.1%{?_isa} >= %{sdk_rpm_version}-%{release}
debe55
debe55
Requires:       dotnet-templates-3.1%{?_isa} >= %{sdk_rpm_version}-%{release}
debe55
debe55
%description -n dotnet-sdk-3.1
debe55
The .NET Core SDK is a collection of command line applications to
debe55
create, build, publish and run .NET Core applications.
debe55
debe55
.NET Core is a fast, lightweight and modular platform for creating
debe55
cross platform applications that work on Linux, Mac and Windows.
debe55
debe55
It particularly focuses on creating console applications, web
debe55
applications and micro-services.
debe55
debe55
debe55
%global dotnet_targeting_pack() %{expand:
debe55
%package -n %{1}
debe55
debe55
Version:        %{2}
debe55
Summary:        Targeting Pack for %{3} %{4}
debe55
debe55
Requires:       dotnet-host%{?_isa}
debe55
debe55
%description -n %{1}
debe55
This package provides a targeting pack for %{3} %{4}
debe55
that allows developers to compile against and target %{3} %{4}
debe55
applications using the .NET Core SDK.
debe55
debe55
%files -n %{1}
debe55
%dir %{_libdir}/dotnet/packs
debe55
%{_libdir}/dotnet/packs/%{5}
debe55
}
debe55
debe55
%dotnet_targeting_pack dotnet-apphost-pack-3.1 %{runtime_rpm_version} Microsoft.NETCore.App 3.1 Microsoft.NETCore.App.Host.%{runtime_id}
debe55
%dotnet_targeting_pack dotnet-targeting-pack-3.1 %{runtime_rpm_version} Microsoft.NETCore.App 3.1 Microsoft.NETCore.App.Ref
debe55
%dotnet_targeting_pack aspnetcore-targeting-pack-3.1 %{aspnetcore_runtime_rpm_version} Microsoft.AspNetCore.App 3.1 Microsoft.AspNetCore.App.Ref
debe55
%dotnet_targeting_pack netstandard-targeting-pack-2.1 %{sdk_rpm_version} NETStandard.Library 2.1 NETStandard.Library.Ref
debe55
debe55
debe55
%package -n dotnet-sdk-3.1-source-built-artifacts
debe55
debe55
Version:        %{sdk_rpm_version}
debe55
Summary:        Internal package for building .NET Core 3.1 Software Development Kit
debe55
debe55
%description -n dotnet-sdk-3.1-source-built-artifacts
debe55
The .NET Core source-built archive is a collection of packages needed
debe55
to build the .NET Core SDK itself.
debe55
debe55
These are not meant for general use.
debe55
debe55
debe55
%prep
debe55
%setup -q -n dotnet-v%{src_version}-SDK
debe55
debe55
%if %{without bootstrap}
debe55
# Remove all prebuilts
debe55
find -iname '*.dll' -type f -delete
debe55
find -iname '*.so' -type f -delete
debe55
find -iname '*.tar.gz' -type f -delete
debe55
find -iname '*.nupkg' -type f -delete
debe55
find -iname '*.zip' -type f -delete
debe55
rm -rf .dotnet/
debe55
rm -rf packages/source-built
debe55
%endif
debe55
debe55
%if %{without bootstrap}
debe55
mkdir -p packages/archive
debe55
ln -s %{_libdir}/dotnet/source-built-artifacts/*.tar.gz packages/archive/
debe55
ln -s %{_libdir}/dotnet/reference-packages/Private.SourceBuild.ReferencePackages*.tar.gz packages/archive
debe55
%endif
debe55
debe55
# Fix bad hardcoded path in build
debe55
sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/core-setup.*/src/corehost/common/pal.unix.cpp
debe55
debe55
# Disable warnings
debe55
sed -i 's|skiptests|skiptests ignorewarnings|' repos/coreclr.proj
debe55
debe55
%patch1 -p1
debe55
%patch2 -p1
debe55
debe55
pushd src/corefx.*
debe55
%patch100 -p1
debe55
%patch101 -p1
debe55
%patch102 -p1
debe55
%patch103 -p1
debe55
%patch106 -p1
debe55
%patch107 -p1
debe55
%patch108 -p1
debe55
%patch109 -p1
debe55
%patch110 -p1
debe55
%patch111 -p1
debe55
%patch112 -p1
debe55
%patch113 -p1
debe55
%patch114 -p1
debe55
%patch115 -p1
debe55
%patch116 -p1
debe55
popd
debe55
debe55
pushd src/coreclr.*
debe55
#%%patch200 -p1
debe55
#%%patch201 -p1
debe55
popd
debe55
debe55
pushd src/core-setup.*
debe55
popd
debe55
debe55
pushd src/cli.*
debe55
%patch500 -p1
debe55
popd
debe55
debe55
debe55
# If CLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE is misisng, add it back
debe55
grep CLR_CMAKE_USE_SYSTEM_LIBUNWIND repos/coreclr.common.props || \
debe55
    sed -i 's|\$(BuildArguments) </BuildArguments>|$(BuildArguments) cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE</BuildArguments>|' repos/coreclr.common.props
debe55
debe55
%if %{use_bundled_libunwind}
debe55
sed -i 's|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=FALSE|' repos/coreclr.common.props
debe55
%endif
debe55
debe55
%ifnarch x86_64
debe55
mkdir -p artifacts/obj/%{runtime_arch}/Release
debe55
cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}/Release/PackageVersions.props
debe55
%endif
debe55
debe55
cat source-build-info.txt
debe55
debe55
find -iname 'nuget.config' -exec echo {}: \; -exec cat {} \; -exec echo \;
debe55
debe55
debe55
%build
debe55
cat /etc/os-release
debe55
debe55
%if %{without bootstrap}
debe55
# We need to create a copy because we will mutate this
debe55
cp -a %{_libdir}/dotnet previously-built-dotnet
debe55
%endif
debe55
debe55
%if 0%{?fedora} > 32 || 0%{?rhel} > 8
debe55
# Setting this macro ensures that only clang supported options will be
debe55
# added to ldflags and cflags.
debe55
%global toolchain clang
debe55
%set_build_flags
debe55
%else
debe55
# Filter flags not supported by clang
debe55
#  -specs=
debe55
%global dotnet_cflags %(echo %optflags | sed -re 's/-specs=[^ ]*//g')
debe55
%global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g')
debe55
export CFLAGS="%{dotnet_cflags}"
debe55
export CXXFLAGS="%{dotnet_cflags}"
debe55
export LDFLAGS="%{dotnet_ldflags}"
debe55
%endif
debe55
debe55
%ifarch aarch64
debe55
# mbranch-protection=standard breaks unwinding in CoreCLR through libunwind
debe55
CFLAGS=$(echo $CFLAGS | sed -e 's/-mbranch-protection=standard //')
debe55
CXXFLAGS=$(echo $CXXFLAGS | sed -e 's/-mbranch-protection=standard //')
debe55
%endif
debe55
debe55
# fstack-clash-protection breaks CoreCLR
debe55
CFLAGS=$(echo $CFLAGS  | sed -e 's/-fstack-clash-protection//' )
debe55
CXXFLAGS=$(echo $CXXFLAGS  | sed -e 's/-fstack-clash-protection//' )
debe55
debe55
echo $CFLAGS
debe55
echo $CXXFLAGS
debe55
echo $LDFLAGS
debe55
debe55
#%%if %%{without bootstrap}
debe55
#  --with-ref-packages %%{_libdir}/dotnet/reference-packages/ \
debe55
#  --with-packages %%{_libdir}/dotnet/source-built-artifacts/*.tar.gz \
debe55
#  --with-sdk %%{_libdir}/dotnet \
debe55
#%%endif
debe55
debe55
VERBOSE=1 ./build.sh \
debe55
%if %{without bootstrap}
debe55
    --with-sdk previously-built-dotnet \
debe55
%endif
debe55
    -- \
debe55
    /v:n \
debe55
    /p:SkipPortableRuntimeBuild=true \
debe55
    /p:LogVerbosity=n \
debe55
    /p:MinimalConsoleLogOutput=false \
debe55
    /p:ContinueOnPrebuiltBaselineError=true \
debe55
debe55
debe55
sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE2} > dotnet.sh
debe55
debe55
debe55
%install
debe55
install -dm 0755 %{buildroot}%{_libdir}/dotnet
debe55
ls artifacts/%{runtime_arch}/Release
debe55
tar xf artifacts/%{runtime_arch}/Release/dotnet-sdk-%{sdk_version}-%{runtime_id}.tar.gz -C %{buildroot}%{_libdir}/dotnet/
debe55
debe55
# Install managed symbols
debe55
tar xf artifacts/%{runtime_arch}/Release/runtime/dotnet-runtime-symbols-%{runtime_version}-%{runtime_id}.tar.gz \
debe55
    -C %{buildroot}/%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/
debe55
debe55
# Fix executable permissions on files
debe55
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.dll' -exec chmod -x {} \;
debe55
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pdb' -exec chmod -x {} \;
debe55
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.props' -exec chmod -x {} \;
debe55
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.pubxml' -exec chmod -x {} \;
debe55
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.targets' -exec chmod -x {} \;
debe55
chmod 0755 %{buildroot}/%{_libdir}/dotnet/sdk/%{sdk_version}/AppHostTemplate/apphost
debe55
chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/libnethost.so
debe55
chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/apphost
debe55
chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/nethost.h
debe55
debe55
install -dm 0755 %{buildroot}%{_sysconfdir}/profile.d/
debe55
install dotnet.sh %{buildroot}%{_sysconfdir}/profile.d/
debe55
debe55
install -dm 0755 %{buildroot}/%{_datadir}/bash-completion/completions
debe55
# dynamic completion needs the file to be named the same as the base command
debe55
install src/cli.*/scripts/register-completions.bash %{buildroot}/%{_datadir}/bash-completion/completions/dotnet
debe55
debe55
# TODO: the zsh completion script needs to be ported to use #compdef
debe55
#install -dm 755 %%{buildroot}/%%{_datadir}/zsh/site-functions
debe55
#install src/cli/scripts/register-completions.zsh %%{buildroot}/%%{_datadir}/zsh/site-functions/_dotnet
debe55
debe55
install -dm 0755 %{buildroot}%{_bindir}
debe55
ln -s ../../%{_libdir}/dotnet/dotnet %{buildroot}%{_bindir}/
debe55
debe55
install -dm 0755 %{buildroot}%{_mandir}/man1/
debe55
find -iname 'dotnet*.1' -type f -exec cp {} %{buildroot}%{_mandir}/man1/ \;
debe55
debe55
echo "%{_libdir}/dotnet" >> install_location
debe55
install -dm 0755 %{buildroot}%{_sysconfdir}/dotnet
debe55
install install_location %{buildroot}%{_sysconfdir}/dotnet/
debe55
debe55
install -dm 0755 %{buildroot}%{_libdir}/dotnet/source-built-artifacts
debe55
install artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz %{buildroot}/%{_libdir}/dotnet/source-built-artifacts/
debe55
debe55
# Check debug symbols in all elf objects. This is not in %%check
debe55
# because native binaries are stripped by rpm-build after %%install.
debe55
# So we need to do this check earlier.
debe55
echo "Testing build results for debug symbols..."
debe55
%{SOURCE1} -v %{buildroot}%{_libdir}/dotnet/
debe55
debe55
debe55
%check
debe55
%{buildroot}%{_libdir}/dotnet/dotnet --info
debe55
debe55
debe55
%files -n dotnet
debe55
# empty package useful for dependencies
debe55
debe55
%files -n dotnet-host
debe55
%dir %{_libdir}/dotnet
debe55
%{_libdir}/dotnet/dotnet
debe55
%dir %{_libdir}/dotnet/host
debe55
%dir %{_libdir}/dotnet/host/fxr
debe55
%{_bindir}/dotnet
debe55
%license %{_libdir}/dotnet/LICENSE.txt
debe55
%license %{_libdir}/dotnet/ThirdPartyNotices.txt
debe55
%doc %{_mandir}/man1/dotnet*.1.gz
debe55
%{_sysconfdir}/profile.d/dotnet.sh
debe55
%{_sysconfdir}/dotnet
debe55
%dir %{_datadir}/bash-completion
debe55
%dir %{_datadir}/bash-completion/completions
debe55
%{_datadir}/bash-completion/completions/dotnet
debe55
debe55
%files -n dotnet-hostfxr-3.1
debe55
%dir %{_libdir}/dotnet/host/fxr
debe55
%{_libdir}/dotnet/host/fxr/%{host_version}
debe55
debe55
%files -n dotnet-runtime-3.1
debe55
%dir %{_libdir}/dotnet/shared
debe55
%dir %{_libdir}/dotnet/shared/Microsoft.NETCore.App
debe55
%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}
debe55
debe55
%files -n aspnetcore-runtime-3.1
debe55
%dir %{_libdir}/dotnet/shared
debe55
%dir %{_libdir}/dotnet/shared/Microsoft.AspNetCore.App
debe55
%{_libdir}/dotnet/shared/Microsoft.AspNetCore.App/%{aspnetcore_runtime_version}
debe55
debe55
%files -n dotnet-templates-3.1
debe55
%dir %{_libdir}/dotnet/templates
debe55
%{_libdir}/dotnet/templates/%{templates_version}
debe55
debe55
%files -n dotnet-sdk-3.1
debe55
%dir %{_libdir}/dotnet/sdk
debe55
%{_libdir}/dotnet/sdk/%{sdk_version}
debe55
%dir %{_libdir}/dotnet/packs
debe55
debe55
%files -n dotnet-sdk-3.1-source-built-artifacts
debe55
%dir %{_libdir}/dotnet
debe55
%{_libdir}/dotnet/source-built-artifacts
debe55
debe55
debe55
%changelog
debe55
* Fri Aug 27 2021 Omair Majid <omajid@redhat.com> - 3.1.118-1
debe55
- Update to .NET SDK 3.1.118 and Runtime 3.1.18
debe55
- Resolves: RHBZ#1961848
debe55
debe55
* Tue Aug 24 2021 Omair Majid <omajid@redhat.com> - 3.1.117-2
debe55
- Fix building and running against OpenSSL 3.0
debe55
- Resolves: RHBZ#1991050
debe55
debe55
* Thu Aug 12 2021 Omair Majid <omajid@redhat.com> - 3.1.117-1
debe55
- Update to .NET SDK 3.1.117 and Runtime 3.1.17
debe55
- Resolves: RHBZ#1961848
debe55
debe55
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.1.116-3
debe55
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
debe55
  Related: rhbz#1991688
debe55
debe55
* Wed Jun 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.1.116-2
debe55
- Rebuilt for RHEL 9 BETA for openssl 3.0
debe55
  Related: rhbz#1971065
debe55
debe55
* Fri Jun 11 2021 Omair Majid <omajid@redhat.com> - 3.1.116-1
debe55
- Update to .NET SDK 3.1.116 and Runtime 3.1.16
debe55
- Resolves: RHBZ#1961848
debe55
debe55
* Mon Jun 07 2021 Omair Majid <omajid@redhat.com> - 3.1.115-2
debe55
- Support building against OpenSSL 3.0
debe55
- Resolves: RHBZ#1965045
debe55
debe55
* Tue May 18 2021 Omair Majid <omajid@redhat.com> - 3.1.115-1
debe55
- Update to .NET SDK 3.1.115 and Runtime 3.1.15
debe55
- Resolves: RHBZ#1961848
debe55
debe55
* Wed Apr 21 2021 Omair Majid <omajid@redhat.com> - 3.1.113-3
debe55
- Fix build by adding CentOS 9 RIDs
debe55
- Resolves: RHBZ#1951312
debe55
debe55
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 3.1.113-3
debe55
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
debe55
debe55
* Tue Mar 30 2021 Jonathan Wakely <jwakely@redhat.com> - 3.1.113-2
debe55
- Rebuilt for removed libstdc++ symbol (#1937698)
debe55
debe55
* Wed Mar 17 2021 Omair Majid <omajid@redhat.com> - 3.1.113-1
debe55
- Update to .NET Core SDK 3.1.113 and Runtime 3.1.13
debe55
debe55
* Wed Feb 17 2021 Omair Majid <omajid@redhat.com> - 3.1.112-3
debe55
- Hack an RID for RHEL 9 into the build SDK
debe55
debe55
* Wed Feb 17 2021 Omair Majid <omajid@redhat.com> - 3.1.112-2
debe55
- Add Fedora 35 Runtime ID
debe55
debe55
* Fri Feb 12 2021 Omair Majid <omajid@redhat.com> - 3.1.112-1
debe55
- Update to .NET Core SDK 3.1.112 and Runtime 3.1.12
debe55
debe55
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.111-2
debe55
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
debe55
debe55
* Fri Jan 15 2021 Omair Majid <omajid@redhat.com> - 3.1.111-1
debe55
- Update to .NET Core SDK 3.1.111 and Runtime 3.1.11
debe55
debe55
* Sun Dec 06 2020 Jeff Law <law@redhat.com> - 3.1.110-2
debe55
- Fix missing #include for gcc-11
debe55
debe55
* Tue Nov 10 2020 Omair Majid <omajid@redhat.com> - 3.1.110-1
debe55
- Update to .NET Core SDK 3.1.110 and Runtime 3.1.10
debe55
debe55
* Wed Oct 14 2020 Omair Majid <omajid@redhat.com> - 3.1.109-1
debe55
- Update to .NET Core SDK 3.1.109 and Runtime 3.1.9
debe55
debe55
* Mon Sep 21 2020 Tom Stellard <tstellar@redhat.com> - 3.1.108-2
debe55
- Use toolchain macro for setting clang-specific c/ld flags
debe55
debe55
* Wed Sep 16 2020 Troy Dawson <tdawson@redhat.com> - 3.1.108-1
debe55
- Generate runtime_id the same way that it does in the various build scripts
debe55
debe55
* Fri Sep 11 2020 Omair Majid <omajid@redhat.com> - 3.1.108-1
debe55
- Update to .NET Core SDK 3.1.108 and Runtime 3.1.8
debe55
debe55
* Wed Sep 09 2020 Omair Majid <omajid@redhat.com> - 3.1.107-1
debe55
- Add Fedora 34 RID
debe55
- Fix build of bundled libunwind
debe55
debe55
* Wed Aug 19 2020 Omair Majid <omajid@redhat.com> - 3.1.107-1
debe55
- Update to .NET Core Runtime 3.1.7 and SDK 3.1.107
debe55
debe55
* Thu Aug 13 2020 Omair Majid <omajid@redhat.com> - 3.1.106-3
debe55
- Filter out -mbranch-protection=standard from cflags
debe55
debe55
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.106-3
debe55
- Second attempt - Rebuilt for
debe55
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
debe55
debe55
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.106-2
debe55
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
debe55
debe55
* Tue Jul 21 2020 Jo Shields <joshield@microsoft.com> - 3.1.106-1
debe55
- Update to .NET Core Runtime 3.1.6 and SDK 3.1.106
debe55
debe55
* Tue Jul 21 2020 Omair Majid <omajid@redhat.com> - 3.1.105-5
debe55
- Fix up commented-out define for disabling LTO
debe55
debe55
* Mon Jul 20 2020 Jeff Law <law@redhat.com> - 3.1.105-5
debe55
- Disable LTO
debe55
debe55
* Sat Jun 27 2020 Omair Majid <omajid@redhat.com> - 3.1.105-4
debe55
- Disable bootstrap
debe55
debe55
* Fri Jun 26 2020 Omair Majid <omajid@redhat.com> - 3.1.105-3
debe55
- Re-bootstrap aarch64
debe55
debe55
* Fri Jun 19 2020 Omair Majid <omajid@redhat.com> - 3.1.105-3
debe55
- Disable bootstrap
debe55
debe55
* Thu Jun 18 2020 Omair Majid <omajid@redhat.com> - 3.1.105-1
debe55
- Bootstrap aarch64
debe55
debe55
* Tue Jun 16 2020 Chris Rummel <crummel@microsoft.com> - 3.1.105-1
debe55
- Update to .NET Core Runtime 3.1.5 and SDK 3.1.105
debe55
debe55
* Fri Jun 05 2020 Chris Rummel <crummel@microsoft.com> - 3.1.104-1
debe55
- Update to .NET Core Runtime 3.1.4 and SDK 3.1.104
debe55
debe55
* Thu Apr 09 2020 Chris Rummel <crummel@microsoft.com> - 3.1.103-1
debe55
- Update to .NET Core Runtime 3.1.3 and SDK 3.1.103
debe55
debe55
* Mon Mar 16 2020 Omair Majid <omajid@redhat.com> - 3.1.102-1
debe55
- Update to .NET Core Runtime 3.1.2 and SDK 3.1.102
debe55
debe55
* Fri Feb 28 2020 Omair Majid <omajid@redhat.com> - 3.1.101-4
debe55
- Disable bootstrap
debe55
debe55
* Fri Feb 28 2020 Omair Majid <omajid@redhat.com> - 3.1.101-3
debe55
- Enable bootstrap
debe55
- Add Fedora 33 runtime ids
debe55
debe55
* Thu Feb 27 2020 Omair Majid <omajid@redhat.com> - 3.1.101-2
debe55
- Disable bootstrap
debe55
debe55
* Tue Jan 21 2020 Omair Majid <omajid@redhat.com> - 3.1.101-1
debe55
- Update to .NET Core Runtime 3.1.1 and SDK 3.1.101
debe55
debe55
* Thu Dec 05 2019 Omair Majid <omajid@redhat.com> - 3.1.100-1
debe55
- Update to .NET Core Runtime 3.1.0 and SDK 3.1.100
debe55
debe55
* Mon Nov 18 2019 Omair Majid <omajid@redhat.com> - 3.1.100-0.4.preview3
debe55
- Fix apphost permissions
debe55
debe55
* Fri Nov 15 2019 Omair Majid <omajid@redhat.com> - 3.1.100-0.3.preview3
debe55
- Update to .NET Core Runtime 3.1.0-preview3.19553.2 and SDK
debe55
  3.1.100-preview3-014645
debe55
debe55
* Wed Nov 06 2019 Omair Majid <omajid@redhat.com> - 3.1.100-0.2
debe55
- Update to .NET Core 3.1 Preview 2
debe55
debe55
* Wed Oct 30 2019 Omair Majid <omajid@redhat.com> - 3.1.100-0.1
debe55
- Update to .NET Core 3.1 Preview 1
debe55
debe55
* Thu Oct 24 2019 Omair Majid <omajid@redhat.com> - 3.0.100-5
debe55
- Add cgroupv2 support to .NET Core
debe55
debe55
* Wed Oct 16 2019 Omair Majid <omajid@redhat.com> - 3.0.100-4
debe55
- Include fix from coreclr for building on Fedora 32
debe55
debe55
* Wed Oct 16 2019 Omair Majid <omajid@redhat.com> - 3.0.100-3
debe55
- Harden built binaries to pass annocheck
debe55
debe55
* Fri Oct 11 2019 Omair Majid <omajid@redhat.com> - 3.0.100-2
debe55
- Export DOTNET_ROOT in profile to make apphost lookup work
debe55
debe55
* Fri Sep 27 2019 Omair Majid <omajid@redhat.com> - 3.0.100-1
debe55
- Update to .NET Core Runtime 3.0.0 and SDK 3.0.100
debe55
debe55
* Wed Sep 25 2019 Omair Majid <omajid@redhat.com> - 3.0.100-0.18.rc1
debe55
- Update to .NET Core Runtime 3.0.0-rc1-19456-20 and SDK 3.0.100-rc1-014190
debe55
debe55
* Tue Sep 17 2019 Omair Majid <omajid@redhat.com> - 3.0.100-0.16.preview9
debe55
- Fix files duplicated between dotnet-apphost-pack-3.0 and dotnet-targeting-pack-3.0
debe55
- Fix dependencies between .NET SDK and the targeting packs
debe55
debe55
* Mon Sep 16 2019 Omair Majid <omajid@redhat.com> - 3.0.100-0.15.preview9
debe55
- Update to .NET Core Runtime 3.0.0-preview 9 and SDK 3.0.100-preview9
debe55
debe55
* Mon Aug 19 2019 Omair Majid <omajid@redhat.com> - 3.0.100-0.11.preview8
debe55
- Update to .NET Core Runtime 3.0.0-preview8-28405-07 and SDK
debe55
  3.0.100-preview8-013656
debe55
debe55
* Tue Jul 30 2019 Omair Majid <omajid@redhat.com> - 3.0.100-0.9.preview7
debe55
- Update to .NET Core Runtime 3.0.0-preview7-27912-14 and SDK
debe55
  3.0.100-preview7-012821
debe55
debe55
* Fri Jul 26 2019 Omair Majid <omajid@redhat.com> - 3.0.100-0.8.preview7
debe55
- Update to .NET Core Runtime 3.0.0-preview7-27902-19 and SDK
debe55
  3.0.100-preview7-012802
debe55
debe55
* Wed Jun 26 2019 Omair Majid <omajid@redhat.com> - 3.0.0-0.7.preview6
debe55
- Obsolete dotnet-sdk-3.0.1xx
debe55
- Add supackages for targeting packs
debe55
- Add -fcf-protection to CFLAGS
debe55
debe55
* Wed Jun 26 2019 Omair Majid <omajid@redhat.com> - 3.0.0-0.6.preview6
debe55
- Update to .NET Core Runtime 3.0.0-preview6-27804-01 and SDK 3.0.100-preview6-012264
debe55
- Set dotnet installation location in /etc/dotnet/install_location
debe55
- Update targeting packs
debe55
- Install managed symbols
debe55
- Completely conditionalize libunwind bundling
debe55
debe55
* Tue May 07 2019 Omair Majid <omajid@redhat.com> - 3.0.0-0.3.preview4
debe55
- Update to .NET Core 3.0 preview 4
debe55
debe55
* Tue Dec 18 2018 Omair Majid <omajid@redhat.com> - 3.0.0-0.1.preview1
debe55
- Update to .NET Core 3.0 preview 1
debe55
debe55
* Fri Dec 07 2018 Omair Majid <omajid@redhat.com> - 2.2.100
debe55
- Update to .NET Core 2.2.0
debe55
debe55
* Wed Nov 07 2018 Omair Majid <omajid@redhat.com> - 2.2.100-0.2.preview3
debe55
- Update to .NET Core 2.2.0-preview3
debe55
debe55
* Fri Nov 02 2018 Omair Majid <omajid@redhat.com> - 2.1.403-3
debe55
- Add host-fxr-2.1 subpackage
debe55
debe55
* Mon Oct 15 2018 Omair Majid <omajid@redhat.com> - 2.1.403-2
debe55
- Disable telemetry by default
debe55
- Users have to manually export DOTNET_CLI_TELEMETRY_OPTOUT=0 to enable
debe55
debe55
* Tue Oct 02 2018 Omair Majid <omajid@redhat.com> - 2.1.403-1
debe55
- Update to .NET Core Runtime 2.1.5 and SDK 2.1.403
debe55
debe55
* Wed Sep 26 2018 Omair Majid <omajid@redhat.com> - 2.1.402-2
debe55
- Add ~/.dotnet/tools to $PATH to make it easier to use dotnet tools
debe55
debe55
* Thu Sep 13 2018 Omair Majid <omajid@redhat.com> - 2.1.402-1
debe55
- Update to .NET Core Runtime 2.1.4 and SDK 2.1.402
debe55
debe55
* Wed Sep 05 2018 Omair Majid <omajid@redhat.com> - 2.1.401-2
debe55
- Use distro-standard flags when building .NET Core
debe55
debe55
* Tue Aug 21 2018 Omair Majid <omajid@redhat.com> - 2.1.401-1
debe55
- Update to .NET Core Runtime 2.1.3 and SDK 2.1.401
debe55
debe55
* Mon Aug 20 2018 Omair Majid <omajid@redhat.com> - 2.1.302-1
debe55
- Update to .NET Core Runtime 2.1.2 and SDK 2.1.302
debe55
debe55
* Fri Jul 20 2018 Omair Majid <omajid@redhat.com> - 2.1.301-1
debe55
- Update to .NET Core 2.1
debe55
debe55
* Thu May 03 2018 Omair Majid <omajid@redhat.com> - 2.0.7-1
debe55
- Update to .NET Core 2.0.7
debe55
debe55
* Wed Mar 28 2018 Omair Majid <omajid@redhat.com> - 2.0.6-2
debe55
- Enable bash completion for dotnet
debe55
- Remove redundant buildrequires and requires
debe55
debe55
* Wed Mar 14 2018 Omair Majid <omajid@redhat.com> - 2.0.6-1
debe55
- Update to .NET Core 2.0.6
debe55
debe55
* Fri Feb 23 2018 Omair Majid <omajid@redhat.com> - 2.0.5-1
debe55
- Update to .NET Core 2.0.5
debe55
debe55
* Wed Jan 24 2018 Omair Majid <omajid@redhat.com> - 2.0.3-5
debe55
- Don't apply corefx clang warnings fix on clang < 5
debe55
debe55
* Fri Jan 19 2018 Omair Majid <omajid@redhat.com> - 2.0.3-4
debe55
- Add a test script to sanity check debug and symbol info.
debe55
- Build with clang 5.0
debe55
- Make main package real instead of using a virtual provides (see RHBZ 1519325)
debe55
debe55
* Wed Nov 29 2017 Omair Majid <omajid@redhat.com> - 2.0.3-3
debe55
- Add a Provides for 'dotnet'
debe55
- Fix conditional macro
debe55
debe55
* Tue Nov 28 2017 Omair Majid <omajid@redhat.com> - 2.0.3-2
debe55
- Fix build on Fedora 27
debe55
debe55
* Fri Nov 17 2017 Omair Majid <omajid@redhat.com> - 2.0.3-1
debe55
- Update to .NET Core 2.0.3
debe55
debe55
* Thu Oct 19 2017 Omair Majid <omajid@redhat.com> - 2.0.0-4
debe55
- Add a hack to let omnisharp work
debe55
debe55
* Wed Aug 30 2017 Omair Majid <omajid@redhat.com> - 2.0.0-3
debe55
- Add a patch for building coreclr and core-setup correctly on Fedora >= 27
debe55
debe55
* Fri Aug 25 2017 Omair Majid <omajid@redhat.com> - 2.0.0-2
debe55
- Move libicu/libcurl/libunwind requires to runtime package
debe55
- Make sdk depend on the exact version of the runtime package
debe55
debe55
* Thu Aug 24 2017 Omair Majid <omajid@redhat.com> - 2.0.0-1
debe55
- Update to 2.0.0 final release
debe55
debe55
* Wed Jul 26 2017 Omair Majid <omajid@redhat.com> - 2.0.0-0.3.preview2
debe55
- Add man pages
debe55
debe55
* Tue Jul 25 2017 Omair Majid <omajid@redhat.com> - 2.0.0-0.2.preview2
debe55
- Add Requires on libicu
debe55
- Split into multiple packages
debe55
- Do not repeat first-run message
debe55
debe55
* Fri Jul 21 2017 Omair Majid <omajid@redhat.com> - 2.0.0-0.1.preview2
debe55
- Update to .NET Core 2.0 Preview 2
debe55
debe55
* Thu Mar 16 2017 Nemanja Milošević <nmilosevnm@gmail.com> - 1.1.0-7
debe55
- rebuilt with latest libldb
debe55
* Wed Feb 22 2017 Nemanja Milosevic <nmilosev@fedoraproject.org> - 1.1.0-6
debe55
- compat-openssl 1.0 for F26 for now
debe55
* Sun Feb 19 2017 Nemanja Milosevic <nmilosev@fedoraproject.org> - 1.1.0-5
debe55
- Fix wrong commit id's
debe55
* Sat Feb 18 2017 Nemanja Milosevic <nmilosev@fedoraproject.org> - 1.1.0-4
debe55
- Use commit id's instead of branch names
debe55
* Sat Feb 18 2017 Nemanja Milosevic <nmilosev@fedoraproject.org> - 1.1.0-3
debe55
- Improper patch5 fix
debe55
* Sat Feb 18 2017 Nemanja Milosevic <nmilosev@fedoraproject.org> - 1.1.0-2
debe55
- SPEC cleanup
debe55
- git removal (using all tarballs for reproducible builds)
debe55
- more reasonable versioning
debe55
* Thu Feb 09 2017 Nemanja Milosevic <nmilosev@fedoraproject.org> - 1.1.0-1
debe55
- Fixed debuginfo going to separate package (Patch1)
debe55
- Added F25/F26 RIL and fixed the version info (Patch2)
debe55
- Added F25/F26 RIL in Microsoft.NETCore.App suported runtime graph (Patch3)
debe55
- SPEC file cleanup
debe55
* Wed Jan 11 2017 Nemanja Milosevic <nmilosev@fedoraproject.org> - 1.1.0-0
debe55
- Initial RPM for Fedora 25/26.
debe55