[arch-commits] Commit in cabal-install/trunk (2 files)

Felix Yan felixonmars at archlinux.org
Wed Dec 16 10:20:55 UTC 2020


    Date: Wednesday, December 16, 2020 @ 10:20:54
  Author: felixonmars
Revision: 776438

upgpkg: cabal-install 3.2.0.0-121: rebuild with base16-bytestring 1.0.0.0, casa-types 0.0.2

Added:
  cabal-install/trunk/cabal-install-base16-bytestring1.0.patch
Modified:
  cabal-install/trunk/PKGBUILD

------------------------------------------+
 PKGBUILD                                 |    9 ++++--
 cabal-install-base16-bytestring1.0.patch |   38 +++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-12-16 10:16:29 UTC (rev 776437)
+++ PKGBUILD	2020-12-16 10:20:54 UTC (rev 776438)
@@ -5,7 +5,7 @@
 
 pkgname=cabal-install
 pkgver=3.2.0.0
-pkgrel=120
+pkgrel=121
 pkgdesc="The command-line interface for Cabal and Hackage."
 url="https://hackage.haskell.org/package/cabal-install"
 license=('BSD')
@@ -16,13 +16,16 @@
          'haskell-tar' 'haskell-zlib' 'haskell-lukko')
 makedepends=('ghc')
 source=("https://hackage.haskell.org/package/cabal-install-${pkgver}/cabal-install-${pkgver}.tar.gz"
-        $pkgname-ghc8.10.patch::https://github.com/haskell/cabal/pull/6711.patch)
+        $pkgname-ghc8.10.patch::https://github.com/haskell/cabal/pull/6711.patch
+        $pkgname-base16-bytestring1.0.patch)
 sha512sums=('ad937b2df42b688e4608aa2b91a25daf1042e5573626202e5182cbfeca9acc5933194853405a6396c60d0d28d6d0d5c5276fd85cb6acf4be2c8cd12afe747062'
-            '9e7245f5080e9c1609994b21d13ecbacb78fa9314d80425464f714f9bd68910d3fb4a5101b582461a89ec0b7115ef6acb2eb4ffba7a2477f65dca192f1eac1e7')
+            '9e7245f5080e9c1609994b21d13ecbacb78fa9314d80425464f714f9bd68910d3fb4a5101b582461a89ec0b7115ef6acb2eb4ffba7a2477f65dca192f1eac1e7'
+            '391356a85d78a147a909e9dee5981b46b1f2c5ffa251c070f3bef700d8ac490e02f5fa45ea9674f5fb4e3d3067809dfd72494753dc5d20b01e64c11d6320367f')
 
 prepare() {
     cd $pkgname-$pkgver
     patch -p2 -i ../$pkgname-ghc8.10.patch || :
+    patch -p2 -i ../$pkgname-base16-bytestring1.0.patch
     sed -i 's/< *1.2/<2/' $pkgname.cabal
 }
 

Added: cabal-install-base16-bytestring1.0.patch
===================================================================
--- cabal-install-base16-bytestring1.0.patch	                        (rev 0)
+++ cabal-install-base16-bytestring1.0.patch	2020-12-16 10:20:54 UTC (rev 776438)
@@ -0,0 +1,38 @@
+diff --git a/cabal-install/Distribution/Client/HashValue.hs b/cabal-install/Distribution/Client/HashValue.hs
+index 54b8aee9e..11e647c1c 100644
+--- a/cabal-install/Distribution/Client/HashValue.hs
++++ b/cabal-install/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/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
+index ee49fe245..6d423fdb3 100644
+--- a/cabal-install/cabal-install.cabal
++++ b/cabal-install/cabal-install.cabal
+@@ -319,7 +319,7 @@ executable cabal
+         async      >= 2.0      && < 2.3,
+         array      >= 0.4      && < 0.6,
+         base       >= 4.8      && < 4.15,
+-        base16-bytestring >= 0.1.1 && < 0.2,
++        base16-bytestring >= 0.1.1 && < 1.1.0.0,
+         binary     >= 0.7.3    && < 0.9,
+         bytestring >= 0.10.6.0 && < 0.11,
+         Cabal      == 3.2.*,



More information about the arch-commits mailing list