code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawn3p4i4lk_zMilvjnJ9sS6g2nerpgz0Fjc"
 nickname="Matthias"
 subject="build failure"
 date="2014-06-09T15:13:18Z"
 content="""
Building git-annex with Nix 1.7 fails for me. Error:

    trying https://git.samba.org/?p=rsync.git;a=commitdiff_plain;h=0dedfbce2c1b851684ba658861fe9d620636c56a
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  2277    0  2277    0     0   2805      0 --:--:-- --:--:-- --:--:--  5735
    output path `/nix/store/w6l1c3cdr52arymv3zgwly7razwnsdll-CVE-2014-2855.patch' should have sha256 hash `1jpwwdf07naqxc8fv1lspc95jgk50j5j3wvf037bjay2qzpwjmvf', instead has `0j1pqmwsqc5mh815x28izi4baki2y2r5q8k7ma1sgs4xsgjc4rk8'
    building path(s) `/nix/store/85v7c8b3ygpfj8m8bk98kcygf29qcbq7-cacert-20131205.pem.bz2'
    cannot build derivation `/nix/store/im9p1y2xbh08yrwp5yggj1ii884wv3ql-rsync-3.1.0.drv': 1 dependencies couldn't be built
    killing process 2599
    cannot build derivation `/nix/store/sl48cnm06m7mcqxjfj2b0yv8am3blqr3-git-annex-5.20140517.drv': 1 dependencies couldn't be built
    error: build of `/nix/store/sl48cnm06m7mcqxjfj2b0yv8am3blqr3-git-annex-5.20140517.drv' failed

Someone has an idea what Nix expects me to do in this situation?
"""]]


code:
## git-annex.app

[[!img /assistant/osx-app.png align=right link=/assistant]]
For easy installation, use the prebuilt app bundle.

