Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-cabal-install-solver for openSUSE:Factory checked in at 2024-10-28 15:18:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-cabal-install-solver (Old) and /work/SRC/openSUSE:Factory/.ghc-cabal-install-solver.new.2020 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "ghc-cabal-install-solver" Mon Oct 28 15:18:07 2024 rev:3 rq:1218539 version:3.10.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-cabal-install-solver/ghc-cabal-install-solver.changes 2023-11-23 21:43:07.892979494 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-cabal-install-solver.new.2020/ghc-cabal-install-solver.changes 2024-10-28 15:19:47.978150119 +0100 @@ -1,0 +2,9 @@ +Thu Mar 28 17:54:10 UTC 2024 - Peter Simons <psimons@suse.com> + +- Update cabal-install-solver to version 3.10.3.0 revision 1. + Upstream has edited the change log file since the last release in + a non-trivial way, i.e. they did more than just add a new entry + at the top. You can review the file at: + http://hackage.haskell.org/package/cabal-install-solver-3.10.3.0/src/ChangeL... + +------------------------------------------------------------------- Old: ---- cabal-install-solver-3.10.2.1.tar.gz New: ---- cabal-install-solver-3.10.3.0.tar.gz cabal-install-solver.cabal ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-cabal-install-solver.spec ++++++ --- /var/tmp/diff_new_pack.2YDtSs/_old 2024-10-28 15:19:48.974191600 +0100 +++ /var/tmp/diff_new_pack.2YDtSs/_new 2024-10-28 15:19:48.978191768 +0100 @@ -1,7 +1,7 @@ # # spec file for package ghc-cabal-install-solver # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,12 +20,13 @@ %global pkgver %{pkg_name}-%{version} %bcond_with tests Name: ghc-%{pkg_name} -Version: 3.10.2.1 +Version: 3.10.3.0 Release: 0 Summary: The command-line interface for Cabal and Hackage License: BSD-3-Clause URL: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz +Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal BuildRequires: ghc-Cabal-devel BuildRequires: ghc-Cabal-prof BuildRequires: ghc-Cabal-syntax-devel @@ -47,6 +48,8 @@ BuildRequires: ghc-pretty-devel BuildRequires: ghc-pretty-prof BuildRequires: ghc-rpm-macros +BuildRequires: ghc-text-devel +BuildRequires: ghc-text-prof BuildRequires: ghc-transformers-devel BuildRequires: ghc-transformers-prof ExcludeArch: %{ix86} @@ -91,6 +94,7 @@ %prep %autosetup -n %{pkg_name}-%{version} +cp -p %{SOURCE1} %{pkg_name}.cabal %build %ghc_lib_build ++++++ cabal-install-solver-3.10.2.1.tar.gz -> cabal-install-solver-3.10.3.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-install-solver-3.10.2.1/ChangeLog.md new/cabal-install-solver-3.10.3.0/ChangeLog.md --- old/cabal-install-solver-3.10.2.1/ChangeLog.md 2001-09-09 03:46:40.000000000 +0200 +++ new/cabal-install-solver-3.10.3.0/ChangeLog.md 2001-09-09 03:46:40.000000000 +0200 @@ -1 +1 @@ -Please see https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.1... +Please see https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.1... diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-install-solver-3.10.2.1/cabal-install-solver.cabal new/cabal-install-solver-3.10.3.0/cabal-install-solver.cabal --- old/cabal-install-solver-3.10.2.1/cabal-install-solver.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/cabal-install-solver-3.10.3.0/cabal-install-solver.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,6 +1,6 @@ cabal-version: 2.2 name: cabal-install-solver -version: 3.10.2.1 +version: 3.10.3.0 synopsis: The command-line interface for Cabal and Hackage. description: The solver component used in cabal-install command-line program @@ -14,7 +14,7 @@ copyright: 2003-2023, Cabal Development Team category: Distribution build-type: Simple -Extra-Source-Files: +extra-doc-files: ChangeLog.md source-repository head @@ -109,12 +109,13 @@ , bytestring >=0.10.6.0 && <0.13 , Cabal ^>=3.10 , Cabal-syntax ^>=3.10 - , containers >=0.5.6.2 && <0.7 + , containers >=0.5.6.2 && <0.8 , edit-distance ^>= 0.2.2 - , filepath ^>=1.4.0.0 + , filepath ^>=1.4.0.0 || ^>=1.5.0.0 , mtl >=2.0 && <2.4 , pretty ^>=1.1 , transformers >=0.4.2.0 && <0.7 + , text (>= 1.2.3.0 && < 1.3) || (>= 2.0 && < 2.2) if flag(debug-expensive-assertions) cpp-options: -DDEBUG_EXPENSIVE_ASSERTIONS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-install-solver-3.10.2.1/src/Distribution/Solver/Types/PkgConfigDb.hs new/cabal-install-solver-3.10.3.0/src/Distribution/Solver/Types/PkgConfigDb.hs --- old/cabal-install-solver-3.10.2.1/src/Distribution/Solver/Types/PkgConfigDb.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/cabal-install-solver-3.10.3.0/src/Distribution/Solver/Types/PkgConfigDb.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,5 +1,6 @@ {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE LambdaCase #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Solver.Types.PkgConfigDb @@ -23,17 +24,23 @@ import Distribution.Solver.Compat.Prelude import Prelude () -import Control.Exception (handle) -import Control.Monad (mapM) -import qualified Data.Map as M -import System.FilePath (splitSearchPath) +import Control.Exception (handle) +import Control.Monad (mapM) +import Data.ByteString (ByteString) +import qualified Data.ByteString.Lazy as LBS +import qualified Data.Map as M +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Encoding.Error as T +import System.FilePath (splitSearchPath) import Distribution.Compat.Environment (lookupEnv) import Distribution.Package (PkgconfigName, mkPkgconfigName) import Distribution.Parsec import Distribution.Simple.Program (ProgramDb, getProgramOutput, pkgConfigProgram, needProgram, ConfiguredProgram) -import Distribution.Simple.Program.Run (getProgramInvocationOutputAndErrors, programInvocation) +import Distribution.Simple.Program.Run + (getProgramInvocationOutputAndErrors, programInvocation, getProgramInvocationLBSAndErrors) import Distribution.Simple.Utils (info) import Distribution.Types.PkgconfigVersion import Distribution.Types.PkgconfigVersionRange @@ -63,19 +70,53 @@ case mpkgConfig of Nothing -> noPkgConfig "Cannot find pkg-config program" Just (pkgConfig, _) -> do - pkgList <- lines <$> getProgramOutput verbosity pkgConfig ["--list-all"] - -- The output of @pkg-config --list-all@ also includes a description - -- for each package, which we do not need. - let pkgNames = map (takeWhile (not . isSpace)) pkgList - (pkgVersions, _errs, exitCode) <- + -- To prevent malformed Unicode in the descriptions from crashing cabal, + -- read without interpreting any encoding first. (#9608) + (listAllOutput, listAllErrs, listAllExitcode) <- + getProgramInvocationLBSAndErrors verbosity (programInvocation pkgConfig ["--list-all"]) + when (listAllExitcode /= ExitSuccess) $ + ioError (userError ("pkg-config --list-all failed: " ++ listAllErrs)) + let pkgList = LBS.split (fromIntegral (ord '\n')) listAllOutput + -- Now decode the package *names* to a String. The ones where decoding + -- failed end up in 'failedPkgNames'. + let (failedPkgNames, pkgNames) = + partitionEithers + -- Drop empty package names. This will handle empty lines + -- in pkg-config's output, including the spurious one + -- after the last newline (because of LBS.split). + . filter (either (const True) (not . null)) + -- Try decoding strictly; if it fails, put the lenient + -- decoding in a Left for later reporting. + . map (\bsname -> + let sbsname = LBS.toStrict bsname + in case T.decodeUtf8' sbsname of + Left _ -> Left (T.unpack (decodeUtf8LenientCompat sbsname)) + Right name -> Right (T.unpack name)) + -- The output of @pkg-config --list-all@ also includes a + -- description for each package, which we do not need. + -- We don't use Data.Char.isSpace because that would also + -- include 0xA0, the non-breaking space, which can occur + -- in multi-byte UTF-8 sequences. + . map (LBS.takeWhile (not . isAsciiSpace)) + $ pkgList + when (not (null failedPkgNames)) $ + info verbosity ("Some pkg-config packages have names containing invalid unicode: " ++ intercalate ", " failedPkgNames) + (outs, _errs, exitCode) <- getProgramInvocationOutputAndErrors verbosity (programInvocation pkgConfig ("--modversion" : pkgNames)) - case exitCode of - ExitSuccess -> (return . pkgConfigDbFromList . zip pkgNames) (lines pkgVersions) - -- if there's a single broken pc file the above fails, so we fall back into calling it individually - _ -> do - info verbosity ("call to pkg-config --modversion on all packages failed. Falling back to querying pkg-config individually on each package") - pkgConfigDbFromList . catMaybes <$> mapM (getIndividualVersion pkgConfig) pkgNames + let pkgVersions = lines outs + if exitCode == ExitSuccess && length pkgVersions == length pkgNames + then (return . pkgConfigDbFromList . zip pkgNames) pkgVersions + else + -- if there's a single broken pc file the above fails, so we fall back + -- into calling it individually + -- + -- Also some implementations of @pkg-config@ do not provide more than + -- one package version, so if the returned list is shorter than the + -- requested one, we fall back to querying one by one. + do + info verbosity ("call to pkg-config --modversion on all packages failed. Falling back to querying pkg-config individually on each package") + pkgConfigDbFromList . catMaybes <$> mapM (getIndividualVersion pkgConfig) pkgNames where -- For when pkg-config invocation fails (possibly because of a -- too long command line). @@ -97,6 +138,15 @@ ExitSuccess -> Just (pkg, pkgVersion) _ -> Nothing + isAsciiSpace :: Word8 -> Bool + isAsciiSpace c = c `elem` map (fromIntegral . ord) " \t" + + -- The decodeUtf8Lenient function is defined starting with text-2.0.1; this + -- function simply reimplements it. When the minimum supported GHC version + -- is >= 9.4, switch to decodeUtf8Lenient. + decodeUtf8LenientCompat :: ByteString -> T.Text + decodeUtf8LenientCompat = T.decodeUtf8With T.lenientDecode + -- | Create a `PkgConfigDb` from a list of @(packageName, version)@ pairs. pkgConfigDbFromList :: [(String, String)] -> PkgConfigDb pkgConfigDbFromList pairs = (PkgConfigDb . M.fromList . map convert) pairs ++++++ cabal-install-solver.cabal ++++++ cabal-version: 2.2 name: cabal-install-solver version: 3.10.3.0 x-revision: 1 synopsis: The command-line interface for Cabal and Hackage. description: The solver component used in cabal-install command-line program 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-doc-files: ChangeLog.md source-repository head type: git location: https://github.com/haskell/cabal/ subdir: cabal-install-solver flag debug-expensive-assertions description: Enable expensive assertions for testing or debugging default: False manual: True flag debug-conflict-sets description: Add additional information to ConflictSets default: False manual: True flag debug-tracetree description: Compile in support for tracetree (used to debug the solver) default: False manual: True library default-language: Haskell2010 hs-source-dirs: src hs-source-dirs: src-assertion ghc-options: -Wall -Wcompat -Wnoncanonical-monad-instances -fwarn-tabs -fwarn-incomplete-uni-patterns if impl(ghc <8.8) ghc-options: -Wnoncanonical-monadfail-instances if impl(ghc >=8.10) ghc-options: -Wunused-packages exposed-modules: Distribution.Client.Utils.Assertion Distribution.Solver.Compat.Prelude Distribution.Solver.Modular Distribution.Solver.Modular.Assignment Distribution.Solver.Modular.Builder Distribution.Solver.Modular.Configured Distribution.Solver.Modular.ConfiguredConversion Distribution.Solver.Modular.ConflictSet Distribution.Solver.Modular.Cycles Distribution.Solver.Modular.Dependency Distribution.Solver.Modular.Explore Distribution.Solver.Modular.Flag Distribution.Solver.Modular.Index Distribution.Solver.Modular.IndexConversion Distribution.Solver.Modular.LabeledGraph Distribution.Solver.Modular.Linking Distribution.Solver.Modular.Log Distribution.Solver.Modular.Message Distribution.Solver.Modular.MessageUtils Distribution.Solver.Modular.Package Distribution.Solver.Modular.Preference Distribution.Solver.Modular.PSQ Distribution.Solver.Modular.RetryLog Distribution.Solver.Modular.Solver Distribution.Solver.Modular.Tree Distribution.Solver.Modular.Validate Distribution.Solver.Modular.Var Distribution.Solver.Modular.Version Distribution.Solver.Modular.WeightedPSQ Distribution.Solver.Types.ComponentDeps Distribution.Solver.Types.ConstraintSource Distribution.Solver.Types.DependencyResolver Distribution.Solver.Types.Flag Distribution.Solver.Types.InstalledPreference Distribution.Solver.Types.InstSolverPackage Distribution.Solver.Types.LabeledPackageConstraint Distribution.Solver.Types.OptionalStanza Distribution.Solver.Types.PackageConstraint Distribution.Solver.Types.PackageFixedDeps Distribution.Solver.Types.PackageIndex Distribution.Solver.Types.PackagePath Distribution.Solver.Types.PackagePreferences Distribution.Solver.Types.PkgConfigDb Distribution.Solver.Types.Progress Distribution.Solver.Types.ResolverPackage Distribution.Solver.Types.Settings Distribution.Solver.Types.SolverId Distribution.Solver.Types.SolverPackage Distribution.Solver.Types.SourcePackage Distribution.Solver.Types.Variable build-depends: , array >=0.4 && <0.6 , base >=4.10 && <4.20 , bytestring >=0.10.6.0 && <0.13 , Cabal ^>=3.10.3 , Cabal-syntax ^>=3.10 , containers >=0.5.6.2 && <0.8 , edit-distance ^>= 0.2.2 , filepath ^>=1.4.0.0 || ^>=1.5.0.0 , mtl >=2.0 && <2.4 , pretty ^>=1.1 , transformers >=0.4.2.0 && <0.7 , text (>= 1.2.3.0 && < 1.3) || (>= 2.0 && < 2.2) if flag(debug-expensive-assertions) cpp-options: -DDEBUG_EXPENSIVE_ASSERTIONS if flag(debug-conflict-sets) cpp-options: -DDEBUG_CONFLICT_SETS build-depends: base >=4.9 if flag(debug-tracetree) cpp-options: -DDEBUG_TRACETREE build-depends: tracetree ^>=0.1 Test-Suite unit-tests default-language: Haskell2010 ghc-options: -rtsopts -threaded type: exitcode-stdio-1.0 main-is: UnitTests.hs hs-source-dirs: tests other-modules: UnitTests.Distribution.Solver.Modular.MessageUtils build-depends: , base >= 4.10 && <4.20 , Cabal , Cabal-syntax , cabal-install-solver , tasty >= 1.2.3 && <1.6 , tasty-quickcheck , tasty-hunit >= 0.10