Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-aws for openSUSE:Factory checked 
in at 2023-04-04 21:18:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-aws (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-aws.new.19717 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-aws"

Tue Apr  4 21:18:32 2023 rev:7 rq:1075772 version:0.23

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-aws/ghc-aws.changes  2022-02-11 
23:10:30.479136597 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-aws.new.19717/ghc-aws.changes       
2023-04-04 21:18:35.856493107 +0200
@@ -1,0 +2,14 @@
+Thu Mar 30 17:05:52 UTC 2023 - Peter Simons <[email protected]>
+
+- Updated spec file to conform with ghc-rpm-macros-2.5.2.
+
+-------------------------------------------------------------------
+Fri Nov  4 19:21:02 UTC 2022 - Peter Simons <[email protected]>
+
+- Update aws to version 0.23.
+  Upstream has edited the change log file since the last release in
+  a non-trivial way, i.e. they did more than just add a new entry
+  at the top. You can review the file at:
+  http://hackage.haskell.org/package/aws-0.23/src/CHANGELOG.md
+
+-------------------------------------------------------------------

Old:
----
  aws-0.22.tar.gz
  aws.cabal

New:
----
  aws-0.23.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-aws.spec ++++++
--- /var/tmp/diff_new_pack.edbjmL/_old  2023-04-04 21:18:36.740498744 +0200
+++ /var/tmp/diff_new_pack.edbjmL/_new  2023-04-04 21:18:36.744498769 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-aws
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,65 +17,113 @@
 
 
 %global pkg_name aws
+%global pkgver %{pkg_name}-%{version}
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.22
+Version:        0.23
 Release:        0
 Summary:        Amazon Web Services (AWS) for Haskell
 License:        BSD-3-Clause
 URL:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
-Source1:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/3.cabal#/%{pkg_name}.cabal
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-aeson-devel
+BuildRequires:  ghc-aeson-prof
 BuildRequires:  ghc-attoparsec-devel
+BuildRequires:  ghc-attoparsec-prof
+BuildRequires:  ghc-base-devel
+BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-base16-bytestring-devel
+BuildRequires:  ghc-base16-bytestring-prof
 BuildRequires:  ghc-base64-bytestring-devel
+BuildRequires:  ghc-base64-bytestring-prof
 BuildRequires:  ghc-blaze-builder-devel
+BuildRequires:  ghc-blaze-builder-prof
 BuildRequires:  ghc-byteable-devel
+BuildRequires:  ghc-byteable-prof
 BuildRequires:  ghc-bytestring-devel
+BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-case-insensitive-devel
+BuildRequires:  ghc-case-insensitive-prof
 BuildRequires:  ghc-cereal-devel
+BuildRequires:  ghc-cereal-prof
 BuildRequires:  ghc-conduit-devel
 BuildRequires:  ghc-conduit-extra-devel
+BuildRequires:  ghc-conduit-extra-prof
+BuildRequires:  ghc-conduit-prof
 BuildRequires:  ghc-containers-devel
+BuildRequires:  ghc-containers-prof
 BuildRequires:  ghc-cryptonite-devel
+BuildRequires:  ghc-cryptonite-prof
 BuildRequires:  ghc-data-default-devel
+BuildRequires:  ghc-data-default-prof
 BuildRequires:  ghc-directory-devel
+BuildRequires:  ghc-directory-prof
 BuildRequires:  ghc-exceptions-devel
+BuildRequires:  ghc-exceptions-prof
 BuildRequires:  ghc-filepath-devel
+BuildRequires:  ghc-filepath-prof
 BuildRequires:  ghc-http-client-tls-devel
+BuildRequires:  ghc-http-client-tls-prof
 BuildRequires:  ghc-http-conduit-devel
+BuildRequires:  ghc-http-conduit-prof
 BuildRequires:  ghc-http-types-devel
+BuildRequires:  ghc-http-types-prof
 BuildRequires:  ghc-lifted-base-devel
+BuildRequires:  ghc-lifted-base-prof
 BuildRequires:  ghc-memory-devel
+BuildRequires:  ghc-memory-prof
 BuildRequires:  ghc-monad-control-devel
+BuildRequires:  ghc-monad-control-prof
 BuildRequires:  ghc-mtl-devel
+BuildRequires:  ghc-mtl-prof
 BuildRequires:  ghc-network-bsd-devel
+BuildRequires:  ghc-network-bsd-prof
 BuildRequires:  ghc-network-devel
+BuildRequires:  ghc-network-prof
 BuildRequires:  ghc-old-locale-devel
+BuildRequires:  ghc-old-locale-prof
 BuildRequires:  ghc-resourcet-devel
+BuildRequires:  ghc-resourcet-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-safe-devel
+BuildRequires:  ghc-safe-prof
 BuildRequires:  ghc-scientific-devel
+BuildRequires:  ghc-scientific-prof
 BuildRequires:  ghc-tagged-devel
+BuildRequires:  ghc-tagged-prof
 BuildRequires:  ghc-text-devel
+BuildRequires:  ghc-text-prof
 BuildRequires:  ghc-time-devel
+BuildRequires:  ghc-time-prof
 BuildRequires:  ghc-transformers-devel
+BuildRequires:  ghc-transformers-prof
 BuildRequires:  ghc-unordered-containers-devel
+BuildRequires:  ghc-unordered-containers-prof
 BuildRequires:  ghc-utf8-string-devel
+BuildRequires:  ghc-utf8-string-prof
 BuildRequires:  ghc-vector-devel
+BuildRequires:  ghc-vector-prof
 BuildRequires:  ghc-xml-conduit-devel
+BuildRequires:  ghc-xml-conduit-prof
 ExcludeArch:    %{ix86}
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
+BuildRequires:  ghc-QuickCheck-prof
 BuildRequires:  ghc-errors-devel
+BuildRequires:  ghc-errors-prof
 BuildRequires:  ghc-http-client-devel
+BuildRequires:  ghc-http-client-prof
 BuildRequires:  ghc-quickcheck-instances-devel
+BuildRequires:  ghc-quickcheck-instances-prof
 BuildRequires:  ghc-tasty-devel
 BuildRequires:  ghc-tasty-hunit-devel
+BuildRequires:  ghc-tasty-hunit-prof
+BuildRequires:  ghc-tasty-prof
 BuildRequires:  ghc-tasty-quickcheck-devel
+BuildRequires:  ghc-tasty-quickcheck-prof
 BuildRequires:  ghc-transformers-base-devel
+BuildRequires:  ghc-transformers-base-prof
 %endif
 
 %description
@@ -93,9 +141,24 @@
 %description devel
 This package provides the Haskell %{pkg_name} library development files.
 
+%package -n ghc-%{pkg_name}-doc
+Summary:        Haskell %{pkg_name} library documentation
+Requires:       ghc-filesystem
+BuildArch:      noarch
+
+%description -n ghc-%{pkg_name}-doc
+This package provides the Haskell %{pkg_name} library documentation.
+
+%package -n ghc-%{pkg_name}-prof
+Summary:        Haskell %{pkg_name} profiling library
+Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
+Supplements:    (ghc-%{pkg_name}-devel and ghc-prof)
+
+%description -n ghc-%{pkg_name}-prof
+This package provides the Haskell %{pkg_name} profiling library.
+
 %prep
 %autosetup -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
 
 %build
 %ghc_lib_build
@@ -118,4 +181,9 @@
 %files devel -f %{name}-devel.files
 %doc CHANGELOG.md README.md
 
+%files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
+%license LICENSE
+
+%files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+
 %changelog

++++++ aws-0.22.tar.gz -> aws-0.23.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-0.22/Aws/Core.hs new/aws-0.23/Aws/Core.hs
--- old/aws-0.22/Aws/Core.hs    2001-09-09 03:46:40.000000000 +0200
+++ new/aws-0.23/Aws/Core.hs    2001-09-09 03:46:40.000000000 +0200
@@ -84,6 +84,7 @@
 , loadCredentialsFromEnvOrFile
 , loadCredentialsFromEnvOrFileOrInstanceMetadata
 , loadCredentialsDefault
+, anonymousCredentials
   -- * Service configuration
 , DefaultServiceConfiguration(..)
   -- * HTTP types
@@ -262,9 +263,11 @@
       , v4SigningKeys :: IORef [V4Key]
         -- | Signed IAM token
       , iamToken :: Maybe B.ByteString
+        -- | Set when the credentials are intended for anonymous access.
+      , isAnonymousCredentials :: Bool
       }
 instance Show Credentials where
