Accepting request 881558 from devel:languages:haskell
automated update of haskell stack OBS-URL: https://build.opensuse.org/request/show/881558 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/git-annex?expand=0&rev=16
This commit is contained in:
commit
030c1c4349
123
atto.patch
Normal file
123
atto.patch
Normal file
@ -0,0 +1,123 @@
|
||||
From 4631d1ab56bc60932ddba4cee71906564d68b8a2 Mon Sep 17 00:00:00 2001
|
||||
From: Joey Hess <joeyh@joeyh.name>
|
||||
Date: Wed, 24 Mar 2021 12:11:50 -0400
|
||||
Subject: [PATCH] Fix build with attoparsec-0.14
|
||||
|
||||
It changed parseOnly in the ByteString.Lazy module to take a lazy, not
|
||||
strict ByteString. In all these cases though, we actually had a strict
|
||||
ByteString, so the most efficient fix, which also happens to avoid needing
|
||||
ifdefs, is to use the non-lazy module instead.
|
||||
|
||||
This commit was sponsored by Denis Dzyubenko on Patreon.
|
||||
---
|
||||
CHANGELOG | 1 +
|
||||
Logs/ContentIdentifier/Pure.hs | 2 +-
|
||||
Logs/Line.hs | 2 +-
|
||||
Logs/MapLog.hs | 7 ++++---
|
||||
Logs/Remote/Pure.hs | 2 +-
|
||||
Logs/Trust/Pure.hs | 2 +-
|
||||
Logs/UUIDBased.hs | 7 ++++---
|
||||
7 files changed, 13 insertions(+), 10 deletions(-)
|
||||
|
||||
Index: git-annex-8.20210310/Logs/ContentIdentifier/Pure.hs
|
||||
===================================================================
|
||||
--- git-annex-8.20210310.orig/Logs/ContentIdentifier/Pure.hs
|
||||
+++ git-annex-8.20210310/Logs/ContentIdentifier/Pure.hs
|
||||
@@ -17,7 +17,7 @@ import Utility.Base64
|
||||
import qualified Data.ByteString as S
|
||||
import qualified Data.ByteString.Char8 as S8
|
||||
import qualified Data.ByteString.Lazy as L
|
||||
-import qualified Data.Attoparsec.ByteString.Lazy as A
|
||||
+import qualified Data.Attoparsec.ByteString as A
|
||||
import qualified Data.Attoparsec.ByteString.Char8 as A8
|
||||
import Data.ByteString.Builder
|
||||
import Data.List.NonEmpty (NonEmpty(..))
|
||||
Index: git-annex-8.20210310/Logs/Line.hs
|
||||
===================================================================
|
||||
--- git-annex-8.20210310.orig/Logs/Line.hs
|
||||
+++ git-annex-8.20210310/Logs/Line.hs
|
||||
@@ -9,7 +9,7 @@ module Logs.Line where
|
||||
|
||||
import Common
|
||||
|
||||
-import qualified Data.Attoparsec.ByteString.Lazy as A
|
||||
+import qualified Data.Attoparsec.ByteString as A
|
||||
import Data.Attoparsec.ByteString.Char8 (isEndOfLine)
|
||||
import qualified Data.DList as D
|
||||
|
||||
Index: git-annex-8.20210310/Logs/MapLog.hs
|
||||
===================================================================
|
||||
--- git-annex-8.20210310.orig/Logs/MapLog.hs
|
||||
+++ git-annex-8.20210310/Logs/MapLog.hs
|
||||
@@ -24,7 +24,8 @@ import Utility.QuickCheck
|
||||
|
||||
import qualified Data.ByteString.Lazy as L
|
||||
import qualified Data.Map.Strict as M
|
||||
-import qualified Data.Attoparsec.ByteString.Lazy as A
|
||||
+import qualified Data.Attoparsec.ByteString as A
|
||||
+import qualified Data.Attoparsec.ByteString.Lazy as AL
|
||||
import qualified Data.Attoparsec.ByteString.Char8 as A8
|
||||
import Data.ByteString.Builder
|
||||
|
||||
@@ -49,8 +50,8 @@ buildMapLog fieldbuilder valuebuilder =
|
||||
nl = charUtf8 '\n'
|
||||
|
||||
parseMapLog :: Ord f => A.Parser f -> A.Parser v -> L.ByteString -> MapLog f v
|
||||
-parseMapLog fieldparser valueparser = fromMaybe M.empty . A.maybeResult
|
||||
- . A.parse (mapLogParser fieldparser valueparser)
|
||||
+parseMapLog fieldparser valueparser = fromMaybe M.empty . AL.maybeResult
|
||||
+ . AL.parse (mapLogParser fieldparser valueparser)
|
||||
|
||||
mapLogParser :: Ord f => A.Parser f -> A.Parser v -> A.Parser (MapLog f v)
|
||||
mapLogParser fieldparser valueparser = M.fromListWith best <$> parseLogLines go
|
||||
Index: git-annex-8.20210310/Logs/Remote/Pure.hs
|
||||
===================================================================
|
||||
--- git-annex-8.20210310.orig/Logs/Remote/Pure.hs
|
||||
+++ git-annex-8.20210310/Logs/Remote/Pure.hs
|
||||
@@ -27,7 +27,7 @@ import Utility.QuickCheck
|
||||
import qualified Data.ByteString.Lazy as L
|
||||
import qualified Data.Map as M
|
||||
import Data.Char
|
||||
-import qualified Data.Attoparsec.ByteString.Lazy as A
|
||||
+import qualified Data.Attoparsec.ByteString as A
|
||||
import Data.ByteString.Builder
|
||||
|
||||
calcRemoteConfigMap :: L.ByteString -> M.Map UUID RemoteConfig
|
||||
Index: git-annex-8.20210310/Logs/Trust/Pure.hs
|
||||
===================================================================
|
||||
--- git-annex-8.20210310.orig/Logs/Trust/Pure.hs
|
||||
+++ git-annex-8.20210310/Logs/Trust/Pure.hs
|
||||
@@ -14,7 +14,7 @@ import Types.TrustLevel
|
||||
import Logs.UUIDBased
|
||||
|
||||
import qualified Data.ByteString.Lazy as L
|
||||
-import qualified Data.Attoparsec.ByteString.Lazy as A
|
||||
+import qualified Data.Attoparsec.ByteString as A
|
||||
import qualified Data.Attoparsec.ByteString.Char8 as A8
|
||||
import Data.ByteString.Builder
|
||||
|
||||
Index: git-annex-8.20210310/Logs/UUIDBased.hs
|
||||
===================================================================
|
||||
--- git-annex-8.20210310.orig/Logs/UUIDBased.hs
|
||||
+++ git-annex-8.20210310/Logs/UUIDBased.hs
|
||||
@@ -41,7 +41,8 @@ import Logs.Line
|
||||
|
||||
import qualified Data.ByteString as S
|
||||
import qualified Data.ByteString.Lazy as L
|
||||
-import qualified Data.Attoparsec.ByteString.Lazy as A
|
||||
+import qualified Data.Attoparsec.ByteString as A
|
||||
+import qualified Data.Attoparsec.ByteString.Lazy as AL
|
||||
import qualified Data.Attoparsec.ByteString.Char8 as A8
|
||||
import Data.ByteString.Builder
|
||||
import qualified Data.DList as D
|
||||
@@ -63,8 +64,8 @@ parseLogOld :: A.Parser a -> L.ByteStrin
|
||||
parseLogOld = parseLogOldWithUUID . const
|
||||
|
||||
parseLogOldWithUUID :: (UUID -> A.Parser a) -> L.ByteString -> Log a
|
||||
-parseLogOldWithUUID parser = fromMaybe M.empty . A.maybeResult
|
||||
- . A.parse (logParserOld parser)
|
||||
+parseLogOldWithUUID parser = fromMaybe M.empty . AL.maybeResult
|
||||
+ . AL.parse (logParserOld parser)
|
||||
|
||||
logParserOld :: (UUID -> A.Parser a) -> A.Parser (Log a)
|
||||
logParserOld parser = M.fromListWith best <$> parseLogLines go
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 25 09:47:23 UTC 2021 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- add atto.patch fixing build with attoparsec-0.14+
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 11 08:23:16 UTC 2021 - psimons@suse.com
|
||||
|
||||
|
@ -23,6 +23,7 @@ Summary: Manage files with git, without checking their contents into git
|
||||
License: AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
|
||||
URL: https://hackage.haskell.org/package/%{name}
|
||||
Source0: https://github.com/peti/git-annex/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Patch0: atto.patch
|
||||
BuildRequires: bash-completion
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: curl
|
||||
@ -167,7 +168,7 @@ Supplements: (%{name} and bash-completion)
|
||||
Optional dependency offering bash completion for git-annex
|
||||
|
||||
%prep
|
||||
%autosetup
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%define cabal_configure_options -ftestsuite
|
||||
|
Loading…
Reference in New Issue
Block a user