Re: [SyncEvolution] TDEPIM sync questions

2016-02-10 Thread deloptes
Patrick Ohly wrote:

> Another test might be to set up syncing between file backends. For that
> replace the TDE datastores on the target side of your sync config with
> another file backend, like you did on the local side. If that also
> fails, then it should be a problem that is completely independent of
> your TDE work.

File to File works :-(

regards 

___
SyncEvolution mailing list
SyncEvolution@syncevolution.org
https://lists.syncevolution.org/mailman/listinfo/syncevolution


Re: [SyncEvolution] TDEPIM sync questions

2016-02-09 Thread deloptes
Patrick Ohly wrote:

> LocalTransportAgent::storeSyncReport() is the parent side and logs "got
> child sync report" once the data made it across the local D-Bus
> connection. Do you see that when running with SYNCEVOLUTION_DEBUG and
> loglevel=10?

yes I see status=200 - everything went good, but the one side is waiting for
the other to close the connection, which never happens

> 
> Another test might be to set up syncing between file backends. For that
> replace the TDE datastores on the target side of your sync config with
> another file backend, like you did on the local side. If that also
> fails, then it should be a problem that is completely independent of
> your TDE work.

OK
I'll try to do that and report back, thanks

> 
> However, then you'd still have to debug it, as I haven't seen that
> myself so far :-/

There is a lot of //TODOs all arround those lines reported. I was just not
at 100% sure if I have the proper setup, but now I think so and sooner or
later we'll solve this ACK issue.

thanks

___
SyncEvolution mailing list
SyncEvolution@syncevolution.org
https://lists.syncevolution.org/mailman/listinfo/syncevolution


Re: [SyncEvolution] TDEPIM sync questions

2016-02-08 Thread deloptes
Patrick Ohly wrote:

> In case of a local sync, two processes are involved. You need to attach
> to syncevo-local-sync (gdb -p `pidof syncevo-local-sync`) and have a
> look where that one is stuck when the problem occurs.

Thanks again for the hint. I do not have that much experience in debugging
at this level. 
I'll check the details in the evening. If someone has time and idea to help
me further, here is the bt output (gdb -p `pidof syncevo-local-sync`).

Loaded symbols for /usr/lib/libtqui.so.1
0x75170e8d in poll () at ../sysdeps/unix/syscall-template.S:81
81  ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) bt
#0  0x75170e8d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x75ec4ee4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x75ec4ffc in g_main_context_iteration ()
from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x76b03891 in SyncEvo::LocalTransportAgentChild::step
(this=this@entry=0x67fd30,
status="waiting for parent's ACK for sync report") at
src/syncevo/LocalTransportAgent.cpp:818
#4  0x76b08bed in SyncEvo::LocalTransportAgentChild::run
(this=0x67fd30) at src/syncevo/LocalTransportAgent.cpp:1147
#5  0x76afd5b0 in SyncEvo::LocalTransportMain (argc=,
argv=)
at src/syncevo/LocalTransportAgent.cpp:1335
#6  0x750b2b45 in __libc_start_main (main=0x400940
, argc=1, argv=0x7fffde98,
init=, fini=, rtld_fini=,
stack_end=0x7fffde88) at libc-start.c:287
#7  0x0040099f in _start ()

Thank you in advance.

___
SyncEvolution mailing list
SyncEvolution@syncevolution.org
https://lists.syncevolution.org/mailman/listinfo/syncevolution


Re: [SyncEvolution] TDEPIM sync questions

2016-02-07 Thread deloptes
deloptes wrote:


> 
> I think I have a problem with understanding the configuration and how I
> can create a test setup where I have a local sync server (file backend)
> and TDE PIM on the other side.
> It looks like it worked for addressbook, but trying to reproduce or extend
> it with calendar was not successfull yet.
> 

The problem with syncing calendar items was solved.
It turned out to be a code issue, so after fixing it I now can sync all
types, but I still have the problem, that it hangs in the middle and I have
to hit CTRL+C twice or more times to get back to the shell.

I don't know in which direction I have to look - something related to the
transport? Could you please help?