-    show c = "Credentials{accessKeyID=" ++ show (accessKeyID c) ++ 
",secretAccessKey=" ++ show (secretAccessKey c) ++ ",iamToken=" ++ show 
(iamToken c) ++ "}"
+    show c@(Credentials {}) = "Credentials{accessKeyID=" ++ show (accessKeyID 
c) ++ ",secretAccessKey=" ++ show (secretAccessKey c) ++ ",iamToken=" ++ show 
(iamToken c) ++ "}"
 
 makeCredentials :: MonadIO io
                 => B.ByteString -- ^ AWS Access Key ID
@@ -273,6 +276,7 @@
 makeCredentials accessKeyID secretAccessKey = liftIO $ do
     v4SigningKeys <- newIORef []
     let iamToken = Nothing
+    let isAnonymousCredentials = False
     return Credentials { .. }
 
 -- | The file where access credentials are loaded, when using 
'loadCredentialsDefault'.
@@ -350,7 +354,8 @@
               return (Credentials <$> (T.encodeUtf8 . T.pack <$> keyID)
                                   <*> (T.encodeUtf8 . T.pack <$> secret)
                                   <*> return ref
-                                  <*> (Just . T.encodeUtf8 . T.pack <$> token))
+                                  <*> (Just . T.encodeUtf8 . T.pack <$> token)
+                                  <*> return False)
           Nothing -> return Nothing
 
 -- | Load credentials from environment variables if possible, or alternatively 
