git-annex/doc/install/fromscratch.mdwn

68 lines
3.8 KiB
Text
Raw Normal View History

2012-09-27 21:19:06 +00:00
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)
* [mtl](http://hackage.haskell.org.package/mtl) (2.1.1 or newer)
2012-09-27 21:19:06 +00:00
* [MissingH](http://github.com/jgoerzen/missingh/wiki)
* [utf8-string](http://hackage.haskell.org/package/utf8-string)
* [SHA](http://hackage.haskell.org/package/SHA)
* [dataenc](http://hackage.haskell.org/package/dataenc)
* [monad-control](http://hackage.haskell.org/package/monad-control)
* [QuickCheck 2](http://hackage.haskell.org/package/QuickCheck)
* [json](http://hackage.haskell.org/package/json)
* [IfElse](http://hackage.haskell.org/package/IfElse)
2013-04-24 20:01:01 +00:00
* [dlist](http://hackage.haskell.org/package/dlist)
2012-09-27 21:19:06 +00:00
* [bloomfilter](http://hackage.haskell.org/package/bloomfilter)
* [edit-distance](http://hackage.haskell.org/package/edit-distance)
* [hS3](http://hackage.haskell.org/package/hS3) (optional)
* [DAV](http://hackage.haskell.org/package/DAV) (optional)
* [SafeSemaphore](http://hackage.haskell.org/package/SafeSemaphore)
* [UUID](http://hackage.haskell.org/package/uuid)
* [regex-tdfa](http://hackage.haskell.org/package/regex-tdfa)
2013-05-17 15:24:07 +00:00
* [extensible-exceptions](http://hackage.haskell.org/package/extensible-exceptions)
* Optional haskell stuff, used by the [[assistant]] and its webapp
2012-09-27 21:19:06 +00:00
* [stm](http://hackage.haskell.org/package/stm)
(version 2.3 or newer)
* [hinotify](http://hackage.haskell.org/package/hinotify)
(Linux only)
* [dbus](http://hackage.haskell.org/package/dbus)
* [yesod](http://hackage.haskell.org/package/yesod)
* [yesod-static](http://hackage.haskell.org/package/yesod-static)
* [yesod-default](http://hackage.haskell.org/package/yesod-default)
* [data-default](http://hackage.haskell.org/package/data-default)
* [case-insensitive](http://hackage.haskell.org/package/case-insensitive)
* [http-types](http://hackage.haskell.org/package/http-types)
* [wai](http://hackage.haskell.org/package/wai)
* [wai-logger](http://hackage.haskell.org/package/wai-logger)
* [warp](http://hackage.haskell.org/package/warp)
* [blaze-builder](http://hackage.haskell.org/package/blaze-builder)
* [crypto-api](http://hackage.haskell.org/package/crypto-api)
* [hamlet](http://hackage.haskell.org/package/hamlet)
* [clientsession](http://hackage.haskell.org/package/clientsession)
* [network-multicast](http://hackage.haskell.org/package/network-multicast)
* [network-info](http://hackage.haskell.org/package/network-info)
* [network-protocol-xmpp](http://hackage.haskell.org/package/network-protocol-xmpp)
* [dns](http://hackage.haskell.org/package/dns)
2012-10-31 15:50:43 +00:00
* [xml-types](http://hackage.haskell.org/package/xml-types)
2013-01-26 03:14:32 +00:00
* [async](http://hackage.haskell.org/package/async)
2013-04-16 23:00:44 +00:00
* [HTTP](http://hackage.haskell.org/package/HTTP)
2013-05-11 21:21:12 +00:00
* [unix-compat](http://hackage.haskell.org/package/unix-compat)
Switch to MonadCatchIO-transformers for better handling of state while catching exceptions. As seen in this bug report, the lifted exception handling using the StateT monad throws away state changes when an action throws an exception. http://git-annex.branchable.com/bugs/git_annex_fork_bombs_on_gpg_file/ .. Which can result in cached values being redundantly calculated, or other possibly worse bugs when the annex state gets out of sync with reality. This switches from a StateT AnnexState to a ReaderT (MVar AnnexState). All changes to the state go via the MVar. So when an Annex action is running inside an exception handler, and it makes some changes, they immediately go into affect in the MVar. If it then throws an exception (or even crashes its thread!), the state changes are still in effect. The MonadCatchIO-transformers change is actually only incidental. I could have kept on using lifted-base for the exception handling. However, I'd have needed to write a new instance of MonadBaseControl for the new monad.. and I didn't write the old instance.. I begged Bas and he kindly sent it to me. Happily, MonadCatchIO-transformers is able to derive a MonadCatchIO instance for my monad. This is a deep level change. It passes the test suite! What could it break? Well.. The most likely breakage would be to code that runs an Annex action in an exception handler, and *wants* state changes to be thrown away. Perhaps the state changes leaves the state inconsistent, or wrong. Since there are relatively few places in git-annex that catch exceptions in the Annex monad, and the AnnexState is generally just used to cache calculated data, this is unlikely to be a problem. Oh yeah, this change also makes Assistant.Types.ThreadedMonad a bit redundant. It's now entirely possible to run concurrent Annex actions in different threads, all sharing access to the same state! The ThreadedMonad just adds some extra work on top of that, with its own MVar, and avoids such actions possibly stepping on one-another's toes. I have not gotten rid of it, but might try that later. Being able to run concurrent Annex actions would simplify parts of the Assistant code.
2013-05-19 18:16:36 +00:00
* [MonadCatchIO-transformers](http://hackage.haskell.org/package/MonadCatchIO-transformers)
2012-09-27 21:19:06 +00:00
* Shell commands
* [git](http://git-scm.com/)
* [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)
2012-09-27 21:19:06 +00:00
* [sha1sum](ftp://ftp.gnu.org/gnu/coreutils/) (optional, but recommended;
a sha1 command will also do)
* [gpg](http://gnupg.org/) (optional; needed for encryption)
* [lsof](ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/)
(optional; recommended for watch mode)
* 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`