Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 233416

Summary: app-pda/libopensync-0.22 over app-pda/synce-sync-engine-0.11.1 do sync WM6 PDAs: ebuilds updates required
Product: Gentoo Linux Reporter: Rolando J. Zappacosta <zappacor>
Component: Current packagesAssignee: Piotr JaroszyƄski (RETIRED) <peper>
Status: VERIFIED FIXED    
Severity: enhancement CC: iaindb, joel, mescalinum, pda
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
URL: http://www.opensync.org/wiki/download#GentooPackages
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Complete procedure on how to create usable ebuilds
output of the emerge --info command on my PC
patched synce-hal-0.13.ebuild
patched synce-hal-0.13.ebuild

Description Rolando J. Zappacosta 2008-07-30 19:44:24 UTC
Hi all,

After several days of work I could get my WM6 PDA/phone synced against mail-client/evolution. I think it would be great to have the ebuilds for opensync 0.22 updated so it becomes a matter of just emerging packages for others.

Reproducible: Always

Steps to Reproduce:
1. try to emerge whatever combination of synce and opensync packages
2. there is no way to come to a syncable system
3.

Actual Results:  
It's not possible to sync PDA <=> PC

Expected Results:  
A set of packages to sync the PDA and the PC should be installed (with no patching required and the least configuration possible)

Everything is documented at http://www.opensync.org/wiki/download#GentooPackages but in short:

SYNCE:
Download the latest synce ebuilds: 
wget -nv -m -erobots=off -R "index.html,synce-wm5-layman.xml,manifest1_obsolete" -np -nH --cut-dirs=4 -P /usr/local/portage/ http://synce.svn.sourceforge.net/svnroot/synce/dist/gentoo/ 2>&1 | grep -v index.html

and sync your system: 
emerge --sync

Edit /etc/portage/package.mask adding this: 
=app-pda/synce-sync-engine-9999
>=app-pda/libopensync-0.30
>=app-pda/libopensync-plugin-python-0.30
>=app-pda/libopensync-plugin-evolution2-0.30
>=app-pda/msynctool-0.30

and /etc/portage/package.use adding: 
app-pda/synce syncengine usb wininstallers
app-pda/multisync evo

The package we need to install is synce-sync-engine, checking what gets pulled in by it we get: 
[ebuild  N    ] dev-python/pyrex-0.9.8.4  USE="-examples"
[ebuild  N    ] dev-libs/check-0.9.5
[ebuild  N    ] dev-python/pyxml-0.8.4-r1  USE="-doc -examples"
[ebuild  N    ] dev-python/pygobject-2.14.2  USE="-X -debug -doc -examples -libffi"
[ebuild  N    ] app-pda/libopensync-0.22  USE="python -debug -doc"
[ebuild  N    ] dev-libs/libmimedir-0.4
[ebuild  N    ] net-libs/gnet-2.0.8  USE="-debug -doc -test"
[ebuild  N    ] app-pda/synce-libsynce-0.11.1  USE="hal -desktop"
[ebuild  N    ] app-pda/synce-librtfcomp-1.1
[ebuild  N    ] dev-python/dbus-python-0.82.4  USE="-test"
[ebuild  N    ] app-pda/libopensync-plugin-python-0.22
[ebuild  N    ] app-pda/synce-librapi2-0.11.1
[ebuild  N    ] app-pda/synce-odccm-0.11.1
[ebuild  N    ] app-pda/synce-librra-0.11.1
[ebuild  N    ] app-pda/synce-sync-engine-0.11.1

but as librra doesn't compile because of an error related to pyrra.pyx, we need to have its patch and edit its ebuild to include it 
mkdir -p /var/tmp/SynCE
cd /var/tmp/SynCE
wget http://www.opensync.org/attachment/wiki/download/pyrra.pyx.patch

Edit the ebuild: 
vi /usr/local/portage/app-pda/synce-librra/synce-librra-0.11.1.ebuild

