summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-12-05syncevo-dbus-server: remove virtual address book featurePatrick Ohly34-14575/+0
This aspect of syncevo-dbus-server had been developed for use in an IVI head unit. It's currently neither used nor tested and no longer compiles (timeout.h moved, API changes in libfolks). Instead of trying to keep it working while enhancing the usage of C++, removing it entirely is easier. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-12-05gdbus: remove old libdbus-based implementationPatrick Ohly21-8752/+3
GIO D-Bus is a more modern and capable implementation. The older one was only needed on certain old Linux distros (Maemo) which did not have a recent enough glib. The reason for removing the old one is that it allows making API incompatible changes for the C++ D-Bus binding without having to do that in two places. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-12-05connection.cpp: better check for obex-bt:// URLsPatrick Ohly1-1/+1
cppcheck started complaining about std::string::find() being inefficient. boost::starts_with() would indeed be better, but even simpler and more readable is a whole-string comparison. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-12-05installcheck-local.sh: test with C++14Patrick Ohly1-3/+4
Some header files use C++14 features. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-12-05SuspendFlags: restore printing of messagesPatrick Ohly1-0/+1
Commit 5bafef3957bc32a2deb5a917c7773fcd92e8b953 (included in v1.4) broke the printing of the messages about Ctrl-C handling, in particular the hint that using it quickly will switch from suspending to aborting. The message code was getting overwritten by a new default case due to a missing break. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-12-05installcheck-local.sh: test with C++11Patrick Ohly1-2/+5
Some header files use C++11 features. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-12-05timeout.h: include glib.hPatrick Ohly1-0/+2
The header file is not usable without glib. Users of it need to be aware of that. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-12-05installcheck-local.sh: test with glib enabledPatrick Ohly1-2/+2
At least timeout.h only works with glib, and that's okay. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-12-05SoupTransportAgent: fix disabled SSL checkingPatrick Ohly1-4/+5
The SoupTransportAgent modernization in 1.5.3 led to SSL checking always being enabled because the default changed from disabled to enabled and SyncEvolution did not set it. Worse, in older versions it probably (untested) was always disabled because it was not enabled either. Now the checking of SSL is always set explicitly and thus always mirrors the SyncEvolution configuration. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-12-05sync: avoid setenv()Patrick Ohly6-44/+79
set/getenv() are not thread-safe, and a recent bug report via private email shows that this does cause segfaults: Thread 4 (Thread 19251): .... Thread 1 (Thread 19311): ... In this case, DLT was used and the setenv call was setting the LIBSYNTHESIS_<context> variables. The solution is to avoid setenv() in code which might run in parallel to other threads: - DLT-related variables are set at the beginning of syncevo-dbus-server startup which then gets inherited by syncevo-dbus-helper and in the environment prepared for syncevo-local-sync (because the latter might run with a different log level) - the default for SYNCEVOLUTION_PBAP_SYNC is now "incremental" everywhere and SyncContext is told about the special mode where it needs to keep photo data differently, i.e. setting SYNCEVOLUTION_PBAP_SYNC in dbus-sync.cpp for PBAP syncing is no longer necessary Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-12-05docs: replace meego.org references (FDO #104936)Patrick Ohly13-16/+16
meego.org is long gone, replace it where possible. Some of the old bug references might have a corresponding bug in bugs.freedesktop.org but trying to update them probably isn't worth it. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-12-05signon: fix pcrecpp build flagsPatrick Ohly1-2/+2
Dropping the pcrecpp build hacks in the nightly testing showed that the flags for normal linking and compilation were missing. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-12-05test: convert scripts to Python3Patrick Ohly7-651/+584
This is the result of 2to3, with the interpreter path updated manually, tabs replaced by spaces and some obsolete packages removed. Required because the current nightly build host no longer has Python2 installed. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-08-09Python2 -> Python3Milan Crha9-348/+349
Originally developed by Milan Crha for Fedora, copied from there by Patrick Ohly.
2020-08-09runtests.py: remove lpia hackPatrick Ohly1-5/+0
With support for 32 bit binaries removed, we also no longer need to build the special lpia packages. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-08-09runtests.py: do not use resources.py during Git checkoutPatrick Ohly1-2/+2
The script comes from SyncEvolution and might not be ready yet when checking out other repos. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-08-09runtests.py: fix command invocationPatrick Ohly1-2/+4
Splitting commands with a semicolon didn't work as intended. We need to use the helper function's parameters instead. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-08-09D-Bus server: fix server restartingPatrick Ohly2-2/+6
After moving to different pre-built testing, the wrong syncevo-dbus-server binary was getting started (/usr/lib instead from the test directory). We must find the binary via normal PATH lookup and also deal with symlinks before comparing. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-08-09test: fix D-Bus testing result gatheringPatrick Ohly2-4/+11
Successful tests were not picked up by the result checker if there was extra output between printing the test name and the " ... ok". One source of that extra output was the D-Bus server and daemons started by it (now redirected to a file), the other a glib warning about an event ID not being found (caused by double-removal of a timer, which is mostly avoided now). Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-08-09test: allow missing remote branchesPatrick Ohly1-2/+4
The code for checking out source code for testing no longer worked with newer git when there weren't any remote branches which had to be reset. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-08-09build: don't attempt to install .deb archives while building themPatrick Ohly1-0/+1
Testing them is done in separate environments and installing them no longer works in Docker-based build environments (permission issues). Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-08-09build: remove special libical depsPatrick Ohly1-4/+1
Newer packages will be built without the ical compatibility hack and will start to depend on libical3, so we have to remove the packaging hack. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-08-09build: use Docker containers instead of chrootsPatrick Ohly4-117/+60
Previously, nightly testing used a home-grown set of scripts arounds Debian's schroot tool. This became increasingly harder to maintain and update, in particular because the chroot's themselves were set up manually. Using Docker files for building container images and then running in those avoids this. In SyncEvolution, this affects some places where direct access from the host to the test filesystem was assumed. Testing of pre-built binaries also gets changed: instead of pointing to some directory from a previous build, we always install the output packages from an apt repo in a clean, minimal container. Runtime dependencies like "evolution-data-server" must be declared correctly because they might no longer be installed already. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-08-09test/resources.py: Python3, remove Murphy supportPatrick Ohly2-70/+27
Running Murphy for resource allocation is overkill and complicated (need a shared D-Bus session!). Sharing a local directory between different test runs and using file locking is simpler. With flock, locks are associated with a file descriptor, so they will be returned automatically when the process quits, just like they used to be with Murphy. We don't want these file descriptors to be inherited by child processes; Python 3 does that by default, so we switch to it. This is is also a worthwhile goal by itself. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-07-24test: ignore empty CLIENT_TEST_SOURCESPatrick Ohly1-1/+1
Running with no sources leads to exception later on and isn't intended; it makes more sense to treat an empty env var like an unset one and use the default source list. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2020-07-24test: switch from .log to .txt for log filesPatrick Ohly7-44/+44
The current HTTP server for nightly.syncevolution.org reports the content type for .txt files as plain text, but not for .log files. Plain text is desirable for easy viewing in a web browser. While the .log suffix is nicer, getting the HTTP server reconfigured is hard and might have to be repeated again in the future, so let's just use .txt. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-09autotools, NEWS: SyncEvolution 1.5.3syncevolution-1-5-3Patrick Ohly3-2/+63
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-09gdb-dump-stack: automatic stack dumpsPatrick Ohly1-0/+79
This is meant to be used by automated testing, with gdb acting as wrapper around a command so that stack traces are created automatically when something goes wrong. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-09sys.supp: more dl suppressionsPatrick Ohly1-0/+20
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-09EDS: more generic open retry handlingPatrick Ohly1-9/+7
Recent EDS started to exhibit race conditions when opening a database (for example, https://bugzilla.gnome.org/show_bug.cgi?id=791306). Opening was already tried again for a certain known error in some old EDS version. Now it is tried five times with a delay of one second for all errors. The advantage is that this does not depend on accurately detecting the race condition error. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-09sys.supp: suppress EDS/glib closure issuePatrick Ohly1-0/+30
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-09oauth2.cpp: fix usage of curlPatrick Ohly1-1/+3
When libcurl was selected instead of libsoup, compilation failed because the necessary header file was missing and the direct assignment of a plain pointer to the shared_ptr failed. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-09autotools: be more selective about suppressing deprecation warningsPatrick Ohly4-5/+10
Suppressing the warning for all code hid the deprecation warning about auto_ptr, which is something that should have been fixed before. Now only some code still suppresses the warning (GTK UI, Akonadi) because there is no time to also update and test that part. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-09SoupTransportAgent: require libsoup 2.42, no deprecated methodsPatrick Ohly5-39/+56
This allows us to get rid of deprecated function calls. We no longer need to set a default proxy either, the newer libsoup does that itself by default (https://developer.gnome.org/libsoup/stable/libsoup-session-porting.html). Not mentioned in the porting guide is that the based soup session now has a 60s timeout by default. We don't want to time out. We also need to quit the event loop explicitly when timing out. Somehow that wasn't necessary before. When using the generic SoupSession, it is no longer guaranteed that canceling an operation invokes the callbacks before returning. Therefore we have to be prepared for callbacks occuring after destructing the SoupTransportAgent. This is achieved by storing all SoupTransportAgent in a boost::shared_ptr and letting the instance know about that with a weak_ptr, which then can be used by the callbacks. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-09timeout.h: move from D-Bus server to syncevoPatrick Ohly8-6/+7
The helper class is also useful outside of the D-Bus server, for example in the glib-based SoupTransportAgent. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03C++: replace auto_ptr with unique_ptrPatrick Ohly19-78/+1140
auto_ptr has been deprecated for a while now. unique_ptr can be taken for granted now, so use that instead. GDBusMessage requires a custom deleter. Not sure how auto_ptr handled that before. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03C++: try to use C++14, rely on C++11Patrick Ohly1-0/+8
This makes it possible to use C++11 features. Choosing C++14 when available gives us advance warning when something might break under C++14. Test builds on a system with only C++11 and another with C++14 are needed to ensure that both really works. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03test: honor warning flagsPatrick Ohly1-1/+1
Without them, --enable-warnings=fatal was ignored for the D-Bus test program, causing deprecation warnings about auto_ptr to be printed without aborting the build. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03testing: work around Google CalDAV RECURRENCE-IDPatrick Ohly2-44/+18
Stand-alone events with RECURRENCE-ID get mangled by the server: it converts the RECURRENCE-ID time to UTC. Reported in: https://stackoverflow.com/questions/47811670/detached-recurrence-without-parent-event For now we ignore the error (googlecalendar source) or avoid it (testItems). Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03testing: exclude PHOTO data from Google Contacts sync testsPatrick Ohly16-358/+5
The server started to re-encode the image, thus breaking the strict comparison that is done for these tests. Normal testing allows such changes for the Google server by ignoring PHOTO data, but in these tests we want comparison to be strict, so we have to change the test data. The downside is less test coverage. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03autotools: let caller suppress automatic lib dependenciesPatrick Ohly3-10/+2
shlibs.local was used in combination with explicit ebook/ecal/ical dependencies to replace the automatic dependencies. It needs to be maintained together with those explicit dependencies, so it makes more sense to use a file provided by the code which calls make to build releases. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03autotools: building of binaries optionalPatrick Ohly3-4/+27
When building and installing backends on additional build platforms, linking the binaries is both unnecessary and sometimes problematic (for example, helper libraries not available in a version that works). Therefore configure arguments can be used to disable linking of the binaries. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03C++: initialize all members of SyncSourceEventPatrick Ohly1-1/+4
While not necessary (attributes are not read for NOP event), it's still cleaner to also initialize them. Found with cppcheck. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03TDEPIMNotesSource.h: remove unused kn_dcopPatrick Ohly1-1/+0
It's a local variable in the implementation. Found with cppcheck. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03icaltz-util.c: avoid undefined signed int shiftingPatrick Ohly1-1/+1
The result of shifting a signed int is undefined. Better operate on unsigned int of the same size. Found by clang or cppcheck. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03SynthesisDBPlugin.cpp: fix error pathPatrick Ohly1-1/+1
This is a cut-and-paste error from upstream libsynthesis: an error code was returned in an error case where a boolean should have been returned. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03C++: const and const ref enhancementsPatrick Ohly3-5/+4
Found with clang and/or cppcheck. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03C++: implement missing copy operatorPatrick Ohly3-0/+14
It's good practice to implement the copy operator, even if not needed at the moment. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03C++: avoid non-standard typeofPatrick Ohly6-22/+31
Building with recent Clang in C++ mode fails when using the non-standard typeof operator. We can't rely on the new(ish) decltype yet, so use the Boost implementation instead. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2018-01-03ClientTest.cpp: clean cppcheck warningsPatrick Ohly1-78/+54
The only actual error was incorrect nesting of ifdef/endif and comments. The iterator change avoids a false positive where cppcheck's for correct begin()/end() comparisons fail. It's also a bit shorter and cleaner. The copy operator is not needed. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>