Commit Graph

4048 Commits

Author SHA1 Message Date
Tino Keitel 818cebfad8 Re-add sync-ui icon referenced in .desktop file (bug#658519)
This got lost by accident.
2012-02-09 13:55:26 +01:00
Tino Keitel c246660ddf Switch packaging to 1.2.2 2012-02-09 13:54:40 +01:00
Tino Keitel 925ff92b5e Add Breaks: and Replaces: to syncevolution-dbus
This fixes upgrades from squeeze (bug#657001).
2012-01-26 21:21:24 +01:00
Tino Keitel 143f22f7af Merge branch 'upstream' 2012-01-26 21:00:44 +01:00
Patrick Ohly 09ce2bb579 autotools + NEWS: updated for 1.2.2 release 2012-01-13 16:53:30 +01:00
Patrick Ohly 8b7591e736 lcs: must include unistd.h for (s)size_t
ssize_t and size_t were taken for granted after including
some C++ header files. That's not guaranteed and breaks
on FC17 with g++ 4.7.

Probably the "pure C++" lcs code shouldn't use these types;
for now let's simply include unistd.h.
2012-01-13 16:42:08 +01:00
Patrick Ohly 5b170518cf WebDAV: fixed libneon compatibility mode when compiling against libneon-gnutls
When NEON_LIBS=-lneon-gnutls, the sed invocation didn't properly turn
that into -ldl. Instead it used -ldl-gnutls, which caused a link error.

Fixed with an extended regex.

Partial cherry-pick from 856576df99 (without the install check).
2012-01-12 15:29:00 +01:00
Patrick Ohly 3d381aa0aa syncevo-dbus-server + ConnMan: fixed "online" detection (BMC #21541, BMD #24587)
SyncEvolution did not recognize any cellular connectivity as suitable
for syncing. The check for "connected technology" is unnecessary,
anything which makes the computer "online" should be good enough.
So now just use the ConnMan "State" property.

Additional benefit: will continue to work with ConnMan 1.0, which
won't have the "ConnectedTechnologies" property anymore.

The SyncEvolution code also (mis)used the "AvailableTechnologies"
property to determine whether OBEX over Bluetooth might work. As this
property is also going away, too, am changing the code so that
Bluetooth is always considered available (was already the case when
using Network Manager).

The Python D-Bus test for this functionality was overly complex (used
hidden state, code duplication) and didn't work (BMC #21541). Cleaned
up, which revealed some undesirable and broken behavior (BMC #24648).
That needs to be fixed separately. At the moment the test checks the
current behavior and works around the bug, so it passes.
2012-01-12 14:22:53 +00:00
Patrick Ohly a1200aea47 sync logic: INFO message about writing backups
Point out that backups are created (user might be unaware otherwise
and wonder about the delay), explain why (so that users know how to
turn it off).
2012-01-11 16:10:08 +01:00
Patrick Ohly 545d4a5d1d sync logic: dumpData + printChanges logic was broken (BMC #24619)
The logic for dumpData and printChanges wasn't implemented correctly.
- run sync with dumpData=0 printChanges=0 => writes database dumps
  ("before/after" in logdir) although it shouldn't
- run status check (--status) with dumpData=1 printChanges=0 => dumps and
  prints changes although it should do neither
- same for --restore

The fix is to check the "print changes" setting in addition to (and
not instead of) m_doLogging. m_doLogging is merely an override used in
testing. If false, then the logdir handling and thus data dumps are
disabled.

For --status only check printChanges. This used to print changes and
thus dump data when either dumpData or printChanges were set. It makes
more sense to only produce the output when exactly that is asked for.
2012-01-11 16:10:08 +01:00
Patrick Ohly ba96fca0ec EDS compatibility: bumped version check for EDS 3.2
SyncEvolution is known to work with EDS 3.2. Therefore use the
libebook/ecal/edataserver libs from 3.2 if available, without warnings
in the --version output. Also happens with inconsistent distro setups
where the old libs are available and would have been prefered by
SyncEvolution 1.2.1 even though the old libs no longer work with EDS
3.2.
2012-01-11 16:10:08 +01:00
Patrick Ohly 72a7f3d939 autotools: include missing src/dbus/qt/configure-sub.in
The file is necessary for running autogen.sh. Without it, the
src/dbus/qt directory was entered without having generated its
Makefile during configure, leading to a compile error.
2012-01-11 16:10:08 +01:00
Patrick Ohly a2a3f8add5 autotools: exclude .gitignore from source .tar.gz
When bundling the libsynthesis source code, it's .gitignore file was
also bundled. The .gitignore caused problems when re-importing the
.tar.gz into git and normally isn't necessary, so don't ship it.
2012-01-11 16:10:08 +01:00
Patrick Ohly 209013a4d2 documentation: Fedora workaround
Fedora's build of SyncEvolution 1.2.1 failed because running the
uninstalled src/syncevolution didn't find the necessary shared
objects. Not sure why: on Debian Testing, src/syncevolution invokes
src/.libs/lt-syncevolution, which has the necessary paths set as
RPATH.

As a workaround, set LD_LIBRARY_PATH explicitly. This intentionally
includes a path which is only relevant on the master branch
(gdbuscxx), to simplify merging.
2012-01-11 16:10:08 +01:00
Patrick Ohly 98386d4e33 documentation: more readable --help, support cross-compilation better
The <<insert sync/source-property>> tags were visible in the --help
output. Now it says
   << see "syncevolution --sync/source-property ?" >>

These special tags still get expanded in README and man page.
That expansion is done by invoking the uninstalled syncevolution
binary. If that failed, compilation aborted. That's still the case
for native compilation (because we want to catch problems). For
cross-compilation such a failure is okay and keeps the tags in
the README/man page. That's done because running a binary compiled
for an entirely different architecture is not guaranteed to work.
2012-01-11 16:10:08 +01:00
tino+debian@tikei.de c6d6ef23d1 Debian: move packaging to 1.2.1 2011-12-19 21:40:57 +01:00
Patrick Ohly 24dccab4a6 updated translations
.po files downloaded from https://meego.transifex.net/projects/p/syncevolution/resource/syncevolution-1-2/
Up-to-date for all of the 16 languages:
- new error message from previous commit
- "Use these settings"
- .desktop files
2011-12-13 14:08:27 +01:00
Jussi Kukkonen 2e01af7e09 Do not accept service config without a username (BMC#23106) 2011-12-13 14:08:27 +01:00
Tino Keitel efc29d41e7 Merge branch 'upstream' 2011-12-07 21:18:26 +01:00
Patrick Ohly ee05ef35f7 NEWS updated for revised 1.2.1 2011-11-25 14:27:02 +00:00
Patrick Ohly e56c2b245a glib: avoid including glib/*.h headers directly
Recent glib deprecates the direct inclusion of some of its headers,
in favor of including glib.h. Doing that here whenever possible. gi18n.h
still needs to be included directly (otherwise it doesn't compile
on Debian Testing with glib 2.28).

Not sure about gio. I'm keeping the gio/ includes because they
are relevant on platforms where gio was not yet part of glib.
2011-11-25 14:19:06 +00:00
Patrick Ohly c044c580c2 vCard: X- chat extensions were limited to one instance per kind
For example, only one Jabber account could be synchronized. This
was caused by an incomplete definition of the conversion to and from
vCard.

The test for multiple X- chat extensions is currently only done
in combination with Synthesis because that server is known
to support multiple instances of them.
2011-11-25 13:58:28 +00:00
Patrick Ohly 6c7d48ba98 testing: increased delay for Memotoo to 10 seconds
With the previous 5 seconds, occassionally tests failed because
recent changes didn't propagate quickly enough.
2011-11-25 13:36:52 +00:00
Alain Knaff be22a465c4 syncevo-http-server: support chained SSL certificates
So far, the file pointed to by --certificate-file had to
contain the server certificated (signed by a CA known to the client)
and (optionally) a client certificate.

With this patch, the file may also contain additional intermediate
certificates which will be sent to the client (chained certificates).

See http://twistedmatrix.com/pipermail/twisted-python/2010-July/022597.html
2011-11-25 13:33:35 +00:00
Patrick Ohly 4b2b737e24 autotools + NEWS: updated for 1.2.1 release
Require latest libsynthesis for the virtual data store 404 fix.
2011-11-21 21:11:40 +01:00
Patrick Ohly 2df5a2896a D-Bus testing: fixed error reporting
On Debian Testing with Python 2.7 the nightly report did not properly
report failed tests. That's because now python-unit writes error
reports with the failed function on the error line, instead of using
the doc string.  The change is useful (because doc strings are not
necessarily enough to identify the test, which SyncEvolution had to
work around by imposing a specific format of the doc strings), but the
change broke output parsing. Now both old and new output is matched.
2011-11-18 15:17:21 +00:00
Patrick Ohly cbfaad66a4 phone sync: delete<->delete conflict + phone calendar+todo sync (BMC #23744)
When deleting an item on phone and locally, the next sync fails with
ERROR messages about "object not found". This has several reasons:
- libsynthesis super data store attempts to read items
  which may or may not exist (triggers ERROR message)
- it checks for 404 but Evolution backends only return a generic
  database error (causes sync to fail)

It turned out that ReadItem and DeleteItem are expected to return a
404 status when the requested item does not exist. This patch documents
that (only in the TrackingSyncSource, though), adds tests and fixes
EDS, WebDAV, file and sqlite backends accordingly.

This patch also suppresses the 404 error logging inside DeleteItem(),
while still returning that error code to the Synthesis engine. Not
logging that particular situation is consistent with the previous
SyncEvolution behavior of silently returning successfully when there
wasn't anything to delete.

In addition, more recent libsynthesis versions also no longer do
a ReadItem() call to test for existence. That would still trigger
a spurious (albeit now harmless) ERROR message.
(cherry picked from commit ba289c899f)

Conflicts:

	src/backends/webdav/CalDAVSource.cpp
	test/ClientTest.cpp
	test/ClientTest.h
2011-11-18 15:17:21 +00:00
Patrick Ohly c319e0eb31 Nokia: prevent accidental usage of "calendar" or "todo" sources
Nokia phones use a combined "calendar+todo" source for syncing. The
"calendar" and "todo" sources also exist because that is where local
databases are configured.

In such a setup, syncing always has to use "calendar+todo". For example,
to refresh from the Linux desktop to the phone, use:
   --sync refresh-from-server <config> calendar+todo

To work with items (restore, show local content), use the underlying sources,
as in:
   --print-items <config> calendar

It was possible to accidentally sync with the "calendar". This commit
prevents that by adding an invalid URI setting to the "calendar" and
"todo" sources in the Nokia and Ovi templates. Existing configs are not
touched, so beware when you already have configured your Nokia phone.
2011-11-18 15:17:21 +00:00
Patrick Ohly 436af6cbd8 testing: improved automatic integration + reporting
Merge branches are removed locally before fetching from the remote repo.
Ensures that obsolete branched which where removed from the remote repo
also no longer exist locally. By itself, "git fetch" doesn't do that.

Automatic integration ignores branches which were already merged into
the upstream remote branch. Avoids redundant listing of branches
in the integration report which didn't really need to be merged for the
test run.

Unstaged and staged changes ("stash") are included in the patch report.
The patches are sorted from oldest to most recent. Fixed the fallback
code when a patch has no Subject.

The scripts for reporting tests results are taken from the merged
source code. That ensures that the reporting matches the tests
that were run. The versions from the boot-strapping SyncEvolution
code are the fallback, just in case that automatic integration
fails.

(cherry picked from commit 33bbf5df57)

Conflicts:

	test/generate-html.xsl

In contrast to the master branch, URLs are still absolute because
backporting those changes would have been more difficult.
2011-11-18 15:16:22 +00:00
Patrick Ohly 86cc5f5785 testing: fixes for automatic integration
Some paths changed as part of the "automatic integrate" patch.
Instead of recalculating the path to the source code, use the
sync.basedir member.
(cherry picked from commit 4c5a27ce66)

Conflicts:

	test/runtests.py
2011-11-18 15:15:36 +00:00
Patrick Ohly 220d60caae GTK UI + config: fix "custom server" setup (BMC #13511)
When the "default" config template (= ScheduleWorld) was downgraded to
"not consumer ready" in SyncEvolution 1.1.0.99.1, setting up a custom
SyncML service in the GTK UI stopped working because the UI wouldn't
show the "not consumer ready" config.

Fixed by changing the "default" config:
- always has ConsumerReady = 1
- PeerName empty
- based on SyncEvolution server template (not essential,
  but has saner, minimal settings for all sources and
  will make it easier to remove the ScheduleWorld template)

It is uncertain why the initial bug report says that the failure is
random and why Jussi was unable to reproduce the problem. The problem
describe above is deterministic. So perhaps there is also another,
related issue.
2011-11-18 15:15:36 +00:00
Patrick Ohly 12562fb928 syncevo-dbus-server + phone sync: catch SIGPIPE to avoid premature exit
Frederik Elwert reported that running a local sync with a phone via
Bluetooth caused the syncevo-dbus-server to shut down during a sync.
A log showed that a SIGPIPE is triggered, apparently by a writev()
inside libdbus.

Explicitly telling the process to ignore the signal solved that
problem.
2011-11-18 15:15:35 +00:00
Patrick Ohly 5c27f81d5f testing: adapted Cmdline tests to revised config descriptions
Formatting was changed and a new warning was inserte for "sync".
(cherry picked from commit bb222f236a)
2011-11-18 15:15:35 +00:00
Patrick Ohly 816dc54dc5 EDS compatibility: fixed inconsistency in libecal check
The check for the _r variants in libical still used an older max
version. This might have prevented using them (if not found) or
could have led to a mixture of old and new libecal in the same
process (probably crashed).
(cherry picked from commit f93b675d77)
2011-11-18 15:15:35 +00:00
Patrick Ohly d374cd01ba testing: avoid aborting client-test due to exception in destructor
The TestingSyncSource destructor ends up calling endSync() for
CalDAV/CardDAV, which must do some real work and may fail with an
exception. If the test has already failed and is getting left via
exception handling, then this extra work can be skipped and, more
importantly, no exceptions are allowed because they would terminate
client-test.

Happened in practice when Google becomes unresponsive with 401 errors,
because then the test fails and the reading of CTag in endSync() is
just going to encounter the same problem, thus raising a second
exception.
(cherry picked from commit 919a45adef)

Conflicts:

	test/ClientTest.cpp

Conflict because of renamed test macros.
2011-11-18 15:15:24 +00:00
Patrick Ohly 81c6d37e1d testing: automatically integrate branches (BMC #735)
Branches committed to the libsynthesis or SyncEvolution git repo with
a name of "for-<branch>/<name>" will be automatically merged into
<branch> before starting the testing:
   --sourcedir <dir with existing repos> --workdir <dir with merged repos>

The result can be reused as-is in further runtests.py invocation by using
   --sourcedir <merged repos> --no-sourcedir-copy

Any local, *uncommitted* changes will be preserved and applied to
the merged sources (git stash). *Committed* changes will *not* be
applied. Always push them immediately.

Because there is a risk of loosing work when these rules are not
followed, the current state of the tree is stored as a branch created
with "git stash create" under the names
<branch>-nightly-before-<date+time> and <branch>-nightly. The latter
gets overwritten during each run.

These branches can be used to cherry-pick commits or restore the tree
as it was before the automatic merging ("git stash branch <branchname>
<branch>-nightly").

Result reporting includes information about the resulting code
revision.  This includes the names of all branches which were
available for merging and whether that succeeded or failed. The output
of "git describe" is also included, always with a hash (even when it
matches a tag, in case that the tag gets moved) and whether the
working tree was dirty. All commits applied to the base branch are
listed in "git am" format.

This is done because the merged code is not pushed. This would clutter
the upstream code repository.

The "for-" prefix (instead of just "<branch>/") was added because git
got confused when <branch> was both a real branch and a directory of
other branches.
(cherry picked from commit 3e9fc042dc)
2011-10-28 09:01:18 +02:00
Patrick Ohly 34d2daff9c Memotoo testing: supports ADR country
Found out that Memotoo supports the country field, albeit only if the
string is recognized by Memotoo. That wasn't the case for some of the
test data.

Adapted the test data to use countries that Memotoo knows (Germany,
France, with the English names). Also updated synccompare.pl to
reflect the current set of lost properties and removed the Memotoo ADR
simplification.
(cherry picked from commit 4dd89c8626)
2011-10-28 09:01:18 +02:00
Patrick Ohly 5bfe6b9a5c Mobical testing: ensure that test account uses the right timezone
All-day event syncing only works with vCalendar 1.0 if client
and server use the same timezone. That's because all-day events
have to be represented as 00:00-23:59 events.

Use Europe/Berlin for the Mobical test account. That matches the current
server settings.
2011-10-25 15:17:05 +00:00
Patrick Ohly 0f99835349 Synthesis contact testing: avoid \; -> ;; issue in testExtensions
The Synthesis installation on plan44.ch stores X- extensions,
but currently replaces \; in the incoming vCard 3.0 with ;; in
the outgoing vCard 2.1. Avoid this aspect of the test for the time
being.
2011-10-25 15:11:23 +00:00
Patrick Ohly 774a9f26d8 documentation: embedd property definitions in man page, README and README.html
Mangle the README.rst once into a README.patched.rst and use that to
produce the three different flavors of the documentation.
2011-10-24 20:05:16 +02:00
Patrick Ohly 13b89e2224 documentation: added glossary and command line conventions sections, improved listing of properties
The README.rst now introduces some terms in a glossary directly after
the synopsis. The way how config, sources and properties are used on
the command line are also defined first in their own section, instead
of introducing that further down as part of the options.

The output of "--sync/source-property ?" was changed:
- now it includes information about aliases, default values
  and sharing state (useful by itself)
- follows reStructured Text format and thus can be embedded
  directly inside the README.rst

The Makefile rules for that will be committed in the next patch
(must be done differently on syncevolution-1-2 and master branch,
whereas this commit applies cleanly to both).
2011-10-24 20:04:36 +02:00
Patrick Ohly 1138f4fb7e Google CalDAV testing: ignore Google bug #61: cannot remove detached recurrence
Somehow a PUT which removes the detached recurrence from a meeting has
no effect. Looks like a Google server bug. Keep testing, but ignore
the failure.
2011-10-17 08:45:31 +00:00
Patrick Ohly 31841b85b1 Google CalDAV testing: avoid multiple detached recurrences
Because of Google issue with detached recurrences without parent
(http://code.google.com/p/google-caldav-issues/issues/detail?id=58)
and the SyncEvolution workaround (replacing RECURRENCE-ID with
X-SYNCEVOLUTION-RECURRENCE-ID) only one detached recurrence per UID
can be stored.

Removing the second modified recurrence from the test cases for
Google.
2011-10-17 08:45:31 +00:00
Patrick Ohly 3f37dbe84e testing: avoid anchor dependencies between tests
TestingSyncSourcePtr manages anchors for all sources
created via it. These anchors used to be reused when
running multiple tests, which may have led to different
results compared to running tests by themselves. So now
the anchors get reset at the start of each test, detected
by the changed getCurrentTest() name.

This change was triggered by the observation that combining
Client::Sync::eds_event::testItems with Client::Source::google_caldav
failed in Client::Source::google_caldav::testChanges around
change tracking. The reason was that the anchor for an EDS source in
eds_event::testItems was reused as the anchor for a CalDAV source
in google_caldav::testChanges, which prevented a slow item scan
when it would have been needed.
2011-10-17 08:42:54 +00:00
Patrick Ohly 3789bc9eb8 NEWS + autotools: updated to 1.2
Summarized changes in 1.1.99.x series. Depend on latest libsynthesis.
2011-10-13 11:32:44 +02:00
Patrick Ohly 0886ceb71a testing: added more valgrind suppressions for ASN encoding
gnutls + ASN encoding also showed up in the context of libneon.
2011-10-12 12:53:05 +00:00
Patrick Ohly d3d14544f1 autotools: depend on libsynthesis 3.4.0.16.3
We want the latest version with "newest wins" in add<->add conflict
resolution.
2011-10-10 10:08:02 +02:00
Patrick Ohly 01519b1204 testing: avoid add<->add tests for Funambol, Memotoo, Mobical
All of these servers do not use the UID to find duplicates and
thus duplicate items in these tests, in contrast to what the test
expects.
2011-10-10 08:00:34 +00:00
Patrick Ohly ee882ca895 Apple testing: no need to avoid complex UID
The VEVENT UID with lots of special characters was unnecessarily
avoided, recent (all?) Apple Calendar Server handles that fine.
2011-10-10 08:00:10 +00:00
Patrick Ohly 0aa156a7fd README: moved warning about sync direction
The warning about reversed data direction in local sync also applies
to syncing with a phone. Therefore the warning is now listed more
prominently below the "--sync" command line option and was extended to
also cover direct syncing.
2011-10-10 09:39:22 +02:00