Hello community, here is the log from the commit of package ghc-uuid for openSUSE:Factory checked in at 2016-04-03 23:07:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-uuid (Old) and /work/SRC/openSUSE:Factory/.ghc-uuid.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "ghc-uuid" Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-uuid/ghc-uuid.changes 2015-12-09 22:17:30.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-uuid.new/ghc-uuid.changes 2016-04-03 23:07:42.000000000 +0200 @@ -1,0 +2,10 @@ +Sun Apr 3 15:18:34 UTC 2016 - mimi.vx@gmail.com + +- update to 1.3.12 +* Use `cryptonite` for crypto +* The function `V4.nextRandom` is now implemented with functions from + `Crypto.Random` in package `cryptonite`. This does slow-down random + UUID generation but provides for far greater randomness. The + `Random` instance for `UUID` can be used to re-gain the old behavior. + +------------------------------------------------------------------- Old: ---- uuid-1.3.11.tar.gz New: ---- uuid-1.3.12.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-uuid.spec ++++++ --- /var/tmp/diff_new_pack.54udf1/_old 2016-04-03 23:07:43.000000000 +0200 +++ /var/tmp/diff_new_pack.54udf1/_new 2016-04-03 23:07:43.000000000 +0200 @@ -21,7 +21,7 @@ %bcond_with tests Name: ghc-uuid -Version: 1.3.11 +Version: 1.3.12 Release: 0 Summary: For creating, comparing, parsing and printing Universally Unique Identifiers License: BSD-3-Clause @@ -36,7 +36,8 @@ # Begin cabal-rpm deps: BuildRequires: ghc-binary-devel BuildRequires: ghc-bytestring-devel -BuildRequires: ghc-cryptohash-devel +BuildRequires: ghc-cryptonite-devel +BuildRequires: ghc-memory-devel BuildRequires: ghc-network-info-devel BuildRequires: ghc-random-devel BuildRequires: ghc-text-devel ++++++ uuid-1.3.11.tar.gz -> uuid-1.3.12.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uuid-1.3.11/CHANGES new/uuid-1.3.12/CHANGES --- old/uuid-1.3.11/CHANGES 2015-08-02 06:14:34.000000000 +0200 +++ new/uuid-1.3.12/CHANGES 2016-04-02 21:48:04.000000000 +0200 @@ -1,3 +1,13 @@ +1.3.12 + +- Update package dependencies +- Use `cryptonite` for crypto +- The function `V4.nextRandom` is now implemented with functions from + `Crypto.Random` in package `cryptonite`. This does slow-down random + UUID generation but provides for far greater randomness. The + `Random` instance for `UUID` can be used to re-gain the old + behavior. + 1.3.11 - Add toText/fromText diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uuid-1.3.11/CONTRIBUTORS new/uuid-1.3.12/CONTRIBUTORS --- old/uuid-1.3.11/CONTRIBUTORS 2015-08-02 06:14:34.000000000 +0200 +++ new/uuid-1.3.12/CONTRIBUTORS 1970-01-01 01:00:00.000000000 +0100 @@ -1,13 +0,0 @@ -In order of appearance: - -Antoine Latter -Jason Dusek -Tim Newsham -Mark Lentczner -Neil Mitchell -Bas van Dijk -Sergei Trofimovich -davean -Francesco Mazzoli -Michael Snoyman -Bardur Arantsson diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uuid-1.3.11/Data/UUID/Named.hs new/uuid-1.3.12/Data/UUID/Named.hs --- old/uuid-1.3.11/Data/UUID/Named.hs 2015-08-02 06:14:34.000000000 +0200 +++ new/uuid-1.3.12/Data/UUID/Named.hs 2016-04-02 21:48:04.000000000 +0200 @@ -33,19 +33,21 @@ import Data.Maybe import Data.Word (Word8) +import qualified Data.ByteArray as BA import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL -- |Generate a 'UUID' within the specified namespace out of the given -- object. -generateNamed :: (B.ByteString -> B.ByteString) -- ^Hash +generateNamed :: BA.ByteArrayAccess bs + => (B.ByteString -> bs) -- ^Hash -> Word8 -- ^Version -> UUID -- ^Namespace -> [Word8] -- ^Object -> UUID generateNamed hash version namespace object = let chunk = B.pack $ toList namespace ++ object - bytes = BL.fromChunks . (:[]) $ hash chunk + bytes = BL.fromStrict . BA.convert $ hash chunk w = getWord32be unpackBytes = runGet $ buildFromWords version <$> w <*> w <*> w <*> w diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uuid-1.3.11/Data/UUID/V3.hs new/uuid-1.3.12/Data/UUID/V3.hs --- old/uuid-1.3.11/Data/UUID/V3.hs 2015-08-02 06:14:34.000000000 +0200 +++ new/uuid-1.3.12/Data/UUID/V3.hs 2016-04-02 21:48:04.000000000 +0200 @@ -35,7 +35,7 @@ import Data.UUID.Types.Internal import qualified Data.UUID.Named as Shared -import qualified Crypto.Hash.MD5 as MD5 +import qualified Crypto.Hash as H -- |Generate a 'UUID' within the specified namespace out of the given @@ -46,4 +46,4 @@ generateNamed :: UUID -- ^Namespace -> [Word8] -- ^Object -> UUID -generateNamed = Shared.generateNamed MD5.hash 3 +generateNamed = Shared.generateNamed (H.hashWith H.MD5) 3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uuid-1.3.11/Data/UUID/V4.hs new/uuid-1.3.12/Data/UUID/V4.hs --- old/uuid-1.3.11/Data/UUID/V4.hs 2015-08-02 06:14:34.000000000 +0200 +++ new/uuid-1.3.12/Data/UUID/V4.hs 2016-04-02 21:48:04.000000000 +0200 @@ -1,6 +1,6 @@ {- | Module : Data.UUID.V4 - Copyright : (c) 2012 Antoine Latter + Copyright : (c) 2012-2016 Antoine Latter License : BSD-style @@ -21,8 +21,14 @@ module Data.UUID.V4 (nextRandom) where import Data.UUID -import qualified System.Random as R +import Data.UUID.Types.Internal ( buildFromBytes ) + +import Crypto.Random.Entropy ( getEntropy ) +import Data.ByteString ( unpack ) -- | Generate a random UUID. Introduced in version 1.2.6. nextRandom :: IO UUID -nextRandom = R.randomIO +nextRandom = do + [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, ba, bb, bc, bd, be, bf] + <- unpack `fmap` getEntropy 16 + return $ buildFromBytes 4 b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb bc bd be bf diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uuid-1.3.11/Data/UUID/V5.hs new/uuid-1.3.12/Data/UUID/V5.hs --- old/uuid-1.3.11/Data/UUID/V5.hs 2015-08-02 06:14:34.000000000 +0200 +++ new/uuid-1.3.12/Data/UUID/V5.hs 2016-04-02 21:48:04.000000000 +0200 @@ -30,7 +30,7 @@ import Data.UUID.Types.Internal import qualified Data.UUID.Named as Shared -import qualified Crypto.Hash.SHA1 as SHA1 +import qualified Crypto.Hash as H -- |Generate a 'UUID' within the specified namespace out of the given @@ -41,4 +41,4 @@ generateNamed :: UUID -- ^Namespace -> [Word8] -- ^Object -> UUID -generateNamed = Shared.generateNamed SHA1.hash 5 +generateNamed = Shared.generateNamed (H.hashWith H.SHA1) 5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uuid-1.3.11/tests/BenchUUID.hs new/uuid-1.3.12/tests/BenchUUID.hs --- old/uuid-1.3.11/tests/BenchUUID.hs 2015-08-02 06:14:34.000000000 +0200 +++ new/uuid-1.3.12/tests/BenchUUID.hs 2016-04-02 21:48:04.000000000 +0200 @@ -6,6 +6,7 @@ import Data.Word import qualified Data.UUID as U import qualified Data.UUID.V1 as U +import qualified Data.UUID.V4 as U import qualified Data.UUID.V3 as U3 import qualified Data.UUID.V5 as U5 import System.Random @@ -27,7 +28,8 @@ defaultMain [ bgroup "generation" [ bench "V1" $ nfIO U.nextUUID, - bench "V4" $ nfIO (randomUUID :: IO U.UUID), + bench "V4-stock" $ nfIO (U.nextRandom :: IO U.UUID), + bench "V4-mersenne" $ nfIO (randomUUID :: IO U.UUID), bench "V3" $ nf (U3.generateNamed U3.namespaceURL) n1, bench "V5" $ nf (U5.generateNamed U5.namespaceURL) n1 ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uuid-1.3.11/uuid.cabal new/uuid-1.3.12/uuid.cabal --- old/uuid-1.3.11/uuid.cabal 2015-08-02 06:14:34.000000000 +0200 +++ new/uuid-1.3.12/uuid.cabal 2016-04-02 21:48:04.000000000 +0200 @@ -1,5 +1,5 @@ Name: uuid -Version: 1.3.11 +Version: 1.3.12 Copyright: (c) 2008-2014 Antoine Latter Author: Antoine Latter Maintainer: aslatter@gmail.com @@ -22,17 +22,17 @@ Extra-Source-Files: CHANGES - CONTRIBUTORS Library Build-Depends: base >=3 && < 5, - binary >= 0.4 && < 0.8, + binary >= 0.4 && < 0.9, bytestring >= 0.9 && < 0.11, - cryptohash >= 0.7 && < 0.12, + cryptonite, + memory, network-info == 0.2.*, random >= 1.0.1 && < 1.2, - time >= 1.1 && < 1.6, + time >= 1.1 && < 1.7, text >= 1 && < 1.3, uuid-types >= 1.0.2 && < 2 @@ -64,10 +64,10 @@ Build-Depends: base >= 3 && < 5, uuid, bytestring >= 0.9 && < 0.11, - HUnit >=1.2 && < 1.3, + HUnit >=1.2 && < 1.4, QuickCheck >=2.4 && < 2.9, random >= 1.0.1 && < 1.2, - tasty == 0.10.*, + tasty >= 0.10 && < 0.12, tasty-hunit == 0.9.*, tasty-quickcheck == 0.8.*