avoid hard dependency on new version of aws

This commit is contained in:
Joey Hess 2015-09-22 11:03:44 -04:00
parent 26d6566307
commit 20205b6073
4 changed files with 10 additions and 6 deletions

View file

@ -76,7 +76,9 @@ s3InputAForm defcreds = AWSInput
storageclasses :: [(Text, StorageClass)]
storageclasses =
[ ("Standard redundancy", StandardRedundancy)
#if MIN_VERSION_aws(0,13,0)
, ("Infrequent access (cheaper for backups and archives)", StandardInfrequentAccess)
#endif
, ("Reduced redundancy (costs less)", ReducedRedundancy)
]

View file

@ -499,8 +499,11 @@ getBucketName = map toLower <$$> M.lookup "bucket"
getStorageClass :: RemoteConfig -> S3.StorageClass
getStorageClass c = case M.lookup "storageclass" c of
Just "REDUCED_REDUNDANCY" -> S3.ReducedRedundancy
#if MIN_VERSION_aws(0,13,0)
Just s -> S3.OtherStorageClass (T.pack s)
Nothing -> S3.Standard
#endif
_ -> S3.Standard
getPartSize :: RemoteConfig -> Maybe Integer
getPartSize c = readSize dataUnits =<< M.lookup "partsize" c

7
debian/changelog vendored
View file

@ -2,10 +2,9 @@ git-annex (5.20150917) UNRELEASED; urgency=medium
* info: Don't allow use in a non-git-annex repository, since it
uses the git-annex branch and would create it if it were missing.
* S3: Added support for storageclass=STANDARD_IA to use Amazon's
new Infrequently Accessed storage.
(Needs aws-0.13.0.)
* S3: Use aws-0.13.0, which allows using storageclass=NEARLINE
* S3: When built with aws-0.13.0, supports using more storage classes.
In particular, storageclass=STANDARD_IA to use Amazon's
new Infrequently Accessed storage, and storageclass=NEARLINE
to use Google's NearLine storage.
-- Joey Hess <id@joeyh.name> Wed, 16 Sep 2015 12:23:33 -0400

View file

@ -178,7 +178,7 @@ Executable git-annex
Build-Depends: regex-compat
if flag(S3)
Build-Depends: conduit, conduit-extra, aws (>= 0.13.0), http-client
Build-Depends: conduit, conduit-extra, aws (>= 0.9.2), http-client
CPP-Options: -DWITH_S3
if flag(WebDAV)