[polkit-kde] patch to bring polkit auth dialog to front patch restart polkit-kde on crash patch to remove unimpli
Rex Dieter
rdieter at fedoraproject.org
Mon Dec 12 14:11:39 UTC 2011
commit 39266139cd01b62f81b38d2a6267a8ba2a76cf90
Author: Rex Dieter <rdieter at fedoraproject.org>
Date: Mon Dec 12 08:11:29 2011 -0600
patch to bring polkit auth dialog to front
patch restart polkit-kde on crash
patch to remove unimplimented 'remember authorization' checkbox
...uth-dialog-to-the-front-when-it-is-shown..patch | 34 ++++++++++++
...-when-we-crash.-This-way-a-polkit-kde-1-c.patch | 35 ++++++++++++
...e-can-only-set-KCrash-flags-after-KCmdLin.patch | 30 ++++++++++
...-unused-Remember-authorization-checkboxes.patch | 58 ++++++++++++++++++++
0020-CCMAIL-echidnaman-kubuntu.org.patch | 37 +++++++++++++
polkit-kde.spec | 26 ++++++++-
6 files changed, 217 insertions(+), 3 deletions(-)
---
diff --git a/0005-Bring-the-auth-dialog-to-the-front-when-it-is-shown..patch b/0005-Bring-the-auth-dialog-to-the-front-when-it-is-shown..patch
new file mode 100644
index 0000000..f7d3dfc
--- /dev/null
+++ b/0005-Bring-the-auth-dialog-to-the-front-when-it-is-shown..patch
@@ -0,0 +1,34 @@
+From 0701f84a57156f8f584bb4fe928811a26ceefcf0 Mon Sep 17 00:00:00 2001
+From: Jonathan Thomas <echidnaman at kubuntu.org>
+Date: Wed, 19 Jan 2011 10:21:53 -0500
+Subject: [PATCH 05/20] Bring the auth dialog to the front when it is shown.
+ Otherwise it pops up behind the app requesting it and
+ the user never sees it.
+
+---
+ policykitlistener.cpp | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/policykitlistener.cpp b/policykitlistener.cpp
+index 68185bc..bb95f1d 100644
+--- a/policykitlistener.cpp
++++ b/policykitlistener.cpp
+@@ -22,6 +22,7 @@
+ #include "AuthDialog.h"
+
+ #include <KDebug>
++#include <KWindowSystem>
+
+ #include <PolkitQt1/Agent/Listener>
+ #include <PolkitQt1/Agent/Session>
+@@ -100,6 +101,7 @@ void PolicyKitListener::initiateAuthentication(const QString &actionId,
+ kDebug() << "WinId of the dialog is " << m_dialog.data()->winId() << m_dialog.data()->effectiveWinId();
+ m_dialog.data()->setOptions();
+ m_dialog.data()->show();
++ KWindowSystem::forceActiveWindow(m_dialog.data()->winId());
+ kDebug() << "WinId of the shown dialog is " << m_dialog.data()->winId() << m_dialog.data()->effectiveWinId();
+
+ m_numTries = 0;
+--
+1.7.7.4
+
diff --git a/0016-Autorestart-when-we-crash.-This-way-a-polkit-kde-1-c.patch b/0016-Autorestart-when-we-crash.-This-way-a-polkit-kde-1-c.patch
new file mode 100644
index 0000000..28e928b
--- /dev/null
+++ b/0016-Autorestart-when-we-crash.-This-way-a-polkit-kde-1-c.patch
@@ -0,0 +1,35 @@
+From 34b6e24316e83bb13bb1b420616bc986783bb249 Mon Sep 17 00:00:00 2001
+From: Jonathan Thomas <echidnaman at kubuntu.org>
+Date: Sat, 22 Oct 2011 19:31:55 -0400
+Subject: [PATCH 16/20] Autorestart when we crash. This way a polkit-kde-1
+ crash won't prevent polkit auth from working until
+ the next login.
+
+---
+ main.cpp | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/main.cpp b/main.cpp
+index e197cee..2fa928f 100644
+--- a/main.cpp
++++ b/main.cpp
+@@ -21,6 +21,7 @@
+ #include <KCmdLineArgs>
+ #include <KAboutData>
+ #include <KLocale>
++#include <KCrash>
+
+ #include "policykitkde.h"
+
+@@ -32,6 +33,8 @@ int main(int argc, char *argv[])
+ aboutData.addAuthor(ki18n("Jaroslav Reznik"), ki18n("Maintainer"), "jreznik at redhat.com");
+ aboutData.setProductName("policykit-kde/polkit-kde-authentication-agent-1");
+
++ KCrash::setFlags(KCrash::AutoRestart);
++
+ KCmdLineArgs::init(argc, argv, &aboutData);
+
+ if (!PolicyKitKDE::start()) {
+--
+1.7.7.4
+
diff --git a/0017-Of-course-we-can-only-set-KCrash-flags-after-KCmdLin.patch b/0017-Of-course-we-can-only-set-KCrash-flags-after-KCmdLin.patch
new file mode 100644
index 0000000..b4d7e5f
--- /dev/null
+++ b/0017-Of-course-we-can-only-set-KCrash-flags-after-KCmdLin.patch
@@ -0,0 +1,30 @@
+From 599b36eddd2ae4d8d2967255c503a680002dabf7 Mon Sep 17 00:00:00 2001
+From: Jonathan Thomas <echidnaman at kubuntu.org>
+Date: Tue, 25 Oct 2011 17:28:38 -0400
+Subject: [PATCH 17/20] Of course, we can only set KCrash flags after
+ KCmdLineArgs::init() has been called
+
+---
+ main.cpp | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/main.cpp b/main.cpp
+index 2fa928f..ab359b7 100644
+--- a/main.cpp
++++ b/main.cpp
+@@ -33,10 +33,10 @@ int main(int argc, char *argv[])
+ aboutData.addAuthor(ki18n("Jaroslav Reznik"), ki18n("Maintainer"), "jreznik at redhat.com");
+ aboutData.setProductName("policykit-kde/polkit-kde-authentication-agent-1");
+
+- KCrash::setFlags(KCrash::AutoRestart);
+-
+ KCmdLineArgs::init(argc, argv, &aboutData);
+
++ KCrash::setFlags(KCrash::AutoRestart);
++
+ if (!PolicyKitKDE::start()) {
+ qWarning("PolicyKitKDE is already running!\n");
+ return 0;
+--
+1.7.7.4
+
diff --git a/0019-Remove-unused-Remember-authorization-checkboxes.patch b/0019-Remove-unused-Remember-authorization-checkboxes.patch
new file mode 100644
index 0000000..f0a7df2
--- /dev/null
+++ b/0019-Remove-unused-Remember-authorization-checkboxes.patch
@@ -0,0 +1,58 @@
+From 27cfdc75084e57f22ba93c54f2387a7c47378d90 Mon Sep 17 00:00:00 2001
+From: Felix Geyer <debfx-kde at fobos.de>
+Date: Tue, 8 Nov 2011 20:44:05 +0100
+Subject: [PATCH 19/20] Remove unused "Remember authorization" checkboxes.
+
+The checkboxes were visible in the UI but the feature
+isn't actually implemented.
+---
+ AuthDialog.ui | 33 ---------------------------------
+ 1 files changed, 0 insertions(+), 33 deletions(-)
+
+diff --git a/AuthDialog.ui b/AuthDialog.ui
+index 27480ff..3b9bbc6 100644
+--- a/AuthDialog.ui
++++ b/AuthDialog.ui
+@@ -114,39 +114,6 @@
+ </property>
+ </widget>
+ </item>
+- <item row="4" column="1" colspan="3" >
+- <widget class="QCheckBox" name="cbRemember" >
+- <property name="text" >
+- <string>Remember authorization</string>
+- </property>
+- <property name="checked" >
+- <bool>true</bool>
+- </property>
+- </widget>
+- </item>
+- <item row="5" column="2" colspan="2" >
+- <widget class="QCheckBox" name="cbSessionOnly" >
+- <property name="text" >
+- <string>For this session only</string>
+- </property>
+- </widget>
+- </item>
+- <item row="5" column="1" >
+- <spacer name="horizontalSpacer" >
+- <property name="orientation" >
+- <enum>Qt::Horizontal</enum>
+- </property>
+- <property name="sizeType" >
+- <enum>QSizePolicy::Fixed</enum>
+- </property>
+- <property name="sizeHint" stdset="0" >
+- <size>
+- <width>15</width>
+- <height>10</height>
+- </size>
+- </property>
+- </spacer>
+- </item>
+ <item row="1" column="1" colspan="3" >
+ <widget class="KComboBox" name="userCB" />
+ </item>
+--
+1.7.7.4
+
diff --git a/0020-CCMAIL-echidnaman-kubuntu.org.patch b/0020-CCMAIL-echidnaman-kubuntu.org.patch
new file mode 100644
index 0000000..3f3f9fe
--- /dev/null
+++ b/0020-CCMAIL-echidnaman-kubuntu.org.patch
@@ -0,0 +1,37 @@
+From 3a9906d2b5d1c504670442277906ed53cd9686e8 Mon Sep 17 00:00:00 2001
+From: Dario Freddi <drf at kde.org>
+Date: Fri, 25 Nov 2011 23:08:07 +0100
+Subject: [PATCH 20/20] CCMAIL: echidnaman at kubuntu.org
+
+KCrash must be initialized after KUniqueApplication is started, to avoid KCmdLine to parse its arguments before that.
+
+P.S.: While I do appreciate the contribution and I think the patch was really useful,
+it would be awesome if those changes went through review first. If they went through and I forgot
+about it and didn't spot the problem earlier, feel free to hit me with a stick instead.
+---
+ main.cpp | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/main.cpp b/main.cpp
+index ab359b7..33ef236 100644
+--- a/main.cpp
++++ b/main.cpp
+@@ -35,13 +35,13 @@ int main(int argc, char *argv[])
+
+ KCmdLineArgs::init(argc, argv, &aboutData);
+
+- KCrash::setFlags(KCrash::AutoRestart);
+-
+ if (!PolicyKitKDE::start()) {
+ qWarning("PolicyKitKDE is already running!\n");
+ return 0;
+ }
+
++ KCrash::setFlags(KCrash::AutoRestart);
++
+ PolicyKitKDE agent;
+ agent.disableSessionManagement();
+ agent.exec();
+--
+1.7.7.4
+
diff --git a/polkit-kde.spec b/polkit-kde.spec
index a49e0d5..f23283d 100644
--- a/polkit-kde.spec
+++ b/polkit-kde.spec
@@ -1,6 +1,6 @@
Name: polkit-kde
Version: 0.99.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: PolicyKit integration for KDE Desktop
Group: Applications/System
@@ -10,6 +10,13 @@ URL: http://www.kde.org/
Source0: ftp://ftp.kde.org/pub/kde/stable/apps/KDE4.x/admin/polkit-kde-agent-1-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+## upstream patches
+Patch05: 0005-Bring-the-auth-dialog-to-the-front-when-it-is-shown..patch
+Patch16: 0016-Autorestart-when-we-crash.-This-way-a-polkit-kde-1-c.patch
+Patch17: 0017-Of-course-we-can-only-set-KCrash-flags-after-KCmdLin.patch
+Patch19: 0019-Remove-unused-Remember-authorization-checkboxes.patch
+Patch20: 0020-CCMAIL-echidnaman-kubuntu.org.patch
+
BuildRequires: kdelibs4-devel
BuildRequires: polkit-qt-devel >= 0.99.0
BuildRequires: cmake
@@ -28,6 +35,12 @@ Provides Policy Kit Authentication Agent that nicely fits to KDE.
%prep
%setup -q -n polkit-kde-agent-1-%{version}
+%patch05 -p1 -b .0005
+%patch16 -p1 -b .0016
+%patch17 -p1 -b .0017
+%patch19 -p1 -b .0019
+%patch20 -p1 -b .0020
+
%build
mkdir -p %{_target_platform}
@@ -35,15 +48,16 @@ pushd %{_target_platform}
%{cmake_kde4} ..
popd
-make %{?_smp_mflags} -C %{_target_platform} VERBOSE=1
+make %{?_smp_mflags} -C %{_target_platform}
%install
rm -rf %{buildroot}
-make install DESTDIR=%{buildroot} -C %{_target_platform}
+make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%find_lang polkit-kde-authentication-agent-1
+
%clean
rm -rf %{buildroot}
@@ -55,7 +69,13 @@ rm -rf %{buildroot}
%{_datadir}/autostart/polkit-kde-authentication-agent-1.desktop
%{_kde4_appsdir}/policykit1-kde/policykit1-kde.notifyrc
+
%changelog
+* Mon Dec 12 2011 Rex Dieter <rdieter at fedoraproject.org> 0.99.0-3
+- patch to bring polkit auth dialog to front
+- patch restart polkit-kde on crash
+- patch to remove unimplimented 'remember authorization' checkbox
+
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.99.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
More information about the scm-commits
mailing list