2011-06-30 18:55:03 +00:00
|
|
|
Name: git-annex
|
2013-09-20 14:35:18 +00:00
|
|
|
Version: 4.20130920
|
2012-04-05 20:39:50 +00:00
|
|
|
Cabal-Version: >= 1.8
|
2013-06-03 19:38:48 +00:00
|
|
|
License: GPL-3
|
2011-06-30 18:55:03 +00:00
|
|
|
Maintainer: Joey Hess <joey@kitenet.net>
|
|
|
|
Author: Joey Hess
|
|
|
|
Stability: Stable
|
2013-02-27 05:41:01 +00:00
|
|
|
Copyright: 2010-2013 Joey Hess
|
2012-09-24 19:20:28 +00:00
|
|
|
License-File: COPYRIGHT
|
2011-06-30 18:55:03 +00:00
|
|
|
Homepage: http://git-annex.branchable.com/
|
2013-02-28 23:18:56 +00:00
|
|
|
Build-type: Custom
|
2011-06-30 18:55:03 +00:00
|
|
|
Category: Utility
|
|
|
|
Synopsis: manage files with git, without checking their contents into git
|
|
|
|
Description:
|
|
|
|
git-annex allows managing files with git, without checking the file
|
|
|
|
contents into git. While that may seem paradoxical, it is useful when
|
|
|
|
dealing with files larger than git can currently easily handle, whether due
|
2012-02-15 23:43:15 +00:00
|
|
|
to limitations in memory, time, or disk space.
|
2011-06-30 18:55:03 +00:00
|
|
|
.
|
|
|
|
Even without file content tracking, being able to manage files with git,
|
|
|
|
move files around and delete files with versioned directory trees, and use
|
|
|
|
branches and distributed clones, are all very handy reasons to use git. And
|
|
|
|
annexed files can co-exist in the same git repository with regularly
|
|
|
|
versioned files, which is convenient for maintaining documents, Makefiles,
|
|
|
|
etc that are associated with annexed files but that benefit from full
|
|
|
|
revision control.
|
|
|
|
|
2012-04-14 18:22:33 +00:00
|
|
|
Flag S3
|
|
|
|
Description: Enable S3 support
|
|
|
|
|
2012-11-15 00:25:00 +00:00
|
|
|
Flag WebDAV
|
|
|
|
Description: Enable WebDAV support
|
|
|
|
|
2012-06-17 21:15:56 +00:00
|
|
|
Flag Inotify
|
|
|
|
Description: Enable inotify support
|
|
|
|
|
2012-07-19 17:01:41 +00:00
|
|
|
Flag Dbus
|
|
|
|
Description: Enable dbus support
|
|
|
|
|
2012-06-26 13:15:47 +00:00
|
|
|
Flag Assistant
|
|
|
|
Description: Enable git-annex assistant and watch command
|
|
|
|
|
2012-07-26 01:26:13 +00:00
|
|
|
Flag Webapp
|
|
|
|
Description: Enable git-annex webapp
|
|
|
|
|
2012-09-07 23:44:20 +00:00
|
|
|
Flag Pairing
|
|
|
|
Description: Enable pairing
|
2012-09-07 18:54:00 +00:00
|
|
|
|
2012-10-24 00:24:23 +00:00
|
|
|
Flag XMPP
|
|
|
|
Description: Enable notifications using XMPP
|
|
|
|
|
2012-10-28 23:14:30 +00:00
|
|
|
Flag DNS
|
|
|
|
Description: Enable the haskell DNS library for DNS lookup
|
2012-10-25 21:54:00 +00:00
|
|
|
|
2013-02-27 05:41:01 +00:00
|
|
|
Flag Production
|
2013-02-27 06:30:26 +00:00
|
|
|
Description: Enable production build (slower build; faster binary)
|
|
|
|
|
|
|
|
Flag Android
|
|
|
|
Description: Building for Android
|
|
|
|
Default: False
|
2013-02-27 05:41:01 +00:00
|
|
|
|
2013-02-27 19:59:31 +00:00
|
|
|
Flag TestSuite
|
|
|
|
Description: Embed the test suite into git-annex
|
|
|
|
|
2013-05-06 13:44:55 +00:00
|
|
|
Flag TDFA
|
|
|
|
Description: Use regex-tdfa for wildcards
|
|
|
|
|
2013-07-28 19:27:36 +00:00
|
|
|
Flag Feed
|
|
|
|
Description: Enable podcast feed support
|
|
|
|
|
2013-09-09 06:16:22 +00:00
|
|
|
Flag Quvi
|
|
|
|
Description: Enable use of quvi to download videos
|
|
|
|
|
2011-06-30 18:55:03 +00:00
|
|
|
Executable git-annex
|
|
|
|
Main-Is: git-annex.hs
|
2011-11-26 12:39:47 +00:00
|
|
|
Build-Depends: MissingH, hslogger, directory, filepath,
|
2013-05-10 20:37:38 +00:00
|
|
|
containers, utf8-string, network (>= 2.0), mtl (>= 2),
|
2013-04-16 19:20:21 +00:00
|
|
|
bytestring, old-locale, time, HTTP,
|
Use cryptohash rather than SHA for hashing.
This is a massive win on OSX, which doesn't have a sha256sum normally.
Only use external hash commands when the file is > 1 mb,
since cryptohash is quite close to them in speed.
SHA is still used to calculate HMACs. I don't quite understand
cryptohash's API for those.
Used the following benchmark to arrive at the 1 mb number.
1 mb file:
benchmarking sha256/internal
mean: 13.86696 ms, lb 13.83010 ms, ub 13.93453 ms, ci 0.950
std dev: 249.3235 us, lb 162.0448 us, ub 458.1744 us, ci 0.950
found 5 outliers among 100 samples (5.0%)
4 (4.0%) high mild
1 (1.0%) high severe
variance introduced by outliers: 10.415%
variance is moderately inflated by outliers
benchmarking sha256/external
mean: 14.20670 ms, lb 14.17237 ms, ub 14.27004 ms, ci 0.950
std dev: 230.5448 us, lb 150.7310 us, ub 427.6068 us, ci 0.950
found 3 outliers among 100 samples (3.0%)
2 (2.0%) high mild
1 (1.0%) high severe
2 mb file:
benchmarking sha256/internal
mean: 26.44270 ms, lb 26.23701 ms, ub 26.63414 ms, ci 0.950
std dev: 1.012303 ms, lb 925.8921 us, ub 1.122267 ms, ci 0.950
variance introduced by outliers: 35.540%
variance is moderately inflated by outliers
benchmarking sha256/external
mean: 26.84521 ms, lb 26.77644 ms, ub 26.91433 ms, ci 0.950
std dev: 347.7867 us, lb 210.6283 us, ub 571.3351 us, ci 0.950
found 6 outliers among 100 samples (6.0%)
import Crypto.Hash
import Data.ByteString.Lazy as L
import Criterion.Main
import Common
testfile :: FilePath
testfile = "/run/shm/data" -- on ram disk
main = defaultMain
[ bgroup "sha256"
[ bench "internal" $ whnfIO internal
, bench "external" $ whnfIO external
]
]
sha256 :: L.ByteString -> Digest SHA256
sha256 = hashlazy
internal :: IO String
internal = show . sha256 <$> L.readFile testfile
external :: IO String
external = do
s <- readProcess "sha256sum" [testfile]
return $ fst $ separate (== ' ') s
2013-09-22 23:45:08 +00:00
|
|
|
extensible-exceptions, dataenc, SHA, cryptohash, process, json,
|
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
|
|
|
base (>= 4.5 && < 4.8), monad-control, MonadCatchIO-transformers,
|
2012-10-05 21:02:51 +00:00
|
|
|
IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance, process,
|
2013-09-09 06:16:22 +00:00
|
|
|
SafeSemaphore, uuid, random, dlist, unix-compat
|
2012-07-19 17:01:41 +00:00
|
|
|
-- Need to list these because they're generated from .hsc files.
|
|
|
|
Other-Modules: Utility.Touch Utility.Mounts
|
2012-07-26 02:04:10 +00:00
|
|
|
Include-Dirs: Utility
|
2012-07-20 00:38:58 +00:00
|
|
|
C-Sources: Utility/libdiskfree.c Utility/libmounts.c
|
2013-02-27 05:41:01 +00:00
|
|
|
CC-Options: -Wall
|
2013-05-06 13:35:43 +00:00
|
|
|
GHC-Options: -Wall
|
2013-03-12 09:48:41 +00:00
|
|
|
CPP-Options: -DWITH_CLIBS
|
2013-04-14 16:49:09 +00:00
|
|
|
Extensions: PackageImports
|
2013-07-25 17:57:53 +00:00
|
|
|
-- Some things don't work with the non-threaded RTS.
|
|
|
|
GHC-Options: -threaded
|
2013-02-27 05:41:01 +00:00
|
|
|
|
|
|
|
if flag(Production)
|
|
|
|
GHC-Options: -O2
|
2012-04-14 18:22:33 +00:00
|
|
|
|
2013-05-10 20:08:53 +00:00
|
|
|
if os(windows)
|
|
|
|
CPP-Options: -D__WINDOWS__
|
2013-05-10 20:37:38 +00:00
|
|
|
else
|
|
|
|
Build-Depends: unix
|
2013-05-10 20:08:53 +00:00
|
|
|
|
2013-02-27 19:59:31 +00:00
|
|
|
if flag(TestSuite)
|
2013-02-28 03:21:43 +00:00
|
|
|
Build-Depends: HUnit
|
2013-02-27 19:59:31 +00:00
|
|
|
CPP-Options: -DWITH_TESTSUITE
|
|
|
|
|
2013-05-06 13:44:55 +00:00
|
|
|
if flag(TDFA)
|
|
|
|
Build-Depends: regex-tdfa
|
|
|
|
CPP-Options: -DWITH_TDFA
|
|
|
|
|
2012-04-14 18:22:33 +00:00
|
|
|
if flag(S3)
|
|
|
|
Build-Depends: hS3
|
|
|
|
CPP-Options: -DWITH_S3
|
2011-06-30 18:55:03 +00:00
|
|
|
|
2013-07-16 15:29:43 +00:00
|
|
|
if flag(WebDAV)
|
2012-12-06 22:04:38 +00:00
|
|
|
Build-Depends: DAV (>= 0.3), http-conduit, xml-conduit, http-types
|
2012-11-18 17:28:18 +00:00
|
|
|
CPP-Options: -DWITH_WEBDAV
|
2013-02-22 15:08:34 +00:00
|
|
|
|
2013-06-30 17:17:10 +00:00
|
|
|
if flag(Assistant) && ! os(windows) && ! os(solaris)
|
2013-02-27 06:30:26 +00:00
|
|
|
Build-Depends: async, stm (>= 2.3)
|
2012-06-26 13:15:47 +00:00
|
|
|
CPP-Options: -DWITH_ASSISTANT
|
|
|
|
|
2013-02-27 06:30:26 +00:00
|
|
|
if flag(Android)
|
2013-05-03 02:38:45 +00:00
|
|
|
Build-Depends: data-endian
|
2013-02-27 06:30:26 +00:00
|
|
|
CPP-Options: -D__ANDROID__
|
|
|
|
|
2013-07-12 19:36:59 +00:00
|
|
|
if flag(Assistant)
|
|
|
|
if os(linux) && flag(Inotify)
|
2013-07-16 15:29:43 +00:00
|
|
|
Build-Depends: hinotify
|
|
|
|
CPP-Options: -DWITH_INOTIFY
|
2012-12-27 19:19:12 +00:00
|
|
|
else
|
2013-07-12 19:36:59 +00:00
|
|
|
if os(darwin)
|
|
|
|
Build-Depends: hfsevents
|
|
|
|
CPP-Options: -DWITH_FSEVENTS
|
|
|
|
else
|
|
|
|
if (! os(windows) && ! os(solaris) && ! os(linux))
|
2013-09-22 18:13:31 +00:00
|
|
|
if flag(Android)
|
|
|
|
Build-Depends: hinotify
|
|
|
|
CPP-Options: -DWITH_INOTIFY
|
|
|
|
else
|
|
|
|
CPP-Options: -DWITH_KQUEUE
|
|
|
|
C-Sources: Utility/libkqueue.c
|
2013-07-12 19:36:59 +00:00
|
|
|
|
2013-07-16 15:29:43 +00:00
|
|
|
if os(linux) && flag(Dbus)
|
2012-10-26 23:38:27 +00:00
|
|
|
Build-Depends: dbus (>= 0.10.3)
|
2012-07-19 17:01:41 +00:00
|
|
|
CPP-Options: -DWITH_DBUS
|
|
|
|
|
2013-07-16 15:29:43 +00:00
|
|
|
if flag(Webapp)
|
2013-05-23 15:02:25 +00:00
|
|
|
Build-Depends:
|
2013-06-27 04:01:31 +00:00
|
|
|
yesod, yesod-default, yesod-static, yesod-form, yesod-core,
|
2013-05-23 15:02:25 +00:00
|
|
|
case-insensitive, http-types, transformers, wai, wai-logger, warp,
|
2013-08-22 22:25:21 +00:00
|
|
|
blaze-builder, crypto-api, hamlet, clientsession,
|
2013-09-09 06:16:22 +00:00
|
|
|
template-haskell, data-default, aeson
|
2012-07-26 01:26:13 +00:00
|
|
|
CPP-Options: -DWITH_WEBAPP
|
|
|
|
|
2013-07-16 15:29:43 +00:00
|
|
|
if flag(Pairing)
|
2012-09-07 23:44:20 +00:00
|
|
|
Build-Depends: network-multicast, network-info
|
|
|
|
CPP-Options: -DWITH_PAIRING
|
2012-09-07 18:54:00 +00:00
|
|
|
|
2013-07-16 15:29:43 +00:00
|
|
|
if flag(XMPP)
|
2012-10-31 15:50:43 +00:00
|
|
|
Build-Depends: network-protocol-xmpp, gnutls (>= 0.1.4), xml-types
|
2012-10-24 00:24:23 +00:00
|
|
|
CPP-Options: -DWITH_XMPP
|
|
|
|
|
2013-07-16 15:29:43 +00:00
|
|
|
if flag(DNS)
|
2012-10-28 23:14:30 +00:00
|
|
|
Build-Depends: dns
|
|
|
|
CPP-Options: -DWITH_DNS
|
2012-10-25 21:54:00 +00:00
|
|
|
|
2013-07-28 19:27:36 +00:00
|
|
|
if flag(Feed)
|
|
|
|
Build-Depends: feed
|
|
|
|
CPP-Options: -DWITH_FEED
|
2013-09-09 06:16:22 +00:00
|
|
|
|
|
|
|
if flag(Quvi)
|
|
|
|
Build-Depends: aeson
|
|
|
|
CPP-Options: -DWITH_QUVI
|
2013-07-28 19:27:36 +00:00
|
|
|
|
2011-06-30 18:55:03 +00:00
|
|
|
source-repository head
|
|
|
|
type: git
|
|
|
|
location: git://git-annex.branchable.com/
|