[kde-runtime] rebase passwordless kwallet support
Rex Dieter
rdieter at fedoraproject.org
Sat Nov 23 22:40:02 UTC 2013
commit 10a7be5ef5e58a811510f4e526e5c012d8b8d9e9
Author: Rex Dieter <rdieter at math.unl.edu>
Date: Sat Nov 23 16:39:51 2013 -0600
rebase passwordless kwallet support
...11.95-initial_passwordless_kwallet_option.patch | 128 +++++++++-----------
kde-runtime.spec | 11 +-
2 files changed, 64 insertions(+), 75 deletions(-)
---
diff --git a/kde-runtime-initial_passwordless_kwallet_option.patch b/kde-runtime-4.11.95-initial_passwordless_kwallet_option.patch
similarity index 65%
rename from kde-runtime-initial_passwordless_kwallet_option.patch
rename to kde-runtime-4.11.95-initial_passwordless_kwallet_option.patch
index 90b04d8..892bf62 100644
--- a/kde-runtime-initial_passwordless_kwallet_option.patch
+++ b/kde-runtime-4.11.95-initial_passwordless_kwallet_option.patch
@@ -1,31 +1,10 @@
-diff --git a/kwalletd/kwalletd.h b/kwalletd/kwalletd.h
-index e8e74c3..8382306 100644
---- a/kwalletd/kwalletd.h
-+++ b/kwalletd/kwalletd.h
-@@ -223,6 +223,7 @@ class KWalletD : public QObject, protected QDBusContext {
- // configuration values
- bool _leaveOpen, _closeIdle, _launchManager, _enabled;
- bool _openPrompt, _firstUse, _showingFailureNotify;
-+ bool _silentlyCreateInitialWallet;
- int _idleTime;
- QMap<QString,QStringList> _implicitAllowMap, _implicitDenyMap;
- KTimeout _closeTimers;
-commit da706667bb65f8e0a93372f2ba97fbab28fe4945
-Author: Eike Hein <hein at kde.org>
-Date: Mon May 6 12:49:59 2013 +0200
-
- Add a config option to silently create the initial wallet.
-
- The wallet will have a zero-length password.
-
-diff --git a/kwalletd/kwalletd.cpp b/kwalletd/kwalletd.cpp
-index fa9fc11..660c404 100644
---- a/kwalletd/kwalletd.cpp
-+++ b/kwalletd/kwalletd.cpp
-@@ -501,40 +501,47 @@ int KWalletD::internalOpen(const QString& appid, const QString& wallet, bool isP
- emptyPass = true;
- }
- } else {
+diff -up kde-runtime-4.11.95/kwalletd/kwalletd.cpp.initial_passwordless_kwallet_option kde-runtime-4.11.95/kwalletd/kwalletd.cpp
+--- kde-runtime-4.11.95/kwalletd/kwalletd.cpp.initial_passwordless_kwallet_option 2013-11-20 00:33:51.000000000 -0600
++++ kde-runtime-4.11.95/kwalletd/kwalletd.cpp 2013-11-23 16:29:33.993507120 -0600
+@@ -605,39 +605,45 @@ int KWalletD::internalOpen(const QString
+ } else if (newWalletType == KWallet::BACKEND_CIPHER_BLOWFISH) {
+ #endif // HAVE_QGPGME
+ b->setCipherType(KWallet::BACKEND_CIPHER_BLOWFISH);
- KNewPasswordDialog *kpd = new KNewPasswordDialog();
- if (wallet == KWallet::Wallet::LocalWallet() ||
- wallet == KWallet::Wallet::NetworkWallet())
@@ -36,33 +15,17 @@ index fa9fc11..660c404 100644
- } else {
- kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to open the KDE wallet. This is used to store sensitive data in a secure fashion. Please enter a password to use with this wallet or click cancel to deny the application's request.</qt>", Qt::escape(appid)));
- }
-+ if (!_wallets.count() && _silentlyCreateInitialWallet) {
-+ brandNew = true;
-+ password = QLatin1String("");
-+ b->open(QByteArray());
++ if (!_wallets.count() && _silentlyCreateInitialWallet) {
++ brandNew = true;
++ password = QLatin1String("");
++ b->open(QByteArray());
} else {
- if (appid.length() == 0) {
- kpd->setPrompt(i18n("<qt>KDE has requested to create a new wallet named '<b>%1</b>'. Please choose a password for this wallet, or cancel to deny the application's request.</qt>", Qt::escape(wallet)));
-+ KNewPasswordDialog *kpd = new KNewPasswordDialog();
-+ if (wallet == KWallet::Wallet::LocalWallet() ||
-+ wallet == KWallet::Wallet::NetworkWallet())
-+ {
-+ // Auto create these wallets.
-+ if (appid.isEmpty()) {
-+ kpd->setPrompt(i18n("KDE has requested to open the wallet. This is used to store sensitive data in a secure fashion. Please enter a password to use with this wallet or click cancel to deny the application's request."));
-+ } else {
-+ kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to open the KDE wallet. This is used to store sensitive data in a secure fashion. Please enter a password to use with this wallet or click cancel to deny the application's request.</qt>", Qt::escape(appid)));
-+ }
- } else {
+- } else {
- kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to create a new wallet named '<b>%2</b>'. Please choose a password for this wallet, or cancel to deny the application's request.</qt>", Qt::escape(appid), Qt::escape(wallet)));
-+ if (appid.length() == 0) {
-+ kpd->setPrompt(i18n("<qt>KDE has requested to create a new wallet named '<b>%1</b>'. Please choose a password for this wallet, or cancel to deny the application's request.</qt>", Qt::escape(wallet)));
-+ } else {
-+ kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to create a new wallet named '<b>%2</b>'. Please choose a password for this wallet, or cancel to deny the application's request.</qt>", Qt::escape(appid), Qt::escape(wallet)));
-+ }
- }
+- }
- }
-- brandNew = true;
- kpd->setCaption(i18n("KDE Wallet Service"));
- kpd->setButtonGuiItem(KDialog::Ok,KGuiItem(i18n("C&reate"),"document-new"));
- kpd->setPixmap(KIcon("kwalletmanager").pixmap(96, 96));
@@ -73,32 +36,46 @@ index fa9fc11..660c404 100644
- int rc = b->open(password.toUtf8());
- if (!b->isOpen()) {
- kpd->setPrompt(i18n("<qt>Error opening the wallet '<b>%1</b>'. Please try again.<br />(Error code %2: %3)</qt>", Qt::escape(wallet), rc, KWallet::Backend::openRCToString(rc)));
-+ brandNew = true;
-+ kpd->setCaption(i18n("KDE Wallet Service"));
-+ kpd->setButtonGuiItem(KDialog::Ok,KGuiItem(i18n("C&reate"),"document-new"));
-+ kpd->setPixmap(KIcon("kwalletmanager").pixmap(96, 96));
-+ while (!b->isOpen()) {
-+ setupDialog( kpd, w, appid, modal );
-+ if (kpd->exec() == KDialog::Accepted) {
-+ password = kpd->password();
-+ kDebug() << password;
-+ int rc = b->open(password.toUtf8());
-+ if (!b->isOpen()) {
-+ kpd->setPrompt(i18n("<qt>Error opening the wallet '<b>%1</b>'. Please try again.<br />(Error code %2: %3)</qt>", Qt::escape(wallet), rc, KWallet::Backend::openRCToString(rc)));
-+ }
++ KNewPasswordDialog *kpd = new KNewPasswordDialog();
++ if (wallet == KWallet::Wallet::LocalWallet() ||
++ wallet == KWallet::Wallet::NetworkWallet())
++ {
++ // Auto create these wallets.
++ if (appid.isEmpty()) {
++ kpd->setPrompt(i18n("KDE has requested to open the wallet. This is used to store sensitive data in a secure fashion. Please enter a password to use with this wallet or click cancel to deny the application's request."));
+ } else {
-+ break;
++ kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to open the KDE wallet. This is used to store sensitive data in a secure fashion. Please enter a password to use with this wallet or click cancel to deny the application's request.</qt>", Qt::escape(appid)));
}
-- } else {
+ } else {
- break;
++ if (appid.length() == 0) {
++ kpd->setPrompt(i18n("<qt>KDE has requested to create a new wallet named '<b>%1</b>'. Please choose a password for this wallet, or cancel to deny the application's request.</qt>", Qt::escape(wallet)));
++ } else {
++ kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to create a new wallet named '<b>%2</b>'. Please choose a password for this wallet, or cancel to deny the application's request.</qt>", Qt::escape(appid), Qt::escape(wallet)));
++ }
}
-+ delete kpd;
++ kpd->setCaption(i18n("KDE Wallet Service"));
++ kpd->setButtonGuiItem(KDialog::Ok,KGuiItem(i18n("C&reate"),"document-new"));
++ kpd->setPixmap(KIcon("kwalletmanager").pixmap(96, 96));
++ while (!b->isOpen()) {
++ setupDialog( kpd, w, appid, modal );
++ if (kpd->exec() == KDialog::Accepted) {
++ password = kpd->password();
++ int rc = b->open(password.toUtf8());
++ if (!b->isOpen()) {
++ kpd->setPrompt(i18n("<qt>Error opening the wallet '<b>%1</b>'. Please try again.<br />(Error code %2: %3)</qt>", Qt::escape(wallet), rc, KWallet::Backend::openRCToString(rc)));
++ }
++ } else {
++ break;
++ }
++ }
++ delete kpd;
}
- delete kpd;
- }
-
-
-@@ -1312,6 +1319,7 @@ void KWalletD::reconfigure() {
+ #ifdef HAVE_QGPGME
+ }
+ #endif
+@@ -1439,6 +1445,7 @@ void KWalletD::reconfigure() {
KConfig cfg("kwalletrc");
KConfigGroup walletGroup(&cfg, "Wallet");
_firstUse = walletGroup.readEntry("First Use", true);
@@ -106,3 +83,14 @@ index fa9fc11..660c404 100644
_enabled = walletGroup.readEntry("Enabled", true);
_launchManager = walletGroup.readEntry("Launch Manager", true);
_leaveOpen = walletGroup.readEntry("Leave Open", false);
+diff -up kde-runtime-4.11.95/kwalletd/kwalletd.h.initial_passwordless_kwallet_option kde-runtime-4.11.95/kwalletd/kwalletd.h
+--- kde-runtime-4.11.95/kwalletd/kwalletd.h.initial_passwordless_kwallet_option 2013-11-20 00:33:51.000000000 -0600
++++ kde-runtime-4.11.95/kwalletd/kwalletd.h 2013-11-23 16:11:39.337676557 -0600
+@@ -225,6 +225,7 @@ class KWalletD : public QObject, protect
+ // configuration values
+ bool _leaveOpen, _closeIdle, _launchManager, _enabled;
+ bool _openPrompt, _firstUse, _showingFailureNotify;
++ bool _silentlyCreateInitialWallet;
+ int _idleTime;
+ QMap<QString,QStringList> _implicitAllowMap, _implicitDenyMap;
+ KTimeout _closeTimers;
diff --git a/kde-runtime.spec b/kde-runtime.spec
index d2e3d71..6cb5ff4 100644
--- a/kde-runtime.spec
+++ b/kde-runtime.spec
@@ -6,7 +6,7 @@
Name: kde-runtime
Summary: KDE Runtime
Version: 4.11.95
-Release: 1%{?dist}
+Release: 2%{?dist}
# http://techbase.kde.org/Policies/Licensing_Policy
License: LGPLv2+ and GPLv2+
@@ -57,11 +57,10 @@ Patch51: kde-runtime-4.11.2-install_gdb.patch
# https://bugs.kde.org/show_bug.cgi?id=316546
Patch52: kde-runtime-mouseeventlistener.patch
-
# support password-less kwallet by default (default off)
# rejected upstream, I respectfully disagree -- rex
# https://git.reviewboard.kde.org/r/110328/
-Patch53: kde-runtime-initial_passwordless_kwallet_option.patch
+Patch53: kde-runtime-4.11.95-initial_passwordless_kwallet_option.patch
# Volume gets restored to 100% after each knotify event
# https://bugs.kde.org/show_bug.cgi?id=324975
@@ -210,8 +209,7 @@ Requires: %{name} = %{version}-%{release}
%patch50 -p1 -b .installdgbsymbols
%patch51 -p1 -b .install_gdb
%patch52 -p1 -b .mouseeventlistener
-## REBASE
-#patch53 -p1 -b .initial_passwordless_kwallet_option
+%patch53 -p1 -b .initial_passwordless_kwallet_option
# apply only where phonon-4.7 is used, f20+
%if 0%{?fedora} > 19
%patch60 -p1 -b .canberra
@@ -433,6 +431,9 @@ fi
%changelog
+* Sat Nov 23 2013 Rex Dieter <rdieter at fedoraproject.org> 4.11.95-2
+- rebase passwordless kwallet support
+
* Thu Nov 21 2013 Rex Dieter <rdieter at fedoraproject.org> - 4.11.95-1
- 4.11.95
More information about the scm-commits
mailing list