Compare commits
24 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5cd21a1cab | ||
|
|
e4f28b3fe0 | ||
|
|
1c0917c6f2 | ||
|
|
bc5f5a6c6d | ||
|
|
07ffadc1b4 | ||
|
|
dcaf424ec4 | ||
|
|
fc4f4931bc | ||
|
|
49d874e8cb | ||
|
|
328ada02f1 | ||
|
|
28cd4fabbc | ||
|
|
1da05e57d6 | ||
|
|
fcc101b06c | ||
|
|
d9213885b1 | ||
|
|
79b745317f | ||
|
|
39d3b731bd | ||
|
|
3f63b56d1c | ||
|
|
9de367cde0 | ||
|
|
d219f80be2 | ||
|
|
bd380cacb5 | ||
|
|
c594a52d24 | ||
|
|
da674c2eb1 | ||
|
|
5032ed775f | ||
|
|
3f60711f84 | ||
|
|
47a99e23e3 |
7 changed files with 663 additions and 488 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -22,3 +22,8 @@ cabal-install-0.8.2.tar.gz
|
|||
/cabal-install-2.4.1.0.tar.gz
|
||||
/cabal-install-3.0.0.0.tar.gz
|
||||
/cabal-install-3.2.0.0.tar.gz
|
||||
/cabal-install-3.6.2.0.tar.gz
|
||||
/cabal-install-3.8.1.0.tar.gz
|
||||
/cabal-install-solver-3.8.1.0.tar.gz
|
||||
/cabal-install-3.10.3.0.tar.gz
|
||||
/cabal-install-solver-3.10.3.0.tar.gz
|
||||
|
|
|
|||
|
|
@ -1,38 +0,0 @@
|
|||
From 442869918260a7bb3f0cb0698eaeaeb6dae2c4f6 Mon Sep 17 00:00:00 2001
|
||||
From: Alexis Williams <alexis@typedr.at>
|
||||
Date: Sat, 21 Dec 2019 09:50:12 -0800
|
||||
Subject: [PATCH] Fix `v2-sdist` permissions
|
||||
|
||||
Fixes #5813.
|
||||
---
|
||||
cabal-install/Distribution/Client/CmdSdist.hs | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/cabal-install/Distribution/Client/CmdSdist.hs b/cabal-install/Distribution/Client/CmdSdist.hs
|
||||
index 55d01ad24a..218da6b720 100644
|
||||
--- a/cabal-install/Distribution/Client/CmdSdist.hs
|
||||
+++ b/cabal-install/Distribution/Client/CmdSdist.hs
|
||||
@@ -75,7 +75,8 @@ import Data.List
|
||||
import qualified Data.Set as Set
|
||||
import System.Directory
|
||||
( getCurrentDirectory, setCurrentDirectory
|
||||
- , createDirectoryIfMissing, makeAbsolute )
|
||||
+ , createDirectoryIfMissing, makeAbsolute
|
||||
+ , getPermissions, executable )
|
||||
import System.FilePath
|
||||
( (</>), (<.>), makeRelative, normalise, takeDirectory )
|
||||
|
||||
@@ -281,10 +282,11 @@ packageToSdist verbosity projectRootDir format outputFile pkg = do
|
||||
Right path -> tell [Tar.directoryEntry path]
|
||||
|
||||
for_ files $ \(perm, file) -> do
|
||||
+ realPerm <- liftIO $ getPermissions file
|
||||
let fileDir = takeDirectory (prefix </> file)
|
||||
perm' = case perm of
|
||||
- Exec -> Tar.executableFilePermissions
|
||||
- NoExec -> Tar.ordinaryFilePermissions
|
||||
+ Exec | executable realPerm -> Tar.executableFilePermissions
|
||||
+ _ -> Tar.ordinaryFilePermissions
|
||||
needsEntry <- gets (Set.notMember fileDir)
|
||||
|
||||
when needsEntry $ do
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
From 83983fcc4ba16d7969ba36f4174daf27de00a38e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= <mimi.vx@gmail.com>
|
||||
Date: Thu, 10 Dec 2020 19:49:23 +0100
|
||||
Subject: [PATCH] Allow base16-bytestring 1.0 and newer
|
||||
|
||||
---
|
||||
cabal-install/cabal-install.cabal | 2 +-
|
||||
cabal-install/src/Distribution/Client/HashValue.hs | 7 ++++++-
|
||||
cabal-install/src/Distribution/Client/HttpUtils.hs | 5 +++++
|
||||
3 files changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
|
||||
index 70e936ffb0e..70bc12458ab 100644
|
||||
--- a/cabal-install/cabal-install.cabal
|
||||
+++ b/cabal-install/cabal-install.cabal
|
||||
@@ -267,7 +267,7 @@ executable cabal
|
||||
async >= 2.0 && < 2.3,
|
||||
array >= 0.4 && < 0.6,
|
||||
base >= 4.8 && < 4.15,
|
||||
- base16-bytestring >= 0.1.1 && < 0.2,
|
||||
+ base16-bytestring >= 0.1.1 && < 1.1.0.0,
|
||||
binary >= 0.7.3 && < 0.9,
|
||||
bytestring >= 0.10.6.0 && < 0.11,
|
||||
Cabal == 3.2.*,
|
||||
diff --git a/cabal-install/src/Distribution/Client/HashValue.hs b/cabal-install/src/Distribution/Client/HashValue.hs
|
||||
index d41c70bf480..abde9c909a9 100644
|
||||
--- a/cabal-install/Distribution/Client/HashValue.hs
|
||||
+++ b/cabal-install/Distribution/Client/HashValue.hs
|
||||
@@ -1,3 +1,4 @@
|
||||
+{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE DeriveDataTypeable #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
module Distribution.Client.HashValue (
|
||||
@@ -71,10 +72,14 @@ hashFromTUF (Sec.Hash hashstr) =
|
||||
--TODO: [code cleanup] either we should get TUF to use raw bytestrings or
|
||||
-- perhaps we should also just use a base16 string as the internal rep.
|
||||
case Base16.decode (BS.pack hashstr) of
|
||||
+#if MIN_VERSION_base16_bytestring(1,0,0)
|
||||
+ Right hash -> HashValue hash
|
||||
+ Left _ -> error "hashFromTUF: cannot decode base16"
|
||||
+#else
|
||||
(hash, trailing) | not (BS.null hash) && BS.null trailing
|
||||
-> HashValue hash
|
||||
_ -> error "hashFromTUF: cannot decode base16 hash"
|
||||
-
|
||||
+#endif
|
||||
|
||||
-- | Truncate a 32 byte SHA256 hash to
|
||||
--
|
||||
|
|
@ -1,344 +0,0 @@
|
|||
diff --git a/cabal-install/Distribution/Client/CmdSdist.hs b/cabal-install/Distribution/Client/CmdSdist.hs
|
||||
index 9ce0c8010..a22317004 100644
|
||||
--- a/cabal-install/Distribution/Client/CmdSdist.hs
|
||||
+++ b/cabal-install/Distribution/Client/CmdSdist.hs
|
||||
@@ -237,7 +237,10 @@ packageToSdist verbosity projectRootDir format outputFile pkg = do
|
||||
(norm NoExec -> nonexec, norm Exec -> exec) <-
|
||||
listPackageSources verbosity (flattenPackageDescription $ packageDescription pkg) knownSuffixHandlers
|
||||
|
||||
+ print $ map snd exec
|
||||
+ print $ map snd nonexec
|
||||
let files = nub . sortOn snd $ nonexec ++ exec
|
||||
+ print files
|
||||
|
||||
case format of
|
||||
SourceList nulSep -> do
|
||||
diff --git a/cabal-install/Distribution/Client/FetchUtils.hs b/cabal-install/Distribution/Client/FetchUtils.hs
|
||||
index e9a31a91f..4e5e581f9 100644
|
||||
--- a/cabal-install/Distribution/Client/FetchUtils.hs
|
||||
+++ b/cabal-install/Distribution/Client/FetchUtils.hs
|
||||
@@ -176,8 +176,8 @@ fetchRepoTarball verbosity' repoCtxt repo pkgid = do
|
||||
verbosity = verboseUnmarkOutput verbosity'
|
||||
|
||||
downloadRepoPackage = case repo of
|
||||
- RepoLocal{..} -> return (packageFile repo pkgid)
|
||||
- RepoLocalNoIndex{..} -> return (packageFile repo pkgid)
|
||||
+ RepoLocal{} -> return (packageFile repo pkgid)
|
||||
+ RepoLocalNoIndex{} -> return (packageFile repo pkgid)
|
||||
|
||||
RepoRemote{..} -> do
|
||||
transport <- repoContextGetTransport repoCtxt
|
||||
diff --git a/cabal-install/Distribution/Client/IndexUtils.hs b/cabal-install/Distribution/Client/IndexUtils.hs
|
||||
index a76becc05..bf0ff7cf5 100644
|
||||
--- a/cabal-install/Distribution/Client/IndexUtils.hs
|
||||
+++ b/cabal-install/Distribution/Client/IndexUtils.hs
|
||||
@@ -634,7 +634,7 @@ withIndexEntries
|
||||
-> ([IndexCacheEntry] -> IO a)
|
||||
-> ([NoIndexCacheEntry] -> IO a)
|
||||
-> IO a
|
||||
-withIndexEntries _ (RepoIndex repoCtxt repo@RepoSecure{..}) callback _ =
|
||||
+withIndexEntries _ (RepoIndex repoCtxt repo@RepoSecure{}) callback _ =
|
||||
repoContextWithSecureRepo repoCtxt repo $ \repoSecure ->
|
||||
Sec.withIndex repoSecure $ \Sec.IndexCallbacks{..} -> do
|
||||
-- Incrementally (lazily) read all the entries in the tar file in order,
|
||||
diff --git a/cabal-install/Distribution/Client/Sandbox.hs b/cabal-install/Distribution/Client/Sandbox.hs
|
||||
index 66b415d72..14bad3f21 100644
|
||||
--- a/cabal-install/Distribution/Client/Sandbox.hs
|
||||
+++ b/cabal-install/Distribution/Client/Sandbox.hs
|
||||
@@ -666,7 +666,7 @@ reinstallAddSourceDeps :: Verbosity
|
||||
-> FilePath
|
||||
-> IO WereDepsReinstalled
|
||||
reinstallAddSourceDeps verbosity configFlags' configExFlags
|
||||
- installFlags globalFlags sandboxDir = topHandler' $ do
|
||||
+ installFlags globalFlags sandboxDir = topHandlerWith errorMsg $ do
|
||||
let sandboxDistPref = sandboxBuildDir sandboxDir
|
||||
configFlags = configFlags'
|
||||
{ configDistPref = Flag sandboxDistPref }
|
||||
@@ -710,7 +710,8 @@ reinstallAddSourceDeps verbosity configFlags' configExFlags
|
||||
++ "offending packages or recreating the sandbox."
|
||||
logMsg message rest = debugNoWrap verbosity message >> rest
|
||||
|
||||
- topHandler' = topHandlerWith $ \_ -> do
|
||||
+ errorMsg :: a -> IO WereDepsReinstalled
|
||||
+ errorMsg _ = do
|
||||
warn verbosity "Couldn't reinstall some add-source dependencies."
|
||||
-- Here we can't know whether any deps have been reinstalled, so we have
|
||||
-- to be conservative.
|
||||
diff --git a/cabal-install/Distribution/Client/TargetSelector.hs b/cabal-install/Distribution/Client/TargetSelector.hs
|
||||
index 23d92f580..f8f683d98 100644
|
||||
--- a/cabal-install/Distribution/Client/TargetSelector.hs
|
||||
+++ b/cabal-install/Distribution/Client/TargetSelector.hs
|
||||
@@ -222,7 +222,7 @@ readTargetSelectorsWith :: (Applicative m, Monad m) => DirActions m
|
||||
-> Maybe ComponentKindFilter
|
||||
-> [String]
|
||||
-> m (Either [TargetSelectorProblem] [TargetSelector])
|
||||
-readTargetSelectorsWith dirActions@DirActions{..} pkgs mfilter targetStrs =
|
||||
+readTargetSelectorsWith dirActions@DirActions{} pkgs mfilter targetStrs =
|
||||
case parseTargetStrings targetStrs of
|
||||
([], usertargets) -> do
|
||||
usertargets' <- mapM (getTargetStringFileStatus dirActions) usertargets
|
||||
diff --git a/cabal-install/Distribution/Client/Update.hs b/cabal-install/Distribution/Client/Update.hs
|
||||
index 52bb1f76c..8ded78b9d 100644
|
||||
--- a/cabal-install/Distribution/Client/Update.hs
|
||||
+++ b/cabal-install/Distribution/Client/Update.hs
|
||||
@@ -73,8 +73,8 @@ updateRepo :: Verbosity -> UpdateFlags -> RepoContext -> Repo -> IO ()
|
||||
updateRepo verbosity updateFlags repoCtxt repo = do
|
||||
transport <- repoContextGetTransport repoCtxt
|
||||
case repo of
|
||||
- RepoLocal{..} -> return ()
|
||||
- RepoLocalNoIndex{..} -> return ()
|
||||
+ RepoLocal{} -> return ()
|
||||
+ RepoLocalNoIndex{} -> return ()
|
||||
RepoRemote{..} -> do
|
||||
downloadResult <- downloadIndex transport verbosity repoRemote repoLocalDir
|
||||
case downloadResult of
|
||||
diff --git a/cabal-install/Distribution/Client/Utils/Json.hs b/cabal-install/Distribution/Client/Utils/Json.hs
|
||||
index 89a13af87..01d575313 100644
|
||||
--- a/cabal-install/Distribution/Client/Utils/Json.hs
|
||||
+++ b/cabal-install/Distribution/Client/Utils/Json.hs
|
||||
@@ -15,12 +15,9 @@ module Distribution.Client.Utils.Json
|
||||
)
|
||||
where
|
||||
|
||||
-import Data.Char
|
||||
-import Data.Int
|
||||
-import Data.String
|
||||
-import Data.Word
|
||||
-import Data.List
|
||||
-import Data.Monoid
|
||||
+import Distribution.Client.Compat.Prelude
|
||||
+
|
||||
+import Data.Char (intToDigit)
|
||||
|
||||
import Data.ByteString.Builder (Builder)
|
||||
import qualified Data.ByteString.Builder as BB
|
||||
@@ -135,13 +132,13 @@ encodeArrayBB :: [Value] -> Builder
|
||||
encodeArrayBB [] = "[]"
|
||||
encodeArrayBB jvs = BB.char8 '[' <> go jvs <> BB.char8 ']'
|
||||
where
|
||||
- go = Data.Monoid.mconcat . intersperse (BB.char8 ',') . map encodeValueBB
|
||||
+ go = mconcat . intersperse (BB.char8 ',') . map encodeValueBB
|
||||
|
||||
encodeObjectBB :: Object -> Builder
|
||||
encodeObjectBB [] = "{}"
|
||||
encodeObjectBB jvs = BB.char8 '{' <> go jvs <> BB.char8 '}'
|
||||
where
|
||||
- go = Data.Monoid.mconcat . intersperse (BB.char8 ',') . map encPair
|
||||
+ go = mconcat . intersperse (BB.char8 ',') . map encPair
|
||||
encPair (l,x) = encodeStringBB l <> BB.char8 ':' <> encodeValueBB x
|
||||
|
||||
encodeStringBB :: String -> Builder
|
||||
diff --git a/cabal-install/Distribution/Solver/Modular/Assignment.hs b/cabal-install/Distribution/Solver/Modular/Assignment.hs
|
||||
index be5e63bfb..b05a099ec 100644
|
||||
--- a/cabal-install/Distribution/Solver/Modular/Assignment.hs
|
||||
+++ b/cabal-install/Distribution/Solver/Modular/Assignment.hs
|
||||
@@ -9,10 +9,11 @@ module Distribution.Solver.Modular.Assignment
|
||||
import Prelude ()
|
||||
import Distribution.Solver.Compat.Prelude hiding (pi)
|
||||
|
||||
-import Data.Array as A
|
||||
-import Data.List as L
|
||||
-import Data.Map as M
|
||||
-import Data.Maybe
|
||||
+import qualified Data.Array as A
|
||||
+import qualified Data.List as L
|
||||
+import qualified Data.Map as M
|
||||
+
|
||||
+import Data.Maybe (fromJust)
|
||||
|
||||
import Distribution.PackageDescription (FlagAssignment, mkFlagAssignment) -- from Cabal
|
||||
|
||||
@@ -79,7 +80,7 @@ toCPs (A pa fa sa) rdm =
|
||||
-- Dependencies per package.
|
||||
depp :: QPN -> [(Component, PI QPN)]
|
||||
depp qpn = let v :: Vertex
|
||||
- v = fromJust (cvm qpn)
|
||||
+ v = fromJust (cvm qpn) -- TODO: why this is safe?
|
||||
dvs :: [(Component, Vertex)]
|
||||
dvs = tg A.! v
|
||||
in L.map (\ (comp, dv) -> case vm dv of (_, x, _) -> (comp, PI x (pa M.! x))) dvs
|
||||
diff --git a/cabal-install/Distribution/Solver/Modular/Builder.hs b/cabal-install/Distribution/Solver/Modular/Builder.hs
|
||||
index eb11a36aa..5d196f4fd 100644
|
||||
--- a/cabal-install/Distribution/Solver/Modular/Builder.hs
|
||||
+++ b/cabal-install/Distribution/Solver/Modular/Builder.hs
|
||||
@@ -19,10 +19,10 @@ module Distribution.Solver.Modular.Builder (
|
||||
-- flag-guarded dependencies, we cannot introduce them immediately. Instead, we
|
||||
-- store the entire dependency.
|
||||
|
||||
-import Data.List as L
|
||||
-import Data.Map as M
|
||||
-import Data.Set as S
|
||||
-import Prelude hiding (sequence, mapM)
|
||||
+import qualified Data.List as L
|
||||
+import qualified Data.Map as M
|
||||
+import qualified Data.Set as S
|
||||
+import Prelude
|
||||
|
||||
import qualified Distribution.Solver.Modular.ConflictSet as CS
|
||||
import Distribution.Solver.Modular.Dependency
|
||||
@@ -55,7 +55,7 @@ data BuildState = BS {
|
||||
}
|
||||
|
||||
-- | Map of available linking targets.
|
||||
-type LinkingState = Map (PN, I) [PackagePath]
|
||||
+type LinkingState = M.Map (PN, I) [PackagePath]
|
||||
|
||||
-- | Extend the set of open goals with the new goals listed.
|
||||
--
|
||||
diff --git a/cabal-install/Distribution/Solver/Modular/Index.hs b/cabal-install/Distribution/Solver/Modular/Index.hs
|
||||
index fdddfc823..ac60fec7d 100644
|
||||
--- a/cabal-install/Distribution/Solver/Modular/Index.hs
|
||||
+++ b/cabal-install/Distribution/Solver/Modular/Index.hs
|
||||
@@ -6,10 +6,12 @@ module Distribution.Solver.Modular.Index
|
||||
, mkIndex
|
||||
) where
|
||||
|
||||
-import Data.List as L
|
||||
-import Data.Map as M
|
||||
import Prelude hiding (pi)
|
||||
|
||||
+import Data.Map (Map)
|
||||
+import qualified Data.List as L
|
||||
+import qualified Data.Map as M
|
||||
+
|
||||
import Distribution.Solver.Modular.Dependency
|
||||
import Distribution.Solver.Modular.Flag
|
||||
import Distribution.Solver.Modular.Package
|
||||
diff --git a/cabal-install/Distribution/Solver/Modular/IndexConversion.hs b/cabal-install/Distribution/Solver/Modular/IndexConversion.hs
|
||||
index c9565c80d..8e9ef6141 100644
|
||||
--- a/cabal-install/Distribution/Solver/Modular/IndexConversion.hs
|
||||
+++ b/cabal-install/Distribution/Solver/Modular/IndexConversion.hs
|
||||
@@ -2,12 +2,12 @@ module Distribution.Solver.Modular.IndexConversion
|
||||
( convPIs
|
||||
) where
|
||||
|
||||
-import Data.List as L
|
||||
+import qualified Data.List as L
|
||||
import Data.Map.Strict (Map)
|
||||
import qualified Data.Map.Strict as M
|
||||
-import Data.Maybe
|
||||
+import Data.Maybe (mapMaybe, fromMaybe, maybeToList)
|
||||
import Data.Monoid as Mon
|
||||
-import Data.Set as S
|
||||
+import qualified Data.Set as S
|
||||
|
||||
import Distribution.Compiler
|
||||
import Distribution.InstalledPackageInfo as IPI
|
||||
@@ -330,7 +330,7 @@ flagInfo (StrongFlags strfl) =
|
||||
|
||||
-- | Internal package names, which should not be interpreted as true
|
||||
-- dependencies.
|
||||
-type IPNs = Set PN
|
||||
+type IPNs = S.Set PN
|
||||
|
||||
-- | Convenience function to delete a 'Dependency' if it's
|
||||
-- for a 'PN' that isn't actually real.
|
||||
diff --git a/cabal-install/Distribution/Solver/Modular/Solver.hs b/cabal-install/Distribution/Solver/Modular/Solver.hs
|
||||
index 324525505..e6aa1fb43 100644
|
||||
--- a/cabal-install/Distribution/Solver/Modular/Solver.hs
|
||||
+++ b/cabal-install/Distribution/Solver/Modular/Solver.hs
|
||||
@@ -9,9 +9,9 @@ module Distribution.Solver.Modular.Solver
|
||||
, PruneAfterFirstSuccess(..)
|
||||
) where
|
||||
|
||||
-import Data.Map as M
|
||||
-import Data.List as L
|
||||
-import Data.Set as S
|
||||
+import qualified Data.Map as M
|
||||
+import qualified Data.List as L
|
||||
+import qualified Data.Set as S
|
||||
import Distribution.Verbosity
|
||||
|
||||
import Distribution.Compiler (CompilerInfo)
|
||||
@@ -91,8 +91,8 @@ solve :: SolverConfig -- ^ solver parameters
|
||||
-> Index -- ^ all available packages as an index
|
||||
-> PkgConfigDb -- ^ available pkg-config pkgs
|
||||
-> (PN -> PackagePreferences) -- ^ preferences
|
||||
- -> Map PN [LabeledPackageConstraint] -- ^ global constraints
|
||||
- -> Set PN -- ^ global goals
|
||||
+ -> M.Map PN [LabeledPackageConstraint] -- ^ global constraints
|
||||
+ -> S.Set PN -- ^ global goals
|
||||
-> RetryLog Message SolverFailure (Assignment, RevDepMap)
|
||||
solve sc cinfo idx pkgConfigDB userPrefs userConstraints userGoals =
|
||||
explorePhase $
|
||||
@@ -232,7 +232,7 @@ instance GSimpleTree (Tree d c) where
|
||||
|
||||
-- Show conflict set
|
||||
goCS :: ConflictSet -> String
|
||||
- goCS cs = "{" ++ (intercalate "," . L.map showVar . CS.toList $ cs) ++ "}"
|
||||
+ goCS cs = "{" ++ (L.intercalate "," . L.map showVar . CS.toList $ cs) ++ "}"
|
||||
#endif
|
||||
|
||||
-- | Replace all goal reasons with a dummy goal reason in the tree
|
||||
diff --git a/cabal-install/Distribution/Solver/Modular/Validate.hs b/cabal-install/Distribution/Solver/Modular/Validate.hs
|
||||
index 6195d101b..a3dec6e1f 100644
|
||||
--- a/cabal-install/Distribution/Solver/Modular/Validate.hs
|
||||
+++ b/cabal-install/Distribution/Solver/Modular/Validate.hs
|
||||
@@ -15,11 +15,12 @@ module Distribution.Solver.Modular.Validate (validateTree) where
|
||||
import Control.Applicative
|
||||
import Control.Monad.Reader hiding (sequence)
|
||||
import Data.Function (on)
|
||||
-import Data.List as L
|
||||
-import Data.Set as S
|
||||
import Data.Traversable
|
||||
import Prelude hiding (sequence)
|
||||
|
||||
+import qualified Data.List as L
|
||||
+import qualified Data.Set as S
|
||||
+
|
||||
import Language.Haskell.Extension (Extension, Language)
|
||||
|
||||
import Data.Map.Strict as M
|
||||
diff --git a/cabal-install/bootstrap.sh b/cabal-install/bootstrap.sh
|
||||
index 077d7f4ef..d51416604 100755
|
||||
--- a/cabal-install/bootstrap.sh
|
||||
+++ b/cabal-install/bootstrap.sh
|
||||
@@ -260,9 +260,9 @@ EDIT_DISTANCE_VER="0.2.2.1"; EDIT_DISTANCE_VER_REGEXP="0\.2\.2\.?"
|
||||
# 0.2.2.*
|
||||
ED25519_VER="0.0.5.0"; ED25519_VER_REGEXP="0\.0\.?"
|
||||
# 0.0.*
|
||||
-HACKAGE_SECURITY_VER="0.6.0.0"; HACKAGE_SECURITY_VER_REGEXP="0\.6\."
|
||||
- # >= 0.7.0.0 && < 0.7
|
||||
-TAR_VER="0.5.1.0"; TAR_VER_REGEXP="0\.5\.([1-9]|1[0-9]|0\.[3-9]|0\.1[0-9])\.?"
|
||||
+HACKAGE_SECURITY_VER="0.6.0.1"; HACKAGE_SECURITY_VER_REGEXP="0\.6\."
|
||||
+ # >= 0.6.0.0 && < 0.7
|
||||
+TAR_VER="0.5.1.1"; TAR_VER_REGEXP="0\.5\.([1-9]|1[0-9]|0\.[3-9]|0\.1[0-9])\.?"
|
||||
# >= 0.5.0.3 && < 0.6
|
||||
DIGEST_VER="0.0.1.2"; DIGEST_REGEXP="0\.0\.(1\.[2-9]|[2-9]\.?)"
|
||||
# >= 0.0.1.2 && < 0.1
|
||||
diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
|
||||
index 985ea9a5a..c9d713c29 100644
|
||||
--- a/cabal-install/cabal-install.cabal
|
||||
+++ b/cabal-install/cabal-install.cabal
|
||||
@@ -316,7 +316,7 @@ executable cabal
|
||||
build-depends:
|
||||
async >= 2.0 && < 2.3,
|
||||
array >= 0.4 && < 0.6,
|
||||
- base >= 4.8 && < 4.14,
|
||||
+ base >= 4.8 && < 4.15,
|
||||
base16-bytestring >= 0.1.1 && < 0.2,
|
||||
binary >= 0.7.3 && < 0.9,
|
||||
bytestring >= 0.10.6.0 && < 0.11,
|
||||
@@ -341,7 +341,7 @@ executable cabal
|
||||
time >= 1.5.0.1 && < 1.10,
|
||||
transformers >= 0.4.2.0 && < 0.6,
|
||||
zlib >= 0.5.3 && < 0.7,
|
||||
- hackage-security >= 0.6.0.0 && < 0.7,
|
||||
+ hackage-security >= 0.6.0.1 && < 0.7,
|
||||
text >= 1.2.3 && < 1.3,
|
||||
parsec >= 3.1.13.0 && < 3.2
|
||||
|
||||
diff --git a/cabal-install/tests/IntegrationTests2/targets/complex/q/q.cabal b/cabal-install/tests/IntegrationTests2/targets/complex/q/q.cabal
|
||||
index 556fa4a42..7ee22fcb2 100644
|
||||
--- a/cabal-install/tests/IntegrationTests2/targets/complex/q/q.cabal
|
||||
+++ b/cabal-install/tests/IntegrationTests2/targets/complex/q/q.cabal
|
||||
@@ -5,7 +5,8 @@ cabal-version: >= 1.2
|
||||
|
||||
library
|
||||
exposed-modules: Q
|
||||
- build-depends: base, filepath
|
||||
+ -- we rely that filepath has filepath-tests component
|
||||
+ build-depends: base, filepath >=1.4.0.0
|
||||
|
||||
executable buildable-false
|
||||
main-is: Main.hs
|
||||
432
cabal-install-3.10.3.0.cabal
Normal file
432
cabal-install-3.10.3.0.cabal
Normal file
|
|
@ -0,0 +1,432 @@
|
|||
Cabal-Version: 2.2
|
||||
|
||||
Name: cabal-install
|
||||
Version: 3.10.3.0
|
||||
x-revision: 1
|
||||
Synopsis: The command-line interface for Cabal and Hackage.
|
||||
Description:
|
||||
The \'cabal\' command-line program simplifies the process of managing
|
||||
Haskell software by automating the fetching, configuration, compilation
|
||||
and installation of Haskell libraries and programs.
|
||||
homepage: http://www.haskell.org/cabal/
|
||||
bug-reports: https://github.com/haskell/cabal/issues
|
||||
License: BSD-3-Clause
|
||||
License-File: LICENSE
|
||||
Author: Cabal Development Team (see AUTHORS file)
|
||||
Maintainer: Cabal Development Team <cabal-devel@haskell.org>
|
||||
Copyright: 2003-2023, Cabal Development Team
|
||||
Category: Distribution
|
||||
Build-type: Simple
|
||||
Extra-Source-Files:
|
||||
bash-completion/cabal
|
||||
extra-doc-files:
|
||||
README.md
|
||||
changelog
|
||||
|
||||
source-repository head
|
||||
type: git
|
||||
location: https://github.com/haskell/cabal/
|
||||
subdir: cabal-install
|
||||
|
||||
Flag native-dns
|
||||
description:
|
||||
Enable use of the [resolv](https://hackage.haskell.org/package/resolv)
|
||||
& [windns](https://hackage.haskell.org/package/windns) packages for performing DNS lookups
|
||||
default: True
|
||||
manual: True
|
||||
|
||||
Flag lukko
|
||||
description: Use @lukko@ for file-locking
|
||||
default: True
|
||||
manual: True
|
||||
|
||||
common warnings
|
||||
ghc-options: -Wall -Wcompat -Wnoncanonical-monad-instances -Wincomplete-uni-patterns -Wincomplete-record-updates
|
||||
if impl(ghc < 8.8)
|
||||
ghc-options: -Wnoncanonical-monadfail-instances
|
||||
if impl(ghc >=9.0)
|
||||
-- Warning: even though introduced with GHC 8.10, -Wunused-packages
|
||||
-- gives false positives with GHC 8.10.
|
||||
ghc-options: -Wunused-packages
|
||||
|
||||
common base-dep
|
||||
build-depends: base >=4.10 && <4.20
|
||||
|
||||
common cabal-dep
|
||||
build-depends: Cabal ^>=3.10.3
|
||||
|
||||
common cabal-syntax-dep
|
||||
build-depends: Cabal-syntax ^>=3.10
|
||||
|
||||
common cabal-install-solver-dep
|
||||
build-depends: cabal-install-solver ^>=3.10
|
||||
|
||||
library
|
||||
import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
|
||||
default-language: Haskell2010
|
||||
default-extensions: TypeOperators
|
||||
|
||||
hs-source-dirs: src
|
||||
autogen-modules:
|
||||
Paths_cabal_install
|
||||
other-modules:
|
||||
Paths_cabal_install
|
||||
exposed-modules:
|
||||
-- this modules are moved from Cabal
|
||||
-- they are needed for as long until cabal-install moves to parsec parser
|
||||
Distribution.Deprecated.ParseUtils
|
||||
Distribution.Deprecated.ReadP
|
||||
Distribution.Deprecated.ViewAsFieldDescr
|
||||
|
||||
Distribution.Client.BuildReports.Anonymous
|
||||
Distribution.Client.BuildReports.Lens
|
||||
Distribution.Client.BuildReports.Storage
|
||||
Distribution.Client.BuildReports.Types
|
||||
Distribution.Client.BuildReports.Upload
|
||||
Distribution.Client.Check
|
||||
Distribution.Client.CmdBench
|
||||
Distribution.Client.CmdBuild
|
||||
Distribution.Client.CmdClean
|
||||
Distribution.Client.CmdConfigure
|
||||
Distribution.Client.CmdErrorMessages
|
||||
Distribution.Client.CmdExec
|
||||
Distribution.Client.CmdFreeze
|
||||
Distribution.Client.CmdHaddock
|
||||
Distribution.Client.CmdHaddockProject
|
||||
Distribution.Client.CmdInstall
|
||||
Distribution.Client.CmdInstall.ClientInstallFlags
|
||||
Distribution.Client.CmdInstall.ClientInstallTargetSelector
|
||||
Distribution.Client.CmdLegacy
|
||||
Distribution.Client.CmdListBin
|
||||
Distribution.Client.CmdOutdated
|
||||
Distribution.Client.CmdRepl
|
||||
Distribution.Client.CmdRun
|
||||
Distribution.Client.CmdSdist
|
||||
Distribution.Client.CmdTest
|
||||
Distribution.Client.CmdUpdate
|
||||
Distribution.Client.Compat.Directory
|
||||
Distribution.Client.Compat.ExecutablePath
|
||||
Distribution.Client.Compat.Orphans
|
||||
Distribution.Client.Compat.Prelude
|
||||
Distribution.Client.Compat.Semaphore
|
||||
Distribution.Client.Compat.Tar
|
||||
Distribution.Client.Config
|
||||
Distribution.Client.Configure
|
||||
Distribution.Client.Dependency
|
||||
Distribution.Client.Dependency.Types
|
||||
Distribution.Client.DistDirLayout
|
||||
Distribution.Client.Fetch
|
||||
Distribution.Client.FetchUtils
|
||||
Distribution.Client.FileMonitor
|
||||
Distribution.Client.Freeze
|
||||
Distribution.Client.GZipUtils
|
||||
Distribution.Client.GenBounds
|
||||
Distribution.Client.Get
|
||||
Distribution.Client.Glob
|
||||
Distribution.Client.GlobalFlags
|
||||
Distribution.Client.Haddock
|
||||
Distribution.Client.HashValue
|
||||
Distribution.Client.HttpUtils
|
||||
Distribution.Client.IndexUtils
|
||||
Distribution.Client.IndexUtils.ActiveRepos
|
||||
Distribution.Client.IndexUtils.IndexState
|
||||
Distribution.Client.IndexUtils.Timestamp
|
||||
Distribution.Client.Init
|
||||
Distribution.Client.Init.Defaults
|
||||
Distribution.Client.Init.FileCreators
|
||||
Distribution.Client.Init.FlagExtractors
|
||||
Distribution.Client.Init.Format
|
||||
Distribution.Client.Init.Interactive.Command
|
||||
Distribution.Client.Init.NonInteractive.Command
|
||||
Distribution.Client.Init.NonInteractive.Heuristics
|
||||
Distribution.Client.Init.Licenses
|
||||
Distribution.Client.Init.Prompt
|
||||
Distribution.Client.Init.Simple
|
||||
Distribution.Client.Init.Types
|
||||
Distribution.Client.Init.Utils
|
||||
Distribution.Client.Install
|
||||
Distribution.Client.InstallPlan
|
||||
Distribution.Client.InstallSymlink
|
||||
Distribution.Client.JobControl
|
||||
Distribution.Client.List
|
||||
Distribution.Client.Main
|
||||
Distribution.Client.Manpage
|
||||
Distribution.Client.ManpageFlags
|
||||
Distribution.Client.Nix
|
||||
Distribution.Client.NixStyleOptions
|
||||
Distribution.Client.PackageHash
|
||||
Distribution.Client.ParseUtils
|
||||
Distribution.Client.ProjectBuilding
|
||||
Distribution.Client.ProjectBuilding.Types
|
||||
Distribution.Client.ProjectConfig
|
||||
Distribution.Client.ProjectConfig.Legacy
|
||||
Distribution.Client.ProjectConfig.Types
|
||||
Distribution.Client.ProjectFlags
|
||||
Distribution.Client.ProjectOrchestration
|
||||
Distribution.Client.ProjectPlanOutput
|
||||
Distribution.Client.ProjectPlanning
|
||||
Distribution.Client.ProjectPlanning.Types
|
||||
Distribution.Client.RebuildMonad
|
||||
Distribution.Client.Reconfigure
|
||||
Distribution.Client.Run
|
||||
Distribution.Client.Sandbox
|
||||
Distribution.Client.Sandbox.PackageEnvironment
|
||||
Distribution.Client.SavedFlags
|
||||
Distribution.Client.ScriptUtils
|
||||
Distribution.Client.Security.DNS
|
||||
Distribution.Client.Security.HTTP
|
||||
Distribution.Client.Setup
|
||||
Distribution.Client.SetupWrapper
|
||||
Distribution.Client.Signal
|
||||
Distribution.Client.SolverInstallPlan
|
||||
Distribution.Client.SourceFiles
|
||||
Distribution.Client.SrcDist
|
||||
Distribution.Client.Store
|
||||
Distribution.Client.Tar
|
||||
Distribution.Client.TargetProblem
|
||||
Distribution.Client.TargetSelector
|
||||
Distribution.Client.Targets
|
||||
Distribution.Client.Types
|
||||
Distribution.Client.Types.AllowNewer
|
||||
Distribution.Client.Types.BuildResults
|
||||
Distribution.Client.Types.ConfiguredId
|
||||
Distribution.Client.Types.ConfiguredPackage
|
||||
Distribution.Client.Types.Credentials
|
||||
Distribution.Client.Types.InstallMethod
|
||||
Distribution.Client.Types.OverwritePolicy
|
||||
Distribution.Client.Types.PackageLocation
|
||||
Distribution.Client.Types.PackageSpecifier
|
||||
Distribution.Client.Types.ReadyPackage
|
||||
Distribution.Client.Types.Repo
|
||||
Distribution.Client.Types.RepoName
|
||||
Distribution.Client.Types.SourcePackageDb
|
||||
Distribution.Client.Types.SourceRepo
|
||||
Distribution.Client.Types.WriteGhcEnvironmentFilesPolicy
|
||||
Distribution.Client.Upload
|
||||
Distribution.Client.Utils
|
||||
Distribution.Client.Utils.Json
|
||||
Distribution.Client.Utils.Parsec
|
||||
Distribution.Client.VCS
|
||||
Distribution.Client.Version
|
||||
Distribution.Client.Win32SelfUpgrade
|
||||
|
||||
build-depends:
|
||||
async >= 2.0 && < 2.3,
|
||||
array >= 0.4 && < 0.6,
|
||||
base16-bytestring >= 0.1.1 && < 1.1.0.0,
|
||||
binary >= 0.7.3 && < 0.9,
|
||||
bytestring >= 0.10.6.0 && < 0.13,
|
||||
containers >= 0.5.6.2 && < 0.8,
|
||||
cryptohash-sha256 >= 0.11 && < 0.12,
|
||||
directory >= 1.3.7.0 && < 1.4,
|
||||
echo >= 0.1.3 && < 0.2,
|
||||
edit-distance >= 0.2.2 && < 0.3,
|
||||
exceptions >= 0.10.4 && < 0.11,
|
||||
filepath >= 1.4.0.0 && < 1.6,
|
||||
hashable >= 1.0 && < 1.5,
|
||||
HTTP >= 4000.1.5 && < 4000.5,
|
||||
mtl >= 2.0 && < 2.4,
|
||||
network-uri >= 2.6.0.2 && < 2.7,
|
||||
pretty >= 1.1 && < 1.2,
|
||||
process >= 1.2.3.0 && < 1.7,
|
||||
random >= 1.2 && < 1.3,
|
||||
stm >= 2.0 && < 2.6,
|
||||
tar >= 0.5.0.3 && < 0.7,
|
||||
time >= 1.5.0.1 && < 1.13,
|
||||
zlib >= 0.5.3 && < 0.8,
|
||||
hackage-security >= 0.6.2.0 && < 0.7,
|
||||
text >= 1.2.3 && < 1.3 || >= 2.0 && < 2.2,
|
||||
parsec >= 3.1.13.0 && < 3.2,
|
||||
regex-base >= 0.94.0.0 && <0.95,
|
||||
regex-posix >= 0.96.0.0 && <0.97,
|
||||
safe-exceptions >= 0.1.7.0 && < 0.2
|
||||
|
||||
if flag(native-dns)
|
||||
if os(windows)
|
||||
build-depends: windns >= 0.1.0 && < 0.2
|
||||
else
|
||||
build-depends: resolv >= 0.1.1 && < 0.3
|
||||
|
||||
if os(windows)
|
||||
-- newer directory for symlinks
|
||||
build-depends: Win32 >= 2.8 && < 3, directory >=1.3.1.0
|
||||
else
|
||||
build-depends: unix >= 2.5 && < 2.9
|
||||
|
||||
if flag(lukko)
|
||||
build-depends: lukko >= 0.1 && <0.2
|
||||
|
||||
-- pull in process version with fixed waitForProcess error
|
||||
if impl(ghc >=8.2)
|
||||
build-depends: process >= 1.6.15.0
|
||||
|
||||
|
||||
executable cabal
|
||||
import: warnings, base-dep
|
||||
main-is: Main.hs
|
||||
hs-source-dirs: main
|
||||
default-language: Haskell2010
|
||||
|
||||
ghc-options: -rtsopts -threaded
|
||||
|
||||
-- On AIX, some legacy BSD operations such as flock(2) are provided by libbsd.a
|
||||
if os(aix)
|
||||
extra-libraries: bsd
|
||||
|
||||
build-depends:
|
||||
cabal-install
|
||||
|
||||
-- Small, fast running tests.
|
||||
--
|
||||
test-suite unit-tests
|
||||
import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
|
||||
default-language: Haskell2010
|
||||
default-extensions: TypeOperators
|
||||
ghc-options: -rtsopts -threaded
|
||||
|
||||
type: exitcode-stdio-1.0
|
||||
main-is: UnitTests.hs
|
||||
hs-source-dirs: tests
|
||||
other-modules:
|
||||
UnitTests.Distribution.Client.ArbitraryInstances
|
||||
UnitTests.Distribution.Client.BuildReport
|
||||
UnitTests.Distribution.Client.Configure
|
||||
UnitTests.Distribution.Client.FetchUtils
|
||||
UnitTests.Distribution.Client.Get
|
||||
UnitTests.Distribution.Client.Glob
|
||||
UnitTests.Distribution.Client.GZipUtils
|
||||
UnitTests.Distribution.Client.IndexUtils
|
||||
UnitTests.Distribution.Client.IndexUtils.Timestamp
|
||||
UnitTests.Distribution.Client.Init
|
||||
UnitTests.Distribution.Client.Init.Golden
|
||||
UnitTests.Distribution.Client.Init.Interactive
|
||||
UnitTests.Distribution.Client.Init.NonInteractive
|
||||
UnitTests.Distribution.Client.Init.Simple
|
||||
UnitTests.Distribution.Client.Init.Utils
|
||||
UnitTests.Distribution.Client.Init.FileCreators
|
||||
UnitTests.Distribution.Client.InstallPlan
|
||||
UnitTests.Distribution.Client.JobControl
|
||||
UnitTests.Distribution.Client.ProjectConfig
|
||||
UnitTests.Distribution.Client.ProjectPlanning
|
||||
UnitTests.Distribution.Client.Store
|
||||
UnitTests.Distribution.Client.Tar
|
||||
UnitTests.Distribution.Client.Targets
|
||||
UnitTests.Distribution.Client.TreeDiffInstances
|
||||
UnitTests.Distribution.Client.UserConfig
|
||||
UnitTests.Distribution.Solver.Modular.Builder
|
||||
UnitTests.Distribution.Solver.Modular.RetryLog
|
||||
UnitTests.Distribution.Solver.Modular.Solver
|
||||
UnitTests.Distribution.Solver.Modular.DSL
|
||||
UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils
|
||||
UnitTests.Distribution.Solver.Modular.WeightedPSQ
|
||||
UnitTests.Distribution.Solver.Types.OptionalStanza
|
||||
UnitTests.Options
|
||||
UnitTests.TempTestDir
|
||||
|
||||
build-depends:
|
||||
array,
|
||||
bytestring,
|
||||
cabal-install,
|
||||
Cabal-tree-diff,
|
||||
Cabal-QuickCheck,
|
||||
containers,
|
||||
directory,
|
||||
filepath,
|
||||
mtl,
|
||||
network-uri >= 2.6.2.0 && <2.7,
|
||||
random,
|
||||
tar,
|
||||
time,
|
||||
zlib,
|
||||
tasty >= 1.2.3 && <1.6,
|
||||
tasty-golden >=2.3.1.1 && <2.4,
|
||||
tasty-quickcheck,
|
||||
tasty-hunit >= 0.10,
|
||||
tree-diff,
|
||||
QuickCheck >= 2.14.3 && <2.15
|
||||
|
||||
|
||||
-- Tests to run with a limited stack and heap size
|
||||
-- The test suite name must be keep short cause a longer one
|
||||
-- could make the build generating paths which exceeds the windows
|
||||
-- max path limit (still a problem for some ghc versions)
|
||||
test-suite mem-use-tests
|
||||
import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
|
||||
type: exitcode-stdio-1.0
|
||||
main-is: MemoryUsageTests.hs
|
||||
hs-source-dirs: tests
|
||||
default-language: Haskell2010
|
||||
|
||||
ghc-options: -threaded -rtsopts "-with-rtsopts=-M16M -K1K"
|
||||
|
||||
other-modules:
|
||||
UnitTests.Distribution.Solver.Modular.DSL
|
||||
UnitTests.Distribution.Solver.Modular.DSL.TestCaseUtils
|
||||
UnitTests.Distribution.Solver.Modular.MemoryUsage
|
||||
UnitTests.Options
|
||||
|
||||
build-depends:
|
||||
cabal-install,
|
||||
containers,
|
||||
tasty >= 1.2.3 && <1.6,
|
||||
tasty-hunit >= 0.10
|
||||
|
||||
|
||||
-- Integration tests that use the cabal-install code directly
|
||||
-- but still build whole projects
|
||||
test-suite integration-tests2
|
||||
import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
|
||||
ghc-options: -rtsopts -threaded
|
||||
type: exitcode-stdio-1.0
|
||||
main-is: IntegrationTests2.hs
|
||||
hs-source-dirs: tests
|
||||
default-language: Haskell2010
|
||||
|
||||
build-depends:
|
||||
bytestring,
|
||||
cabal-install,
|
||||
containers,
|
||||
directory,
|
||||
filepath,
|
||||
tasty >= 1.2.3 && <1.6,
|
||||
tasty-hunit >= 0.10,
|
||||
tagged
|
||||
|
||||
test-suite long-tests
|
||||
import: warnings, base-dep, cabal-dep, cabal-syntax-dep, cabal-install-solver-dep
|
||||
ghc-options: -rtsopts -threaded
|
||||
type: exitcode-stdio-1.0
|
||||
hs-source-dirs: tests
|
||||
main-is: LongTests.hs
|
||||
default-language: Haskell2010
|
||||
|
||||
other-modules:
|
||||
UnitTests.Distribution.Client.ArbitraryInstances
|
||||
UnitTests.Distribution.Client.Described
|
||||
UnitTests.Distribution.Client.DescribedInstances
|
||||
UnitTests.Distribution.Client.FileMonitor
|
||||
UnitTests.Distribution.Client.VCS
|
||||
UnitTests.Distribution.Solver.Modular.DSL
|
||||
UnitTests.Distribution.Solver.Modular.QuickCheck
|
||||
UnitTests.Distribution.Solver.Modular.QuickCheck.Utils
|
||||
UnitTests.Options
|
||||
UnitTests.TempTestDir
|
||||
|
||||
build-depends:
|
||||
Cabal-QuickCheck,
|
||||
Cabal-described,
|
||||
cabal-install,
|
||||
containers,
|
||||
directory,
|
||||
filepath,
|
||||
hashable,
|
||||
mtl,
|
||||
network-uri >= 2.6.2.0 && <2.7,
|
||||
random,
|
||||
tagged,
|
||||
tasty >= 1.2.3 && <1.6,
|
||||
tasty-expected-failure,
|
||||
tasty-hunit >= 0.10,
|
||||
tasty-quickcheck,
|
||||
QuickCheck >= 2.14 && <2.15,
|
||||
pretty-show >= 1.6.15
|
||||
|
|
@ -1,58 +1,113 @@
|
|||
# generated by cabal-rpm-2.0.9
|
||||
# generated by cabal-rpm-2.3.0 --subpackage
|
||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/
|
||||
|
||||
Name: cabal-install
|
||||
Version: 3.2.0.0
|
||||
Release: 9%{?dist}
|
||||
%global pkg_name cabal-install
|
||||
%global pkgver %{pkg_name}-%{version}
|
||||
%{?haskell_setup}
|
||||
|
||||
%global cabalinstallsolver cabal-install-solver-3.10.3.0
|
||||
|
||||
%global subpkgs %{cabalinstallsolver}
|
||||
|
||||
# testsuite missing deps: Cabal-QuickCheck Cabal-tree-diff tasty-golden tree-diff Cabal-described tasty-expected-failure
|
||||
|
||||
Name: %{pkg_name}
|
||||
Version: 3.10.3.0
|
||||
# can only be reset when subpkg bumped
|
||||
Release: 4%{?dist}
|
||||
Summary: The command-line interface for Cabal and Hackage
|
||||
|
||||
License: BSD
|
||||
Url: https://hackage.haskell.org/package/%{name}
|
||||
License: BSD-3-Clause
|
||||
URL: https://hackage.haskell.org/package/cabal-install
|
||||
# Begin cabal-rpm sources:
|
||||
Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
|
||||
Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz
|
||||
Source1: https://hackage.haskell.org/package/%{cabalinstallsolver}/%{cabalinstallsolver}.tar.gz
|
||||
Source2: https://hackage.haskell.org/package/%{pkgver}/%{name}.cabal#/%{pkgver}.cabal
|
||||
# End cabal-rpm sources
|
||||
Source10: cabal-install.sh
|
||||
# backport sdist fix from https://github.com/haskell/cabal/issues/5813
|
||||
Patch0: https://github.com/haskell/cabal/commit/442869918260a7bb3f0cb0698eaeaeb6dae2c4f6.patch
|
||||
# https://build.opensuse.org/package/view_file/openSUSE:Factory/cabal-install/ghc-8.10-support-for-3.2.patch
|
||||
Patch1: cabal-3.2-ghc-8.10-opensuse.patch
|
||||
Patch2: https://github.com/haskell/cabal/commit/83983fcc4ba16d7969ba36f4174daf27de00a38e.patch
|
||||
|
||||
# Begin cabal-rpm deps:
|
||||
BuildRequires: ghc-rpm-macros
|
||||
BuildRequires: ghc-Cabal-static
|
||||
BuildRequires: ghc-HTTP-static
|
||||
BuildRequires: ghc-array-static
|
||||
BuildRequires: ghc-async-static
|
||||
BuildRequires: ghc-base-static
|
||||
BuildRequires: ghc-base16-bytestring-static
|
||||
BuildRequires: ghc-binary-static
|
||||
BuildRequires: ghc-bytestring-static
|
||||
BuildRequires: ghc-containers-static
|
||||
BuildRequires: ghc-cryptohash-sha256-static
|
||||
BuildRequires: ghc-deepseq-static
|
||||
BuildRequires: ghc-directory-static
|
||||
BuildRequires: ghc-echo-static
|
||||
BuildRequires: ghc-edit-distance-static
|
||||
BuildRequires: ghc-filepath-static
|
||||
BuildRequires: ghc-hackage-security-static
|
||||
BuildRequires: ghc-hashable-static
|
||||
BuildRequires: ghc-lukko-static
|
||||
BuildRequires: ghc-mtl-static
|
||||
BuildRequires: ghc-network-static
|
||||
BuildRequires: ghc-network-uri-static
|
||||
BuildRequires: ghc-parsec-static
|
||||
BuildRequires: ghc-pretty-static
|
||||
BuildRequires: ghc-process-static
|
||||
BuildRequires: ghc-random-static
|
||||
BuildRequires: ghc-resolv-static
|
||||
BuildRequires: ghc-stm-static
|
||||
BuildRequires: ghc-tar-static
|
||||
BuildRequires: ghc-text-static
|
||||
BuildRequires: ghc-time-static
|
||||
BuildRequires: ghc-transformers-static
|
||||
BuildRequires: ghc-unix-static
|
||||
BuildRequires: ghc-zlib-static
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: ghc-rpm-macros-extra
|
||||
BuildRequires: ghc-Cabal-devel
|
||||
BuildRequires: ghc-Cabal-syntax-devel
|
||||
BuildRequires: ghc-HTTP-devel
|
||||
BuildRequires: ghc-array-devel
|
||||
BuildRequires: ghc-async-devel
|
||||
BuildRequires: ghc-base-devel
|
||||
BuildRequires: ghc-base16-bytestring-devel
|
||||
BuildRequires: ghc-binary-devel
|
||||
BuildRequires: ghc-bytestring-devel
|
||||
#BuildRequires: ghc-cabal-install-solver-devel
|
||||
BuildRequires: ghc-containers-devel
|
||||
BuildRequires: ghc-cryptohash-sha256-devel
|
||||
BuildRequires: ghc-directory-devel
|
||||
BuildRequires: ghc-echo-devel
|
||||
BuildRequires: ghc-edit-distance-devel
|
||||
BuildRequires: ghc-exceptions-devel
|
||||
BuildRequires: ghc-filepath-devel
|
||||
BuildRequires: ghc-hackage-security-devel
|
||||
BuildRequires: ghc-hashable-devel
|
||||
BuildRequires: ghc-lukko-devel
|
||||
BuildRequires: ghc-mtl-devel
|
||||
BuildRequires: ghc-network-uri-devel
|
||||
BuildRequires: ghc-parsec-devel
|
||||
BuildRequires: ghc-pretty-devel
|
||||
BuildRequires: ghc-process-devel
|
||||
BuildRequires: ghc-random-devel
|
||||
BuildRequires: ghc-regex-base-devel
|
||||
BuildRequires: ghc-regex-posix-devel
|
||||
BuildRequires: ghc-resolv-devel
|
||||
BuildRequires: ghc-safe-exceptions-devel
|
||||
BuildRequires: ghc-stm-devel
|
||||
BuildRequires: ghc-tar-devel
|
||||
BuildRequires: ghc-text-devel
|
||||
BuildRequires: ghc-time-devel
|
||||
BuildRequires: ghc-unix-devel
|
||||
BuildRequires: ghc-zlib-devel
|
||||
%if %{with ghc_prof}
|
||||
BuildRequires: ghc-Cabal-prof
|
||||
BuildRequires: ghc-Cabal-syntax-prof
|
||||
BuildRequires: ghc-HTTP-prof
|
||||
BuildRequires: ghc-array-prof
|
||||
BuildRequires: ghc-async-prof
|
||||
BuildRequires: ghc-base-prof
|
||||
BuildRequires: ghc-base16-bytestring-prof
|
||||
BuildRequires: ghc-binary-prof
|
||||
BuildRequires: ghc-bytestring-prof
|
||||
#BuildRequires: ghc-cabal-install-solver-prof
|
||||
BuildRequires: ghc-containers-prof
|
||||
BuildRequires: ghc-cryptohash-sha256-prof
|
||||
BuildRequires: ghc-directory-prof
|
||||
BuildRequires: ghc-echo-prof
|
||||
BuildRequires: ghc-edit-distance-prof
|
||||
BuildRequires: ghc-exceptions-prof
|
||||
BuildRequires: ghc-filepath-prof
|
||||
BuildRequires: ghc-hackage-security-prof
|
||||
BuildRequires: ghc-hashable-prof
|
||||
BuildRequires: ghc-lukko-prof
|
||||
BuildRequires: ghc-mtl-prof
|
||||
BuildRequires: ghc-network-uri-prof
|
||||
BuildRequires: ghc-parsec-prof
|
||||
BuildRequires: ghc-pretty-prof
|
||||
BuildRequires: ghc-process-prof
|
||||
BuildRequires: ghc-random-prof
|
||||
BuildRequires: ghc-regex-base-prof
|
||||
BuildRequires: ghc-regex-posix-prof
|
||||
BuildRequires: ghc-resolv-prof
|
||||
BuildRequires: ghc-safe-exceptions-prof
|
||||
BuildRequires: ghc-stm-prof
|
||||
BuildRequires: ghc-tar-prof
|
||||
BuildRequires: ghc-text-prof
|
||||
BuildRequires: ghc-time-prof
|
||||
BuildRequires: ghc-unix-prof
|
||||
BuildRequires: ghc-zlib-prof
|
||||
%endif
|
||||
# for missing dep 'cabal-install-solver':
|
||||
BuildRequires: ghc-transformers-devel
|
||||
%if %{with ghc_prof}
|
||||
BuildRequires: ghc-transformers-prof
|
||||
%endif
|
||||
# End cabal-rpm deps
|
||||
|
||||
# for /etc/bash_completion.d/
|
||||
|
|
@ -73,27 +128,75 @@ software by automating the fetching, configuration, compilation and
|
|||
installation of Haskell libraries and programs.
|
||||
|
||||
|
||||
%package -n ghc-%{name}
|
||||
Summary: Haskell %{name} library
|
||||
|
||||
%description -n ghc-%{name}
|
||||
This package provides the Haskell %{name} shared library.
|
||||
|
||||
|
||||
%package -n ghc-%{name}-devel
|
||||
Summary: Haskell %{name} library development files
|
||||
Provides: ghc-%{name}-static = %{version}-%{release}
|
||||
Provides: ghc-%{name}-static%{?_isa} = %{version}-%{release}
|
||||
%if %{defined ghc_version}
|
||||
Requires: ghc-compiler = %{ghc_version}
|
||||
%endif
|
||||
Requires: ghc-%{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description -n ghc-%{name}-devel
|
||||
This package provides the Haskell %{name} library development files.
|
||||
|
||||
|
||||
%if %{with haddock}
|
||||
%package -n ghc-%{name}-doc
|
||||
Summary: Haskell %{name} library documentation
|
||||
BuildArch: noarch
|
||||
Requires: ghc-filesystem
|
||||
|
||||
%description -n ghc-%{name}-doc
|
||||
This package provides the Haskell %{name} library documentation.
|
||||
%endif
|
||||
|
||||
|
||||
%if %{with ghc_prof}
|
||||
%package -n ghc-%{name}-prof
|
||||
Summary: Haskell %{name} profiling library
|
||||
Requires: ghc-%{name}-devel%{?_isa} = %{version}-%{release}
|
||||
Supplements: (ghc-%{name}-devel and ghc-prof)
|
||||
|
||||
%description -n ghc-%{name}-prof
|
||||
This package provides the Haskell %{name} profiling library.
|
||||
%endif
|
||||
|
||||
|
||||
%global main_version %{version}
|
||||
|
||||
%if %{defined ghclibdir}
|
||||
%ghc_lib_subpackage -l BSD-3-Clause %{cabalinstallsolver}
|
||||
%endif
|
||||
|
||||
%global version %{main_version}
|
||||
|
||||
|
||||
%prep
|
||||
# Begin cabal-rpm setup:
|
||||
%setup -q
|
||||
%setup -q -a1
|
||||
dos2unix -k -n %{SOURCE2} %{name}.cabal
|
||||
# End cabal-rpm setup
|
||||
%patch0 -p2 -b .sdist
|
||||
%patch1 -p2 -b .ghc8.10
|
||||
#cabal-tweak-dep-ver base '< 4.14' '< 4.15'
|
||||
%patch2 -p2 -b .base16
|
||||
#cabal-tweak-dep-ver base16-bytestring '< 0.2' '< 2'
|
||||
cabal-tweak-dep-ver random '< 1.2' '< 1.3'
|
||||
|
||||
|
||||
%build
|
||||
# Begin cabal-rpm build:
|
||||
%ghc_bin_build
|
||||
%ghc_libs_build %{subpkgs}
|
||||
%ghc_lib_build
|
||||
# End cabal-rpm build
|
||||
|
||||
|
||||
%install
|
||||
# Begin cabal-rpm install
|
||||
%ghc_bin_install
|
||||
%ghc_libs_install %{subpkgs}
|
||||
%ghc_lib_install
|
||||
# End cabal-rpm install
|
||||
|
||||
install -pm 644 -D -t %{buildroot}%{_datadir}/bash-completion/completions/ bash-completion/cabal
|
||||
|
|
@ -109,10 +212,75 @@ install -pm 644 -D -t %{buildroot}%{_sysconfdir}/profile.d/ %{SOURCE10}
|
|||
# End cabal-rpm files
|
||||
%config(noreplace) %{_sysconfdir}/profile.d/cabal-install.sh
|
||||
%{_datadir}/bash-completion/completions/cabal
|
||||
%{_mandir}/man1/cabal.1*
|
||||
|
||||
|
||||
%files -n ghc-%{name} -f ghc-%{name}.files
|
||||
# Begin cabal-rpm files:
|
||||
%license LICENSE
|
||||
# End cabal-rpm files
|
||||
|
||||
|
||||
%files -n ghc-%{name}-devel -f ghc-%{name}-devel.files
|
||||
%doc README.md changelog
|
||||
|
||||
|
||||
%if %{with haddock}
|
||||
%files -n ghc-%{name}-doc -f ghc-%{name}-doc.files
|
||||
%license LICENSE
|
||||
%endif
|
||||
|
||||
|
||||
%if %{with ghc_prof}
|
||||
%files -n ghc-%{name}-prof -f ghc-%{name}-prof.files
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.3.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Sun Mar 30 2025 Jens Petersen <petersen@redhat.com> - 3.10.3.0-3
|
||||
- Rebuild
|
||||
|
||||
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.3.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Sun Jul 21 2024 Jens Petersen <petersen@redhat.com> - 3.10.3.0-1
|
||||
- https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.10.1.0.md
|
||||
- https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.10.2.0.md
|
||||
- https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.10.2.1.md
|
||||
- https://github.com/haskell/cabal/blob/master/release-notes/Cabal-3.10.3.0.md
|
||||
|
||||
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.8.1.0-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Thu Feb 15 2024 Jens Petersen <petersen@redhat.com> - 3.8.1.0-7
|
||||
- rebuild to fix s390x segfault (#2248097)
|
||||
|
||||
* Tue Jan 23 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.8.1.0-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.8.1.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sat Jan 6 2024 Jens Petersen <petersen@redhat.com> - 3.8.1.0-4
|
||||
- just use #8358 and #8627 to prevent redundant dist-newstyle/
|
||||
|
||||
* Sat Jan 6 2024 Jens Petersen <petersen@redhat.com> - 3.8.1.0-3
|
||||
- prevent dist-newstyle/ directory creation for cabal update
|
||||
https://github.com/haskell/cabal/issues/8589
|
||||
|
||||
* Fri Nov 3 2023 Jens Petersen <petersen@redhat.com> - 3.8.1.0-2
|
||||
- fix pkgconfig-depends detection failing with pkgconf-1.9
|
||||
|
||||
* Wed Jul 26 2023 Jens Petersen <petersen@redhat.com> - 3.8.1.0-1
|
||||
- https://hackage.haskell.org/package/cabal-install-3.8.1.0/changelog
|
||||
- package library and subpackage cabal-install-resolver
|
||||
|
||||
* Sun Jan 22 2023 Jens Petersen <petersen@redhat.com> - 3.6.2.0-1
|
||||
- https://hackage.haskell.org/package/cabal-install-3.6.2.0/changelog
|
||||
- refresh to cabal-rpm-2.1.0 with SPDX migration
|
||||
|
||||
* Fri Sep 16 2022 Jens Petersen <petersen@redhat.com> - 3.2.0.0-9
|
||||
- revert recommending ghcX.Y
|
||||
|
||||
|
|
|
|||
3
sources
3
sources
|
|
@ -1 +1,2 @@
|
|||
SHA512 (cabal-install-3.2.0.0.tar.gz) = ad937b2df42b688e4608aa2b91a25daf1042e5573626202e5182cbfeca9acc5933194853405a6396c60d0d28d6d0d5c5276fd85cb6acf4be2c8cd12afe747062
|
||||
SHA512 (cabal-install-3.10.3.0.tar.gz) = e004dfc05903316c3264aa7a056d287e25f0589fa9adea2e93114e1750f3ae9774177b5d274c78fee37b6ba4bd5c03455d72437258b168607c2a81856ef06ddb
|
||||
SHA512 (cabal-install-solver-3.10.3.0.tar.gz) = e8dcd0aaeb06ba5192536e3f51550bfa5239ca9377ae21c36dea377f79c28fe2c249381fb648f304d84d9a93c7b93793f44de23262ea907f710b28f7f548d13a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue