SYNCEVOLUTION_CFLAGS was set to "." when compiling in the source
tree, because then $builddir="" and $srcdir=".", which was unexpected
(and obviously untested). Failed later, fixed now.
Additional backends can now count on SYNCEVOLUTION_CFLAGS/LIBS to find
the "syncevo" header files and libsyncevolution.la. The internal backends
still hard-code these paths (might be changed later).
This patch distinguished between having libecal and having
libical. Previously libical could not be used without libecal.
Whoever detects libecal also must mark libical as available (which is
implied, because libecal uses libical).
libecal/ebook implementation based on D-Bus (Evolution >= 2.30)
inevitably will run into D-Bus timeouts as the amount of data
increases.
This patch moves an earlier hack written for Maemo into the core
code and enables it by default, if the EDS backends are active.
It works by intercepting dbus_connection_send_with_reply()
and substituting timeout_milliseconds==-1 ("default timeout
of 25 seconds") with timeout_milliseconds=INT_MAX ("no timeout").
Setting SYNCEVOLUTION_DBUS_TIMEOUT to number of milliseconds
allows controlling the final timeout value.
Add to $qt_config to extend the CONFIG variable that is passed to
qmake. Add new lines(!) to $qt_misc to add arbitrary lines.
Example:
qt_config="$qt_config +mobility"
qt_misc="$qt_misc
MOBILITY += contacts versit"
Using the GNOME keyring should be optional. Right now it is always on when
found.
--enable-gnome-keyring: fail if not available or invalid value given
--disable-gnome-keyring: disable, even if found
unset: use if found
Autotroll (http://tsunanet.net/autotroll/) allows configure to
determine the right compile flags needed to access Qt header files
and libraries.
SyncEvolution backends can append new Qt modules to the
"need_qt_modules" variable in the configure stub. If set, configure
will call AT_WITH_QT().
Excluding the GUI part of Qt is currently hard-coded. Enable it again
with "need_qt_modules=$need_qt_modules +gui" if necessary.
'--enable-doc' configure option is newly added to control
generation of API documentation for backend public API
and D-Bus API. The default value is 'no'.
D-Bus API html documentation could be generated and all
pages(currently 3 docbook files) are merged into one single
html page called 'syncevo-dbus-api-doc.html'. To dynamically
generate 'version' of syncevolution into the html page, a placeholder
'##VERSION##' is used and changed in the generation.
The sync-ui doesn't have a hard compile dependency on syncevo-dbus-server,
although it obviously won't run well without it. The new --disable-core
option can be used to compile just the sync-ui and the D-Bus wrapper lib
that it depends on.
Translations are generated when sync-ui and syncevo-dbus-server
are enabled, because both depend on the same translation files.
For the situation that sync-ui needs to include syerror.h from a
bundled Synthesis source, but libsynthesis itself is not built,
a special src/synthesis-includes directory is entered and produces
the necessary files by invoking the right target in the Synthesis
build dir. Because of that, enough packages must be installed to
configure the Synthesis engine even when only building the UI.
Stronger hash algorithms are necessary for the identification of
file content via a hash value (same approach as in git). SHA-256
is taken from glib if glib is already a SyncEvolution dependency
for other reasons, otherwise the configure script looks for
Mozilla NSS.
Another candidate is libgcrypt, but there's no code for that yet.
All of these libraries are LGPL or more liberal, so they don't
impose any additional requirements on users of SyncEvolution,
in contrast to OpenSSL (advertisement clause!).
The GNOME Bluetooth panel plugin needs to be installed into
the location used by the system. We guess what that location might be by
installing into `pkg-config --variable=libdir gnome-bluetooth-1.0`/plugins.
Because this location might not be writable, compiling the plugin is
off by default. It can be enabled with --enable-gnome-bluetooth-panel-plugin
which depends on the libgnome-bluetooth-dev files.
Shared libraries must be enabled when enabling the plugin. Not currently
checked by configure.
This patch replaces src/syncclient_sample_config.xml with a
combination of src/syncevo/configs/syncevolution.xml and the
config fragments that are shared with Synthesis upstream.
These fragments are installed in /usr/share/syncevolution/xml (or
the corresponding data path). From there they are read at runtime
to compose the final XML configuration. Users can copy individual files
into the corresponding directory hierarchy rooted at
$XDG_CONFIG_HOME/syncevolution-xml to replace individual fragments.
New fragments can be added there or in /usr/share.
For testing, these two directories can be overridden with the
SYNCEVOLUTION_XML_CONFIG_DIR env variable. No tests have been added
for this yet. There's also no documentation about it except this
commit message - add something to the HACKING guide once this
new concept stabilizes.
Developers can add new fragments in the source tree, invoke make and run the
resulting binary in client mode. As before, a complete config is included
in the binary. However, it is only sufficient for SyncML client mode.
For server mode, the files are expected to be installed (no need to maintain
a list of files in a Makefile for that) or SYNCEVOLUTION_XML_CONFIG_DIR
must be set.
At the moment, the following sub-directories are scanned for .xml files:
- the root directory to find syncevolution.xml
- datatypes, datatypes/client, datatypes/server
- scripting, scripting/client, scripting/server
- remoterules, remoterules/client, remoterules/server
Files inside "client" or "server" sub-directories are only used
when assembling a config for the corresponding mode of operation.
The goal of this patch is to simplify config sharing with Synthesis
(individual files are easier to manage than the monolitithic one), to
share files between client and server with the possibility to add
mode-specific files, and to allow users to extend the XML
configuration. The most likely use case for the latter is support for
more devices.
Previously, remote rules for the different devices listed in
syncserv_sample_config.xml were not used by SyncEvolution.
This patch moves the ZYB remote rule into a client-specific remote rule,
thus removing a complaint from libsynthesis about the unknown <client>
element when running as server.
Because we are using the unified upstream config, some parts of the config
have changed:
- There is a SYNCLVL field in all field list. This is currently unused
by SyncEvolution, but doesn't hurt either.
- A new iCalendar 2.0 all-day sanity check was added (for older Oracle servers?).
- The CATEGORIES defition in vBookmark was extended.
- some comment and white space changes
Because this is such fundamental change, extra care was taken to
minimize and verify the config changes. Here's the command which compares
old and new config for clients plus its output:
$ update-samples.pl syncevolution.xml client | diff -c -b syncclient_sample_config.xml -
***************
*** 31,42 ****
<scripting>
<looptimeout>5</looptimeout>
- <function><![CDATA[
- // create a UID
- string newuid() {
- return "syuid" + NUMFORMAT(RANDOM(1000000),6,"0") + "." + (string)MILLISECONDS(NOW());
- }
- ]]></function>
<macro name="VCARD_BEFOREWRITE_SCRIPT_EVOLUTION"><![CDATA[
// a wordaround for cellphone in evolution. for incoming contacts, if there is only one CELL,
// strip the HOME or WORK flag from it. Evolution then should show it. */
--- 30,35 ----
***************
*** 118,123 ****
--- 111,124 ----
}
]]></macro>
+ <function><![CDATA[
+ // create a UID
+ string newuid() {
+ return "syuid" + NUMFORMAT(RANDOM(1000000),6,"0") + "." + (string)MILLISECONDS(NOW());
+ }
+ ]]></function>
+
+
<!-- define script macros for scripts that are used by both vCalendar 1.0 and iCalendar 2.0 -->
<macro name="VCALENDAR_INCOMING_SCRIPT"><![CDATA[
***************
*** 145,150 ****
--- 146,158 ----
DTSTART = CONVERTTOUSERZONE(DTSTART);
MAKEALLDAY(DTSTART,DTEND,i);
}
+ else {
+ // iCalendar 2.0 - only if DTSTART is a date-only value this really is an allday
+ if (ISDATEONLY(DTSTART)) {
+ // reshape to make sure we don't have invalid zero-duration alldays (old OCS 9 servers)
+ MAKEALLDAY(DTSTART,DTEND,i);
+ }
+ }
// Make sure that all EXDATE times are in the same timezone as the start
// time. Some servers send them as UTC, which is all fine and well, but
***************
*** 265,275 ****
</scripting>
-
<datatypes>
-
<!-- list of internal fields representing vCard data -->
<fieldlist name="contacts">
<field name="REV" type="timestamp" compare="never" age="yes"/>
<!-- Name elements -->
--- 274,283 ----
</scripting>
<datatypes>
<!-- list of internal fields representing vCard data -->
<fieldlist name="contacts">
+ <field name="SYNCLVL" type="integer" compare="never"/>
<field name="REV" type="timestamp" compare="never" age="yes"/>
<!-- Name elements -->
***************
*** 680,689 ****
$VCARD_INCOMING_NAMECHANGE_SCRIPT
]]></incomingscript>
</datatype>
-
-
<!-- common field list for events and todos (both represented by vCalendar/iCalendar) -->
<fieldlist name="calendar">
<field name="ISEVENT" type="integer" compare="always"/>
<field name="DMODIFIED" type="timestamp" compare="never" age="yes"/>
--- 688,696 ----
$VCARD_INCOMING_NAMECHANGE_SCRIPT
]]></incomingscript>
</datatype>
<!-- common field list for events and todos (both represented by vCalendar/iCalendar) -->
<fieldlist name="calendar">
+ <field name="SYNCLVL" type="integer" compare="never"/>
<field name="ISEVENT" type="integer" compare="always"/>
<field name="DMODIFIED" type="timestamp" compare="never" age="yes"/>
***************
*** 787,793 ****
<subprofile onlyformode="standard" name="VTIMEZONE" mode="vtimezones"/>
! <!-- sub-profile for todoz -->
<subprofile name="VTODO" nummandatory="1" showifselectedonly="yes" field="ISEVENT" value="0">
<property name="LAST-MODIFIED" suppressempty="yes">
--- 792,798 ----
<subprofile onlyformode="standard" name="VTIMEZONE" mode="vtimezones"/>
! <!-- sub-profile for tasks -->
<subprofile name="VTODO" nummandatory="1" showifselectedonly="yes" field="ISEVENT" value="0">
<property name="LAST-MODIFIED" suppressempty="yes">
***************
*** 1394,1401 ****
<!-- non-standard properties -->
! <property name="CATEGORIES">
! <value field="CATEGORIES"/>
</property>
<property name="CLASS" suppressempty="yes">
--- 1394,1402 ----
<!-- non-standard properties -->
! <!-- inherit CATEGORIES from vCard 3.0, i.e. comma separated -->
! <property name="CATEGORIES" values="list" valueseparator="," altvalueseparator=";">
! <value field="CATEGORIES" combine=","/>
</property>
<property name="CLASS" suppressempty="yes">
***************
*** 1416,1435 ****
<use profile="vBookmark"/>
</datatype>
! <fieldlists/>
! <profiles/>
! <datatypes/>
</datatypes>
<clientorserver/>
-
- <client type="plugin">
- <remoterule name="ZYB">
- <manufacturer>ZYB</manufacturer>
- <model>ZYB</model>
- <!-- information to disable anchors checking -->
- <lenientmode>yes</lenientmode>
- </remoterule>
- </client>
-
</sysync_config>
--- 1417,1424 ----
<use profile="vBookmark"/>
</datatype>
!
</datatypes>
<clientorserver/>
</sysync_config>
Older automake doesn't have --with-docdir and thus no
way of installing our docs in that dir. As a workaround,
check right before generating Makefiles whether $docdir
is empty and set it if necessary.
Added --enable-bluetooth let the user explictly enable bluetooth, in this case
the configure process will fail if the dependent library is not installed.
If the option is not set, bluetooth is enabled by default anyway; however if
user don't have necessary library installed it will not attemt to built with
bluetooth support.
Added a summary to display whether the bluetooth support is enabled.
The EDS backend was asking for glib support even when it was not
active. In combination with not linking against the right libs
in that case there was a link failure because g_thread_init()
and g_type_init() were not found.
When the EDS backend was active, this wasn't a problem because
the necessary libs were linked indirectly.
This patch reduces the number of libs that are checked and used
when not enabling the EDS backend. This is done by resetting
the ECAL/EBOOK flags when inactive and only asking for glib
when active.
It also fixes the checking and linking against gobject and gthread
in the case that glib support is requested.
More recent libtool versions contain a check that the
install dir doesn't deviate too much from the libdir
compiled into the libs. This check failed when the
chosen path ended with a slash, leading to:
libtool: install: error: cannot install `syncecal.la' to a directory not ending in ...
I consider this a bug in libtool and sent a bug report
together with a fix. In the meantime, let's avoid the
problem by not adding any redundant slash in our
path...
Two more functions which have to be intercepted to avoid hard
dependencies on libecal or libical.
Because this is something which is likely to come up again
in the future, this patch also adds a "installcheck-local" for
undesired dependencies on libical/ecal/ebook/edataserver.
This check is triggered when building binary packages by using
"installcheck" instead of "install". It intentionally checks
.so files in the build directory, to catch problems even in
libs which are not currently installed.
The library is compiled and installed as a syncevolution utility
library (in other words, as lib/syncevolution/libgdbus), so that
it never conflicts with a copy of the code in another project.
The path compiled into libsyncevolution.so when developer mode
was active was "backends/", so backends were only found when
running SyncEvolution inside that directory. This is a bit
too limiting. Now the absolute path is compiled in.
Install head files to a standard path, the remaining dependencies are
synthesis and boost
client-test is portable when ENABLE_MODULES is defined, no longer link to
backends libraries.
Add --enable-developer-mode, in which mode the backend scan path will be
under current build directory for development purposes.
syncevo-dbus -> src/dbus
interfaces -> src/dbus/interfaces
Files generated from D-Bus interfaces are only built once, in src/dbus/interfaces.
This is changes makes the code layout a bit nicer and, more importantly,
fixes build dependencies when Synthesis is compiled in src.
Now everything that is needed by a certain directory is in that directory
or a sub directory.
Configure didn't check correctly for "glib": it invoked glib-config
but didn't notice when that command was missing. Removed that
check as it has been superseeded by "glib-2.0" anyway.
Boost wasn't checked for at all, although the Boost header files are
no longer bundled.
libecal and libebook are now obligatory unless explicitly disabled.
This catches a common mistake made by users: previously syncevolution
would compile, but without Evolution support. The drawback is that
on platforms without Evolution, support for it now must be disabled
explicitly.
The new TransportAgent base class supports sending a message and waiting
for a reply. Implementations which block in either the send() (CurlTransportAgent)
or the wait() (SoupTransportAgent) call are possible.
The default implementation is compiled into libsyncevolution. configure
picks libsoup if available, otherwise libcurl. The default can be changed
via --enable-libcurl/libsoup, including not compiling any transport. Normally
that triggers a configure error because it leads to an unusable syncevolution
binary.
Derived EvolutionSyncClients can change the default via createTransportAgent().
The new EvolutionSyncClient::displaySyncProgress(),
displaySourceProgress() and displayServerMessage() calls
can be overridden to display information to the user.
The default implementation prints into the log.
PEV_DSSTATS_* statistics are saved in EvolutionSyncClient
and printed to the log after each sync.
The older askPassword() is also one of the virtual callbacks
This works by mapping all EDS symbols to pointers initialized via dlopen/dlsym.
Avoids version checks as intented, but might lead to runtime crashes if the ABI
of the required symbols really changes...
Currently the binaries refuses to start when any of the EDS libs is not found.
Need to make it work again so that libecal and libebook are optional (Maemo!).
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@747 15ad00c4-1369-45f4-8270-35d70d36bdcd