hackage-repo-tool 0.1.1.3 → 0.1.1.4
raw patch · 5 files changed
+33/−90 lines, 5 filesdep −old-timedep ~Cabaldep ~Cabal-syntaxdep ~basenew-uploader
Dependencies removed: old-time
Dependency ranges changed: Cabal, Cabal-syntax, base, bytestring, directory, filepath, microlens, network, optparse-applicative, time, unix
Files
- ChangeLog.md +5/−0
- hackage-repo-tool.cabal +26/−42
- src/Hackage/Security/RepoTool/Util/IO.hs +0/−14
- src/Main.hs +2/−7
- src/Prelude.hs +0/−27
ChangeLog.md view
@@ -1,3 +1,8 @@+0.1.1.4+-------+* Drop support for GHC < 8.4.+* Drop flag `use-network-uri` and support for `network-2.5`.+ 0.1.1.3 ------- * Compat release for `Cabal-syntax-3.8.1.0`
hackage-repo-tool.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.12 name: hackage-repo-tool-version: 0.1.1.3+version: 0.1.1.4 build-type: Simple synopsis: Manage secure file-based package repositories@@ -23,9 +23,16 @@ bug-reports: https://github.com/haskell/hackage-security/issues tested-with:- GHC==9.2.1, GHC==9.0.2,- GHC==8.10.7, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2,- GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2+ GHC == 9.10.0+ GHC == 9.8.2+ GHC == 9.6.4+ GHC == 9.4.8+ GHC == 9.2.8+ GHC == 9.0.2+ GHC == 8.10.7+ GHC == 8.8.4+ GHC == 8.6.5+ GHC == 8.4.4 extra-source-files: ChangeLog.md README.md@@ -34,14 +41,6 @@ type: git location: https://github.com/haskell/hackage-security.git -flag use-network-uri- description: Are we using @network-uri@?- manual: False--flag use-old-time- description: Are we using @old-time@?- manual: False- flag Cabal-syntax description: Are we using Cabal-syntax? manual: False@@ -55,45 +54,30 @@ Hackage.Security.RepoTool.Layout.Keys Hackage.Security.RepoTool.Paths Hackage.Security.RepoTool.Util.IO- Prelude -- For boot libraries we try to accomodate the versions bundled with -- the respective GHC release- build-depends: base >= 4.5 && < 4.17,- bytestring >= 0.9 && < 0.12,- directory >= 1.1 && < 1.4,- filepath >= 1.3 && < 1.5,- time >= 1.4 && < 1.13+ build-depends: base >= 4.11 && < 4.21,+ bytestring >= 0.10.8.2 && < 0.13,+ directory >= 1.3.1.5 && < 1.4,+ filepath >= 1.4.2 && < 1.6,+ network-uri >= 2.6 && < 2.7,+ network >= 2.6 && < 3.3,+ time >= 1.8.0.2 && < 1.15 if !os(windows)- build-depends: unix >= 2.5 && < 2.8-- if flag(use-old-time)- build-depends: directory < 1.2- , old-time == 1.1.*- else- build-depends: directory >= 1.2+ build-depends: unix >= 2.7.2.2 && < 2.9 - -- For non-boot libraries we try to support single major versions- -- to reduce the risk of semantic differences- build-depends: microlens >= 0.4.11.2 && < 0.5,- optparse-applicative >= 0.15.1 && < 0.18,- tar >= 0.5 && < 0.6,- zlib >= 0.6 && < 0.7,+ build-depends: microlens >= 0.4.9.1 && < 0.5,+ -- microlens-0.4.9.1 is the version in Stackage LTS-12.26 (GHC 8.4)+ optparse-applicative >= 0.13 && < 0.19,+ tar >= 0.5 && < 0.7,+ zlib >= 0.6 && < 0.8, hackage-security >= 0.6 && < 0.7 - -- see comments in hackage-security.cabal- if flag(use-network-uri)- build-depends: network-uri >= 2.6 && < 2.7,- network >= 2.6 && < 2.9- || >= 3.0 && < 3.2- else- build-depends: network >= 2.5 && < 2.6- if flag(Cabal-syntax)- build-depends: Cabal-syntax >= 3.7 && < 3.10+ build-depends: Cabal-syntax >= 3.7 && < 3.14 else- build-depends: Cabal >= 1.14 && < 1.26- || >= 2.0 && < 2.6+ build-depends: Cabal >= 2.2.0.1 && < 2.6 || >= 3.0 && < 3.7, Cabal-syntax < 3.7
src/Hackage/Security/RepoTool/Util/IO.hs view
@@ -34,11 +34,7 @@ import qualified System.Posix.Files as Posix #endif -#if MIN_VERSION_directory(1,2,0) import Data.Time.Clock.POSIX (utcTimeToPOSIXSeconds)-#else-import System.Time (ClockTime (TOD))-#endif -- | Get the modification time of the specified file --@@ -50,13 +46,8 @@ -- from POSIX seconds, so there shouldn't be loss of precision. -- NB: Apparently, this has low clock resolution on GHC < 7.8. -- I don't think we care.-#if MIN_VERSION_directory(1,2,0) fromInteger . floor . utcTimeToPOSIXSeconds <$> Directory.getModificationTime (toFilePath fp)-#else- Directory.getModificationTime (toFilePath fp) >>= \(TOD s _) ->- return (fromInteger s)-#endif where fp :: Path Absolute fp = anchorTargetPath' opts repoLoc targetPath@@ -123,11 +114,6 @@ deriving (Typeable) instance Exception TarGzError where-#if MIN_VERSION_base(4,8,0) displayException (TarGzError path e) = path ++ ": " ++ displayException e deriving instance Show TarGzError-#else-instance Show TarGzError where- show (TarGzError path e) = path ++ ": " ++ show e-#endif
src/Main.hs view
@@ -77,11 +77,6 @@ putStrLn $ displayException e exitFailure -#if !MIN_VERSION_base(4,8,0)-displayException :: Exception e => e -> String-displayException = show-#endif- {------------------------------------------------------------------------------- Creating keys -------------------------------------------------------------------------------}@@ -415,7 +410,7 @@ -- | Find the files we need to add to the index findNewIndexFiles :: GlobalOpts -> RepoLoc -> WhenWrite -> IO [IndexPath]-findNewIndexFiles opts@GlobalOpts{..} repoLoc whenWrite = do+findNewIndexFiles opts@GlobalOpts{} repoLoc whenWrite = do indexTS <- getFileModTime opts repoLoc (InRep repoLayoutIndexTar) indexFiles <- getRecursiveContents absIndexDir @@ -435,7 +430,7 @@ -- | Extract the cabal file from the package tarball and copy it to the index extractCabalFile :: GlobalOpts -> RepoLoc -> WhenWrite -> PackageIdentifier -> IO ()-extractCabalFile opts@GlobalOpts{..} repoLoc whenWrite pkgId = do+extractCabalFile opts@GlobalOpts{} repoLoc whenWrite pkgId = do srcTS <- getFileModTime opts repoLoc src dstTS <- getFileModTime opts repoLoc dst let skip = case whenWrite of
− src/Prelude.hs
@@ -1,27 +0,0 @@--- | Smooth over differences between various ghc versions by making older--- preludes look like 4.8.0-{-# LANGUAGE PackageImports #-}-{-# LANGUAGE CPP #-}-module Prelude (- module P-#if !MIN_VERSION_base(4,8,0)- , Applicative(..)- , Monoid(..)- , (<$>)- , (<$)- , traverse-#endif- ) where--#if MIN_VERSION_base(4,8,0)-import "base" Prelude as P-#else-#if MIN_VERSION_base(4,6,0)-import "base" Prelude as P-#else-import "base" Prelude as P hiding (catch)-#endif-import Control.Applicative-import Data.Monoid-import Data.Traversable (traverse)-#endif