Commit graph

6263 commits

Author SHA1 Message Date
SyncEvolution Nightly Testing
46a81a3cb8 Merge remote-tracking branch 'origin/for-master/tde' into nightly 2016-10-13 05:07:07 -07:00
Patrick Ohly
7d06fd2869 TDEPIMCalendarSourceRegister.cpp: only grab generic types when active
When a backend is inactive, it is meant to ignore generic types like
"calendar". The idea behind that is that typically users install or
compile just the backends they want, and then ask for the "calendar"
backend using the generic sync templates or instructions.

When adding the TDEPIM calendar backend, that broke because it also
instantiated itself for those terms when active. The other TDEPIM
backends already did this as intended.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2016-10-09 23:20:16 -07:00
Patrick Ohly
30d42f88ca activesync: fix packaging of activesyncd (FDO #98014)
The latest activesyncd contains GSettings schema files
which get installed by the top-level makefile, therefore
we have to install everything.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2016-10-07 15:25:38 +02:00
Patrick Ohly
e05817a492 tdepim: fix build issues
The *Register.cpp files and everything they include must compile
without hard dependencies on header files which are TDE specific,
so add some ifdefs. Compiling with TDE backends disabled broke
because of this.

When enabled (untested!), it is unclear how some of these *Register.cpp
could have worked without including the header file that defines the
class they instantiate. Added the necessary includes.

A closing } was missing (found by cppcheck, which tests all variations
of the code, not just those currently enabled).

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2016-10-07 15:17:41 +02:00
deloptes
160b1f5e60 tde, tdepim: adapt to TDE 14.1
The notes API changed in TDE 14.1. Also includes several other
enhancements (error checking, testing).
2016-09-26 21:14:58 +02:00
deloptes
cb34f4972b tde, tdepim: backend for the TDE desktop (FDO #97780)
This is the code for TDE < 14.1.
2016-09-26 21:07:55 +02:00
Patrick Ohly
8fccc44cc5 NEWS: SyncEvolution 1.5.2 snapshot 2016-09-26 13:18:13 +02:00
Patrick Ohly
a6dd353c6a ClientTest: avoid pass-by-value
The CreateSource instance can be big, so passing by reference definitely
is better. Found with cppcheck.
2016-09-26 12:58:27 +02:00
Patrick Ohly
b6f6f61bce dbus-session.sh: avoid using dbus-launch
dbus-launch is considered deprecated because of the X11 dependency.
See https://lists.debian.org/debian-devel/2016/08/msg00554.html "Mass bug
filing: use and misuse of dbus-launch (dbus-x11)"

The script still needs to start the D-Bus daemon when used in the nightly
testing, so the code now does it as in
6cc8062cfb

syncevo-http-server still has some usage of dbus-launch left, but that's
strictly for systems which don't have the more modern D-Bus.
2016-09-26 12:58:27 +02:00
Patrick Ohly
f2c9838e97 syncevo-dbus-server-startup.sh.in: optional start via D-Bus activation
With the recent change ("Add a systemd user service as a backend for the D-Bus
session services"), activating syncevo-dbus-server via D-Bus will integrate
better with systemd. When auto-starting via the .desktop file, we can do the
same by activating via D-Bus.

We use dbus-send for that, if available. A recent busctl from systemd could
also be used, but for example the one in Debian Jessie is still to old. Better
use dbus-send. Directly starting the binary is used as fallback.

Based on a patch from Simon McVittie.
2016-09-26 12:58:27 +02:00
Simon McVittie
9103a70c72 Add a systemd user service as a backend for the D-Bus session services
On systems with a systemd user session and a D-Bus user bus that
uses it for activation, this ensures that syncevo-dbus-server ends
up in its own cgroup, instead of being treated as part of dbus.service.

If org._01.pim.contacts and org.syncevolution are activated in quick
succession, it also prevents a race condition that would make one of
the activations fail, similar to
<https://bugs.freedesktop.org/show_bug.cgi?id=53220> in
telepathy-mission-control.
2016-09-26 12:58:27 +02:00
Patrick Ohly
e126bd500e ObexTransportAgent.cpp: properly shut down connection (FDO #91485)
Apparently there's a race condition in the OBEX transport that causes the
connection to phones via Bluetooth to be shut down prematurely.  Some phones
react by doing a slow sync instead of an incremental sync the next time.

Waiting during shutdown should address the problem (however, it was not
possible to confirm this).
2016-09-26 12:58:27 +02:00
Patrick Ohly
90a4758ce1 PbapSyncSource.cpp.rej: remove from repo
Was accidentally added, does not belong into git repo.
Reported by Tino Mettler.
2016-09-26 12:58:27 +02:00
Patrick Ohly
830367c3f9 gdbusxx/gdbus-cxx-bridge.h: avoid copying of parameter
The value is not big, but const reference is still a bit more efficient.
Found with cppcheck.
2016-09-26 12:58:27 +02:00
Patrick Ohly
426ec3543a syncevolution.org: compile on Ubuntu Trusty, libical v1/v2 compatibility
syncevolution.org binaries are now getting compiled on Ubuntu Trusty and thus
no longer support distros with older EDS. The code should still compile
against older EDS (for example, for Maemo), but that is not getting tested
anymore.

This allows removing the dynamic linker hacks related to older libraries,
which was only used in those binaries. Instead, backends using libical or EDS
get compiled on Ubuntu Trusty and then the soname of those libs get patched to
make the backend module usable in combination with a different set of
libs. That patching is part of a script maintained in the syncevolution.org
build infrastructure.

This approach was already used before to generate different EDS backends
for EDS versions with the newer EClient API, because that turned out to be
easier than the dynamic loading approach. It works because none of the methods
used by SyncEvolution changed their ABI, only some other parts of the
libraries did. Should there ever be a situation again that cannot be handled
like this, then backends might also get compiled on different distros than
Ubuntu Trusty (however, that may lead to problems due to the libstdc++ ABI
changes - to be decided...).

libical still requires one special hack: system time zone loading in
libical v1 (and only in that version, v2 has builtin support again) must
be overridden such that time zones are generated with rules instead
of transitions because that is more compatible with the peers that
SyncEvolution exchanges data with.

That hack now relies on overriding the two relevant functions inside the main
binaries (has to be there, otherwise libical still ends up calling its own
internal implementation). The overriding code is in
libsyncevo-icaltz-util.so.0 and depends on libical.so.1. If
libsyncevo-icaltz-util.so.0 can be loaded, the wrappers in the main binary use
it, otherwise they fall through to the code from the current libical.so, which
then should be libical.so.2 or more recent.

This hack is active by default when libical v1 is detected during configuration.
2016-09-26 12:58:26 +02:00
Patrick Ohly
405ca882eb libsyncevolution: load backends in function instead of constructor
Previously, backends were loaded in a constructor. At some point (*), that
loading crashed with a segfault in the dynamic linker. To make debugging a bit
easier and rule out non-determinism as the root cause of that crash, loading
backends was moved into SyncContect::initMain().

(*) the crash happened when there were two backends which couldn't
be loaded due to missing libraries and was related to error strings.
A simpler test program did not trigger the problem, and now SyncEvolution
has suitable backends for (hopefully?!) all platforms, so it no longer
occurs, at least not during automated testing.
2016-09-26 12:58:26 +02:00
Patrick Ohly
2ad9a45d45 Cmdline.cpp: optionally show debug output in --version output
SYNCEVOLUTION_DEBUG=1 syncevolution --daemon=no --version now
dumps also the debug information gathered by the binary
compatibility code. It was only available in sync logs before.
2016-09-26 12:58:26 +02:00
Patrick Ohly
5638b9ed3f autotools: link libsyncevolution against libpthread explicitly
We call some pthread methods and thus must link against libpthread.
Previously this must have worked by accident, but started failing
on more recent distros.
2016-09-26 12:58:26 +02:00
Patrick Ohly
ba8bdc5fb5 carddav testing: only use test cases with REV
DAViCal on Debian Stretch incorrectly re-formats contacts which do not have a
REV property (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=837154).
Until this gets fixed we work around the problem by including a REV in all
test cases, which implies refreshing the Google CardDAV patch.
2016-09-26 12:58:26 +02:00
Patrick Ohly
941774a1d1 D-Bus testing: fix slowing down file sources
Recent shells filter out environment variables that are not valid shell
variables, so for example,
SYNCEVOLUTION_FILE_SOURCE_DELAY_OPEN_addressbook-slow-server did not get
passed through to syncevo-dbus-server because of the hyphen. As a result, the
tests became unreliable (non-deterministic timing) or outright failed.

Now we ensure that these variables are valid also in a shell and in addition,
make the test stricter such that it detects when the file backend did not
wait.
2016-09-26 12:58:26 +02:00
Patrick Ohly
c1ba103059 test-dbus.py: adapt to modified dbus-monitor output
Recent distros like Debian Stretch have newer dbus-monitor with
extended content that no longer matched the regex used before. The
relaxed regex works with old and new dbus-monitor.
2016-09-26 12:58:26 +02:00
Patrick Ohly
ad33e1fbba sys.supp: ignore g_dbus_connection_new_sync
Started to appear on Debian Stretch after switching to gdbus from glib.
2016-09-26 12:58:26 +02:00
Patrick Ohly
ec32dd02d0 runtests.py: disable rpm packaging
When building on the new syncevolution.org reference platform, Ubuntu Trusty,
building rpm packages with checkinstall fails for unknown reasons. As
providing those rpms is of questionable value (libraries are more likely to be
different on rpm-based distros than on Debian/Ubuntu), building rpm simply
gets disabled entirely.

As a fallback for users there still are the plain .tar.gz archives containing
the same files.
2016-09-26 12:58:26 +02:00
Patrick Ohly
0c90fff232 runtests.py: don't run tests unless explicitly enabled
Previously, when --enabled was not given, all tests were run.  That was meant
to simplify running all tests, but that is rare and more likely to happen by
mistake when not selecting tests correctly in the automated testing, so now we
revert the logic and don't select a test if no --enable filter is set.
2016-09-26 12:58:26 +02:00
Patrick Ohly
40c801ccf9 runtests.py: fix XDG dir fallback
The XDG symlinks were created as fallback in case that the XDG env variables
somehow were ignored. In practice, the symlinks were not needed, so it didn't
matter that they were set incorrectly to the path name outside of the chroot.
But it's confusing when debugging the setup and just plain wrong, so better
fix it...
2016-09-26 12:58:26 +02:00
Patrick Ohly
d0d778ed99 runtests.py: make published test results world-readable
client-test makes new directories user-readable because that is
the default for all SyncEvolution directories. But after publishing
the test results, they need to be world-readable, because they are
going to be accessed via some kind of web server running under
some different user.
2016-09-26 12:58:26 +02:00
Patrick Ohly
f183271d65 autotools: allow extending core linker flags
These linker flags are added to those normally used for linking against
libsyncevolution. The intended usage is to extend linking of syncevolution.org
binaries such that static versions of libcppunit, libpcrecpp and libopenobex
are used, because the ABI of those libs have changed such that binaries linked
on Ubuntu Trusty would not run on more recent distros like Ubuntu Xenial.

For example, on Ubuntu Trusty i386 one can configure with:
   PCRECPP_LIBS=-lpcre \
   LIBOPENOBEX_LIBS=-lpcre \
   '--with-extra-core-ldadd=/usr/lib/i386-linux-gnu/libpcrecpp.a -lpcre /usr/lib/libopenobex.a /usr/lib/i386-linux-gnu/libusb.a' \
   CPPUNIT_LIBS=/usr/lib/i386-linux-gnu/libcppunit.a
2016-09-26 12:58:26 +02:00
Patrick Ohly
33dce914e8 autotools: use cppcheck.pc
Now cppcheck is found via the normal PKG_CHECK_MODULES. The advantage
is that CPPUNIT_CFLAGS and CPPUNIT_LIBS can be overridden with
configure parameters, which will be used to link cppcheck statically
into syncevolution.org binaries (libcppunit ABI has changed).
2016-09-20 07:00:28 -07:00
Patrick Ohly
499c1c72d5 syncevolution.org: drop binary compatibility hack for old libnotify
syncevolution.org binaries are going to support distros >= Ubuntu Trusty.
All of those have libnotify.so.4, so the old binary compatibility hack is
no longer needed.
2016-09-20 06:51:11 -07:00
Patrick Ohly
bf3c8d5361 ClientTest.cpp: fix clang warning
SOURCE_ASSERT_EQUAL() expects to get an expression as first parameter
which may become NULL. Passing a known-non-NULL pointer makes no sense
and triggers a warning from clang:

ClientTestAssert.h:109:50: error: nonnull argument 'copy' compared to NULL
[-Werror=nonnull-compare]
 # define CT_ASSERT_TRUE_CLANG_BUILD(_expression) if (!(_expression)) {
 exit(1); }
...                                                  ^
ClientTest.cpp:859:5: note: in
expansion of macro 'SOURCE_ASSERT_EQUAL'
SOURCE_ASSERT_EQUAL(&copy, 0, config.m_dump(client, copy, copyFile));
2016-08-29 04:59:38 -07:00
Patrick Ohly
a53e5289bd dbus-sync.cpp: fix cppcheck performance warning
cppcheck correctly warned that initializing a reference is enough,
no need to copy the string:

dbus-sync.cpp:97: cppcheck performance: passedByValue - Function parameter
'source' should be passed by reference.
2016-08-29 04:58:24 -07:00
Patrick Ohly
16e6e854c3 gdbus-cxx-bridge.h: avoid false cppcheck warning
cppcheck seems to mix up different template variations. The following error
needs to be suppressed in the classes which don't even have an m_a member:

gdbus-cxx-bridge.h:330: cppcheck warning: uninitMemberVar - Member variable
'Set::m_a' is not initialized in the constructor.
gdbus-cxx-bridge.h:339: cppcheck warning: uninitMemberVar - Member variable
'Set::m_a' is not initialized in the constructor.
2016-08-29 04:55:24 -07:00
Patrick Ohly
d560aeda07 compilation: fix std::find() == 0 misuse
cppcheck correctly warns about the old code as less efficient (looks
at entire string instead of just the start). Using boost::starts_with
is less obscure and avoids the warning.
2016-08-29 04:52:49 -07:00
Patrick Ohly
f7dbb2ed72 runtests.py: better logging of failed command
When execution of a command fails, then printing the actual
string passed to system() is more readable and accurate than
the original array.
2016-08-26 11:20:30 -07:00
Patrick Ohly
2b4b93f1ab compilation: fix const/non-const issue under C++14/gcc 6
Building client-test fails because a const pointer looses the
const attribute while passing it through boost::bind.

Fixes:

boost/lambda/detail/function_adaptors.hpp:357:16: error: invalid conversion
from 'const SyncEvo::SyncSource*' to 'SyncEvo::SyncSource*' [-fpermissive]
return func(a1);
2016-08-26 11:18:20 -07:00
Patrick Ohly
14452722fd compilation: fix push_back ambiguity under gcc 6/C++14
When compiling as C++14 (the default under gcc 6), template
expansion no longer picks the right instantiation of push_back.
We have to disambiguate which of the different push_back
alternatives we want.

Fixes:

Cmdline.cpp:1734:85: error: no matching function for call to 'bind(<unresolved
overloaded function type>, const boost::reference_wrapper<std::__cxx11::list<std::__cxx11::basic_string<char> >
>, const boost::arg<1>&)'
     processLUIDs(source, boost::bind(&list<string>::push_back, boost::ref(luids), _1));
2016-08-26 11:15:23 -07:00
Patrick Ohly
3299613591 compilation: fix boost::shared_ptr->bool issue under C++14
The implicit conversion of boost::shared_ptr->bool is no
longer supported when compiling as C++14 (the default under
gcc 6). We have to cast explicitly.

Fixes errors like this:

Logging.h:258:41: error: cannot convert 'const boost::shared_ptr<SyncEvo::Logger>' to 'bool' in return
         operator bool () const { return m_logger; }
2016-08-26 11:14:44 -07:00
Patrick Ohly
4e2dd07580 autotools: disable timezone override hack when using libical v2
libical v2 provides support for interoperable timezone definitions
again, so the copy of the original code that was added for libical v1
is not needed anymore and also wouldn't compile.

Therefore SyncEvolution can drop it when being compiled for v2. In that
case, a corresponding change in libsynthesis calls
icaltzutil_set_exact_vtimezones_support(0) to enable interoperable
timezones.

This addresses compilation and running with libical v2, i.e. what
normal distros are doing. Compiling with libical v1 and running
with v2 needs to be addressed separately, if possible at all.
2016-08-26 09:15:22 -07:00
Tino Mettler
a9aaf5b1e6 1.5.1-2 package 2016-07-14 09:50:37 +02:00
Tino Mettler
b5f5312b1c Fix remaining FTBFS with GCC 6 by downgrading the C++ dialect to gnu++98
Closes: #811624
2016-07-14 09:50:11 +02:00
Tino Mettler
80a82f6d27 Merge tag 'patches/1.5.1-2'
Patches for 1.5.1-2
2016-07-14 09:48:41 +02:00
Tino Mettler
9286b88515 Add missing casts from shared_ptr to bool to fix FTBFS with GCC 6 2016-07-08 12:54:32 +02:00
Tino Mettler
46a2401a19 1.5.1-1 package 2016-05-19 16:23:30 +02:00
Tino Mettler
0751ac954e Depend on recent libsynthesis package 2016-05-19 16:23:30 +02:00
Tino Mettler
470ecf0810 Remove old debug package definition, use the new dbgsym packages 2016-05-19 16:23:30 +02:00
Tino Mettler
254581a15b Upstream generates a manpage, remove outdated and obsolete own version 2016-05-19 16:23:30 +02:00
Tino Mettler
6a291c3ca9 Add dh_auto_clean quirk to make the package build twice in a row 2016-05-19 16:23:30 +02:00
Tino Mettler
ce127cfff5 Bump standards version, no changes needed 2016-05-19 16:23:24 +02:00
Tino Mettler
b2bcf9e9f2 Update Vcs-* fields to new URLs 2016-05-19 10:14:39 +02:00
Tino Mettler
cd3958d29d New upstream release 2016-05-19 10:14:39 +02:00