summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2021-10-12 16:50:47 +0000
committerMathieu Othacehe <othacehe@gnu.org>2021-10-12 17:46:23 +0000
commita1eca979fb8da842e73c42f4f53be29b169810f2 (patch)
tree681c7283e412bb8a29c2531c4408b49c3e184764 /gnu/packages/patches
parent48d86a9ec6d8d2e97da2299ea41a03ef4cdaab83 (diff)
parent371aa5777a3805a3886f3feea5f1960fe3fe4219 (diff)
Merge remote-tracking branch 'origin/master' into core-updates-frozen.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/cabal-install-base16-bytestring1.0.patch29
-rw-r--r--gnu/packages/patches/cabal-install-ghc8.10.patch393
-rw-r--r--gnu/packages/patches/ceph-fix-snappy-breaking-change.patch13
-rw-r--r--gnu/packages/patches/clang-10.0-libc-search-path.patch93
-rw-r--r--gnu/packages/patches/clang-11.0-libc-search-path.patch101
-rw-r--r--gnu/packages/patches/clang-12-tools-extra-directory.patch16
-rw-r--r--gnu/packages/patches/clang-12.0-libc-search-path.patch84
-rw-r--r--gnu/packages/patches/clang-7.0-libc-search-path.patch82
-rw-r--r--gnu/packages/patches/clang-8.0-libc-search-path.patch94
-rw-r--r--gnu/packages/patches/clang-9.0-libc-search-path.patch90
-rw-r--r--gnu/packages/patches/diffoscope-fix-test_item3_deflate_llvm_bitcode.patch28
-rw-r--r--gnu/packages/patches/ganeti-deterministic-manual.patch16
-rw-r--r--gnu/packages/patches/ganeti-drbd-compat.patch166
-rw-r--r--gnu/packages/patches/ganeti-haskell-compat.patch18
-rw-r--r--gnu/packages/patches/ganeti-os-disk-size.patch17
-rw-r--r--gnu/packages/patches/ghc-diff-swap-cover-args.patch20
-rw-r--r--gnu/packages/patches/ghc-haddock-api-fix-haddock.patch54
-rw-r--r--gnu/packages/patches/ghc-hpack-fix-tests.patch193
-rw-r--r--gnu/packages/patches/ghc-language-haskell-extract-ghc-8.10.patch27
-rw-r--r--gnu/packages/patches/ghc-microlens-aeson-fix-tests.patch27
-rw-r--r--gnu/packages/patches/ghc-pandoc-fix-html-tests.patch92
-rw-r--r--gnu/packages/patches/ghc-pandoc-fix-latex-test.patch31
-rw-r--r--gnu/packages/patches/hedgewars-network-bsd.patch150
-rw-r--r--gnu/packages/patches/hexchat-add-libera-chat.patch76
-rw-r--r--gnu/packages/patches/idris-build-with-haskeline-0.8.patch85
-rw-r--r--gnu/packages/patches/idris-build-with-megaparsec-9.patch27
-rw-r--r--gnu/packages/patches/libcacard-unknown-variable.patch50
-rw-r--r--gnu/packages/patches/minetest-add-MINETEST_MOD_PATH.patch2
-rw-r--r--gnu/packages/patches/ngless-unliftio.patch66
-rw-r--r--gnu/packages/patches/nnpack-system-libraries.patch205
-rw-r--r--gnu/packages/patches/ntfs-3g-CVE-2019-9755.patch72
-rw-r--r--gnu/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch68
-rw-r--r--gnu/packages/patches/php-bug-74093-test.patch48
-rw-r--r--gnu/packages/patches/pigx-bsseq-no-citeproc.patch33
-rw-r--r--gnu/packages/patches/pigx-chipseq-no-citeproc.patch33
-rw-r--r--gnu/packages/patches/pigx-rnaseq-no-citeproc.patch33
-rw-r--r--gnu/packages/patches/pigx-sars-cov2-ww-no-citeproc.patch33
-rw-r--r--gnu/packages/patches/pigx-scrnaseq-no-citeproc.patch33
-rw-r--r--gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch4
-rw-r--r--gnu/packages/patches/purescript-relax-dependencies.patch40
-rw-r--r--gnu/packages/patches/python-pytorch-system-libraries.patch38
-rw-r--r--gnu/packages/patches/sbcl-burgled-batteries3-fix-signals.patch70
-rw-r--r--gnu/packages/patches/sbcl-png-fix-sbcl-compatibility.patch60
-rw-r--r--gnu/packages/patches/ungoogled-chromium-ffmpeg-compat.patch68
-rw-r--r--gnu/packages/patches/ungoogled-chromium-system-nspr.patch54
-rw-r--r--gnu/packages/patches/webkitgtk-bind-all-fonts.patch2
-rw-r--r--gnu/packages/patches/xgboost-use-system-dmlc-core.patch34
47 files changed, 1941 insertions, 1127 deletions
diff --git a/gnu/packages/patches/cabal-install-base16-bytestring1.0.patch b/gnu/packages/patches/cabal-install-base16-bytestring1.0.patch
new file mode 100644
index 0000000000..998bf08718
--- /dev/null
+++ b/gnu/packages/patches/cabal-install-base16-bytestring1.0.patch
@@ -0,0 +1,29 @@
+Restore compatibility with newer version of base16-bytestring.
+
+Taken from https://raw.githubusercontent.com/archlinux/svntogit-community/packages/trunk/cabal-install-base16-bytestring1.0.patch
+
+diff --git a/Distribution/Client/HashValue.hs b/Distribution/Client/HashValue.hs
+index 54b8aee9e..11e647c1c 100644
+--- a/Distribution/Client/HashValue.hs
++++ b/Distribution/Client/HashValue.hs
+@@ -1,3 +1,4 @@
++{-# LANGUAGE CPP #-}
+ {-# LANGUAGE DeriveDataTypeable #-}
+ {-# LANGUAGE DeriveGeneric #-}
+ module Distribution.Client.HashValue (
+@@ -72,10 +73,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
+ --
diff --git a/gnu/packages/patches/cabal-install-ghc8.10.patch b/gnu/packages/patches/cabal-install-ghc8.10.patch
new file mode 100644
index 0000000000..67c0953058
--- /dev/null
+++ b/gnu/packages/patches/cabal-install-ghc8.10.patch
@@ -0,0 +1,393 @@
+From ac9b41eef3c781ce188ded2551f98fe75152e30c Mon Sep 17 00:00:00 2001
+From: Oleg Grenrus <oleg.grenrus@iki.fi>
+Date: Tue, 14 Apr 2020 11:31:34 +0300
+Subject: [PATCH] GHC-8.10 support for 3.2
+
+Includes cherry-picked commits:
+
+- Test cabal-install with GHC-8.10 #6709
+- Add GHC-8.10.1 job. Only tests Cabal-the-lib part atm. #6617
+
+Also add topHandler' signature.
+---
+ .docker/validate-8.10.1.dockerfile | 60 ++++++
+ .github/workflows/artifacts.yml | 6 +-
+ .github/workflows/bootstrap.yml | 4 +-
+ .github/workflows/linux.yml | 179 ++++++++++++------
+ .github/workflows/macos.yml | 40 ++--
+ .github/workflows/quick-jobs.yml | 4 +-
+ .github/workflows/windows.yml | 117 +++++++++++-
+ .../Distribution/PackageDescription/Quirks.hs | 19 +-
+ Makefile | 4 +
+ boot/ci-artifacts.template.yml | 6 +-
+ boot/ci-bootstrap.template.yml | 4 +-
+ boot/ci-linux.template.yml | 8 +-
+ boot/ci-macos.template.yml | 7 +-
+ boot/ci-quick-jobs.template.yml | 4 +-
+ boot/ci-windows.template.yml | 8 +-
+ cabal-dev-scripts/src/GenValidate.hs | 33 ++--
+ Distribution/Client/CmdSdist.hs | 3 +
+ .../Distribution/Client/FetchUtils.hs | 4 +-
+ .../Distribution/Client/IndexUtils.hs | 2 +-
+ Distribution/Client/Sandbox.hs | 5 +-
+ .../Distribution/Client/TargetSelector.hs | 2 +-
+ Distribution/Client/Update.hs | 4 +-
+ .../Distribution/Client/Utils/Json.hs | 13 +-
+ .../Distribution/Solver/Modular/Assignment.hs | 11 +-
+ .../Distribution/Solver/Modular/Builder.hs | 10 +-
+ .../Distribution/Solver/Modular/Index.hs | 6 +-
+ .../Solver/Modular/IndexConversion.hs | 8 +-
+ .../Distribution/Solver/Modular/Solver.hs | 12 +-
+ .../Distribution/Solver/Modular/Validate.hs | 5 +-
+ bootstrap.sh | 6 +-
+ cabal-install.cabal | 4 +-
+ cabal-install.cabal.pp | 4 +-
+ .../targets/complex/q/q.cabal | 3 +-
+ cabal-testsuite/cabal-testsuite.cabal | 4 +-
+ validate.sh | 21 +-
+ 35 files changed, 461 insertions(+), 169 deletions(-)
+ create mode 100644 .docker/validate-8.10.1.dockerfile
+diff --git a/Distribution/Client/CmdSdist.hs b/Distribution/Client/CmdSdist.hs
+index 9ce0c80100e..a22317004c4 100644
+--- a/Distribution/Client/CmdSdist.hs
++++ b/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/Distribution/Client/FetchUtils.hs b/Distribution/Client/FetchUtils.hs
+index e9a31a91f84..4e5e581f9ec 100644
+--- a/Distribution/Client/FetchUtils.hs
++++ b/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/Distribution/Client/IndexUtils.hs b/Distribution/Client/IndexUtils.hs
+index a76becc05ba..bf0ff7cf5ba 100644
+--- a/Distribution/Client/IndexUtils.hs
++++ b/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/Distribution/Client/Sandbox.hs b/Distribution/Client/Sandbox.hs
+index 66b415d7239..14bad3f2135 100644
+--- a/Distribution/Client/Sandbox.hs
++++ b/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/Distribution/Client/TargetSelector.hs b/Distribution/Client/TargetSelector.hs
+index 23d92f580fd..f8f683d9875 100644
+--- a/Distribution/Client/TargetSelector.hs
++++ b/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/Distribution/Client/Update.hs b/Distribution/Client/Update.hs
+index 52bb1f76c96..8ded78b9d2e 100644
+--- a/Distribution/Client/Update.hs
++++ b/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/Distribution/Client/Utils/Json.hs b/Distribution/Client/Utils/Json.hs
+index 89a13af87a4..01d5753136b 100644
+--- a/Distribution/Client/Utils/Json.hs
++++ b/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/Distribution/Solver/Modular/Assignment.hs b/Distribution/Solver/Modular/Assignment.hs
+index be5e63bfbc1..b05a099ec5a 100644
+--- a/Distribution/Solver/Modular/Assignment.hs
++++ b/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/Distribution/Solver/Modular/Builder.hs b/Distribution/Solver/Modular/Builder.hs
+index eb11a36aa16..5d196f4fd9f 100644
+--- a/Distribution/Solver/Modular/Builder.hs
++++ b/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/Distribution/Solver/Modular/Index.hs b/Distribution/Solver/Modular/Index.hs
+index fdddfc8237a..ac60fec7d65 100644
+--- a/Distribution/Solver/Modular/Index.hs
++++ b/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/Distribution/Solver/Modular/IndexConversion.hs b/Distribution/Solver/Modular/IndexConversion.hs
+index c9565c80dba..8e9ef614184 100644
+--- a/Distribution/Solver/Modular/IndexConversion.hs
++++ b/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/Distribution/Solver/Modular/Solver.hs b/Distribution/Solver/Modular/Solver.hs
+index 32452550556..e6aa1fb4374 100644
+--- a/Distribution/Solver/Modular/Solver.hs
++++ b/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/Distribution/Solver/Modular/Validate.hs b/Distribution/Solver/Modular/Validate.hs
+index 6195d101b02..a3dec6e1f67 100644
+--- a/Distribution/Solver/Modular/Validate.hs
++++ b/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/bootstrap.sh b/bootstrap.sh
+index 077d7f4efd2..d5141660474 100755
+--- a/bootstrap.sh
++++ b/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 b/cabal-install.cabal
+index 985ea9a5a69..c9d713c29fe 100644
+--- a/cabal-install.cabal
++++ b/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/tests/IntegrationTests2/targets/complex/q/q.cabal b/tests/IntegrationTests2/targets/complex/q/q.cabal
+index 556fa4a4202..7ee22fcb28d 100644
+--- a/tests/IntegrationTests2/targets/complex/q/q.cabal
++++ b/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
diff --git a/gnu/packages/patches/ceph-fix-snappy-breaking-change.patch b/gnu/packages/patches/ceph-fix-snappy-breaking-change.patch
new file mode 100644
index 0000000000..7a10e2e4ae
--- /dev/null
+++ b/gnu/packages/patches/ceph-fix-snappy-breaking-change.patch
@@ -0,0 +1,13 @@
+Patch tracked upstream at https://tracker.ceph.com/issues/50934
+
+--- a/src/compressor/snappy/SnappyCompressor.h
++++ b/src/compressor/snappy/SnappyCompressor.h
+@@ -96,7 +96,7 @@ class SnappyCompressor : public Compressor {
+ if (qat_enabled)
+ return qat_accel.decompress(p, compressed_len, dst);
+ #endif
+- snappy::uint32 res_len = 0;
++ uint32_t res_len = 0;
+ BufferlistSource source_1(p, compressed_len);
+ if (!snappy::GetUncompressedLength(&source_1, &res_len)) {
+ return -1;
diff --git a/gnu/packages/patches/clang-10.0-libc-search-path.patch b/gnu/packages/patches/clang-10.0-libc-search-path.patch
index 966e40b93c..c2854e3f33 100644
--- a/gnu/packages/patches/clang-10.0-libc-search-path.patch
+++ b/gnu/packages/patches/clang-10.0-libc-search-path.patch
@@ -4,18 +4,47 @@ but unfortunately, that doesn't work for us.
This patch makes it easy to insert libc's $libdir so that Clang passes the
correct absolute file name of crt1.o etc. to 'ld'. It also disables all
the distro-specific stuff and removes the hard-coded FHS directory names
-to make sure Clang also works on non-Guix systems.
+to make sure Clang also works on foreign distros.
+diff --git a/lib/Driver/Distro.cpp b/lib/Driver/Distro.cpp
+index 06707fef..f3bd43de 100644
+--- a/lib/Driver/Distro.cpp
++++ b/lib/Driver/Distro.cpp
+@@ -20,6 +20,10 @@ using namespace clang;
+
+ static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS,
+ const llvm::Triple &TargetOrHost) {
++ // The compiler should always behave the same, even when used via Guix on a
++ // foreign distro.
++ return Distro::UnknownDistro;
++
+ // If we don't target Linux, no need to check the distro. This saves a few
+ // OS calls.
+ if (!TargetOrHost.isOSLinux())
+diff --git a/lib/Driver/ToolChains/Cuda.cpp b/lib/Driver/ToolChains/Cuda.cpp
+index 50d22a2a..4ab93e0a 100644
+--- a/lib/Driver/ToolChains/Cuda.cpp
++++ b/lib/Driver/ToolChains/Cuda.cpp
+@@ -60,6 +60,9 @@ CudaInstallationDetector::CudaInstallationDetector(
+ const Driver &D, const llvm::Triple &HostTriple,
+ const llvm::opt::ArgList &Args)
+ : D(D) {
++ // Don't look for CUDA in /usr.
++ return;
++
+ struct Candidate {
+ std::string Path;
+ bool StrictChecking;
diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp
-index bff1ab10..79e1477e 100644
+index bff1ab10..e996d3b8 100644
--- a/lib/Driver/ToolChains/Linux.cpp
+++ b/lib/Driver/ToolChains/Linux.cpp
@@ -240,6 +240,9 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
.str());
}
-+// Comment out the distro-specific tweaks so that they don't bite when
-+// using Guix on a foreign distro.
++ // Comment out the distro-specific tweaks so that they don't bite when
++ // using Guix on a foreign distro.
+#if 0
Distro Distro(D.getVFS(), Triple);
@@ -24,61 +53,41 @@ index bff1ab10..79e1477e 100644
if (IsAndroid || Distro.IsOpenSUSE())
ExtraOpts.push_back("--enable-new-dtags");
-+#endif // Guix
++#endif
// The selection of paths to try here is designed to match the patterns which
// the GCC driver itself uses, as this is part of the GCC-compatible driver.
-@@ -363,7 +367,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
- // the cross. Note that GCC does include some of these directories in some
- // configurations but this seems somewhere between questionable and simply
- // a bug.
-- if (StringRef(LibPath).startswith(SysRoot)) {
-+ if (0) {
- addPathIfExists(D, LibPath + "/" + MultiarchTriple, Paths);
- addPathIfExists(D, LibPath + "/../" + OSLibDir, Paths);
+@@ -369,6 +373,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
}
-@@ -382,6 +386,8 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
- addPathIfExists(D, SysRoot + "/lib/" + MultiarchTriple, Paths);
- addPathIfExists(D, SysRoot + "/lib/../" + OSLibDir, Paths);
-
-+// This requires the commented distro tweaks above.
-+#if 0
- if (IsAndroid) {
- // Android sysroots contain a library directory for each supported OS
- // version as well as some unversioned libraries in the usual multiarch
-@@ -410,10 +416,15 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
- addPathIfExists(D, SysRoot + "/" + OSLibDir + "/" + ABIName, Paths);
- addPathIfExists(D, SysRoot + "/usr/" + OSLibDir + "/" + ABIName, Paths);
}
-+#endif
++#if 0
+ // Similar to the logic for GCC above, if we currently running Clang inside
+ // of the requested system root, add its parent library paths to
+ // those searched.
+@@ -414,6 +419,8 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
// Try walking via the GCC triple path in case of biarch or multiarch GCC
// installations with strange symlinks.
if (GCCInstallation.isValid()) {
-+
-+// The following code would end up adding things like
-+// "/usr/lib/x86_64-unknown-linux-gnu/../../lib64" to the search path.
-+#if 0
++ // The following code would end up adding things like
++ // "/usr/lib/x86_64-unknown-linux-gnu/../../lib64" to the search path.
addPathIfExists(D,
SysRoot + "/usr/lib/" + GCCInstallation.getTriple().str() +
"/../../" + OSLibDir,
-@@ -426,6 +437,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
- BiarchSibling.gccSuffix(),
- Paths);
- }
-+#endif
-
- // See comments above on the multilib variant for details of why this is
- // included even from outside the sysroot.
-@@ -450,8 +462,9 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
+@@ -449,9 +456,14 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
+ // directory ('Dir' below) or the ResourceDir.
if (StringRef(D.Dir).startswith(SysRoot))
addPathIfExists(D, D.Dir + "/../lib", Paths);
-
-- addPathIfExists(D, SysRoot + "/lib", Paths);
-- addPathIfExists(D, SysRoot + "/usr/lib", Paths);
++#endif
++
+ // Add libc's lib/ directory to the search path, so that crt1.o, crti.o,
+ // and friends can be found.
+ addPathIfExists(D, "@GLIBC_LIBDIR@", Paths);
+
+- addPathIfExists(D, SysRoot + "/lib", Paths);
+- addPathIfExists(D, SysRoot + "/usr/lib", Paths);
++ // Add GCC's lib/ directory so libstdc++.so can be found.
++ addPathIfExists(D, GCCInstallation.getParentLibPath(), Paths);
}
ToolChain::CXXStdlibType Linux::GetDefaultCXXStdlibType() const {
diff --git a/gnu/packages/patches/clang-11.0-libc-search-path.patch b/gnu/packages/patches/clang-11.0-libc-search-path.patch
index c014de179d..d0581d3a29 100644
--- a/gnu/packages/patches/clang-11.0-libc-search-path.patch
+++ b/gnu/packages/patches/clang-11.0-libc-search-path.patch
@@ -4,48 +4,47 @@ but unfortunately, that doesn't work for us.
This patch makes it easy to insert libc's $libdir so that Clang passes the
correct absolute file name of crt1.o etc. to 'ld'. It also disables all
the distro-specific stuff and removes the hard-coded FHS directory names
-to make sure Clang also works on non-Guix systems.
+to make sure Clang also works on foreign distros.
-diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
---- a/lib/Driver/ToolChains/Gnu.cpp
-+++ b/lib/Driver/ToolChains/Gnu.cpp
-@@ -2797,7 +2797,7 @@ void Generic_GCC::AddMultilibPaths(const Driver &D,
- // the cross. Note that GCC does include some of these directories in some
- // configurations but this seems somewhere between questionable and simply
- // a bug.
-- if (StringRef(LibPath).startswith(SysRoot)) {
-+ if (0) {
- addPathIfExists(D, LibPath + "/" + MultiarchTriple, Paths);
- addPathIfExists(D, LibPath + "/../" + OSLibDir, Paths);
- }
-@@ -2811,6 +2811,10 @@ void Generic_GCC::AddMultiarchPaths(const Driver &D,
- // Try walking via the GCC triple path in case of biarch or multiarch GCC
- // installations with strange symlinks.
- if (GCCInstallation.isValid()) {
-+
-+// The following code would end up adding things like
-+// "/usr/lib/x86_64-unknown-linux-gnu/../../lib64" to the search path.
-+#if 0
- addPathIfExists(D,
- SysRoot + "/usr/lib/" + GCCInstallation.getTriple().str() +
- "/../../" + OSLibDir,
-@@ -2823,6 +2827,7 @@ void Generic_GCC::AddMultiarchPaths(const Driver &D,
- D, GCCInstallation.getInstallPath() + BiarchSibling.gccSuffix(),
- Paths);
- }
-+#endif // Guix
+diff --git a/lib/Driver/Distro.cpp b/lib/Driver/Distro.cpp
+index 4d58ad1a..6f638eca 100644
+--- a/lib/Driver/Distro.cpp
++++ b/lib/Driver/Distro.cpp
+@@ -21,6 +21,10 @@ using namespace clang;
- // See comments above on the multilib variant for details of why this is
- // included even from outside the sysroot.
+ static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS,
+ const llvm::Triple &TargetOrHost) {
++ // The compiler should always behave the same, even when used via Guix on a
++ // foreign distro.
++ return Distro::UnknownDistro;
++
+ // If we don't target Linux, no need to check the distro. This saves a few
+ // OS calls.
+ if (!TargetOrHost.isOSLinux())
+diff --git a/lib/Driver/ToolChains/Cuda.cpp b/lib/Driver/ToolChains/Cuda.cpp
+index 110a0bca..42b9f7b7 100644
+--- a/lib/Driver/ToolChains/Cuda.cpp
++++ b/lib/Driver/ToolChains/Cuda.cpp
+@@ -67,6 +67,9 @@ CudaInstallationDetector::CudaInstallationDetector(
+ const Driver &D, const llvm::Triple &HostTriple,
+ const llvm::opt::ArgList &Args)
+ : D(D) {
++ // Don't look for CUDA in /usr.
++ return;
++
+ struct Candidate {
+ std::string Path;
+ bool StrictChecking;
diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp
+index 18035047..ace8f443 100644
--- a/lib/Driver/ToolChains/Linux.cpp
+++ b/lib/Driver/ToolChains/Linux.cpp
@@ -219,6 +219,9 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
Generic_GCC::PushPPaths(PPaths);
-+// Comment out the distro-specific tweaks so that they don't bite when
-+// using Guix on a foreign distro.
++ // Comment out the distro-specific tweaks so that they don't bite when
++ // using Guix on a foreign distro.
+#if 0
Distro Distro(D.getVFS(), Triple);
@@ -54,36 +53,32 @@ diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp
if (IsAndroid || Distro.IsOpenSUSE())
ExtraOpts.push_back("--enable-new-dtags");
-+#endif // Guix
++#endif
// The selection of paths to try here is designed to match the patterns which
// the GCC driver itself uses, as this is part of the GCC-compatible driver.
-@@ -310,6 +314,8 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
- addPathIfExists(D, SysRoot + "/lib/" + MultiarchTriple, Paths);
- addPathIfExists(D, SysRoot + "/lib/../" + OSLibDir, Paths);
+@@ -297,6 +301,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
-+// This requires the commented distro tweaks above.
-+#if 0
- if (IsAndroid) {
- // Android sysroots contain a library directory for each supported OS
- // version as well as some unversioned libraries in the usual multiarch
-@@ -338,6 +344,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
- addPathIfExists(D, SysRoot + "/" + OSLibDir + "/" + ABIName, Paths);
- addPathIfExists(D, SysRoot + "/usr/" + OSLibDir + "/" + ABIName, Paths);
- }
-+#endif // Guix
-
- Generic_GCC::AddMultiarchPaths(D, SysRoot, OSLibDir, Paths);
+ Generic_GCC::AddMultilibPaths(D, SysRoot, OSLibDir, MultiarchTriple, Paths);
-@@ -349,8 +356,9 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
++#if 0
+ // Similar to the logic for GCC above, if we currently running Clang inside
+ // of the requested system root, add its parent library paths to
+ // those searched.
+@@ -348,9 +353,14 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
+ // directory ('Dir' below) or the ResourceDir.
if (StringRef(D.Dir).startswith(SysRoot))
addPathIfExists(D, D.Dir + "/../lib", Paths);
-
-- addPathIfExists(D, SysRoot + "/lib", Paths);
-- addPathIfExists(D, SysRoot + "/usr/lib", Paths);
++#endif
++
+ // Add libc's lib/ directory to the search path, so that crt1.o, crti.o,
+ // and friends can be found.
+ addPathIfExists(D, "@GLIBC_LIBDIR@", Paths);
+
+- addPathIfExists(D, SysRoot + "/lib", Paths);
+- addPathIfExists(D, SysRoot + "/usr/lib", Paths);
++ // Add GCC's lib/ directory so libstdc++.so can be found.
++ addPathIfExists(D, GCCInstallation.getParentLibPath(), Paths);
}
ToolChain::CXXStdlibType Linux::GetDefaultCXXStdlibType() const {
diff --git a/gnu/packages/patches/clang-12-tools-extra-directory.patch b/gnu/packages/patches/clang-12-tools-extra-directory.patch
deleted file mode 100644
index 0a236da26e..0000000000
--- a/gnu/packages/patches/clang-12-tools-extra-directory.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Help CMake locate the "tools-extra" directory.
-
-Taken from <https://bugs.llvm.org/show_bug.cgi?id=49990#c3>.
-
-diff --git a/clang-tools-extra/clangd/quality/CompletionModel.cmake b/clang-tools-extra/clangd/quality/CompletionModel.cmake
---- a/clangd/quality/CompletionModel.cmake
-+++ b/clangd/quality/CompletionModel.cmake
-@@ -5,7 +5,7 @@
- # will define a C++ class called ${cpp_class} - which may be a
- # namespace-qualified class name.
- function(gen_decision_forest model filename cpp_class)
-- set(model_compiler ${CMAKE_SOURCE_DIR}/../clang-tools-extra/clangd/quality/CompletionModelCodegen.py)
-+ set(model_compiler ${CMAKE_CURRENT_LIST_DIR}/quality/CompletionModelCodegen.py)
-
- set(output_dir ${CMAKE_CURRENT_BINARY_DIR})
- set(header_file ${output_dir}/${filename}.h)
diff --git a/gnu/packages/patches/clang-12.0-libc-search-path.patch b/gnu/packages/patches/clang-12.0-libc-search-path.patch
new file mode 100644
index 0000000000..38de275048
--- /dev/null
+++ b/gnu/packages/patches/clang-12.0-libc-search-path.patch
@@ -0,0 +1,84 @@
+Clang attempts to guess file names based on the OS and distro (yes!),
+but unfortunately, that doesn't work for us.
+
+This patch makes it easy to insert libc's $libdir so that Clang passes the
+correct absolute file name of crt1.o etc. to 'ld'. It also disables all
+the distro-specific stuff and removes the hard-coded FHS directory names
+to make sure Clang also works on foreign distros.
+
+diff --git a/lib/Driver/Distro.cpp b/lib/Driver/Distro.cpp
+index ee4fe841..f0313bbe 100644
+--- a/lib/Driver/Distro.cpp
++++ b/lib/Driver/Distro.cpp
+@@ -93,6 +93,10 @@ static Distro::DistroType DetectLsbRelease(llvm::vfs::FileSystem &VFS) {
+ }
+
+ static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS) {
++ // The compiler should always behave the same, even when used via Guix on a
++ // foreign distro.
++ return Distro::UnknownDistro;
++
+ Distro::DistroType Version = Distro::UnknownDistro;
+
+ // Newer freedesktop.org's compilant systemd-based systems
+diff --git a/lib/Driver/ToolChains/Cuda.cpp b/lib/Driver/ToolChains/Cuda.cpp
+index d14776c5..88bc3ccd 100644
+--- a/lib/Driver/ToolChains/Cuda.cpp
++++ b/lib/Driver/ToolChains/Cuda.cpp
+@@ -119,6 +119,9 @@ CudaInstallationDetector::CudaInstallationDetector(
+ const Driver &D, const llvm::Triple &HostTriple,
+ const llvm::opt::ArgList &Args)
+ : D(D) {
++ // Don't look for CUDA in /usr.
++ return;
++
+ struct Candidate {
+ std::string Path;
+ bool StrictChecking;
+diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp
+index 9663a739..107f96d6 100644
+--- a/lib/Driver/ToolChains/Linux.cpp
++++ b/lib/Driver/ToolChains/Linux.cpp
+@@ -223,6 +223,9 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
+
+ Generic_GCC::PushPPaths(PPaths);
+
++ // Comment out the distro-specific tweaks so that they don't bite when
++ // using Guix on a foreign distro.
++#if 0
+ Distro Distro(D.getVFS(), Triple);
+
+ if (Distro.IsAlpineLinux() || Triple.isAndroid()) {
+@@ -288,6 +291,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
+
+ if (IsAndroid || Distro.IsOpenSUSE())
+ ExtraOpts.push_back("--enable-new-dtags");
++#endif
+
+ // The selection of paths to try here is designed to match the patterns which
+ // the GCC driver itself uses, as this is part of the GCC-compatible driver.
+@@ -301,6 +305,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
+
+ Generic_GCC::AddMultilibPaths(D, SysRoot, OSLibDir, MultiarchTriple, Paths);
+
++#if 0
+ // Similar to the logic for GCC above, if we currently running Clang inside
+ // of the requested system root, add its parent library paths to
+ // those searched.
+@@ -352,9 +357,14 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
+ // directory ('Dir' below) or the ResourceDir.
+ if (StringRef(D.Dir).startswith(SysRoot))
+ addPathIfExists(D, D.Dir + "/../lib", Paths);
++#endif
++
++ // Add libc's lib/ directory to the search path, so that crt1.o, crti.o,
++ // and friends can be found.
++ addPathIfExists(D, "@GLIBC_LIBDIR@", Paths);
+
+- addPathIfExists(D, SysRoot + "/lib", Paths);
+- addPathIfExists(D, SysRoot + "/usr/lib", Paths);
++ // Add GCC's lib/ directory so libstdc++.so can be found.
++ addPathIfExists(D, GCCInstallation.getParentLibPath(), Paths);
+ }
+
+ ToolChain::CXXStdlibType Linux::GetDefaultCXXStdlibType() const {
diff --git a/gnu/packages/patches/clang-7.0-libc-search-path.patch b/gnu/packages/patches/clang-7.0-libc-search-path.patch
index 07ff8c90bd..cb7088eda4 100644
--- a/gnu/packages/patches/clang-7.0-libc-search-path.patch
+++ b/gnu/packages/patches/clang-7.0-libc-search-path.patch
@@ -4,8 +4,39 @@ but unfortunately, that doesn't work for us.
This patch makes it easy to insert libc's $libdir so that Clang passes the
correct absolute file name of crt1.o etc. to 'ld'. It also disables all
the distro-specific stuff and removes the hard-coded FHS directory names
-to make sure Clang also works on non-GuixSD systems.
+to make sure Clang also works on foreign distros.
+diff --git a/lib/Driver/Distro.cpp b/lib/Driver/Distro.cpp
+index 2c4d44f..0493b0a 100644
+--- a/lib/Driver/Distro.cpp
++++ b/lib/Driver/Distro.cpp
+@@ -18,6 +18,10 @@ using namespace clang::driver;
+ using namespace clang;
+
+ static Distro::DistroType DetectDistro(vfs::FileSystem &VFS) {
++ // The compiler should always behave the same, even when used via Guix on a
++ // foreign distro.
++ return Distro::UnknownDistro;
++
+ llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> File =
+ VFS.getBufferForFile("/etc/lsb-release");
+ if (File) {
+diff --git a/lib/Driver/ToolChains/Cuda.cpp b/lib/Driver/ToolChains/Cuda.cpp
+index 7fb4ae4..cb21344 100644
+--- a/lib/Driver/ToolChains/Cuda.cpp
++++ b/lib/Driver/ToolChains/Cuda.cpp
+@@ -66,6 +66,9 @@ CudaInstallationDetector::CudaInstallationDetector(
+ const Driver &D, const llvm::Triple &HostTriple,
+ const llvm::opt::ArgList &Args)
+ : D(D) {
++ // Don't look for CUDA in /usr.
++ return;
++
+ struct Candidate {
+ std::string Path;
+ bool StrictChecking;
+diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp
+index f8f3623..36dc722 100644
--- a/lib/Driver/ToolChains/Linux.cpp
+++ b/lib/Driver/ToolChains/Linux.cpp
@@ -225,7 +225,9 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
@@ -27,56 +58,37 @@ to make sure Clang also works on non-GuixSD systems.
// The selection of paths to try here is designed to match the patterns which
// the GCC driver itself uses, as this is part of the GCC-compatible driver.
-@@ -342,7 +345,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
- // the cross. Note that GCC does include some of these directories in some
- // configurations but this seems somewhere between questionable and simply
- // a bug.
-- if (StringRef(LibPath).startswith(SysRoot)) {
-+ if (0) {
- addPathIfExists(D, LibPath + "/" + MultiarchTriple, Paths);
- addPathIfExists(D, LibPath + "/../" + OSLibDir, Paths);
+@@ -348,6 +351,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
}
-@@ -361,6 +364,8 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
- addPathIfExists(D, SysRoot + "/lib/" + MultiarchTriple, Paths);
- addPathIfExists(D, SysRoot + "/lib/../" + OSLibDir, Paths);
-
-+ // This requires the commented distro tweaks above.
-+#if 0
- if (IsAndroid) {
- // Android sysroots contain a library directory for each supported OS
- // version as well as some unversioned libraries in the usual multiarch
-@@ -389,10 +394,14 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
- addPathIfExists(D, SysRoot + "/" + OSLibDir + "/" + ABIName, Paths);
- addPathIfExists(D, SysRoot + "/usr/" + OSLibDir + "/" + ABIName, Paths);
}
-+#endif
++#if 0
+ // Similar to the logic for GCC above, if we currently running Clang inside
+ // of the requested system root, add its parent library paths to
+ // those searched.
+@@ -393,6 +397,8 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
// Try walking via the GCC triple path in case of biarch or multiarch GCC
// installations with strange symlinks.
if (GCCInstallation.isValid()) {
+ // The following code would end up adding things like
+ // "/usr/lib/x86_64-unknown-linux-gnu/../../lib64" to the search path.
-+#if 0
addPathIfExists(D,
SysRoot + "/usr/lib/" + GCCInstallation.getTriple().str() +
"/../../" + OSLibDir,
-@@ -405,6 +414,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
- BiarchSibling.gccSuffix(),
- Paths);
- }
-+#endif
-
- // See comments above on the multilib variant for details of why this is
- // included even from outside the sysroot.
-@@ -429,8 +439,9 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
+@@ -428,9 +434,14 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
+ // directory ('Dir' below) or the ResourceDir.
if (StringRef(D.Dir).startswith(SysRoot))
addPathIfExists(D, D.Dir + "/../lib", Paths);
-
-- addPathIfExists(D, SysRoot + "/lib", Paths);
-- addPathIfExists(D, SysRoot + "/usr/lib", Paths);
++#endif
++
+ // Add libc's lib/ directory to the search path, so that crt1.o, crti.o,
+ // and friends can be found.
+ addPathIfExists(D, "@GLIBC_LIBDIR@", Paths);
+
+- addPathIfExists(D, SysRoot + "/lib", Paths);
+- addPathIfExists(D, SysRoot + "/usr/lib", Paths);
++ // Add GCC's lib/ directory so libstdc++.so can be found.
++ addPathIfExists(D, GCCInstallation.getParentLibPath(), Paths);
}
bool Linux::HasNativeLLVMSupport() const { return true; }
diff --git a/gnu/packages/patches/clang-8.0-libc-search-path.patch b/gnu/packages/patches/clang-8.0-libc-search-path.patch
new file mode 100644
index 0000000000..2003fef217
--- /dev/null
+++ b/gnu/packages/patches/clang-8.0-libc-search-path.patch
@@ -0,0 +1,94 @@
+Clang attempts to guess file names based on the OS and distro (yes!),
+but unfortunately, that doesn't work for us.
+
+This patch makes it easy to insert libc's $libdir so that Clang passes the
+correct absolute file name of crt1.o etc. to 'ld'. It also disables all
+the distro-specific stuff and removes the hard-coded FHS directory names
+to make sure Clang also works on foreign distros.
+
+diff --git a/lib/Driver/Distro.cpp b/lib/Driver/Distro.cpp
+index 396d0bee..90e06613 100644
+--- a/lib/Driver/Distro.cpp
++++ b/lib/Driver/Distro.cpp
+@@ -19,6 +19,10 @@ using namespace clang::driver;
+ using namespace clang;
+
+ static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS) {
++ // The compiler should always behave the same, even when used via Guix on a
++ // foreign distro.
++ return Distro::UnknownDistro;
++
+ llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> File =
+ VFS.getBufferForFile("/etc/lsb-release");
+ if (File) {
+diff --git a/lib/Driver/ToolChains/Cuda.cpp b/lib/Driver/ToolChains/Cuda.cpp
+index 57b8d434..57339f1a 100644
+--- a/lib/Driver/ToolChains/Cuda.cpp
++++ b/lib/Driver/ToolChains/Cuda.cpp
+@@ -68,6 +68,9 @@ CudaInstallationDetector::CudaInstallationDetector(
+ const Driver &D, const llvm::Triple &HostTriple,
+ const llvm::opt::ArgList &Args)
+ : D(D) {
++ // Don't look for CUDA in /usr.
++ return;
++
+ struct Candidate {
+ std::string Path;
+ bool StrictChecking;
+diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp
+index 65ab9b2d..5ed28e0a 100644
+--- a/lib/Driver/ToolChains/Linux.cpp
++++ b/lib/Driver/ToolChains/Linux.cpp
+@@ -233,7 +233,9 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
+ PPaths.push_back(Twine(GCCInstallation.getParentLibPath() + "/../" +
+ GCCInstallation.getTriple().str() + "/bin")
+ .str());
+-
++ // Comment out the distro-specific tweaks so that they don't bite when
++ // using Guix on a foreign distro.
++#if 0
+ Distro Distro(D.getVFS());
+
+ if (Distro.IsAlpineLinux() || Triple.isAndroid()) {
+@@ -304,6 +306,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
+
+ if (IsAndroid || Distro.IsOpenSUSE())
+ ExtraOpts.push_back("--enable-new-dtags");
++#endif
+
+ // The selection of paths to try here is designed to match the patterns which
+ // the GCC driver itself uses, as this is part of the GCC-compatible driver.
+@@ -366,6 +369,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
+ }
+ }
+
++#if 0
+ // Similar to the logic for GCC above, if we currently running Clang inside
+ // of the requested system root, add its parent library paths to
+ // those searched.
+@@ -411,6 +415,8 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
+ // Try walking via the GCC triple path in case of biarch or multiarch GCC
+ // installations with strange symlinks.
+ if (GCCInstallation.isValid()) {
++ // The following code would end up adding things like
++ // "/usr/lib/x86_64-unknown-linux-gnu/../../lib64" to the search path.
+ addPathIfExists(D,
+ SysRoot + "/usr/lib/" + GCCInstallation.getTriple().str() +
+ "/../../" + OSLibDir,
+@@ -446,9 +452,14 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
+ // directory ('Dir' below) or the ResourceDir.
+ if (StringRef(D.Dir).startswith(SysRoot))
+ addPathIfExists(D, D.Dir + "/../lib", Paths);
++#endif
++
++ // Add libc's lib/ directory to the search path, so that crt1.o, crti.o,
++ // and friends can be found.
++ addPathIfExists(D, "@GLIBC_LIBDIR@", Paths);
+
+- addPathIfExists(D, SysRoot + "/lib", Paths);
+- addPathIfExists(D, SysRoot + "/usr/lib", Paths);
++ // Add GCC's lib/ directory so libstdc++.so can be found.
++ addPathIfExists(D, GCCInstallation.getParentLibPath(), Paths);
+ }
+
+ ToolChain::CXXStdlibType Linux::GetDefaultCXXStdlibType() const {
diff --git a/gnu/packages/patches/clang-9.0-libc-search-path.patch b/gnu/packages/patches/clang-9.0-libc-search-path.patch
index be34344842..1984895a9c 100644
--- a/gnu/packages/patches/clang-9.0-libc-search-path.patch
+++ b/gnu/packages/patches/clang-9.0-libc-search-path.patch
@@ -4,17 +4,47 @@ but unfortunately, that doesn't work for us.
This patch makes it easy to insert libc's $libdir so that Clang passes the
correct absolute file name of crt1.o etc. to 'ld'. It also disables all
the distro-specific stuff and removes the hard-coded FHS directory names
-to make sure Clang also works on non-GuixSD systems.
+to make sure Clang also works on foreign distros.
+diff --git a/lib/Driver/Distro.cpp b/lib/Driver/Distro.cpp
+index f2a3074d..536db89c 100644
+--- a/lib/Driver/Distro.cpp
++++ b/lib/Driver/Distro.cpp
+@@ -18,6 +18,10 @@ using namespace clang::driver;
+ using namespace clang;
+
+ static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS) {
++ // The compiler should always behave the same, even when used via Guix on a
++ // foreign distro.
++ return Distro::UnknownDistro;
++
+ llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> File =
+ VFS.getBufferForFile("/etc/lsb-release");
+ if (File) {
+diff --git a/lib/Driver/ToolChains/Cuda.cpp b/lib/Driver/ToolChains/Cuda.cpp
+index 96f8c513..64fd7a26 100644
+--- a/lib/Driver/ToolChains/Cuda.cpp
++++ b/lib/Driver/ToolChains/Cuda.cpp
+@@ -69,6 +69,9 @@ CudaInstallationDetector::CudaInstallationDetector(
+ const Driver &D, const llvm::Triple &HostTriple,
+ const llvm::opt::ArgList &Args)
+ : D(D) {
++ // Don't look for CUDA in /usr.
++ return;
++
+ struct Candidate {
+ std::string Path;
+ bool StrictChecking;
diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp
+index 7f59bc77..67d8ce22 100644
--- a/lib/Driver/ToolChains/Linux.cpp
+++ b/lib/Driver/ToolChains/Linux.cpp
@@ -240,6 +240,9 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
.str());
}
-+// Comment out the distro-specific tweaks so that they don't bite when
-+// using Guix on a foreign distro.
++ // Comment out the distro-specific tweaks so that they don't bite when
++ // using Guix on a foreign distro.
+#if 0
Distro Distro(D.getVFS());
@@ -27,57 +57,37 @@ diff --git a/lib/Driver/ToolChains/Linux.cpp b/lib/Driver/ToolChains/Linux.cpp
// The selection of paths to try here is designed to match the patterns which
// the GCC driver itself uses, as this is part of the GCC-compatible driver.
-@@ -363,7 +367,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
- // the cross. Note that GCC does include some of these directories in some
- // configurations but this seems somewhere between questionable and simply
- // a bug.
-- if (StringRef(LibPath).startswith(SysRoot)) {
-+ if (0) {
- addPathIfExists(D, LibPath + "/" + MultiarchTriple, Paths);
- addPathIfExists(D, LibPath + "/../" + OSLibDir, Paths);
+@@ -369,6 +373,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
}
-@@ -382,6 +386,8 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
- addPathIfExists(D, SysRoot + "/lib/" + MultiarchTriple, Paths);
- addPathIfExists(D, SysRoot + "/lib/../" + OSLibDir, Paths);
-
-+// This requires the commented distro tweaks above.
-+#if 0
- if (IsAndroid) {
- // Android sysroots contain a library directory for each supported OS
- // version as well as some unversioned libraries in the usual multiarch
-@@ -410,10 +416,15 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
- addPathIfExists(D, SysRoot + "/" + OSLibDir + "/" + ABIName, Paths);
- addPathIfExists(D, SysRoot + "/usr/" + OSLibDir + "/" + ABIName, Paths);
}
-+#endif
++#if 0
+ // Similar to the logic for GCC above, if we currently running Clang inside
+ // of the requested system root, add its parent library paths to
+ // those searched.
+@@ -414,6 +419,8 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
// Try walking via the GCC triple path in case of biarch or multiarch GCC
// installations with strange symlinks.
if (GCCInstallation.isValid()) {
-+
-+// The following code would end up adding things like
-+// "/usr/lib/x86_64-unknown-linux-gnu/../../lib64" to the search path.
-+#if 0
++ // The following code would end up adding things like
++ // "/usr/lib/x86_64-unknown-linux-gnu/../../lib64" to the search path.
addPathIfExists(D,
SysRoot + "/usr/lib/" + GCCInstallation.getTriple().str() +
"/../../" + OSLibDir,
-@@ -426,6 +437,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
- BiarchSibling.gccSuffix(),
- Paths);
- }
-+#endif
-
- // See comments above on the multilib variant for details of why this is
- // included even from outside the sysroot.
-@@ -450,8 +462,9 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
+@@ -449,9 +456,14 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
+ // directory ('Dir' below) or the ResourceDir.
if (StringRef(D.Dir).startswith(SysRoot))
addPathIfExists(D, D.Dir + "/../lib", Paths);
-
-- addPathIfExists(D, SysRoot + "/lib", Paths);
-- addPathIfExists(D, SysRoot + "/usr/lib", Paths);
++#endif
++
+ // Add libc's lib/ directory to the search path, so that crt1.o, crti.o,
+ // and friends can be found.
+ addPathIfExists(D, "@GLIBC_LIBDIR@", Paths);
+
+- addPathIfExists(D, SysRoot + "/lib", Paths);
+- addPathIfExists(D, SysRoot + "/usr/lib", Paths);
++ // Add GCC's lib/ directory so libstdc++.so can be found.
++ addPathIfExists(D, GCCInstallation.getParentLibPath(), Paths);
}
ToolChain::CXXStdlibType Linux::GetDefaultCXXStdlibType() const {
diff --git a/gnu/packages/patches/diffoscope-fix-test_item3_deflate_llvm_bitcode.patch b/gnu/packages/patches/diffoscope-fix-test_item3_deflate_llvm_bitcode.patch
new file mode 100644
index 0000000000..45e496a128
--- /dev/null
+++ b/gnu/packages/patches/diffoscope-fix-test_item3_deflate_llvm_bitcode.patch
@@ -0,0 +1,28 @@
+From b7eeac09eb068083bdee1a3aa062d1e52a2fa61a Mon Sep 17 00:00:00 2001
+From: Tobias Geerinckx-Rice <me@tobias.gr>
+Date: Mon, 4 Oct 2021 21:03:43 +0200
+Subject: [PATCH] gnu: diffoscope: Fix test_item3_deflate_llvm_bitcode.
+
+Taken verbatim from Nixpkgs[0].
+
+[0]: https://github.com/NixOS/nixpkgs/blob/589e03f109092a3ba97781fd0533110bf78a3f97/pkgs/tools/misc/diffoscope/fix-tests.patch
+---
+ tests/comparators/test_rlib.py | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/tests/comparators/test_rlib.py b/tests/comparators/test_rlib.py
+index 8d201ab..05960aa 100644
+--- a/tests/comparators/test_rlib.py
++++ b/tests/comparators/test_rlib.py
+@@ -81,9 +81,6 @@ def rlib_dis_expected_diff():
+ if actual_ver >= "7.0":
+ diff_file = "rlib_llvm_dis_expected_diff_7"
+
+- if actual_ver >= "10.0":
+- diff_file = "rlib_llvm_dis_expected_diff_10"
+-
+ return get_data(diff_file)
+
+
+--
+2.33.0
diff --git a/gnu/packages/patches/ganeti-deterministic-manual.patch b/gnu/packages/patches/ganeti-deterministic-manual.patch
deleted file mode 100644
index 2d90aa740e..0000000000
--- a/gnu/packages/patches/ganeti-deterministic-manual.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Sort the ecode list in the gnt-cluster manual for deterministic results.
-
-Submitted upstream: <https://github.com/ganeti/ganeti/pull/1504>.
-
-diff --git a/lib/build/sphinx_ext.py b/lib/build/sphinx_ext.py
---- a/lib/build/sphinx_ext.py
-+++ b/lib/build/sphinx_ext.py
-@@ -108,7 +108,7 @@ CV_ECODES_DOC = "ecodes"
- # pylint: disable=W0621
- CV_ECODES_DOC_LIST = [(name, doc) for (_, name, doc) in constants.CV_ALL_ECODES]
- DOCUMENTED_CONSTANTS = {
-- CV_ECODES_DOC: CV_ECODES_DOC_LIST,
-+ CV_ECODES_DOC: sorted(CV_ECODES_DOC_LIST, key=lambda tup: tup[0]),
- }
-
-
diff --git a/gnu/packages/patches/ganeti-drbd-compat.patch b/gnu/packages/patches/ganeti-drbd-compat.patch
deleted file mode 100644
index 32f46bc7ed..0000000000
--- a/gnu/packages/patches/ganeti-drbd-compat.patch
+++ /dev/null
@@ -1,166 +0,0 @@
-This patch adds support for newer versions of DRBD.
-
-Submitted upstream: <https://github.com/ganeti/ganeti/pull/1496>.
-
-diff --git a/lib/storage/drbd.py b/lib/storage/drbd.py
---- a/lib/storage/drbd.py
-+++ b/lib/storage/drbd.py
-@@ -315,6 +315,13 @@ class DRBD8Dev(base.BlockDev):
- """
- return self._show_info_cls.GetDevInfo(self._GetShowData(minor))
-
-+ @staticmethod
-+ def _NeedsLocalSyncerParams():
-+ # For DRBD >= 8.4, syncer init must be done after local, not in net.
-+ info = DRBD8.GetProcInfo()
-+ version = info.GetVersion()
-+ return version["k_minor"] >= 4
-+
- def _MatchesLocal(self, info):
- """Test if our local config matches with an existing device.
-
-@@ -397,6 +404,20 @@ class DRBD8Dev(base.BlockDev):
- base.ThrowError("drbd%d: can't attach local disk: %s",
- minor, result.output)
-
-+ def _WaitForMinorSyncParams():
-+ """Call _SetMinorSyncParams and raise RetryAgain on errors.
-+ """
-+ if self._SetMinorSyncParams(minor, self.params):
-+ raise utils.RetryAgain()
-+
-+ if self._NeedsLocalSyncerParams():
-+ # Retry because disk config for DRBD resource may be still uninitialized.
-+ try:
-+ utils.Retry(_WaitForMinorSyncParams, 1.0, 5.0)
-+ except utils.RetryTimeout as e:
-+ base.ThrowError("drbd%d: can't set the synchronization parameters: %s" %
-+ (minor, utils.CommaJoin(e.args[0])))
-+
- def _AssembleNet(self, minor, net_info, dual_pri=False, hmac=None,
- secret=None):
- """Configure the network part of the device.
-@@ -432,21 +453,24 @@ class DRBD8Dev(base.BlockDev):
- # sync speed only after setting up both sides can race with DRBD
- # connecting, hence we set it here before telling DRBD anything
- # about its peer.
-- sync_errors = self._SetMinorSyncParams(minor, self.params)
-- if sync_errors:
-- base.ThrowError("drbd%d: can't set the synchronization parameters: %s" %
-- (minor, utils.CommaJoin(sync_errors)))
-+
-+ if not self._NeedsLocalSyncerParams():
-+ sync_errors = self._SetMinorSyncParams(minor, self.params)
-+ if sync_errors:
-+ base.ThrowError("drbd%d: can't set the synchronization parameters: %s" %
-+ (minor, utils.CommaJoin(sync_errors)))
-
- family = self._GetNetFamily(minor, lhost, rhost)
-
-- cmd = self._cmd_gen.GenNetInitCmd(minor, family, lhost, lport,
-+ cmds = self._cmd_gen.GenNetInitCmds(minor, family, lhost, lport,
- rhost, rport, protocol,
- dual_pri, hmac, secret, self.params)
-
-- result = utils.RunCmd(cmd)
-- if result.failed:
-- base.ThrowError("drbd%d: can't setup network: %s - %s",
-- minor, result.fail_reason, result.output)
-+ for cmd in cmds:
-+ result = utils.RunCmd(cmd)
-+ if result.failed:
-+ base.ThrowError("drbd%d: can't setup network: %s - %s",
-+ minor, result.fail_reason, result.output)
-
- def _CheckNetworkConfig():
- info = self._GetShowInfo(minor)
-@@ -463,19 +487,20 @@ class DRBD8Dev(base.BlockDev):
- base.ThrowError("drbd%d: timeout while configuring network", minor)
-
- # Once the assembly is over, try to set the synchronization parameters
-- try:
-- # The minor may not have been set yet, requiring us to set it at least
-- # temporarily
-- old_minor = self.minor
-- self._SetFromMinor(minor)
-- sync_errors = self.SetSyncParams(self.params)
-- if sync_errors:
-- base.ThrowError("drbd%d: can't set the synchronization parameters: %s" %
-- (self.minor, utils.CommaJoin(sync_errors)))
-- finally:
-- # Undo the change, regardless of whether it will have to be done again
-- # soon
-- self._SetFromMinor(old_minor)
-+ if not self._NeedsLocalSyncerParams():
-+ try:
-+ # The minor may not have been set yet, requiring us to set it at least
-+ # temporarily
-+ old_minor = self.minor
-+ self._SetFromMinor(minor)
-+ sync_errors = self.SetSyncParams(self.params)
-+ if sync_errors:
-+ base.ThrowError("drbd%d: can't set the synchronization parameters: %s" %
-+ (self.minor, utils.CommaJoin(sync_errors)))
-+ finally:
-+ # Undo the change, regardless of whether it will have to be done again
-+ # soon
-+ self._SetFromMinor(old_minor)
-
- @staticmethod
- def _GetNetFamily(minor, lhost, rhost):
-diff --git a/lib/storage/drbd_cmdgen.py b/lib/storage/drbd_cmdgen.py
---- a/lib/storage/drbd_cmdgen.py
-+++ b/lib/storage/drbd_cmdgen.py
-@@ -56,7 +56,7 @@ class BaseDRBDCmdGenerator(object):
- def GenLocalInitCmds(self, minor, data_dev, meta_dev, size_mb, params):
- raise NotImplementedError
-
-- def GenNetInitCmd(self, minor, family, lhost, lport, rhost, rport, protocol,
-+ def GenNetInitCmds(self, minor, family, lhost, lport, rhost, rport, protocol,
- dual_pri, hmac, secret, params):
- raise NotImplementedError
-
-@@ -138,7 +138,7 @@ class DRBD83CmdGenerator(BaseDRBDCmdGenerator):
-
- return [args]
-
-- def GenNetInitCmd(self, minor, family, lhost, lport, rhost, rport, protocol,
-+ def GenNetInitCmds(self, minor, family, lhost, lport, rhost, rport, protocol,
- dual_pri, hmac, secret, params):
- args = ["drbdsetup", self._DevPath(minor), "net",
- "%s:%s:%s" % (family, lhost, lport),
-@@ -155,7 +155,7 @@ class DRBD83CmdGenerator(BaseDRBDCmdGenerator):
- if params[constants.LDP_NET_CUSTOM]:
- args.extend(shlex.split(params[constants.LDP_NET_CUSTOM]))
-
-- return args
-+ return [args]
-
- def GenSyncParamsCmd(self, minor, params):
- args = ["drbdsetup", self._DevPath(minor), "syncer"]
-@@ -345,8 +345,14 @@ class DRBD84CmdGenerator(BaseDRBDCmdGenerator):
-
- return cmds
-
-- def GenNetInitCmd(self, minor, family, lhost, lport, rhost, rport, protocol,
-+ def GenNetInitCmds(self, minor, family, lhost, lport, rhost, rport, protocol,
- dual_pri, hmac, secret, params):
-+ cmds = []
-+
-+ cmds.append(["drbdsetup", "new-resource", self._GetResource(minor)])
-+ cmds.append(["drbdsetup", "new-minor", self._GetResource(minor),
-+ str(minor), "0"])
-+
- args = ["drbdsetup", "connect", self._GetResource(minor),
- "%s:%s:%s" % (family, lhost, lport),
- "%s:%s:%s" % (family, rhost, rport),
-@@ -362,7 +368,8 @@ class DRBD84CmdGenerator(BaseDRBDCmdGenerator):
- if params[constants.LDP_NET_CUSTOM]:
- args.extend(shlex.split(params[constants.LDP_NET_CUSTOM]))
-
-- return args
-+ cmds.append(args)
-+ return cmds
-
- def GenSyncParamsCmd(self, minor, params):
- args = ["drbdsetup", "disk-options", minor]
diff --git a/gnu/packages/patches/ganeti-haskell-compat.patch b/gnu/packages/patches/ganeti-haskell-compat.patch
new file mode 100644
index 0000000000..931c50e116
--- /dev/null
+++ b/gnu/packages/patches/ganeti-haskell-compat.patch
@@ -0,0 +1,18 @@
+Adjust to type change of TupE in Template Haskell 2.16.
+
+diff --git a/src/Ganeti/THH/Types.hs b/src/Ganeti/THH/Types.hs
+--- a/src/Ganeti/THH/Types.hs
++++ b/src/Ganeti/THH/Types.hs
+@@ -123,4 +123,11 @@ curryN n = do
+ f <- newName "f"
+ ps <- replicateM n (newName "x")
+ return $ LamE (VarP f : map VarP ps)
+- (AppE (VarE f) (TupE $ map VarE ps))
++ (AppE (VarE f) (nonUnaryTupE $ map VarE ps))
++ where
++ nonUnaryTupE :: [Exp] -> Exp
++ nonUnaryTupE es = TupE $
++#if MIN_VERSION_template_haskell(2,16,0)
++ map Just
++#endif
++ es
diff --git a/gnu/packages/patches/ganeti-os-disk-size.patch b/gnu/packages/patches/ganeti-os-disk-size.patch
deleted file mode 100644
index 16b1d7615c..0000000000
--- a/gnu/packages/patches/ganeti-os-disk-size.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-This exposes information about disk sizes to OS install scripts. instance-guix
-uses this if available to determine the size of the VM image.
-
-Submitted upstream:
-https://github.com/ganeti/ganeti/pull/1503
-
-diff --git a/lib/backend.py b/lib/backend.py
---- a/lib/backend.py
-+++ b/lib/backend.py
-@@ -4305,6 +4305,7 @@ def OSEnvironment(instance, inst_os, debug=0):
- uri = _CalculateDeviceURI(instance, disk, real_disk)
- result["DISK_%d_ACCESS" % idx] = disk.mode
- result["DISK_%d_UUID" % idx] = disk.uuid
-+ result["DISK_%d_SIZE" % idx] = str(disk.size)
- if real_disk.dev_path:
- result["DISK_%d_PATH" % idx] = real_disk.dev_path
- if uri:
diff --git a/gnu/packages/patches/ghc-diff-swap-cover-args.patch b/gnu/packages/patches/ghc-diff-swap-cover-args.patch
deleted file mode 100644
index 724416ff7a..0000000000
--- a/gnu/packages/patches/ghc-diff-swap-cover-args.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-The QuickCheck library swapped the order of the arguments of the 'cover'
-function in version 2.12. Version 0.3.4 of the Diff library still uses
-the old argument order. Swapping the argument order makes Diff work
-with newer versions of QuickCheck.
-
-See <https://github.com/commercialhaskell/stackage/issues/4289> for the
-upstream bug report.
-
-diff -ruN a/test/Test.hs b/test/Test.hs
---- a/test/Test.hs 2016-04-23 01:21:45.000000000 -0400
-+++ b/test/Test.hs 2019-11-01 19:13:04.590770903 -0400
-@@ -134,7 +134,7 @@
- prop_ppDiffR (DiffInput le ri) =
- let haskDiff=ppDiff $ getGroupedDiff le ri
- utilDiff= unsafePerformIO (runDiff (unlines le) (unlines ri))
-- in cover (haskDiff == utilDiff) 90 "exact match" $
-+ in cover 90 (haskDiff == utilDiff) "exact match" $
- classify (haskDiff == utilDiff) "exact match"
- (div ((length haskDiff)*100) (length utilDiff) < 110) -- less than 10% bigger
- where
diff --git a/gnu/packages/patches/ghc-haddock-api-fix-haddock.patch b/gnu/packages/patches/ghc-haddock-api-fix-haddock.patch
deleted file mode 100644
index 927cb5b366..0000000000
--- a/gnu/packages/patches/ghc-haddock-api-fix-haddock.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-This patch is taken from upstream. It fixes documentation generation.
-The patch has been lightly adapted to apply to the release tarball, but
-the commit message was left untouched, so it refers to some changes not
-included in the patch.
-
-From 0d9a81e20238a6b72f9f5c005f1f7e9cf05f6fb9 Mon Sep 17 00:00:00 2001
-From: Alec Theriault <alec.theriault@gmail.com>
-Date: Sat, 27 Oct 2018 10:05:04 -0700
-Subject: [PATCH] Fix documentation in `haddock-api` (#957)
-
-* Fix misplaced Haddocks in Haddock itself
-
-Haddock should be able to generate documentation for 'haddock-api'
-again.
-
-* Make CI check that documentation can be built.
-
-* Add back a doc that is OK
----
- .travis.yml | 3 +++
- haddock-api/src/Haddock/Backends/LaTeX.hs | 10 +++++-----
- 2 files changed, 8 insertions(+), 5 deletions(-)
-
-diff --git a/src/Haddock/Backends/LaTeX.hs b/src/Haddock/Backends/LaTeX.hs
-index 4e0e6eba..613c6deb 100644
---- a/src/Haddock/Backends/LaTeX.hs
-+++ b/src/Haddock/Backends/LaTeX.hs
-@@ -243,8 +243,8 @@ ppDocGroup lev doc = sec lev <> braces doc
-
- -- | Given a declaration, extract out the names being declared
- declNames :: LHsDecl DocNameI
-- -> ( LaTeX -- ^ to print before each name in an export list
-- , [DocName] -- ^ names being declared
-+ -> ( LaTeX -- to print before each name in an export list
-+ , [DocName] -- names being declared
- )
- declNames (L _ decl) = case decl of
- TyClD _ d -> (empty, [tcdName d])
-@@ -444,9 +444,9 @@ ppLPatSig doc docnames ty unicode
- -- arguments as needed.
- ppTypeOrFunSig :: HsType DocNameI
- -> DocForDecl DocName -- ^ documentation
-- -> ( LaTeX -- ^ first-line (no-argument docs only)
-- , LaTeX -- ^ first-line (argument docs only)
-- , LaTeX -- ^ type prefix (argument docs only)
-+ -> ( LaTeX -- first-line (no-argument docs only)
-+ , LaTeX -- first-line (argument docs only)
-+ , LaTeX -- type prefix (argument docs only)
- )
- -> Bool -- ^ unicode
- -> LaTeX
---
-2.23.0
-
diff --git a/gnu/packages/patches/ghc-hpack-fix-tests.patch b/gnu/packages/patches/ghc-hpack-fix-tests.patch
deleted file mode 100644
index 19aa762174..0000000000
--- a/gnu/packages/patches/ghc-hpack-fix-tests.patch
+++ /dev/null
@@ -1,193 +0,0 @@
-This patch is taken and adapted from upstream. It landed shortly after
-the release of 0.31.2, and fixes eleven tests. The patch has been
-lightly adapted to apply to the release tarball, but the commit message
-was left untouched, so it refers to some changes not included in the
-patch.
-
-From a8d9362d4b686074f698c04c20beea88587511a1 Mon Sep 17 00:00:00 2001
-From: quasicomputational <quasicomputational@gmail.com>
-Date: Sat, 1 Jun 2019 15:11:31 +0100
-Subject: [PATCH] Make CI green (#345)
-
-* AppVeyor workaround for TMP issue
-
-https://github.com/commercialhaskell/stack/issues/3944
-
-* Bump resolver to nightly-2018-12-12.
-
-This has the primary benefit of moving to GHC 8.6.3 and should fix
-AppVeyor.
-
-* Add clock 0.8 as an extra-dep.
-
-* Adapt expected output to aeson 1.4.3.0.
----
- appveyor.yml | 3 +++
- hpack.cabal | 10 +++++-----
- package.yaml | 2 +-
- stack.yaml | 5 +++--
- test/Data/Aeson/Config/FromValueSpec.hs | 2 +-
- test/Data/Aeson/Config/TypesSpec.hs | 2 +-
- test/EndToEndSpec.hs | 8 ++++----
- test/Hpack/ConfigSpec.hs | 2 +-
- test/Hpack/Syntax/DefaultsSpec.hs | 2 +-
- test/Hpack/Syntax/DependenciesSpec.hs | 4 ++--
- 10 files changed, 22 insertions(+), 18 deletions(-)
-
-diff --git a/hpack.cabal b/hpack.cabal
-index fedb9a8..4db3014 100644
---- a/hpack.cabal
-+++ b/hpack.cabal
-@@ -1,10 +1,10 @@
- cabal-version: 1.12
-
---- This file has been generated from package.yaml by hpack version 0.31.0.
-+-- This file has been generated from package.yaml by hpack version 0.31.2.
- --
- -- see: https://github.com/sol/hpack
- --
---- hash: 3d060180293c32b8d0c25b710d0f419e96a6cc6ec3f95ac5e70bb77f44cbafc3
-+-- hash: bd5dd178c7e9f7f7a3456d79b592ea336c41ef43c9892354c001f06659e8b901
-
- name: hpack
- version: 0.31.2
-@@ -31,7 +31,7 @@ library
- build-depends:
- Cabal >=2.2
- , Glob >=0.9.0
-- , aeson >=1.2.1.0
-+ , aeson >=1.4.3.0
- , base >=4.9 && <5
- , bifunctors
- , bytestring
-@@ -87,7 +87,7 @@ executable hpack
- build-depends:
- Cabal >=2.2
- , Glob >=0.9.0
-- , aeson >=1.2.1.0
-+ , aeson >=1.4.3.0
- , base >=4.9 && <5
- , bifunctors
- , bytestring
-@@ -125,7 +125,7 @@ test-suite spec
- , Glob >=0.9.0
- , HUnit >=1.6.0.0
- , QuickCheck
-- , aeson >=1.2.1.0
-+ , aeson >=1.4.3.0
- , base >=4.9 && <5
- , bifunctors
- , bytestring
-diff --git a/test/Data/Aeson/Config/FromValueSpec.hs b/test/Data/Aeson/Config/FromValueSpec.hs
-index 33de8b7..06b3eb9 100644
---- a/test/Data/Aeson/Config/FromValueSpec.hs
-+++ b/test/Data/Aeson/Config/FromValueSpec.hs
-@@ -85,7 +85,7 @@ spec = do
- [yaml|
- name: "Joe"
- age: "23"
-- |] `shouldDecodeTo` left "Error while parsing $.age - expected Int, encountered String"
-+ |] `shouldDecodeTo` left "Error while parsing $.age - parsing Int failed, expected Number, but encountered String"
-
- context "with (,)" $ do
- it "captures unrecognized fields" $ do
-diff --git a/test/Data/Aeson/Config/TypesSpec.hs b/test/Data/Aeson/Config/TypesSpec.hs
-index c954534..472aa42 100644
---- a/test/Data/Aeson/Config/TypesSpec.hs
-+++ b/test/Data/Aeson/Config/TypesSpec.hs
-@@ -13,7 +13,7 @@ spec = do
- context "List" $ do
- let
- parseError :: String -> Result (List Int)
-- parseError prefix = Left (prefix ++ " - expected Int, encountered String")
-+ parseError prefix = Left (prefix ++ " - parsing Int failed, expected Number, but encountered String")
-
- context "when parsing single values" $ do
- it "returns the value in a singleton list" $ do
-diff --git a/test/EndToEndSpec.hs b/test/EndToEndSpec.hs
-index 283c72c..46389ea 100644
---- a/test/EndToEndSpec.hs
-+++ b/test/EndToEndSpec.hs
-@@ -285,7 +285,7 @@ spec = around_ (inTempDirectoryNamed "foo") $ do
- path: defaults.yaml
- ref: "2017"
- library: {}
-- |] `shouldFailWith` (file ++ ": Error while parsing $ - expected Object, encountered Array")
-+ |] `shouldFailWith` (file ++ ": Error while parsing $ - expected Object, but encountered Array")
-
- it "warns on unknown fields" $ do
- let file = joinPath ["defaults", "sol", "hpack-template", "2017", "defaults.yaml"]
-@@ -340,7 +340,7 @@ spec = around_ (inTempDirectoryNamed "foo") $ do
- it "rejects other values" $ do
- [i|
- version: {}
-- |] `shouldFailWith` "package.yaml: Error while parsing $.version - expected Number or String, encountered Object"
-+ |] `shouldFailWith` "package.yaml: Error while parsing $.version - expected Number or String, but encountered Object"
-
- describe "license" $ do
- it "accepts cabal-style licenses" $ do
-@@ -1363,14 +1363,14 @@ spec = around_ (inTempDirectoryNamed "foo") $ do
- then:
- dependencies: Win32
- else: null
-- |] `shouldFailWith` "package.yaml: Error while parsing $.when.else - expected Object, encountered Null"
-+ |] `shouldFailWith` "package.yaml: Error while parsing $.when.else - expected Object, but encountered Null"
-
- it "rejects invalid conditionals" $ do
- [i|
- dependencies:
- - foo
- - 23
-- |] `shouldFailWith` "package.yaml: Error while parsing $.dependencies[1] - expected Object or String, encountered Number"
-+ |] `shouldFailWith` "package.yaml: Error while parsing $.dependencies[1] - expected Object or String, but encountered Number"
-
- it "warns on unknown fields" $ do
- [i|
-diff --git a/test/Hpack/ConfigSpec.hs b/test/Hpack/ConfigSpec.hs
-index 9f4b279..69cbea1 100644
---- a/test/Hpack/ConfigSpec.hs
-+++ b/test/Hpack/ConfigSpec.hs
-@@ -675,7 +675,7 @@ spec = do
- it "rejects other values" $ do
- [yaml|
- 23
-- |] `shouldDecodeTo` (Left "Error while parsing $ - expected Boolean or String, encountered Number" :: Result Cond)
-+ |] `shouldDecodeTo` (Left "Error while parsing $ - expected Boolean or String, but encountered Number" :: Result Cond)
-
- describe "formatOrList" $ do
- it "formats a singleton list" $ do
-diff --git a/test/Hpack/Syntax/DefaultsSpec.hs b/test/Hpack/Syntax/DefaultsSpec.hs
-index 5875413..5438b7a 100644
---- a/test/Hpack/Syntax/DefaultsSpec.hs
-+++ b/test/Hpack/Syntax/DefaultsSpec.hs
-@@ -151,4 +151,4 @@ spec = do
- it "fails" $ do
- [yaml|
- 10
-- |] `shouldDecodeTo` left "Error while parsing $ - expected Object or String, encountered Number"
-+ |] `shouldDecodeTo` left "Error while parsing $ - expected Object or String, but encountered Number"
-diff --git a/test/Hpack/Syntax/DependenciesSpec.hs b/test/Hpack/Syntax/DependenciesSpec.hs
-index 1a83732..d95044f 100644
---- a/test/Hpack/Syntax/DependenciesSpec.hs
-+++ b/test/Hpack/Syntax/DependenciesSpec.hs
-@@ -125,7 +125,7 @@ spec = do
- it "rejects invalid values" $ do
- [yaml|
- hpack: []
-- |] `shouldDecodeTo` left "Error while parsing $.hpack - expected Null, Object, Number, or String, encountered Array"
-+ |] `shouldDecodeTo` left "Error while parsing $.hpack - expected Null, Object, Number, or String, but encountered Array"
-
- context "when the constraint is a Number" $ do
- it "accepts 1" $ do
-@@ -213,7 +213,7 @@ spec = do
- [yaml|
- foo:
- version: {}
-- |] `shouldDecodeTo` left "Error while parsing $.foo.version - expected Null, Number, or String, encountered Object"
-+ |] `shouldDecodeTo` left "Error while parsing $.foo.version - expected Null, Number, or String, but encountered Object"
-
- it "accepts a string" $ do
- [yaml|
---
-2.23.0
-
diff --git a/gnu/packages/patches/ghc-language-haskell-extract-ghc-8.10.patch b/gnu/packages/patches/ghc-language-haskell-extract-ghc-8.10.patch
new file mode 100644
index 0000000000..a1358dec94
--- /dev/null
+++ b/gnu/packages/patches/ghc-language-haskell-extract-ghc-8.10.patch
@@ -0,0 +1,27 @@
+Compatibility with GHC 8.10 and template-haskell 2.16.
+
+Taken from
+https://raw.githubusercontent.com/archlinux/svntogit-community/packages/haskell-language-haskell-extract/trunk/ghc-8.10.patch
+
+diff --git a/src/Language/Haskell/Extract.hs b/src/Language/Haskell/Extract.hs
+index 3e8958b..43dfe04 100644
+--- a/src/Language/Haskell/Extract.hs
++++ b/src/Language/Haskell/Extract.hs
+@@ -1,3 +1,4 @@
++{-# LANGUAGE CPP #-}
+ module Language.Haskell.Extract (
+ functionExtractor,
+ functionExtractorMap,
+@@ -25,7 +26,11 @@ extractAllFunctions pattern =
+ functionExtractor :: String -> ExpQ
+ functionExtractor pattern =
+ do functions <- extractAllFunctions pattern
+- let makePair n = TupE [ LitE $ StringL n , VarE $ mkName n]
++ let makePair n = TupE
++#if MIN_VERSION_template_haskell(2,16,0)
++ $ map Just
++#endif
++ [ LitE $ StringL n , VarE $ mkName n]
+ return $ ListE $ map makePair functions
+
+
diff --git a/gnu/packages/patches/ghc-microlens-aeson-fix-tests.patch b/gnu/packages/patches/ghc-microlens-aeson-fix-tests.patch
deleted file mode 100644
index c1ef6a837c..0000000000
--- a/gnu/packages/patches/ghc-microlens-aeson-fix-tests.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-This patch fixes the test suite to allow any order when listing the
-members of a JSON object. Aeson (being true to the JSON specification)
-does not specify an order for objects. In practice, the order depends
-on your processor architecture.
-
-See <https://github.com/bos/aeson/issues/568> for a discussion resulting
-in a similar patch fixing the Aeson tests.
-
-See <https://github.com/fosskers/microlens-aeson/issues/1> for the
-upstream bug report.
-
-diff -ruN a/test/Test.hs b/test/Test.hs
---- a/test/Test.hs 2018-12-31 15:10:50.000000000 -0500
-+++ b/test/Test.hs 2019-11-08 01:34:07.419706831 -0500
-@@ -48,8 +48,10 @@
- , testCase "" $ ("{\"a\": {}, \"b\": null}" ^? key (T.pack "b") . _Object) @?= Nothing
- , testCase "" $ ("{\"a\": 100, \"b\": 200}" ^? key (T.pack "a")) @?= Just (Number 100.0)
- , testCase "" $ ("[1,2,3]" ^? key (T.pack "a")) @?= Nothing
-- , testCase "" $ ("{\"a\": 4, \"b\": 7}" ^.. members) @?= [Number 4.0,Number 7.0]
-- , testCase "" $ ("{\"a\": 4, \"b\": 7}" & members . _Number %~ (* 10)) @?= "{\"a\":40,\"b\":70}"
-+ , testCase "" $ assertBool "" (let x = ("{\"a\": 4, \"b\": 7}" ^.. members)
-+ in x == [Number 4.0,Number 7.0] || x == [Number 7.0,Number 4.0])
-+ , testCase "" $ assertBool "" (let x = ("{\"a\": 4, \"b\": 7}" & members . _Number %~ (* 10))
-+ in x == "{\"a\":40,\"b\":70}" || x == "{\"b\":70,\"a\":40}")
- , testCase "" $ ("[1,2,3]" ^? nth 1) @?= Just (Number 2.0)
- , testCase "" $ ("{\"a\": 100, \"b\": 200}" ^? nth 1) @?= Nothing
- , testCase "" $ ("[1,2,3]" & nth 1 .~ Number 20) @?= "[1,20,3]"
diff --git a/gnu/packages/patches/ghc-pandoc-fix-html-tests.patch b/gnu/packages/patches/ghc-pandoc-fix-html-tests.patch
deleted file mode 100644
index b624ff9e9e..0000000000
--- a/gnu/packages/patches/ghc-pandoc-fix-html-tests.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-This patch is taken from upstream. It fixes two HTML tests that are broken
-due to using a Skylighting version greater than or equal to 0.8.2.
-
-From 968d2046a3cb6db661673be580660ac402753c34 Mon Sep 17 00:00:00 2001
-From: John MacFarlane <jgm@berkeley.edu>
-Date: Sun, 14 Jul 2019 10:48:14 -0700
-Subject: [PATCH] Update test for new skylighting.
-
----
- test/lhs-test.html | 13 ++++++-------
- test/lhs-test.html+lhs | 13 ++++++-------
- 2 files changed, 12 insertions(+), 14 deletions(-)
-
-diff --git a/test/lhs-test.html b/test/lhs-test.html
-index 6685555f4..446dd3d95 100644
---- a/test/lhs-test.html
-+++ b/test/lhs-test.html
-@@ -12,19 +12,18 @@
- div.column{display: inline-block; vertical-align: top; width: 50%;}
- </style>
- <style>
--code.sourceCode > span { display: inline-block; line-height: 1.25; }
-+pre > code.sourceCode { white-space: pre; position: relative; }
-+pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
-+pre > code.sourceCode > span:empty { height: 1.2em; }
- code.sourceCode > span { color: inherit; text-decoration: inherit; }
--code.sourceCode > span:empty { height: 1.2em; }
--.sourceCode { overflow: visible; }
--code.sourceCode { white-space: pre; position: relative; }
- div.sourceCode { margin: 1em 0; }
- pre.sourceCode { margin: 0; }
- @media screen {
- div.sourceCode { overflow: auto; }
- }
- @media print {
--code.sourceCode { white-space: pre-wrap; }
--code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
-+pre > code.sourceCode { white-space: pre-wrap; }
-+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
- }
- pre.numberSource code
- { counter-reset: source-line 0; }
-@@ -44,7 +43,7 @@ pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-le
- div.sourceCode
- { }
- @media screen {
--code.sourceCode > span > a:first-child::before { text-decoration: underline; }
-+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
- }
- code span.al { color: #ff0000; font-weight: bold; } /* Alert */
- code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
-diff --git a/test/lhs-test.html+lhs b/test/lhs-test.html+lhs
-index e57dfc105..a5cdb0245 100644
---- a/test/lhs-test.html+lhs
-+++ b/test/lhs-test.html+lhs
-@@ -12,19 +12,18 @@
- div.column{display: inline-block; vertical-align: top; width: 50%;}
- </style>
- <style>
--code.sourceCode > span { display: inline-block; line-height: 1.25; }
-+pre > code.sourceCode { white-space: pre; position: relative; }
-+pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
-+pre > code.sourceCode > span:empty { height: 1.2em; }
- code.sourceCode > span { color: inherit; text-decoration: inherit; }
--code.sourceCode > span:empty { height: 1.2em; }
--.sourceCode { overflow: visible; }
--code.sourceCode { white-space: pre; position: relative; }
- div.sourceCode { margin: 1em 0; }
- pre.sourceCode { margin: 0; }
- @media screen {
- div.sourceCode { overflow: auto; }
- }
- @media print {
--code.sourceCode { white-space: pre-wrap; }
--code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
-+pre > code.sourceCode { white-space: pre-wrap; }
-+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
- }
- pre.numberSource code
- { counter-reset: source-line 0; }
-@@ -44,7 +43,7 @@ pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-le
- div.sourceCode
- { }
- @media screen {
--code.sourceCode > span > a:first-child::before { text-decoration: underline; }
-+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
- }
- code span.al { color: #ff0000; font-weight: bold; } /* Alert */
- code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
---
-2.23.0
-
diff --git a/gnu/packages/patches/ghc-pandoc-fix-latex-test.patch b/gnu/packages/patches/ghc-pandoc-fix-latex-test.patch
deleted file mode 100644
index b38476882d..0000000000
--- a/gnu/packages/patches/ghc-pandoc-fix-latex-test.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-This patch is taken from upstream. It fixes a LaTeX test that is broken due
-to using a Skylighting version greater than or equal to 0.8.1.1.
-
-From 2cd1c7b30f200d18f1f1bdef1671369e1ad303ed Mon Sep 17 00:00:00 2001
-From: John MacFarlane <jgm@berkeley.edu>
-Date: Thu, 13 Jun 2019 19:33:52 -0700
-Subject: [PATCH] Update test for skylighting 0.8.1.1.
-
----
- test/lhs-test.latex | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/test/lhs-test.latex b/test/lhs-test.latex
-index 0442db5ca..a456995a3 100644
---- a/test/lhs-test.latex
-+++ b/test/lhs-test.latex
-@@ -94,9 +94,9 @@ return a single value:
-
- \begin{Shaded}
- \begin{Highlighting}[]
--\OtherTok{unsplit ::}\NormalTok{ (}\DataTypeTok{Arrow}\NormalTok{ a) }\OtherTok{=>}\NormalTok{ (b }\OtherTok{->}\NormalTok{ c }\OtherTok{->}\NormalTok{ d) }\OtherTok{->}\NormalTok{ a (b, c) d}
-+\OtherTok{unsplit ::}\NormalTok{ (}\DataTypeTok{Arrow}\NormalTok{ a) }\OtherTok{=>}\NormalTok{ (b }\OtherTok{{-}>}\NormalTok{ c }\OtherTok{{-}>}\NormalTok{ d) }\OtherTok{{-}>}\NormalTok{ a (b, c) d}
- \NormalTok{unsplit }\OtherTok{=}\NormalTok{ arr }\OperatorTok{.} \FunctionTok{uncurry}
-- \CommentTok{-- arr (\textbackslash{}op (x,y) -> x `op` y)}
-+ \CommentTok{{-}{-} arr (\textbackslash{}op (x,y) {-}> x \textasciigrave{}op\textasciigrave{} y)}
- \end{Highlighting}
- \end{Shaded}
-
---
-2.23.0
-
diff --git a/gnu/packages/patches/hedgewars-network-bsd.patch b/gnu/packages/patches/hedgewars-network-bsd.patch
new file mode 100644
index 0000000000..311ce8bf09
--- /dev/null
+++ b/gnu/packages/patches/hedgewars-network-bsd.patch
@@ -0,0 +1,150 @@
+From f813f3d5b63bb5be1b5e0b44930e77656c547aad Mon Sep 17 00:00:00 2001
+From: Jens Petersen <none@none>
+Date: Wed, 8 Jul 2020 17:02:45 +0300
+Subject: [PATCH] update server network
+
+---
+ gameServer/Actions.hs | 2 +-
+ gameServer/CMakeLists.txt | 3 ++-
+ gameServer/ClientIO.hs | 4 ++--
+ gameServer/CoreTypes.hs | 2 +-
+ gameServer/OfficialServer/checker.hs | 5 ++---
+ gameServer/Utils.hs | 6 +-----
+ gameServer/hedgewars-server.cabal | 3 ++-
+ gameServer/hedgewars-server.hs | 5 +++--
+ 8 files changed, 14 insertions(+), 16 deletions(-)
+
+diff --git a/gameServer/Actions.hs b/gameServer/Actions.hs
+index 125d6ea832..c42d17b9a9 100644
+--- a/gameServer/Actions.hs
++++ b/gameServer/Actions.hs
+@@ -709,7 +709,7 @@ processAction RestartServer = do
+ args <- gets (runArgs . serverInfo)
+ io $ do
+ noticeM "Core" "Closing listening socket"
+- sClose sock
++ close sock
+ noticeM "Core" "Spawning new server"
+ _ <- createProcess (proc "./hedgewars-server" args)
+ return ()
+diff --git a/gameServer/CMakeLists.txt b/gameServer/CMakeLists.txt
+index 5f2c882563..e71650c70c 100644
+--- a/gameServer/CMakeLists.txt
++++ b/gameServer/CMakeLists.txt
+@@ -9,7 +9,8 @@ check_haskell_package_exists(base "Control.Exception" mask 1)
+ check_haskell_package_exists(containers "Data.Map" size 1)
+ check_haskell_package_exists(vector "Data.Vector" length 1)
+ check_haskell_package_exists(bytestring "Data.ByteString" pack 1)
+-check_haskell_package_exists(network "Network.BSD" getHostName 0)
++check_haskell_package_exists(network "Network.Socket" defaultHints 0)
++check_haskell_package_exists(network-bsd "Network.BSD" getHostName 0)
+ check_haskell_package_exists(time "Data.Time" getCurrentTime 0)
+ check_haskell_package_exists(mtl "Control.Monad.State" fix 1)
+ check_haskell_package_exists(sandi "Codec.Binary.Base64" encode 1)
+diff --git a/gameServer/ClientIO.hs b/gameServer/ClientIO.hs
+index 46dd40ed9f..0c97bde932 100644
+--- a/gameServer/ClientIO.hs
++++ b/gameServer/ClientIO.hs
+@@ -23,7 +23,7 @@ import qualified Control.Exception as Exception
+ import Control.Monad.State
+ import Control.Concurrent.Chan
+ import Control.Concurrent
+-import Network
++import Network.Socket hiding (recv)
+ import Network.Socket.ByteString
+ import qualified Data.ByteString.Char8 as B
+ ----------------
+@@ -90,7 +90,7 @@ clientSendLoop s tId chan ci = do
+ sendAll s $ B.unlines answer `B.snoc` '\n'
+
+ if isQuit answer then
+- sClose s
++ close s
+ else
+ clientSendLoop s tId chan ci
+
+diff --git a/gameServer/CoreTypes.hs b/gameServer/CoreTypes.hs
+index f547df483a..72f35807e3 100644
+--- a/gameServer/CoreTypes.hs
++++ b/gameServer/CoreTypes.hs
+@@ -23,7 +23,7 @@ import Control.Concurrent
+ import Data.Word
+ import qualified Data.Map as Map
+ import Data.Time
+-import Network
++import Network.Socket
+ import Data.Function
+ import Data.ByteString.Char8 as B
+ import Data.Unique
+diff --git a/gameServer/OfficialServer/checker.hs b/gameServer/OfficialServer/checker.hs
+index 37df3208b9..b4ecb8fc57 100644
+--- a/gameServer/OfficialServer/checker.hs
++++ b/gameServer/OfficialServer/checker.hs
+@@ -28,8 +28,7 @@ import System.Directory
+ import Control.Monad.State
+ import Control.Concurrent.Chan
+ import Control.Concurrent
+-import Network
+-import Network.BSD
++import Network.BSD hiding (recv)
+ import Network.Socket hiding (recv, sClose)
+ import Network.Socket.ByteString
+ import qualified Data.ByteString.Char8 as B
+@@ -207,7 +206,7 @@ main = withSocketsDo . forever $ do
+
+ Exception.bracket
+ setupConnection
+- (\s -> noticeM "Core" "Shutting down" >> sClose s)
++ (\s -> noticeM "Core" "Shutting down" >> close s)
+ (session login password (d ++ "/.hedgewars") exeFullname dataPrefix)
+ where
+ setupConnection = do
+diff --git a/gameServer/Utils.hs b/gameServer/Utils.hs
+index 3d81b7f7c6..9fd80c01ba 100644
+--- a/gameServer/Utils.hs
++++ b/gameServer/Utils.hs
+@@ -41,11 +41,7 @@ import CoreTypes
+
+
+ sockAddr2String :: SockAddr -> IO B.ByteString
+-sockAddr2String (SockAddrInet _ hostAddr) = liftM B.pack $ inet_ntoa hostAddr
+-sockAddr2String (SockAddrInet6 _ _ (a, b, c, d) _) =
+- return $ B.pack $ (foldr1 (.)
+- $ List.intersperse (':':)
+- $ concatMap (\n -> (\(a0, a1) -> [showHex a0, showHex a1]) $ divMod n 65536) [a, b, c, d]) []
++sockAddr2String = liftM (B.pack . fromJust . fst) . getNameInfo [] True False
+
+ maybeRead :: Read a => String -> Maybe a
+ maybeRead s = case reads s of
+diff --git a/gameServer/hedgewars-server.cabal b/gameServer/hedgewars-server.cabal
+index 3c7f2418c9..9f764fd997 100644
+--- a/gameServer/hedgewars-server.cabal
++++ b/gameServer/hedgewars-server.cabal
+@@ -57,7 +57,8 @@ Executable checker
+ containers,
+ vector,
+ bytestring,
+- network >= 2.3 && < 3.0,
++ network >= 2.3,
++ network-bsd,
+ mtl >= 2,
+ sandi,
+ hslogger,
+diff --git a/gameServer/hedgewars-server.hs b/gameServer/hedgewars-server.hs
+index e47ae2891d..7e6ab8fa38 100644
+--- a/gameServer/hedgewars-server.hs
++++ b/gameServer/hedgewars-server.hs
+@@ -50,10 +50,11 @@ server si = do
+ proto <- getProtocolNumber "tcp"
+ E.bracket
+ (socket AF_INET Stream proto)
+- sClose
++ close
+ (\sock -> do
+ setSocketOption sock ReuseAddr 1
+- bindSocket sock (SockAddrInet (listenPort si) iNADDR_ANY)
++ iNADDR_ANY <- addrAddress . head <$> getAddrInfo Nothing (Just "0") (Just (show (listenPort si)))
++ bind sock iNADDR_ANY
+ listen sock maxListenQueue
+ startServer si{serverSocket = Just sock}
+ )
diff --git a/gnu/packages/patches/hexchat-add-libera-chat.patch b/gnu/packages/patches/hexchat-add-libera-chat.patch
deleted file mode 100644
index 2bbb3137ba..0000000000
--- a/gnu/packages/patches/hexchat-add-libera-chat.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-Add libera.chat to the list of available networks and make it the
-default.
-
-Patches copied from upstream source repository:
-
-https://github.com/hexchat/hexchat/commit/a25f2381689d2c2279a0e43b33f6c0ec8305a096
-https://github.com/hexchat/hexchat/commit/d3545f37cd5f551ed8bc0ab7b20e5c8140adc0a6
-
-From a25f2381689d2c2279a0e43b33f6c0ec8305a096 Mon Sep 17 00:00:00 2001
-From: Panagiotis Vasilopoulos <hello@alwayslivid.com>
-Date: Wed, 19 May 2021 16:25:16 +0300
-Subject: [PATCH] Add Libera Chat to network list
-
----
- src/common/servlist.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/common/servlist.c b/src/common/servlist.c
-index e44a3f2df..33bd80f2d 100644
---- a/src/common/servlist.c
-+++ b/src/common/servlist.c
-@@ -239,6 +239,9 @@ static const struct defaultserver def[] =
- /* Self signed */
- {0, "irc.librairc.net"},
-
-+ {"Libera Chat", 0, 0, 0, LOGIN_SASL, 0, TRUE},
-+ {0, "irc.libera.chat"},
-+
- #ifdef USE_OPENSSL
- {"LinkNet", 0},
- {0, "irc.link-net.org/+7000"},
-From d3545f37cd5f551ed8bc0ab7b20e5c8140adc0a6 Mon Sep 17 00:00:00 2001
-From: Patrick Griffis <pgriffis@igalia.com>
-Date: Sun, 23 May 2021 21:15:43 -0500
-Subject: [PATCH] Change default network to Libera.Chat
-
----
- src/common/servlist.c | 4 ++--
- src/fe-gtk/joind.c | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/common/servlist.c b/src/common/servlist.c
-index de75c8b9a..93557f975 100644
---- a/src/common/servlist.c
-+++ b/src/common/servlist.c
-@@ -240,7 +240,7 @@ static const struct defaultserver def[] =
- /* Self signed */
- {0, "irc.librairc.net"},
-
-- {"Libera Chat", 0, 0, 0, LOGIN_SASL, 0, TRUE},
-+ {"Libera.Chat", 0, 0, 0, LOGIN_SASL, 0, TRUE},
- {0, "irc.libera.chat"},
-
- #ifdef USE_OPENSSL
-@@ -942,7 +942,7 @@ servlist_load_defaults (void)
- {
- int i = 0, j = 0;
- ircnet *net = NULL;
-- guint def_hash = g_str_hash ("freenode");
-+ guint def_hash = g_str_hash ("Libera.Chat");
-
- while (1)
- {
-diff --git a/src/fe-gtk/joind.c b/src/fe-gtk/joind.c
-index f1d3da504..ce3cbcaec 100644
---- a/src/fe-gtk/joind.c
-+++ b/src/fe-gtk/joind.c
-@@ -247,7 +247,7 @@ joind_show_dialog (server *serv)
- G_CALLBACK (joind_ok_cb), serv);
-
- if (serv->network)
-- if (g_ascii_strcasecmp(((ircnet*)serv->network)->name, "freenode") == 0)
-+ if (g_ascii_strcasecmp(((ircnet*)serv->network)->name, "Libera.Chat") == 0)
- {
- gtk_entry_set_text (GTK_ENTRY (entry1), "#hexchat");
- }
diff --git a/gnu/packages/patches/idris-build-with-haskeline-0.8.patch b/gnu/packages/patches/idris-build-with-haskeline-0.8.patch
new file mode 100644
index 0000000000..5d1fec2409
--- /dev/null
+++ b/gnu/packages/patches/idris-build-with-haskeline-0.8.patch
@@ -0,0 +1,85 @@
+From 89a87cf666eb8b27190c779e72d0d76eadc1bc14 Mon Sep 17 00:00:00 2001
+From: Niklas Larsson <niklas@mm.st>
+Date: Sat, 6 Jun 2020 15:29:45 +0200
+Subject: [PATCH] Fix to unblock haskeline-0.8
+
+---
+Taken from <https://github.com/idris-lang/Idris-dev/pull/4871>
+
+ idris.cabal | 2 +-
+ src/Idris/Output.hs | 8 --------
+ src/Idris/REPL.hs | 12 +++++-------
+ 3 files changed, 6 insertions(+), 16 deletions(-)
+
+diff --git a/idris.cabal b/idris.cabal
+index 38359019a9..bc9e265023 100644
+--- a/idris.cabal
++++ b/idris.cabal
+@@ -336,7 +336,7 @@ Library
+ , directory >= 1.2.2.0 && < 1.2.3.0 || > 1.2.3.0
+ , filepath < 1.5
+ , fingertree >= 0.1.4.1 && < 0.2
+- , haskeline >= 0.7 && < 0.8
++ , haskeline >= 0.8 && < 0.9
+ , ieee754 >= 0.7 && < 0.9
+ , megaparsec >= 7.0.4 && < 9
+ , mtl >= 2.1 && < 2.3
+diff --git a/src/Idris/Output.hs b/src/Idris/Output.hs
+index 70b4d48a30..6b5d59948c 100644
+--- a/src/Idris/Output.hs
++++ b/src/Idris/Output.hs
+@@ -37,21 +37,13 @@ import Prelude hiding ((<$>))
+ #endif
+
+ import Control.Arrow (first)
+-import Control.Monad.Trans.Except (ExceptT(ExceptT), runExceptT)
+ import Data.List (intersperse, nub)
+ import Data.Maybe (fromJust, fromMaybe, isJust, listToMaybe)
+ import qualified Data.Set as S
+-import System.Console.Haskeline.MonadException (MonadException(controlIO),
+- RunIO(RunIO))
+ import System.FilePath (replaceExtension)
+ import System.IO (Handle, hPutStr, hPutStrLn)
+ import System.IO.Error (tryIOError)
+
+-instance MonadException m => MonadException (ExceptT Err m) where
+- controlIO f = ExceptT $ controlIO $ \(RunIO run) -> let
+- run' = RunIO (fmap ExceptT . run . runExceptT)
+- in fmap runExceptT $ f run'
+-
+ pshow :: IState -> Err -> String
+ pshow ist err = displayDecorated (consoleDecorate ist) .
+ renderPretty 1.0 80 .
+diff --git a/src/Idris/REPL.hs b/src/Idris/REPL.hs
+index 05587d9672..5e0dc21089 100644
+--- a/src/Idris/REPL.hs
++++ b/src/Idris/REPL.hs
+@@ -122,23 +122,21 @@ repl orig mods efile
+ (if colour && not isWindows
+ then colourisePrompt theme str
+ else str) ++ " "
+- x <- H.catch (H.withInterrupt $ getInputLine prompt)
+- (ctrlC (return $ Just ""))
++ x <- H.handleInterrupt (ctrlC (return $ Just "")) (H.withInterrupt $ getInputLine prompt)
+ case x of
+ Nothing -> do lift $ when (not quiet) (iputStrLn "Bye bye")
+ return ()
+ Just input -> -- H.catch
+- do ms <- H.catch (H.withInterrupt $ lift $ processInput input orig mods efile)
+- (ctrlC (return (Just mods)))
++ do ms <- H.handleInterrupt (ctrlC (return (Just mods))) (H.withInterrupt $ lift $ processInput input orig mods efile)
+ case ms of
+ Just mods -> let efile' = fromMaybe efile (listToMaybe mods)
+ in repl orig mods efile'
+ Nothing -> return ()
+ -- ctrlC)
+ -- ctrlC
+- where ctrlC :: InputT Idris a -> SomeException -> InputT Idris a
+- ctrlC act e = do lift $ iputStrLn (show e)
+- act -- repl orig mods
++ where ctrlC :: InputT Idris a -> InputT Idris a
++ ctrlC act = do lift $ iputStrLn "Interrupted"
++ act -- repl orig mods
+
+ showMVs c thm [] = ""
+ showMVs c thm ms = "Holes: " ++
diff --git a/gnu/packages/patches/idris-build-with-megaparsec-9.patch b/gnu/packages/patches/idris-build-with-megaparsec-9.patch
new file mode 100644
index 0000000000..6d7ff1d713
--- /dev/null
+++ b/gnu/packages/patches/idris-build-with-megaparsec-9.patch
@@ -0,0 +1,27 @@
+From 6ea9bc913877d765048d7cdb7fc5aec60b196fac Mon Sep 17 00:00:00 2001
+From: Felix Yan <felixonmars@archlinux.org>
+Date: Wed, 16 Dec 2020 21:48:32 +0800
+Subject: [PATCH] Fix compatibility with megaparsec 9
+
+---
+Taken from <https://github.com/idris-lang/Idris-dev/pull/4892>
+
+ src/Idris/Parser/Stack.hs | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/Idris/Parser/Stack.hs b/src/Idris/Parser/Stack.hs
+index fb7b611440..879786f4d2 100644
+--- a/src/Idris/Parser/Stack.hs
++++ b/src/Idris/Parser/Stack.hs
+@@ -84,7 +84,11 @@ instance Message ParseError where
+ (pos, _) = P.reachOffsetNoLine (parseErrorOffset err) (parseErrorPosState err)
+ #endif
+ messageText = PP.text . init . P.parseErrorTextPretty . parseError
++#if MIN_VERSION_megaparsec(9,0,0)
++ messageSource err = sline
++#else
+ messageSource err = Just sline
++#endif
+ where
+ #if MIN_VERSION_megaparsec(8,0,0)
+ (sline, _) = P.reachOffset (parseErrorOffset err) (parseErrorPosState err)
diff --git a/gnu/packages/patches/libcacard-unknown-variable.patch b/gnu/packages/patches/libcacard-unknown-variable.patch
deleted file mode 100644
index 830a3ee8c0..0000000000
--- a/gnu/packages/patches/libcacard-unknown-variable.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Fix Meson error when test dependencies are missing.
-
-Based on this upstream commit, with some adjustments to apply on 2.8.0:
-https://gitlab.freedesktop.org/spice/libcacard/-/commit/cf6121deb47e437aa566cfeb29a03da93c432394
-
-diff --git a/tests/meson.build b/tests/meson.build
-index 87945a2..baefaf5 100644
---- a/tests/meson.build
-+++ b/tests/meson.build
-@@ -9,15 +9,6 @@ modutil_dep = find_program('modutil', required: false)
- openssl_dep = find_program('openssl', required: false)
- softhsm_util_dep = find_program('softhsm2-util', required: false)
-
--if pkcs11_tool_dep.found() and p11tool_dep.found() and modutil_dep.found() and openssl_dep.found() and softhsm_util_dep.found()
-- softhsm = custom_target(
-- 'softhsm2.conf',
-- command: find_program('setup-softhsm2.sh'),
-- capture: true,
-- output: 'setup-softhsm2.log',
-- )
--endif
--
- libcacard_test = executable(
- 'libcacard',
- ['libcacard.c', 'common.c'],
-@@ -64,9 +55,18 @@ hwtests_test = executable(
- dependencies: [libcacard_dep],
- )
-
--test(
-- 'hwtests',
-- hwtests_test,
-- depends: [softhsm],
-- env: env,
--)
-+if pkcs11_tool_dep.found() and p11tool_dep.found() and modutil_dep.found() and openssl_dep.found() and softhsm_util_dep.found()
-+ softhsm = custom_target(
-+ 'softhsm2.conf',
-+ command: find_program('setup-softhsm2.sh'),
-+ capture: true,
-+ output: 'setup-softhsm2.log',
-+ )
-+
-+ test(
-+ 'hwtests',
-+ hwtests_test,
-+ depends: [softhsm],
-+ env: env,
-+ )
-+endif
diff --git a/gnu/packages/patches/minetest-add-MINETEST_MOD_PATH.patch b/gnu/packages/patches/minetest-add-MINETEST_MOD_PATH.patch
index a74034a2c5..41338e6e6f 100644
--- a/gnu/packages/patches/minetest-add-MINETEST_MOD_PATH.patch
+++ b/gnu/packages/patches/minetest-add-MINETEST_MOD_PATH.patch
@@ -8,7 +8,7 @@ When it exists, Minetest will look there for mods
in addition to ~/.minetest/mods/. Mods can still be
installed to ~/.minetest/mods/ with the built-in installer.
-With thanks to Leo Prikler.
+With thanks to Liliana Marie Prikler.
---
builtin/mainmenu/pkgmgr.lua | 7 +++----
doc/menu_lua_api.txt | 8 +++++++-
diff --git a/gnu/packages/patches/ngless-unliftio.patch b/gnu/packages/patches/ngless-unliftio.patch
new file mode 100644
index 0000000000..87f5e79fcf
--- /dev/null
+++ b/gnu/packages/patches/ngless-unliftio.patch
@@ -0,0 +1,66 @@
+From 919565adc1216b9d3108b3043e8d307292b37393 Mon Sep 17 00:00:00 2001
+From: Luis Pedro Coelho <luis@luispedro.org>
+Date: Fri, 7 May 2021 11:42:56 +0800
+Subject: [PATCH] BLD Update to LTS-17.10
+
+- Updates the GHC version
+- Requires `extra-deps` for `diagrams` package
+- Simplifies code for NGLessIO monad as UnliftIO can now be auto-derived
+---
+ NGLess/NGLess/NGError.hs | 8 ++------
+ stack.yaml | 11 ++++++++---
+ 2 files changed, 10 insertions(+), 9 deletions(-)
+
+diff --git a/NGLess/NGLess/NGError.hs b/NGLess/NGLess/NGError.hs
+index a22e557f..c7eddf5b 100644
+--- a/NGLess/NGLess/NGError.hs
++++ b/NGLess/NGLess/NGError.hs
+@@ -50,7 +50,8 @@ type NGLess = Either NGError
+
+ newtype NGLessIO a = NGLessIO { unwrapNGLessIO :: ResourceT IO a }
+ deriving (Functor, Applicative, Monad, MonadIO,
+- MonadResource, MonadThrow, MonadCatch, MonadMask)
++ MonadResource, MonadThrow, MonadCatch, MonadMask,
++ MonadUnliftIO)
+
+
+ instance MonadError NGError NGLessIO where
+@@ -62,11 +63,6 @@ instance PrimMonad NGLessIO where
+ primitive act = NGLessIO (primitive act)
+ {-# INLINE primitive #-}
+
+-instance MonadUnliftIO NGLessIO where
+- askUnliftIO = NGLessIO $ do
+- u <- askUnliftIO
+- return $ UnliftIO (\(NGLessIO act) -> unliftIO u act)
+-
+ instance MonadFail NGLessIO where
+ fail err = throwShouldNotOccur err
+
+diff --git a/stack.yaml b/stack.yaml
+index 051d973d..11b65887 100644
+--- a/stack.yaml
++++ b/stack.yaml
+@@ -1,14 +1,19 @@
+ # For more information, see: https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md
+
+-resolver: lts-14.20
++resolver: lts-17.10
+ compiler-check: newer-minor
+
+ # Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3)
+ extra-deps:
+ - git: "https://github.com/ngless-toolkit/interval-to-int"
+ commit: "78289f6b48d41f7cc48169520ec9b77b050a0029"
+-
+-
++ - diagrams-core-1.4.2@sha256:47de45658e8a805b7cb7f535e7b093daf7e861604fa3c70e25bd4ef481bf1571,2997
++ - diagrams-lib-1.4.3@sha256:04f77778d4b550d3c8e54440800685f88467bef91075e82e009a8a6f45c51033,8232
++ - diagrams-svg-1.4.3@sha256:36708b0b4cf35507ccf689f1a25f6f81b8f41c2c4c2900793de820f66d4e241c,3181
++ - active-0.2.0.14@sha256:e618aba4a7881eb85dc1585e0a01230af6b4fbab6693931e4a5d0d3a5b184406,1823
++ - dual-tree-0.2.2.1@sha256:9ff31e461d873ae74ba51d93b454c0c4094726d7cb78a0c454394c965e83539d,2830
++ - monoid-extras-0.5.1@sha256:438dbfd7b4dce47d8f0ca577f56caf94bd1e21391afa545cad09fe7cf2e5793d,2333
++ - svg-builder-0.1.1@sha256:22de54d326a6b6912e461e1302edb9108b02aac0b6a6368fcdc3c4a224d487fd,1440
+ allow-newer: true
+
+ # Override default flag values for local packages and extra-deps
diff --git a/gnu/packages/patches/nnpack-system-libraries.patch b/gnu/packages/patches/nnpack-system-libraries.patch
new file mode 100644
index 0000000000..d708045ba0
--- /dev/null
+++ b/gnu/packages/patches/nnpack-system-libraries.patch
@@ -0,0 +1,205 @@
+This patch allows us to use our copy of the dependencies instead
+of downloading them and rebuilding them. It also builds a shared
+library.
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5ecd2df..aaa67d1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -12,7 +12,7 @@ SET_PROPERTY(CACHE NNPACK_BACKEND PROPERTY STRINGS auto psimd scalar)
+ OPTION(NNPACK_CONVOLUTION_ONLY "Build only NNPACK functions for convolutional layer" OFF)
+ OPTION(NNPACK_INFERENCE_ONLY "Build only NNPACK functions for inference" OFF)
+ OPTION(NNPACK_CUSTOM_THREADPOOL "Build NNPACK for custom thread pool" OFF)
+-SET(NNPACK_LIBRARY_TYPE "default" CACHE STRING "Type of library (shared, static, or default) to build")
++SET(NNPACK_LIBRARY_TYPE "shared" CACHE STRING "Type of library (shared, static, or default) to build")
+ SET_PROPERTY(CACHE NNPACK_LIBRARY_TYPE PROPERTY STRINGS default static shared)
+ OPTION(NNPACK_BUILD_TESTS "Build NNPACK unit tests" ON)
+
+@@ -123,7 +123,7 @@ SET(CONFU_DEPENDENCIES_BINARY_DIR ${CMAKE_BINARY_DIR}/deps
+ CACHE PATH "Confu-style dependencies binary directory")
+
+ IF(NNPACK_BACKEND STREQUAL "x86-64")
+- IF(NOT DEFINED PYTHON_SIX_SOURCE_DIR)
++ IF(FALSE)
+ MESSAGE(STATUS "Downloading six (Python package) to ${CONFU_DEPENDENCIES_SOURCE_DIR}/six (define PYTHON_SIX_SOURCE_DIR to avoid it)")
+ CONFIGURE_FILE(cmake/DownloadSix.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/six-download/CMakeLists.txt")
+ EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
+@@ -133,7 +133,7 @@ IF(NNPACK_BACKEND STREQUAL "x86-64")
+ SET(PYTHON_SIX_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/six" CACHE STRING "six (Python package) source directory")
+ ENDIF()
+
+- IF(NOT DEFINED PYTHON_ENUM_SOURCE_DIR)
++ IF(FALSE)
+ IF(${PYTHON_VERSION_STRING} VERSION_LESS 3.4)
+ # ---[ Python < 3.4 does not natively support enums, and needs a polyfill
+ MESSAGE(STATUS "Downloading enum (Python package) to ${CONFU_DEPENDENCIES_SOURCE_DIR}/enum (define PYTHON_ENUM_SOURCE_DIR to avoid it)")
+@@ -148,7 +148,7 @@ IF(NNPACK_BACKEND STREQUAL "x86-64")
+ ENDIF()
+ ENDIF()
+
+- IF(NOT DEFINED PYTHON_PEACHPY_SOURCE_DIR)
++ IF(FALSE)
+ # ---[ PeachPy requires Opcodes for installation
+ IF(NOT DEFINED PYTHON_OPCODES_SOURCE_DIR)
+ MESSAGE(STATUS "Downloading opcodes (Python package) to ${CONFU_DEPENDENCIES_SOURCE_DIR}/opcodes (define PYTHON_OPCODES_SOURCE_DIR to avoid it)")
+@@ -169,15 +169,9 @@ IF(NNPACK_BACKEND STREQUAL "x86-64")
+ SET(PYTHON_PEACHPY_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/peachpy" CACHE STRING "PeachPy (Python package) source directory")
+ ENDIF()
+
+- IF(${PYTHON_VERSION_STRING} VERSION_LESS 3.4)
+- # ---[ Python < 3.4 does not natively support enums, and needs a polyfill
+- SET(PEACHPY_PYTHONPATH "${PYTHON_SIX_SOURCE_DIR}:${PYTHON_ENUM_SOURCE_DIR}:${PYTHON_PEACHPY_SOURCE_DIR}")
+- ELSE()
+- SET(PEACHPY_PYTHONPATH "${PYTHON_SIX_SOURCE_DIR}:${PYTHON_PEACHPY_SOURCE_DIR}")
+- ENDIF()
+ ENDIF()
+
+-IF(NOT DEFINED CPUINFO_SOURCE_DIR)
++IF(FALSE)
+ MESSAGE(STATUS "Downloading cpuinfo to ${CONFU_DEPENDENCIES_SOURCE_DIR}/cpuinfo (define CPUINFO_SOURCE_DIR to avoid it)")
+ CONFIGURE_FILE(cmake/DownloadCpuinfo.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/cpuinfo-download/CMakeLists.txt")
+ EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
+@@ -187,7 +181,7 @@ IF(NOT DEFINED CPUINFO_SOURCE_DIR)
+ SET(CPUINFO_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/cpuinfo" CACHE STRING "cpuinfo source directory")
+ ENDIF()
+
+-IF(NOT DEFINED FP16_SOURCE_DIR)
++IF(FALSE)
+ MESSAGE(STATUS "Downloading FP16 to ${CONFU_DEPENDENCIES_SOURCE_DIR}/fp16 (define FP16_SOURCE_DIR to avoid it)")
+ CONFIGURE_FILE(cmake/DownloadFP16.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/fp16-download/CMakeLists.txt")
+ EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
+@@ -197,7 +191,7 @@ IF(NOT DEFINED FP16_SOURCE_DIR)
+ SET(FP16_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/fp16" CACHE STRING "FP16 source directory")
+ ENDIF()
+
+-IF(NOT DEFINED FXDIV_SOURCE_DIR)
++IF(FALSE)
+ MESSAGE(STATUS "Downloading FXdiv to ${CONFU_DEPENDENCIES_SOURCE_DIR}/fxdiv (define FXDIV_SOURCE_DIR to avoid it)")
+ CONFIGURE_FILE(cmake/DownloadFXdiv.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/fxdiv-download/CMakeLists.txt")
+ EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
+@@ -207,7 +201,7 @@ IF(NOT DEFINED FXDIV_SOURCE_DIR)
+ SET(FXDIV_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/fxdiv" CACHE STRING "FXdiv source directory")
+ ENDIF()
+
+-IF(NOT DEFINED PSIMD_SOURCE_DIR)
++IF(FALSE)
+ MESSAGE(STATUS "Downloading PSimd to ${CONFU_DEPENDENCIES_SOURCE_DIR}/psimd (define PSIMD_SOURCE_DIR to avoid it)")
+ CONFIGURE_FILE(cmake/DownloadPSimd.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/psimd-download/CMakeLists.txt")
+ EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
+@@ -217,7 +211,7 @@ IF(NOT DEFINED PSIMD_SOURCE_DIR)
+ SET(PSIMD_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/psimd" CACHE STRING "PSimd source directory")
+ ENDIF()
+
+-IF(NOT DEFINED PTHREADPOOL_SOURCE_DIR)
++IF(FALSE)
+ MESSAGE(STATUS "Downloading pthreadpool to ${CONFU_DEPENDENCIES_SOURCE_DIR}/pthreadpool (define PTHREADPOOL_SOURCE_DIR to avoid it)")
+ CONFIGURE_FILE(cmake/DownloadPThreadPool.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/pthreadpool-download/CMakeLists.txt")
+ EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
+@@ -227,7 +221,7 @@ IF(NOT DEFINED PTHREADPOOL_SOURCE_DIR)
+ SET(PTHREADPOOL_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/pthreadpool" CACHE STRING "pthreadpool source directory")
+ ENDIF()
+
+-IF(NNPACK_BUILD_TESTS AND NOT DEFINED GOOGLETEST_SOURCE_DIR)
++IF(FALSE)
+ MESSAGE(STATUS "Downloading Google Test to ${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest (define GOOGLETEST_SOURCE_DIR to avoid it)")
+ CONFIGURE_FILE(cmake/DownloadGoogleTest.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download/CMakeLists.txt")
+ EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
+@@ -237,6 +231,7 @@ IF(NNPACK_BUILD_TESTS AND NOT DEFINED GOOGLETEST_SOURCE_DIR)
+ SET(GOOGLETEST_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest" CACHE STRING "Google Test source directory")
+ ENDIF()
+
++
+ # ---[ NNPACK library
+ SET(NNPACK_INIT_SRCS src/init.c)
+ SET(NNPACK_LAYER_SRCS src/convolution-inference.c)
+@@ -427,8 +422,7 @@ IF(NNPACK_BACKEND STREQUAL "x86-64")
+ FILE(MAKE_DIRECTORY ${obj_dir})
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${obj}
+- COMMAND "PYTHONPATH=${PEACHPY_PYTHONPATH}"
+- ${PYTHON_EXECUTABLE} -m peachpy.x86_64
++ COMMAND ${PYTHON_EXECUTABLE} -m peachpy.x86_64
+ -mabi=sysv -g4 -mimage-format=${PEACHPY_IMAGE_FORMAT}
+ "-I${PROJECT_SOURCE_DIR}/src" "-I${PROJECT_SOURCE_DIR}/src/x86_64-fma" "-I${FP16_SOURCE_DIR}/include"
+ -o ${obj} "${PROJECT_SOURCE_DIR}/${src}"
+@@ -495,63 +489,10 @@ ADD_LIBRARY(nnpack_reference_layers STATIC ${NNPACK_REFERENCE_LAYERS_SRCS})
+ NNPACK_TARGET_ENABLE_C99(nnpack_reference_layers)
+ TARGET_INCLUDE_DIRECTORIES(nnpack_reference_layers PUBLIC include)
+
+-# ---[ Configure cpuinfo
+-IF(NOT TARGET cpuinfo)
+- SET(CPUINFO_BUILD_TOOLS OFF CACHE BOOL "")
+- SET(CPUINFO_BUILD_UNIT_TESTS OFF CACHE BOOL "")
+- SET(CPUINFO_BUILD_MOCK_TESTS OFF CACHE BOOL "")
+- SET(CPUINFO_BUILD_BENCHMARKS OFF CACHE BOOL "")
+- ADD_SUBDIRECTORY(
+- "${CPUINFO_SOURCE_DIR}"
+- "${CONFU_DEPENDENCIES_BINARY_DIR}/cpuinfo")
+-ENDIF()
+-TARGET_LINK_LIBRARIES(nnpack PRIVATE cpuinfo)
+-
+-# ---[ Configure pthreadpool
+-IF(NOT TARGET pthreadpool)
+- SET(PTHREADPOOL_BUILD_TESTS OFF CACHE BOOL "")
+- SET(PTHREADPOOL_BUILD_BENCHMARKS OFF CACHE BOOL "")
+- ADD_SUBDIRECTORY(
+- "${PTHREADPOOL_SOURCE_DIR}"
+- "${CONFU_DEPENDENCIES_BINARY_DIR}/pthreadpool")
+-ENDIF()
+-IF(NNPACK_CUSTOM_THREADPOOL)
+- # Depend on pthreadpool interface, but not on implementation.
+- # This is used when NNPACK user (e.g. Caffe2) provides its own threadpool implementation.
+- TARGET_LINK_LIBRARIES(nnpack PUBLIC pthreadpool_interface)
+-ELSE()
+- TARGET_LINK_LIBRARIES(nnpack PUBLIC pthreadpool)
+-ENDIF()
+-TARGET_LINK_LIBRARIES(nnpack_reference_layers PUBLIC pthreadpool)
++TARGET_LINK_LIBRARIES(nnpack PUBLIC cpuinfo)
+
+-# ---[ Configure FXdiv
+-IF(NOT TARGET fxdiv)
+- SET(FXDIV_BUILD_TESTS OFF CACHE BOOL "")
+- SET(FXDIV_BUILD_BENCHMARKS OFF CACHE BOOL "")
+- ADD_SUBDIRECTORY(
+- "${FXDIV_SOURCE_DIR}"
+- "${CONFU_DEPENDENCIES_BINARY_DIR}/fxdiv")
+-ENDIF()
+-TARGET_LINK_LIBRARIES(nnpack PRIVATE fxdiv)
+-
+-# ---[ Configure psimd
+-IF(NOT TARGET psimd)
+- ADD_SUBDIRECTORY(
+- "${PSIMD_SOURCE_DIR}"
+- "${CONFU_DEPENDENCIES_BINARY_DIR}/psimd")
+-ENDIF()
+-TARGET_LINK_LIBRARIES(nnpack PRIVATE psimd)
+-
+-# ---[ Configure FP16
+-IF(NOT TARGET fp16)
+- SET(FP16_BUILD_TESTS OFF CACHE BOOL "")
+- SET(FP16_BUILD_BENCHMARKS OFF CACHE BOOL "")
+- ADD_SUBDIRECTORY(
+- "${FP16_SOURCE_DIR}"
+- "${CONFU_DEPENDENCIES_BINARY_DIR}/fp16")
+-ENDIF()
+-TARGET_LINK_LIBRARIES(nnpack PRIVATE fp16)
+-TARGET_LINK_LIBRARIES(nnpack_reference_layers PUBLIC fp16)
++TARGET_LINK_LIBRARIES(nnpack PUBLIC pthreadpool)
++TARGET_LINK_LIBRARIES(nnpack_reference_layers PUBLIC pthreadpool)
+
+ INSTALL(TARGETS nnpack
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+@@ -560,13 +501,6 @@ INSTALL(TARGETS nnpack
+
+ IF(NNPACK_BUILD_TESTS)
+ # ---[ Build google test
+- IF(NOT TARGET gtest)
+- SET(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
+- ADD_SUBDIRECTORY(
+- "${GOOGLETEST_SOURCE_DIR}"
+- "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest")
+- ENDIF()
+-
+ ADD_EXECUTABLE(convolution-inference-smoketest test/convolution-inference/smoke.cc)
+ NNPACK_TARGET_ENABLE_CXX11(convolution-inference-smoketest)
+ TARGET_INCLUDE_DIRECTORIES(convolution-inference-smoketest PRIVATE test)
diff --git a/gnu/packages/patches/ntfs-3g-CVE-2019-9755.patch b/gnu/packages/patches/ntfs-3g-CVE-2019-9755.patch
deleted file mode 100644
index a7794aed47..0000000000
--- a/gnu/packages/patches/ntfs-3g-CVE-2019-9755.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-Fix CVE-2019-9755:
-
-https://security-tracker.debian.org/tracker/CVE-2019-9755
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-9755
-
-Patch copied from upstream source repository:
-
-https://sourceforge.net/p/ntfs-3g/ntfs-3g/ci/85c1634a26faa572d3c558d4cf8aaaca5202d4e9/
-
-From 85c1634a26faa572d3c558d4cf8aaaca5202d4e9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= <jean-pierre.andre@wanadoo.fr>
-Date: Wed, 19 Dec 2018 15:57:50 +0100
-Subject: [PATCH] Fixed reporting an error when failed to build the mountpoint
-
-The size check was inefficient because getcwd() uses an unsigned int
-argument.
----
- src/lowntfs-3g.c | 6 +++++-
- src/ntfs-3g.c | 6 +++++-
- 2 files changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c
-index 993867fa..0660439b 100644
---- a/src/lowntfs-3g.c
-+++ b/src/lowntfs-3g.c
-@@ -4411,7 +4411,8 @@ int main(int argc, char *argv[])
- else {
- ctx->abs_mnt_point = (char*)ntfs_malloc(PATH_MAX);
- if (ctx->abs_mnt_point) {
-- if (getcwd(ctx->abs_mnt_point,
-+ if ((strlen(opts.mnt_point) < PATH_MAX)
-+ && getcwd(ctx->abs_mnt_point,
- PATH_MAX - strlen(opts.mnt_point) - 1)) {
- strcat(ctx->abs_mnt_point, "/");
- strcat(ctx->abs_mnt_point, opts.mnt_point);
-@@ -4419,6 +4420,9 @@ int main(int argc, char *argv[])
- /* Solaris also wants the absolute mount point */
- opts.mnt_point = ctx->abs_mnt_point;
- #endif /* defined(__sun) && defined (__SVR4) */
-+ } else {
-+ free(ctx->abs_mnt_point);
-+ ctx->abs_mnt_point = (char*)NULL;
- }
- }
- }
-diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c
-index 6ce89fef..4e0912ae 100644
---- a/src/ntfs-3g.c
-+++ b/src/ntfs-3g.c
-@@ -4148,7 +4148,8 @@ int main(int argc, char *argv[])
- else {
- ctx->abs_mnt_point = (char*)ntfs_malloc(PATH_MAX);
- if (ctx->abs_mnt_point) {
-- if (getcwd(ctx->abs_mnt_point,
-+ if ((strlen(opts.mnt_point) < PATH_MAX)
-+ && getcwd(ctx->abs_mnt_point,
- PATH_MAX - strlen(opts.mnt_point) - 1)) {
- strcat(ctx->abs_mnt_point, "/");
- strcat(ctx->abs_mnt_point, opts.mnt_point);
-@@ -4156,6 +4157,9 @@ int main(int argc, char *argv[])
- /* Solaris also wants the absolute mount point */
- opts.mnt_point = ctx->abs_mnt_point;
- #endif /* defined(__sun) && defined (__SVR4) */
-+ } else {
-+ free(ctx->abs_mnt_point);
-+ ctx->abs_mnt_point = (char*)NULL;
- }
- }
- }
---
-2.21.0
-
diff --git a/gnu/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch b/gnu/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch
deleted file mode 100644
index 1ebde1997f..0000000000
--- a/gnu/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 3c70f2ff18650c4794556049cd4ea22a58cc719e Mon Sep 17 00:00:00 2001
-From: Christophe Troestler <Christophe.Troestler@umons.ac.be>
-Date: Sun, 27 Sep 2020 23:20:52 +0200
-Subject: [PATCH] Do not store the Caml_ba_array_val pointer during surface
- creation
-
-Extracted from Cairo git-tree on November 22, 2020 by
-Brett Gilio <brettg@gnu.org>
----
- src/cairo_stubs.c | 3 ++-
- tests/image_create.ml | 5 +++--
- 2 files changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/src/cairo_stubs.c b/src/cairo_stubs.c
-index 641ee2c..200abf3 100644
---- a/src/cairo_stubs.c
-+++ b/src/cairo_stubs.c
-@@ -1580,6 +1580,7 @@ static cairo_status_t caml_cairo_image_bigarray_attach_proxy
- caml_cairo_image_bigarray_finalize);
- }
-
-+#define b (Caml_ba_array_val(vb))
- #define SURFACE_CREATE_DATA(name) \
- CAMLexport value caml_cairo_image_surface_create_for_##name \
- (value vb, value vformat, value vwidth, value vheight, value vstride) \
-@@ -1588,7 +1589,6 @@ static cairo_status_t caml_cairo_image_bigarray_attach_proxy
- CAMLlocal1(vsurf); \
- cairo_surface_t* surf; \
- const int width = Int_val(vwidth); \
-- struct caml_ba_array *b = Caml_ba_array_val(vb); \
- cairo_status_t status; \
- \
- if ((b->flags & CAML_BA_MANAGED_MASK) == CAML_BA_MAPPED_FILE) \
-@@ -1610,6 +1610,7 @@ static cairo_status_t caml_cairo_image_bigarray_attach_proxy
-
- SURFACE_CREATE_DATA(data8)
- SURFACE_CREATE_DATA(data32)
-+#undef b
-
- #define SURFACE_GET_DATA(type, num_dims, dims ...) \
- CAMLexport value caml_cairo_image_surface_get_##type(value vsurf) \
-diff --git a/tests/image_create.ml b/tests/image_create.ml
-index eec98d6..b13c206 100644
---- a/tests/image_create.ml
-+++ b/tests/image_create.ml
-@@ -10,6 +10,7 @@ let create() =
-
- let () =
- let cr = create() in
-+ printf "With Cairo handle:\n%!";
- set_source_rgb cr 1. 1. 1.;
- rectangle cr 0. 0. ~w:300. ~h:300.;
- fill cr;
-@@ -21,9 +22,9 @@ let () =
- show_text cr "Hello";
- Gc.compact(); Gc.compact();
-
-- eprintf "Write image\n%!";
-+ eprintf "- Write image\n%!";
- PNG.write (get_target cr) "test_image.png";
-- eprintf "Finish surface\n%!";
-+ eprintf "- Finish surface\n%!";
- Surface.finish (get_target cr);
- Gc.compact()
-
---
-2.29.2
-
diff --git a/gnu/packages/patches/php-bug-74093-test.patch b/gnu/packages/patches/php-bug-74093-test.patch
new file mode 100644
index 0000000000..07b1949cef
--- /dev/null
+++ b/gnu/packages/patches/php-bug-74093-test.patch
@@ -0,0 +1,48 @@
+From c641825c64e42627a2c9cac969b371ed532e0b57 Mon Sep 17 00:00:00 2001
+From: Ryan Sundberg <ryan@arctype.co>
+Date: Mon, 4 Oct 2021 20:12:25 -0700
+Subject: [PATCH] Zend/tests/bug74093.phpt: Fix failing test case
+
+This test case fails (on non-Windows hosts, where it is enabled) due
+to mismatching output in the error log language. This fixes the
+expectation, and also rewrites the test procedure in a more stable
+fashion.
+
+The objective of the test case is to run a program that exceeds
+the max_execution_time and verify that the process was aborted. The
+previous implementation tested this using a loop on array_intersect with
+large enough inputs to "probably" take enough time to trigger
+max_execution_time to abort it. With faster CPUs, over time this test
+can become flaky. Instead we simply spin a loop until enough
+wall clock time has passed to check our assertion.
+---
+ Zend/tests/bug74093.phpt | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/Zend/tests/bug74093.phpt b/Zend/tests/bug74093.phpt
+index 7f20285805..32eb445ddc 100644
+--- a/Zend/tests/bug74093.phpt
++++ b/Zend/tests/bug74093.phpt
+@@ -1,5 +1,5 @@
+ --TEST--
+-Bug #74093 (Maximum execution time of n+2 seconds exceed not written in error_log)
++Bug #74093 (Maximum execution time exceeded not written in error_log)
+ --SKIPIF--
+ <?php
+ if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
+@@ -12,9 +12,9 @@ max_execution_time=1
+ hard_timeout=1
+ --FILE--
+ <?php
+-$a1 = range(1, 1000000);
+-$a2 = range(100000, 1999999);
+-array_intersect($a1, $a2);
++$start = time();
++while (time() - $start < 5);
++die("Failed to interrupt execution");
+ ?>
+ --EXPECTF--
+-Fatal error: Maximum execution time of 1+1 seconds exceeded %s
++Fatal error: Maximum execution time of 1 second exceeded in %s
+--
+2.31.1
diff --git a/gnu/packages/patches/pigx-bsseq-no-citeproc.patch b/gnu/packages/patches/pigx-bsseq-no-citeproc.patch
new file mode 100644
index 0000000000..882e660fe4
--- /dev/null
+++ b/gnu/packages/patches/pigx-bsseq-no-citeproc.patch
@@ -0,0 +1,33 @@
+diff -Naur pigx_bsseq-0.1.5/configure.ac pigx_bsseq-0.1.5.patched/configure.ac
+--- pigx_bsseq-0.1.5/configure.ac 2021-06-08 15:28:08.000000000 +0200
++++ pigx_bsseq-0.1.5.patched/configure.ac 2021-10-05 14:43:56.806529137 +0200
+@@ -38,7 +38,6 @@
+ find_or_override_prog([GNUBASH], [bash])
+ find_or_override_prog([SNAKEMAKE], [snakemake])
+ find_or_override_prog([PANDOC], [pandoc])
+-find_or_override_prog([PANDOC_CITEPROC], [pandoc-citeproc])
+ find_or_override_prog([FASTQC], [fastqc])
+ find_or_override_prog([MULTIQC], [multiqc])
+ find_or_override_prog([TRIMGALORE], [trim_galore])
+diff -Naur pigx_bsseq-0.1.5/Makefile.in pigx_bsseq-0.1.5.patched/Makefile.in
+--- pigx_bsseq-0.1.5/Makefile.in 2021-06-08 16:17:03.000000000 +0200
++++ pigx_bsseq-0.1.5.patched/Makefile.in 2021-10-05 14:43:34.635876855 +0200
+@@ -408,7 +408,6 @@
+ PACKAGE_URL = @PACKAGE_URL@
+ PACKAGE_VERSION = @PACKAGE_VERSION@
+ PANDOC = @PANDOC@
+-PANDOC_CITEPROC = @PANDOC_CITEPROC@
+ PATH_SEPARATOR = @PATH_SEPARATOR@
+ PYTHON = @PYTHON@
+ PYTHONPATH = @PYTHONPATH@
+diff -Naur pigx_bsseq-0.1.5/pigx-common/common/pigx-runner.in pigx_bsseq-0.1.5.patched/pigx-common/common/pigx-runner.in
+--- pigx_bsseq-0.1.5/pigx-common/common/pigx-runner.in 2021-06-08 10:14:29.000000000 +0200
++++ pigx_bsseq-0.1.5.patched/pigx-common/common/pigx-runner.in 2021-10-05 14:43:44.296161069 +0200
+@@ -375,7 +375,6 @@
+ if path.exists(bin): shutil.rmtree(bin)
+ os.makedirs(bin, exist_ok=True)
+ os.symlink('@PANDOC@', path.join(bin, "pandoc"))
+- os.symlink('@PANDOC_CITEPROC@', path.join(bin, "pandoc-citeproc"))
+ os.symlink('@RSCRIPT@', path.join(bin, "Rscript"))
+ os.environ['PATH'] = path.abspath(bin) + ":" + os.environ['PATH']
+ os.environ['PIGX_PATH'] = path.abspath(bin) + ":" + os.environ['PATH']
diff --git a/gnu/packages/patches/pigx-chipseq-no-citeproc.patch b/gnu/packages/patches/pigx-chipseq-no-citeproc.patch
new file mode 100644
index 0000000000..b01820f110
--- /dev/null
+++ b/gnu/packages/patches/pigx-chipseq-no-citeproc.patch
@@ -0,0 +1,33 @@
+diff -Naur pigx_chipseq-0.0.53/configure.ac pigx_chipseq-0.0.53.patched/configure.ac
+--- pigx_chipseq-0.0.53/configure.ac 2021-09-28 11:14:12.000000000 +0200
++++ pigx_chipseq-0.0.53.patched/configure.ac 2021-10-07 14:48:53.034054327 +0200
+@@ -52,7 +52,6 @@
+ find_or_override_prog([MACS2], [macs2])
+ find_or_override_prog([SNAKEMAKE], [snakemake])
+ find_or_override_prog([PANDOC], [pandoc])
+-find_or_override_prog([PANDOC_CITEPROC], [pandoc-citeproc])
+ find_or_override_prog([FASTQC], [fastqc])
+ find_or_override_prog([BOWTIE2], [bowtie2])
+ find_or_override_prog([BOWTIE2_BUILD], [bowtie2-build])
+diff -Naur pigx_chipseq-0.0.53/Makefile.in pigx_chipseq-0.0.53.patched/Makefile.in
+--- pigx_chipseq-0.0.53/Makefile.in 2021-09-28 11:55:05.000000000 +0200
++++ pigx_chipseq-0.0.53.patched/Makefile.in 2021-10-07 14:48:37.195577143 +0200
+@@ -407,7 +407,6 @@
+ PACKAGE_URL = @PACKAGE_URL@
+ PACKAGE_VERSION = @PACKAGE_VERSION@
+ PANDOC = @PANDOC@
+-PANDOC_CITEPROC = @PANDOC_CITEPROC@
+ PATH_SEPARATOR = @PATH_SEPARATOR@
+ PERL = @PERL@
+ PYTHON = @PYTHON@
+diff -Naur pigx_chipseq-0.0.53/pigx-common/common/pigx-runner.in pigx_chipseq-0.0.53.patched/pigx-common/common/pigx-runner.in
+--- pigx_chipseq-0.0.53/pigx-common/common/pigx-runner.in 2021-09-27 18:16:42.000000000 +0200
++++ pigx_chipseq-0.0.53.patched/pigx-common/common/pigx-runner.in 2021-10-07 14:48:44.200788218 +0200
+@@ -379,7 +379,6 @@
+ if path.exists(bin): shutil.rmtree(bin)
+ os.makedirs(bin, exist_ok=True)
+ os.symlink('@PANDOC@', path.join(bin, "pandoc"))
+- os.symlink('@PANDOC_CITEPROC@', path.join(bin, "pandoc-citeproc"))
+ os.symlink('@RSCRIPT@', path.join(bin, "Rscript"))
+ os.environ['PATH'] = path.abspath(bin) + ":" + os.environ['PATH']
+ os.environ['PIGX_PATH'] = path.abspath(bin) + ":" + os.environ['PATH']
diff --git a/gnu/packages/patches/pigx-rnaseq-no-citeproc.patch b/gnu/packages/patches/pigx-rnaseq-no-citeproc.patch
new file mode 100644
index 0000000000..366ae3890a
--- /dev/null
+++ b/gnu/packages/patches/pigx-rnaseq-no-citeproc.patch
@@ -0,0 +1,33 @@
+diff -Naur pigx_rnaseq-0.0.19/configure.ac pigx_rnaseq-0.0.19.patched/configure.ac
+--- pigx_rnaseq-0.0.19/configure.ac 2021-07-23 14:01:00.304391428 +0200
++++ pigx_rnaseq-0.0.19.patched/configure.ac 2021-10-06 13:51:29.512960106 +0200
+@@ -38,7 +38,6 @@
+ find_or_override_prog([GNUBASH], [bash])
+ find_or_override_prog([SNAKEMAKE], [snakemake])
+ find_or_override_prog([PANDOC], [pandoc])
+-find_or_override_prog([PANDOC_CITEPROC], [pandoc-citeproc])
+ find_or_override_prog([STAR], [STAR])
+ find_or_override_prog([HISAT2], [hisat2])
+ find_or_override_prog([HISAT2_BUILD], [hisat2-build])
+diff -Naur pigx_rnaseq-0.0.19/Makefile.in pigx_rnaseq-0.0.19.patched/Makefile.in
+--- pigx_rnaseq-0.0.19/Makefile.in 2021-08-13 13:40:10.402922844 +0200
++++ pigx_rnaseq-0.0.19.patched/Makefile.in 2021-10-06 13:51:04.052247524 +0200
+@@ -410,7 +410,6 @@
+ PACKAGE_URL = @PACKAGE_URL@
+ PACKAGE_VERSION = @PACKAGE_VERSION@
+ PANDOC = @PANDOC@
+-PANDOC_CITEPROC = @PANDOC_CITEPROC@
+ PATH_SEPARATOR = @PATH_SEPARATOR@
+ PYTHON = @PYTHON@
+ PYTHONPATH = @PYTHONPATH@
+diff -Naur pigx_rnaseq-0.0.19/pigx-common/common/pigx-runner.in pigx_rnaseq-0.0.19.patched/pigx-common/common/pigx-runner.in
+--- pigx_rnaseq-0.0.19/pigx-common/common/pigx-runner.in 2021-08-13 13:27:50.494352532 +0200
++++ pigx_rnaseq-0.0.19.patched/pigx-common/common/pigx-runner.in 2021-10-06 13:51:38.798220108 +0200
+@@ -379,7 +379,6 @@
+ if path.exists(bin): shutil.rmtree(bin)
+ os.makedirs(bin, exist_ok=True)
+ os.symlink('@PANDOC@', path.join(bin, "pandoc"))
+- os.symlink('@PANDOC_CITEPROC@', path.join(bin, "pandoc-citeproc"))
+ os.symlink('@RSCRIPT@', path.join(bin, "Rscript"))
+ os.environ['PATH'] = path.abspath(bin) + ":" + os.environ['PATH']
+ os.environ['PIGX_PATH'] = path.abspath(bin) + ":" + os.environ['PATH']
diff --git a/gnu/packages/patches/pigx-sars-cov2-ww-no-citeproc.patch b/gnu/packages/patches/pigx-sars-cov2-ww-no-citeproc.patch
new file mode 100644
index 0000000000..3f34bca6b2
--- /dev/null
+++ b/gnu/packages/patches/pigx-sars-cov2-ww-no-citeproc.patch
@@ -0,0 +1,33 @@
+diff -Naur pigx_sars-cov2-ww-0.0.3/configure.ac pigx_sars-cov2-ww-0.0.3.patched/configure.ac
+--- pigx_sars-cov2-ww-0.0.3/configure.ac 2021-06-10 10:12:00.552889984 +0200
++++ pigx_sars-cov2-ww-0.0.3.patched/configure.ac 2021-10-05 14:52:32.318695129 +0200
+@@ -50,7 +50,6 @@
+ find_or_override_prog([MULTIQC], [multiqc])
+ find_or_override_prog([WGET], [wget])
+ find_or_override_prog([PANDOC], [pandoc])
+-find_or_override_prog([PANDOC_CITEPROC], [pandoc-citeproc])
+
+ AC_ARG_ENABLE([r-packages-check],
+ AS_HELP_STRING([--disable-r-packages-check], [Do not check any R packages.]),
+diff -Naur pigx_sars-cov2-ww-0.0.3/Makefile.in pigx_sars-cov2-ww-0.0.3.patched/Makefile.in
+--- pigx_sars-cov2-ww-0.0.3/Makefile.in 2021-08-05 16:33:59.164123383 +0200
++++ pigx_sars-cov2-ww-0.0.3.patched/Makefile.in 2021-10-05 14:52:41.272958547 +0200
+@@ -402,7 +402,6 @@
+ PACKAGE_URL = @PACKAGE_URL@
+ PACKAGE_VERSION = @PACKAGE_VERSION@
+ PANDOC = @PANDOC@
+-PANDOC_CITEPROC = @PANDOC_CITEPROC@
+ PATH_SEPARATOR = @PATH_SEPARATOR@
+ PRINSEQ = @PRINSEQ@
+ PYTHON = @PYTHON@
+diff -Naur pigx_sars-cov2-ww-0.0.3/pigx-common/common/pigx-runner.in pigx_sars-cov2-ww-0.0.3.patched/pigx-common/common/pigx-runner.in
+--- pigx_sars-cov2-ww-0.0.3/pigx-common/common/pigx-runner.in 2021-07-30 11:10:17.913115902 +0200
++++ pigx_sars-cov2-ww-0.0.3.patched/pigx-common/common/pigx-runner.in 2021-10-05 14:52:23.602438714 +0200
+@@ -379,7 +379,6 @@
+ if path.exists(bin): shutil.rmtree(bin)
+ os.makedirs(bin, exist_ok=True)
+ os.symlink('@PANDOC@', path.join(bin, "pandoc"))
+- os.symlink('@PANDOC_CITEPROC@', path.join(bin, "pandoc-citeproc"))
+ os.symlink('@RSCRIPT@', path.join(bin, "Rscript"))
+ os.environ['PATH'] = path.abspath(bin) + ":" + os.environ['PATH']
+ os.environ['PIGX_PATH'] = path.abspath(bin) + ":" + os.environ['PATH']
diff --git a/gnu/packages/patches/pigx-scrnaseq-no-citeproc.patch b/gnu/packages/patches/pigx-scrnaseq-no-citeproc.patch
new file mode 100644
index 0000000000..4cce33fb01
--- /dev/null
+++ b/gnu/packages/patches/pigx-scrnaseq-no-citeproc.patch
@@ -0,0 +1,33 @@
+diff -Naur pigx_scrnaseq-1.1.7/configure.ac pigx_scrnaseq-1.1.7.patched/configure.ac
+--- pigx_scrnaseq-1.1.7/configure.ac 2020-03-17 14:37:46.000000000 +0100
++++ pigx_scrnaseq-1.1.7.patched/configure.ac 2021-10-06 13:55:49.779271317 +0200
+@@ -43,7 +43,6 @@
+ find_or_override_prog([GNUBASH], [bash])
+ find_or_override_prog([SNAKEMAKE], [snakemake])
+ find_or_override_prog([PANDOC], [pandoc])
+-find_or_override_prog([PANDOC_CITEPROC], [pandoc-citeproc])
+ find_or_override_prog([FASTQC], [fastqc])
+ find_or_override_prog([STAR], [STAR])
+ find_or_override_prog([SAMTOOLS], [samtools])
+diff -Naur pigx_scrnaseq-1.1.7/Makefile.in pigx_scrnaseq-1.1.7.patched/Makefile.in
+--- pigx_scrnaseq-1.1.7/Makefile.in 2020-11-30 16:55:48.000000000 +0100
++++ pigx_scrnaseq-1.1.7.patched/Makefile.in 2021-10-06 13:55:52.224340194 +0200
+@@ -395,7 +395,6 @@
+ PACKAGE_URL = @PACKAGE_URL@
+ PACKAGE_VERSION = @PACKAGE_VERSION@
+ PANDOC = @PANDOC@
+-PANDOC_CITEPROC = @PANDOC_CITEPROC@
+ PATH_SEPARATOR = @PATH_SEPARATOR@
+ PERL = @PERL@
+ PYTHON = @PYTHON@
+diff -Naur pigx_scrnaseq-1.1.7/pigx-scrnaseq.in pigx_scrnaseq-1.1.7.patched/pigx-scrnaseq.in
+--- pigx_scrnaseq-1.1.7/pigx-scrnaseq.in 2020-11-30 16:08:55.000000000 +0100
++++ pigx_scrnaseq-1.1.7.patched/pigx-scrnaseq.in 2021-10-06 13:55:47.889218079 +0200
+@@ -274,7 +274,6 @@
+ if path.exists(bin): shutil.rmtree(bin)
+ os.makedirs(bin, exist_ok=True)
+ os.symlink('@PANDOC@', path.join(bin, "pandoc"))
+- os.symlink('@PANDOC_CITEPROC@', path.join(bin, "pandoc-citeproc"))
+ os.symlink('@RSCRIPT@', path.join(bin, "Rscript"))
+ os.environ['PATH'] = path.abspath(bin) + ":" + os.environ['PATH']
+ os.environ['PIGX_PATH'] = path.abspath(bin) + ":" + os.environ['PATH']
diff --git a/gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch b/gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch
index 155ba35efd..3a5ae1a2cd 100644
--- a/gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch
+++ b/gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch
@@ -1,9 +1,9 @@
From 942730ce7148cd54a30d4a606ce71a2654c8a2e0 Mon Sep 17 00:00:00 2001
-From: Leo Prikler <leo.prikler@student.tugraz.at>
+From: Liliana Marie Prikler <liliana.prikler@gmail.com>
Date: Sat, 5 Jun 2021 22:47:00 -0400
Subject: [PATCH] ppsspp: Remove upgrade code and gold support.
-Original patch from Leo Prikler.
+Original patch from Liliana Marie Prikler.
Rebased on master (commit 69fa20744958aef8da9ca052ba7675fdc1636e46) by
Maxim Cournoyer.
---
diff --git a/gnu/packages/patches/purescript-relax-dependencies.patch b/gnu/packages/patches/purescript-relax-dependencies.patch
deleted file mode 100644
index 6ab4716fc4..0000000000
--- a/gnu/packages/patches/purescript-relax-dependencies.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Allow the purescript dependencies to better match the available packages in
-Guix.
-
---- purescript-0.13.8/purescript.cabal
-+++ purescript-0.13.8/purescript.cabal.orig
-@@ -1091 +1091 @@ library
-- Glob ==0.9.*,
-+ Glob ==0.10.*,
-@@ -1095 +1095 @@ library
-- ansi-terminal >=0.7.1 && <0.9,
-+ ansi-terminal ==0.9.*,
-@@ -1105 +1105 @@ library
-- clock <0.8,
-+ clock ==0.8.*,
-@@ -1173 +1173 @@ executable purs
-- Glob ==0.9.*,
-+ Glob ==0.10.*,
-@@ -1177 +1177 @@ executable purs
-- ansi-terminal >=0.7.1 && <0.9,
-+ ansi-terminal ==0.9.*,
-@@ -1188 +1188 @@ executable purs
-- clock <0.8,
-+ clock ==0.8.*,
-@@ -1209 +1209 @@ executable purs
-- network >=3.0.1.1 && <3.1,
-+ network >=2.8 && <3.1,
-@@ -1288 +1288 @@ test-suite tests
-- Glob ==0.9.*,
-+ Glob ==0.10.*,
-@@ -1293 +1293 @@ test-suite tests
-- ansi-terminal >=0.7.1 && <0.9,
-+ ansi-terminal ==0.9.*,
-@@ -1303 +1303 @@ test-suite tests
-- clock <0.8,
-+ clock ==0.8.*,
-@@ -1315,2 +1315,2 @@ test-suite tests
-- hspec <2.7,
-- hspec-discover <2.7,
-+ hspec ==2.7.*,
-+ hspec-discover ==2.7.*,
diff --git a/gnu/packages/patches/python-pytorch-system-libraries.patch b/gnu/packages/patches/python-pytorch-system-libraries.patch
index c8d14b3f56..76c06520f0 100644
--- a/gnu/packages/patches/python-pytorch-system-libraries.patch
+++ b/gnu/packages/patches/python-pytorch-system-libraries.patch
@@ -81,7 +81,7 @@ diff --git a/torch/lib/c10d/test/CMakeLists.txt b/torch/lib/c10d/test/CMakeLists
index b74d4b65f7..fc7c207505 100644
--- a/torch/lib/c10d/test/CMakeLists.txt
+++ b/torch/lib/c10d/test/CMakeLists.txt
-@@ -16,25 +16,25 @@ function(c10d_add_test test_src)
+@@ -16,24 +16,24 @@ function(c10d_add_test test_src)
add_test(NAME ${test_name} COMMAND $<TARGET_FILE:${test_name}>)
endfunction()
@@ -114,18 +114,26 @@ index b74d4b65f7..fc7c207505 100644
+ c10d_add_test(ProcessGroupGlooTest.cpp c10d gtest_main gtest)
endif()
endif()
+
+diff --git a/cmake/External/nnpack.cmake b/cmake/External/nnpack.cmake
+index a41343cbb5..6075bdd0a4 100644
+--- a/cmake/External/nnpack.cmake
++++ b/cmake/External/nnpack.cmake
+@@ -40,7 +40,7 @@ endif()
+ # (3) Android, iOS, Linux, macOS - supported
+ ##############################################################################
+
+-if(ANDROID OR IOS OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
++if(FALSE)
+ message(STATUS "Brace yourself, we are building NNPACK")
+ set(CAFFE2_THIRD_PARTY_ROOT ${PROJECT_SOURCE_DIR}/third_party)
+
+@@ -114,6 +114,5 @@ endif()
+ # (4) Catch-all: not supported.
+ ##############################################################################
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 5ecd2df..24feae3 100644
---- a/third_party/NNPACK/CMakeLists.txt
-+++ b/third_party/NNPACK/CMakeLists.txt
-@@ -427,8 +427,7 @@ IF(NNPACK_BACKEND STREQUAL "x86-64")
- FILE(MAKE_DIRECTORY ${obj_dir})
- ADD_CUSTOM_COMMAND(
- OUTPUT ${obj}
-- COMMAND "PYTHONPATH=${PEACHPY_PYTHONPATH}"
-- ${PYTHON_EXECUTABLE} -m peachpy.x86_64
-+ COMMAND ${PYTHON_EXECUTABLE} -m peachpy.x86_64
- -mabi=sysv -g4 -mimage-format=${PEACHPY_IMAGE_FORMAT}
- "-I${PROJECT_SOURCE_DIR}/src" "-I${PROJECT_SOURCE_DIR}/src/x86_64-fma" "-I${FP16_SOURCE_DIR}/include"
- -o ${obj} "${PROJECT_SOURCE_DIR}/${src}"
+-message(WARNING "Unknown platform - I don't know how to build NNPACK. "
+- "See cmake/External/nnpack.cmake for details.")
+-set(USE_NNPACK OFF)
++set(NNPACK_FOUND TRUE)
++set(USE_NNPACK ON)
diff --git a/gnu/packages/patches/sbcl-burgled-batteries3-fix-signals.patch b/gnu/packages/patches/sbcl-burgled-batteries3-fix-signals.patch
new file mode 100644
index 0000000000..6a41cb0359
--- /dev/null
+++ b/gnu/packages/patches/sbcl-burgled-batteries3-fix-signals.patch
@@ -0,0 +1,70 @@
+commit 0854f21baa167da1ad19618daa331b1a46cbee07
+Author: Satoshi Imai <satoshi.imai@gmail.com>
+Date: Tue Jun 15 03:46:57 2021 +0900
+
+ Fix to make it works with the current SBCL
+
+diff --git a/api.lisp b/api.lisp
+index 2d8c29b..aed38be 100644
+--- a/api.lisp
++++ b/api.lisp
+@@ -8,8 +8,8 @@
+ (defun startup-python ()
+ (.initialize)
+ (initialize-modules)
+- #+(and sbcl unix); python will fail sbcl's sigpipe-handler.
+- (sb-unix::enable-interrupt sb-unix::sigpipe #'sb-unix::sigpipe-handler)
++ ;; #+(and sbcl unix); python will fail sbcl's sigpipe-handler.
++ ;; (sb-unix::enable-interrupt sb-unix::sigpipe #'sb-unix::sigpipe-handler)
+ )
+
+ (defun shutdown-python ()
+@@ -35,8 +35,9 @@
+ (let ((cpython-initialized? (.is-initialized)))
+ (unless cpython-initialized?
+ (.initialize)
+- #+(and sbcl unix); python will fail sbcl's sigpipe-handler.
+- (sb-unix::enable-interrupt sb-unix::sigpipe #'sb-unix::sigpipe-handler))
++ ;; #+(and sbcl unix); python will fail sbcl's sigpipe-handler.
++ ;; (sb-unix::enable-interrupt sb-unix::sigpipe #'sb-unix::sigpipe-handler)
++ )
+ (unwind-protect
+ (funcall thunk)
+ (unless cpython-initialized?
+diff --git a/ffi-conditions.lisp b/ffi-conditions.lisp
+index ac03e80..ba1da33 100644
+--- a/ffi-conditions.lisp
++++ b/ffi-conditions.lisp
+@@ -3,8 +3,9 @@
+ ;; Python must have been initialized for our macroexpansions to work.
+ (eval-when (:compile-toplevel :load-toplevel)
+ (.initialize)
+- #+(and sbcl unix); python will fail sbcl's sigpipe-handler.
+- (sb-unix::enable-interrupt sb-unix::sigpipe #'sb-unix::sigpipe-handler))
++ ;; #+(and sbcl unix); python will fail sbcl's sigpipe-handler.
++ ;; (sb-unix::enable-interrupt sb-unix::sigpipe #'sb-unix::sigpipe-handler)
++ )
+
+ (defpyexception "BaseException" (python-condition)
+ (("args" :initarg :args)))
+diff --git a/grovel-include-dir.lisp b/grovel-include-dir.lisp
+index 6583084..62e07f3 100644
+--- a/grovel-include-dir.lisp
++++ b/grovel-include-dir.lisp
+@@ -23,13 +23,15 @@
+ (or (and (uiop:file-exists-p env-value) (cl:list env-value))
+ (error "DLL for PYTHON3 not correctly pointed to by BB_PYTHON3_DYLIB: ~A" env-value)))))
+
++(defvar *detected-library* nil)
++
+ (defun detect-python ()
+ (setf *detected-library* nil)
+ (or
+ (let ((env-value (uiop:getenv "BB_PYTHON3_INCLUDE_DIR")))
+ (when env-value
+ (or (uiop:directory-exists-p env-value)
+- (error "BB_PYTHON3_INCLUDE_DIR is set, but does not point to an actual directory: %a" env-value))))
++ (error "BB_PYTHON3_INCLUDE_DIR is set, but does not point to an actual directory: ~A" env-value))))
+ (when *miniconda3*
+ (let ((path (if (pathnamep *miniconda3*)
+ *miniconda3*
diff --git a/gnu/packages/patches/sbcl-png-fix-sbcl-compatibility.patch b/gnu/packages/patches/sbcl-png-fix-sbcl-compatibility.patch
new file mode 100644
index 0000000000..b969620899
--- /dev/null
+++ b/gnu/packages/patches/sbcl-png-fix-sbcl-compatibility.patch
@@ -0,0 +1,60 @@
+From 60bbad167b0691995a659121acda55392e4021b6 Mon Sep 17 00:00:00 2001
+From: Andrew Berkley <ajb@dwavesys.com>
+Date: Sun, 4 Jul 2021 12:50:34 -0700
+Subject: [PATCH] Fix for sbcl 2.1.6
+
+---
+ compat.lisp | 30 +++++++++++++++---------------
+ 1 file changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/compat.lisp b/compat.lisp
+index 95a9869..ea6d1a1 100644
+--- a/compat.lisp
++++ b/compat.lisp
+@@ -1,12 +1,13 @@
+ (in-package #:png)
+
+-#+sbcl ; Present in SBCL 1.0.24.
+-(declaim (ftype (function (array) (values (simple-array * (*)) &optional))
+- array-storage-vector))
+-
+ #+sbcl
+-(defun array-storage-vector (array)
+- "Returns the underlying storage vector of ARRAY, which must be a non-displaced array.
++(macrolet ((make-array-storage-vector ()
++ (let ((%array-data-vector (or (find-symbol "%ARRAY-DATA-VECTOR" :sb-kernel)
++ (find-symbol "%ARRAY-DATA" :sb-kernel)))) ;; renamed in sbcl 2.1.6
++ `(progn
++ (declaim (ftype (function (array) (values (simple-array * (*)) &optional)) array-storage-vector))
++ (defun array-storage-vector (array)
++ "Returns the underlying storage vector of ARRAY, which must be a non-displaced array.
+
+ In SBCL, if ARRAY is a of type \(SIMPLE-ARRAY * \(*)), it is its own storage
+ vector. Multidimensional arrays, arrays with fill pointers, and adjustable
+@@ -16,15 +17,14 @@ ARRAY, which this function returns.
+ Important note: the underlying vector is an implementation detail. Even though
+ this function exposes it, changes in the implementation may cause this
+ function to be removed without further warning."
+- ;; KLUDGE: Without TRULY-THE the system is not smart enough to
+- ;; figure out that the return value is always of the known type.
+- (sb-ext:truly-the (simple-array * (*))
+- (if (sb-kernel:array-header-p array)
+- (if (sb-kernel:%array-displaced-p array)
+- (error "~S cannot be used with displaced arrays. Use ~S instead."
+- 'array-storage-vector 'array-displacement)
+- (sb-kernel:%array-data-vector array))
+- array)))
++ (sb-ext:truly-the (simple-array * (*))
++ (if (sb-kernel:array-header-p array)
++ (if (sb-kernel:%array-displaced-p array)
++ (error "~S cannot be used with displaced arrays. Use ~S instead."
++ 'array-storage-vector 'array-displacement)
++ (,%array-data-vector array))
++ array)))))))
++ (make-array-storage-vector))
+
+ #+allegro
+ (defmacro with-pointer-to-array-data ((ptr-var array) &body body)
+--
+2.33.0
+
diff --git a/gnu/packages/patches/ungoogled-chromium-ffmpeg-compat.patch b/gnu/packages/patches/ungoogled-chromium-ffmpeg-compat.patch
new file mode 100644
index 0000000000..636f518a33
--- /dev/null
+++ b/gnu/packages/patches/ungoogled-chromium-ffmpeg-compat.patch
@@ -0,0 +1,68 @@
+The bundled ffmpeg in Chromium is newer than the one in Guix. Patch so
+we can build with the new and old ffmpeg versions.
+
+Taken from Gentoo:
+https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/files/chromium-93-fix-build-with-system-ffmpeg.patch
+
+diff --git a/media/filters/audio_decoder_unittest.cc b/media/filters/audio_decoder_unittest.cc
+--- a/media/filters/audio_decoder_unittest.cc
++++ b/media/filters/audio_decoder_unittest.cc
+@@ -109,7 +109,11 @@ void SetDiscardPadding(AVPacket* packet,
+ }
+
+ // If the timestamp is positive, try to use FFmpeg's discard data.
++#if LIBAVUTIL_VERSION_MAJOR < 57
++ int skip_samples_size = 0;
++#else
+ size_t skip_samples_size = 0;
++#endif
+ const uint32_t* skip_samples_ptr =
+ reinterpret_cast<const uint32_t*>(av_packet_get_side_data(
+ packet, AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size));
+diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
+--- a/media/filters/ffmpeg_demuxer.cc
++++ b/media/filters/ffmpeg_demuxer.cc
+@@ -427,11 +427,19 @@ void FFmpegDemuxerStream::EnqueuePacket(
+ scoped_refptr<DecoderBuffer> buffer;
+
+ if (type() == DemuxerStream::TEXT) {
++#if LIBAVUTIL_VERSION_MAJOR < 57
++ int id_size = 0;
++#else
+ size_t id_size = 0;
++#endif
+ uint8_t* id_data = av_packet_get_side_data(
+ packet.get(), AV_PKT_DATA_WEBVTT_IDENTIFIER, &id_size);
+
++#if LIBAVUTIL_VERSION_MAJOR < 57
++ int settings_size = 0;
++#else
+ size_t settings_size = 0;
++#endif
+ uint8_t* settings_data = av_packet_get_side_data(
+ packet.get(), AV_PKT_DATA_WEBVTT_SETTINGS, &settings_size);
+
+@@ -443,7 +451,11 @@ void FFmpegDemuxerStream::EnqueuePacket(
+ buffer = DecoderBuffer::CopyFrom(packet->data, packet->size,
+ side_data.data(), side_data.size());
+ } else {
++#if LIBAVUTIL_VERSION_MAJOR < 57
++ int side_data_size = 0;
++#else
+ size_t side_data_size = 0;
++#endif
+ uint8_t* side_data = av_packet_get_side_data(
+ packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size);
+
+@@ -504,7 +516,11 @@ void FFmpegDemuxerStream::EnqueuePacket(
+ packet->size - data_offset);
+ }
+
++#if LIBAVUTIL_VERSION_MAJOR < 57
++ int skip_samples_size = 0;
++#else
+ size_t skip_samples_size = 0;
++#endif
+ const uint32_t* skip_samples_ptr =
+ reinterpret_cast<const uint32_t*>(av_packet_get_side_data(
+ packet.get(), AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size));
diff --git a/gnu/packages/patches/ungoogled-chromium-system-nspr.patch b/gnu/packages/patches/ungoogled-chromium-system-nspr.patch
new file mode 100644
index 0000000000..831e2b899c
--- /dev/null
+++ b/gnu/packages/patches/ungoogled-chromium-system-nspr.patch
@@ -0,0 +1,54 @@
+Build with the system NSPR library instead of the bundled version.
+
+Originally based on this Debian patch:
+https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/system/nspr.patch
+
+diff --git a/base/BUILD.gn b/base/BUILD.gn
+--- a/base/BUILD.gn
++++ b/base/BUILD.gn
+@@ -141,6 +141,12 @@ config("perfetto_config") {
+ }
+ }
+
++if (is_linux) {
++ ldflags = [
++ "-lnspr4",
++ ]
++}
++
+ # Base and everything it depends on should be a static library rather than
+ # a source set. Base is more of a "library" in the classic sense in that many
+ # small parts of it are used in many different contexts. This combined with a
+@@ -759,8 +765,6 @@ component("base") {
+ "third_party/cityhash_v103/src/city_v103.cc",
+ "third_party/cityhash_v103/src/city_v103.h",
+ "third_party/icu/icu_utf.h",
+- "third_party/nspr/prtime.cc",
+- "third_party/nspr/prtime.h",
+ "third_party/superfasthash/superfasthash.c",
+ "thread_annotations.h",
+ "threading/hang_watcher.cc",
+diff --git a/base/time/pr_time_unittest.cc b/base/time/pr_time_unittest.cc
+--- a/base/time/pr_time_unittest.cc
++++ b/base/time/pr_time_unittest.cc
+@@ -7,7 +7,7 @@
+
+ #include "base/compiler_specific.h"
+ #include "base/cxx17_backports.h"
+-#include "base/third_party/nspr/prtime.h"
++#include <nspr/prtime.h>
+ #include "base/time/time.h"
+ #include "build/build_config.h"
+ #include "testing/gtest/include/gtest/gtest.h"
+diff --git a/base/time/time.cc b/base/time/time.cc
+--- a/base/time/time.cc
++++ b/base/time/time.cc
+@@ -18,7 +18,7 @@
+ #include <utility>
+
+ #include "base/strings/stringprintf.h"
+-#include "base/third_party/nspr/prtime.h"
++#include <nspr/prtime.h>
+ #include "base/time/time_override.h"
+ #include "build/build_config.h"
+ #include "third_party/abseil-cpp/absl/types/optional.h"
diff --git a/gnu/packages/patches/webkitgtk-bind-all-fonts.patch b/gnu/packages/patches/webkitgtk-bind-all-fonts.patch
index 3fe9704727..e7b06cc650 100644
--- a/gnu/packages/patches/webkitgtk-bind-all-fonts.patch
+++ b/gnu/packages/patches/webkitgtk-bind-all-fonts.patch
@@ -1,7 +1,7 @@
Add fonts from all XDG_DATA_DIRS, not just XDG_DATA_HOME.
See <http://bugs.gnu.org/41174>.
-Author: Leo Prikler <leo.prikler@student.tugraz.at>
+Author: Liliana Marie Prikler <liliana.prikler@gmail.com>
Index: webkitgtk-2.28.2/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
===================================================================
--- a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
diff --git a/gnu/packages/patches/xgboost-use-system-dmlc-core.patch b/gnu/packages/patches/xgboost-use-system-dmlc-core.patch
new file mode 100644
index 0000000000..c654694fec
--- /dev/null
+++ b/gnu/packages/patches/xgboost-use-system-dmlc-core.patch
@@ -0,0 +1,34 @@
+From 34167cc105e47589b86b6f62da76e0ab744002dd Mon Sep 17 00:00:00 2001
+From: Vinicius Monego <monego@posteo.net>
+Date: Tue, 11 May 2021 19:35:30 -0300
+Subject: [PATCH] Use dmlc-core from Guix.
+
+---
+This patch is a subset of the following Debian patch: https://sources.debian.org/src/xgboost/1.2.1-1/debian/patches/cmake.patch/
+
+Rabit is now developed as part of xgboost, so we don't build it separately.
+
+ CMakeLists.txt | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6cc19fbd..3b42bc17 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -150,11 +150,9 @@ endif (USE_OPENMP)
+
+ # dmlc-core
+ msvc_use_static_runtime()
+-add_subdirectory(${xgboost_SOURCE_DIR}/dmlc-core)
+-set_target_properties(dmlc PROPERTIES
+- CXX_STANDARD 14
+- CXX_STANDARD_REQUIRED ON
+- POSITION_INDEPENDENT_CODE ON)
++add_library(dmlc SHARED IMPORTED)
++find_library(DMLC_LIBRARY dmlc)
++set_property(TARGET dmlc PROPERTY IMPORTED_LOCATION "${DMLC_LIBRARY}")
+ if (MSVC)
+ target_compile_options(dmlc PRIVATE
+ -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE)
+--
+2.31.1