adding these lines: 
src_unpack() {
        unpack ${A}
        cd "${S}/python"
        epatch /var/tmp/SynCE/pyrra.pyx.patch
}

ebuild it:
ebuild /usr/local/portage/app-pda/synce-librra/synce-librra-0.11.1.ebuild digest

We are now ready to install sync-engine: 
emerge -q synce-sync-engine

It's better to add some dependencies to the provided odccm initialization script, so: 
cd /etc/init.d
rm ._cfg*_odccm
wget http://www.opensync.org/attachment/wiki/download/odccm
chmod +x odccm

Start or restart odccm: 
/etc/init.d/odccm restart

and add it to rc: 
rc-update add odccm default

Connect the PDA.


OPENSYNC:
The first thing we have to do is to install msynctool: 
emerge -q msynctool

The libopensync-plugin-synce plugin is masked out by the system but it's installed by app-pda/synce-sync-engine. So an ebuild should be created to just "copy" it (it doesn't need to be compiled though).

We also need the libopensync-plugin-evolution ebuild:
mkdir -p /usr/local/portage/app-pda/libopensync-plugin-evolution2
cd /usr/local/portage/app-pda/libopensync-plugin-evolution2
cp /usr/portage/app-pda/libopensync-plugin-evolution2/libopensync-plugin-evolution2-0.22.ebuild .

open it for edition: 
vi libopensync-plugin-evolution2-0.22.ebuild 

add these lines into it: 
inherit eutils
src_unpack() {
        unpack ${A}
        cd "${S}"
        epatch /var/tmp/SynCE/libopensync-plugin-evolution2-0.22.patch
}

and ebuild it: 
ebuild libopensync-plugin-evolution2-0.22.ebuild digest

