summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-10-12 13:15:52 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-10-12 13:15:52 -0400
commit1b474f3cb9cdf14817efa0aa36062c89fda0e59b (patch)
tree559f06afe6d450a801388796af41930fd33d6e03
parent5aa11ba1c0e640c52a35405055d8f61ec7af7da3 (diff)
S3: Fix embedcreds=yes handling for the Internet Archive.
Before, embedcreds=yes did not cause the creds to be stored in remote.log, but also prevented them being locally cached.
-rw-r--r--Remote/S3.hs6
-rw-r--r--debian/changelog1
2 files changed, 4 insertions, 3 deletions
diff --git a/Remote/S3.hs b/Remote/S3.hs
index 90eb8c691..4fc13f390 100644
--- a/Remote/S3.hs
+++ b/Remote/S3.hs
@@ -104,19 +104,19 @@ s3Setup' u mcreds c = if isIA c then archiveorg else defaulthost
archiveorg = do
showNote "Internet Archive mode"
- void $ setRemoteCredPair noEncryptionUsed c (AWS.creds u) mcreds
+ c' <- setRemoteCredPair noEncryptionUsed c (AWS.creds u) mcreds
-- Ensure user enters a valid bucket name, since
-- this determines the name of the archive.org item.
let bucket = replace " " "-" $ map toLower $
fromMaybe (error "specify bucket=") $
- getBucket c
+ getBucket c'
let archiveconfig =
-- hS3 does not pass through x-archive-* headers
M.mapKeys (replace "x-archive-" "x-amz-") $
-- encryption does not make sense here
M.insert "encryption" "none" $
M.insert "bucket" bucket $
- M.union c $
+ M.union c' $
-- special constraints on key names
M.insert "mungekeys" "ia" $
-- bucket created only when files are uploaded
diff --git a/debian/changelog b/debian/changelog
index 75c8303ee..fb22c4036 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ git-annex (5.20140928) UNRELEASED; urgency=medium
* Adjust cabal file to support building w/o assistant on the hurd.
* Support building with yesod 1.4.
+ * S3: Fix embedcreds=yes handling for the Internet Archive.
-- Joey Hess <joeyh@debian.org> Mon, 29 Sep 2014 14:07:51 -0400