Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: haskell/cabal
...
head fork: haskell/cabal
  • 8 commits
  • 7 files changed
  • 0 commit comments
  • 4 contributors
View
4 Cabal/Cabal.cabal
@@ -1,5 +1,5 @@
Name: Cabal
-Version: 1.16.0.2
+Version: 1.16.0.3
Copyright: 2003-2006, Isaac Jones
2005-2011, Duncan Coutts
License: BSD3
@@ -149,7 +149,9 @@ test-suite unit-tests
PackageTests.TestOptions.Check,
PackageTests.TestStanza.Check,
PackageTests.TestSuiteExeV10.Check,
+ PackageTests.BenchmarkOptions.Check,
PackageTests.BenchmarkStanza.Check,
+ PackageTests.BenchmarkExeV10.Check,
PackageTests.TemplateHaskell.Check,
PackageTests.PackageTester
hs-source-dirs: tests
View
4 Cabal/Distribution/Simple/Build/PathsModule.hs
@@ -73,9 +73,9 @@ generate pkg_descr lbi =
"\n"++
foreign_imports++
"import qualified Control.Exception as Exception\n"++
- "import Data.Version (Version(Version, versionBranch, versionTags))\n"++
+ "import Data.Version (Version(..))\n"++
"import System.Environment (getEnv)\n"++
- "import Prelude ((++), FilePath, IO, return)\n"++
+ "import Prelude\n"++
"\n"++
"catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a\n"++
"catchIO = Exception.catch\n" ++
View
12 cabal-install/Distribution/Client/HttpUtils.hs
@@ -18,8 +18,8 @@ import Network.URI
import Network.Stream
( Result, ConnError(..) )
import Network.Browser
- ( Proxy (..), Authority (..), BrowserAction, browse
- , setOutHandler, setErrHandler, setProxy, setAuthorityGen, request)
+ ( Proxy (..), Authority(..), BrowserAction, browse, setAllowBasicAuth, setAuthorityGen
+ , setOutHandler, setErrHandler, setProxy, request)
import Control.Monad
( mplus, join, liftM, liftM2 )
import qualified Data.ByteString.Lazy.Char8 as ByteString
@@ -153,10 +153,10 @@ mkRequest uri = Request{ rqURI = uri
-- |Carry out a GET request, using the local proxy settings
getHTTP :: Verbosity -> URI -> IO (Result (Response ByteString))
getHTTP verbosity uri = liftM (\(_, resp) -> Right resp) $
- cabalBrowse verbosity (return ()) (request (mkRequest uri))
+ cabalBrowse verbosity Nothing (request (mkRequest uri))
cabalBrowse :: Verbosity
- -> BrowserAction s ()
+ -> Maybe (String, String)
-> BrowserAction s a
-> IO a
cabalBrowse verbosity auth act = do
@@ -165,8 +165,8 @@ cabalBrowse verbosity auth act = do
setProxy p
setErrHandler (warn verbosity . ("http error: "++))
setOutHandler (debug verbosity)
- auth
- setAuthorityGen (\_ _ -> return Nothing)
+ setAllowBasicAuth False
+ setAuthorityGen (\_ _ -> return auth)
act
downloadURI :: Verbosity
View
27 cabal-install/Distribution/Client/Upload.hs
@@ -15,12 +15,10 @@ import qualified Distribution.Client.BuildReports.Anonymous as BuildReport
import qualified Distribution.Client.BuildReports.Upload as BuildReport
import Network.Browser
- ( BrowserAction, request
- , Authority(..), addAuthority )
+ ( request )
import Network.HTTP
( Header(..), HeaderName(..), findHeader
, Request(..), RequestMethod(..), Response(..) )
-import Network.TCP (HandleStream)
import Network.URI (URI(uriPath), parseURI)
import Data.Char (intToDigit)
@@ -51,12 +49,7 @@ upload verbosity repos mUsername mPassword paths = do
else targetRepoURI{uriPath = uriPath targetRepoURI `FilePath.Posix.combine` "upload"}
Username username <- maybe promptUsername return mUsername
Password password <- maybe promptPassword return mPassword
- let auth = addAuthority AuthBasic {
- auRealm = "Hackage",
- auUsername = username,
- auPassword = password,
- auSite = uploadURI
- }
+ let auth = Just (username, password)
flip mapM_ paths $ \path -> do
notice verbosity $ "Uploading " ++ path ++ "... "
handlePackage verbosity uploadURI auth path
@@ -82,17 +75,9 @@ promptPassword = do
report :: Verbosity -> [Repo] -> Maybe Username -> Maybe Password -> IO ()
report verbosity repos mUsername mPassword = do
- let uploadURI = if isOldHackageURI targetRepoURI
- then legacyUploadURI
- else targetRepoURI{uriPath = ""}
Username username <- maybe promptUsername return mUsername
Password password <- maybe promptPassword return mPassword
- let auth = addAuthority AuthBasic {
- auRealm = "Hackage",
- auUsername = username,
- auPassword = password,
- auSite = uploadURI
- }
+ let auth = Just (username, password)
forM_ repos $ \repo -> case repoKind repo of
Left remoteRepo
-> do dotCabal <- defaultCabalDir
@@ -111,16 +96,14 @@ report verbosity repos mUsername mPassword = do
cabalBrowse verbosity auth $ BuildReport.uploadReports (remoteRepoURI remoteRepo) [(report', Just buildLog)]
return ()
Right{} -> return ()
- where
- targetRepoURI = remoteRepoURI $ last [ remoteRepo | Left remoteRepo <- map repoKind repos ] --FIXME: better error message when no repos are given
check :: Verbosity -> [FilePath] -> IO ()
check verbosity paths = do
flip mapM_ paths $ \path -> do
notice verbosity $ "Checking " ++ path ++ "... "
- handlePackage verbosity checkURI (return ()) path
+ handlePackage verbosity checkURI Nothing path
-handlePackage :: Verbosity -> URI -> BrowserAction (HandleStream String) ()
+handlePackage :: Verbosity -> URI -> Maybe (String, String)
-> FilePath -> IO ()
handlePackage verbosity uri auth path =
do req <- mkRequest uri path
View
2  cabal-install/bootstrap.sh
@@ -51,7 +51,7 @@ PARSEC_VER="3.1.3"; PARSEC_VER_REGEXP="[23]\." # == 2.* || == 3.*
DEEPSEQ_VER="1.3.0.1"; DEEPSEQ_VER_REGEXP="1\.[1-9]\." # >= 1.1 && < 2
TEXT_VER="0.11.2.3"; TEXT_VER_REGEXP="0\.([2-9]|(1[0-1]))\." # >= 0.2 && < 0.12
NETWORK_VER="2.3.1.1"; NETWORK_VER_REGEXP="2\." # == 2.*
-CABAL_VER="1.16.0.2"; CABAL_VER_REGEXP="1\.1[67]\." # >= 1.16 && < 1.18
+CABAL_VER="1.16.0.3"; CABAL_VER_REGEXP="1\.1[67]\." # >= 1.16 && < 1.18
TRANS_VER="0.3.0.0"; TRANS_VER_REGEXP="0\.[23]\." # >= 0.2.* && < 0.4.*
MTL_VER="2.1.2"; MTL_VER_REGEXP="[12]\." # == 1.* || == 2.*
HTTP_VER="4000.2.4"; HTTP_VER_REGEXP="4000\.[012]\." # == 4000.0.* || 4000.1.* || 4000.2.*
View
4 cabal-install/cabal-install.cabal
@@ -1,5 +1,5 @@
Name: cabal-install
-Version: 1.16.0.1
+Version: 1.16.1.0
Synopsis: The command-line interface for Cabal and Hackage.
Description:
The \'cabal\' command-line program simplifies the process of managing
@@ -110,7 +110,7 @@ Executable cabal
build-depends: base >= 2 && < 5,
Cabal >= 1.16.0 && < 1.18,
filepath >= 1.0 && < 1.4,
- network >= 1 && < 3,
+ network >= 1 && < 2.6,
HTTP >= 4000.0.2 && < 4001,
zlib >= 0.4 && < 0.6,
time >= 1.1 && < 1.5,
View
3  cabal-install/changelog
@@ -1,4 +1,7 @@
-*-change-log-*-
+1.16.1.0 Ryan Thomas <ryan@ryant.org> May 2015
+ * More restrictive upper bound on network.
+ * Force cabal upload to always use digest auth and never basic auth.
0.14.0 Andres Loeh <andres@well-typed.com> April 2012
* Works with ghc-7.4

No commit comments for this range

Something went wrong with that request. Please try again.