Hello community, here is the log from the commit of package cabal-install for openSUSE:Factory checked in at 2015-05-21 08:11:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cabal-install (Old) and /work/SRC/openSUSE:Factory/.cabal-install.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cabal-install" Changes: -------- --- /work/SRC/openSUSE:Factory/cabal-install/cabal-install.changes 2014-11-26 20:54:35.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.cabal-install.new/cabal-install.changes 2015-05-21 08:11:39.000000000 +0200 @@ -1,0 +2,16 @@ +Sun May 10 18:03:14 UTC 2015 - [email protected] + +- update to 1.18.1.0 +* Force cabal upload to always use digest auth and never basic auth. +* Merge pull request #2367 from juhp/patch-2 +* Fix bootstrap.sh by bumping HTTP to 4000.2.16.1 + +------------------------------------------------------------------- +Fri Apr 10 14:02:23 UTC 2015 - [email protected] + +- update to 1.18.0.8 +* Support random 1.1. +* Fix bootstrap script after network package split. +* Support network-2.6 in test suite. + +------------------------------------------------------------------- Old: ---- cabal-install-1.18.0.5.tar.gz New: ---- cabal-install-1.18.1.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cabal-install.spec ++++++ --- /var/tmp/diff_new_pack.vYPgVO/_old 2015-05-21 08:11:42.000000000 +0200 +++ /var/tmp/diff_new_pack.vYPgVO/_new 2015-05-21 08:11:42.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package cabal-install # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,14 +17,14 @@ Name: cabal-install -Version: 1.18.0.5 +Version: 1.18.1.0 Release: 0 Summary: The command-line interface for Cabal and Hackage License: BSD-3-Clause Group: Development/Languages/Other Url: http://hackage.haskell.org/package/%{name} -Source0: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz +Source0: http://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: ghc-Cabal-devel @@ -38,6 +38,7 @@ BuildRequires: ghc-filepath-devel BuildRequires: ghc-mtl-devel BuildRequires: ghc-network-devel +BuildRequires: ghc-network-uri-devel BuildRequires: ghc-pretty-devel BuildRequires: ghc-process-devel BuildRequires: ghc-random-devel ++++++ cabal-install-1.18.0.5.tar.gz -> cabal-install-1.18.1.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-install-1.18.0.5/Distribution/Client/Config.hs new/cabal-install-1.18.1.0/Distribution/Client/Config.hs --- old/cabal-install-1.18.0.5/Distribution/Client/Config.hs 2014-07-14 15:27:50.000000000 +0200 +++ new/cabal-install-1.18.1.0/Distribution/Client/Config.hs 2015-05-05 22:12:45.000000000 +0200 @@ -134,16 +134,179 @@ savedReportFlags = mempty } mappend a b = SavedConfig { - savedGlobalFlags = combine savedGlobalFlags, - savedInstallFlags = combine savedInstallFlags, - savedConfigureFlags = combine savedConfigureFlags, - savedConfigureExFlags = combine savedConfigureExFlags, - savedUserInstallDirs = combine savedUserInstallDirs, - savedGlobalInstallDirs = combine savedGlobalInstallDirs, - savedUploadFlags = combine savedUploadFlags, - savedReportFlags = combine savedReportFlags + savedGlobalFlags = combinedSavedGlobalFlags, + savedInstallFlags = combinedSavedInstallFlags, + savedConfigureFlags = combinedSavedConfigureFlags, + savedConfigureExFlags = combinedSavedConfigureExFlags, + savedUserInstallDirs = combinedSavedUserInstallDirs, + savedGlobalInstallDirs = combinedSavedGlobalInstallDirs, + savedUploadFlags = combinedSavedUploadFlags, + savedReportFlags = combinedSavedReportFlags } - where combine field = field a `mappend` field b + where + -- This is ugly, but necessary. If we're mappending two config files, we + -- want the values of the *non-empty* list fields from the second one to + -- *override* the corresponding values from the first one. Default + -- behaviour (concatenation) is confusing and makes some use cases (see + -- #1884) impossible. + -- + -- However, we also want to allow specifying multiple values for a list + -- field in a *single* config file. For example, we want the following to + -- continue to work: + -- + -- remote-repo: hackage.haskell.org:http://hackage.haskell.org/ + -- remote-repo: private-collection:http://hackage.local/ + -- + -- So we can't just wrap the list fields inside Flags; we have to do some + -- special-casing just for SavedConfig. + + -- NB: the signature prevents us from using 'combine' on lists. + combine' :: (SavedConfig -> flags) -> (flags -> Flag a) -> Flag a + combine' field subfield = + (subfield . field $ a) `mappend` (subfield . field $ b) + + lastNonEmpty' :: (SavedConfig -> flags) -> (flags -> [a]) -> [a] + lastNonEmpty' field subfield = + let a' = subfield . field $ a + b' = subfield . field $ b + in case b' of [] -> a' + _ -> b' + + lastNonEmptyNL' :: (SavedConfig -> flags) -> (flags -> [a]) + -> [a] + lastNonEmptyNL' field subfield = + let a' = subfield . field $ a + b' = subfield . field $ b + in case b' of [] -> a' + _ -> b' + + combinedSavedGlobalFlags = GlobalFlags { + globalVersion = combine globalVersion, + globalNumericVersion = combine globalNumericVersion, + globalConfigFile = combine globalConfigFile, + globalSandboxConfigFile = combine globalSandboxConfigFile, + globalRemoteRepos = lastNonEmptyNL globalRemoteRepos, + globalCacheDir = combine globalCacheDir, + globalLocalRepos = lastNonEmptyNL globalLocalRepos, + globalLogsDir = combine globalLogsDir, + globalWorldFile = combine globalWorldFile + } + where + combine = combine' savedGlobalFlags + lastNonEmptyNL = lastNonEmptyNL' savedGlobalFlags + + combinedSavedInstallFlags = InstallFlags { + installDocumentation = combine installDocumentation, + installHaddockIndex = combine installHaddockIndex, + installDryRun = combine installDryRun, + installMaxBackjumps = combine installMaxBackjumps, + installReorderGoals = combine installReorderGoals, + installIndependentGoals = combine installIndependentGoals, + installShadowPkgs = combine installShadowPkgs, + installStrongFlags = combine installStrongFlags, + installReinstall = combine installReinstall, + installAvoidReinstalls = combine installAvoidReinstalls, + installOverrideReinstall = combine installOverrideReinstall, + installUpgradeDeps = combine installUpgradeDeps, + installOnly = combine installOnly, + installOnlyDeps = combine installOnlyDeps, + installRootCmd = combine installRootCmd, + installSummaryFile = lastNonEmptyNL installSummaryFile, + installLogFile = combine installLogFile, + installBuildReports = combine installBuildReports, + installSymlinkBinDir = combine installSymlinkBinDir, + installOneShot = combine installOneShot, + installNumJobs = combine installNumJobs + } + where + combine = combine' savedInstallFlags + lastNonEmptyNL = lastNonEmptyNL' savedInstallFlags + + combinedSavedConfigureFlags = ConfigFlags { + configPrograms = configPrograms . savedConfigureFlags $ b, + -- TODO: NubListify + configProgramPaths = lastNonEmpty configProgramPaths, + -- TODO: NubListify + configProgramArgs = lastNonEmpty configProgramArgs, + configProgramPathExtra = lastNonEmptyNL configProgramPathExtra, + configHcFlavor = combine configHcFlavor, + configHcPath = combine configHcPath, + configHcPkg = combine configHcPkg, + configVanillaLib = combine configVanillaLib, + configProfLib = combine configProfLib, + configSharedLib = combine configSharedLib, + configDynExe = combine configDynExe, + configProfExe = combine configProfExe, + -- TODO: NubListify + configConfigureArgs = lastNonEmpty configConfigureArgs, + configOptimization = combine configOptimization, + configProgPrefix = combine configProgPrefix, + configProgSuffix = combine configProgSuffix, + -- Parametrised by (Flag PathTemplate), so safe to use 'mappend'. + configInstallDirs = + (configInstallDirs . savedConfigureFlags $ a) + `mappend` (configInstallDirs . savedConfigureFlags $ b), + configScratchDir = combine configScratchDir, + -- TODO: NubListify + configExtraLibDirs = lastNonEmpty configExtraLibDirs, + -- TODO: NubListify + configExtraIncludeDirs = lastNonEmpty configExtraIncludeDirs, + configDistPref = combine configDistPref, + configVerbosity = combine configVerbosity, + configUserInstall = combine configUserInstall, + -- TODO: NubListify + configPackageDBs = lastNonEmpty configPackageDBs, + configGHCiLib = combine configGHCiLib, + configSplitObjs = combine configSplitObjs, + configStripExes = combine configStripExes, + configConstraints = lastNonEmpty configConstraints, + configConfigurationsFlags = lastNonEmpty configConfigurationsFlags, + configTests = combine configTests, + configBenchmarks = combine configBenchmarks, + configLibCoverage = combine configLibCoverage + } + where + combine = combine' savedConfigureFlags + lastNonEmpty = lastNonEmpty' savedConfigureFlags + lastNonEmptyNL = lastNonEmptyNL' savedConfigureFlags + + combinedSavedConfigureExFlags = ConfigExFlags { + configCabalVersion = combine configCabalVersion, + -- TODO: NubListify + configExConstraints = lastNonEmpty configExConstraints, + -- TODO: NubListify + configPreferences = lastNonEmpty configPreferences, + configSolver = combine configSolver + } + where + combine = combine' savedConfigureExFlags + lastNonEmpty = lastNonEmpty' savedConfigureExFlags + + -- Parametrised by (Flag PathTemplate), so safe to use 'mappend'. + combinedSavedUserInstallDirs = savedUserInstallDirs a + `mappend` savedUserInstallDirs b + + -- Parametrised by (Flag PathTemplate), so safe to use 'mappend'. + combinedSavedGlobalInstallDirs = savedGlobalInstallDirs a + `mappend` savedGlobalInstallDirs b + + combinedSavedUploadFlags = UploadFlags { + uploadCheck = combine uploadCheck, + uploadUsername = combine uploadUsername, + uploadPassword = combine uploadPassword, + uploadVerbosity = combine uploadVerbosity + } + where + combine = combine' savedUploadFlags + + combinedSavedReportFlags = ReportFlags { + reportUsername = combine reportUsername, + reportPassword = combine reportPassword, + reportVerbosity = combine reportVerbosity + } + where + combine = combine' savedReportFlags + updateInstallDirs :: Flag Bool -> SavedConfig -> SavedConfig updateInstallDirs userInstallFlag diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-install-1.18.0.5/Distribution/Client/HttpUtils.hs new/cabal-install-1.18.1.0/Distribution/Client/HttpUtils.hs --- old/cabal-install-1.18.0.5/Distribution/Client/HttpUtils.hs 2014-07-14 15:27:50.000000000 +0200 +++ new/cabal-install-1.18.1.0/Distribution/Client/HttpUtils.hs 2015-05-05 22:12:45.000000000 +0200 @@ -17,8 +17,8 @@ import Network.URI ( URI (..), URIAuth (..) ) import Network.Browser - ( BrowserAction, browse - , setOutHandler, setErrHandler, setProxy, setAuthorityGen, request) + ( BrowserAction, browse, setAllowBasicAuth, setAuthorityGen + , setOutHandler, setErrHandler, setProxy, request) import Network.Stream ( Result, ConnError(..) ) import Control.Monad @@ -76,10 +76,10 @@ -> Maybe String -- ^ Optional etag to check if we already have the latest file. -> IO (Result (Response ByteString)) getHTTP verbosity uri etag = liftM (\(_, resp) -> Right resp) $ - cabalBrowse verbosity (return ()) (request (mkRequest uri etag)) + cabalBrowse verbosity Nothing (request (mkRequest uri etag)) cabalBrowse :: Verbosity - -> BrowserAction s () + -> Maybe (String, String) -> BrowserAction s a -> IO a cabalBrowse verbosity auth act = do @@ -88,8 +88,8 @@ setProxy p setErrHandler (warn verbosity . ("http error: "++)) setOutHandler (debug verbosity) - auth - setAuthorityGen (\_ _ -> return Nothing) + setAllowBasicAuth False + setAuthorityGen (\_ _ -> return auth) act downloadURI :: Verbosity diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-install-1.18.0.5/Distribution/Client/Upload.hs new/cabal-install-1.18.1.0/Distribution/Client/Upload.hs --- old/cabal-install-1.18.0.5/Distribution/Client/Upload.hs 2014-07-14 15:27:50.000000000 +0200 +++ new/cabal-install-1.18.1.0/Distribution/Client/Upload.hs 2015-05-05 22:12:45.000000000 +0200 @@ -15,12 +15,10 @@ 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 @@ 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 @@ 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 @@ 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-install-1.18.0.5/Main.hs new/cabal-install-1.18.1.0/Main.hs --- old/cabal-install-1.18.0.5/Main.hs 2014-07-14 15:27:50.000000000 +0200 +++ new/cabal-install-1.18.1.0/Main.hs 2015-05-05 22:12:45.000000000 +0200 @@ -708,7 +708,7 @@ unless (null extraArgs) $ die $ "'update' doesn't take any extra arguments: " ++ unwords extraArgs let verbosity = fromFlag verbosityFlag - config <- loadConfig verbosity (globalConfigFile globalFlags) mempty + (_useSandbox, config) <- loadConfigOrSandboxConfig verbosity globalFlags NoFlag let globalFlags' = savedGlobalFlags config `mappend` globalFlags update verbosity (globalRepos globalFlags') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-install-1.18.0.5/bootstrap.sh new/cabal-install-1.18.1.0/bootstrap.sh --- old/cabal-install-1.18.0.5/bootstrap.sh 2014-07-14 15:27:50.000000000 +0200 +++ new/cabal-install-1.18.1.0/bootstrap.sh 2015-05-05 22:12:45.000000000 +0200 @@ -52,15 +52,16 @@ PARSEC_VER="3.1.5"; PARSEC_VER_REGEXP="[23]\." # == 2.* || == 3.* DEEPSEQ_VER="1.3.0.2"; DEEPSEQ_VER_REGEXP="1\.[1-9]\." # >= 1.1 && < 2 TEXT_VER="1.1.0.0"; TEXT_VER_REGEXP="((1\.[01]\.)|(0\.([2-9]|(1[0-1]))\.))" # >= 0.2 && < 1.2 -NETWORK_VER="2.4.2.2"; NETWORK_VER_REGEXP="2\." # == 2.* -CABAL_VER="1.18.1.3"; CABAL_VER_REGEXP="1\.1[89]\." # >= 1.18 && < 1.20 +NETWORK_VER="2.6.0.2"; NETWORK_VER_REGEXP="2\." # == 2.* +CABAL_VER="1.18.1.6"; CABAL_VER_REGEXP="1\.1[89]\." # >= 1.18 && < 1.20 TRANS_VER="0.3.0.0"; TRANS_VER_REGEXP="0\.[23]\." # >= 0.2.* && < 0.4.* MTL_VER="2.1.2"; MTL_VER_REGEXP="[2]\." # == 2.* -HTTP_VER="4000.2.11"; HTTP_VER_REGEXP="4000\.[012]\." # == 4000.0.* || 4000.1.* || 4000.2.* +HTTP_VER="4000.2.16.1"; HTTP_VER_REGEXP="4000\.[012]\." # == 4000.0.* || 4000.1.* || 4000.2.* ZLIB_VER="0.5.4.1"; ZLIB_VER_REGEXP="0\.[45]\." # == 0.4.* || == 0.5.* -TIME_VER="1.4.1" TIME_VER_REGEXP="1\.[1234]\.?" # >= 1.1 && < 1.5 -RANDOM_VER="1.0.1.1" RANDOM_VER_REGEXP="1\.0\." # >= 1 && < 1.1 +TIME_VER="1.4.1"; TIME_VER_REGEXP="1\.[12345]\.?" # >= 1.1 && < 1.6 +RANDOM_VER="1.0.1.1"; RANDOM_VER_REGEXP="1\.0\." # >= 1 && < 1.1 STM_VER="2.4.2"; STM_VER_REGEXP="2\." # == 2.* +NETWORK_URI_VER="2.6.0.1"; NETWORK_URI_VER_REGEXP="2\.[6-9]\." # >= 2.6 HACKAGE_URL="http://hackage.haskell.org/packages/archive" @@ -188,6 +189,25 @@ fi } +# Replicate the flag selection logic for network-uri in the .cabal file. +do_network_uri_pkg () { + # Refresh installed package list. + ${GHC_PKG} list --global ${SCOPE_OF_INSTALLATION} > ghc-pkg-stage2.list \ + || die "running '${GHC_PKG} list' failed" + + NETWORK_URI_DUMMY_VER="2.5.0.0"; NETWORK_URI_DUMMY_VER_REGEXP="2\.5\." # < 2.6 + if egrep " network-2\.[6-9]\." ghc-pkg-stage2.list > /dev/null 2>&1 + then + # Use network >= 2.6 && network-uri >= 2.6 + info_pkg "network-uri" ${NETWORK_URI_VER} ${NETWORK_URI_VER_REGEXP} + do_pkg "network-uri" ${NETWORK_URI_VER} ${NETWORK_URI_VER_REGEXP} + else + # Use network < 2.6 && network-uri < 2.6 + info_pkg "network-uri" ${NETWORK_URI_DUMMY_VER} ${NETWORK_URI_DUMMY_VER_REGEXP} + do_pkg "network-uri" ${NETWORK_URI_DUMMY_VER} ${NETWORK_URI_DUMMY_VER_REGEXP} + fi +} + # Actually do something! info_pkg "deepseq" ${DEEPSEQ_VER} ${DEEPSEQ_VER_REGEXP} @@ -211,6 +231,10 @@ do_pkg "text" ${TEXT_VER} ${TEXT_VER_REGEXP} do_pkg "parsec" ${PARSEC_VER} ${PARSEC_VER_REGEXP} do_pkg "network" ${NETWORK_VER} ${NETWORK_VER_REGEXP} + +# We conditionally install network-uri, depending on the network version. +do_network_uri_pkg + do_pkg "HTTP" ${HTTP_VER} ${HTTP_VER_REGEXP} do_pkg "zlib" ${ZLIB_VER} ${ZLIB_VER_REGEXP} do_pkg "random" ${RANDOM_VER} ${RANDOM_VER_REGEXP} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-install-1.18.0.5/cabal-install.cabal new/cabal-install-1.18.1.0/cabal-install.cabal --- old/cabal-install-1.18.0.5/cabal-install.cabal 2014-07-14 15:27:50.000000000 +0200 +++ new/cabal-install-1.18.1.0/cabal-install.cabal 2015-05-05 22:12:45.000000000 +0200 @@ -1,5 +1,5 @@ Name: cabal-install -Version: 1.18.0.5 +Version: 1.18.1.0 Synopsis: The command-line interface for Cabal and Hackage. Description: The \'cabal\' command-line program simplifies the process of managing @@ -34,6 +34,10 @@ description: Use directory < 1.2 and old-time default: False +flag network-uri + description: Get Network.URI from the network-uri package + default: True + executable cabal main-is: Main.hs ghc-options: -Wall -fwarn-tabs @@ -124,9 +128,9 @@ mtl >= 2.0 && < 3, network >= 1 && < 3, pretty >= 1 && < 1.2, - random >= 1 && < 1.1, + random >= 1 && < 1.2, stm >= 2.0 && < 3, - time >= 1.1 && < 1.5, + time >= 1.1 && < 1.6, zlib >= 0.5.3 && < 0.6 if flag(old-directory) @@ -136,6 +140,11 @@ build-depends: directory >= 1.2 && < 1.3, process >= 1.1.0.2 && < 1.3 + if flag(network-uri) + build-depends: network-uri >= 2.6, network >= 2.6 + else + build-depends: network-uri < 2.6, network < 2.6 + if os(windows) build-depends: Win32 >= 2 && < 3 cpp-options: -DWIN32 @@ -167,14 +176,12 @@ Cabal, containers, mtl, - network, pretty, process, directory, filepath, stm, time, - network, HTTP, zlib, @@ -187,6 +194,11 @@ if flag(old-directory) build-depends: old-time + if flag(network-uri) + build-depends: network-uri >= 2.6, network >= 2.6 + else + build-depends: network-uri < 2.6, network < 2.6 + if os(windows) build-depends: Win32 cpp-options: -DWIN32
