Date: Monday, August 24, 2015 @ 19:49:28
  Author: arojas
Revision: 244768

archrelease: copy trunk to extra-i686, extra-x86_64

Added:
  kwallet/repos/extra-i686/PKGBUILD
    (from rev 244767, kwallet/trunk/PKGBUILD)
  kwallet/repos/extra-i686/no-migration-wizard.patch
    (from rev 244767, kwallet/trunk/no-migration-wizard.patch)
  kwallet/repos/extra-x86_64/PKGBUILD
    (from rev 244767, kwallet/trunk/PKGBUILD)
  kwallet/repos/extra-x86_64/no-migration-wizard.patch
    (from rev 244767, kwallet/trunk/no-migration-wizard.patch)
Deleted:
  kwallet/repos/extra-i686/PKGBUILD
  kwallet/repos/extra-x86_64/PKGBUILD

----------------------------------------+
 /PKGBUILD                              |   82 +++++++++++++++++
 extra-i686/PKGBUILD                    |   36 -------
 extra-i686/no-migration-wizard.patch   |  144 +++++++++++++++++++++++++++++++
 extra-x86_64/PKGBUILD                  |   36 -------
 extra-x86_64/no-migration-wizard.patch |  144 +++++++++++++++++++++++++++++++
 5 files changed, 370 insertions(+), 72 deletions(-)

Deleted: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD 2015-08-24 17:48:51 UTC (rev 244767)
+++ extra-i686/PKGBUILD 2015-08-24 17:49:28 UTC (rev 244768)
@@ -1,36 +0,0 @@
-# $Id$
-# Maintainer: Felix Yan <felixonm...@archlinux.org>
-# Contributor: Andrea Scarpino <and...@archlinux.org>
-
-pkgname=kwallet
-pkgver=5.13.0
-pkgrel=3
-pkgdesc='Secure and unified container for user passwords'
-arch=('i686' 'x86_64')
-url='https://projects.kde.org/projects/frameworks/kwallet'
-license=('LGPL')
-depends=('knotifications' 'kiconthemes' 'kservice' 'gpgmepp')
-makedepends=('extra-cmake-modules' 'python' 'kdoctools' 'boost')
-groups=('kf5')
-source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz";)
-md5sums=('df67412fef04c891c98facf870ec370f')
-
-prepare() {
-  mkdir -p build
-}
-
-build() {
-  cd build
-  cmake ../${pkgname}-${pkgver} \
-    -DCMAKE_BUILD_TYPE=Release \
-    -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_INSTALL_DIR=lib \
-    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-    -DBUILD_TESTING=OFF
-  make
-}
-
-package() {
-  cd build
-  make DESTDIR="${pkgdir}" install
-}

Copied: kwallet/repos/extra-i686/PKGBUILD (from rev 244767, 
kwallet/trunk/PKGBUILD)
===================================================================
--- extra-i686/PKGBUILD                         (rev 0)
+++ extra-i686/PKGBUILD 2015-08-24 17:49:28 UTC (rev 244768)
@@ -0,0 +1,41 @@
+# $Id$
+# Maintainer: Felix Yan <felixonm...@archlinux.org>
+# Contributor: Andrea Scarpino <and...@archlinux.org>
+
+pkgname=kwallet
+pkgver=5.13.0
+pkgrel=4
+pkgdesc='Secure and unified container for user passwords'
+arch=('i686' 'x86_64')
+url='https://projects.kde.org/projects/frameworks/kwallet'
+license=('LGPL')
+depends=('knotifications' 'kiconthemes' 'kservice' 'gpgmepp')
+makedepends=('extra-cmake-modules' 'python' 'kdoctools' 'boost')
+groups=('kf5')
+source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz";
 'no-migration-wizard.patch')
+md5sums=('df67412fef04c891c98facf870ec370f'
+         '8d5ad74a46e345d2bd5c537353d48298')
+
+prepare() {
+  mkdir -p build
+
+  cd $pkgname-$pkgver
+# Don't show migration wizard
+  patch -p1 -i ../no-migration-wizard.patch
+}
+
+build() {
+  cd build
+  cmake ../${pkgname}-${pkgver} \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DLIB_INSTALL_DIR=lib \
+    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+    -DBUILD_TESTING=OFF
+  make
+}
+
+package() {
+  cd build
+  make DESTDIR="${pkgdir}" install
+}