from a file with a given key name.
@@ -394,6 +399,13 @@
       Just file -> loadCredentialsFromEnvOrFileOrInstanceMetadata file 
credentialsDefaultKey
       Nothing   -> loadCredentialsFromEnv
 
+-- | Make a dummy Credentials that can be used to access some AWS services
+-- anonymously.
+anonymousCredentials :: MonadIO io => io Credentials
+anonymousCredentials = do
+  cr <- makeCredentials mempty mempty
+  return (cr { isAnonymousCredentials = True })
+
 -- | Protocols supported by AWS. Currently, all AWS services use the HTTP or 
HTTPS protocols.
 data Protocol
     = HTTP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-0.22/Aws/DynamoDb/Commands/Table.hs 
new/aws-0.23/Aws/DynamoDb/Commands/Table.hs
--- old/aws-0.22/Aws/DynamoDb/Commands/Table.hs 2001-09-09 03:46:40.000000000 
+0200
+++ new/aws-0.23/Aws/DynamoDb/Commands/Table.hs 2001-09-09 03:46:40.000000000 
+0200
@@ -35,9 +35,9 @@
 import           Control.Applicative
 import           Data.Aeson            ((.!=), (.:), (.:?), (.=))
 import qualified Data.Aeson            as A
+import qualified Data.Aeson.KeyMap     as KM
 import qualified Data.Aeson.Types      as A
 import           Data.Char             (toUpper)
-import qualified Data.HashMap.Strict   as M
 import           Data.Scientific       (Scientific)
 import qualified Data.Text             as T
 import           Data.Time
@@ -281,7 +281,7 @@
 
 instance A.FromJSON TableDescription where
     parseJSON = A.withObject "Table must be an object" $ \o -> do
-        t <- case (M.lookup "Table" o, M.lookup "TableDescription" o) of
+        t <- case (KM.lookup "Table" o, KM.lookup "TableDescription" o) of
                 (Just (A.Object t), _) -> return t
                 (_, Just (A.Object t)) -> return t
                 _ -> fail "Table description must have key 'Table' or 
'TableDescription'"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-0.22/Aws/DynamoDb/Commands/UpdateItem.hs 
new/aws-0.23/Aws/DynamoDb/Commands/UpdateItem.hs
--- old/aws-0.22/Aws/DynamoDb/Commands/UpdateItem.hs    2001-09-09 
03:46:40.000000000 +0200
+++ new/aws-0.23/Aws/DynamoDb/Commands/UpdateItem.hs    2001-09-09 
03:46:40.000000000 +0200
@@ -31,6 +31,7 @@
 -------------------------------------------------------------------------------
 import           Control.Applicative
 import           Data.Aeson
+import qualified Data.Aeson.Key      as AK
 import           Data.Default
 import qualified Data.Text           as T
 import           Prelude
@@ -91,9 +92,9 @@
     toJSON = object . map mk . getAttributeUpdates
         where
           mk AttributeUpdate { auAction = UDelete, auAttr = auAttr } =
-            (attrName auAttr) .= object
+            (AK.fromText (attrName auAttr)) .= object
             ["Action" .= UDelete]
-          mk AttributeUpdate { .. } = (attrName auAttr) .= object
+          mk AttributeUpdate { .. } = AK.fromText (attrName auAttr) .= object
             ["Value" .= (attrVal auAttr), "Action" .= auAction]
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-0.22/Aws/DynamoDb/Core.hs 
new/aws-0.23/Aws/DynamoDb/Core.hs
--- old/aws-0.22/Aws/DynamoDb/Core.hs   2001-09-09 03:46:40.000000000 +0200
+++ new/aws-0.23/Aws/DynamoDb/Core.hs   2001-09-09 03:46:40.000000000 +0200
@@ -128,6 +128,8 @@
 import qualified Crypto.Hash                  as CH
 import           Data.Aeson
 import qualified Data.Aeson                   as A
