How to install git-annex on 13.1/2?

Unfortunately git-annex isn’t in the repos of openSuSE and I cannot install it from source as described under http://git-annex.branchable.com/install/fromsource/ .

Already done:

  1. zypper install haskell-platform [done]

  2. $ cabal update; cabal unpack git-annex [done]

  3. $ cd git-annex-5.20… [done]

  4. What are the corresponding packages in suse for the deb-packages libgnutls, libgsasl, libxml2, zlib?

  5. $ cabal configure
    [output]
    checking UPGRADE_LOCATION… not available checking git…
    no setup: ** the git command is required

  6. $ cabal install --only-dependencies
    [output]
    cabal: Error: some packages failed to install: gnuidn-0.2.1 failed during the configure step.
    The exception was: ExitFailure 1
    network-protocol-xmpp-0.4.6 depends on gnuidn-0.2.1 which failed to install.

… How can I install git-annex on openSuSE 13.1/2?

Thank’s very much for the answers in advance

saneP

OK, here is what I did which almost works, and where I think you can diverge from what I did…
Before I describe what you should do to almost install, I should first describe what may be an unsurmountable obstacle…
Eventually you’ll run into the following error

# cabal install git-annex
Resolving dependencies...
Configuring gnuidn-0.2.1...
cabal: The program c2hs is required but it could not be found.
Failed to install gnuidn-0.2.1
cabal: Error: some packages failed to install:
git-annex-5.20150317 depends on gnuidn-0.2.1 which failed to install.
gnuidn-0.2.1 failed during the configure step. The exception was:
ExitFailure 1
network-protocol-xmpp-0.4.6 depends on gnuidn-0.2.1 which failed to install.

Unfortunately, I don’t know if there is a solution for the above.
First Issue:
Although c2hs is installed using cabal, for some reason the github-annex install can’t recognize it.
Second Issue:
A suitable GNU IDN package needs to be installed.

An Internet search quickly reveals that the above package was created only for Debian and Ubuntu.
Researching the package a bit further, it contains many things but probably the essentials we want are at the following project page
http://www.gnu.org/software/libidn/
The related page to download sources does not list versions which correspond with the Debian/Ubuntu package name or the required version is ancient. In any case, I downloaded the latest available, unpacked it, compiled and configured it but the Haskell install doesn’t recognize the GNU IDN I installed.
(If you’re not able to do this, post and I’ll describe this in detail, too)

So, how sad that installing the pre-compiled Haskell version of github-annex won’t work (as I describe below).
You’ll have to try installing it from source but my guess is that you’ll likely run into the same problem.


After that sad news… Here are the steps to set your system up with Haskell and likely all the dependencies that can be fulfilled…

Prepare your system
the following is for a 13.1 system, but at least for 12.3 and 13.2 you can probably just change the version number in the following commands to adjust for your system

Add the following repos with the following zypper commands

Python Development


zypper ar http://download.opensuse.org/repositories/devel:/languages:/python/openSUSE_13.1/ openSUSE-13.1-Python-dev  

Packman Essentials (Note: This is not the Multimedia repo)

zypper ar -f -n packman-essentials http://packman.inode.at/suse/openSUSE_13.1/Essentials/ packman-essentials

Note: You’ll find that a necessary vendor change will be offered for liblzma5, select it (likely option 1)

You may be able to shortcut installing dependencies because I found github-annex has been pre-packaged in the Hakell System
At this point you may be able to simply run the following commands
Install cabal install

zypper in cabal-install

Run update. When you do this, it will find that the Haskell repo (not the openSUSE and Packman repos openSUSE has) has a more modern version so the following will both install the latest version and initiate a Haskell update automatically

cabal install cabal-install

When the update has completed, I did a search for and surprisingly found a pre-compiled github annex with “cabal list gitnub-annex” so I installed with

cabal install github-annex

Now, if you run into any issues you can follow what I did after adding the repos above

Install the following packages as suggested by the instructions to install on Fedora
http://git-annex.branchable.com/install/Fedora/
NOTE: In the following command I installed “libidn-devel” instead of “libldn-devel” which I believe may be a typo in the original Fedora instructions
I also added git based on your original post

zypper install libxml2-devel gnutls-devel libgsasl-devel ghc cabal-install happy alex libidn-devel git

Update the system running cabal

cabal update

Updated cabal-install as recommended with the following command which appears to also automatically update

cabal install cabal-install

Install c2hs. Although it is a dependency, the docs say it’s well known that installing github-annex won’t automatically list c2hs as a required dependency so the following installs manually

cabal install c2hs

Then I installed github-annex which will end with more or less the error described at the top of this post

cabal install github-annex

Note the diff between what I actually did compared to the suggested shortcut…
I actually installed all the dependencies recommended for a Fedora install whereas I’m guessing that you may not need to install the dependencies manually if installing github-annex using cabal is able to automatically install all dependencies. The two added repositories provided the packages needed for the dependencies.

It might also be that despite the error I ran into, the app (github-annex) might actually work… It may be that the install fails because of its own bugs and shortcomings and all that’s necessary is to create the config file manually (since creating by install failed)… And then the app might work because both c2hs and GNU IDN exist.

HTH and Good Luck,
TSU

FYI -
Considering the problems installing github-annex properly,
You might consider one of their alternative implementations…

I didn’t try running it, but you can download one of the following tarballs, extract and “just run”
https://downloads.kitenet.net/git-annex/linux/current/

According to the included README file, it’s expected but not guaranteed to work.

TSU

Dear TSU,

thank you very much for your relplies. Yes it worked more or less.
Using the webapp the files are not well transfered and are not well synced, only linked files appear.

Running the cabal install I run into the same error. I’ll give it an other try …

saneP

PS.: It would be great to see git-annex in the repos, as it is useful for suse servers.

I also agree it looks like a possibly useful app (else I wouldn’t have spent so much time on it).
It looks to me like the problem is mainly in the install script, for now I can’t see how their install script will work on anything but Debian/Ubuntu. My guess the remaining obstacles if fixed would make the script cross-distro would be relatively easy to fix if done by the project developers so maybe submitting a request through their forums/mail list or whatever might encourage them to do the work, particularly if you point them to what was posted in this thread.

You might also suggest to them using OBS to easy create packages for all distros with minimal effort.
Else, they can continue to support multiple pages dedicated to each distro the way they’re doing now.

TSU

Yes I run once again in the same failure.

ends up with the following


cabal: There is no package named 'github-annex'.
You may need to run 'cabal update' to get the latest list of available
packages.

and cabal update doesn’t help.

I run the above steps on a 13.2 system and chaged the version numbers respectivelly.

I’ll also try on a 13.1 system.

best regards

saneP