Unison 2.27.57 on Debian Etch and Ubuntu Hardy
The good thing about the file sync tool Unison is, that it’s available for several operating systems. This is great for groups working on different systems (Mac, Linux and Windows) but want to share and synchronize files on a remote server.
Well, the bad thing about Unison on the other hand is, that its backwards compatibility is anything but great, so that you have to make sure that everybody in the team uses the same version. And this can be tricky depending on what system you are using.
My home system is Ubuntu Hardy, the remote server system is Debian Etch. Both come with Unison 2.16.13 which would be great if not Apple’s new Leopard brings the newest version 2.27.57. Long story short, I needed the newest version on Hardy and Etch.
Unison on Hardy
To install the newest version of Unison on Hardy, it’s the best to just use the existing Backport package.
First, add the backports to the apt-sources, using your favorite editor, e.g. vi or nano:
1 |
sudo editor /etc/apt/sources.list |
Look for backports and uncomment/add the following lines:
1 2 |
deb http://de.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse deb-src http://de.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse |
Then just install the backport using apt-get:
1 2 |
apt-get update apt-get -t hardy-backports install unison |
After installing you probably should remove the added lines from the sources.list-file. Otherwise the update-manager wants to install all available backports which is probably not what you want.
Debian Etch
Update 30/07/08: Before reading my post, please have a look at the much easier method described by Andrew in the user comments. Only if this doesn’t work, you might want to have a look at my post.
Unison 2.27.57 binary for Debian Etch:
If you don’t want to compile the binary on your own (as described in the following paragraphs), you can download the Unison 2.27.57 binary for Debian Etch here.
Update 30/11/08:
~ 300 downloads so far, no known problems/malfunctions!
It’s much more difficult on an Etch system because no Backport package is available. Therefore you either have to create such a package, which can be annoying and frustrating, or you just compile it on your own and overwrite the binary.
Add the unstable sources and the etch backports to your apt-get sources by editing the file /etc/apt/sources.list (as root!):
1 2 3 4 5 |
# Unstable source packages deb-src ftp://ftp.de.debian.org/debian/ unstable main contrib non-free # Backports for Etch deb http://www.backports.org/debian etch-backports main contrib non-free |
Now update apt and install the backport package of ocaml compiler. You also might want to install the debian backports keyring to avoid warning and error messages:
1 2 3 4 |
apt-get update apt-get install debian-backports-keyring apt-get update apt-get -t etch-backports install ocaml |
Then get the source package of unison 2.27.57 and make the binary:
1 2 3 4 5 |
apt-get update apt-get source unison dpkg-source -x unison_2.27.57-1.dsc cd unison-2.27.57/ make |
Note: For my Etch installation, the make progress failed with some error, but the binary was created successfully anyway. Just have a look whether the unison-binary exists and test if it is working.
1 2 |
./unison -version unison version 2.27.57 |
Now install the old version of Unison and replace the binary with the new one. Also you might want to remove the lines from /etc/apt/sources.list and uninstall the ocaml compiler.
1 2 3 4 |
apt-get install unison cp unison /usr/bin/ unison -version unison version 2.27.57 |
That’s it! I know that this is not the best solution and that it might be better to create the backports package. But as there are many dependencies to other packages it’s maybe one of the fastest solutions.
I decided to publish the binary here (for the lazy ones): Unison 2.27.57 binary for Debian Etch.
Thanks for your tips they helped me build a .deb to install. After a long time playing around building my own .deb i found that the one in “testing” almost compiles, simply run the following instead of “make” and if you have all the build dependancies installed, a few apt-get’s and you will, it will build you two .deb which you can install with dpkg -i unison*.deb
awk ‘{gsub(/Build-Depends: .*/, “Build-Depends: cdbs (>= 0.4.23), debhelper (>= 5), dpatch, ocaml-nox (>= 3.09.2-9), liblablgtk2-ocaml-dev (>= 2.6.0-7), chrpath, librsvg2-bin (>= 2.14.4-3), imagemagick”); print $0 > “unison-2.27.57/debian/control”}’ unison-2.27.57/debian/control
dpkg-buildpackage -rfakeroot
thanks man, you saved me a lot of work with that binary
Thanks for the hints with plink. Anyway, if you do not need to install the 2.27.57 globally, there is a simple solution:
Download unison 2.27.57 from sid, and unpack unison-2.27.57 binary from downloaded deb file. You need to modify plink-cmd.bat to contact your local binary instead of the global installation, and that’s all.
For anyone that needs unison 2.27 on Gutsy as well (Ubuntu 7.10), I’ve backported the DEBs as well: http://cpbotha.net/2008/11/22/backport-of-unison-22757-to-ubuntu-710/
Hi Phillip,
I put your unison 2.27 binary (with full credits to you) in my blog, so to provide a mirror.
The URL is http://cagnazzo.name/drupal/unison_227_etch
best regards
Carlos
hi i know that such a comment doesn’t make much sense, BUT YOU JUST SAVED MY LIFE WITH THIS!!! Thank you.
Hey, instead of using vi which is a little hard to use(if your not use to cli) to edit a simple text file, you might recomend anther editor, like nano or gedit
Hey Mike,
thanks for the comment, I just modified the post a little saying that other editors are of course possible. I now use “editor”, which is a symbolic link to the default editor of the system; for Ubuntu this is ‘nano’ I think. You can change this by calling update-alternatives.
Regards,
Philipp