+import qualified Data.Aeson.Key               as AK
+import qualified Data.Aeson.KeyMap            as KM
 import           Data.Aeson.Types             (Pair, parseEither)
 import qualified Data.Aeson.Types             as A
 import qualified Data.Attoparsec.ByteString   as AttoB (endOfInput)
@@ -141,7 +143,6 @@
 import           Data.Conduit.Attoparsec      (sinkParser)
 import           Data.Default
 import           Data.Function                (on)
-import qualified Data.HashMap.Strict          as HM
 import           Data.Int
 import           Data.IORef
 import           Data.List
@@ -536,7 +537,7 @@
     toJSON (PrimaryKey h (Just r)) =
       let Object p1 = toJSON h
           Object p2 = toJSON r
-      in Object (p1 `HM.union` p2)
+      in Object (p1 `KM.union` p2)
 
 instance FromJSON PrimaryKey where
     parseJSON p = do
@@ -544,8 +545,8 @@
        case length l of
           1 -> return $ head l 
           _ -> fail "Unable to parse PrimaryKey"     
-      where listPKey p'= map (\(txt,dval)-> hk txt dval)
-                          . HM.toList <$> parseJSON p'
+      where listPKey p'= map (\(k,dval)-> hk (AK.toText k) dval)
+                          . KM.toList <$> parseJSON p'
 
 
 -- | A key-value pair
@@ -661,9 +662,9 @@
 -------------------------------------------------------------------------------
 -- | Parse a JSON object that contains attributes
 parseAttributeJson :: Value -> A.Parser [Attribute]
-parseAttributeJson (Object v) = mapM conv $ HM.toList v
+parseAttributeJson (Object v) = mapM conv $ KM.toList v
     where
-      conv (k, o) = Attribute k <$> parseJSON o
+      conv (k, o) = Attribute (AK.toText k) <$> parseJSON o
 parseAttributeJson _ = error "Attribute JSON must be an Object"
 
 
@@ -674,7 +675,7 @@
 
 -- | Convert into JSON pair
 attributeJson :: Attribute -> Pair
-attributeJson (Attribute nm v) = nm .= v
+attributeJson (Attribute nm v) = AK.fromText nm .= v
 
 
 -------------------------------------------------------------------------------
@@ -962,7 +963,7 @@
     where
       a = if null es
           then []
-          else [key .= object (map conditionJson es)]
+          else [AK.fromText key .= object (map conditionJson es)]
 
       b = if length (take 2 es) > 1
           then ["ConditionalOperator" .= String (rendCondOp op) ]
@@ -1046,7 +1047,7 @@
 
 
 conditionJson :: Condition -> Pair
-conditionJson Condition{..} = condAttr .= condOp
+conditionJson Condition{..} = AK.fromText condAttr .= condOp
 
 
 instance ToJSON CondOp where
@@ -1076,12 +1077,12 @@
 
 
 instance FromJSON ConsumedCapacity where
-    parseJSON (Object v) = ConsumedCapacity
-      <$> v .: "CapacityUnits"
-      <*> (HM.toList <$> v .:? "GlobalSecondaryIndexes" .!= mempty)
-      <*> (HM.toList <$> v .:? "LocalSecondaryIndexes" .!= mempty)
-      <*> (v .:? "Table" >>= maybe (return Nothing) (.: "CapacityUnits"))
-      <*> v .: "TableName"
+    parseJSON (Object o) = ConsumedCapacity
+      <$> o .: "CapacityUnits"
+      <*> (map (\(k, v) -> (AK.toText k, v)) . KM.toList <$> o .:? 
"GlobalSecondaryIndexes" .!= mempty)
+      <*> (map (\(k, v) -> (AK.toText k, v)) . KM.toList <$> o .:? 
"LocalSecondaryIndexes" .!= mempty)
+      <*> (o .:? "Table" >>= maybe (return Nothing) (.: "CapacityUnits"))
+      <*> o .: "TableName"
     parseJSON _ = fail "ConsumedCapacity must be an Object."
 
 
@@ -1115,10 +1116,10 @@
 
 
 instance FromJSON ItemCollectionMetrics where
-    parseJSON (Object v) = ItemCollectionMetrics
-      <$> (do m <- v .: "ItemCollectionKey"
-              return $ head $ HM.toList m)
-      <*> v .: "SizeEstimateRangeGB"
+    parseJSON (Object o) = ItemCollectionMetrics
+      <$> (do m <- o .: "ItemCollectionKey"
+              return $ (\(k, v) -> (AK.toText k, v)) $ head $ KM.toList m)
+      <*> o .: "SizeEstimateRangeGB"
     parseJSON _ = fail "ItemCollectionMetrics must be an Object."
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-0.22/Aws/Iam/Internal.hs 
new/aws-0.23/Aws/Iam/Internal.hs
--- old/aws-0.22/Aws/Iam/Internal.hs    2001-09-09 03:46:40.000000000 +0200
+++ new/aws-0.23/Aws/Iam/Internal.hs    2001-09-09 03:46:40.000000000 +0200
@@ -19,7 +19,7 @@
 import           Control.Monad.Trans.Resource (MonadThrow)
 import           Data.ByteString     (ByteString)
 import           Data.Maybe
-import           Data.Monoid         ((<>))
+import           Data.Monoid
 import           Prelude
 import           Data.Text           (Text)
 import qualified Data.Text           as Text
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-0.22/Aws/S3/Commands/DeleteObjects.hs 
new/aws-0.23/Aws/S3/Commands/DeleteObjects.hs
--- old/aws-0.22/Aws/S3/Commands/DeleteObjects.hs       2001-09-09 
03:46:40.000000000 +0200
+++ new/aws-0.23/Aws/S3/Commands/DeleteObjects.hs       2001-09-09 
03:46:40.000000000 +0200
@@ -14,7 +14,8 @@
 import           Text.XML.Cursor      (($/), (&|))
 import qualified Data.ByteString.Char8 as B
 import           Data.ByteString.Char8 ({- IsString -})
-import           Control.Applicative     ((<$>))
+import           Control.Applicative
+import           Prelude
 
 data DeleteObjects
     = DeleteObjects {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-0.22/Aws/S3/Commands/GetObject.hs 
new/aws-0.23/Aws/S3/Commands/GetObject.hs
--- old/aws-0.22/Aws/S3/Commands/GetObject.hs   2001-09-09 03:46:40.000000000 
+0200
+++ new/aws-0.23/Aws/S3/Commands/GetObject.hs   2001-09-09 03:46:40.000000000 
+0200
@@ -83,7 +83,7 @@
 
 instance ResponseConsumer GetObject GetObjectResponse where
     type ResponseMetadata GetObjectResponse = S3Metadata
-    responseConsumer httpReq GetObject{..} metadata resp
+    responseConsumer httpReq GetObject{} metadata resp
         | status == HTTP.status200 = do
             rsp <- s3BinaryResponseConsumer return metadata resp
             om <- parseObjectMetadata (HTTP.responseHeaders resp)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-0.22/Aws/S3/Commands/HeadObject.hs 
new/aws-0.23/Aws/S3/Commands/HeadObject.hs
--- old/aws-0.22/Aws/S3/Commands/HeadObject.hs  2001-09-09 03:46:40.000000000 
+0200
+++ new/aws-0.23/Aws/S3/Commands/HeadObject.hs  2001-09-09 03:46:40.000000000 
+0200
@@ -60,7 +60,7 @@
 
 instance ResponseConsumer HeadObject HeadObjectResponse where
     type ResponseMetadata HeadObjectResponse = S3Metadata
-    responseConsumer httpReq HeadObject{..} _ resp
+    responseConsumer httpReq HeadObject{} _ resp
         | status == HTTP.status200 = HeadObjectResponse . Just <$> 
parseObjectMetadata headers
         | status == HTTP.status404 = return $ HeadObjectResponse Nothing
         | otherwise = throwStatusCodeException httpReq resp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-0.22/Aws/S3/Core.hs new/aws-0.23/Aws/S3/Core.hs
--- old/aws-0.22/Aws/S3/Core.hs 2001-09-09 03:46:40.000000000 +0200
+++ new/aws-0.23/Aws/S3/Core.hs 2001-09-09 03:46:40.000000000 +0200
@@ -9,7 +9,7 @@
 import           Data.Char                      (isAscii, isAlphaNum, toUpper, 
ord)
 import           Data.Conduit                   ((.|))
 import           Data.Function
-import           Data.Functor                   ((<$>))
+import           Data.Functor
 import           Data.IORef
 import           Data.List
 import           Data.Maybe
@@ -230,7 +230,12 @@
       , sqStringToSign = stringToSign
       }
     where
-      amzHeaders = merge $ sortBy (compare `on` fst) (s3QAmzHeaders ++ (fmap 
(\(k, v) -> (CI.mk k, v)) iamTok))
+      -- This also implements anonymous queries.
+      isanon = isAnonymousCredentials signatureCredentials 
+      amzHeaders = merge $ sortBy (compare `on` fst) $ s3QAmzHeaders ++ 
+        if isanon 
+          then []
+          else fmap (\(k, v) -> (CI.mk k, v)) iamTok
           where merge (x1@(k1,v1):x2@(k2,v2):xs) | k1 == k2  = merge ((k1, 
B8.intercalate "," [v1, v2]) : xs)
                                                  | otherwise = x1 : merge (x2 
: xs)
                 merge xs = xs
