Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libsignon] Split local commits into patches. Contributes to JB#27876
Subtree is hard to maintain, hard to follow what are our changes when it's mixed history with numerous merges and conflict resolutions. Exporting to patches acting now as a rebase here. Outcome should be identical except c++0x change should no longer be needed, and avoiding now one duplicated #include <climits>
- Loading branch information
Showing
12 changed files
with
930 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From 51484c1330c3a84245d4051e27c4769973c9b06c Mon Sep 17 00:00:00 2001 | ||
From: Robin Burchell <robin+git@viroteck.net> | ||
Date: Thu, 11 Jul 2013 08:51:54 +0000 | ||
Subject: [PATCH 01/11] disable multilib | ||
|
||
Mer doesn't use it. | ||
--- | ||
common-project-config.pri | 6 +----- | ||
1 file changed, 1 insertion(+), 5 deletions(-) | ||
|
||
diff --git a/common-project-config.pri b/common-project-config.pri | ||
index 505baa9..bd83906 100644 | ||
--- a/common-project-config.pri | ||
+++ b/common-project-config.pri | ||
@@ -67,11 +67,7 @@ exists( meego-release ) { | ||
ARCH = $$system(uname -m) | ||
} | ||
|
||
-contains( ARCH, x86_64 ) { | ||
- INSTALL_LIBDIR = $${INSTALL_PREFIX}/lib64 | ||
-} else { | ||
- INSTALL_LIBDIR = $${INSTALL_PREFIX}/lib | ||
-} | ||
+INSTALL_LIBDIR = $${INSTALL_PREFIX}/lib | ||
|
||
# default library directory can be overriden by defining LIBDIR when | ||
# running qmake | ||
-- | ||
2.20.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
From dd35fbae93dd6804f79b6c729f98d977e9cb27dd Mon Sep 17 00:00:00 2001 | ||
From: Robin Burchell <robin+git@viroteck.net> | ||
Date: Thu, 11 Jul 2013 08:53:06 +0000 | ||
Subject: [PATCH 02/11] fix documentation path | ||
|
||
--- | ||
lib/SignOn/doc/doc.pri | 6 +++++- | ||
1 file changed, 5 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/lib/SignOn/doc/doc.pri b/lib/SignOn/doc/doc.pri | ||
index 46f1148..5c5da07 100644 | ||
--- a/lib/SignOn/doc/doc.pri | ||
+++ b/lib/SignOn/doc/doc.pri | ||
@@ -58,7 +58,11 @@ include( ../../../common-installs-config.pri ) | ||
#----------------------------------------------------------------------------- | ||
# Installation target setup for documentation | ||
#----------------------------------------------------------------------------- | ||
-documentation.path = $${INSTALL_PREFIX}/share/doc/libsignon-qt | ||
+greaterThan(QT_MAJOR_VERSION, 4) { | ||
+ documentation.path = $${INSTALL_PREFIX}/share/doc/libsignon-qt5 | ||
+} else { | ||
+ documentation.path = $${INSTALL_PREFIX}/share/doc/libsignon-qt | ||
+} | ||
for( folder, DOC_FOLDERS ) { | ||
documentation.files += $${folder} | ||
} | ||
-- | ||
2.20.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,210 @@ | ||
From ca9eb403bd49bb13b487fcbd788c8052f35e53f9 Mon Sep 17 00:00:00 2001 | ||
From: Martin Kampas <martin.kampas@tieto.com> | ||
Date: Mon, 18 Mar 2013 16:50:19 +0100 | ||
Subject: [PATCH 03/11] Install tests, add tests definition | ||
|
||
Signed-off-by: Martin Kampas <martin.kampas@tieto.com> | ||
--- | ||
tests/create-tests-definition.pro | 23 +++++ | ||
tests/create-tests-definition.sh | 145 ++++++++++++++++++++++++++++++ | ||
tests/tests.pro | 2 + | ||
3 files changed, 170 insertions(+) | ||
create mode 100644 tests/create-tests-definition.pro | ||
create mode 100755 tests/create-tests-definition.sh | ||
|
||
diff --git a/tests/create-tests-definition.pro b/tests/create-tests-definition.pro | ||
new file mode 100644 | ||
index 0000000..fbaef6e | ||
--- /dev/null | ||
+++ b/tests/create-tests-definition.pro | ||
@@ -0,0 +1,23 @@ | ||
+include( tests.pri ) | ||
+ | ||
+# added by default in tests.pri | ||
+INSTALLS -= target | ||
+ | ||
+# dummy | ||
+TEMPLATE = subdirs | ||
+ | ||
+create_tests_definition.target = tests.xml | ||
+create_tests_definition.commands = \ | ||
+ $${PWD}/create-tests-definition.sh $${INSTALL_TESTDIR} > tests.xml | ||
+create_tests_definition.CONFIG = phony | ||
+ | ||
+make_default.CONFIG = phony | ||
+make_default.depends += create_tests_definition | ||
+ | ||
+QMAKE_EXTRA_TARGETS += create_tests_definition make_default | ||
+ | ||
+tests_definition.path = $${INSTALL_TESTDIR} | ||
+tests_definition.files = tests.xml | ||
+tests_definition.depends = tests.xml | ||
+tests_definition.CONFIG += no_check_exist | ||
+INSTALLS += tests_definition | ||
diff --git a/tests/create-tests-definition.sh b/tests/create-tests-definition.sh | ||
new file mode 100755 | ||
index 0000000..1e35b92 | ||
--- /dev/null | ||
+++ b/tests/create-tests-definition.sh | ||
@@ -0,0 +1,145 @@ | ||
+#!/bin/sh | ||
+ | ||
+test_flag() | ||
+{ | ||
+ FLAGS="${1?}" | ||
+ FLAG="${2?}" | ||
+ echo "${FLAGS}" |tr ',' '\n' |grep -q --line-regexp -e "${FLAG}" | ||
+} | ||
+ | ||
+fmt_test_case() | ||
+{ | ||
+ EXECUTABLE="${1?}" | ||
+ F_NAME="${2?}" | ||
+ CASE_TYPE="${3?}" | ||
+ CASE_LEVEL="${4?}" | ||
+ | ||
+ EXEC_BASE_NAME="`basename "${EXECUTABLE}"`" | ||
+ | ||
+ cat <<END | ||
+ <case name="${EXEC_BASE_NAME}-${F_NAME:-ALL}" type="${CASE_TYPE}" level="${CASE_LEVEL}"> | ||
+ <description>${EXEC_BASE_NAME}-${F_NAME:-ALL}</description> | ||
+ <step>${TESTS_INSTALL_DIR}/${EXEC_BASE_NAME} ${F_NAME}</step> | ||
+ </case> | ||
+END | ||
+} | ||
+ | ||
+generate_test_cases() | ||
+{ | ||
+ EXECUTABLE="${1?}" | ||
+ CASE_TYPE="${2?}" | ||
+ CASE_LEVEL="${3?}" | ||
+ FLAGS="${4}" | ||
+ | ||
+ F_NAMES="`${EXECUTABLE} -functions`" || return 1 | ||
+ | ||
+ if test_flag "${FLAGS}" "single-case" | ||
+ then | ||
+ fmt_test_case "${EXECUTABLE}" "" "${CASE_TYPE}" "${CASE_LEVEL}" | ||
+ else | ||
+ for f_name in ${F_NAMES} | ||
+ do | ||
+ f_name="${f_name/(*)/}" | ||
+ fmt_test_case "${EXECUTABLE}" "${f_name}" "${CASE_TYPE}" "${CASE_LEVEL}" | ||
+ done | ||
+ fi | ||
+} | ||
+ | ||
+generate_test_set() | ||
+{ | ||
+ EXECUTABLE="${1?}" | ||
+ FEATURE="${2?}" | ||
+ CASE_TYPE="${3?}" | ||
+ CASE_LEVEL="${4?}" | ||
+ FLAGS="${5}" | ||
+ | ||
+ EXEC_BASE_NAME="`basename "${EXECUTABLE}"`" | ||
+ | ||
+ cat <<END | ||
+ <set name="${TESTS_INSTALL_DIR}/${EXEC_BASE_NAME}" feature="${FEATURE}"> | ||
+ <pre_steps> | ||
+ <step> | ||
+ export SSO_LOGGING_LEVEL=2 | ||
+ export SSO_LOGGING_OUTPUT="stdout" | ||
+ export SSO_STORAGE_PATH="/tmp" | ||
+ export SSO_DAEMON_TIMEOUT=5 | ||
+ export SSO_IDENTITY_TIMEOUT=5 | ||
+ export SSO_AUTHSESSION_TIMEOUT=5 | ||
+ | ||
+ while ps -C signond &>/dev/null; do pkill signond; sleep 1; done | ||
+ | ||
+ # Redirecting output to file prevents receiving SIGHUP which leads to | ||
+ # server restart and causes certain test cases to fail. | ||
+ signond 1>/tmp/tests-libsignond-signond.out 2>&1 & | ||
+`test_flag "${FLAGS}" "stop-ui" && echo " | ||
+ # Any signon UI must be stopped prior to executing this test set | ||
+ systemctl --user list-unit-files \\\\ | ||
+ |awk '\\\$1 ~ /-signon-ui.service$/ { print \\\$1 }' \\\\ | ||
+ |xargs systemctl --user stop | ||
+"` | ||
+ | ||
+ sleep 2 | ||
+ </step> | ||
+ </pre_steps> | ||
+`generate_test_cases "${EXECUTABLE}" "${CASE_TYPE}" "${CASE_LEVEL}" "${FLAGS}"` | ||
+ <environments> | ||
+ <scratchbox>true</scratchbox> | ||
+ <hardware>true</hardware> | ||
+ </environments> | ||
+ <get> | ||
+ <file delete_after="true">/tmp/tests-libsignond-signond.out</file> | ||
+ </get> | ||
+ </set> | ||
+END | ||
+} | ||
+ | ||
+TESTS_INSTALL_DIR="${1?}" | ||
+HAVE_AEGIS="${2:-false}" | ||
+ | ||
+set -o errexit -o errtrace | ||
+trap "kill -QUIT $$" ERR | ||
+trap "exit 1" QUIT | ||
+ | ||
+cat <<END | ||
+<?xml version="1.0" encoding="ISO-8859-1"?> | ||
+<testdefinition version="1.0"> | ||
+ | ||
+ <suite name="libsignon-qt-tests" domain="Accounts and SSO"> | ||
+ <description>Signon Qt Client Library Tests</description> | ||
+ | ||
+`generate_test_set libsignon-qt-tests/libsignon-qt-tests \ | ||
+ "SSO API" "Functional" "Component" "single-case,stop-ui"` | ||
+ | ||
+ </suite> | ||
+ | ||
+ | ||
+ <suite name="signon-passwordplugin-tests" domain="Accounts and SSO"> | ||
+ | ||
+`generate_test_set passwordplugintest/signon-passwordplugin-tests \ | ||
+ "Password" "Functional" "Component"` | ||
+ | ||
+ </suite> | ||
+ | ||
+ | ||
+ <suite name="signond" domain="Accounts and SSO"> | ||
+ | ||
+`generate_test_set signond-tests/tst_database \ | ||
+ "SSO CORE" "FIXME" "FIXME" "single-case"` | ||
+ | ||
+`generate_test_set signond-tests/tst_pluginproxy \ | ||
+ "SSO CORE" "FIXME" "FIXME" "single-case"` | ||
+ | ||
+`generate_test_set signond-tests/tst_timeouts \ | ||
+ "SSO CORE" "FIXME" "FIXME" "single-case"` | ||
+ | ||
+ </suite> | ||
+ | ||
+ <suite name="signond-extensions" domain="Accounts and SSO"> | ||
+ | ||
+`generate_test_set extensions/tst_access_control_manager \ | ||
+ "SSO CORE" "FIXME" "FIXME" "single-case"` | ||
+ | ||
+ </suite> | ||
+ | ||
+</testdefinition> | ||
+END | ||
diff --git a/tests/tests.pro b/tests/tests.pro | ||
index 64c59c1..656391e 100644 | ||
--- a/tests/tests.pro | ||
+++ b/tests/tests.pro | ||
@@ -5,6 +5,8 @@ TEMPLATE = subdirs | ||
|
||
CONFIG += ordered | ||
|
||
+SUBDIRS += create-tests-definition.pro | ||
+ | ||
SUBDIRS += \ | ||
passwordplugintest \ | ||
libsignon-qt-tests \ | ||
-- | ||
2.20.1 | ||
|
36 changes: 36 additions & 0 deletions
36
rpm/0004-Continue-reading-from-plugins-after-handling-respons.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
From a48a308cca17a146278ba89cbd7f34fc895cd26b Mon Sep 17 00:00:00 2001 | ||
From: John Brooks <john.brooks@jollamobile.com> | ||
Date: Wed, 6 Nov 2013 02:14:53 -0700 | ||
Subject: [PATCH 04/11] Continue reading from plugins after handling response | ||
if necessary | ||
|
||
There may be more than one response from the plugin; for example, during | ||
a refresh, you receive a store and result response. If both arrive | ||
simultaniously, readyRead() will not be signalled again after handling | ||
the first response. The request will then be deadlocked waiting for a | ||
response that is sitting in the file buffer. | ||
|
||
The immediate solution is simply to read again if there's more to be | ||
read after handling a response. | ||
--- | ||
src/signond/pluginproxy.cpp | 4 ++++ | ||
1 file changed, 4 insertions(+) | ||
|
||
diff --git a/src/signond/pluginproxy.cpp b/src/signond/pluginproxy.cpp | ||
index b088723..4c207a3 100644 | ||
--- a/src/signond/pluginproxy.cpp | ||
+++ b/src/signond/pluginproxy.cpp | ||
@@ -436,6 +436,10 @@ void PluginProxy::handlePluginResponse(const quint32 resultOperation, | ||
} | ||
|
||
connect(m_process, SIGNAL(readyRead()), this, SLOT(onReadStandardOutput())); | ||
+ if (m_process->bytesAvailable()) { | ||
+ TRACE() << "plugin has more to read after handling a response"; | ||
+ onReadStandardOutput(); | ||
+ } | ||
} | ||
|
||
void PluginProxy::onReadStandardError() | ||
-- | ||
2.20.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
From e405a1c3417725e1135f690f5da973593dcc2060 Mon Sep 17 00:00:00 2001 | ||
From: Chris Adams <chris.adams@jollamobile.com> | ||
Date: Thu, 20 Mar 2014 21:44:25 +1000 | ||
Subject: [PATCH 05/11] Set permissions on config dir correctly | ||
|
||
Also ensure that signond is launched with privileged permissions | ||
--- | ||
server/com.google.code.AccountsSSO.SingleSignOn.service.in | 2 +- | ||
server/com.nokia.SingleSignOn.Backup.service.in | 2 +- | ||
src/signond/main.cpp | 2 +- | ||
src/signond/signond.pro | 7 +++++++ | ||
4 files changed, 10 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/server/com.google.code.AccountsSSO.SingleSignOn.service.in b/server/com.google.code.AccountsSSO.SingleSignOn.service.in | ||
index 4a4599b..87136ad 100644 | ||
--- a/server/com.google.code.AccountsSSO.SingleSignOn.service.in | ||
+++ b/server/com.google.code.AccountsSSO.SingleSignOn.service.in | ||
@@ -1,3 +1,3 @@ | ||
[D-BUS Service] | ||
Name=com.google.code.AccountsSSO.SingleSignOn | ||
-Exec=$$INSTALL_PREFIX/bin/signond | ||
+Exec=/usr/bin/invoker --type=qt5 -d 10 -n $$INSTALL_PREFIX/bin/signond | ||
diff --git a/server/com.nokia.SingleSignOn.Backup.service.in b/server/com.nokia.SingleSignOn.Backup.service.in | ||
index 6603fd7..5b5d458 100644 | ||
--- a/server/com.nokia.SingleSignOn.Backup.service.in | ||
+++ b/server/com.nokia.SingleSignOn.Backup.service.in | ||
@@ -1,3 +1,3 @@ | ||
[D-BUS Service] | ||
Name=com.nokia.SingleSignOn.Backup | ||
-Exec=$$INSTALL_PREFIX/bin/signond -backup | ||
+Exec=/usr/bin/invoker --type=qt5 -d 10 -n $$INSTALL_PREFIX/bin/signond -backup | ||
diff --git a/src/signond/main.cpp b/src/signond/main.cpp | ||
index 84751ad..893418d 100644 | ||
--- a/src/signond/main.cpp | ||
+++ b/src/signond/main.cpp | ||
@@ -38,7 +38,7 @@ void installSigHandlers() | ||
sigaction(SIGINT, &act, 0); | ||
} | ||
|
||
-int main(int argc, char *argv[]) | ||
+Q_DECL_EXPORT int main(int argc, char *argv[]) | ||
{ | ||
QCoreApplication app(argc, argv); | ||
installSigHandlers(); | ||
diff --git a/src/signond/signond.pro b/src/signond/signond.pro | ||
index 76de1ea..f8990d8 100644 | ||
--- a/src/signond/signond.pro | ||
+++ b/src/signond/signond.pro | ||
@@ -8,6 +8,13 @@ QT += core \ | ||
network \ | ||
dbus | ||
|
||
+packagesExist(qt5-boostable) { | ||
+ DEFINES += HAS_BOOSTER | ||
+ PKGCONFIG += qt5-boostable | ||
+} else { | ||
+ warning("qt5-boostable not available; startup times will be slower") | ||
+} | ||
+ | ||
#generate adaptor for backup | ||
system(qdbusxml2cpp -c BackupIfAdaptor -a backupifadaptor.h:backupifadaptor.cpp \ | ||
../../lib/signond/com.nokia.SingleSignOn.Backup.xml) | ||
-- | ||
2.20.1 | ||
|
Oops, something went wrong.