summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Utility/Hash.hs6
-rw-r--r--debian/changelog3
-rw-r--r--debian/git-annex.lintian-overrides1
-rw-r--r--doc/design/external_special_remote_protocol.mdwn20
-rw-r--r--git-annex.cabal7
5 files changed, 34 insertions, 3 deletions
diff --git a/Utility/Hash.hs b/Utility/Hash.hs
index 12f92024f..81ee90ee3 100644
--- a/Utility/Hash.hs
+++ b/Utility/Hash.hs
@@ -31,9 +31,11 @@ import qualified Data.ByteString.Lazy as L
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import qualified Data.ByteString as S
-import Crypto.Hash
#ifdef WITH_CRYPTONITE
-import Crypto.MAC.HMAC
+import "cryptonite" Crypto.MAC.HMAC
+import "cryptonite" Crypto.Hash
+#else
+import "cryptohash" Crypto.Hash
#endif
sha1 :: L.ByteString -> Digest SHA1
diff --git a/debian/changelog b/debian/changelog
index d54548047..41e959ac0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,9 @@ git-annex (5.20150813) UNRELEASED; urgency=medium
* sync: Support --jobs
* sync --content: Avoid unnecessary second pull from remotes when
no file transfers are made.
+ * External special remotes can now be built that can be used in readonly
+ mode, where git-annex downloads content from the remote using regular
+ http.
-- Joey Hess <id@joeyh.name> Wed, 12 Aug 2015 14:31:01 -0400
diff --git a/debian/git-annex.lintian-overrides b/debian/git-annex.lintian-overrides
new file mode 100644
index 000000000..25d3d4c31
--- /dev/null
+++ b/debian/git-annex.lintian-overrides
@@ -0,0 +1 @@
+binary-or-shlib-defines-rpath
diff --git a/doc/design/external_special_remote_protocol.mdwn b/doc/design/external_special_remote_protocol.mdwn
index 98d8b3dda..76e57bc69 100644
--- a/doc/design/external_special_remote_protocol.mdwn
+++ b/doc/design/external_special_remote_protocol.mdwn
@@ -343,6 +343,26 @@ quite a long time, especially when the git-annex assistant is using it.
The assistant will detect when the system connects to a network, and will
start a new process the next time it needs to use a remote.
+## readonly mode
+
+Some storage services allow downloading the content of a file using a
+regular http connection, with no authentication. An external special remote
+for such a storage service can support a readonly mode of operation.
+
+It works like this:
+
+* When a key's content is stored on the remote, use SETURLPRESENT to
+ tell git-annex the public url from which it can be downloaded.
+* When a key's content is removed from the remote, use SETURLMISSING.
+* Document that this external special remote can be used in readonly mode.
+
+ The user doesn't even need to install your external special remote
+ program to use such a remote! All they need to do is run:
+ `git annex enableremote $remotename readonly=true`
+
+* The readonly=true parameter makes git-annex download content from the
+ urls recorded earlier by SETURLPRESENT.
+
## TODO
* When storing encrypted files stream the file up/down the pipe, rather
diff --git a/git-annex.cabal b/git-annex.cabal
index 5431d6ddc..8903839bb 100644
--- a/git-annex.cabal
+++ b/git-annex.cabal
@@ -152,8 +152,13 @@ Executable git-annex
else
Build-Depends: cryptohash (>= 0.11.0)
+ -- Fully optimize for production.
+ -- Parallel builds only when not building for production,
+ -- because ghc is known to not yield reproducible builds this way.
if flag(Production)
- GHC-Options: -O2
+ GHC-Options: -O2 -j1
+ else
+ GHC-Options: -j
if (os(windows))
Build-Depends: Win32, Win32-extras, unix-compat (>= 0.4.1.3), setenv