* 10.9 Mavericks: [git-annex.dmg](https://downloads.kitenet.net/git-annex/OSX/current/10.9_Mavericks/git-annex.dmg)
* 10.8.2 Mountain Lion: [git-annex.dmg.bz2](https://downloads.kitenet.net/git-annex/OSX/current/10.8.2_Mountain_Lion/git-annex.dmg.bz2) **warning: not being updated any longer**
* 10.7.5 Lion: [git-annex.dmg](https://downloads.kitenet.net/git-annex/OSX/current/10.7.5_Lion/git-annex.dmg) **warning: not being updated any longer**

To run the [[git-annex_assistant|/assistant]], just
install the app, look for the icon, and start it up.

To use git-annex at the command line, you can add
`git-annex.app/Contents/MacOS` to your `PATH`

Alternatively, from the command line you can run
`git-annex.app/Contents/MacOS/runshell`, which makes your shell use all the
programs bundled inside the app, including not just git-annex, but git, and
several more. Handy if you don't otherwise have git installed.

## autobuilds

[[Joey]] autobuilds the app for Mavericks, thanks to Kevin McKenzie
for hosting the autobuilder.

* [autobuild of git-annex.dmg](https://downloads.kitenet.net/git-annex/autobuild/x86_64-apple-mavericks/git-annex.dmg) ([build logs](https://downloads.kitenet.net/git-annex/autobuild/x86_64-apple-mavericks/))

## using Homebrew

git-annex is now [[available in Homebrew|Homebrew]]!

## using MacPorts

Install the Haskell Platform from [[http://hackage.haskell.org/platform/mac.html]].
The version provided by Macports is too old to work with current versions of git-annex.
Then execute

sudo port install git-core ossp-uuid md5sha1sum coreutils gnutls libxml2 libgsasl pkgconfig
sudo cabal update
PATH=$HOME/bin:$PATH
cabal install c2hs git-annex --bindir=$HOME/bin

## PATH setup

Do not forget to add to your PATH variable your ~/bin folder. In your .bashrc, for example:

PATH=$HOME/bin:$PATH

See also:

* [[forum/OSX__39__s_haskell-platform_statically_links_things]]
* [[forum/OSX__39__s_default_sshd_behaviour_has_limited_paths_set]]

repo_name: kakafarm/git

license: unknown


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawnaYy6kTuKAHmsa4BtGls2oqa42Jo2w2v0"
 nickname="Pere"
 subject="Segmentation Fault"
 date="2013-01-19T16:10:08Z"
 content="""
I guess my adventure ends here. :'(
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawmyFvkaewo432ELwtCoecUGou4v3jCP0Pc"
 nickname="Eric"
 subject="Updating to latest build"
 date="2013-01-25T06:05:35Z"
 content="""
What is the appropriate way to update to the latest build of git-annex using cabal?
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawnaYy6kTuKAHmsa4BtGls2oqa42Jo2w2v0"
 nickname="Pere"
 subject="git annex on Snow Leopard"
 date="2013-01-25T14:36:52Z"
 content="""
Is there any way I can try to solve or by-pass the Segmentation Fault I commeted before?
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="4.154.3.125"
 subject="comment 13"
 date="2013-02-05T19:46:29Z"
 content="""
@eric `cabal update && cabal upgrade git-annex`
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawmCmNS-oUgYfNg85-LPuxzTZJUp0sIgprM"
 nickname="Jonas"
 subject="more homebrew"
 date="2013-02-16T19:46:47Z"
 content="""
i had macports installed. then i installed brew, instaled haskell via brew. i needed to set
    PATH=$HOME/bin:/usr/local/bin:$PATH
"""]]


code:
[[!comment format=mdwn
 username="https://launchpad.net/~wincus"
 nickname="Juan Moyano"
 subject="git annex on Snow Leopard"
 date="2013-03-26T16:02:54Z"
 content="""
I'm having the same issue as @Pere, with a newer version of DAV :(

cabal: Error: some packages failed to install:
DAV-0.3.1 failed during the building phase. The exception was:
ExitFailure 11
git-annex-4.20130323 depends on shakespeare-css-1.0.3 which failed to install.
persistent-1.1.5.1 failed during the building phase. The exception was:
ExitFailure 11
persistent-template-1.1.3.1 depends on persistent-1.1.5.1 which failed to
install.
shakespeare-css-1.0.3 failed during the building phase. The exception was:
ExitFailure 11
yesod-1.1.9.2 depends on shakespeare-css-1.0.3 which failed to install.
yesod-auth-1.1.5.3 depends on shakespeare-css-1.0.3 which failed to install.
yesod-core-1.1.8.2 depends on shakespeare-css-1.0.3 which failed to install.
yesod-default-1.1.3.2 depends on shakespeare-css-1.0.3 which failed to
install.
yesod-form-1.2.1.3 depends on shakespeare-css-1.0.3 which failed to install.
yesod-json-1.1.2.2 depends on shakespeare-css-1.0.3 which failed to install.
yesod-persistent-1.1.0.1 depends on shakespeare-css-1.0.3 which failed to
install.
yesod-static-1.1.2.2 depends on shakespeare-css-1.0.3 which failed to install.

*Any ideas?*

"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawkurjhi0CRJvgm7QNaZDWS9hitBtavqIpc"
 nickname="Bret"
 subject="Snow Leopard Issues"
 date="2013-04-14T20:17:17Z"
 content="""
I was able to build snow leopard completely for the first time over last night (it took a very long time to build all the tools and dependancies).  Woohoo!

The way I was able to fully build on a 32-bit 10.6 machine was this

1. Delete ~/.ghc and ~/.cabal.  They were full of random things and were causing problems.
2. `brew uninstall ghc and haskell-platform`
3. `brew update`
4. `brew install git ossp-uuid md5sha1sum coreutils libgsasl gnutls libidn libgsasl pkg-config libxml2`
5. `brew upgrade git ossp-uuid md5sha1sum coreutils libgsasl gnutls libidn libgsasl pkg-config libxml2` (Some of these were already installed/up to date.
6. `brew link libxml2`
7. `brew install haskell-platform`  (This takes a long, long time).
8. `cabal update` (assuming you have added `~/.cabal/bin` to your path
9. `cabal install cablal-install`
10. `cabal install c2hs`
11. `cabal install git-annex`

It also appears to be running fairly smoothly than it had in the past on a 32-bit SL system.  Thats also neat.

The problem is that it seems to not really work as git annex though, probably due to the error relating you get when you start up the webapp:
Running
`git annex webapp`
The browser starts up, and I get 3 of these errors:
`Watcher crashed: Need at least OSX 10.7.0 for file-level FSEvents`

Pairing with a local computer appears to work to systems running 10.7, but when you complete the process, they never show up in the repository list.

Also on a side note, when running `git annex webapp` it triggers the opening of an html file in whatever the default html file handler is.  I edit a lot of html, so for me that is usually a text editor.  I had to change the file handler to open html files with my web browser for the `git annex webapp` to actually work.  Is there a way to change that so that `git annex webapp` uses the default web browser for the system rather than the default html file handler?
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 nickname="joey"
 subject="comment 17"
 date="2013-04-16T20:31:10Z"
 content="""
@Bret, the assistant relies on FSEvents pretty heavily. It seems to me your best bet is to upgrade OSX to a version that supports FSEvents.

You can certainly use the rest of git-annex on Snow Leopard without FSEvents.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawkurjhi0CRJvgm7QNaZDWS9hitBtavqIpc"
 nickname="Bret"
 subject="Can't update"
 date="2013-04-18T00:58:19Z"
 content="""
The laptop is one of the first macbook pro's with a 32 bit chip, which apple dropped support for in 10.7, so the furthest it can update to is 10.6.x. :(
"""]]


code:
[[!comment format=mdwn
 username="http://edheil.wordpress.com/"
 ip="99.54.57.201"
 subject="comment 19"
 date="2013-04-18T02:05:34Z"
 content="""
sounds like a prime candidate for a nice lightweight linux distro ;)
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawnEgT3Gxm4AAK4zu3ft5-PsUmY6dr1F-gE"
 nickname="David"
 subject="OSX app bundle"
 date="2013-06-05T17:35:49Z"
 content="""
I'm using the annex assistant from the annex bundle for the convenience, but sometimes I use git-annex directly from the command line. I have /Applications/git-annex.app/Contents/MacOS/ in my path, but is there any way you could build the app bundle with the manpage in there so I could add it to my MANPATH?
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawmJdzisfT6DhorwRz0kKJ_9-zQbccCopu4"
 nickname="Alejandro"
 subject="Macports _iconv"
 date="2013-07-18T14:23:02Z"
 content="""
If you get an error like `undefined symbol _iconv for x86_64`, you're most likely using libiconv installed by macports. You can fix this by running

    cabal install c2hs git-annex --bindir=$HOME/bin --extra-lib-dirs=/usr/lib

"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawmRFKwny4rArBaz-36xTcsJYqKIgdDaw5Q"
 nickname="Andrew"
 subject="comment 22"
 date="2013-07-25T02:19:53Z"
 content="""
Rather than specifying --bindir on the command line for cabal, I edited my ~/.cabal/config to add this line:

    symlink-bindir: /usr/local/bin

This installs the binaries to ~/.cabal/bin but symlinks them into /usr/local/bin alongside the links that homebrew installs. Additionally, I symlinked /usr/local/bin/git-annex-shell to /usr/local/bin/git-annex which made things work great from remote hosts via ssh.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawmL8pteP2jbYJUn1M3CbeLDvz2SWAA1wtg"
 nickname="Kristian"
 subject="Build failure using Haskel Platform"
 date="2013-09-15T18:49:01Z"
 content="""
I get this error when I try to build git-annex using \"cabal install git-annex\"

    [ 34 of 347] Compiling Utility.Misc     ( Utility/Misc.hs, dist/build/git-annex/git-annex-tmp/Utility/Misc.o )
    [ 35 of 347] Compiling Utility.Process  ( Utility/Process.hs, dist/build/git-annex/git-annex-tmp/Utility/Process.o )
    [ 36 of 347] Compiling Utility.Network  ( Utility/Network.hs, dist/build/git-annex/git-annex-tmp/Utility/Network.o )
    [ 37 of 347] Compiling Utility.SRV      ( Utility/SRV.hs, dist/build/git-annex/git-annex-tmp/Utility/SRV.o )

    Utility/SRV.hs:70:54:
        Couldn't match expected type `Maybe
                                        [(Int, Int, Integer, B8.ByteString)]'
                    with actual type `Either
                                        dns-1.0.0:Network.DNS.Internal.DNSError
                                        [(Int, Int, Int, dns-1.0.0:Network.DNS.Internal.Domain)]'
        In the third argument of `maybe', namely `r'
        In the second argument of `($)', namely
          `maybe [] (orderHosts . map tohosts) r'
        In a stmt of a 'do' block:
          return $ maybe [] (orderHosts . map tohosts) r
    Failed to install git-annex-4.20130909
    cabal: Error: some packages failed to install:
    git-annex-4.20130909 failed during the building phase. The exception was:
    ExitFailure 1

"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="4.152.108.128"
 subject="comment 24"
 date="2013-09-17T15:56:17Z"
 content="""
@Kristian, a new version of the DNS library has caused this. A workaround is to pass `-f-DNS` to the cabal command.

I am in the process of adding support for the new DNS library version in git now.

By the way, please [[file_a_bug|bugs]] if you have a big ugly looking build failure like that, so as to not clutter up this page.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawnyMzZZLS1xGW1raqc_9Md6Ksdkvx5rUJU"
 nickname="Michael"
 subject="confusion with bundled programs"
 date="2013-10-02T21:39:11Z"
 content="""
I have fiddled with the fresh (as of Oct 2nd) build of assistant on OS X 10.8.5, and there has been a lot of problems with bundled software

bundled git is an old 1.7.x version which keeps saying in the daemon logs it is too old to honor .gitignores etc
at the same time I have git 1.8.4 installed through homebrew which works very nicely throughout my system

I also have homebrew-installed gpg2:

$ gpg2 --version
gpg (GnuPG) 2.0.21
libgcrypt 1.5.3

(and have briefly experimented with using GPGSuite from gpgtools.org, which kept bailing with invalid autolocate directive in gpg.conf)

however there is some unidentifiable gpg binary bundled with the assistant, which cannot connect to gpg-agent from gpg2, and doesn't work with GPGSuite (see above)

is there a way to completely forgo usage of bundled software and have the webapp use whatever is already available on the system?

"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawnZEanlyzay_QlEAL0CWpyZcRTyN7vay8U"
 nickname="Carlo"
 subject="comment 27"
 date="2013-10-16T09:40:23Z"
 content="""
The [FSevents framework itself has been around since leopard](http://arstechnica.com/apple/2007/10/mac-os-x-10-5/7/).

[This fsevents wrapper project](https://github.com/rastersize/CDEvents) supports snow leopard and even leopard, maybe it will provide some clues on how it was done.

I'm guessing it would be worth it, [snow leopard is still the most popular OSX as of April](http://www.patentlyapple.com/patently-apple/2013/04/snow-leopard-remains-the-most-popular-version-of-os-x.html). From my own experience, snow leopard is a huge life extender for 2+ year old hardware. Lion just makes them sluggishly painful to use.

Maybe someone could volunteer an SL machine for remote development? Sorry, mine are tied down :(
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="64.134.31.139"
 subject="comment 27"
 date="2013-10-16T15:14:53Z"
 content="""
The git-annex assistant uses **file level** FSevents to detect which files have been changed. Would it be possible to make it work with older versions that don't provide file-level events? Probably. The code for BSD kqueue deals with similar limitations in needing to scan the directory to find the files that actually changed. If someone cares about old versions of OSX and wants to do that work I'll happily support you.
"""]]


code:
[[!comment format=mdwn
 username="http://alan.petitepomme.net/"
 nickname="Alan Schmitt"
 subject="dbus support?"
 date="2013-10-18T08:24:11Z"
 content="""
Hello,

I just compiled git-annex using cabal on OS X, and I see there is no dbus support:

    Assistant/Threads/NetWatcher.hs:26:0:
         warning: #warning Building without dbus support; will poll for network connection changes

    Assistant/Threads/MountWatcher.hs:33:0:
         warning: #warning Building without dbus support; will use mtab polling

Is this problematic? I see I can install dbus using homebrew. If I do so, will I have dbus support (after recompiling git-annex)?
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawnZEanlyzay_QlEAL0CWpyZcRTyN7vay8U"
 nickname="Carlo"
 subject="comment 29"
 date="2013-10-18T15:58:59Z"
 content="""
I think I dragged you out of dev mode for commenting unnecessarily, sorry about that. Apparently, [Lion](http://www.redmondpie.com/os-x-lion-vs-os-x-snow-leopard-head-to-head-performance-showdown/) and [Mountain Lion are fine on older hardware](http://apple.stackexchange.com/questions/58453/will-mountain-lion-make-an-older-computer-run-faster-or-slower). For a while [a daemon cause Lion slowdowns for a day after upgrade](https://discussions.apple.com/message/15719036) for a while, which was enough to cause a reputation.
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 subject="comment 2"
 date="2012-07-24T15:09:29Z"
 content="""
I've moved some outdated comments about installing on OSX to [[old_comments]].
And also moved away some comments that helped build the instructions above.
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="64.134.31.139"
 subject="comment 30"
 date="2013-10-19T15:31:45Z"
 content="""
@Alan you don't need to install dbus on OSX. The polling code will work. On the other hand if you'd like to experiment with installing dbus and report back, perhaps it's worth a try. It's nice when the git-annex assistant can instantly detect when drives are plugged in, and then the network connection changes and react to it. On Linux, dbus gives it that capability.
"""]]


code:
[[!comment format=mdwn
 username="http://alan.petitepomme.net/"
 nickname="Alan Schmitt"
 subject="dbus and homebrew"
 date="2013-10-20T17:25:04Z"
 content="""
I'm trying to build git-annex with dbus support, and even though I installed dbus (through homebrew), at the end of compilation I get the warning about \"building without dbus\". Is there something special I need to do for git-annex to see I have installed dbus?

(Also, it tells me at the beginning that I don't have gcrypt, but libgcrypt is installed.)
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="64.134.31.139"
 subject="comment 32"
 date="2013-10-21T22:47:14Z"
 content="""
You probably need to install libdbus dev stuff, and then the haskell dbus library. But it's certainly going to need code changes to make git-annex use dbus in any way on OSX, assuming there are even useful dbus events generated for network connections and drives being mounted on OSX.

It was saying \"gcrypt\" when it meant \"git-remote-gcrypt\".
"""]]


code:
[[!comment format=mdwn
 username="http://alan.petitepomme.net/"
 nickname="Alan Schmitt"
 subject="comment 33"
 date="2013-10-23T11:39:51Z"
 content="""
I installed the haskell DBus library, but it's still not picking it up. Is there some additional option to pass to cabal, or is it supposed to find it automatically?
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawn3rK4VDzxyhmrIc18z7F5OuXvEbUsgUac"
 nickname="Srinath"
 subject="build issue with brew technique on Darwin Kernel Version 13.0.0"
 date="2014-02-15T02:17:16Z"
 content="""
Following the Mac OS X brew instructions from the top of the board, I got the following error:

[5 of 5] Compiling Yesod            ( Yesod.hs, dist/build/Yesod.o )
In-place registering yesod-1.2.5...
Installing library in /Users/srinathv/.cabal/lib/yesod-1.2.5/ghc-7.6.3
Registering yesod-1.2.5...
Installed yesod-1.2.5
cabal: Error: some packages failed to install:
git-annex-5.20140210 depends on libxml-sax-0.7.4 which failed to install.
libxml-sax-0.7.4 failed during the configure step. The exception was:
ExitFailure 1
network-protocol-xmpp-0.4.5 depends on libxml-sax-0.7.4 which failed to
install.

Then I perused the comments and did:
$brew link libmxl2 --force
$cabal install git-annex --bindir=$HOME/bin

with success.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawlDDW-g2WLLsLpcnCm4LykAquFY_nwbIrU"
 nickname="Daniel"
 subject="comment 3"
 date="2013-01-15T15:22:43Z"
 content="""
Installing via the MacPorts method. I ran into this error.

    \"_locale_charset\", referenced from: _localeEncoding in libHSbase-4.5.1.0.a(PrelIOUtils.o)
    ld: symbol(s) not found for architecture x86_64

I was able to solve and get git-annex to build buy providing the --extra-lib-dirs parameter

    cabal install c2hs git-annex --bindir=$HOME/bin --extra-lib-dirs=/usr/lib

Cheers, [Daniel Wozniak](http://woz.io)
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawnaYy6kTuKAHmsa4BtGls2oqa42Jo2w2v0"
 nickname="Pere"
 subject="Snow Leopard"
 date="2013-01-18T15:51:48Z"
 content="""
Hi,

Are there plans to provide a git-annex.app that works on Snow Leopard?

Currently there are only installers for the Lions.

http://downloads.kitenet.net/git-annex/OSX/current/

Thanks :-)

"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawkSq2FDpK2n66QRUxtqqdbyDuwgbQmUWus"
 nickname="Jimmy"
 subject="comment 4"
 date="2012-12-10T17:00:43Z"
 content="""
For those that care, I've updated my autobuilder to the latest version of haskell-platform 2012.4.0.0 and it appears to be building correctly.
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="4.154.3.194"
 subject="comment 5"
 date="2013-01-18T17:25:36Z"
 content="""
What we need to provide a Snow Leopard or other version build, is access to a box running that version of OSX, or someone with a box that doesn't mind compiling stuff and setting up the autobuilder (not very hard).
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawnaYy6kTuKAHmsa4BtGls2oqa42Jo2w2v0"
 nickname="Pere"
 subject="Snow Leopard"
 date="2013-01-18T17:57:40Z"
 content="""
If the process is very automatic I might contribute. I mean, if you tell me, install this and that package and run this script once a week, I might be able to help. I have a MacBook from 2007 with Snow Leopard. I also have macports installed, but I'm not a programmer.
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="4.154.3.194"
 subject="comment 7"
 date="2013-01-18T20:16:52Z"
 content="""
If you can get it to build using the instructions for Brew (or MacPorts) on this page, it's easy to get from there to a distributable app.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawnaYy6kTuKAHmsa4BtGls2oqa42Jo2w2v0"
 nickname="Pere"
 subject="I couldn't install it on Snow Leopard"
 date="2013-01-19T15:04:27Z"
 content="""
Bad news, it looks like I'm not able to install git-annex to my machine: When I run

    sudo cabal install c2hs git-annex --bindir=$HOME/bin

I get the following error:

    cabal: Error: some packages failed to install:
    DAV-0.3 failed during the building phase. The exception was:
    ExitFailure 11
    git-annex-3.20130114 depends on yesod-core-1.1.7.1 which failed to install.
    yesod-1.1.7.2 depends on yesod-core-1.1.7.1 which failed to install.
    yesod-auth-1.1.3 depends on yesod-core-1.1.7.1 which failed to install.
    yesod-core-1.1.7.1 failed during the building phase. The exception was:
    ExitFailure 11
    yesod-default-1.1.3 depends on yesod-core-1.1.7.1 which failed to install.
    yesod-form-1.2.0.2 depends on yesod-core-1.1.7.1 which failed to install.
    yesod-json-1.1.2 depends on yesod-core-1.1.7.1 which failed to install.
    yesod-persistent-1.1.0.1 depends on yesod-core-1.1.7.1 which failed to
    install.
    yesod-static-1.1.1.2 depends on yesod-core-1.1.7.1 which failed to install.

What does *ExitFailure 11* mean?
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="4.154.3.194"
 subject="comment 9"
 date="2013-01-19T16:02:35Z"
 content="""
sig11 is a Segmentation Fault, probably from a C library used by DAV for HTTP in this case.
"""]]


code: Moved a bunch of outdated comments here, AFAIK all these issues are fixed.


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawkp-1EQboBDqZ05MxOHNkwNQDM4luWYioA"
 nickname="Charles"
 subject="comment 10"
 date="2012-11-15T13:26:57Z"
 content="""
Installing it with brew, I had to do the following steps before the final `cabal` command:

* `cabal install c2hs`
* add `$HOME/.cabal/bin` to my `$PATH` (so that c2hs program can be found)
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="4.153.2.25"
 subject="comment 10"
 date="2012-06-25T15:38:44Z"
 content="""
@Agustin you should be able to work around that with: cabal install git-annex --flags=-Inotify

I've fixed it properly for the next release, it should only be using that library on Linux.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawkwR9uOA38yi5kEUvcEWNtRiZwpxXskayE"
 nickname="Agustin"
 subject="comment 11"
 date="2012-06-27T08:54:52Z"
 content="""
Hi @joey! Perfect!... I'll do that then!

Thanks for your time man!
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawnHrjHxJAm39x8DR4bnbazQO6H0nMNuY9c"
 nickname="Damien"
 subject="sha256 alternative"
 date="2012-06-30T14:34:11Z"
 content="""
in reply to comment 6: On my Mac (10.7.4) there's `/usr/bin/shasum -a 256 <file>` command that will produce the same output as `sha256sum <file>`.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawnHrjHxJAm39x8DR4bnbazQO6H0nMNuY9c"
 nickname="Damien"
 subject="gnu commands"
 date="2012-07-01T17:03:57Z"
 content="""
…and another approach to the same problem: apparently git-annex also relies on the GNU coreutils (for instance, when doing `git annex get .`, `cp` complains about `illegal option -- -`). I do have the GNU coreutils installed with Homebrew, but they are all prefixed with `g`. So maybe you should try `gsha256sum` and `gcp` before `sha256sum` and `cp`, that seems like a more general solution.
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 subject="comment 14"
 date="2012-07-04T12:43:54Z"
 content="""
@Damien, hmm, it should not be using any cp options, unless when it was built there was a cp in the path that supported some option like -p. Can you check with --debug what cp parameters it's trying to use?

"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 subject="comment 15"
 date="2012-07-04T13:14:00Z"
 content="""
git-annex will now fall back to slower pure Haskell hashing code if `sha256sum`, etc programs are not in PATH. I'd still recommend installing the coreutils, as they're probably faster.

(The `shasum` command seems to come from a perl library, so I have not tried to make git-annex use that one.)
"""]]


code:
[[!comment format=mdwn
 username="https://a-or-b.myopenid.com/"
 ip="203.45.2.230"
 subject="Compiling git-annex on OSX (with 32 bit Haskell)"
 date="2012-07-24T03:26:45Z"
 content="""
I came across an issue when following the instructions here:
     <http://git-annex.branchable.com/install/OSX/>

I'm compiling the 'assistant' branch (522f568450a005ae81b24f63bb37e75320b51219).

The pre-compiled version of Haskell for OSX recommends the 32 bit installer, however git-annex compiles

>  Utility/libdiskfree.o Utility/libkqueue.o Utility/libmounts.o

as 64 bit. The 'make' command fails on linking 32- and 64-bit code.

So... I made a small change to the Makefile

>  CFLAGS=-Wall

becomes

>  CFLAGS=-Wall -m32

I don't know if there is an easy way to programmatically check for this, or even if you'd want to spend time doing it, but it might help someone else out.

<https://gist.github.com/3167798>
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 subject="comment 17"
 date="2012-07-24T15:03:49Z"
 content="""
The instructions say to use cabal for a reason -- it's more likely to work. But I have made the Makefile detect the mismatched GHC and C compiler and force the C compiler to 32 bit.
"""]]


code:
[[!comment format=mdwn
 username="http://www.schleptet.net/~cfm/"
 ip="64.30.148.100"
 subject="comment 1"
 date="2011-08-30T14:31:36Z"
 content="""
You can also use Homebrew instead of MacPorts.  Homebrew's `haskell-platform` is up-to-date, too:

    brew install haskell-platform git ossp-uuid md5sha1sum coreutils pcre
    ln -s /usr/local/include/pcre.h /usr/include/pcre.h

As of this writing, however, Homebrew's `md5sha1sum` has a broken mirror.  I wound up getting that from MacPorts anyway.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawkEUhIcw37X2Kh-dznSMIb9Vgcq0frfdWs"
 nickname="Ethan"
 subject="GHC 7"
 date="2012-03-28T19:06:51Z"
 content="""
The Haskell Platform installer for OSX uses GHC 7.0.4, which doesn't seem able to support the current version of git-annex.

Cabal throws a very cryptic error about not being able to use the proper base package.

I was able to install it by

1.  cloning the repo
2.  merging the ghc7.0 branch
3.  resolving merge conflicts in git-annex.cabal
4.  cabal install git-annex.cabal

(Note I also tried this with homebrew and had similar results)
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawmYiJgOvC4IDYkr2KIjMlfVD9r_1Sij_jY"
 nickname="Douglas"
 subject="setup: standalone/macos/git-annex.app/Contents/Info.plist: does not exist"
 date="2012-10-06T14:46:55Z"
 content="""
I tried installing with cabal and homebrew on Mountain Lion. After cabal install git-annex I get:

    Linking dist/build/git-annex/git-annex ...
    Installing executable(s) in /Users/dfc/.cabal/bin
    setup: standalone/macos/git-annex.app/Contents/Info.plist: does not exist
    cabal: Error: some packages failed to install:
    git-annex-3.20121001 failed during the final install step. The exception was:
    ExitFailure 1

There is no directory named macos inside of standalone:

    jumbo:git-annex-3.20121001 dfc$ ls -l standalone/
    total 112
    -rw-r--r--+ 1 dfc  staff  55614 Oct  6 10:40 licences.gz
    drwxr-xr-x+ 6 dfc  staff    204 Oct  6 10:40 linux
    drwxr-xr-x+ 3 dfc  staff    102 Oct  6 10:40 osx

"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawl-xMSPoRHcT5d2nAc1K8pWVi-AexKkYik"
 nickname="Ralf"
 subject="Mac OS X Maverick - symbol not found"
 date="2013-10-27T21:02:45Z"
 content="""
Just to mention that the beta dated 24 Oct 2013 and Joey's autobuild of 27 Oct both don't start with the following error message for git-annex, git-annex-webapp under Mac OS X 10.9 Maverick with latest XCode installed:

    dyld: Symbol not found: _objc_debug_taggedpointer_mask
      Referenced from: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
      Expected in: /Applications/git-annex.app/Contents/MacOS/bundle/I
     in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation

    Trace/BPT trap: 5

Many thanks. Can I help?
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="209.250.56.47"
 subject="comment 35"
 date="2013-10-27T21:06:57Z"
 content="""
We do not yet have an autobuild for 10.9. You can build from source: <http://git-annex.branchable.com/bugs/git_annex_doesn__39__t_work_in_Max_OS_X_10.9/#comment-8e8ee5e50506a6fde029d236f4809df8>
"""]]


code:
[[!comment format=mdwn
 username="http://joey.kitenet.net/"
 nickname="joey"
 subject="ghc 7.0"
 date="2012-03-28T19:18:58Z"
 content="""
You did the right thing, although just checking out the ghc-7.0 branch will avoid merge conflicts. I am trying to keep it fairly close to up-to-date.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawnnIQkoUQo4RYzjUNyiB3v6yJ5aR41WG8k"
 nickname="Markus"
 subject="Updated install instructions with homebrew"
 date="2012-08-07T06:46:47Z"
 content="""
To install git annex with homebrew simply do:

    brew update
    brew install haskell-platform git ossp-uuid md5sha1sum coreutils pcre
    cabal install git-annex

Then link the binary to your `PATH` e.g. with

    ln -s ~/.cabal/bin/git-annex* /usr/local/bin/
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="4.154.0.149"
 subject="comment 3"
 date="2012-10-06T21:05:45Z"
 content="""
@Douglas, I've fixed that in git. FWIW, the program is installed before that point. Actually, I am leaning toward not having cabal install that plist file at all.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawkSq2FDpK2n66QRUxtqqdbyDuwgbQmUWus"
 nickname="Jimmy"
 subject="comment 17"
 date="2012-07-24T06:33:13Z"
 content="""
@a-or-b that issue is logged here [[bugs/subtle build issue on OSX 10.7 and Haskell Platform (if you have the 32bit version installed)]], you can use cabal to build and install git-annex and it will detect if its 32 or 64bit automatically.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawm_-2XlXNyd6cCLI4n_jaBNqVUOWwJquko"
 nickname="David"
 subject="installing via homebrew"
 date="2012-09-05T11:11:55Z"
 content="""
I had to:

    cabal update

before:

    cabal install git-annex

"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawmY_4MvT5yEeztrS7UIJseStUe4mtgp6YE"
 nickname="Сергей"
 subject="Have error"
 date="2012-10-10T11:47:09Z"
 content="""
[ 98 of 248] Compiling Utility.DiskFree ( Utility/DiskFree.hs, dist/build/git-annex/git-annex-tmp/Utility/DiskFree.o )
[ 99 of 248] Compiling Utility.Url      ( Utility/Url.hs, dist/build/git-annex/git-annex-tmp/Utility/Url.o )

Utility/Url.hs:111:88:
    Couldn't match expected type `Maybe URI' with actual type `URI'
    In the second argument of `fromMaybe', namely
      `(newURI `relativeTo` u)'
    In the expression: fromMaybe newURI (newURI `relativeTo` u)
    In an equation for `newURI_abs':
        newURI_abs = fromMaybe newURI (newURI `relativeTo` u)
cabal: Error: some packages failed to install:
git-annex-3.20121009 failed during the building phase. The exception was:
ExitFailure 1
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawkO9tsPZkAxEulq2pGCdwz4md-LqB0RcMw"
 nickname="Reimund"
 subject="Problems with Base & Crypto"
 date="2012-04-25T22:56:18Z"
 content="""
I got the following error message trying to install git-annex:

    cabal: cannot configure git-annex-3.20120418. It requires base >=4.5 && <5
    For the dependency on base >=4.5 && <5 there are these packages: base-4.5.0.0.
    However none of them are available.
    base-4.5.0.0 was excluded because of the top level dependency base -any

These are the steps I performed to make it work

1. Download [Ghc 7.4](http://www.haskell.org/ghc/download).
2. Run `sudo cabal install git-annex --bindir=$HOME/bin`.
3. Compilation of the Crypto-4.2.4 dependency failed since it's not updated to work with Ghc 7.4. You need to patch SHA2.hs (steps below).
4. Run `sudo cabal install git-annex --bindir=$HOME/bin` a second time.

The steps I did to patch the SHA2.hs file in Crypto-4.2.4:

1. `cabal unpack crypto-4.2.4`
2. `cd Crypto-4.2.4`
3. `patch -p1 < crypto-4.2.4-ghc-7.4.patch`
4. `sudo cabal install`.

PS: I used [this patchfile](http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-haskell/crypto/files/crypto-4.2.4-ghc-7.4.patch?revision=1.1).
Then I did the last step a third time.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawnHrjHxJAm39x8DR4bnbazQO6H0nMNuY9c"
 nickname="Damien"
 subject="sha256"
 date="2012-06-01T16:13:05Z"
 content="""
If you're missing the `sha256sum` command with Homebrew, it's provided by `coreutils`. You have to change your `$PATH` before running `cabal install git-annex.cabal`:

    PATH=\"$(brew --prefix coreutils)/libexec/gnubin:$PATH\"
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="4.153.248.164"
 subject="comment 5"
 date="2012-10-10T15:34:23Z"
 content="""
@Сергей, I've fixeed that in git.
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 subject="comment 6"
 date="2012-06-01T17:24:29Z"
 content="""
Last night I made it look in /opt/local/libexec/gnubin .. if there's another directory it could look in, let me know. I am reluctant to make it run the brew command directly.
"""]]


code:
[[!comment format=mdwn
 username="http://www.davidhaslem.com/"
 nickname="David"
 subject="comment 7"
 date="2012-06-19T04:41:27Z"
 content="""
$(brew --prefix) should, in most cases, be /usr/local.  That's the recommended install location for homebrew.

I already had git installed and homebrew as my package manager - my install steps were as follows:

1. brew install haskell-platform ossp-uuid md5sha1sum coreutils pcre
2. PATH=\"$(brew --prefix coreutils)/libexec/gnubin:$PATH\" cabal install git-annex

"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawkwR9uOA38yi5kEUvcEWNtRiZwpxXskayE"
 nickname="Agustin"
 subject="For the moment"
 date="2012-06-25T02:51:10Z"
 content="""
Hi Joey! I just comment that I could not install it but the issue is with the last version (the one you just release today, so no problem!! man on sunday??  you're awesome!!!) so I installed the previous one and no problem at all

Thanks for all the efford and if you need me to try os whatever, feel free to ask!

Thanks again

Agustin
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawnBEsNDl_6O4rHb2en3I0-fg-6fUxglaRQ"
 nickname="chee"
 subject="Recent install for OS X"
 date="2012-11-13T04:40:05Z"
 content="""
if you are having trouble installing with `cabal install git-annex` at the moment, trouble of the XML kind, you'll need to do a couple things:

`brew update`
`brew install libxml2`
`cabal update`
`cabal install libxml --extra-include-dirs=/usr/local/Cellar/libxml2/2.8.0/include/libxml2 --extra-lib-dirs=/usr/local/Cellar/libxml2/2.8.0/lib`

well, then i hit a brick wall.

well.

I got it to work by manually symlinking from `../Cellar/libxml2/2.8.0/lib/`* into `/usr/local` and from `../../Cellar/libxml2/2.8.0/lib/` to `/usr/local/pkgconfig`, but i can't recommend it or claim to be too proud about it all.

OS X already has an old libxml knocking around so this might ruin everything for me.

let's find out !
"""]]


code:
For SL6/CentOS6 install the EPEL repo and yum install git-annex.

I was waiting for my backups to be done hence this article, as I was using
_git-annex_ to manage my files and I decided I needed to have
git-annex on a SL5 based machine. SL5 is just an opensource
clone/recompile of RHEL5.

I haven't tried to install the newer versions of Haskell Platform and
GHC in a while on SL5 to install git-annex. But the last time I checked
when GHC7 was out, it was a pain to install GHC on SL5.

However I have discovered that someone has gone through the trouble of
packaging up GHC and Haskell Platform for RHEL based distros.

* <http://justhub.org/download> - Packaged GHC and Haskell Platform
  RPM's for RHEL based systems.

I'm primarily interested in installing _git-annex_ on SL5 based
systems. The installation process goes as such...

First install GHC and Haskell Platform (you need root for these
following steps)

    $ wget http://sherkin.justhub.org/el5/RPMS/x86_64/justhub-release-2.0-4.0.el5.x86_64.rpm
    $ rpm -ivh justhub-release-2.0-4.0.el5.x86_64.rpm
    $ yum install haskell

The RPM's don't place the files in /usr/bin, so you must add the
following to your .bashrc (from here on you don't need root if you
don't want things to be system wide)

    $ export PATH=/usr/hs/bin:$PATH

Once the packages are installed and are in your execution path, using
cabal to configure and build git-annex just makes life easier, it
should install all the needed dependancies.

    $ cabal update
    $ git clone git://git.kitenet.net/git-annex
    $ cd git-annex
    $ make git-annex.1
    $ cabal configure
    $ cabal build
    $ cabal install

Or if you want to install it globallly for everyone (otherwise it will
get installed into $HOME/.cabal/bin)

    $ cabal install --global

The above will take a while to compile and install the needed
dependancies. I would suggest any user who does should run the tests
that comes with git-annex to make sure everything is functioning as
expected.

I haven't had a chance or need to install git-annex on a SL6 based
system yet, but I would assume something similar to the above steps
would be required to do so.

The above is almost a cut and paste of <http://jcftang.github.com/2012/06/15/installing-git-annex-on-sl5/>, the above could probably be refined, it was what worked for me on SL5. Please feel free to re-edit and chop out or add useless bits of text in the above!

Note: from the minor testing, it appears the compiled binaries from SL5 will work on SL6.


code:
## Saucy

	sudo apt-get install git-annex

Warning: The version of git-annex shipped in Ubuntu Saucy had
[a bug that can cause problems when creating repositories using the webapp](http://git-annex.branchable.com/bugs/Freshly_initialized_repo_has_staged_change___34__deleted:_uuid.log__34__/).

## Raring

	sudo apt-get install git-annex

Note: This version is too old to include the [[assistant]] or its WebApp,
but is otherwise usable.

## Precise

	sudo apt-get install git-annex

Note: This version is too old to include the [[assistant]] or its WebApp,
but is otherwise usable.

## Precise PPA

<https://launchpad.net/~fmarier/+archive/git-annex>

A newer version of git-annex, including the [[assistant]] and WebApp.
(Maintained by François Marier)

	sudo add-apt-repository ppa:fmarier/git-annex
	sudo apt-get update
	sudo apt-get install git-annex

If you don't have add-apt-repository installed run this command first:

	sudo apt-get install software-properties-common python-software-properties

## Oneiric

	sudo apt-get install git-annex

Warning: The version of git-annex shipped in Ubuntu Oneiric
had [a bug that prevents upgrades from v1 git-annex repositories](https://bugs.launchpad.net/ubuntu/+source/git-annex/+bug/875958).
If you need to upgrade such a repository, get a newer version of git-annex.


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawkdiXn5s1wX2Zncy1S7_h-yPTv2gt0bmmY"
 nickname="Jacob"
 subject="comment 10"
 date="2013-10-16T11:43:36Z"
 content="""
would be great to get the PPA updated with the latest git-annex; i'm finding synchronisation bugs (ie. updates made to word documents aren't replicated), and discovered its rather old now.
"""]]


code:
[[!comment format=mdwn
 username="fmarier"
 ip="207.134.53.206"
 subject="Re: comment 10"
 date="2013-10-16T13:43:37Z"
 content="""
Jacob: make sure you have the right URL for the PPA: https://launchpad.net/~fmarier/+archive/git-annex

It used to be in my main PPA, now it's in a separate PPA by itself. The package was removed from the original PPA (hence it won't update) but is fully up to date in the new one.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawmNu4V5fvpLlBhaCUfXXOB0MI5NXwh8SkU"
 nickname="Adam"
 subject="Raring?"
 date="2013-11-01T20:28:04Z"
 content="""
I'm also on Raring and the latest version available is 3.20121112ubuntu4, nearly a year old.  The PPA is only for Precise.  The tarball is a daily snapshot, and I would much rather run a released version right now.  What can I do?  Can't the PPA be built automatically for Raring and Saucy?
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawkx5V3MTbzCXS3J7Mn9FEq8M9bPPYMkAHY"
 nickname="Pedro"
 subject="comment 1"
 date="2013-05-20T15:53:25Z"
 content="""
Note that the fmarier ppa includes more than just git-annex. I've asked the author if he could segregate git-annex into a separate ppa.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawlQ7ZdQxAps4v0cl5J3wKGWD8243Gy8-m0"
 nickname="Phil"
 subject="PPA Package Pinning"
 date="2013-05-23T21:18:14Z"
 content="""
@Pedro, see <http://askubuntu.com/a/170265> for blocking all packages except git-annex from François's repo.
"""]]


code:
[[!comment format=mdwn
 username="https://openid.fmarier.org/"
 nickname="fmarier"
 subject="New PPA only contains git-annex"
 date="2013-06-15T07:45:13Z"
 content="""
As Pedro suggested, I've moved my git-annex backport to a separate PPA with only git-annex and the 220 Haskell packages it depends on.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawmhGq_ii5HaDkp9nx2m9qIMe-xxI4HV5wo"
 nickname="Jeff"
 subject="Packages way out of date"
 date="2013-07-27T19:02:38Z"
 content="""
I'm setting up git-annex for myself (wanting to use the assistant to build myself a replacement for dropbox/box/ownCloud, etc.) and I installed the ubuntu package. Unfortunately, it is way out of date (3.20120406: amd64 i386). I didn't think to check the version. It's deceiving as the UI's are all the same, but it doesn't seem to work at all (syncing fails to remote servers, odd things happen with symlinking files to git object files, changing file permissions).

It gives a bad first intro into git-annex on ubuntu (*nix?) machines. It might be best just to point people at the cabal install for now so we get the lastest and greatest.

Anyway, thanks for the great tool, I'm looking forward to using it.
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="4.152.246.110"
 subject="comment 5"
 date="2013-07-27T20:12:33Z"
 content="""
Jeff, AFAIK the 3.20120406 in precise does not include the assistant at all. The Precise PPA is well up-to-date.
I don't think git-annex has anyone in Ubuntu updating the package, so it's whatever version is synced periodically from Debian.

(AFAICS, all the problems Jeff had were due to manually creating an indirect mode repository when he expected direct mode.)
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawmhGq_ii5HaDkp9nx2m9qIMe-xxI4HV5wo"
 nickname="Jeff"
 subject="comment 6"
 date="2013-07-27T21:51:11Z"
 content="""
Ah, does it only have the webapp? I was able to boot the webapp and see messages, and it looked mostly the same, I assumed it was broken since no syncing was happening, but that would be due to the assistant not being there.

I guess it's hard as a new user that goes straight for the easy/out-of-the box solution, via the assistant, after watching your video on it. I just assumed things were broken since I was seeing slightly different things. I didn't understand that the assistant was separate from the webapp (and was missing).

Maybe mentioning the minimum required version on the assistant page to at least prompt users to check the version they're getting? I assumed following the link to the install guide, and installing the package for Ubuntu, would give me what I needed.

"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawmhGq_ii5HaDkp9nx2m9qIMe-xxI4HV5wo"
 nickname="Jeff"
 subject="comment 7"
 date="2013-07-27T21:53:45Z"
 content="""
I see how I missed this page too. I just saw the `apt-get install git-annex` and didn't even register Ubuntu as a link with more information.
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="4.152.246.110"
 subject="comment 8"
 date="2013-07-27T21:53:57Z"
 content="""
The webapp is part of the assistant. I was told Precise didn't have it, but IIRC they were working on fixing that build, and perhaps that has happened now.
"""]]


code:
[[!comment format=mdwn
 username="https://openid.stackexchange.com/user/2eeca722-8d1c-41fe-8fda-13af7eaff6ae"
 nickname="Diggory"
 subject="Outdated in 13.04"
 date="2013-10-08T16:36:10Z"
 content="""
13.04 Raring also has fairly outdated packages: 3.20121112ubuntu4
Is there a PPA or some such for this? I suppose since Saucy will be out soon this is less critical, but would still be useful.

These don't have direct mode, which (I think; I haven't tested it yet) is the feature I've been waiting for.
"""]]


code:
git-annex now does Windows!

* First, [install git](http://git-scm.com/downloads) (msysgit 1.9 or newer is needed)
* Then, [install git-annex](https://downloads.kitenet.net/git-annex/windows/current/)

This port is now in reasonably good shape for command-line use of
git-annex. The assistant and webapp are also usable. There are some known
problems and parts that don't work. See [[todo/windows_support]] for
current status.

The autobuilder is not currently able to run the test suite, so
testing git-annex on Windows is up to you! To check that the build of
git-annex works in your Windows system, you are encouraged to run the test
suite before using git-annex on real data. After installation, run `git
annex test`. There will be a lot of output; the important thing is that it
should end with "All tests passed".

## autobuilds

A daily build is also available, thanks to Yury V. Zaytsev and
[NEST](http://nest-initiative.org/).

* [download](https://downloads.kitenet.net/git-annex/autobuild/windows/) ([build logs](https://qa.nest-initiative.org/view/msysGit/job/msysgit-git-annex-assistant-test/))

## building it yourself

To build git-annex from source on Windows, you need to install
the Haskell Platform, Mingw, and Cygwin. Use Cygwin to install:
gcc rsync git wget ssh gnupg

Once the prerequisites are installed, run:

	cabal update
	git clone git://git-annex.branchable.com/ gitannex
	cd gitannex
	build

(To build the git-annex installer, you also need to install the NulSoft
installer system.)


code:
As a haskell package, git-annex can be installed using cabal.

This involves building a lot of haskell packages from source, and so it has
a lot of moving parts, and it's not uncommon for it to be broken from time
to time.

If you are not comfortable tracking down and dealing with library build
problems, installing git-annex with cabal is probably not the right choice
for you!

## prerequisites

Start by installing the [Haskell Platform][]. In Debian, this is as
simple as:

    sudo apt-get install haskell-platform

 [Haskell Platform]: http://hackage.haskell.org/platform/

## minimal build

This builds git-annex without some features that require C libraries, that
can be harder to get installed. This is plenty to get started using it,
although it does not include the assistant or webapp.

	cabal update
	PATH=$HOME/bin:$PATH
	cabal install git-annex --bindir=$HOME/bin -f"-assistant -webapp -webdav -pairing -xmpp -dns"

## full build

To build with all features enabled, including the assistant and webapp,
you will need to install several C libraries and their headers,
including libgnutls, libgsasl, libxml2, and zlib. Then run:

	cabal update
	PATH=$HOME/bin:$PATH
	cabal install c2hs --bindir=$HOME/bin
	cabal install git-annex --bindir=$HOME/bin

## building from git checkout

But maybe you want something newer (or older). Then [[download]] the version
you want, and use cabal as follows inside its source tree:

	cabal update
	PATH=$HOME/bin:$PATH
	cabal install c2hs --bindir=$HOME/bin
	cabal install --only-dependencies
	cabal configure
	cabal build
	cabal install --bindir=$HOME/bin

## EKG

When building with cabal, you can optionally enable the
[[EKG monitoring interface|ekg]]. This is great for debugging resource
usage problems.


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="4.152.246.110"
 subject="comment 10"
 date="2013-07-27T17:49:07Z"
 content="""
@Henning; see the [[OSX]] page for full installation instructions for OSX. Which include all the neccesary brew incantations.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawlXEIT2PEAuHuInLP4UYVzWE0lceMYd2lA"
 nickname="Gregor"
 subject="Installation on tonidoplug"
 date="2013-08-03T07:19:54Z"
 content="""
I tried various ways to install git-annex on my [TonidoPlug](http://www.tonidoplug.com/).

System Info:

	root@TonidoPlug2:~# uname -a
	Linux TonidoPlug2 2.6.31.8-topkick1281p2-001-004-20101214 #1 Thu Jun 16 10:06:20 CST 2011 armv5tel GNU/Linux

`apt-get` didn't work.

	root@TonidoPlug2:~# apt-get install git-annex
	Reading package lists... Done
	Building dependency tree
	Reading state information... Done
	E: Unable to locate package git-annex

The Linux standalone installation results in an error message like this, when calling `git-annex` (or `git annex`)

	~$ git-annex.linux/git-annex
	/home/gitolite/git-annex.linux/bin/git-annex: 1: Syntax error: \")\" unexpected

(git-annex.linux/bin/git-annex is a binary file and works fine on other distros)

When installing with cabal, I get the error message (tried as root and gitolite user)

	~$ cabal install git-annex --bindir=$HOME/bin -f\"-assistant -webapp -webdav -pairing -xmpp -dns\"
	Resolving dependencies...
	cabal: cannot configure git-annex-4.20130802. It requires base >=4.5 && <4.8
	For the dependency on base >=4.5 && <4.8 there are these packages:
	base-4.5.0.0, base-4.5.1.0, base-4.6.0.0 and base-4.6.0.1. However none of
	them are available.
	base-4.5.0.0 was excluded because of the top level dependency base -any
	base-4.5.1.0 was excluded because of the top level dependency base -any
	base-4.6.0.0 was excluded because of the top level dependency base -any
	base-4.6.0.1 was excluded because of the top level dependency base -any

Any help is appreciated.
Thanks for providing git-annex. I started cleaning up my backups with it yesterday and really like it.
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="2001:4978:f:21a::2"
 subject="comment 12"
 date="2013-08-07T16:31:30Z"
 content="""
The Linux standalone builds for i386 and amd64 will not work on Arm systems.

There are builds of git-annex for arm in eg, Debian. You should be able to use one of those if this system is running Debian. You may need to upgrade to eg, Debian stable, which includes git-annex.

It looks like you have an old and/or broken GHC compiler too. You could upgrade that to a newer version (eg from Debian stable) and build it that way, but it seems like the long way around if you have a Debian system there.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawlXEIT2PEAuHuInLP4UYVzWE0lceMYd2lA"
 nickname="Gregor"
 subject="TonidoPlug"
 date="2013-08-09T17:46:28Z"
 content="""
@Joey Thanks for the answer. I didn't want to mess around too much with the TonidoPlug. I am currently setting up a raspberry pi, which works fine.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawlfIVXjkzrYE9qJAO2A0H7K6tKGMaSgc3U"
 nickname="Daniel"
 subject="Problems with cryptocipher"
 date="2013-08-22T01:36:50Z"
 content="""
I had problems following these directions on recent releases of Fedora/Ubuntu. The install attempts failed on cryptocipher-0.3.1, which I think came as a dependency of Yesod.
I was able to work around this by installing yesod-platform with cabal first, then installing git-annex.
"""]]


code:
[[!comment format=mdwn
 username="RaspberryPie"
 ip="77.247.181.162"
 subject="git-annex assistant on Arm"
 date="2013-08-23T03:07:11Z"
 content="""
I'd like to use the assistant's power on a Raspberry Pi to build an always-on file/sync server. Is there a way to get the assistant running on Arm? I know there's a Debian package, but it's Version 3.20120629 and comes without the assistant. Has anyone ever successfully built a recent git-annex version on Arm? What would I need in order to do it myself?
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="4.154.0.63"
 subject="comment 16"
 date="2013-08-23T17:37:52Z"
 content="""
The git-annex assistant can easily be built on arm. But not the webapp. It's entirely possible to use the assistant without the webapp though; you just have to make the git repository and configure the remotes by hand, and then the assistant will sync them the same way the webapp does.

It is possible but very involved to build the webapp for arm. I do not anticipate doing it in the Debian package until ghc gets proper template haskell support for arm. See [[forum/Webapp_on_ARM]]
"""]]


code:
[[!comment format=mdwn
 username="RaspberryPie"
 ip="77.247.181.162"
 subject="comment 17"
 date="2013-08-23T18:51:51Z"
 content="""
Thanks for the quick answer. I will try to build git-annex with just the assistant, as you suggest, and once it works set up the server by hand as you suggest.

BTW: Awesome job you're doing with git-annex. I appreciate your enthusiasm.
"""]]


code:
[[!comment format=mdwn
 username="RaspberryPie"
 ip="96.47.226.20"
 subject="git-annex assistant for the Raspberry Pi"
 date="2013-09-04T03:58:37Z"
 content="""
It took a while and a few tries, but I finally built the git-annex binary including the assistant on a Raspberry Pi. The build comes without the flags webapp, webdav, and dbus as these rely on a Template Haskell compiler that hasn't been ported to Arm architecture yet.

I put the binary up on Github in case anyone's interested: <https://github.com/tradloff/git-annex-RPi>
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawlu7K3h7Ry1uDAU_ERYGuqt0LoGNJqGuRo"
 nickname="Nathan"
 subject="Cabal installing git-annex on Ubuntu 12.04 Precise with GHC 7.6.3"
 date="2013-09-25T22:39:04Z"
 content="""
I now realize [there is a Ubuntu 12.04 Precise PPA with a current
version of
git-annex](http://git-annex.branchable.com/install/Ubuntu/), so that's
probably a better choice, but here's how I cabal isntalled git-annex.

1. Apt install non-cabal dependencies:

       sudo aptitude install c2hs libgsasl7-dev libxml2-dev

2. Manually cabal install yesod-platform to avoid the [cryptocipher problem
   mentioned above](
   http://git-annex.branchable.com/install/cabal/#comment-1807da37dc144b572b76aaf4b574bb54):

       cabal install yesod-platform

3. Cabal install git-annex with DNS flag disabled:

       cabal install git-annex -f\"-dns\"

I was getting this error building git-annex before disabling the DNS flag:

    Utility/SRV.hs:70:54:
        Couldn't match expected type `Maybe
                                        [(Int, Int, Integer, B8.ByteString)]'
                    with actual type `Either
                                        dns-1.0.0:Network.DNS.Internal.DNSError
                                        [(Int, Int, Int, dns-1.0.0:Network.DNS.Internal.Domain)]'
        In the third argument of `maybe', namely `r'
        In the second argument of `($)', namely
          `maybe [] (orderHosts . map tohosts) r'
        In a stmt of a 'do' block:
          return $ maybe [] (orderHosts . map tohosts) r

Looking at Utiltity/SRV.hs, it appears that disabling the DNS flag
just makes git annex use a different DNS library (ADNS), not
actually disable DNS lookups.

"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawlJemqsekZTC5dvc-MAByUWaBvsYE-mFUo"
 nickname="Gábor"
 subject="Cabal dependencies"
 date="2013-05-12T12:52:20Z"
 content="""
After finishing the installation the cabal way, here are the packages I installed. It is possible that there are other packages I installed previously as dependency for other packages.

    $ lsb_release -a
    No LSB modules are available.
    Distributor ID:	Ubuntu
    Description:	Ubuntu 12.04.2 LTS
    Release:	12.04
    Codename:	precise

    $ apt-get install cabal-install libgnutls28-dev libgsasl7-dev c2hs libghc-libxml-sax-dev zlib1g-dev libghc-zlib-dev
    $ cabal install git-annex --bindir=$HOME/bin
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawlkA6XinbeOdnEDxEGQUWyjqPGh0kdMXr4"
 nickname="Blake"
 subject="Updating git-annex via cabal"
 date="2013-10-09T21:21:22Z"
 content="""
What is the best way to update git-annex and the dependencies via cabal? Just the `$ cabal install *` commands again?
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="4.154.4.22"
 subject="comment 21"
 date="2013-10-11T17:09:33Z"
 content="""
If you run the \"cabal update\" command followed by the \"cabal install\" command it'll upgrade git-annex.
"""]]


code:
[[!comment format=mdwn
 username="RaspberryPie"
 ip="96.44.189.100"
 subject=""Could not find module Crypto.Hash" error when building git-annex "
 date="2013-10-21T19:55:12Z"
 content="""
Lately I get this error message when trying to build git-annex-v4.20131002:

    Utility/Hash.hs:7:8:
        Could not find module `Crypto.Hash'
        Perhaps you meant
    	  Crypto.HMAC (needs flag -package crypto-api-0.10.2)
        Use -v to see a list of the files searched for.

crypto-api-0.10.2 is installed as a debian dev package. All the dependencies are met. I have no idea what's going on.
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="64.134.31.139"
 subject="comment 23"
 date="2013-10-21T22:09:05Z"
 content="""
git-annex needs cryptohash version 0.10.0 or greater. You appear to have an old version. You can cabal `configure -f-CryptoHash` if it's for some reason failing to disable the cryptohash support despite the declared dependency not being met.
"""]]


code:
[[!comment format=mdwn
 username="RaspberryPie"
 ip="37.130.227.133"
 subject="comment 24"
 date="2013-10-22T17:55:32Z"
 content="""
I fixed the error by installing a newer version of cryptohash. Thanks for pointing out the culprit.
"""]]


code:
[[!comment format=mdwn
 username="RaspberryPie"
 ip="141.138.141.208"
 subject="Bad version on Hackage"
 date="2013-10-30T18:56:25Z"
 content="""
Quick note: The latest version in the Hackage repository (git-annex-4.20131024) fails to build, due to a faulty version of Assistant/Threads/Cronner.hs.
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="209.250.56.47"
 subject="comment 26"
 date="2013-11-01T16:33:25Z"
 content="""
@RaspberryPie that only affected builds without the webapp, in any case it's fixed now.
"""]]


code:
[[!comment format=mdwn
 username="RaspberryPie"
 ip="37.221.160.203"
 subject="comment 27"
 date="2013-11-02T12:52:18Z"
 content="""
Okay, the error doesn't show up anymore. I didn't even get to Cronner though, because this time I got a different error:

    Assistant/Alert.hs:195:20:
        Couldn't match expected type `Assistant ()' with actual type `()'
        Expected type: Maybe Remote -> Assistant ()
          Actual type: Maybe Remote -> ()
        In the expression: noop
        In an equation for `notFsckedNudge': notFsckedNudge _ = noop

This is from trying to compile 4.20131101 with `-f\"-webapp -webdav\"`
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="209.250.56.47"
 subject="comment 28"
 date="2013-11-02T17:40:18Z"
 content="""
Unfortunate about that. I've fixed it in git.

(It would be best to file bug reports about build failures to avoid cluttering up this page.)
"""]]


code:
[[!comment format=mdwn
 username="robohack"
 ip="24.67.98.78"
 subject="cabal install failing due to problems building pcre-light-0.4"
 date="2013-11-21T20:17:10Z"
 content="""
After a fresh install of Haskell, and following the instructions above, I end up with the following rather bizarre and unexpected problem:

	$ cabal install git-annex --bindir=$HOME/bin -f\"-assistant -webapp -webdav -pairing -xmpp -dns\"
	Resolving dependencies...
	Configuring pcre-light-0.4...
	Building pcre-light-0.4...
	Preprocessing library pcre-light-0.4...
	Base.hsc:103:18: error: pcre.h: No such file or directory
	Base.hsc: In function ‘main’:
	Base.hsc:402: error: ‘PCRE_ANCHORED’ undeclared (first use in this function)
	Base.hsc:402: error: (Each undeclared identifier is reported only once
	Base.hsc:402: error: for each function it appears in.)
	Base.hsc:405: error: ‘PCRE_AUTO_CALLOUT’ undeclared (first use in this function)

(followed by an error for every other macro that was expected to be defined in the header...)

	compiling dist/build/Text/Regex/PCRE/Light/Base_hsc_make.c failed (exit code 1)
	command was: /usr/bin/gcc -c dist/build/Text/Regex/PCRE/Light/Base_hsc_make.c -o dist/build/Text/Regex/PCRE/Light/Base_hsc_make.o -m64 -fno-stack-protector -m64 -fno-stack-protector -m64 -D__GLASGOW_HASKELL__=700 -Ddarwin_BUILD_OS -Ddarwin_HOST_OS -Dx86_64_BUILD_ARCH -Dx86_64_HOST_ARCH -I/sw/lib/ghc-7.0.4/bytestring-0.9.1.10/include -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/sw/lib/ghc-7.0.4/base-4.3.1.0/include -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/sw/lib/ghc-7.0.4/include -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/sw/lib/ghc-7.0.4/include -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/sw/lib/ghc-7.0.4/include/
	Failed to install pcre-light-0.4
	cabal: Error: some packages failed to install:
	git-annex-3.20120230 depends on pcre-light-0.4 which failed to install.
	pcre-light-0.4 failed during the building phase. The exception was:
	ExitFailure 1

This is a somewhat older Mac OS X 10.6.8 system.

I do have PCRE already installed via Fink, and pcre.h is in /sw/include.  I see other -I/sw/... things in the compile command above, but obviously /sw/include is not one of them.

Any clues for me?

(Why the heck does git-annex need pcre in particular anyway???  I saw another regex library get installed earlier somewhere in this (massive) process.)

"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawnaH44G3QbxBAYyDwy0PbvL0ls60XoaR3Y"
 nickname="Nigel"
 subject="E: Unable to locate package libghc-libxml-sax-dev"
 date="2013-05-30T15:05:47Z"
 content="""
I get an error from the command as above:
$ sudo apt-get install cabal-install libgnutls28-dev libgsasl7-dev c2hs libghc libxml-sax-dev zlib1g-dev libghc-zlib-dev

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 12.04.2 LTS
Release:	12.04
Codename:	precise

"""]]


code:
[[!comment format=mdwn
 username="robohack"
 ip="24.67.98.78"
 subject="hmmm... ok, the PCRE problem was odd, but now this:"
 date="2013-11-21T20:30:54Z"
 content="""
The PCRE problem is solved trivially in my case with a couple more cabal install options, though the need for these seems oddly dissatisfying given the reams of other stuff that was successfully built and installed without these options.

Now however I seem to have encountered a deeper problem:

	$ cabal install git-annex --bindir=$HOME/bin --extra-include-dirs=/sw/include --extra-lib-dirs=/sw/lib
	Resolving dependencies...
	[1 of 1] Compiling Main             ( /var/folders/7h/7hWHR5m8HPKOnUEvQU7HU++++TI/-Tmp-/git-annex-3.20120230-84797/git-annex-3.20120230/Setup.hs, /var/folders/7h/7hWHR5m8HPKOnUEvQU7HU++++TI/-Tmp-/git-annex-3.20120230-84797/git-annex-3.20120230/dist/setup/Main.o )
	Linking /var/folders/7h/7hWHR5m8HPKOnUEvQU7HU++++TI/-Tmp-/git-annex-3.20120230-84797/git-annex-3.20120230/dist/setup/setup ...
	hsc2hs Utility/StatFS.hsc
	perl -i -pe 's/^{-# INCLUDE.*//' Utility/StatFS.hs
	ghc -O2 -Wall -ignore-package monads-fd --make configure

	Utility/StatFS.hsc:54:8:
	    Could not find module `GHC.Foreign':
	      Use -v to see a list of the files searched for.
	make: *** [Build/SysConfig.hs] Error 1
	Configuring git-annex-3.20120230...
	Building git-annex-3.20120230...
	Preprocessing executable 'git-annex' for git-annex-3.20120230...

	Git/Version.hs:11:18:
	    Could not find module `Build.SysConfig':
	      Use -v to see a list of the files searched for.
	Failed to install git-annex-3.20120230
	cabal: Error: some packages failed to install:
	git-annex-3.20120230 failed during the building phase. The exception was:
	ExitFailure 1

"""]]


code:
[[!comment format=mdwn
 username="robohack"
 ip="24.67.98.78"
 subject="a different error trying to build from the git repo...."
 date="2013-11-21T21:14:54Z"
 content="""
I'm using the ghc7.0 branch because Fink's GHC is still at 7.0.4....

	$ cabal build
	Building git-annex-3.20120523...
	Preprocessing executable 'git-annex' for git-annex-3.20120523...
	[ 78 of 163] Compiling Utility.Url      ( Utility/Url.hs, dist/build/git-annex/git-annex-tmp/Utility/Url.o )

	Utility/Url.hs:111:88:
	    Couldn't match expected type `Maybe URI' with actual type `URI'
	    In the second argument of `fromMaybe', namely
	      `(newURI `relativeTo` u)'
	    In the expression: fromMaybe newURI (newURI `relativeTo` u)
	    In an equation for `newURI_abs':
	        newURI_abs = fromMaybe newURI (newURI `relativeTo` u)

"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="209.250.56.64"
 subject="comment 32"
 date="2013-11-22T16:27:36Z"
 content="""
@robohack, the ghc7.0 branch is not being maintained, and is so old I don't recommend it. To build it against current cabal you will probably need to version its dependency on network to an older version than 2.4.0.

Also, git-annex has not depended on pcre for a long time. But you're building thoroughly old version so get to trip over every bug that's been reported for the past 2 years..
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawn3p4i4lk_zMilvjnJ9sS6g2nerpgz0Fjc"
 nickname="Matthias"
 subject="Build failure"
 date="2014-03-20T09:10:44Z"
 content="""
I followed the instructions and the invocation of

    cabal install git-annex --bindir=$HOME/bin -f\"-assistant -webapp -webdav -pairing -xmpp -dns\"

resulted in the following error:

    Test.hs:107:41: Not in scope: `errMessage'
    Failed to install git-annex-5.20140306
    cabal: Error: some packages failed to install:
    git-annex-5.20140306 failed during the building phase. The exception was:
    ExitFailure 1

I used the Haskell Platform for Mac OS X (10.8)

"""]]


code:
[[!comment format=mdwn
 username="https://openid.stackexchange.com/user/a05bb829-932b-49f2-85a9-00dcda8b5e20"
 nickname="Christian Pietsch"
 subject="Re: Build failure"
 date="2014-03-20T13:56:16Z"
 content="""
I get exactly the same error message as Matthias when attempting the minimal Cabal install on openSUSE 12.2 (x86_64) Linux.
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="209.250.56.102"
 subject="comment 35"
 date="2014-03-20T16:06:22Z"
 content="""
The `errMessage` build failure is due to a new version of optparse-applicative. I've added support for it in git master.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawkNcHu5T1Pxzl-r2co9vf6SxXYWubv2P04"
 nickname="Matthew"
 subject="I did indeed get problems on Ubuntu 13.04"
 date="2014-06-25T01:01:43Z"
 content="""
The issues I had were version mismatches when resolving dependencies of git-annex.

It seems that when you install haskell-platform package with apt-get, it installs a bunch of haskell dependencies as apt packages, yet those aren't needed for any other system packages.  So some people here who complain about version mismatches might not have intended to install any Haskell libraries with apt, they just come along for the ride by default.

I can't remember the exact ones, but I ended up uninstalling some of the stuff that gets auto-installed along with haskell-platform, and using cabal to build those.  Then all the git-annex dependencies worked.

Why 13.04 in this day and age?  Using Zentyal as a home server/gateway, and it currently runs on 13.04.

This method might not work if you installed other apt packages that _do_ need those apt-based Haskell libraries.   But if git-annex is all you need that uses the Haskell platform, might work.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawmveNWaFIL1zEehHr_0416bKBzsul5tGlE"
 nickname="Daniel"
 subject="Install fails horribly"
 date="2014-07-10T23:11:51Z"
 content="""
```
lyriondesktop:/home/zilti/tmp # cabal install c2hs
Resolving dependencies...
Configuring c2hs-0.17.2...
Building c2hs-0.17.2...
Preprocessing executable 'c2hs' for c2hs-0.17.2...
[ 1 of 26] Compiling Data.DLists      ( src/Data/DLists.hs, dist/build/c2hs/c2hs-tmp/Data/DLists.o )
[ 2 of 26] Compiling Control.StateTrans ( src/Control/StateTrans.hs, dist/build/c2hs/c2hs-tmp/Control/StateTrans.o )

src/Control/StateTrans.hs:77:1: Warning:
    Module `Prelude' does not export `catch'
[ 3 of 26] Compiling Data.Errors      ( src/Data/Errors.hs, dist/build/c2hs/c2hs-tmp/Data/Errors.o )
[ 4 of 26] Compiling Data.Attributes  ( src/Data/Attributes.hs, dist/build/c2hs/c2hs-tmp/Data/Attributes.o )
[ 5 of 26] Compiling Text.Lexers      ( src/Text/Lexers.hs, dist/build/c2hs/c2hs-tmp/Text/Lexers.o )
[ 6 of 26] Compiling Control.StateBase ( src/Control/StateBase.hs, dist/build/c2hs/c2hs-tmp/Control/StateBase.o )
[ 7 of 26] Compiling Data.NameSpaces  ( src/Data/NameSpaces.hs, dist/build/c2hs/c2hs-tmp/Data/NameSpaces.o )
[ 8 of 26] Compiling C2HS.C.Attrs     ( src/C2HS/C/Attrs.hs, dist/build/c2hs/c2hs-tmp/C2HS/C/Attrs.o )
[ 9 of 26] Compiling C2HS.C.Builtin   ( src/C2HS/C/Builtin.hs, dist/build/c2hs/c2hs-tmp/C2HS/C/Builtin.o )
[10 of 26] Compiling Paths_c2hs       ( dist/build/autogen/Paths_c2hs.hs, dist/build/c2hs/c2hs-tmp/Paths_c2hs.o )
[11 of 26] Compiling C2HS.Config      ( src/C2HS/Config.hs, dist/build/c2hs/c2hs-tmp/C2HS/Config.o )
[12 of 26] Compiling C2HS.Switches    ( src/C2HS/Switches.hs, dist/build/c2hs/c2hs-tmp/C2HS/Switches.o )
[13 of 26] Compiling C2HS.Version     ( src/C2HS/Version.hs, dist/build/c2hs/c2hs-tmp/C2HS/Version.o )
[14 of 26] Compiling System.CIO       ( src/System/CIO.hs, dist/build/c2hs/c2hs-tmp/System/CIO.o )
[15 of 26] Compiling Control.State    ( src/Control/State.hs, dist/build/c2hs/c2hs-tmp/Control/State.o )
[16 of 26] Compiling C2HS.State       ( src/C2HS/State.hs, dist/build/c2hs/c2hs-tmp/C2HS/State.o )
[17 of 26] Compiling C2HS.CHS.Lexer   ( src/C2HS/CHS/Lexer.hs, dist/build/c2hs/c2hs-tmp/C2HS/CHS/Lexer.o )

src/C2HS/CHS/Lexer.hs:612:16: Warning:
    Defined but not used: `lexeme'
[18 of 26] Compiling C2HS.CHS         ( src/C2HS/CHS.hs, dist/build/c2hs/c2hs-tmp/C2HS/CHS.o )
[19 of 26] Compiling C2HS.Gen.Header  ( src/C2HS/Gen/Header.hs, dist/build/c2hs/c2hs-tmp/C2HS/Gen/Header.o )
[20 of 26] Compiling C2HS.C.Trav      ( src/C2HS/C/Trav.hs, dist/build/c2hs/c2hs-tmp/C2HS/C/Trav.o )
[21 of 26] Compiling C2HS.C.Names     ( src/C2HS/C/Names.hs, dist/build/c2hs/c2hs-tmp/C2HS/C/Names.o )
[22 of 26] Compiling C2HS.C           ( src/C2HS/C.hs, dist/build/c2hs/c2hs-tmp/C2HS/C.o )
[23 of 26] Compiling C2HS.Gen.Monad   ( src/C2HS/Gen/Monad.hs, dist/build/c2hs/c2hs-tmp/C2HS/Gen/Monad.o )

src/C2HS/Gen/Monad.hs:227:10: Warning:
    Orphan instance: instance Read Ident
[24 of 26] Compiling C2HS.C.Info      ( src/C2HS/C/Info.hs, dist/build/c2hs/c2hs-tmp/C2HS/C/Info.o )
[25 of 26] Compiling C2HS.Gen.Bind    ( src/C2HS/Gen/Bind.hs, dist/build/c2hs/c2hs-tmp/C2HS/Gen/Bind.o )

src/C2HS/Gen/Bind.hs:971:43: Warning:
    In the use of `posColumn' (imported from Language.C.Data.Position):
    Deprecated: \"column number information is inaccurate in presence of macros - do not rely on it.\"

src/C2HS/Gen/Bind.hs:789:10: Warning:
    Orphan instance: instance Num CInteger
[26 of 26] Compiling Main             ( src/Main.hs, dist/build/c2hs/c2hs-tmp/Main.o )
Linking dist/build/c2hs/c2hs ...
Installing executable(s) in /root/.cabal/bin
Installed c2hs-0.17.2
lyriondesktop:/home/zilti/tmp # 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.20140709 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.
```
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="209.250.56.2"
 subject="comment 38"
 date="2014-07-11T18:30:55Z"
 content="""
@Daniel, I suggest you either follow the instuctions above, or if you don't want to follow the instructions, follow the error messages. :P In this case, the instructions say to do:

> PATH=$HOME/bin:$PATH
> cabal install c2hs --bindir=$HOME/bin

Which is exactly to work around the problem that we can see in your transcript: `Installing executable(s) in /root/.cabal/bin`

Also, to reiterate the top of the page: If you are not comfortable tracking down and dealing with library build problems, installing git-annex with cabal is probably not the right choice for you!

"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 nickname="joey"
 subject="comment 3"
 date="2013-05-30T15:25:29Z"
 content="""
If you're installing git-annex with cabal, there is no need to install any haskell library packages with apt-get. That includes libghc-libxml-sax-dev and libghc-zlib-dev. Without those, the apt-get line may work to install the C libraries needed for cabal to install the haskell libraries.

However, see the the [[Ubuntu]] page for much easier ways to get git-annex installed.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawnaH44G3QbxBAYyDwy0PbvL0ls60XoaR3Y"
 nickname="Nigel"
 subject="Re: Comment 3"
 date="2013-05-30T15:48:44Z"
 content="""
@Joey Many thanks.
I am new to Haskell (vaguely looked at it with DARCS) and git-annex.
After installing with apt-get on Ubuntu 12.04 LTS I found webapp was missing, hence have come here.
I am going through the correct steps now, it should be awesome when done.

This seems to be a long build process (still going on my old laptop, much longer than apt-get).
Ubuntu git-annex packages from 13.10 Saucy I think are updated to include webapp.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawnaH44G3QbxBAYyDwy0PbvL0ls60XoaR3Y"
 nickname="Nigel"
 subject="Re: Comment 3"
 date="2013-05-30T16:29:12Z"
 content="""
At the end of the build I got these errors:
Registering yesod-static-1.1.2.3...
Installing library in /home/nrb/.cabal/lib/yesod-static-1.1.2.3/ghc-7.4.1
Registering yesod-static-1.1.2.3...
cabal: Error: some packages failed to install:
c2hs-0.16.4 depends on language-c-0.3.2.1 which failed to install.
dbus-0.10.4 depends on libxml-sax-0.7.4 which failed to install.
git-annex-4.20130521.2 depends on libxml-sax-0.7.4 which failed to install.
language-c-0.3.2.1 failed during the configure step. The exception was:
ExitFailure 1
libxml-sax-0.7.4 failed during the configure step. The exception was:
ExitFailure 1
network-protocol-xmpp-0.4.5 depends on libxml-sax-0.7.4 which failed to
install.

One way I could fix this myself is to put together a VM with 13.10 or Debian in it and work inside that.
Or if I can get help to fix my issues here that would be great ;)
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawnaH44G3QbxBAYyDwy0PbvL0ls60XoaR3Y"
 nickname="Nigel"
 subject="Some errors after the build"
 date="2013-05-30T16:38:37Z"
 content="""
    Registering yesod-static-1.1.2.3...
    Installing library in /home/nrb/.cabal/lib/yesod-static-1.1.2.3/ghc-7.4.1
    Registering yesod-static-1.1.2.3...
    cabal: Error: some packages failed to install:
    c2hs-0.16.4 depends on language-c-0.3.2.1 which failed to install.
    dbus-0.10.4 depends on libxml-sax-0.7.4 which failed to install.
    git-annex-4.20130521.2 depends on libxml-sax-0.7.4 which failed to install.
    language-c-0.3.2.1 failed during the configure step. The exception was:
    ExitFailure 1
    libxml-sax-0.7.4 failed during the configure step. The exception was:
    ExitFailure 1
    network-protocol-xmpp-0.4.5 depends on libxml-sax-0.7.4 which failed to
    install.

"""]]


code:
[[!comment format=mdwn
 username="krig"
 ip="46.194.28.123"
 subject="Could not resolve dependencies for yesod"
 date="2013-06-25T06:14:18Z"
 content="""
I'm having problems installing from cabal, and it seems related to yesod. I found an older discussion on something similar, where a constraint to require a newer version of yesod had been added, but I haven't figured out what was done to solve it.

The problem seems to be that git-annex requires yesod < 1.2, but cabal is unable to install an older version.

    $ cabal install git-annex --bindir=$HOME/bin
    Resolving dependencies...
    cabal: Could not resolve dependencies:
    trying: git-annex-4.20130601
    trying: git-annex-4.20130601:+webapp
    rejecting: yesod-1.2.1.1, 1.2.1, 1.2.0.1, 1.2.0 (conflict:
    git-annex-4.20130601:webapp => yesod(<1.2))
    trying: yesod-1.1.9.3
    $

From what I can tell, the problem is fixed in github master since yesod >= 1.2 is supported again.
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="4.152.108.193"
 subject="comment 8"
 date="2013-06-25T17:16:46Z"
 content="""
git-annex 4.20130621 once again builds with the current version of yesod.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawl7dGdYtCHb7xleEOp6n8yaUQ4UtaiAEEs"
 nickname="Henning"
 subject="libxml-sax Error on OS X fresh install"
 date="2013-07-27T13:11:23Z"
 content="""
I had - maybe the same problem as Nigel - with ExitFailure 1 libxml-sax-0.7.4 .

I could fix this by forcing the link of libxml2 package with \"brew link libxml2 --force\". Maybe you should update your guide. I had this problem on 2 different machines running both the current versions of OS X.

After this the build finished successfull. Maybe this helps.
"""]]


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawm7eqCMh_B7mxE0tnchbr0JoYu11FUAFRY"
 nickname="Stéphane"
 subject="Old versions from distributions (e.g. Debian stable) fail with online instructions."
 date="2014-06-28T15:36:12Z"
 content="""
Hello everyone.

Be aware that your distribution's package may be very old.
For example, at the time I write this, latest Debian stable is Debian 7.5 which is 2 months old.
But git-annex package there is two *years* old (tomorrow, it will be exactly two yezrs old).

So, beware.  If following [online walkthrough](https://git-annex.branchable.com/walkthrough/), either install a more recent git-annex (e.g. from [Debain backports](http://backports.debian.org/Instructions/)) or follow instructions from your local `/usr/share/doc/git-annex/html/walkthrough.html` instead.
"""]]


code:
To install git-annex from scratch, you need a lot of stuff. Really
quite a lot.

* Haskell stuff
  * [The Haskell Platform](http://haskell.org/platform/) (GHC 7.4 or newer)
  * A ton of haskell libraries. Rather than try to list them all here,
    see git-annex.cabal. Probably the easiest way to install them:
    `cabal update; cabal install git-annex --only-dependencies`
* Shell commands
  * [git](http://git-scm.com/) (1.7.2 or newer; 1.8.5 or newer recommended)
  * [xargs](http://savannah.gnu.org/projects/findutils/)
  * [rsync](http://rsync.samba.org/)
  * [curl](http://http://curl.haxx.se/) (optional, but recommended)
  * [wget](http://www.gnu.org/software/wget/) (optional)
  * [sha*sum](ftp://ftp.gnu.org/gnu/coreutils/) (optional)
  * [gpg](http://gnupg.org/) (optional; needed for encryption)
  * [lsof](ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/)
    (optional; recommended for watch mode)
  * [gcrypt](https://github.com/joeyh/git-remote-gcrypt)
    (optional)
  * [nocache](https://github.com/Feh/nocache)
    (optional)
  * multicast DNS support, provided on linux by [nss-mdns](http://www.0pointer.de/lennart/projects/nss-mdns/)
    (optional; recommended for the assistant to support pairing well)
  * [ikiwiki](http://ikiwiki.info) (optional; used to build the docs)

Then just [[download]] git-annex and run: `make; make install`


code:
[[!comment format=mdwn
 username="azul"
 ip="91.36.153.149"
 subject="cabal fails to resolve dependencies"
 date="2014-06-19T08:49:05Z"
 content="""
I tried this on ubuntu 14.04 without any previous haskell installs and cabal failed to resolve the dependencies:

rejecting: optparse-applicative-0.9.0 (conflict: hjsmin =>
optparse-applicative>=0.7 && <0.9)

[full log](paste.debian.net/105771/)
"""]]


code:
[[!comment format=mdwn
 username="azul"
 ip="91.36.173.120"
 subject="conflict solved"
 date="2014-06-20T06:13:09Z"
 content="""
`apt-get install happy alex libghc-hjsmin-dev`
solved the problem for me. The hjsmin lib was probably crucial. It seems a bunch of dependencies can also be installed as debs rather than through cabal.
`standalone/android/buildchroot-inchroot` gave me a clue.
"""]]


code:
[[!comment format=mdwn
 username="azul"
 ip="91.36.173.120"
 subject="c2hs required for cabal to install dependencies"
 date="2014-06-20T06:35:35Z"
 content="""
Next thing i ran into was missing c2hs.
So
`apt-get install c2hs` before running the cabal install otherwise...

<pre>
$ cabal install git-annex --only-dependencies
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:
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.
</pre>

"""]]


code:
Haskell Platform is now [officially available for openSUSE](http://software.opensuse.org/package/haskell-platform) via 1-Click Install.

At the time of writing, there are [unofficial packages of git-annex](http://software.opensuse.org/package/git-annex) available for openSUSE.  It should also be possible to build it via cabal or from source as described on the [[install]] page.


code:
In the world of git, we're not scared about internal implementation
details, and sometimes we like to dive in and tweak things by hand. Here's
some documentation to that end.

## `.git/annex/objects/aa/bb/*/*`

This is where locally available file contents are actually stored.
Files added to the annex get a symlink checked into git that points
to the file content.

First there are two levels of directories used for hashing, to prevent
too many things ending up in any one directory.
See [[hashing]] for details.

Each subdirectory has the [[name_of_a_key|key_format]] in one of the
[[key-value_backends|backends]]. The file inside also has the name of the key.
This two-level structure is used because it allows the write bit to be removed
from the subdirectories as well as from the files. That prevents accidentially
deleting or changing the file contents. See [[lockdown]] for details.

In [[direct_mode]], file contents are not stored in here, and instead
are stored directly in the file. However, the same symlinks are still
committed to git, internally.

Also in [[direct_mode]], some additional data is stored in these directories.
`.cache` files contain cached file stats used in detecting when a file has
changed, and `.map` files contain a list of file(s) in the work directory
that contain the key.

# `.git/annex/tmp/`

This directory contains partially transferred objects.

# `.git/annex/misctmp/`

This is a temp directory for miscellaneous other temp files.

While .git/annex/objects and .git/annex/tmp can be put on different
filesystems if desired, .git/annex/misctmp
has to be on the same filesystem as the work tree and git repository.

# `.git/annex/bad/`

git-annex fsck puts any bad objects it finds in here.

# `.git/annex/transfers/`

Contains information files for uploads and downloads that are in progress,
as well as any that have failed. Used especially by the assistant.
It is safe to delete these files.

# `.git/annex/ssh/`

ssh connection caching files are written in here.

# `.git/annex/index`

This is a git index file which git-annex uses for commits to the git-annex
branch.

# `.git/annex/journal/`

git-annex uses this to journal changes to the git-annex branch,
before committing a set of changes.

## The git-annex branch

This branch is managed by git-annex, with the contents listed below.

The file `.git/annex/index` is a separate git index file it uses
to accumulate changes for the git-annex branch.
Also, `.git/annex/journal/` is used to record changes before they
are added to git.

This branch operates on objects exclusively. No file names will ever
be stored in this branch.

The files stored in this branch are all designed to be auto-merged
using git's [[union merge driver|git-union-merge]]. So each line
has a timestamp, to allow the most recent information to be identified.

### `uuid.log`

Records the UUIDs of known repositories, and associates them with a
description of the repository. This allows git-annex to display something
more useful than a UUID when it refers to a repository that does not have
a configured git remote pointing at it.

The file format is simply one line per repository, with the uuid followed by a
space and then the description, followed by a timestamp. Example:

	e605dca6-446a-11e0-8b2a-002170d25c55 laptop timestamp=1317929189.157237s
	26339d22-446b-11e0-9101-002170d25c55 usb disk timestamp=1317929330.769997s

## `numcopies.log`

Records the global numcopies setting.

The file format is simply a timestamp followed by a number.

## `remote.log`

Holds persistent configuration settings for [[special_remotes]] such as
Amazon S3.

The file format is one line per remote, starting with the uuid of the
remote, followed by a space, and then a series of var=value pairs,
each separated by whitespace, and finally a timestamp.

Encrypted special remotes store their encryption key here,
in the "cipher" value. It is base64 encoded, and unless shared [[encryption]]
is used, is encrypted to one or more gpg keys. The first 256 bytes of
the cipher is used as the HMAC SHA1 encryption key, to encrypt filenames
stored on the special remote. The remainder of the cipher is used as a gpg
symmetric encryption key, to encrypt the content of files stored on the special
remote.

## `trust.log`

Records the [[trust]] information for repositories. Does not exist unless
[[trust]] values are configured.

The file format is one line per repository, with the uuid followed by a
space, and then either `1` (trusted), `0` (untrusted), `?` (semi-trusted),
`X` (dead) and finally a timestamp.

Example:

	e605dca6-446a-11e0-8b2a-002170d25c55 1 timestamp=1317929189.157237s
	26339d22-446b-11e0-9101-002170d25c55 ? timestamp=1317929330.769997s

Repositories not listed are semi-trusted.

## `group.log`

Used to group repositories together.

The file format is one line per repository, with the uuid followed by a space,
and then a space-separated list of groups this repository is part of,
and finally a timestamp.

## `preferred-content.log`

Used to indicate which repositories prefer to contain which file contents.

The file format is one line per repository, with the uuid followed by a space,
then a boolean expression, and finally a timestamp.

Files matching the expression are preferred to be retained in the
repository, while files not matching it are preferred to be stored
somewhere else.

## `required-content.log`

Used to indicate which repositories are required to contain which file
contents.

File format is identical to preferred-content.log.

## `group-preferred-content.log`

Contains standard preferred content settings for groups. (Overriding or
supplimenting the ones built into git-annex.)

The file format is one line per group, staring with a timestamp, then a
space, then the group name followed by a space and then the preferred
content expression.

## `aaa/bbb/*.log`

These log files record [[location_tracking]] information
for file contents. These are placed in two levels of subdirectories
for hashing. See [[hashing]] for details.

The name of the key is the filename, and the content
consists of a timestamp, either 1 (present) or 0 (not present), and
the UUID of the repository that has or lacks the file content.

Example:

	1287290776.765152s 1 e605dca6-446a-11e0-8b2a-002170d25c55
	1287290767.478634s 0 26339d22-446b-11e0-9101-002170d25c55

## `aaa/bbb/*.log.web`

These log files record urls used by the
[[web_special_remote|special_remotes/web]]. Their format is similar
to the location tracking files, but with urls rather than UUIDs.

## `aaa/bbb/*.log.rmt`

These log files are used by remotes that need to record their own state
about keys. Each remote can store one line of data about a key, in
its own format.

Example:

	1287290776.765152s e605dca6-446a-11e0-8b2a-002170d25c55 blah blah
	1287290767.478634s 26339d22-446b-11e0-9101-002170d25c55 foo=bar

## `aaa/bbb/*.log.met`

These log files are used to store arbitrary [[design/metadata]] about keys.
Each key can have any number of metadata fields. Each field has a set of
values.

Lines are timestamped, and record when values are added (`field +value`),
but also when values are removed (`field -value`). Removed values
are retained in the log so that when merging an old line that sets a value
that was later unset, the value is not accidentially added back.

For example:

	1287290776.765152s tag +foo +bar author +joey
	1291237510.141453s tag -bar +baz

The value can be completely arbitrary data, although it's typically
reasonably short. If the value contains any whitespace
(including \r or \r), it will be base64 encoded. Base64 encoded values
are indicated by prefixing them with "!"

## `aaa/bbb/*.log.cnk`

These log files are used when objects are stored in chunked form on
remotes. They record the size(s) of the chunks, and the number of chunks.

For example, this logs that a remote has an object stored using both
9 chunks of 1 mb size, and 1 chunk of 10 mb size.

	1287290776.765152s e605dca6-446a-11e0-8b2a-002170d25c55:10240 9
	1287290776.765153s e605dca6-446a-11e0-8b2a-002170d25c55:102400 1

(When those chunks are removed from the remote, the 9 is changed to 0.)

## `schedule.log`

Used to record scheduled events, such as periodic fscks.

The file format is simply one line per repository, with the uuid followed by a
space and then its schedule, followed by a timestamp.

There can be multiple events in the schedule, separated by "; "

The format of the scheduled events is the same described in
the SCHEDULED JOBS section of the man page.

Example:

	42bf2035-0636-461d-a367-49e9dfd361dd fsck self 30m every day at any time; fsck 4b3ebc86-0faf-4892-83c5-ce00cbe30f0a 1h every year at any time timestamp=1385646997.053162s

## `transitions.log`

Used to record transitions, eg by `git annex forget`

Each line of the file is a transition, followed by a timestamp.

Example:

	ForgetGitHistory 1387325539.685136s
	ForgetDeadRemotes 1387325539.685136s


code:
[[!comment format=mdwn
 username="stoile"
 ip="2a01:198:242:0:219:66ff:fef2:c021"
 subject="tmp missing"
 date="2013-11-16T12:16:48Z"
 content="""
There's no information about .git/annex/tmp here.
"""]]


code:
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="209.250.56.246"
 subject="comment 2"
 date="2013-11-16T17:23:02Z"
 content="""
.git/annex/tmp is not very interesting. It's a temporary file directory. When transferring a key's content, git-annex uses a stable filename, which allows resuming interrupted downloads, or cleaning up aborted downloads with `git annex unused`.
"""]]


code:
In both the .git/annex directory and the git-annex branch, two levels of
hash directories are used, to avoid issues with too many files in one
directory.

Two separate hash methods are used.

* hashdirmixed is only used for non-bare git repositories.
  (We'd like to stop using this, but it'd be too annoying to change
  all the git-annex symlinks!)

* hashdirlower is used for bare git repositories, the
  git-annex branch, and on special remotes as well.

Note that `git annex find` and `git annex examinekey` can be used with
the `--format` option to find the hash directories. The explanation
below is only for completeness.

## new hash format

This uses two directories, each with a three-letter name, such as "f87/4d5"

The directory names come from the md5sum of the [[key|key_format]].

For example:

	echo -n	"SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" | md5sum

## old hash format

This uses two directories, each with a two-letter name, such as "pX/1J"

It takes the md5sum of the key, but rather than a string, represents it as 4
32bit words. Only the first word is used. It is converted into a string by the
same mechanism that would be used to encode a normal md5sum value into a
string, but where that would normally encode the bits using the 16 characters
0-9a-f, this instead uses the 32 characters "0123456789zqjxkmvwgpfZQJXKMVWGPF".
The first 2 letters of the resulting string are the first directory, and the
second 2 are the second directory.

## chunk keys

The same hash directory is used for a chunk key as would be used for the
key that it's a chunk of.


code:
[[!comment format=mdwn
 username="https://www.google.com/accounts/o8/id?id=AItOawnlotDRSLW2JVXY3SLSwhrcHteqUHhTtoY"
 nickname="Péter"
 subject="comment 1"
 date="2014-01-31T00:45:47Z"
 content="""
The correct old hash value for the empty file SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 is pX/ZJ .

The text describes the old hash value computation incorrectly, because it doesn't mention that 1 bit is skipped between each group of 5 bits. See the sample implementation in display_32bits_as_dir in https://github.com/joeyh/git-annex/blob/master/Locations.hs
"""]]


code:
A git-annex key has this format:

	BACKEND[-sNNNN][-mNNNN][-SNNNN-CNNNN]--NAME

For example:

	SHA256E-s31390--f50d7ac4c6b9031379986bc362fcefb65f1e52621ce1708d537e740fefc59cc0.mp3

* The backend is one of the [[key-value_backends|backends]], which
  are always upper-cased.
* The name field at the end has a format dependent on the backend. It is
  always the last field, and is prefixed with "--". Unlike other fields,
  it may contain "-" in its content. It should not contain newline
  characters or "/"; otherwise nearly anything goes.
* The "-s" field is optional, and is the size of the content in bytes.
* The "-m" field is optional, and is the mtime of the file when it was
  added to git-annex, expressed as seconds from the epoch.
  This is currently only used by the WORM backend.
* The "-S" and "-C" fields are only used for keys that are chunks
  of some other key. "-S" is the size of the chunk, and "-c" is the chunk
  number (starting at 1).
* Other fields could be added in the future, if needed.

git-annex always puts the fields in the order shown above when serializing
a key. It can parse keys with the fields in other orders (although the name
field must always come last).

The `git annex examinekey` command can be used to extract information from
a key.