Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-warp-tls for openSUSE:Factory 
checked in at 2023-04-04 21:24:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-warp-tls (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-warp-tls.new.19717 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-warp-tls"

Tue Apr  4 21:24:44 2023 rev:8 rq:1076123 version:3.3.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-warp-tls/ghc-warp-tls.changes        
2022-10-13 15:44:57.743067897 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-warp-tls.new.19717/ghc-warp-tls.changes     
2023-04-04 21:25:04.502778471 +0200
@@ -1,0 +2,22 @@
+Thu Mar 30 17:09:01 UTC 2023 - Peter Simons <psim...@suse.com>
+
+- Updated spec file to conform with ghc-rpm-macros-2.5.2.
+
+-------------------------------------------------------------------
+Thu Mar 23 07:25:34 UTC 2023 - Peter Simons <psim...@suse.com>
+
+- Update warp-tls to version 3.3.6.
+  ## 3.3.6
+
+  * Setting FD_CLOEXEC on the listening socket.
+    [#923](https://github.com/yesodweb/wai/pull/923)
+
+-------------------------------------------------------------------
+Wed Feb  8 05:38:09 UTC 2023 - Peter Simons <psim...@suse.com>
+
+- Update warp-tls to version 3.3.5.
+  ## 3.3.5
+
+  * Switching the version of the "recv" package from 0.0.x to 0.1.x.
+
+-------------------------------------------------------------------

Old:
----
  warp-tls-3.3.4.tar.gz

New:
----
  warp-tls-3.3.6.tar.gz

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

Other differences:
------------------
++++++ ghc-warp-tls.spec ++++++
--- /var/tmp/diff_new_pack.YWN48L/_old  2023-04-04 21:25:05.006781326 +0200
+++ /var/tmp/diff_new_pack.YWN48L/_new  2023-04-04 21:25:05.010781348 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-warp-tls
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,25 +17,40 @@
 
 
 %global pkg_name warp-tls
+%global pkgver %{pkg_name}-%{version}
 Name:           ghc-%{pkg_name}
-Version:        3.3.4
+Version:        3.3.6
 Release:        0
 Summary:        HTTP over TLS support for Warp via the TLS package
 License:        MIT
 URL:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRequires:  ghc-Cabal-devel
+BuildRequires:  ghc-base-devel
+BuildRequires:  ghc-base-prof
 BuildRequires:  ghc-bytestring-devel
+BuildRequires:  ghc-bytestring-prof
 BuildRequires:  ghc-cryptonite-devel
+BuildRequires:  ghc-cryptonite-prof
 BuildRequires:  ghc-data-default-class-devel
+BuildRequires:  ghc-data-default-class-prof
 BuildRequires:  ghc-network-devel
+BuildRequires:  ghc-network-prof
+BuildRequires:  ghc-recv-devel
+BuildRequires:  ghc-recv-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-streaming-commons-devel
+BuildRequires:  ghc-streaming-commons-prof
 BuildRequires:  ghc-tls-devel
+BuildRequires:  ghc-tls-prof
 BuildRequires:  ghc-tls-session-manager-devel
+BuildRequires:  ghc-tls-session-manager-prof
 BuildRequires:  ghc-unliftio-devel
+BuildRequires:  ghc-unliftio-prof
 BuildRequires:  ghc-wai-devel
+BuildRequires:  ghc-wai-prof
 BuildRequires:  ghc-warp-devel
+BuildRequires:  ghc-warp-prof
 ExcludeArch:    %{ix86}
 
 %description
@@ -53,6 +68,22 @@
 %description devel
 This package provides the Haskell %{pkg_name} library development files.
 
+%package -n ghc-%{pkg_name}-doc
+Summary:        Haskell %{pkg_name} library documentation
+Requires:       ghc-filesystem
+BuildArch:      noarch
+
+%description -n ghc-%{pkg_name}-doc
+This package provides the Haskell %{pkg_name} library documentation.
+
+%package -n ghc-%{pkg_name}-prof
+Summary:        Haskell %{pkg_name} profiling library
+Requires:       ghc-%{pkg_name}-devel = %{version}-%{release}
+Supplements:    (ghc-%{pkg_name}-devel and ghc-prof)
+
+%description -n ghc-%{pkg_name}-prof
+This package provides the Haskell %{pkg_name} profiling library.
+
 %prep
 %autosetup -n %{pkg_name}-%{version}
 
@@ -74,4 +105,9 @@
 %files devel -f %{name}-devel.files
 %doc ChangeLog.md README.md
 
+%files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
+%license LICENSE
+
+%files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+
 %changelog

++++++ warp-tls-3.3.4.tar.gz -> warp-tls-3.3.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/warp-tls-3.3.4/ChangeLog.md 
new/warp-tls-3.3.6/ChangeLog.md
--- old/warp-tls-3.3.4/ChangeLog.md     2001-09-09 03:46:40.000000000 +0200
+++ new/warp-tls-3.3.6/ChangeLog.md     2001-09-09 03:46:40.000000000 +0200
@@ -1,5 +1,14 @@
 # ChangeLog
 
+## 3.3.6
+
+* Setting FD_CLOEXEC on the listening socket.
+  [#923](https://github.com/yesodweb/wai/pull/923)
+
+## 3.3.5
+
+* Switching the version of the "recv" package from 0.0.x to 0.1.x.
+
 ## 3.3.4
 
 * Integrated customizable `accept` hook from 
`Network.Wai.Handler.Warp.Settings` (cf. `setAccept`)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/warp-tls-3.3.4/Network/Wai/Handler/WarpTLS.hs 
new/warp-tls-3.3.6/Network/Wai/Handler/WarpTLS.hs
--- old/warp-tls-3.3.4/Network/Wai/Handler/WarpTLS.hs   2001-09-09 
03:46:40.000000000 +0200
+++ new/warp-tls-3.3.6/Network/Wai/Handler/WarpTLS.hs   2001-09-09 
03:46:40.000000000 +0200
@@ -53,7 +53,7 @@
     ) where
 
 import Control.Applicative ((<|>))
-import UnliftIO.Exception (Exception, throwIO, bracket, finally, handle, 
handleAny, fromException, try, IOException, onException, SomeException(..), 
handleJust)
+import UnliftIO.Exception (Exception, throwIO, bracket, finally, handleAny, 
try, IOException, onException, SomeException(..), handleJust)
 import qualified UnliftIO.Exception as E
 import Control.Monad (void, guard)
 import qualified Data.ByteString as S
@@ -72,6 +72,7 @@
 #endif
     withSocketsDo,
  )
+import Network.Socket.BufferPool
 import Network.Socket.ByteString (sendAll)
 import qualified Network.TLS as TLS
 import qualified Crypto.PubKey.DH as DH
@@ -81,7 +82,8 @@
 import Network.Wai.Handler.Warp
 import Network.Wai.Handler.Warp.Internal
 import Network.Wai.Handler.WarpTLS.Internal(CertSettings(..), TLSSettings(..), 
OnInsecure(..))
-import System.IO.Error (isEOFError, ioeGetErrorType)
+import System.IO.Error (ioeGetErrorType, isEOFError)
+import UnliftIO.Exception (handle, fromException)
 
 -- | The default 'CertSettings'.
 defaultCertSettings :: CertSettings
@@ -195,7 +197,9 @@
     bracket
         (bindPortTCP (getPort set) (getHost set))
         close
-        (\sock -> runTLSSocket tset set sock app)
+        (\sock -> do
+            setSocketCloseOnExec sock
+            runTLSSocket tset set sock app)
 
 ----------------------------------------------------------------
 
@@ -293,7 +297,8 @@
 
 httpOverTls :: TLS.TLSParams params => TLSSettings -> Settings -> Socket -> 
S.ByteString -> params -> IO (Connection, Transport)
 httpOverTls TLSSettings{..} _set s bs0 params = do
-    rawRecvN <- makePlainReceiveN s 2048 16384 bs0
+    pool <- newBufferPool 2048 16384
+    rawRecvN <- makeRecvN bs0 $ receive s pool
     let recvN = wrappedRecvN rawRecvN
     ctx <- TLS.contextNew (backend recvN) params
     TLS.contextHookSetLogging ctx tlsLogging
@@ -303,9 +308,8 @@
     writeBuffer <- createWriteBuffer 16384
     writeBufferRef <- I.newIORef writeBuffer
     -- Creating a cache for leftover input data.
-    ref <- I.newIORef ""
     tls <- getTLSinfo ctx
-    return (conn ctx writeBufferRef ref isH2, tls)
+    return (conn ctx writeBufferRef isH2, tls)
   where
     backend recvN = TLS.Backend {
         TLS.backendFlush = return ()
@@ -323,18 +327,23 @@
         else Nothing)
       throwIO
       $ sendAll sock bs
-    conn ctx writeBufferRef ref isH2 = Connection {
+    conn ctx writeBufferRef isH2 = Connection {
         connSendMany         = TLS.sendData ctx . L.fromChunks
       , connSendAll          = sendall
       , connSendFile         = sendfile
       , connClose            = close'
-      , connRecv             = recv ref
-      , connRecvBuf          = recvBuf ref
+      , connRecv             = recv
+      , connRecvBuf          = \_ _ -> return True -- obsoleted
       , connWriteBuffer      = writeBufferRef
       , connHTTP2            = isH2
       }
       where
         sendall = TLS.sendData ctx . L.fromChunks . return
+        recv = handle onEOF $ TLS.recvData ctx
+          where
+            onEOF e
+              | Just TLS.Error_EOF <- fromException e       = return S.empty
+              | Just ioe <- fromException e, isEOFError ioe = return S.empty   
               | otherwise                                   = throwIO e
         sendfile fid offset len hook headers = do
             writeBuffer <- I.readIORef writeBufferRef
             readSendFile (bufBuffer writeBuffer) (bufSize writeBuffer) sendall 
fid offset len hook headers
@@ -350,64 +359,11 @@
             (const (return ()))
             (TLS.bye ctx)
 
-        -- TLS version of recv with a cache for leftover input data.
-        -- The cache is shared with recvBuf.
-        recv cref = do
-            cached <- I.readIORef cref
-            if cached /= "" then do
-                I.writeIORef cref ""
-                return cached
-              else
-                recv'
-
-        -- TLS version of recv (decrypting) without a cache.
-        recv' = handle onEOF go
-          where
-            onEOF e
-              | Just TLS.Error_EOF <- fromException e       = return S.empty
-              | Just ioe <- fromException e, isEOFError ioe = return S.empty   
               | otherwise                                   = throwIO e
-            go = do
-                x <- TLS.recvData ctx
-                if S.null x then
-                    go
-                  else
-                    return x
-
-        -- TLS version of recvBuf with a cache for leftover input data.
-        recvBuf cref buf siz = do
-            cached <- I.readIORef cref
-            (ret, leftover) <- fill cached buf siz recv'
-            I.writeIORef cref leftover
-            return ret
 
     wrappedRecvN recvN n = handleAny handler $ recvN n
     handler :: SomeException -> IO S.ByteString
     handler _ = return ""
 
-fill :: S.ByteString -> Buffer -> BufSize -> Recv -> IO (Bool,S.ByteString)
-fill bs0 buf0 siz0 recv
-  | siz0 <= len0 = do
-      let (bs, leftover) = S.splitAt siz0 bs0
-      void $ copy buf0 bs
-      return (True, leftover)
-  | otherwise = do
-      buf <- copy buf0 bs0
-      loop buf (siz0 - len0)
-  where
-    len0 = S.length bs0
-    loop _   0   = return (True, "")
-    loop buf siz = do
-      bs <- recv
-      let len = S.length bs
-      if len == 0 then return (False, "")
-        else if len <= siz then do
-          buf' <- copy buf bs
-          loop buf' (siz - len)
-        else do
-          let (bs1,bs2) = S.splitAt siz bs
-          void $ copy buf bs1
-          return (True, bs2)
-
 getTLSinfo :: TLS.Context -> IO Transport
 getTLSinfo ctx = do
     proto <- TLS.getNegotiatedProtocol ctx
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/warp-tls-3.3.4/warp-tls.cabal 
new/warp-tls-3.3.6/warp-tls.cabal
--- old/warp-tls-3.3.4/warp-tls.cabal   2001-09-09 03:46:40.000000000 +0200
+++ new/warp-tls-3.3.6/warp-tls.cabal   2001-09-09 03:46:40.000000000 +0200
@@ -1,5 +1,5 @@
 Name:                warp-tls
-Version:             3.3.4
+Version:             3.3.6
 Synopsis:            HTTP over TLS support for Warp via the TLS package
 License:             MIT
 License-file:        LICENSE
@@ -29,7 +29,9 @@
                    , streaming-commons
                    , tls-session-manager           >= 0.0.4
                    , unliftio
-  Exposed-modules:   Network.Wai.Handler.WarpTLS, 
Network.Wai.Handler.WarpTLS.Internal
+                   , recv                          >= 0.1.0   && < 0.2.0
+  Exposed-modules:   Network.Wai.Handler.WarpTLS
+                     Network.Wai.Handler.WarpTLS.Internal
   ghc-options:       -Wall
   if os(windows)
       Cpp-Options:   -DWINDOWS

Reply via email to