Copied: kwallet/repos/extra-i686/no-migration-wizard.patch (from rev 244767, 
kwallet/trunk/no-migration-wizard.patch)
===================================================================
--- extra-i686/no-migration-wizard.patch                                (rev 0)
+++ extra-i686/no-migration-wizard.patch        2015-08-24 17:49:28 UTC (rev 
244768)
@@ -0,0 +1,144 @@
+From: Valentin Rusu <k...@rusu.info>
+Date: Fri, 07 Aug 2015 16:59:04 +0000
+Subject: Stop showing the migration wizard by default
+X-Git-Url: 
http://quickgit.kde.org/?p=kwallet.git&a=commitdiff&h=127efedd1668b546d0ac8c83655a2056d0439f29
+---
+Stop showing the migration wizard by default
+
+BUG:351056
+
+If the migration wizard is needed, then add this to kwalletrc
+[Migration]
+showMigrationWizard=true
+
+On systems having kwallet-pam the migration agent would also merge all the old
+wallets into the default LocalWallet, as a side effect. This would avoid
+wallet creation prompts, though.
+---
+
+
+--- a/src/runtime/kwalletd/main.cpp
++++ b/src/runtime/kwalletd/main.cpp
+@@ -186,7 +186,7 @@
+     aboutdata.addAuthor(i18n("Thiago Maceira"), i18n("D-Bus Interface"), 
"thi...@kde.org");
+ 
+     KWalletD walletd;
+-    MigrationAgent migrationAgent(&walletd);
++    MigrationAgent migrationAgent(&walletd, hash);
+     KDBusService dbusUniqueInstance(KDBusService::Unique | 
KDBusService::NoExitOnFailure);
+ 
+     // NOTE: the command should be parsed only after KDBusService 
instantiation
+
+--- a/src/runtime/kwalletd/migrationagent.cpp
++++ b/src/runtime/kwalletd/migrationagent.cpp
+@@ -34,10 +34,12 @@
+ 
+ #define SERVICE_KWALLETD4 "org.kde.kwalletd"
+ #define ENTRY_ALREADY_MIGRATED "alreadyMigrated"
+-
+-MigrationAgent::MigrationAgent(KWalletD* kd) :
++#define ENTRY_SHOW_MIGRATION_WIZARD "showMigrationWizard"
++
++MigrationAgent::MigrationAgent(KWalletD* kd, const char *hash) :
+   _kf5_daemon(kd)
+   , _kde4_daemon(0)
++  , _pam_hash(hash)
+ {
+   QTimer::singleShot(100, this, SLOT(migrateWallets()));
+ }
+@@ -118,11 +120,27 @@
+ {
+     bool ok = false;
+ 
+-    MigrationWizard *wizard = new MigrationWizard(this);
+-    int result = wizard->exec();
+-    if (QDialog::Accepted == result) {
+-        // the user either migrated the wallets, or choose not to be prompted 
again
+-        ok = true;
++    // The migration wizard would no longer been shown by default.
++    // see BUG 351056
++    // NOTE if user wants to show the migration wizard, then he should add the
++    // following setting to the kwalletrc:
++    // [Migration]
++    // showMigrationWizard=true
++    KConfig kwalletrc("kwalletrc");
++    KConfigGroup cfg(&kwalletrc, "Migration");
++    bool showMigrationWizard = 
cfg.readEntry<bool>(ENTRY_SHOW_MIGRATION_WIZARD, false);
++
++    if (showMigrationWizard) {
++        MigrationWizard *wizard = new MigrationWizard(this);
++        int result = wizard->exec();
++        if (QDialog::Accepted == result) {
++            // the user either migrated the wallets, or choose not to be 
prompted again
++            ok = true;
++        }
++    } else {
++        if (performMigration(0, true)) {
++            qDebug() << "Migration failed.";
++        }
+     }
+ 
+     return ok;
+@@ -162,7 +180,7 @@
+     return wallets.length() == 0;
+ }
+ 
+-bool MigrationAgent::performMigration(WId wid)
++bool MigrationAgent::performMigration(WId wid, bool withoutWizard)
+ {
+     auto appId = i18n("KDE Wallet Migration Agent");
+     try {
+@@ -174,7 +192,15 @@
+             emit progressMessage(i18n("Migrating wallet: %1", wallet));
+             emit progressMessage(i18n("* Creating KF5 wallet: %1", wallet));
+ 
+-            int handle5 = _kf5_daemon->internalOpen(appId, wallet, false, 0, 
true, QString());
++            int handle5 = -1;
++            if (withoutWizard && (_pam_hash != nullptr)) {
++                // see BUG 351056 for why this hacky code
++                // If the user has several wallets, all the values will be
++                // merged into the single LocalWallet
++                handle5 = 
_kf5_daemon->pamOpen(KWallet::Wallet::LocalWallet(), _pam_hash, 0);
++            } else {
++                handle5 = _kf5_daemon->internalOpen(appId, wallet, false, 0, 
true, QString());
++            }
+             if (handle5 <0) {
+                 emit progressMessage(i18n("ERROR when attempting new wallet 
creation. Aborting."));
+                 return false;
+
+--- a/src/runtime/kwalletd/migrationagent.h
++++ b/src/runtime/kwalletd/migrationagent.h
+@@ -32,10 +32,10 @@
+ class MigrationAgent : public QObject {
+     Q_OBJECT
+ public:
+-    MigrationAgent(KWalletD* kd);
++    MigrationAgent(KWalletD* kd, const char* hash);
+ 
+     bool isEmptyOldWallet() const;
+-    bool performMigration(WId wid);
++    bool performMigration(WId wid, bool withoutWizard);
+ 
+ private Q_SLOTS:
+     void migrateWallets();
+@@ -52,6 +52,7 @@
+ private:
+     KWalletD          *_kf5_daemon;
+     org::kde::KWallet         *_kde4_daemon;
++    const char  *_pam_hash;
+ };
+ 
+ #endif // _MIGRATIONAGENT_H_
+
+--- a/src/runtime/kwalletd/migrationwizard.cpp
++++ b/src/runtime/kwalletd/migrationwizard.cpp
+@@ -58,7 +58,7 @@
+ 
+     virtual void initializePage() {
+         connect(_agent, SIGNAL(progressMessage(QString)), _ui._report, 
SLOT(append(QString)));
+-        _migrationCompleted = _agent->performMigration(winId());
++        _migrationCompleted = _agent->performMigration(winId(), false);
+         emit completeChanged();
+     }
+ 
+

Deleted: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD       2015-08-24 17:48:51 UTC (rev 244767)
+++ extra-x86_64/PKGBUILD       2015-08-24 17:49:28 UTC (rev 244768)
@@ -1,36 +0,0 @@
-# $Id$
-# Maintainer: Felix Yan <felixonm...@archlinux.org>
-# Contributor: Andrea Scarpino <and...@archlinux.org>
-
-pkgname=kwallet
-pkgver=5.13.0
-pkgrel=3
-pkgdesc='Secure and unified container for user passwords'
-arch=('i686' 'x86_64')
-url='https://projects.kde.org/projects/frameworks/kwallet'
-license=('LGPL')
-depends=('knotifications' 'kiconthemes' 'kservice' 'gpgmepp')
-makedepends=('extra-cmake-modules' 'python' 'kdoctools' 'boost')
-groups=('kf5')
-source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz";)
-md5sums=('df67412fef04c891c98facf870ec370f')
-
-prepare() {
-  mkdir -p build
-}
-
-build() {
-  cd build
-  cmake ../${pkgname}-${pkgver} \
-    -DCMAKE_BUILD_TYPE=Release \
-    -DCMAKE_INSTALL_PREFIX=/usr \
-    -DLIB_INSTALL_DIR=lib \
-    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-    -DBUILD_TESTING=OFF
-  make
-}
-
-package() {
-  cd build
-  make DESTDIR="${pkgdir}" install
-}

Copied: kwallet/repos/extra-x86_64/PKGBUILD (from rev 244767, 
kwallet/trunk/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD                               (rev 0)
+++ extra-x86_64/PKGBUILD       2015-08-24 17:49:28 UTC (rev 244768)
@@ -0,0 +1,41 @@
+# $Id$
+# Maintainer: Felix Yan <felixonm...@archlinux.org>
+# Contributor: Andrea Scarpino <and...@archlinux.org>
+
+pkgname=kwallet
+pkgver=5.13.0
+pkgrel=4
+pkgdesc='Secure and unified container for user passwords'
+arch=('i686' 'x86_64')
+url='https://projects.kde.org/projects/frameworks/kwallet'
+license=('LGPL')
+depends=('knotifications' 'kiconthemes' 'kservice' 'gpgmepp')
+makedepends=('extra-cmake-modules' 'python' 'kdoctools' 'boost')
+groups=('kf5')
+source=("http://download.kde.org/stable/frameworks/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz";
 'no-migration-wizard.patch')
+md5sums=('df67412fef04c891c98facf870ec370f'
+         '8d5ad74a46e345d2bd5c537353d48298')
+
+prepare() {
+  mkdir -p build
+
+  cd $pkgname-$pkgver
+# Don't show migration wizard
+  patch -p1 -i ../no-migration-wizard.patch
+}
+
+build() {
+  cd build
+  cmake ../${pkgname}-${pkgver} \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DLIB_INSTALL_DIR=lib \
+    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+    -DBUILD_TESTING=OFF
+  make
+}
+
+package() {
+  cd build
+  make DESTDIR="${pkgdir}" install
+}

Copied: kwallet/repos/extra-x86_64/no-migration-wizard.patch (from rev 244767, 
kwallet/trunk/no-migration-wizard.patch)
===================================================================
--- extra-x86_64/no-migration-wizard.patch                              (rev 0)
+++ extra-x86_64/no-migration-wizard.patch      2015-08-24 17:49:28 UTC (rev 
244768)
@@ -0,0 +1,144 @@
+From: Valentin Rusu <k...@rusu.info>
+Date: Fri, 07 Aug 2015 16:59:04 +0000
+Subject: Stop showing the migration wizard by default
+X-Git-Url: 
http://quickgit.kde.org/?p=kwallet.git&a=commitdiff&h=127efedd1668b546d0ac8c83655a2056d0439f29
+---
+Stop showing the migration wizard by default
+
+BUG:351056
+
+If the migration wizard is needed, then add this to kwalletrc
+[Migration]
+showMigrationWizard=true
+
+On systems having kwallet-pam the migration agent would also merge all the old
+wallets into the default LocalWallet, as a side effect. This would avoid
+wallet creation prompts, though.
+---
+
+
+--- a/src/runtime/kwalletd/main.cpp
++++ b/src/runtime/kwalletd/main.cpp
+@@ -186,7 +186,7 @@
+     aboutdata.addAuthor(i18n("Thiago Maceira"), i18n("D-Bus Interface"), 
"thi...@kde.org");
+ 
+     KWalletD walletd;
+-    MigrationAgent migrationAgent(&walletd);
++    MigrationAgent migrationAgent(&walletd, hash);
+     KDBusService dbusUniqueInstance(KDBusService::Unique | 
KDBusService::NoExitOnFailure);
+ 
+     // NOTE: the command should be parsed only after KDBusService 
instantiation
+
+--- a/src/runtime/kwalletd/migrationagent.cpp
++++ b/src/runtime/kwalletd/migrationagent.cpp
+@@ -34,10 +34,12 @@
+ 
+ #define SERVICE_KWALLETD4 "org.kde.kwalletd"
+ #define ENTRY_ALREADY_MIGRATED "alreadyMigrated"
+-
+-MigrationAgent::MigrationAgent(KWalletD* kd) :
++#define ENTRY_SHOW_MIGRATION_WIZARD "showMigrationWizard"
++
++MigrationAgent::MigrationAgent(KWalletD* kd, const char *hash) :
+   _kf5_daemon(kd)
+   , _kde4_daemon(0)
++  , _pam_hash(hash)
+ {
+   QTimer::singleShot(100, this, SLOT(migrateWallets()));
+ }
+@@ -118,11 +120,27 @@
+ {
+     bool ok = false;
+ 
+-    MigrationWizard *wizard = new MigrationWizard(this);
+-    int result = wizard->exec();
+-    if (QDialog::Accepted == result) {
+-        // the user either migrated the wallets, or choose not to be prompted 
again
+-        ok = true;
++    // The migration wizard would no longer been shown by default.
++    // see BUG 351056
++    // NOTE if user wants to show the migration wizard, then he should add the
++    // following setting to the kwalletrc:
++    // [Migration]
++    // showMigrationWizard=true
++    KConfig kwalletrc("kwalletrc");
++    KConfigGroup cfg(&kwalletrc, "Migration");
++    bool showMigrationWizard = 
cfg.readEntry<bool>(ENTRY_SHOW_MIGRATION_WIZARD, false);
++
++    if (showMigrationWizard) {
++        MigrationWizard *wizard = new MigrationWizard(this);
++        int result = wizard->exec();
++        if (QDialog::Accepted == result) {
++            // the user either migrated the wallets, or choose not to be 
prompted again
++            ok = true;
++        }
++    } else {
++        if (performMigration(0, true)) {
++            qDebug() << "Migration failed.";
++        }
+     }
+ 
+     return ok;
+@@ -162,7 +180,7 @@
+     return wallets.length() == 0;
+ }
+ 
+-bool MigrationAgent::performMigration(WId wid)
++bool MigrationAgent::performMigration(WId wid, bool withoutWizard)
+ {
+     auto appId = i18n("KDE Wallet Migration Agent");
+     try {
+@@ -174,7 +192,15 @@
+             emit progressMessage(i18n("Migrating wallet: %1", wallet));
+             emit progressMessage(i18n("* Creating KF5 wallet: %1", wallet));
+ 
+-            int handle5 = _kf5_daemon->internalOpen(appId, wallet, false, 0, 
true, QString());
++            int handle5 = -1;
++            if (withoutWizard && (_pam_hash != nullptr)) {
++                // see BUG 351056 for why this hacky code
++                // If the user has several wallets, all the values will be
++                // merged into the single LocalWallet
++                handle5 = 
_kf5_daemon->pamOpen(KWallet::Wallet::LocalWallet(), _pam_hash, 0);
++            } else {
++                handle5 = _kf5_daemon->internalOpen(appId, wallet, false, 0, 
true, QString());
++            }
+             if (handle5 <0) {
+                 emit progressMessage(i18n("ERROR when attempting new wallet 
creation. Aborting."));
+                 return false;
+
+--- a/src/runtime/kwalletd/migrationagent.h
++++ b/src/runtime/kwalletd/migrationagent.h
+@@ -32,10 +32,10 @@
+ class MigrationAgent : public QObject {
+     Q_OBJECT
+ public:
+-    MigrationAgent(KWalletD* kd);
++    MigrationAgent(KWalletD* kd, const char* hash);
+ 
+     bool isEmptyOldWallet() const;
+-    bool performMigration(WId wid);
++    bool performMigration(WId wid, bool withoutWizard);
+ 
+ private Q_SLOTS:
+     void migrateWallets();
+@@ -52,6 +52,7 @@
+ private:
+     KWalletD          *_kf5_daemon;
+     org::kde::KWallet         *_kde4_daemon;
++    const char  *_pam_hash;
+ };
+ 
+ #endif // _MIGRATIONAGENT_H_
+
+--- a/src/runtime/kwalletd/migrationwizard.cpp
++++ b/src/runtime/kwalletd/migrationwizard.cpp
+@@ -58,7 +58,7 @@
+ 
+     virtual void initializePage() {
+         connect(_agent, SIGNAL(progressMessage(QString)), _ui._report, 
SLOT(append(QString)));
+-        _migrationCompleted = _agent->performMigration(winId());
++        _migrationCompleted = _agent->performMigration(winId(), false);
+         emit completeChanged();
+     }
+ 
+

Reply via email to