Hello community,
here is the log from the commit of package ghc-streaming-commons for
openSUSE:Factory checked in at 2017-04-11 12:44:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-streaming-commons (Old)
and /work/SRC/openSUSE:Factory/.ghc-streaming-commons.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-streaming-commons"
Tue Apr 11 12:44:15 2017 rev:12 rq:486384 version:0.1.17
Changes:
--------
---
/work/SRC/openSUSE:Factory/ghc-streaming-commons/ghc-streaming-commons.changes
2016-11-02 12:45:28.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.ghc-streaming-commons.new/ghc-streaming-commons.changes
2017-04-11 12:44:16.686097392 +0200
@@ -1,0 +2,5 @@
+Thu Jan 26 16:20:11 UTC 2017 - [email protected]
+
+- Update to version 0.1.17 with cabal2obs.
+
+-------------------------------------------------------------------
Old:
----
streaming-commons-0.1.16.tar.gz
New:
----
streaming-commons-0.1.17.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-streaming-commons.spec ++++++
--- /var/tmp/diff_new_pack.ZaO1ht/_old 2017-04-11 12:44:18.065902437 +0200
+++ /var/tmp/diff_new_pack.ZaO1ht/_new 2017-04-11 12:44:18.069901872 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-streaming-commons
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%global pkg_name streaming-commons
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.1.16
+Version: 0.1.17
Release: 0
Summary: Common lower-level functions needed by various streaming data
libraries
License: MIT
++++++ streaming-commons-0.1.16.tar.gz -> streaming-commons-0.1.17.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/streaming-commons-0.1.16/ChangeLog.md
new/streaming-commons-0.1.17/ChangeLog.md
--- old/streaming-commons-0.1.16/ChangeLog.md 2016-09-19 14:35:53.000000000
+0200
+++ new/streaming-commons-0.1.17/ChangeLog.md 2017-01-23 15:00:32.000000000
+0100
@@ -1,3 +1,7 @@
+## 0.1.17
+
+* Add `bindPortGenEx`
+
## 0.1.16
* Add `closeStreamingProcessHandle`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/streaming-commons-0.1.16/Data/Streaming/Network.hs
new/streaming-commons-0.1.17/Data/Streaming/Network.hs
--- old/streaming-commons-0.1.16/Data/Streaming/Network.hs 2016-09-19
14:35:53.000000000 +0200
+++ new/streaming-commons-0.1.17/Data/Streaming/Network.hs 2017-01-23
15:00:32.000000000 +0100
@@ -61,6 +61,7 @@
-- * Functions
-- ** General
, bindPortGen
+ , bindPortGenEx
, bindRandomPortGen
, getSocketGen
, getSocketFamilyGen
@@ -138,10 +139,23 @@
getSocketGen :: SocketType -> String -> Int -> IO (Socket, AddrInfo)
getSocketGen sockettype host port = getSocketFamilyGen sockettype host port
NS.AF_UNSPEC
+defaultSocketOptions :: SocketType -> [(NS.SocketOption, Int)]
+defaultSocketOptions sockettype =
+ case sockettype of
+ NS.Datagram -> [(NS.ReuseAddr,1)]
+ _ -> [(NS.NoDelay,1), (NS.ReuseAddr,1)]
+
-- | Attempt to bind a listening @Socket@ on the given host/port using given
-- @SocketType@. If no host is given, will use the first address available.
bindPortGen :: SocketType -> Int -> HostPreference -> IO Socket
-bindPortGen sockettype p s = do
+bindPortGen sockettype = bindPortGenEx (defaultSocketOptions sockettype)
sockettype
+
+-- | Attempt to bind a listening @Socket@ on the given host/port using given
+-- socket options and @SocketType@. If no host is given, will use the first
address available.
+--
+-- Since 0.1.17
+bindPortGenEx :: [(NS.SocketOption, Int)] -> SocketType -> Int ->
HostPreference -> IO Socket
+bindPortGenEx sockOpts sockettype p s = do
let hints = NS.defaultHints
{ NS.addrFlags = [ NS.AI_PASSIVE
, NS.AI_NUMERICSERV
@@ -174,11 +188,6 @@
tryAddrs (addr1:[]) = theBody addr1
tryAddrs _ = error "bindPort: addrs is empty"
- sockOpts =
- case sockettype of
- NS.Datagram -> [(NS.ReuseAddr,1)]
- _ -> [(NS.NoDelay,1), (NS.ReuseAddr,1)]
-
theBody addr =
bracketOnError
(NS.socket (NS.addrFamily addr) (NS.addrSocketType addr)
(NS.addrProtocol addr))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/streaming-commons-0.1.16/Data/Streaming/Process.hs
new/streaming-commons-0.1.17/Data/Streaming/Process.hs
--- old/streaming-commons-0.1.16/Data/Streaming/Process.hs 2016-09-19
14:35:53.000000000 +0200
+++ new/streaming-commons-0.1.17/Data/Streaming/Process.hs 2017-01-23
15:00:32.000000000 +0100
@@ -1,7 +1,7 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
--- | A full tutorial for this module is available on FP School of Haskell:
---
<https://www.fpcomplete.com/user/snoyberg/library-documentation/data-conduit-process>.
+-- | A full tutorial for this module is available at:
+-- <https://github.com/snoyberg/conduit/blob/master/PROCESS.md>.
--
-- Note that, while the tutorial covers @Data.Conduit.Process@, that module
closely
-- follows the present one, and almost all concepts in the tutorial apply here.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/streaming-commons-0.1.16/streaming-commons.cabal
new/streaming-commons-0.1.17/streaming-commons.cabal
--- old/streaming-commons-0.1.16/streaming-commons.cabal 2016-09-19
14:35:53.000000000 +0200
+++ new/streaming-commons-0.1.17/streaming-commons.cabal 2017-01-23
15:00:32.000000000 +0100
@@ -1,5 +1,5 @@
name: streaming-commons
-version: 0.1.16
+version: 0.1.17
synopsis: Common lower-level functions needed by various streaming
data libraries
description: Provides low-dependency functionality commonly needed by
various streaming data libraries, such as conduit and pipes.
homepage: https://github.com/fpco/streaming-commons