diff --git a/.dotnet3.0.metadata b/.dotnet3.0.metadata
index c3610da..846e870 100644
--- a/.dotnet3.0.metadata
+++ b/.dotnet3.0.metadata
@@ -1 +1 @@
-54cff2893b47da7695670a255e106d4c66d79cd0 SOURCES/dotnet-v3.0.0.tar.gz
+bbfbe56a2822311b0079546faef32ccb3ed8fe5f SOURCES/dotnet-v3.0.103-SDK.tar.gz
diff --git a/.gitignore b/.gitignore
index 975c99e..2f88474 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-SOURCES/dotnet-v3.0.0.tar.gz
+SOURCES/dotnet-v3.0.103-SDK.tar.gz
diff --git a/SOURCES/shared-compilation.patch b/SOURCES/shared-compilation.patch
new file mode 100644
index 0000000..c71250c
--- /dev/null
+++ b/SOURCES/shared-compilation.patch
@@ -0,0 +1,10 @@
+--- a/repos/corefx.proj
++++ b/repos/corefx.proj
+@@ -34,6 +34,7 @@
+ $(BuildArguments) /p:DotNetSourceBuildIntermediatePath=$(GeneratedSourcePathOffline)
+ $(BuildArguments) /p:MicrosoftNETCoreDotNetHostPackageVersion=$(coresetupOutputPackageVersion)
+ $(BuildArguments) /p:MicrosoftNETCoreDotNetHostPolicyPackageVersion=$(coresetupOutputPackageVersion)
++ $(BuildArguments) /p:UseSharedCompilation=false
+
+ true
+ $(BuildArguments) $(FlagParameterPrefix)verbosity $(LogVerbosity)
diff --git a/SPECS/dotnet3.0.spec b/SPECS/dotnet3.0.spec
index 9979375..632bea2 100644
--- a/SPECS/dotnet3.0.spec
+++ b/SPECS/dotnet3.0.spec
@@ -23,11 +23,11 @@
%endif
%global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g')
-%global host_version 3.0.0
-%global runtime_version 3.0.0
+%global host_version 3.0.3
+%global runtime_version 3.0.3
%global aspnetcore_runtime_version %{runtime_version}
-%global sdk_version 3.0.100
-%global templates_version %{runtime_version}
+%global sdk_version 3.0.103
+%global templates_version %(echo %{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
%global host_rpm_version %{host_version}
%global aspnetcore_runtime_rpm_version %{aspnetcore_runtime_version}
@@ -59,10 +59,12 @@ URL: https://github.com/dotnet/
# The source is generated on a Fedora box via:
# ./build-dotnet-tarball dotnet-v%%{runtime_version}
-Source0: dotnet-v%{runtime_version}.tar.gz
+Source0: dotnet-v%{sdk_version}-SDK.tar.gz
Source1: check-debug-symbols.py
Source2: dotnet.sh
+Patch1: shared-compilation.patch
+
Patch100: corefx-optflags-support.patch
Patch300: core-setup-do-not-strip.patch
@@ -282,7 +284,7 @@ applications using the .NET Core SDK.
%prep
-%setup -q -n dotnet-v%{runtime_version}
+%setup -q -n dotnet-v%{sdk_version}-SDK
# Fix bad hardcoded path in build
sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/core-setup.*/src/corehost/common/pal.unix.cpp
@@ -290,6 +292,8 @@ sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/core-setup.*/src/corehost/co
# Disable warnings
sed -i 's|skiptests|skiptests ignorewarnings|' repos/coreclr.proj
+%patch1 -p1
+
pushd src/corefx.*
%patch100 -p1
popd
@@ -342,12 +346,30 @@ tar xf bin/x64/Release/dotnet-sdk-%{sdk_version}-%{runtime_id}.tar.gz -C %{build
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
+# Fix 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 {} \;
+chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Ref/3.0.0/data/PackageOverrides.txt
+chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Ref/3.0.0/data/FrameworkList.xml
+chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Ref/3.0.0/data/PlatformManifest.txt
+chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.AspNetCore.App.Ref/3.0.1/ref/netcoreapp3.0/*.xml
+chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.AspNetCore.App.Ref/3.0.1/data/PackageOverrides.txt
+chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.AspNetCore.App.Ref/3.0.1/data/FrameworkList.xml
+chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.AspNetCore.App.Ref/3.0.1/data/PlatformManifest.txt
+chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.AspNetCore.App.Ref/3.0.1/Microsoft.AspNetCore.App.Ref/3.0.1/Debug/netstandard2.0/Microsoft.AspNetCore.App.Ref.assets.cache
+chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.AspNetCore.App.Ref/3.0.1/obj/Microsoft.AspNetCore.App.Ref.csproj.nuget.cache
+chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.AspNetCore.App.Ref/3.0.1/obj/Microsoft.AspNetCore.App.Ref.csproj.nuget.dgspec.json
+chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.AspNetCore.App.Ref/3.0.1/obj/project.assets.json
+chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/NETStandard.Library.Ref/2.1.0/data/PackageOverrides.txt
+chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/NETStandard.Library.Ref/2.1.0/data/FrameworkList.xml
+chmod 0755 %{buildroot}/%{_libdir}/dotnet/sdk/%{sdk_version}/AppHostTemplate/apphost
+chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/apphost
+chmod 0755 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/libnethost.so
+chmod 0644 %{buildroot}/%{_libdir}/dotnet/packs/Microsoft.NETCore.App.Host.%{runtime_id}/%{runtime_version}/runtimes/%{runtime_id}/native/nethost.h
+
# Add ~/.dotnet/tools to $PATH for all users
install -dm 0755 %{buildroot}%{_sysconfdir}/profile.d/
@@ -424,6 +446,19 @@ echo "Testing build results for debug symbols..."
%dir %{_libdir}/dotnet/packs
%changelog
+* Thu Mar 05 2020 Omair Majid - 3.0.103-1
+- Update to .NET Core Runtime 3.0.3 and SDK 3.0.103
+- Resolves: RHBZ#1806956
+
+* Wed Jan 15 2020 Omair Majid - 3.0.102-2
+- Fix prebuilts leaking into the final build
+- Fix regressions in binary hardering
+- Resolves: RHBZ#1788171
+
+* Fri Jan 10 2020 Omair Majid - 3.0.102-1
+- Update to .NET Core Runtime 3.0.2 and SDK 3.0.102
+- Resolves: RHBZ#1788171
+
* Fri Sep 27 2019 Omair Majid - 3.0.100-1
- Update to .NET Core Runtime 3.0.0 and SDK 3.0.100
- Resolves: RHBZ#1711403