Hello community, here is the log from the commit of package qtkeychain-qt5 for openSUSE:Factory checked in at 2018-10-23 20:40:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qtkeychain-qt5 (Old) and /work/SRC/openSUSE:Factory/.qtkeychain-qt5.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qtkeychain-qt5" Tue Oct 23 20:40:48 2018 rev:5 rq:643801 version:0.9.1 Changes: -------- --- /work/SRC/openSUSE:Factory/qtkeychain-qt5/qtkeychain-qt5.changes 2018-05-29 10:47:48.114111820 +0200 +++ /work/SRC/openSUSE:Factory/.qtkeychain-qt5.new/qtkeychain-qt5.changes 2018-10-23 20:41:53.148437113 +0200 @@ -1,0 +2,8 @@ +Mon Oct 22 14:07:18 UTC 2018 - Christophe Giboudeaux <christo...@krop.fr> + +- Update to 0.9.1. Changes since 0.8.0: + * Only require QtLinguist if building translations + * Fall back on libsecret if kwallet is not available + * Secret: Don't match the schema name + +------------------------------------------------------------------- Old: ---- v0.8.0.tar.gz New: ---- v0.9.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qtkeychain-qt5.spec ++++++ --- /var/tmp/diff_new_pack.2AGbaw/_old 2018-10-23 20:41:57.116432373 +0200 +++ /var/tmp/diff_new_pack.2AGbaw/_new 2018-10-23 20:41:57.116432373 +0200 @@ -12,13 +12,13 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define lname libqt5keychain1 Name: qtkeychain-qt5 -Version: 0.8.0 +Version: 0.9.1 Release: 0 Summary: A cross platform password store library License: BSD-2-Clause ++++++ v0.8.0.tar.gz -> v0.9.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtkeychain-0.8.0/CMakeLists.txt new/qtkeychain-0.9.1/CMakeLists.txt --- old/qtkeychain-0.8.0/CMakeLists.txt 2017-04-19 15:09:34.000000000 +0200 +++ new/qtkeychain-0.9.1/CMakeLists.txt 2018-08-20 08:23:34.000000000 +0200 @@ -5,7 +5,7 @@ ### -set(QTKEYCHAIN_VERSION 0.8.0) +set(QTKEYCHAIN_VERSION 0.9.1) set(QTKEYCHAIN_SOVERSION 1) ### @@ -18,6 +18,7 @@ include(ECMGeneratePriFile) option(BUILD_WITH_QT4 "Build qtkeychain with Qt4 no matter if Qt5 was found" OFF) +option(BUILD_TEST_APPLICATION "Build test application" ON) option(BUILD_TRANSLATIONS "Build translations" ON) option(QTKEYCHAIN_STATIC "Build static library" OFF) @@ -38,7 +39,7 @@ find_package(Qt5Core QUIET) endif() -if (Qt5Core_FOUND) +if (Qt5Core_FOUND AND NOT BUILD_WITH_QT4) set(QTKEYCHAIN_VERSION_INFIX 5) if(UNIX AND NOT APPLE AND NOT ANDROID) @@ -49,13 +50,17 @@ qt5_add_dbus_interface(${ARGN}) endmacro() endif() - find_package(Qt5LinguistTools REQUIRED) - macro(qt_add_translation) - qt5_add_translation(${ARGN}) - endmacro(qt_add_translation) - macro(qt_create_translation) - qt5_create_translation(${ARGN}) - endmacro(qt_create_translation) + + if(BUILD_TRANSLATIONS) + find_package(Qt5LinguistTools REQUIRED) + macro(qt_add_translation) + qt5_add_translation(${ARGN}) + endmacro(qt_add_translation) + macro(qt_create_translation) + qt5_create_translation(${ARGN}) + endmacro(qt_create_translation) + endif() + macro(qt_wrap_cpp) qt5_wrap_cpp(${ARGN}) endmacro() @@ -118,7 +123,7 @@ if(WIN32) list(APPEND qtkeychain_SOURCES keychain_win.cpp) - if (!USE_CREDENTIAL_STORE) + if (NOT USE_CREDENTIAL_STORE) list(APPEND qtkeychain_LIBRARIES crypt32) list(APPEND qtkeychain_SOURCES plaintextstore.cpp) endif() @@ -152,6 +157,7 @@ add_definitions(-DHAVE_LIBSECRET=1) endif() INCLUDE_DIRECTORIES(${LIBSECRET_INCLUDE_DIRS}) + list(APPEND qtkeychain_LIBRARIES ${LIBSECRET_LIBRARIES}) endif() list(APPEND qtkeychain_SOURCES keychain_unix.cpp gnomekeyring.cpp libsecret.cpp plaintextstore.cpp) @@ -224,8 +230,10 @@ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) -add_executable( testclient testclient.cpp ) -target_link_libraries( testclient ${QTKEYCHAIN_TARGET_NAME}) +if(BUILD_TEST_APPLICATION) + add_executable( testclient testclient.cpp ) + target_link_libraries( testclient ${QTKEYCHAIN_TARGET_NAME}) +endif() ### diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtkeychain-0.8.0/ChangeLog new/qtkeychain-0.9.1/ChangeLog --- old/qtkeychain-0.8.0/ChangeLog 2017-04-19 15:09:34.000000000 +0200 +++ new/qtkeychain-0.9.1/ChangeLog 2018-08-20 08:23:34.000000000 +0200 @@ -1,6 +1,18 @@ ChangeLog ========= +version 0.9.1 (release 2018-08-20) + * Windows Credential Store: Use CRED_PERSIST_ENTERPRISE (Olivier Goffart <ogoff...@woboq.com>) + * Secret: Don't match the schema name #114 (Christian Kamm <m...@ckamm.de>) + * Fix qmake build on Windows (Alexander Gorishnyak <kefir...@gmail.com>) + +version 0.9.0 (release 2018-07-13) + * Fall back on libsecret if kwallet is not available (Christian Kamm <m...@ckamm.de>) + * Only require QtLinguist if building translations (Victor Kropp <victor.kr...@jetbrains.com>) + * Fix building on Windows without credential store (Dmitry Ivanov <dm.vl.iva...@gmail.com>) + * Fix Qt 4 build (Sandro Knauß <he...@debian.org>) + * Make build of test application optional (Boris Pek <tehnic...@yandex.ru>) + version 0.8.0 (release 2017-04-19) * Buildsystem improvements (Kristofer Tingdahl <kristofer.tingd...@dgbes.com>, Hannah von Reth <hannah.vonr...@kdab.com>, Giuseppe D'Angelo <giuseppe.dang...@kdab.com>) * Enable C++11 support for Qt >= 5.7 (Dmitry Ivanov <dm.vl.iva...@gmail.com>) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtkeychain-0.8.0/keychain_unix.cpp new/qtkeychain-0.9.1/keychain_unix.cpp --- old/qtkeychain-0.8.0/keychain_unix.cpp 2017-04-19 15:09:34.000000000 +0200 +++ new/qtkeychain-0.9.1/keychain_unix.cpp 2018-08-20 08:23:34.000000000 +0200 @@ -76,32 +76,82 @@ return DesktopEnv_Other; } +static bool isKwallet5Available() +{ + if (!QDBusConnection::sessionBus().isConnected()) + return false; + + org::kde::KWallet iface( + QLatin1String("org.kde.kwalletd5"), + QLatin1String("/modules/kwalletd5"), + QDBusConnection::sessionBus()); + + // At this point iface.isValid() can return false even though the + // interface is activatable by making a call. Hence we check whether + // a wallet can be opened. + + iface.setTimeout(500); + QDBusMessage reply = iface.call(QStringLiteral("networkWallet")); + return reply.type() == QDBusMessage::ReplyMessage; +} + static KeyringBackend detectKeyringBackend() { - /* Libsecret unifies access to KDE and GNOME - * password services. */ - if (LibSecretKeyring::isAvailable()) { - return Backend_LibSecretKeyring; - } + /* The secret service dbus api, accessible through libsecret, is supposed + * to unify password services. + * + * Unfortunately at the time of Kubuntu 18.04 the secret service backend + * in KDE is gnome-keyring-daemon - using it has several complications: + * - the default collection isn't opened on session start, so users need + * to manually unlock it when the first application uses it + * - it's separate from the kwallet5 keyring, so switching to it means the + * existing keyring data can't be accessed anymore + * + * Thus we still prefer kwallet backends on KDE even if libsecret is + * available. + */ switch (detectDesktopEnvironment()) { case DesktopEnv_Kde4: return Backend_Kwallet4; - break; + case DesktopEnv_Plasma5: + if (isKwallet5Available()) { + return Backend_Kwallet5; + } + if (LibSecretKeyring::isAvailable()) { + return Backend_LibSecretKeyring; + } + if (GnomeKeyring::isAvailable()) { + return Backend_GnomeKeyring; + } + // During startup the keychain backend might just not have started yet return Backend_Kwallet5; - break; - // fall through + case DesktopEnv_Gnome: case DesktopEnv_Unity: case DesktopEnv_Xfce: case DesktopEnv_Other: default: - if ( GnomeKeyring::isAvailable() ) { + if (LibSecretKeyring::isAvailable()) { + return Backend_LibSecretKeyring; + } + if (GnomeKeyring::isAvailable()) { return Backend_GnomeKeyring; - } else { - return Backend_Kwallet4; } + if (isKwallet5Available()) { + return Backend_Kwallet5; + } + // During startup the keychain backend might just not have started yet + // + // This doesn't need to be libsecret because LibSecretKeyring::isAvailable() + // only fails if the libsecret shared library couldn't be loaded. In contrast + // to that GnomeKeyring::isAvailable() can return false if the shared library + // *was* loaded but its libgnome_keyring::is_available() returned false. + // + // In the future there should be a difference between "API available" and + // "keychain available". + return Backend_GnomeKeyring; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtkeychain-0.8.0/keychain_win.cpp new/qtkeychain-0.9.1/keychain_win.cpp --- old/qtkeychain-0.8.0/keychain_win.cpp 2017-04-19 15:09:34.000000000 +0200 +++ new/qtkeychain-0.9.1/keychain_win.cpp 2018-08-20 08:23:34.000000000 +0200 @@ -58,7 +58,7 @@ cred.TargetName = name; cred.CredentialBlobSize = data.size(); cred.CredentialBlob = (LPBYTE)pwd; - cred.Persist = CRED_PERSIST_LOCAL_MACHINE; + cred.Persist = CRED_PERSIST_ENTERPRISE; if (!CredWriteW(&cred, 0)) { q->emitFinishedWithError( OtherError, tr("Encryption failed") ); //TODO more details available? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtkeychain-0.8.0/libsecret.cpp new/qtkeychain-0.9.1/libsecret.cpp --- old/qtkeychain-0.8.0/libsecret.cpp 2017-04-19 15:09:34.000000000 +0200 +++ new/qtkeychain-0.9.1/libsecret.cpp 2018-08-20 08:23:34.000000000 +0200 @@ -10,7 +10,7 @@ #if defined(HAVE_LIBSECRET) const SecretSchema* qtkeychainSchema(void) { static const SecretSchema schema = { - "org.qt.keychain", SECRET_SCHEMA_NONE, + "org.qt.keychain", SECRET_SCHEMA_DONT_MATCH_NAME, { { "user", SECRET_SCHEMA_ATTRIBUTE_STRING }, { "server", SECRET_SCHEMA_ATTRIBUTE_STRING }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtkeychain-0.8.0/qt5keychain.pri new/qtkeychain-0.9.1/qt5keychain.pri --- old/qtkeychain-0.8.0/qt5keychain.pri 2017-04-19 15:09:34.000000000 +0200 +++ new/qtkeychain-0.9.1/qt5keychain.pri 2018-08-20 08:23:34.000000000 +0200 @@ -4,9 +4,8 @@ QT5KEYCHAIN_PWD = $$PWD -CONFIG *= depend_includepath +CONFIG += depend_includepath DEFINES += QTKEYCHAIN_NO_EXPORT -#CONFIG += plaintextstore INCLUDEPATH += \ $$PWD/.. \ @@ -16,35 +15,44 @@ $$QT5KEYCHAIN_PWD/keychain_p.h \ $$QT5KEYCHAIN_PWD/keychain.h -SOURCES *= \ +SOURCES += \ $$QT5KEYCHAIN_PWD/keychain.cpp -plaintextstore { - HEADERS += $$QT5KEYCHAIN_PWD/plaintextstore_p.h - SOURCES += $$QT5KEYCHAIN_PWD/plaintextstore.cpp -} else { - unix:!macx { - QT += dbus - - HEADERS += $$QT5KEYCHAIN_PWD/gnomekeyring_p.h - - SOURCES += \ - $$QT5KEYCHAIN_PWD/gnomekeyring.cpp \ - $$QT5KEYCHAIN_PWD/keychain_unix.cpp - } - - win { - HEADERS += $$QT5KEYCHAIN_PWD/libsecret_p.h - - SOURCES += \ - $$QT5KEYCHAIN_PWD/keychain_win.cpp \ - $$QT5KEYCHAIN_PWD/libsecret.cpp +unix:!macx:!ios { + QT += dbus + HEADERS += \ + $$QT5KEYCHAIN_PWD/gnomekeyring_p.h \ + $$QT5KEYCHAIN_PWD/plaintextstore_p.h + SOURCES += \ + $$QT5KEYCHAIN_PWD/gnomekeyring.cpp \ + $$QT5KEYCHAIN_PWD/keychain_unix.cpp \ + $$QT5KEYCHAIN_PWD/plaintextstore.cpp +} - #DBUS_INTERFACES += $$PWD/Keychain/org.kde.KWallet.xml +win32 { + # Remove the following USE_CREDENTIAL_STORE line + # to use the CryptProtectData Windows API function + # instead of the Windows Credential Store. + DEFINES += USE_CREDENTIAL_STORE + contains(DEFINES, USE_CREDENTIAL_STORE) { + LIBS += -lAdvapi32 + } else { + LIBS += -lCrypt32 + HEADERS += $$QT5KEYCHAIN_PWD/plaintextstore_p.h + SOURCES += $$QT5KEYCHAIN_PWD/plaintextstore.cpp } + HEADERS += $$QT5KEYCHAIN_PWD/libsecret_p.h + SOURCES += \ + $$QT5KEYCHAIN_PWD/keychain_win.cpp \ + $$QT5KEYCHAIN_PWD/libsecret.cpp +} - mac { - LIBS += "-framework Security" "-framework Foundation" - SOURCES += $$QT5KEYCHAIN_PWD/keychain_mac.cpp - } +macx:!ios { + LIBS += "-framework Security" "-framework Foundation" + SOURCES += $$QT5KEYCHAIN_PWD/keychain_mac.cpp +} + +ios { + LIBS += "-framework Security" "-framework Foundation" + OBJECTIVE_SOURCES += $$QT5KEYCHAIN_PWD/keychain_ios.mm }