Hello community, here is the log from the commit of package ghc-network for openSUSE:Factory checked in at 2018-12-06 12:16:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-network (Old) and /work/SRC/openSUSE:Factory/.ghc-network.new.19453 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-network" Thu Dec 6 12:16:29 2018 rev:18 rq:650507 version:2.8.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-network/ghc-network.changes 2018-10-25 08:17:59.972027237 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-network.new.19453/ghc-network.changes 2018-12-06 12:16:34.301567817 +0100 @@ -1,0 +2,15 @@ +Mon Nov 19 16:02:57 UTC 2018 - [email protected] + +- Update network to version 2.8.0.0. + ## Version 2.8.0.0 + + * Breaking change: PortNumber originally contained Word32 in network + byte order and used "deriving Ord". This results in strange behavior + on the Ord instance. Now PortNumber holds Word32 in host byte order. + [#347](https://github.com/haskell/network/pull/347) + * Breaking change: stopping the export of the PortNum constructor in + PortNumber. + * Use bytestring == 0.10.* only. + * Use base >= 4.7 && < 5. + +------------------------------------------------------------------- Old: ---- network-2.7.0.2.tar.gz network.cabal New: ---- network-2.8.0.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-network.spec ++++++ --- /var/tmp/diff_new_pack.pU5dFg/_old 2018-12-06 12:16:35.433566601 +0100 +++ /var/tmp/diff_new_pack.pU5dFg/_new 2018-12-06 12:16:35.433566601 +0100 @@ -19,14 +19,13 @@ %global pkg_name network %bcond_with tests Name: ghc-%{pkg_name} -Version: 2.7.0.2 +Version: 2.8.0.0 Release: 0 Summary: Low-level networking interface License: BSD-3-Clause Group: Development/Libraries/Haskell 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/2.cabal#/%{pkg_name}.cabal BuildRequires: ghc-Cabal-devel BuildRequires: ghc-bytestring-devel BuildRequires: ghc-rpm-macros @@ -60,7 +59,6 @@ %prep %setup -q -n %{pkg_name}-%{version} -cp -p %{SOURCE1} %{pkg_name}.cabal %build %ghc_lib_build ++++++ network-2.7.0.2.tar.gz -> network-2.8.0.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/network-2.7.0.2/CHANGELOG.md new/network-2.8.0.0/CHANGELOG.md --- old/network-2.7.0.2/CHANGELOG.md 2018-07-07 16:47:29.000000000 +0200 +++ new/network-2.8.0.0/CHANGELOG.md 2018-09-05 00:14:52.000000000 +0200 @@ -1,3 +1,14 @@ +## Version 2.8.0.0 + +* Breaking change: PortNumber originally contained Word32 in network + byte order and used "deriving Ord". This results in strange behavior + on the Ord instance. Now PortNumber holds Word32 in host byte order. + [#347](https://github.com/haskell/network/pull/347) +* Breaking change: stopping the export of the PortNum constructor in + PortNumber. +* Use bytestring == 0.10.* only. +* Use base >= 4.7 && < 5. + ## Version 2.7.0.2 * Removing withMVar to avoid the deadlock between "accept" and "close" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/network-2.7.0.2/Network/Socket/Types.hsc new/network-2.8.0.0/Network/Socket/Types.hsc --- old/network-2.7.0.2/Network/Socket/Types.hsc 2018-07-07 16:47:29.000000000 +0200 +++ new/network-2.8.0.0/Network/Socket/Types.hsc 2018-09-05 00:14:52.000000000 +0200 @@ -1,6 +1,7 @@ {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} #include "HsNet.h" ##include "HsNetDef.h" @@ -63,7 +64,6 @@ import Control.Monad import Data.Bits import Data.Maybe -import Data.Ratio import Data.Typeable import Data.Word import Data.Int @@ -746,65 +746,40 @@ -- Port Numbers -- | Use the @Num@ instance (i.e. use a literal) to create a --- @PortNumber@ value with the correct network-byte-ordering. You --- should not use the PortNum constructor. It will be removed in the --- next release. +-- @PortNumber@ value. -- -- >>> 1 :: PortNumber -- 1 -- >>> read "1" :: PortNumber -- 1 -newtype PortNumber = PortNum Word16 deriving (Eq, Ord, Typeable) --- newtyped to prevent accidental use of sane-looking --- port numbers that haven't actually been converted to --- network-byte-order first. - -{-# DEPRECATED PortNum "Do not use the PortNum constructor. Use the Num instance. PortNum will be removed in the next release." #-} +-- >>> show (12345 :: PortNumber) +-- "12345" +-- >>> 50000 < (51000 :: PortNumber) +-- True +-- >>> 50000 < (52000 :: PortNumber) +-- True +-- >>> 50000 + (10000 :: PortNumber) +-- 60000 +newtype PortNumber = PortNum Word16 deriving (Eq, Ord, Typeable, Num, Enum, Real, Integral) +-- Print "n" instead of "PortNum n". instance Show PortNumber where - showsPrec p pn = showsPrec p (portNumberToInt pn) + showsPrec p (PortNum pn) = showsPrec p (fromIntegral pn :: Int) +-- Read "n" instead of "PortNum n". instance Read PortNumber where - readsPrec n = map (\(x,y) -> (intToPortNumber x, y)) . readsPrec n - -intToPortNumber :: Int -> PortNumber -intToPortNumber v = PortNum (htons (fromIntegral v)) - -portNumberToInt :: PortNumber -> Int -portNumberToInt (PortNum po) = fromIntegral (ntohs po) + readsPrec n = map (\(x,y) -> (fromIntegral (x :: Int), y)) . readsPrec n foreign import CALLCONV unsafe "ntohs" ntohs :: Word16 -> Word16 foreign import CALLCONV unsafe "htons" htons :: Word16 -> Word16 foreign import CALLCONV unsafe "ntohl" ntohl :: Word32 -> Word32 foreign import CALLCONV unsafe "htonl" htonl :: Word32 -> Word32 -instance Enum PortNumber where - toEnum = intToPortNumber - fromEnum = portNumberToInt - -instance Num PortNumber where - fromInteger i = intToPortNumber (fromInteger i) - -- for completeness. - (+) x y = intToPortNumber (portNumberToInt x + portNumberToInt y) - (-) x y = intToPortNumber (portNumberToInt x - portNumberToInt y) - negate x = intToPortNumber (-portNumberToInt x) - (*) x y = intToPortNumber (portNumberToInt x * portNumberToInt y) - abs n = intToPortNumber (abs (portNumberToInt n)) - signum n = intToPortNumber (signum (portNumberToInt n)) - -instance Real PortNumber where - toRational x = toInteger x % 1 - -instance Integral PortNumber where - quotRem a b = let (c,d) = quotRem (portNumberToInt a) (portNumberToInt b) in - (intToPortNumber c, intToPortNumber d) - toInteger a = toInteger (portNumberToInt a) - instance Storable PortNumber where sizeOf _ = sizeOf (undefined :: Word16) alignment _ = alignment (undefined :: Word16) - poke p (PortNum po) = poke (castPtr p) po - peek p = PortNum `liftM` peek (castPtr p) + poke p (PortNum po) = poke (castPtr p) (htons po) + peek p = (PortNum . ntohs) `liftM` peek (castPtr p) ------------------------------------------------------------------------ -- Socket addresses @@ -836,10 +811,10 @@ -- 'isSupportedSockAddr'. data SockAddr -- C Names = SockAddrInet - PortNumber -- sin_port (network byte order) + PortNumber -- sin_port HostAddress -- sin_addr (ditto) | SockAddrInet6 - PortNumber -- sin6_port (network byte order) + PortNumber -- sin6_port FlowInfo -- sin6_flowinfo (ditto) HostAddress6 -- sin6_addr (ditto) ScopeID -- sin6_scope_id (ditto) @@ -957,7 +932,7 @@ poker = case path of ('\0':_) -> pokeArray; _ -> pokeArray0 0 poker ((#ptr struct sockaddr_un, sun_path) p) pathC #endif -pokeSockAddr p (SockAddrInet (PortNum port) addr) = do +pokeSockAddr p (SockAddrInet port addr) = do #if defined(darwin_HOST_OS) zeroMemory p (#const sizeof(struct sockaddr_in)) #endif @@ -968,7 +943,7 @@ (#poke struct sockaddr_in, sin_port) p port (#poke struct sockaddr_in, sin_addr) p addr #if defined(IPV6_SOCKET_SUPPORT) -pokeSockAddr p (SockAddrInet6 (PortNum port) flow addr scope) = do +pokeSockAddr p (SockAddrInet6 port flow addr scope) = do #if defined(darwin_HOST_OS) zeroMemory p (#const sizeof(struct sockaddr_in6)) #endif @@ -1006,14 +981,14 @@ (#const AF_INET) -> do addr <- (#peek struct sockaddr_in, sin_addr) p port <- (#peek struct sockaddr_in, sin_port) p - return (SockAddrInet (PortNum port) addr) + return (SockAddrInet port addr) #if defined(IPV6_SOCKET_SUPPORT) (#const AF_INET6) -> do port <- (#peek struct sockaddr_in6, sin6_port) p flow <- (#peek struct sockaddr_in6, sin6_flowinfo) p In6Addr addr <- (#peek struct sockaddr_in6, sin6_addr) p scope <- (#peek struct sockaddr_in6, sin6_scope_id) p - return (SockAddrInet6 (PortNum port) flow addr scope) + return (SockAddrInet6 port flow addr scope) #endif #if defined(CAN_SOCKET_SUPPORT) (#const AF_CAN) -> do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/network-2.7.0.2/Network/Socket.hsc new/network-2.8.0.0/Network/Socket.hsc --- old/network-2.7.0.2/Network/Socket.hsc 2018-07-07 16:47:29.000000000 +0200 +++ new/network-2.8.0.0/Network/Socket.hsc 2018-09-05 00:14:52.000000000 +0200 @@ -167,7 +167,7 @@ # endif #endif -- ** Port number - , PortNumber(..) + , PortNumber , defaultPort , socketPortSafe , socketPort @@ -262,7 +262,7 @@ import Foreign.Marshal.Utils ( maybeWith, with ) import System.IO -import Control.Monad (liftM, when) +import Control.Monad (liftM, when, void) import qualified Control.Exception as E import Control.Concurrent.MVar diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/network-2.7.0.2/configure new/network-2.8.0.0/configure --- old/network-2.7.0.2/configure 2018-07-07 16:47:29.000000000 +0200 +++ new/network-2.8.0.0/configure 2018-09-05 00:14:52.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Haskell network package 2.6.3.5. +# Generated by GNU Autoconf 2.69 for Haskell network package 2.6.3.1. # # Report bugs to <[email protected]>. # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='Haskell network package' PACKAGE_TARNAME='network' -PACKAGE_VERSION='2.6.3.5' -PACKAGE_STRING='Haskell network package 2.6.3.5' +PACKAGE_VERSION='2.6.3.1' +PACKAGE_STRING='Haskell network package 2.6.3.1' PACKAGE_BUGREPORT='[email protected]' PACKAGE_URL='' @@ -1249,7 +1249,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Haskell network package 2.6.3.5 to adapt to many kinds of systems. +\`configure' configures Haskell network package 2.6.3.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1315,7 +1315,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Haskell network package 2.6.3.5:";; + short | recursive ) echo "Configuration of Haskell network package 2.6.3.1:";; esac cat <<\_ACEOF @@ -1400,7 +1400,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Haskell network package configure 2.6.3.5 +Haskell network package configure 2.6.3.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1872,7 +1872,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Haskell network package $as_me 2.6.3.5, which was +It was created by Haskell network package $as_me 2.6.3.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4621,7 +4621,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Haskell network package $as_me 2.6.3.5, which was +This file was extended by Haskell network package $as_me 2.6.3.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4683,7 +4683,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Haskell network package config.status 2.6.3.5 +Haskell network package config.status 2.6.3.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/network-2.7.0.2/configure.ac new/network-2.8.0.0/configure.ac --- old/network-2.7.0.2/configure.ac 2018-07-07 16:47:29.000000000 +0200 +++ new/network-2.8.0.0/configure.ac 2018-09-05 00:14:52.000000000 +0200 @@ -1,4 +1,4 @@ -AC_INIT([Haskell network package], [2.7.0.2], [[email protected]], [network]) +AC_INIT([Haskell network package], [2.8.0.0], [[email protected]], [network]) ac_includes_default="$ac_includes_default #ifdef HAVE_SYS_SOCKET_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/network-2.7.0.2/network.cabal new/network-2.8.0.0/network.cabal --- old/network-2.7.0.2/network.cabal 2018-07-07 16:47:29.000000000 +0200 +++ new/network-2.8.0.0/network.cabal 2018-09-05 00:14:52.000000000 +0200 @@ -1,5 +1,5 @@ name: network -version: 2.7.0.2 +version: 2.8.0.0 license: BSD3 license-file: LICENSE maintainer: Kazu Yamamoto, Evan Borden @@ -30,12 +30,11 @@ cbits/winSockErr.c homepage: https://github.com/haskell/network bug-reports: https://github.com/haskell/network/issues -tested-with: GHC == 7.4.2 - , GHC == 7.6.3 - , GHC == 7.8.4 +tested-with: GHC == 7.8.4 , GHC == 7.10.3 , GHC == 8.0.2 , GHC == 8.2.2 + , GHC == 8.4.3 library exposed-modules: @@ -59,8 +58,8 @@ Network.Socket.ByteString.Lazy.Windows build-depends: - base >= 4.6 && < 5, - bytestring < 0.11 + base >= 4.7 && < 5, + bytestring == 0.10.* if !os(windows) build-depends: @@ -82,7 +81,7 @@ type: exitcode-stdio-1.0 ghc-options: -Wall -threaded build-depends: - base < 5, + base >= 4.7 && < 5, bytestring, directory, HUnit, @@ -95,7 +94,7 @@ type: exitcode-stdio-1.0 build-depends: - base < 5, + base >= 4.7 && < 5, doctest >= 0.10.1 ghc-options: -Wall
