(Working) Unison Sync between for Debian/Buster and Sid

Update 2020-10-24: packages have been updated to the latest version of Unison 2.51.3, build with newer OCaml.

Since many years I am a big big fan of Unison. It is a two-way synchronization tool, meaning that changes on both sides are carried over as long as there is no conflict. Unison is the bread and butter for keeping my computers (main desktop, laptop, server) in sync. There is only one problem with Unison – it is extremely picky about with what kind of Unison on the other side it speaks: Even the very same version, compiled with a slightly different OCaml compiler version, already produces incompatibilities. And with me having to sync between Debian/Buster (my server) and Debian/sid (my other machines), this always ended in tears. But – heyhoh! – the pain is over!

My solution up to now was to keep a Unison binary from Buster on my Sid system, and used that binary when syncing to Buster server, but the normal Unison binary when syncing between two sid computers. This created lots of pain, because, when using a incompatible Unison binary, already a simple connect without a sync trial messed up the state files and required a complete resync. And so it happened often that I used the wrong binary, and had to resync a few gigabyte, what a pain.

The Debian maintainer is working with upstream to improve this rather unfortunate situation, so maybe this will change in the future, but I need a solution now. BTW, thanks a lot to the excellent work of the current maintainers, setting up the new package was a blaze and only needed a bit of adjustments for the changed layout of recent sources. Big kudos to the maintainers of unison!!!

So I have ventured out to create my own Unison package for Debian. And what I mean for Debian/Buster and Debian/sid, so that they are compatible, by using the very same compiler and the very same source and the very same dependencies to build the binaries. Fortunately, the lessons learned from my KDE/Plasma updates for Debian helped, and with a bit of magic and the nice service from the openSUSE build service, I now have packages for Unison ready for Debian/Buster and Debian/sid that are compatible, and in addition also the latest version, not the 5 year old package that is currently Debian.

So here it is, the Debian Unison repository, binaries of (currently) Unison 2.51.2 are available for both i386 and amd64:

For Debian/Buster

deb http://download.opensuse.org/repositories/home:/npreining:/debian-unison/Debian_10  ./

For Debian/sid:

deb http://download.opensuse.org/repositories/home:/npreining:/debian-unison/Debian_Unstable  ./

To use this repository, you need to import my OBS key obs-npreining.asc, best put it as is into /etc/apt/trusted.gpg.d/obs-npreining.asc.

The sources are available at the OBS project debian-unison.

For those interested, I had to backport a few package to Buster to ensure that the builds agree: debhelper (because dh_dwz is buggy in Buster), dh-ocaml, findlib, lablgl, lablgtk2, labltk, and ocaml. These packages are available in the OBS debian-ocaml-backports repository, and are also apt accessible if necessary. I guess you can conjure up the correct line ;-).

That’s it. I can now forget about all the differences between versions and happily sync between Buster and sid.

Enjoy.

9 Responses

  1. Christian says:

    Wow. That will be helpful. I am also a big Unison fan, but everytime a new machine comes in the mix things start to get hairy. I hope also that the upstream efforts will work out at some point, I don’t know how much OCAML can be blamed, because even minor versions there sometimes introduce incompatible changes.

  2. Frans says:

    Unfortunately I’ve now run into the issue I happily said seldom to have encountered back in December. I updated my laptop to Kubuntu 20.04 and lo and behold, Unison’s incompatible with Buster. So I installed your repo here and it’s still a mismatch. Sigh. The good news is that I think Ubuntu should be fine with that Buster or possibly sid binary, hopefully saving me the effort. 🙂

  3. Regis says:

    Just saw this. Massive thanks!

  4. Pablo says:

    THANK YOU

  1. 2022/08/08

    […] all Linux distros (Fedora is not the only one struggling with this, Debian has also frequently been encountering this problem, and therefore, so are all its derivatives)… though arguably, with the new […]

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>