From 7d2ed0135176457a11bdef9e87f14cf365f0f2caac4f1d9eee6e611a6cbdd9dc Mon Sep 17 00:00:00 2001
From: OBS User mrdocs <null@suse.de>
Date: Tue, 6 Jun 2017 17:41:26 +0000
Subject: [PATCH] OBS-URL:
 https://build.opensuse.org/package/show/KDE:Frameworks5/kscreenlocker?expand=0&rev=81

---
 ...ismatch-between-greeter-and-kcheckpa.patch | 85 -------------------
 kscreenlocker-5.10.0.tar.xz                   |  3 -
 kscreenlocker-5.10.1.tar.xz                   |  3 +
 kscreenlocker.changes                         | 14 +++
 kscreenlocker.spec                            |  7 +-
 5 files changed, 19 insertions(+), 93 deletions(-)
 delete mode 100644 0001-Fixup-protocol-mismatch-between-greeter-and-kcheckpa.patch
 delete mode 100644 kscreenlocker-5.10.0.tar.xz
 create mode 100644 kscreenlocker-5.10.1.tar.xz

diff --git a/0001-Fixup-protocol-mismatch-between-greeter-and-kcheckpa.patch b/0001-Fixup-protocol-mismatch-between-greeter-and-kcheckpa.patch
deleted file mode 100644
index b15df69..0000000
--- a/0001-Fixup-protocol-mismatch-between-greeter-and-kcheckpa.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From ae211ad069a8a72df1436ef02d0d5151b62e7c02 Mon Sep 17 00:00:00 2001
-From: Fabian Vogt <fabian@ritter-vogt.de>
-Date: Sun, 4 Jun 2017 20:44:18 +0200
-Subject: [PATCH] Fixup protocol mismatch between greeter and kcheckpass
-
-Summary:
-The receiver (kcheckpass) reads a string and if it is !nullptr, reads an int:
-
-	msg = GRecvStr ();
-	if (msg && (GRecvInt() & IsPassword) && !*msg)
-
-The sender (kscreenlocker_greet) sends a string and if it is not empty,
-sends an int:
-
-	GSendStr(m_password.toUtf8().constData());
-	if (!m_password.isEmpty()) {
-		// IsSecret
-		GSendInt(1);
-	}
-
-This does not work out for empty strings, as those still have a length of 1,
-resulting in kcheckpass waiting indefinitely for an int that does not get sent.
-Testing for a nullptr on the sender side instead of the string length fixes this.
-
-Also clean up the code duplication and IsSecret (1)/IsPassword (2) mismatch.
-
-BUG: 380491
-
-Test Plan:
-Reproduced the bug without this patch, with this patch it does not
-happen anymore. Authentication still works and fails as expected.
-
-Reviewers: #plasma
-
-Subscribers: plasma-devel
-
-Tags: #plasma
-
-Differential Revision: https://phabricator.kde.org/D6091
----
- greeter/authenticator.cpp | 22 +++++++---------------
- 1 file changed, 7 insertions(+), 15 deletions(-)
-
-diff --git a/greeter/authenticator.cpp b/greeter/authenticator.cpp
-index f3ee0d1..8c9391b 100644
---- a/greeter/authenticator.cpp
-+++ b/greeter/authenticator.cpp
-@@ -243,27 +243,19 @@ void KCheckPass::handleVerify()
-                 ::free( arr );
-             return;
-         case ConvGetNormal:
--            if (!GRecvArr( &arr ))
--                break;
--            GSendStr(m_password.toUtf8().constData());
--            if (!m_password.isEmpty()) {
--                // IsSecret
--                GSendInt(1);
--            }
--            if (arr)
--                ::free( arr );
--            return;
-         case ConvGetHidden:
-+        {
-             if (!GRecvArr( &arr ))
-                 break;
--            GSendStr(m_password.toUtf8().constData());
--            if (!m_password.isEmpty()) {
--                // IsSecret
--                GSendInt(1);
--            }
-+            QByteArray utf8pass = m_password.toUtf8();
-+            GSendStr(utf8pass.constData());
-+            if (utf8pass.constData() != nullptr)
-+                GSendInt(IsPassword);
-+
-             if (arr)
-                 ::free( arr );
-             return;
-+        }
-         case ConvPutInfo:
-             if (!GRecvArr( &arr ))
-                 break;
--- 
-2.13.0
-
diff --git a/kscreenlocker-5.10.0.tar.xz b/kscreenlocker-5.10.0.tar.xz
deleted file mode 100644
index 83cb7e5..0000000
--- a/kscreenlocker-5.10.0.tar.xz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:ee625488caa933fb9c174b80b10b425f51ad23eca3aac7d7de20ac1da7d62ed4
-size 110124
diff --git a/kscreenlocker-5.10.1.tar.xz b/kscreenlocker-5.10.1.tar.xz
new file mode 100644
index 0000000..7ec877c
--- /dev/null
+++ b/kscreenlocker-5.10.1.tar.xz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1eac0781b79c163df83b366d9541d2e783062ed89c904377e8f5fdbe9b085859
+size 110604
diff --git a/kscreenlocker.changes b/kscreenlocker.changes
index 891041b..47de8a7 100644
--- a/kscreenlocker.changes
+++ b/kscreenlocker.changes
@@ -1,3 +1,17 @@
+-------------------------------------------------------------------
+Tue Jun  6 17:19:55 CEST 2017 - fabian@ritter-vogt.de
+
+- Update to 5.10.1
+  * New bugfix release
+  * For more details please see:
+  * https://www.kde.org/announcements/plasma-5.10.1.php
+- Changes since 5.10.0:
+  * Fixup protocol mismatch between greeter and kcheckpass (kde#380491)
+  * Fix detection of sys/event.h on FreeBSD < 12
+  * kcheckpass: Add support in for non-Linux platforms via kevent.
+- Remove patches, now upstream:
+  * 0001-Fixup-protocol-mismatch-between-greeter-and-kcheckpa.patch
+
 -------------------------------------------------------------------
 Sun Jun  4 19:00:05 UTC 2017 - fabian@ritter-vogt.de
 
diff --git a/kscreenlocker.spec b/kscreenlocker.spec
index 361c7bd..e06630f 100644
--- a/kscreenlocker.spec
+++ b/kscreenlocker.spec
@@ -18,17 +18,15 @@
 
 %bcond_without lang
 Name:           kscreenlocker
-Version:        5.10.0
+Version:        5.10.1
 Release:        0
 Summary:        Library and components for secure lock screen architecture
 License:        GPL-2.0+
 Group:          System/GUI/KDE
 Url:            https://projects.kde.org/kscreenlocker
-Source:         kscreenlocker-%{version}.tar.xz
+Source:         http://download.kde.org/stable/plasma/%{version}/kscreenlocker-%{version}.tar.xz
 # PATCH-FIX-OPENSUSE fix-wayland-version-requirement.diff -- Changes wayland requirement from 1.3 to 1.2.1
 Patch0:         fix-wayland-version-requirement.diff
-# PATCH-FIX-UPSTREAM
-Patch100:       0001-Fixup-protocol-mismatch-between-greeter-and-kcheckpa.patch
 BuildRequires:  cmake >= 2.8.12
 BuildRequires:  extra-cmake-modules >= 1.8.0
 BuildRequires:  kf5-filesystem
@@ -94,7 +92,6 @@ Development files for Library and components for secure lock screen architecture
 # SLE12 has a patched 1.2.1 wayland with all features KDE needs from up to 1.7.0
 %patch0 -p1
 %endif
-%patch100 -p1
 
 %build
   %cmake_kf5 -d build -- -DKDE4_COMMON_PAM_SERVICE=xdm -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir}