stack: update to 2.1.3.1

Also adds a patch to add setup awareness for ppc(64(le)). This
does not mean stack now provides prebuilt toolchains for the
platforms, but at least it allows --system-ghc to work without
--skip-ghc-check (when a matching local toolchain is available).
This commit is contained in:
q66 2019-08-01 22:19:47 +02:00 committed by Leah Neukirchen
parent 2c0d1d47a9
commit 0f1dea6916
3 changed files with 40 additions and 155 deletions

View file

@ -1,147 +0,0 @@
--- src/Stack/Clean.hs 2018-11-18 14:02:03.000000000 +0100
+++ src/Stack/Clean.hs 2019-06-03 19:51:07.175718943 +0200
@@ -27,7 +27,7 @@
clean :: HasEnvConfig env => CleanOpts -> RIO env ()
clean cleanOpts = do
failures <- mapM cleanDir =<< dirsToDelete cleanOpts
- when (or failures) $ liftIO exitFailure
+ when (or failures) $ liftIO System.Exit.exitFailure
where
cleanDir dir =
liftIO (ignoringAbsence (removeDirRecur dir) >> return False) `catchAny` \ex -> do
--- src/Stack/Setup.hs 2018-11-18 14:02:03.000000000 +0100
+++ src/Stack/Setup.hs 2019-06-03 23:56:53.426968944 +0200
@@ -1118,7 +1118,7 @@
"The following directories may now contain files, but won't be used by stack:" <> line <>
" -" <+> display tempDir <> line <>
" -" <+> display destDir <> line
- liftIO exitFailure
+ liftIO System.Exit.exitFailure
logSticky $
"Unpacking GHC into " <>
@@ -1310,7 +1310,7 @@
buildInGhcjsEnv envConfig $ defaultBuildOptsCLI { boptsCLITargets = bootDepsToInstall }
let failedToFindErr = do
logError "This shouldn't happen, because it gets built to the snapshot bin directory, which should be treated as being on the PATH."
- liftIO exitFailure
+ liftIO System.Exit.exitFailure
when shouldInstallCabal $ do
mcabal' <- withProcessContext menv' getCabalInstallVersion
case mcabal' of
--- src/Stack/Docker.hs 2018-11-18 14:02:03.000000000 +0100
+++ src/Stack/Docker.hs 2019-06-04 00:10:26.066037829 +0200
@@ -200,7 +200,7 @@
throwIO OnlyOnHostException
| inContainer ->
liftIO (do inner
- exitSuccess)
+ System.Exit.exitSuccess)
| not (dockerEnable (configDocker config)) ->
do fromMaybeAction mbefore
liftIO inner
@@ -205,7 +205,7 @@
do fromMaybeAction mbefore
liftIO inner
fromMaybeAction mafter
- liftIO exitSuccess
+ liftIO System.Exit.exitSuccess
| otherwise ->
do fromMaybeAction mrelease
runContainerAndExit
@@ -376,7 +376,7 @@
#endif
)
case e of
- Left (ProcessExitedUnsuccessfully _ ec) -> liftIO (exitWith ec)
+ Left (ProcessExitedUnsuccessfully _ ec) -> liftIO (System.Exit.exitWith ec)
Right () -> do after
liftIO System.Exit.exitSuccess
where
@@ -378,7 +378,7 @@
case e of
Left (ProcessExitedUnsuccessfully _ ec) -> liftIO (exitWith ec)
Right () -> do after
- liftIO exitSuccess
+ liftIO System.Exit.exitSuccess
where
-- This is using a hash of the Docker repository (without tag or digest) to ensure
-- binaries/libraries aren't shared between Docker and host (or incompatible Docker images)
--- src/Stack/Hoogle.hs 2018-11-18 14:02:03.000000000 +0100
+++ src/Stack/Hoogle.hs 2019-06-04 01:16:35.000374265 +0200
@@ -150,7 +150,7 @@
(hoogleArgs ++ databaseArg)
runProcess_
bail :: RIO EnvConfig a
- bail = liftIO (exitWith (ExitFailure (-1)))
+ bail = liftIO (System.Exit.exitWith (ExitFailure (-1)))
checkDatabaseExists = do
path <- hoogleDatabasePath
liftIO (doesFileExist path)
--- src/main/Main.hs 2018-11-18 14:02:03.000000000 +0100
+++ src/main/Main.hs 2019-06-04 01:37:16.148479474 +0200
@@ -203,10 +203,10 @@
-- This special handler stops "stack: " from being printed before the
-- exception
case fromException e of
- Just ec -> exitWith ec
+ Just ec -> System.Exit.exitWith ec
Nothing -> do
hPrint stderr e
- exitFailure
+ System.Exit.exitFailure
-- Vertically combine only the error component of the first argument with the
-- error component of the second.
@@ -638,7 +638,7 @@
hPutStrLn stderr "Error: When building with stack, you should not use the -prof GHC option"
hPutStrLn stderr "Instead, please use --library-profiling and --executable-profiling"
hPutStrLn stderr "See: https://github.com/commercialhaskell/stack/issues/1015"
- exitFailure
+ System.Exit.exitFailure
case boptsCLIFileWatch opts of
FileWatchPoll -> fileWatchPoll stderr inner
FileWatch -> fileWatch stderr inner
@@ -710,13 +710,13 @@
, flow "Can't find:"
, line <> invalidList
]
- liftIO exitFailure
+ liftIO System.Exit.exitFailure
when (null files && null dirs) $ do
prettyErrorL
[ styleShell "stack upload"
, flow "expects a list of sdist tarballs or package directories, but none were specified."
]
- liftIO exitFailure
+ liftIO System.Exit.exitFailure
config <- view configL
let hackageUrl = T.unpack $ configHackageBaseUrl config
getCreds <- liftIO (runOnce (Upload.loadCreds config))
@@ -768,7 +768,7 @@
, display stackYaml
, flow "contains no packages, so no sdist tarballs will be generated."
]
- liftIO exitFailure
+ liftIO System.Exit.exitFailure
return dirs
else mapM resolveDir' (sdoptsDirsToWorkWith sdistOpts)
forM_ dirs' $ \dir -> do
@@ -848,7 +848,7 @@
-- should never happen as we have already installed the packages
_ -> liftIO $ do
hPutStrLn stderr ("Could not find package id of package " ++ name)
- exitFailure
+ System.Exit.exitFailure
getPkgOpts wc pkgs =
map ("-package-id=" ++) <$> mapM (getPkgId wc) pkgs
@@ -869,7 +869,7 @@
return (T.unpack exe', args')
_ -> do
logError "No executables found."
- liftIO exitFailure
+ liftIO System.Exit.exitFailure
getGhcCmd prefix pkgs args = do
wc <- view $ actualCompilerVersionL.whichCompilerL

View file

@ -0,0 +1,32 @@
--- src/Stack/Setup.hs
+++ src/Stack/Setup.hs
@@ -95,6 +95,7 @@ import System.IO.Error (isPermissionError)
import System.FilePath (searchPathSeparator)
import qualified System.FilePath as FP
import System.Permissions (setFileExecutable)
+import System.Endian (getSystemEndianness, Endianness (..))
import Text.Printf (printf)
import System.Uname (getRelease)
import Data.List.Split (splitOn)
@@ -1264,6 +1265,11 @@ getOSKey platform =
Platform X86_64 Cabal.Windows -> return "windows64"
Platform Arm Cabal.Linux -> return "linux-armv7"
Platform AArch64 Cabal.Linux -> return "linux-aarch64"
+ Platform PPC Cabal.Linux -> return "linux-powerpc"
+ Platform PPC64 Cabal.Linux ->
+ case getSystemEndianness of
+ LittleEndian -> return "linux-powerpc64le"
+ BigEndian -> return "linux-powerpc64"
Platform arch os -> throwM $ UnsupportedSetupCombo os arch
downloadFromInfo
--- stack.cabal
+++ stack.cabal
@@ -235,6 +235,7 @@ library
conduit >=1.3.0.3,
conduit-extra >=1.3.0,
containers >=0.5.10.2,
+ cpu >=0.1.2,
cryptonite >=0.25,
cryptonite-conduit >=0.2.2,
deepseq >=1.4.3.0,

View file

@ -1,19 +1,19 @@
# Template file for 'stack'
pkgname=stack
version=1.9.3
revision=3
_stackage="lts-13.2"
version=2.1.3.1
revision=1
_stackage="lts-13.30"
hostmakedepends="cabal-install pkg-config unzip"
makedepends="zlib-devel pcre-devel"
depends="git gmp-devel iana-etc"
short_desc="Cross-platform program for developing Haskell projects"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="3-clause-BSD"
homepage="http://haskellstack.org"
distfiles="https://github.com/commercialhaskell/${pkgname}/releases/download/v${version}/${pkgname}-${version}-sdist-1.tar.gz
license="BSD-3-Clause"
homepage="https://haskellstack.org"
distfiles="https://hackage.haskell.org/package/${pkgname}-${version}/${pkgname}-${version}.tar.gz
https://www.stackage.org/${_stackage}/cabal.config>cabal.config-${_stackage}"
checksum="14e06a71bf6fafbb2d468f83c70fd4e9490395207d6530ab7b9fc056f8972a46
6e8bfc4b0971cf536235350d967e4101b285640d708bc11ccfe424d94caf4194"
checksum="f983369a22a3e3af9ae09770cf34e4ba439cc7f5ef5a0e87f4db11c1ec5356e0
64852f4aaaa7dd6a9ed49c0bb1765a0f5d63e929f3c18a1bc0771daf6e1e1539"
skip_extraction="cabal.config-${_stackage}"
nocross=yes
nopie_files="/usr/bin/stack"