@@ -278,30 +283,36 @@
                        ]
           where amzHeader (k, v) = Blaze.copyByteString (CI.foldedCase k) 
`mappend` Blaze8.fromChar ':' `mappend` Blaze.copyByteString v
       (authorization, authQuery) = case ti of
-                                 AbsoluteTimestamp _ -> (Just $ return $ 
B.concat ["AWS ", accessKeyID signatureCredentials, ":", sig], [])
+                                 AbsoluteTimestamp _
+                                        | isanon -> (Nothing, [])
+                                        | otherwise -> (Just $ return $ 
B.concat ["AWS ", accessKeyID signatureCredentials, ":", sig], [])
                                  AbsoluteExpires time -> (Nothing, 
HTTP.toQuery $ makeAuthQuery time)
       makeAuthQuery time
-          = [("Expires" :: B8.ByteString, fmtTimeEpochSeconds time)
-            , ("AWSAccessKeyId", accessKeyID signatureCredentials)
-            , ("SignatureMethod", "HmacSHA256")
-            , ("Signature", sig)] ++ iamTok
-s3SignQuery S3Query{..} S3Configuration{ s3SignVersion = S3SignV4 signpayload, 
.. } sd@SignatureData{..}
-    = SignedQuery
-    { sqMethod = s3QMethod
-    , sqProtocol = s3Protocol
-    , sqHost = B.intercalate "." $ catMaybes host
-    , sqPort = s3Port
-    , sqPath = mconcat $ catMaybes path
-    , sqQuery = queryString ++ signatureQuery :: HTTP.Query
-    , sqDate = Just signatureTime
-    , sqAuthorization = authorization
-    , sqContentType = s3QContentType
-    , sqContentMd5 = s3QContentMd5
-    , sqAmzHeaders = Map.toList amzHeaders
-    , sqOtherHeaders = s3QOtherHeaders
-    , sqBody = s3QRequestBody
-    , sqStringToSign = stringToSign
-    }
+        | isanon = []
+        | otherwise = 
+                [ ("Expires" :: B8.ByteString, fmtTimeEpochSeconds time)
+                , ("AWSAccessKeyId", accessKeyID signatureCredentials)
+                , ("SignatureMethod", "HmacSHA256")
+                , ("Signature", sig)] ++ iamTok
+s3SignQuery sq@S3Query{..} sc@S3Configuration{ s3SignVersion = S3SignV4 
signpayload, .. } sd@SignatureData{..}
+    | isAnonymousCredentials signatureCredentials =
+      s3SignQuery sq (sc { s3SignVersion = S3SignV2 }) sd
+    | otherwise = SignedQuery
+      { sqMethod = s3QMethod
+      , sqProtocol = s3Protocol
+      , sqHost = B.intercalate "." $ catMaybes host
+      , sqPort = s3Port
+      , sqPath = mconcat $ catMaybes path
+      , sqQuery = queryString ++ signatureQuery :: HTTP.Query
+      , sqDate = Just signatureTime
+      , sqAuthorization = authorization
+      , sqContentType = s3QContentType
+      , sqContentMd5 = s3QContentMd5
+      , sqAmzHeaders = Map.toList amzHeaders
+      , sqOtherHeaders = s3QOtherHeaders
+      , sqBody = s3QRequestBody
+      , sqStringToSign = stringToSign
+      }
     where
         -- V4 signing
         -- * <http://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aws-0.22/Aws/Ses/Commands/GetIdentityDkimAttributes.hs 
new/aws-0.23/Aws/Ses/Commands/GetIdentityDkimAttributes.hs
--- old/aws-0.22/Aws/Ses/Commands/GetIdentityDkimAttributes.hs  2001-09-09 
03:46:40.000000000 +0200
+++ new/aws-0.23/Aws/Ses/Commands/GetIdentityDkimAttributes.hs  2001-09-09 
03:46:40.000000000 +0200
@@ -4,13 +4,14 @@
     , IdentityDkimAttributes(..)
     ) where
 