Download this required patch: 
cd /var/tmp/SynCE
wget http://www.opensync.org/attachment/wiki/download/libopensync-plugin-evolution2-0.22.patch
Comment 1 Rolando J. Zappacosta 2008-07-30 19:48:10 UTC
Created attachment 161761 [details]
Complete procedure on how to create usable ebuilds
Comment 2 Rolando J. Zappacosta 2008-07-30 19:50:35 UTC
Created attachment 161763 [details]
output of the emerge --info command on my PC
Comment 3 Carsten Lohrke (RETIRED) gentoo-dev 2008-07-30 21:41:43 UTC
There is no package named app-pda/synce-sync-engine in the repository. Also to which evolution version do you refer to?
Comment 4 Rolando J. Zappacosta 2008-07-31 06:20:45 UTC
two comments: just realizaed emerge --info goes here, sorry for the attach:
Script started on Wed 30 Jul 2008 09:50:11 PM CEST
]0;root@RJZ-LNX:~[?1034h[01;31mRJZ-LNX[01;34m ~ #[00m emerge ---[Kinfo
Portage 2.2_rc5 (default/linux/x86/2008.0, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.26-tuxonice i686)
=================================================================
System uname: Linux-2.6.26-tuxonice-i686-Genuine_Intel-R-_CPU_T2500_@_2.00GHz-with-glibc2.0
Timestamp of tree: Wed, 30 Jul 2008 13:00:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.5.2-r5
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.62-r1
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=native -msse3 -O2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=native -msse3 -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://ftp.snt.utwente.nl/pub/os/linux/gentoo "
INSTALL_MASK="Changelog.gz TODO.gz Author.gz"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en es"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="a52 aac acl acpi aiglx alsa apic avi berkdb bzip2 cddb cdr clflush cli cmov constant_tsc cracklib crypt cups cx8 dbus de dga dri dts dvd dvdnav dvdr dvdread est fortran fpu fxsr gdbm gif gpm hal ht iconv imlib isdnlog jpeg jpeg2k kde kipi live matroska mca mce midi mmx monitor mp3 mpeg msr mtrr mudflap ncurses nls nojoystick nptl nptlonly nsplugin nx oggvorbis opengl openmp pae pam pat pbe pcmcia pcre perl pge pmu png pni pppd pse python quicktime readline real reflection samba sdl sep session spl ss sse sse2 ssl sysfs tcpd theora tiff tm tm2 tsc unicode usb v4l vme vmx vorbis win32codecs wmf x86 xanim xcomposite xorg xtpr xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en es" USERLAND="GNU" VIDEO_CARDS="i810"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

]0;root@:~]0;root@RJZ-LNX:~[01;31mRJZ-LNX[01;34m ~ #[00m exit
exit

Script done on Wed 30 Jul 2008 09:50:22 PM CEST

Second, if synce installation ebuilds check for the required kernel, it would be even better.

Any help, please don't hesitate to contact me.
Comment 5 Rolando J. Zappacosta 2008-07-31 06:25:46 UTC
(In reply to comment #3)
> There is no package named app-pda/synce-sync-engine in the repository. Also to
> which evolution version do you refer to?
Hi,

yes, that's what happens. The ebuild in the officil repository are obsolete and/or incomplete. Now, based on the procedure depicted on http://www.opensync.org/wiki/download#GentooPackages we could generate new and working ones for that repository.

Evolution version doesn't matter that much, in fact, you can even ignore it as it stated there too. Only the file structure it creates on your disk is of use. Even though that, I've installed the latest official one in the repository, which is 2.22.3.1 (2.23.5 is available in some other non-official repos though)

HTH,
Rolando.
Comment 6 Rolando J. Zappacosta 2008-09-21 10:05:21 UTC
Hi guys,
  any update on this? Anything I can do?
Comment 7 Iain Buchanan 2008-09-30 06:44:53 UTC
peper - Perhaps this should be marked as a duplicate of Bug #178807 ?

(In reply to comment #6)
> Hi guys,
>   any update on this? Anything I can do?

Roland, have you tried layman and the synce-0.12 packages?  After choosing your USE flags, you should be able to "emerge and go"!
Comment 8 Rolando J. Zappacosta 2008-09-30 08:50:06 UTC
> Roland, have you tried layman and the synce-0.12 packages?  After choosing
> your USE flags, you should be able to "emerge and go"!
No, but I remember above mentioned procedure was the only that worked for me (i tried installing several different combinations of the packages)

Comment 9 Rolando J. Zappacosta 2008-10-22 13:30:12 UTC
(In reply to comment #7)
> Roland, have you tried layman and the synce-0.12 packages?  After choosing
> your USE flags, you should be able to "emerge and go"!

Sorry for the delay, hadn't enough time to spend on it lastly. I just deleted all of my /usr/local/portage stuff and updated to 0.12. Will try to sync against my PDA as soon as I can.
Comment 10 Iain Buchanan 2008-11-19 23:45:03 UTC
works for me with sync-0.12 and opensync 0.22.

This is really a duplicate of Bug #178807.  Can be closed?
Comment 11 Rolando J. Zappacosta 2008-11-20 07:51:10 UTC
(In reply to comment #10)
> works for me with sync-0.12 and opensync 0.22.
> This is really a duplicate of Bug #178807.  Can be closed?

I'll be back home next week and hopefully will be able to check it, could you please wait one more week?
Sorry for this inconvenience.
Comment 12 Rolando J. Zappacosta 2009-03-01 11:59:09 UTC
Sorry for so, so late response. I tried it after an "emerge --sync" and synce (the "connectivity" part) worked fine. BTW, I've it running through HAL now and it rocks!!!

For the syncing part (opensync and its plugings) these got pulled in:
  msynctool 0.36
  OpenSync 0.36
  evo2-sync 0.36
  synce-opensync-plugin 0.3x (pulled in by app-pda/synce-sync-engine as "/usr/lib/opensync-1.0/python-plugins/synce-opensync-plugin.py")
but, as I supposed, it didn't work (0.3x is supposed to not to work fine for synce)

Will try again later masking 0.3x to see what happens with 0.2x
Comment 13 Rolando J. Zappacosta 2009-03-02 20:54:33 UTC
Well... bad luck. After unmasking >=app-pda/libopensync-plugin-synce-0.20 the request to emerge:
   app-pda/libopensync-plugin-evolution2 app-pda/libopensync-plugin-synce app-pda/msynctool app-pda/synce app-pda/synce-sync-engine
pulled in all this:
[ebuild  N    ] app-pda/libopensync-0.22  USE="python -debug -doc" 0 kB
[ebuild  N    ] dev-python/pyxml-0.8.4-r1  USE="-doc -examples" 0 kB
[ebuild  N    ] app-pda/synce-librtfcomp-1.1  327 kB
[ebuild  N    ] dev-python/pygobject-2.16.1  USE="-X -debug -doc -examples" 0 kB
[ebuild  N    ] dev-libs/libmimedir-0.4  0 kB
[ebuild  N    ] dev-libs/check-0.9.5-r1  0 kB
[ebuild  N    ] net-libs/gnet-2.0.8  USE="-debug -doc -test" 0 kB
[ebuild  N    ] app-pda/synce-serial-0.11  0 kB
[ebuild  N    ] net-misc/dhcp-3.1.1  USE="-doc -minimal (-selinux) -static" 0 kB
[ebuild  N    ] app-pda/synce-libsynce-0.13  USE="hal" 0 kB
[ebuild  N    ] app-pda/libopensync-plugin-python-0.22  0 kB
[ebuild  N    ] app-pda/libopensync-plugin-evolution2-0.22  0 kB
[ebuild  N    ] app-pda/msynctool-0.22  0 kB
[ebuild  N    ] app-pda/synce-librapi2-0.13.1  0 kB
[ebuild  N    ] app-pda/synce-librra-0.13  0 kB
[ebuild  N    ] app-pda/synce-sync-engine-0.13  0 kB
[ebuild  N    ] app-pda/libopensync-plugin-synce-0.22  0 kB
[ebuild  N    ] app-pda/synce-hal-0.13  0 kB
[ebuild  N    ] app-pda/synce-kpm-0.13  0 kB
[ebuild  N    ] app-pda/synce-0.13  USE="hal kde -gnome -serial" 0 kB
but when tried to sync got this:
RJZ-LNX ~ # msynctool --sync synce2evolution
Synchronizing group "synce2evolution"
DEBUG:SynCE:Connect() called
Member 2 of type synce-opensync-plugin just connected

(process:29754): libecal-WARNING **: e-cal.c:320: Unexpected response
Member 1 of type evo2-sync just connected
All clients connected or error
Member 1 of type evo2-sync just sent all changes
DEBUG:SynCE:get_changeinfo() called
DEBUG:SynCE:slow sync requested for Contacts
DEBUG:SynCE:slow sync requested for Calendar
DEBUG:SynCE:slow sync requested for Tasks
INFO:SynCE:initiating device synchronization
INFO:SynCE:waiting for engine to complete sync
INFO:SynCE:device synchronization complete
INFO:SynCE:initiating prefill
INFO:SynCE:prefill complete
DEBUG:SynCE:requesting remote changes
DEBUG:SynCE:got 3 changesets
DEBUG:SynCE:processing changes for 3 items of item type 0
Traceback (most recent call last):
  File "/usr/lib/opensync/python-plugins/synce-opensync-plugin.py", line 174, in get_changeinfo
    change.uid = array.array('B',guid).tostring()
  File "/usr/lib/python2.5/site-packages/opensync.py", line 186, in set_uid
    def set_uid(self, *args): return _opensync.OSyncChange_set_uid(self, *args)
TypeError: in method 'OSyncChange_set_uid', argument 1 of type 'OSyncChange *'
Member 2 of type synce-opensync-plugin had an error while getting changes: Error during get_changeinfo() method
DEBUG:SynCE:disconnect() called
Member 2 of type synce-opensync-plugin just disconnected
Member 1 of type evo2-sync just disconnected
All clients have disconnected
The sync failed: Unable to read from one of the members
DEBUG:SynCE:finalize() called
Error while synchronizing: Unable to read from one of the members
RJZ-LNX ~ #

Did it work for anyone?
Comment 14 Rolando J. Zappacosta 2009-03-02 20:57:40 UTC
One more thing, is this correct (two synce plugins???):
RJZ-LNX ~ # msynctool --listplugins
Available plugins:
testmodule
synce-opensync-plugin
evo2-sync
synce-plugin
Comment 15 Rolando J. Zappacosta 2009-03-04 16:25:41 UTC
Yet another comment, shouldn't we configure the place where dhclient puts it info in "/usr/portage/app-pda/synce-hal/synce-hal-0.13.ebuild"?

I mean, something like within it:
src_compile() {
    econf --with-hal-addon-dir="/usr/$(get_libdir)/hal/scripts"
    --localstatedir="/var/run" || die
    emake || die
}

to avoid this:
dhclient: can't create /var/lib/run/dhclient-synce-eth4.lease: No such file or directory

and getting multiple instances of dhclient running when plugging/unpluging the PDA?
Comment 16 Rolando J. Zappacosta 2009-03-06 09:37:13 UTC
(In reply to comment #14)
> One more thing, is this correct (two synce plugins???):
> RJZ-LNX ~ # msynctool --listplugins
> Available plugins:
> testmodule
> synce-opensync-plugin
> evo2-sync
> synce-plugin

My mistake, synce-plugin comes from emerging app-pda/libopensync-plugin-synce (opensync stuff) but it's non-functionarl as I could read in other forums. We *must* keep using synce-opensync-plugin as installed by app-pda/synce-sync-engine (from synce team).
Comment 17 Rolando J. Zappacosta 2009-03-06 09:46:36 UTC
(In reply to comment #15)
> Yet another comment, shouldn't we configure the place where dhclient puts it
> info in "/usr/portage/app-pda/synce-hal/synce-hal-0.13.ebuild"?
> 
> I mean, something like within it:
> src_compile() {
>     econf --with-hal-addon-dir="/usr/$(get_libdir)/hal/scripts"
>     --localstatedir="/var/run" || die
>     emake || die
> }
> 
> to avoid this:
> dhclient: can't create /var/lib/run/dhclient-synce-eth4.lease: No such file or
> directory
> 
> and getting multiple instances of dhclient running when plugging/unpluging the
> PDA?

I checked it and I think we should make this change into the portage's ebuild, I'm going to attach the patched ebuild now.
Comment 18 Rolando J. Zappacosta 2009-03-06 09:58:43 UTC
Created attachment 184112 [details]
patched synce-hal-0.13.ebuild

Patched ebuild to have dhclient use the correct Gentoo's directories. I'm also marking previous attachs as obsoleted since everything installs correctly now by just adding these lines into "/etc/portage/package.mask":
  >=app-pda/libopensync-plugin-python-0.30
  >=app-pda/libopensync-plugin-evolution2-0.30
  >=app-pda/msynctool-0.30

Now, may be worth updating the ebuild (probably adding a block for opensync-0.3X's stuff on it too) so we can close this ticket and open a new one just for a error similar to the one of "Comment  #13" I get with synce-0.13 and opensync-0.22?
Comment 19 Rolando J. Zappacosta 2009-03-07 08:33:43 UTC
Created attachment 184200 [details]
patched synce-hal-0.13.ebuild
Comment 20 Federico Ferri (RETIRED) gentoo-dev 2009-05-10 15:05:16 UTC
thanks Rolando.
next time just attach patches against ebuild in portage tree: it saves space and it's easier to see the changes.
Comment 21 Rolando J. Zappacosta 2009-09-20 11:28:55 UTC
Closing it as most related packages have ebuilds for newer versions already.