In the config I have now - I am not sure where I had to apply dumpData=0 and
printChanges=0

syncevolution --configure \
 --template none \
  username= \
  password= \
  dumpData=0 \
  printChanges=0 \
  target-config@${peer}

syncevolution --configure \
  --template SyncEvolution_Client \
  syncURL=local://@${peer} \
  peerIsClient=1 \
dumpData=0 \
printChanges=0 \
  username= \
  password= \
  ${peer} \
  addressbook calendar todo memo

Here is what I see executing

SYNCEVOLUTION_DEBUG=1 syncevolution loglevel=10 --daemon=no --sync slow
tdepim addressbook

...

[DEBUG 00:00:05] before SessionStep: STEPCMD_STEP
[DEBUG 00:00:05] after SessionStep: STEPCMD_SENDDATA
[DEBUG 00:00:05] @default/addressbook: total number of items received 345
[DEBUG 00:00:05] before SessionStep: STEPCMD_SENTDATA
[DEBUG 00:00:05] @default/addressbook: DeleteContext
[DEBUG 00:00:05] @default/addressbook: DeleteContext
[DEBUG 00:00:05] after SessionStep: STEPCMD_OK
[DEBUG 00:00:05] before SessionStep: STEPCMD_STEP
[DEBUG 00:00:05] after SessionStep: STEPCMD_PROGRESS
[DEBUG 00:00:05] before SessionStep: STEPCMD_STEP
[DEBUG 00:00:05] after SessionStep: STEPCMD_DONE
[DEBUG 00:00:05] parent is shutting down
[DEBUG 00:00:05] waiting for child to stop
[INFO @tdepim 00:00:05] @tdepim/addressbook: first time sync done
successfully
[DEBUG 00:00:05] waiting for child to stop

Synchronization successful.

Changes applied during synchronization (@tdepim):
+---|---|---|-CON-+
|   |@tdepim|   @default| FLI |
|Source | NEW | MOD | DEL | ERR | NEW | MOD | DEL | ERR | CTS |
+---+-+-+-+-+-+-+-+-+-+
|   addressbook |  0  |  0  |  0  |  0  | 345 |  0  |  0  |  0  |  0  |
|   slow, 65 KB sent by client, 0 KB received |
+---+-+-+-+-+-+-+-+-+-+
|   start Sun 07 Feb 2016 12:57:30 PM CET, duration 0:05min   |
|   synchronization completed successfully|
+---+-+-+-+-+-+-+-+-+-+
[DEBUG 00:00:05] got child sync report:
[DEBUG 00:00:05] end = 1454846255
[DEBUG 00:00:05] source-addressbook-backup-after = -1
[DEBUG 00:00:05] source-addressbook-backup-before = -1
[DEBUG 00:00:05] source-addressbook-first = true
[DEBUG 00:00:05] source-addressbook-mode = slow
[DEBUG 00:00:05] source-addressbook-resume = false
[DEBUG 00:00:05] source-addressbook-stat-local-any-sent = 66842
[DEBUG 00:00:05] source-addressbook-stat-remote-added-total = 345
[DEBUG 00:00:05] source-addressbook-status = 0
[DEBUG 00:00:05] start = 1454846250
[DEBUG 00:00:05] status = 200
^C[DEBUG 00:00:08] SuspendFlags: read 7 from fd 6
[DEBUG 00:00:08] reveived signal 2
^C[DEBUG 00:00:08] SuspendFlags: read 7 from fd 6
[DEBUG 00:00:08] reveived signal 2
[DEBUG 00:00:08] CancelTransport: cancelling because of SuspendFlags::ABORT
[DEBUG 00:00:08] killing local transport child in cancel()
[DEBUG 00:00:08] ForkExecParent: killing syncevo-local-sync 86649 with
signal 0 (SIGINT SIGTERM)
[DEBUG 00:00:08] child process has quit with status 15
[DEBUG 00:00:08] ForkExecParent: child 86649 was signaled yes, signal 15
(SIGINT=2, SIGTERM=15), int sent yes, term sent yes
[DEBUG 00:00:08] ForkExecParent: shutting down, telling syncevo-local-sync
86649 that it lost the connection, it is watching
[DEBUG 00:00:08]
ForkExecParentDBusAPI /org/syncevolution/forkexec/parent/forkexec1:
destroying with 1 active watches
[DEBUG 00:00:08] closing session
[DEBUG 00:00:08] session closed
[DEBUG 00:00:08] SuspendFlags: deactivating fds 7->6
[DEBUG 00:00:08] SuspendFlags: close m_receiverFD 6
[DEBUG 00:00:08] SuspendFlags: close m_senderFD 7
[DEBUG 00:00:08] SuspendFlags: done with deactivation
[DEBUG 00:00:08] Module_DeleteContext addressbook
[DEBUG 00:00:08] Module_DeleteContext addressbook
[DEBUG 00:00:08] Module_DeleteContext 'session'

