packages feed

hackage-security 0.5.0.0 → 0.5.0.1

raw patch · 6 files changed

+50/−19 lines, 6 filesdep ~bytestringdep ~directorydep ~tar

Dependency ranges changed: bytestring, directory, tar, time, transformers

Files

ChangeLog.md view
@@ -1,3 +1,7 @@+0.5.0.1+-------+* Relaxed dependency bounds+ 0.5.0.0 ------- * Treat deserialization errors as verification errors (#108, #75)
hackage-security.cabal view
@@ -1,5 +1,5 @@ name:                hackage-security-version:             0.5.0.0+version:             0.5.0.1 synopsis:            Hackage security library description:         The hackage security library provides both server and                      client utilities for securing the Hackage package server@@ -94,16 +94,12 @@   -- We support ghc 7.4 (bundled with Cabal 1.14) and up   build-depends:       base              >= 4.5     && < 5,                        base64-bytestring >= 1.0     && < 1.1,-                       -- we need Data.ByteString.Builder to build tar indices,-                       -- which is only available from bytestring-0.10.2 and up-                       -- TODO: We should probably fix that upstream (in tar)-                       -- so that we can compile with the version of bytestring-                       -- that comes with ghc for ghc < 7.8-                       bytestring        >= 0.10.2  && < 0.11,+                       -- When we call 'serialize' from the 'tar' package on+                       -- a 'TarIndex', we get a 'Builder', so we need >= 0.10+                       bytestring        >= 0.10    && < 0.11,                        Cabal             >= 1.14    && < 1.25,                        containers        >= 0.4     && < 0.6,-                       -- directory 1.2.2.0 introduced makeAbsolute-                       directory         >= 1.2.2.0 && < 1.3,+                       directory         >= 1.2.0.1 && < 1.3,                        ed25519           >= 0.0     && < 0.1,                        filepath          >= 1.2     && < 1.5,                        mtl               >= 2.2     && < 2.3,@@ -112,9 +108,10 @@                        -- version 0.4.2 of tar introduces TarIndex                        -- version 0.4.2.2 contains a crucial bugfix                        -- version 0.4.4 introduces some more Index functionality-                       tar               >= 0.4.4   && < 0.5,-                       time              >= 1.2     && < 1.6,-                       transformers      >= 0.4     && < 0.5,+                       -- versions 0.4.3 and 0.4.4 were blacklisted+                       tar               >= 0.4.5   && < 0.5,+                       time              >= 1.2     && < 1.7,+                       transformers      >= 0.4     && < 0.6,                        zlib              >= 0.5     && < 0.7,                        -- whatever versions are bundled with ghc:                        template-haskell,@@ -144,9 +141,15 @@                        CPP                        OverlappingInstances                        PackageImports-                       QuasiQuotes-                       TemplateHaskell                        UndecidableInstances+  -- use the new stage1/cross-compile-friendly Quotes subset of TH for new GHCs+  if impl(ghc >= 800)+    -- place holder until Hackage allows to edit in the new extension token+    -- other-extensions: TemplateHaskellQuotes+    other-extensions:+  else+    other-extensions: TemplateHaskell+   ghc-options:         -Wall    if flag(base48)
src/Hackage/Security/Client/Repository/Cache.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE BangPatterns #-}+{-# LANGUAGE CPP #-} -- | The files we cache from the repository -- -- Both the Local and the Remote repositories make use of this module.@@ -22,8 +23,13 @@ import qualified Codec.Archive.Tar       as Tar import qualified Codec.Archive.Tar.Index as TarIndex import qualified Codec.Compression.GZip  as GZip-import qualified Data.ByteString.Builder as BS.Builder import qualified Data.ByteString.Lazy    as BS.L++#if MIN_VERSION_bytestring(0,10,2)+import Data.ByteString.Builder      as BS.Builder+#else+import Data.ByteString.Lazy.Builder as BS.Builder+#endif  import Hackage.Security.Client.Repository import Hackage.Security.Client.Formats
src/Hackage/Security/TUF/Patterns.hs view
@@ -2,7 +2,12 @@ -- -- NOTE: This module was developed to prepare for proper delegation (#39). -- It is currently unusued.+{-# LANGUAGE CPP #-}+#if __GLASGOW_HASKELL__ >= 800+{-# LANGUAGE TemplateHaskellQuotes #-}+#else {-# LANGUAGE TemplateHaskell #-}+#endif module Hackage.Security.TUF.Patterns (     -- * Patterns and replacements     FileName@@ -21,7 +26,7 @@   ) where  import Control.Monad.Except-import Language.Haskell.TH+import Language.Haskell.TH (Q, Exp) import System.FilePath import qualified Language.Haskell.TH.Syntax as TH 
src/Hackage/Security/Util/Checked.hs view
@@ -40,8 +40,8 @@ type role Throws representational #endif -unthrow :: proxy e -> (Throws e => a) -> a-unthrow _ = unWrap . coerceWrap . Wrap+unthrow :: forall a e proxy . proxy e -> (Throws e => a) -> a+unthrow _ x = unWrap (coerceWrap (Wrap x :: Wrap e a))  {-------------------------------------------------------------------------------   Base exceptions
src/Hackage/Security/Util/Path.hs view
@@ -7,6 +7,7 @@ -- -- Note that his module does not import any other modules from Hackage.Security; -- everywhere else we use Path instead of FilePath directly.+{-# LANGUAGE CPP #-} module Hackage.Security.Util.Path (     -- * Paths     Path(..)@@ -200,7 +201,19 @@   toAbsoluteFilePath :: Path root -> IO FilePath  instance FsRoot Relative where-    toAbsoluteFilePath (Path fp) = Dir.makeAbsolute fp+    toAbsoluteFilePath (Path fp) = go fp+      where+        go :: FilePath -> IO FilePath+#if MIN_VERSION_directory(1,2,2)+        go = Dir.makeAbsolute+#else+        -- copied implementation from the directory package+        go = (FP.normalise <$>) . absolutize+        absolutize path -- avoid the call to `getCurrentDirectory` if we can+          | FP.isRelative path = (FP.</> path) . FP.addTrailingPathSeparator <$>+                                 Dir.getCurrentDirectory+          | otherwise          = return path+#endif  instance FsRoot Absolute where     toAbsoluteFilePath (Path fp) = return fp