From ebc23aa69e7c5275cbe86e015449ec922d8e4e1b Mon Sep 17 00:00:00 2001
From: Omair Majid <omajid@redhat.com>
Date: Jan 21 2019 13:13:30 +0000
Subject: Update to .NET Core Runtime 2.1.7 and SDK 2.1.503


---

diff --git a/copr-build b/copr-build
index 6d431dc..d728d04 100755
--- a/copr-build
+++ b/copr-build
@@ -4,7 +4,7 @@ set -euo pipefail
 
 set -x
 
-fedpkg srpm 2>&1 | tee fedpkg.output
+fedpkg --release f29 srpm 2>&1 | tee fedpkg.output
 
 srpm_name=$(grep 'Wrote: ' fedpkg.output | cut -d' ' -f 2)
 
diff --git a/corefx-32165-out-of-directory-extract.patch b/corefx-32165-out-of-directory-extract.patch
deleted file mode 100644
index ca93a09..0000000
--- a/corefx-32165-out-of-directory-extract.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 65a19e18d7d4b94f50772bd3118c0b9868766af5 Mon Sep 17 00:00:00 2001
-From: Maryam Ariyan <maryam.ariyan@microsoft.com>
-Date: Fri, 7 Sep 2018 10:53:25 -0700
-Subject: [PATCH] Fixes extract out of directory by ensuring trailing separator
- for nested paths.
-
-Related to PR #32127
----
- .../System/IO/Compression/ZipFileExtensions.cs  |  2 ++
- .../tests/ZipFileConvenienceMethods.cs          | 17 +++++++++++++++++
- 2 files changed, 19 insertions(+)
-
-diff --git a/src/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFileExtensions.cs b/src/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFileExtensions.cs
-index 3fef7883c953..c749c8250f9c 100644
---- a/src/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFileExtensions.cs
-+++ b/src/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFileExtensions.cs
-@@ -160,6 +160,8 @@ public static void ExtractToDirectory(this ZipArchive source, string destination
-             // Note that this will give us a good DirectoryInfo even if destinationDirectoryName exists:
-             DirectoryInfo di = Directory.CreateDirectory(destinationDirectoryName);
-             string destinationDirectoryFullPath = di.FullName;
-+            if (!destinationDirectoryFullPath.EndsWith(Path.DirectorySeparatorChar))
-+                destinationDirectoryFullPath += Path.DirectorySeparatorChar;
- 
-             foreach (ZipArchiveEntry entry in source.Entries)
-             {
-diff --git a/src/System.IO.Compression.ZipFile/tests/ZipFileConvenienceMethods.cs b/src/System.IO.Compression.ZipFile/tests/ZipFileConvenienceMethods.cs
-index 69c822e3fc7e..3a0255d03862 100644
---- a/src/System.IO.Compression.ZipFile/tests/ZipFileConvenienceMethods.cs
-+++ b/src/System.IO.Compression.ZipFile/tests/ZipFileConvenienceMethods.cs
-@@ -186,6 +186,23 @@ public void ExtractToDirectoryExtension_Unicode()
-             }
-         }
- 
-+        [Theory]
-+        [InlineData("../Foo")]
-+        [InlineData("../Barbell")]
-+        [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Second case fails.")]
-+        public void ExtractOutOfRoot(string entryName)
-+        {
-+            string archivePath = GetTestFilePath();
-+            using (FileStream stream = new FileStream(archivePath, FileMode.Create))
-+            using (ZipArchive archive = new ZipArchive(stream, ZipArchiveMode.Create, leaveOpen: true))
-+            {
-+                ZipArchiveEntry entry = archive.CreateEntry(entryName);
-+            }
-+
-+            DirectoryInfo destination = Directory.CreateDirectory(Path.Combine(GetTestFilePath(), "Bar"));
-+            Assert.Throws<IOException>(() => ZipFile.ExtractToDirectory(archivePath, destination.FullName));
-+        }
-+
-         [Fact]
-         public void CreatedEmptyDirectoriesRoundtrip()
-         {
diff --git a/dotnet.spec b/dotnet.spec
index 4776c67..aa4d7f6 100644
--- a/dotnet.spec
+++ b/dotnet.spec
@@ -14,13 +14,14 @@
 
 # Filter flags not supported by clang/dotnet:
 #  -fcf-protection is not supported by clang
+#  -fstack-clask-protection is not supported by clang
 #  -specs= is not supported by clang
-%global dotnet_cflags %(echo %optflags | sed -e 's/-fcf-protection//' | sed -re 's/-specs=[^ ]*//g')
+%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 2.1.6
-%global sdk_version 2.1.500
-%global runtime_version 2.1.6
+%global host_version 2.1.7
+%global sdk_version 2.1.503
+%global runtime_version 2.1.7
 
 Name:           dotnet
 Version:        %{sdk_version}
@@ -36,13 +37,12 @@ URL:            https://github.com/dotnet/
 # - ./build-source-tarball.sh dotnet-%%{sdk_version}
 # - tar cvzf dotnet-%%{sdk_version}.tar.gz dotnet-%%{sdk_version}
 
-Source0:        dotnet-v%{runtime_version}a.tar.gz
+Source0:        dotnet-v%{runtime_version}.tar.gz
 Source1:        check-debug-symbols.py
 Source2:        dotnet.sh
 
 Patch1:         corefx-optflags-support.patch
 Patch2:         corefx-32956-alpn.patch
-Patch3:         corefx-32165-out-of-directory-extract.patch
 
 Patch300:       core-setup-4510-commit-id.patch
 Patch400:       cli-telemetry-optout.patch
@@ -176,7 +176,7 @@ It particularly focuses on creating console applications, web
 applications and micro-services.
 
 %prep
-%setup -q -n %{name}-v%{runtime_version}a
+%setup -q -n %{name}-v%{runtime_version}
 
 # Fix bad hardcoded path in build
 sed -i 's|/usr/share/dotnet|%{_libdir}/%{name}|' src/core-setup/src/corehost/common/pal.unix.cpp
@@ -184,7 +184,6 @@ sed -i 's|/usr/share/dotnet|%{_libdir}/%{name}|' src/core-setup/src/corehost/com
 pushd src/corefx
 %patch1 -p1
 %patch2 -p1
-%patch3 -p1
 popd
 
 pushd src/core-setup
@@ -277,6 +276,9 @@ echo "Testing build results for debug symbols..."
 %{_libdir}/%{name}/sdk/%{sdk_version}
 
 %changelog
+* Sat Jan 19 2019 Omair Majid <omajid@redhat.com> - 2.1.503-3
+- Update to .NET Core Runtime 2.1.7 and SDK 2.1.503
+
 * Wed Dec 12 2018 Omair Majid <omajid@redhat.com> - 2.1.500-3
 - Fix CVE-2018-8416
 