Synchronization successful.

Changes applie

Re: [SyncEvolution] TDEPIM sync questions

2016-02-05 Thread deloptes

Thanks for all the information.

Patrick Ohly wrote:

> That confirms my theory: I bet your register_func object linked into
> both shared modules, and then each module registers both kinds of data.
> 
> You need two registration files, one per module, and only register data
> provided by that module in the file.

I attached the two functions/objects - to me it looks different, so the
issue would be in the way of building and linking the .so libraries.

I will double check this - perhaps some inheritance in the variables.
thanks!

Could you also help with configuration? I wanted to try TDE
contacts/calendar with local file and from the documentation I tried to
configure like this, but it did not work

# configure target config
syncevolution --configure \
 --template none \
 addressbook/backend=file \
 addressbook/database=file:///tmp/testabc \
 calendar/backend=file \
 calendar/database=file:///tmp/testcal \
 target-config@file

# configure sync config
syncevolution --configure \
  --template SyncEvolution_Client \
  syncURL=local://@file \
  username= \
  password= \
 addressbook/backend=tdepim-contacts \
 calendar/backend=tdepim-calendar \
 file \
 calendar addressbook

last I tried this

# configure target config
syncevolution --configure \
 --template none \
  username= \
  password= \
 addressbook/backend=file \
 addressbook/database=file:///tmp/testabc \
 addressbook/syncFormat=text/vcard \
 calendar/backend=file \
 calendar/database=file:///tmp/testcal \
 calendar/syncFormat=text/calendar \
 test1@file

# configure sync config
syncevolution --configure \
  --template none \
  peerIsClient=1 \
  syncURL=local://@file \
  username= \
  password= \
 addressbook/backend=tdepim-contacts \
 addressbook/database=kxXrRFzP9c \
 calendar/backend=tdepim-calendar \
 calendar/database=ZsPZokpoTg \
 file \
 calendar addressbook

and executed with --sync slow

but it fails saying no DB was active for the target-config. I'm reading the
docs to get proper understanding what how works and how it should be
configured, and perhaps I need to look forward for debuggin - though in the
attached relevant logs I see the objects are created in my plugin, so I'm
not sure which DB - perhaps the file one ... or am I missing something?

regards




file-2016-02-05-14-54.tar.gz
Description: application/gzip


target_+config.tar.gz
Description: application/gzip
___
SyncEvolution mailing list
SyncEvolution@syncevolution.org
https://lists.syncevolution.org/mailman/listinfo/syncevolution

Re: [SyncEvolution] TDEPIM sync questions [solved double register]

2016-02-05 Thread deloptes
Patrick Ohly wrote:

> That confirms my theory: I bet your register_func object linked into
> both shared modules, and then each module registers both kinds of data.
> 
> You need two registration files, one per module, and only register data
> provided by that module in the file.

I solved this - the problem was including the xxxRegxxx.cpp in the
xxxSource.cpp and listing it in the src_backends_tdepim_xxx_src
variable.

Now looking forward to configure it properly and test it.

regards

___
SyncEvolution mailing list
SyncEvolution@syncevolution.org
https://lists.syncevolution.org/mailman/listinfo/syncevolution


Re: [SyncEvolution] TDEPIM sync questions

2016-02-05 Thread deloptes
Patrick Ohly wrote:

