Hello community,

here is the log from the commit of package ghc-zlib for openSUSE:Factory 
checked in at 2016-11-05 21:27:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-zlib (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-zlib.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-zlib"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-zlib/ghc-zlib.changes        2016-07-20 
09:22:49.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-zlib.new/ghc-zlib.changes   2016-11-05 
21:27:23.000000000 +0100
@@ -1,0 +2,5 @@
+Sun Oct 30 16:26:14 UTC 2016 - [email protected]
+
+- Update to version 0.6.1.2 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  3.cabal
  zlib-0.6.1.1.tar.gz

New:
----
  zlib-0.6.1.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-zlib.spec ++++++
--- /var/tmp/diff_new_pack.LN5UsJ/_old  2016-11-05 21:27:24.000000000 +0100
+++ /var/tmp/diff_new_pack.LN5UsJ/_new  2016-11-05 21:27:24.000000000 +0100
@@ -19,34 +19,30 @@
 %global pkg_name zlib
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.6.1.1
+Version:        0.6.1.2
 Release:        0
 Summary:        Compression and decompression in the gzip and zlib formats
 License:        BSD-2-Clause
-Group:          System/Libraries
+Group:          Development/Languages/Other
 Url:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
-Source1:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/3.cabal
 BuildRequires:  ghc-Cabal-devel
-# Begin cabal-rpm deps:
 BuildRequires:  ghc-bytestring-devel
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  zlib-devel
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %if %{with tests}
-BuildRequires:  ghc-HUnit-devel
 BuildRequires:  ghc-QuickCheck-devel
 BuildRequires:  ghc-tasty-devel
 BuildRequires:  ghc-tasty-hunit-devel
 BuildRequires:  ghc-tasty-quickcheck-devel
 %endif
-# End cabal-rpm deps
 
 %description
 This package provides a pure interface for compressing and decompressing
-streams of data represented as lazy 'ByteString's. It uses the zlib C library
-so it has high performance. It supports the "zlib", "gzip" and "raw"
-compression formats.
+streams of data represented as lazy 'ByteString's. It uses the
+<https://en.wikipedia.org/wiki/Zlib zlib C library> so it has high performance.
+It supports the "zlib", "gzip" and "raw" compression formats.
 
 It provides a convenient high level API suitable for most tasks and for the few
 cases where more control is needed it provides access to the full zlib feature
@@ -57,33 +53,24 @@
 Group:          Development/Libraries/Other
 Requires:       %{name} = %{version}-%{release}
 Requires:       ghc-compiler = %{ghc_version}
-# Begin cabal-rpm deps:
 Requires:       zlib-devel
 Requires(post): ghc-compiler = %{ghc_version}
 Requires(postun): ghc-compiler = %{ghc_version}
-# End cabal-rpm deps
 
 %description devel
 This package provides the Haskell %{pkg_name} library development files.
 
 %prep
 %setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
-
 
 %build
 %ghc_lib_build
 
-
 %install
 %ghc_lib_install
 
-
 %check
-%if %{with tests}
-%{cabal} test
-%endif
-
+%cabal_test
 
 %post devel
 %ghc_pkg_recache

++++++ zlib-0.6.1.1.tar.gz -> zlib-0.6.1.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-0.6.1.1/Codec/Compression/Zlib/Internal.hs 
new/zlib-0.6.1.2/Codec/Compression/Zlib/Internal.hs
--- old/zlib-0.6.1.1/Codec/Compression/Zlib/Internal.hs 2015-05-16 
15:12:10.000000000 +0200
+++ new/zlib-0.6.1.2/Codec/Compression/Zlib/Internal.hs 2016-10-23 
20:13:38.000000000 +0200
@@ -78,12 +78,18 @@
 import Control.Exception (Exception, throw, assert)
 import Control.Monad.ST.Lazy hiding (stToIO)
 import Control.Monad.ST.Strict (stToIO)
+#if __GLASGOW_HASKELL__ >= 702
+import qualified Control.Monad.ST.Unsafe as Unsafe (unsafeIOToST)
+#else
+import qualified Control.Monad.ST.Strict as Unsafe (unsafeIOToST)
+#endif
 import Data.Typeable (Typeable)
 import qualified Data.ByteString.Lazy as L
 import qualified Data.ByteString.Lazy.Internal as L
 import qualified Data.ByteString          as S
 import qualified Data.ByteString.Internal as S
 import Data.Word (Word8)
+import GHC.IO (noDuplicate)
 
 import qualified Codec.Compression.Zlib.Stream as Stream
 import Codec.Compression.Zlib.Stream (Stream)
@@ -733,7 +739,7 @@
 
 runStreamST :: Stream a -> Stream.State s -> ST s (a, Stream.State s)
 runStreamIO :: Stream a -> Stream.State RealWorld -> IO (a, Stream.State 
RealWorld)
-runStreamST strm zstate = strictToLazyST (Stream.runStream strm zstate)
+runStreamST strm zstate = strictToLazyST (Unsafe.unsafeIOToST noDuplicate >> 
Stream.runStream strm zstate)
 runStreamIO strm zstate = stToIO (Stream.runStream strm zstate)
 
 compressStreamIO :: Stream.Format -> CompressParams -> CompressStream IO
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-0.6.1.1/Codec/Compression/Zlib/Stream.hsc 
new/zlib-0.6.1.2/Codec/Compression/Zlib/Stream.hsc
--- old/zlib-0.6.1.1/Codec/Compression/Zlib/Stream.hsc  2015-05-16 
15:12:10.000000000 +0200
+++ new/zlib-0.6.1.2/Codec/Compression/Zlib/Stream.hsc  2016-10-23 
20:13:38.000000000 +0200
@@ -362,14 +362,15 @@
   fmap   = liftM
 
 instance Applicative Stream where
-  pure   = return
+  pure   = returnZ
   (<*>)  = ap
+  (*>)   = thenZ_
 
 instance Monad Stream where
   (>>=)  = thenZ
 --  m >>= f = (m `thenZ` \a -> consistencyCheck `thenZ_` returnZ a) `thenZ` f
-  (>>)   = thenZ_
-  return = returnZ
+  (>>)   = (*>)
+  return = pure
   fail   = (finalise >>) . failZ
 
 returnZ :: a -> Stream a
@@ -1008,6 +1009,12 @@
 -- So we define c_inflateInit2 and c_deflateInit2 here as wrappers around
 -- their _ counterparts and pass the extra args.
 
+##ifdef NON_BLOCKING_FFI
+##define SAFTY safe
+##else
+##define SAFTY unsafe
+##endif
+
 foreign import ccall unsafe "zlib.h inflateInit2_"
   c_inflateInit2_ :: StreamState -> CInt -> Ptr CChar -> CInt -> IO CInt
 
@@ -1016,7 +1023,7 @@
   withCAString #{const_str ZLIB_VERSION} $ \versionStr ->
     c_inflateInit2_ z n versionStr (#{const sizeof(z_stream)} :: CInt)
 
-foreign import ccall unsafe "zlib.h inflate"
+foreign import ccall SAFTY "zlib.h inflate"
   c_inflate :: StreamState -> CInt -> IO CInt
 
 foreign import ccall unsafe "zlib.h &inflateEnd"
@@ -1049,7 +1056,7 @@
                          -> CUInt
                          -> IO CInt
 
-foreign import ccall unsafe "zlib.h deflate"
+foreign import ccall SAFTY "zlib.h deflate"
   c_deflate :: StreamState -> CInt -> IO CInt
 
 foreign import ccall unsafe "zlib.h &deflateEnd"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-0.6.1.1/LICENSE new/zlib-0.6.1.2/LICENSE
--- old/zlib-0.6.1.1/LICENSE    2015-05-16 15:12:10.000000000 +0200
+++ new/zlib-0.6.1.2/LICENSE    2016-10-23 20:13:38.000000000 +0200
@@ -1,4 +1,4 @@
-Copyright (c) 2006-2015, Duncan Coutts
+Copyright (c) 2006-2016, Duncan Coutts
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-0.6.1.1/changelog new/zlib-0.6.1.2/changelog
--- old/zlib-0.6.1.1/changelog  2015-05-16 15:12:10.000000000 +0200
+++ new/zlib-0.6.1.2/changelog  2016-10-23 20:13:38.000000000 +0200
@@ -1,3 +1,8 @@
+0.6.1.2 Herbert Valerio Riedel <[email protected]> October 2016
+
+ * Fix a segfault when reading the stream multithreaded, #7
+ * New experimental cabal flag 'non-blocking-ffi' for 'safe' ffi calls
+
 0.6.1.1 Duncan Coutts <[email protected]> April 2015
 
  * Fixed building with GHC 7.0 and 7.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-0.6.1.1/test/Test.hs 
new/zlib-0.6.1.2/test/Test.hs
--- old/zlib-0.6.1.1/test/Test.hs       2015-05-16 15:12:10.000000000 +0200
+++ new/zlib-0.6.1.2/test/Test.hs       2016-10-23 20:13:38.000000000 +0200
@@ -11,7 +11,6 @@
 import Test.Codec.Compression.Zlib.Stream ()
 
 import Test.QuickCheck
-import Test.HUnit
 import Test.Tasty
 import Test.Tasty.QuickCheck
 import Test.Tasty.HUnit
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zlib-0.6.1.1/zlib.cabal new/zlib-0.6.1.2/zlib.cabal
--- old/zlib-0.6.1.1/zlib.cabal 2015-05-16 15:12:10.000000000 +0200
+++ new/zlib-0.6.1.2/zlib.cabal 2016-10-23 20:13:38.000000000 +0200
@@ -1,23 +1,27 @@
 name:            zlib
-version:         0.6.1.1
-copyright:       (c) 2006-2015 Duncan Coutts
+version:         0.6.1.2
+copyright:       (c) 2006-2016 Duncan Coutts
 license:         BSD3
 license-file:    LICENSE
 author:          Duncan Coutts <[email protected]>
 maintainer:      Duncan Coutts <[email protected]>
+bug-reports:     https://github.com/haskell/zlib/issues
 category:        Codec
 synopsis:        Compression and decompression in the gzip and zlib formats
 description:     This package provides a pure interface for compressing and 
                  decompressing streams of data represented as lazy 
-                 'ByteString's. It uses the zlib C library so it has high
-                 performance. It supports the \"zlib\", \"gzip\" and \"raw\"
-                 compression formats.
+                 'ByteString's. It uses the
+                 <https://en.wikipedia.org/wiki/Zlib zlib C library>
+                 so it has high performance. It supports the \"zlib\",
+                 \"gzip\" and \"raw\" compression formats.
                  .
                  It provides a convenient high level API suitable for most
                  tasks and for the few cases where more control is needed it
                  provides access to the full zlib feature set.
 build-type:      Simple
 cabal-version:   >= 1.10
+tested-with:     GHC ==7.0.4, GHC ==7.2.2, GHC ==7.4.2, GHC ==7.6.3, GHC 
==7.8.4, GHC ==7.10.3, GHC ==8.0.1, GHC==8.0.2, GHC ==8.1.*
+
 extra-source-files: changelog
                     -- zlib C sources (for Windows)
                     cbits/crc32.h cbits/inffast.h cbits/inflate.h
@@ -31,8 +35,15 @@
                     examples/gzip.hs examples/gunzip.hs
 
 source-repository head
-  type: darcs
-  location: http://code.haskell.org/zlib/
+  type: git
+  location: https://github.com/haskell/zlib.git
+
+flag non-blocking-ffi
+  default:     False
+  manual:      True
+  description: The (de)compression calls can sometimes take a long time, which
+               prevents other Haskell threads running. Enabling this flag
+               avoids this unfairness, but with greater overall cost.
 
 library
   exposed-modules: Codec.Compression.GZip,
@@ -55,6 +66,8 @@
     build-depends: ghc-prim
   includes:        zlib.h
   ghc-options:     -Wall -fwarn-tabs
+  if flag(non-blocking-ffi)
+    cpp-options:   -DNON_BLOCKING_FFI
   if !os(windows)
     -- Normally we use the the standard system zlib:
     extra-libraries: z
@@ -78,8 +91,7 @@
   default-language: Haskell2010
   build-depends:   base, bytestring, zlib,
                    QuickCheck       == 2.*,
-                   HUnit            == 1.2.*,
-                   tasty            >= 0.8 && < 0.11,
+                   tasty            >= 0.8 && < 0.12,
                    tasty-quickcheck == 0.8.*,
-                   tasty-hunit      == 0.8.*
+                   tasty-hunit      >= 0.8 && < 0.10
   ghc-options:     -Wall


Reply via email to