-import           Control.Applicative   ((<$>))
 import qualified Data.ByteString.Char8 as BS
 import           Data.Text             (Text)
 import           Data.Text             as T (toCaseFold)
 import           Data.Text.Encoding    as T (encodeUtf8)
 import           Data.Typeable
 import           Text.XML.Cursor       (laxElement, ($/), ($//), (&/), (&|))
+import           Control.Applicative
+import           Prelude
 
 import           Aws.Core
 import           Aws.Ses.Core
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aws-0.22/Aws/Ses/Commands/GetIdentityNotificationAttributes.hs 
new/aws-0.23/Aws/Ses/Commands/GetIdentityNotificationAttributes.hs
--- old/aws-0.22/Aws/Ses/Commands/GetIdentityNotificationAttributes.hs  
2001-09-09 03:46:40.000000000 +0200
+++ new/aws-0.23/Aws/Ses/Commands/GetIdentityNotificationAttributes.hs  
2001-09-09 03:46:40.000000000 +0200
@@ -6,11 +6,12 @@
 
 import Data.Text (Text)
 import qualified Data.ByteString.Char8 as BS
-import Control.Applicative ((<$>))
+import Control.Applicative
 import Data.Text.Encoding as T (encodeUtf8)
 import Data.Text as T (toCaseFold)
 import Data.Typeable
 import Text.XML.Cursor (($//), ($/), (&|), laxElement)
+import Prelude
 
 import Aws.Core
 import Aws.Ses.Core
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aws-0.22/Aws/Ses/Commands/GetIdentityVerificationAttributes.hs 
new/aws-0.23/Aws/Ses/Commands/GetIdentityVerificationAttributes.hs
--- old/aws-0.22/Aws/Ses/Commands/GetIdentityVerificationAttributes.hs  
2001-09-09 03:46:40.000000000 +0200
+++ new/aws-0.23/Aws/Ses/Commands/GetIdentityVerificationAttributes.hs  
2001-09-09 03:46:40.000000000 +0200
@@ -7,10 +7,11 @@
 import Data.Text (Text)
 import qualified Data.ByteString.Char8 as BS
 import Data.Maybe (listToMaybe)
-import Control.Applicative ((<$>))
+import Control.Applicative
 import Data.Text.Encoding as T (encodeUtf8)
 import Data.Typeable
 import Text.XML.Cursor (($//), ($/), (&|), laxElement)
+import Prelude
 
 import Aws.Core
 import Aws.Ses.Core
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-0.22/Aws/Ses/Commands/ListIdentities.hs 
new/aws-0.23/Aws/Ses/Commands/ListIdentities.hs
--- old/aws-0.22/Aws/Ses/Commands/ListIdentities.hs     2001-09-09 
03:46:40.000000000 +0200
+++ new/aws-0.23/Aws/Ses/Commands/ListIdentities.hs     2001-09-09 
03:46:40.000000000 +0200
@@ -7,10 +7,11 @@
 import Data.Text (Text)
 import  qualified Data.ByteString.Char8 as BS
 import Data.Maybe (catMaybes)
-import Control.Applicative ((<$>))
+import Control.Applicative
 import Data.Text.Encoding as T (encodeUtf8)
 import Data.Typeable
 import Text.XML.Cursor (($//), (&/), laxElement)
+import Prelude
 
 import Aws.Core
 import Aws.Ses.Core
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-0.22/Aws/Ses/Commands/SendRawEmail.hs 
new/aws-0.23/Aws/Ses/Commands/SendRawEmail.hs
--- old/aws-0.22/Aws/Ses/Commands/SendRawEmail.hs       2001-09-09 
03:46:40.000000000 +0200
+++ new/aws-0.23/Aws/Ses/Commands/SendRawEmail.hs       2001-09-09 
03:46:40.000000000 +0200
@@ -5,10 +5,11 @@
 
 import Data.Text (Text)
 import Data.Typeable
-import Control.Applicative ((<$>))
+import Control.Applicative
 import qualified Data.ByteString.Char8 as BS
 import Text.XML.Cursor (($//))
 import qualified Data.Text.Encoding as T
+import Prelude
 
 import Aws.Core
 import Aws.Ses.Core
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aws-0.22/Aws/Ses/Commands/SetIdentityNotificationTopic.hs 
new/aws-0.23/Aws/Ses/Commands/SetIdentityNotificationTopic.hs
--- old/aws-0.22/Aws/Ses/Commands/SetIdentityNotificationTopic.hs       
2001-09-09 03:46:40.000000000 +0200
+++ new/aws-0.23/Aws/Ses/Commands/SetIdentityNotificationTopic.hs       
2001-09-09 03:46:40.000000000 +0200
@@ -5,10 +5,11 @@
     ) where
 
 import Data.Text (Text)
-import Control.Applicative ((<$>))
+import Control.Applicative
 import Data.Maybe (maybeToList)
 import Data.Text.Encoding as T (encodeUtf8)
 import Data.Typeable
+import Prelude
 import Aws.Core
 import Aws.Ses.Core
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-0.22/Aws.hs new/aws-0.23/Aws.hs
--- old/aws-0.22/Aws.hs 2001-09-09 03:46:40.000000000 +0200
+++ new/aws-0.23/Aws.hs 2001-09-09 03:46:40.000000000 +0200
@@ -58,6 +58,7 @@
 , loadCredentialsFromEnvOrFile
 , loadCredentialsFromEnvOrFileOrInstanceMetadata
 , loadCredentialsDefault
+, anonymousCredentials
 )
 where
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-0.22/CHANGELOG.md new/aws-0.23/CHANGELOG.md
--- old/aws-0.22/CHANGELOG.md   2001-09-09 03:46:40.000000000 +0200
+++ new/aws-0.23/CHANGELOG.md   2001-09-09 03:46:40.000000000 +0200
@@ -1,6 +1,24 @@
+0.23 series
+-----------
+
+NOTES: 0.23 brings technically breaking changes, which should not affect
+most users. I recommend using smart constructors and {} matching syntax
+whenever possible when interacting with aws types.
+
+-   0.23
+    - Support anonymous access of S3 buckets.a
+    - [breaking change] added isAnonymousCredentials to Credentials.
+    - Support bytestring 0.11
+
 0.22 series
 -----------
 
+-   0.22.1
+    - Update to aeson-2
+    - Support http-client 0.7
+    - Support base64-bytestring 1.2
+    - Support attoparsec 0.14
+    - Support base16-bytestring 1.0
 -   0.22
     - Support GHC 8.8
     - Support network-3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-0.22/README.md new/aws-0.23/README.md
--- old/aws-0.22/README.md      2001-09-09 03:46:40.000000000 +0200
+++ new/aws-0.23/README.md      2001-09-09 03:46:40.000000000 +0200
@@ -136,5 +136,6 @@
   John Wiegley        |[jwiegley](https://github.com/jwiegley)          
|[email protected]            |[FP Complete](http://fpcomplete.com)          
       |Co-Maintainer, S3
   Chris Dornan        |[cdornan](https://github.com/cdornan)            
|[email protected]  |[Iris Connect](http://irisconnect.co.uk)      
       |Core
   John Lenz           |[wuzzeb](https://github/com/wuzzeb)              |      
                          |                                                     
|DynamoDB, Core
+  Joey Hess           |[joeyh](https://github.com/joeyh)                
|[email protected]                   |-                                           
         |Co-Maintainer, S3
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-0.22/aws.cabal new/aws-0.23/aws.cabal
--- old/aws-0.22/aws.cabal      2001-09-09 03:46:40.000000000 +0200
+++ new/aws-0.23/aws.cabal      2001-09-09 03:46:40.000000000 +0200
@@ -1,5 +1,5 @@
 Name:                aws
-Version:             0.22
+Version:             0.23
 Synopsis:            Amazon Web Services (AWS) for Haskell
 Description:         Bindings for Amazon Web Services (AWS), with the aim of 
supporting all AWS services. To see a high level overview of the library, see 
the README at <https://github.com/aristidb/aws/blob/master/README.md>.
 Homepage:            http://github.com/aristidb/aws
@@ -19,7 +19,7 @@
 Source-repository this
   type: git
   location: https://github.com/aristidb/aws.git
-  tag: 0.22
+  tag: 0.23
 
 Source-repository head
   type: git
@@ -128,14 +128,14 @@
                        Aws.Sqs.Core
 
   Build-depends:
-                       aeson                >= 0.6,
-                       attoparsec           >= 0.11    && < 0.14,
+                       aeson                >= 2.0.0.0,
+                       attoparsec           >= 0.11    && < 0.15,
                        base                 >= 4.6     && < 5,
-                       base16-bytestring    == 0.1.*,
-                       base64-bytestring    == 1.0.*,
+                       base16-bytestring    >= 0.1     && < 1.1,
+                       base64-bytestring    >= 1.0     && < 1.3,
                        blaze-builder        >= 0.2.1.4 && < 0.5,
                        byteable             == 0.1.*,
-                       bytestring           >= 0.9     && < 0.11,
+                       bytestring           >= 0.9     && < 0.12,
                        case-insensitive     >= 0.2     && < 1.3,
                        cereal               >= 0.3     && < 0.6,
                        conduit              >= 1.3     && < 1.4,
@@ -396,7 +396,7 @@
         base == 4.*,
         bytestring >= 0.10,
         errors >= 2.0,
-        http-client >= 0.3 && < 0.7,
+        http-client >= 0.3 && < 0.8,
         lifted-base >= 0.2,
         monad-control >= 0.3,
         mtl >= 2.1,
@@ -464,7 +464,7 @@
         lifted-base >= 0.2,
         monad-control >= 0.3,
         mtl >= 2.1,
-        http-client < 0.7,
+        http-client < 0.8,
         http-client-tls < 0.5,
         http-types,
         resourcet,

Reply via email to