> On Wed, 2016-02-03 at 20:05 +0100, deloptes wrote:
>> Hi to all @syncevolution, sorry for bothering you, but I hope one could
>> save me some digging by answering my questions.
>> I thank you in advance for the patience and support.
>> 
>> 1.
>> I have an item uid: libkcal-1629736449.222
>> which is returned by syncevolution (--print-items)
>> as urlencoded libkcal-1629736449%2e222
>> 
>> Is this on purpose and why?
> 
> Internally, item uids can be arbitrary strings. For use in shell
> scripting, the command line tool escapes "unsafe" characters when
> printing them and unescapes them when parsing parameters.
> 
> So yes, it is intentional. Whether a dot should be considered safe is
> debatable.

Understood - thanks - just needed confirmation.

> 
>> 2.
>> How are the sources/databases handled - example if I have 3 calendars
>> (1default, 1 read only and 1 custom). Imagine I set the custom or the
>> default as inactive or active - how would this influence the sync?
> 
> I'm not sure I follow. Do you mean you have a sync configuration and
> then change the sync mode of one datastore set to "none"? It'll be
> ignored when running a sync for that sync configuration.

I try to explain. I have calendar datastore with 3 databases : 1 is the
default (my calendar), 2 is holidays (read only) 3 is custom calendar.

I'm not sure what happens when I try to sync with my phone. Would all
databases be pushed to the default calendar in the phone? For this I would
just disable 2 and 3 and let only 1 active. The plugin ignores the
databases which are not active and provides the items from the active only
for sync. 
Now in regards to your comment - does it mean I have to configure explicitly
the database I want to sync. 
This also delivers few possible scenarios if a database was configured (and
was active) but for some reason the user would have deactivated it. what
happens

example --print-databases
TDE PIM Calendar = TDE PIM Events = tdepim-calendar:
resource (kOBUWNvG42) 
feiertage (uZzNwmwG32) 
custom (xYggAVX5Bu) 

In this case syncevolution would sync resource + custom - correct?
Or it should be explicitly configured - this is a bit confusing from the
documentation on the other plugins I could read so far.

Now imagine it was configured for sync:
 - what would happen on the other side - does resource+custom go into one
calendar and if what happens when I sync back.
 - what if I would deactivate custom


> 
>> 3.
>> About the platform support.
>> Is this also picked up by the engine automatically ?
>> I saw something about KDE in the sync src code as well.
>> I would like to implement similar functionality with the tdewallet - it
>> sounds like nice feature to have when dealing with passwords, but I need
>> some hint here as I was not able to understand from the kde code what
>> exactly has to be done, so that syncevo can cope with it.
> 
> The platform modules themselves just register themselves when loaded by
> hooking into the callbacks provided by the core libraries. For example,
> KDEPlatformRegister.cpp hooks into the password handling via the boost
> signal returned by GetLoadPasswordSignal().
> 
> Then KWalletLoadPasswordSlot() itself decides whether it is active.
> UseKWallet() has some comments about the logic for that.
> 
> Basically that is what you need to replicate.

Ok thanks - I assume it is not a precondition for the plugin to work

> 
>> example
>> 
>> info.m_backendRule = "KDE";
> 
> That is not related to password handling. It is what a datastore uses to
> configure the conversion from the internal data format into the vCard
> "dialect" used by the store.
> 
> In this example, src/syncevo/configs/datatypes/01vcard-profile.xml has
> conditional rules that are only active in the "KDE" case.
> 

Thanks, but perhaps I should take care of that as well, because KDE is
successor of what is now TDE. I need to check if KDE can be reused or I
should have own version.

>> 4.
>> My last question is related to the problem I described earlier. When
>> compiled as shared I get the backend registered twice. When I compile
>> static it shows up once. I do have different descriptions in the
>> registerMe function and in the createSource function.
>> Should I post those functions here?
> 
> That may help.
> 
> Have you tried what I suggested, i.e. removing one of your two shared
> modules and checking how that affects the result?
> 

Yes I did, but it did not help - I removed all (so,a,la) for the addressbook
but calendar/todo/tasks showed up.

I tried with function implementation and looked 

<    1   2