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.
This commit is contained in:
parent
cac0e4094c
commit
ef3804bdb3
2 changed files with 4 additions and 3 deletions
|
@ -104,19 +104,19 @@ s3Setup' u mcreds c = if isIA c then archiveorg else defaulthost
|
||||||
|
|
||||||
archiveorg = do
|
archiveorg = do
|
||||||
showNote "Internet Archive mode"
|
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
|
-- Ensure user enters a valid bucket name, since
|
||||||
-- this determines the name of the archive.org item.
|
-- this determines the name of the archive.org item.
|
||||||
let bucket = replace " " "-" $ map toLower $
|
let bucket = replace " " "-" $ map toLower $
|
||||||
fromMaybe (error "specify bucket=") $
|
fromMaybe (error "specify bucket=") $
|
||||||
getBucket c
|
getBucket c'
|
||||||
let archiveconfig =
|
let archiveconfig =
|
||||||
-- hS3 does not pass through x-archive-* headers
|
-- hS3 does not pass through x-archive-* headers
|
||||||
M.mapKeys (replace "x-archive-" "x-amz-") $
|
M.mapKeys (replace "x-archive-" "x-amz-") $
|
||||||
-- encryption does not make sense here
|
-- encryption does not make sense here
|
||||||
M.insert "encryption" "none" $
|
M.insert "encryption" "none" $
|
||||||
M.insert "bucket" bucket $
|
M.insert "bucket" bucket $
|
||||||
M.union c $
|
M.union c' $
|
||||||
-- special constraints on key names
|
-- special constraints on key names
|
||||||
M.insert "mungekeys" "ia" $
|
M.insert "mungekeys" "ia" $
|
||||||
-- bucket created only when files are uploaded
|
-- bucket created only when files are uploaded
|
||||||
|
|
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -2,6 +2,7 @@ git-annex (5.20140928) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
* Adjust cabal file to support building w/o assistant on the hurd.
|
* Adjust cabal file to support building w/o assistant on the hurd.
|
||||||
* Support building with yesod 1.4.
|
* 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
|
-- Joey Hess <joeyh@debian.org> Mon, 29 Sep 2014 14:07:51 -0400
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue