Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-simple-sendfile for 
openSUSE:Factory checked in at 2023-06-22 23:25:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-simple-sendfile (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-simple-sendfile.new.15902 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-simple-sendfile"

Thu Jun 22 23:25:34 2023 rev:7 rq:1094448 version:0.2.32

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-simple-sendfile/ghc-simple-sendfile.changes  
2023-05-04 17:10:10.096222237 +0200
+++ 
/work/SRC/openSUSE:Factory/.ghc-simple-sendfile.new.15902/ghc-simple-sendfile.changes
       2023-06-22 23:26:03.085838623 +0200
@@ -1,0 +2,6 @@
+Mon Jun 19 00:52:59 UTC 2023 - Peter Simons <psim...@suse.com>
+
+- Update simple-sendfile to version 0.2.32.
+  Upstream does not provide a change log file.
+
+-------------------------------------------------------------------

Old:
----
  simple-sendfile-0.2.31.tar.gz

New:
----
  simple-sendfile-0.2.32.tar.gz

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

Other differences:
------------------
++++++ ghc-simple-sendfile.spec ++++++
--- /var/tmp/diff_new_pack.1XunUr/_old  2023-06-22 23:26:04.709846905 +0200
+++ /var/tmp/diff_new_pack.1XunUr/_new  2023-06-22 23:26:04.721846966 +0200
@@ -20,7 +20,7 @@
 %global pkgver %{pkg_name}-%{version}
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.2.31
+Version:        0.2.32
 Release:        0
 Summary:        Cross platform library for the sendfile system call
 License:        BSD-3-Clause
@@ -46,6 +46,8 @@
 BuildRequires:  ghc-conduit-prof
 BuildRequires:  ghc-directory-devel
 BuildRequires:  ghc-directory-prof
+BuildRequires:  ghc-easy-file-devel
+BuildRequires:  ghc-easy-file-prof
 BuildRequires:  ghc-hspec-devel
 BuildRequires:  ghc-hspec-prof
 BuildRequires:  ghc-process-devel

++++++ simple-sendfile-0.2.31.tar.gz -> simple-sendfile-0.2.32.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/simple-sendfile-0.2.31/Network/Sendfile/Linux.hsc 
new/simple-sendfile-0.2.32/Network/Sendfile/Linux.hsc
--- old/simple-sendfile-0.2.31/Network/Sendfile/Linux.hsc       2001-09-09 
03:46:40.000000000 +0200
+++ new/simple-sendfile-0.2.32/Network/Sendfile/Linux.hsc       2001-09-09 
03:46:40.000000000 +0200
@@ -1,6 +1,8 @@
 {-# LANGUAGE ForeignFunctionInterface #-}
 {-# LANGUAGE CPP #-}
 
+#define _FILE_OFFSET_BITS 64
+
 module Network.Sendfile.Linux (
     sendfile
   , sendfile'
@@ -34,9 +36,6 @@
 #include <sys/sendfile.h>
 #include <sys/socket.h>
 
-isLargeOffset :: Bool
-isLargeOffset = sizeOf (0 :: COff) == 8
-
 isLargeSize :: Bool
 isLargeSize = sizeOf (0 :: CSize) == 8
 
@@ -142,15 +141,7 @@
 
 -- Dst Src in order. take care
 foreign import ccall unsafe "sendfile"
-    c_sendfile32 :: Fd -> Fd -> Ptr COff -> CSize -> IO CSsize
-
-foreign import ccall unsafe "sendfile64"
-    c_sendfile64 :: Fd -> Fd -> Ptr COff -> CSize -> IO CSsize
-
-c_sendfile :: Fd -> Fd -> Ptr COff -> CSize -> IO CSsize
-c_sendfile
-  | isLargeOffset = c_sendfile64
-  | otherwise     = c_sendfile32
+    c_sendfile :: Fd -> Fd -> Ptr COff -> CSize -> IO CSsize
 
 ----------------------------------------------------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/simple-sendfile-0.2.31/simple-sendfile.cabal 
new/simple-sendfile-0.2.32/simple-sendfile.cabal
--- old/simple-sendfile-0.2.31/simple-sendfile.cabal    2001-09-09 
03:46:40.000000000 +0200
+++ new/simple-sendfile-0.2.32/simple-sendfile.cabal    2001-09-09 
03:46:40.000000000 +0200
@@ -1,6 +1,6 @@
 cabal-version:      >=1.10
 name:               simple-sendfile
-version:            0.2.31
+version:            0.2.32
 license:            BSD3
 license-file:       LICENSE
 maintainer:         Kazu Yamamoto <k...@iij.ad.jp>
@@ -17,13 +17,13 @@
 
 source-repository head
     type:     git
-    location: git://github.com/kazu-yamamoto/simple-sendfile
+    location: https://github.com/kazu-yamamoto/simple-sendfile
 
 flag allow-bsd
     description: Allow use of BSD sendfile (disable on GNU/kFreeBSD)
 
 flag fallback
-    description: Use counduit instead of sendfile()
+    description: Use conduit instead of sendfile()
     default: False
 
 library
@@ -33,7 +33,7 @@
     ghc-options:      -Wall
     build-depends:
         base >=4.8 && <5,
-        network,
+        network >=3.1.4,
         bytestring
 
     if (os(freebsd) && flag(allow-bsd) && !flag(fallback))
@@ -77,15 +77,15 @@
     default-language:   Haskell2010
     ghc-options:        -Wall
     build-depends:
-        base,
         HUnit,
+        base,
         bytestring,
         conduit,
         conduit-extra,
-        resourcet,
         directory,
+        easy-file >= 0.2.4,
         hspec >=1.3,
         network,
         process,
-        simple-sendfile,
-        unix
+        resourcet,
+        simple-sendfile
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/simple-sendfile-0.2.31/test/SendfileSpec.hs 
new/simple-sendfile-0.2.32/test/SendfileSpec.hs
--- old/simple-sendfile-0.2.31/test/SendfileSpec.hs     2001-09-09 
03:46:40.000000000 +0200
+++ new/simple-sendfile-0.2.32/test/SendfileSpec.hs     2001-09-09 
03:46:40.000000000 +0200
@@ -1,3 +1,4 @@
+{-# LANGUAGE BangPatterns #-}
 {-# LANGUAGE CPP #-}
 {-# LANGUAGE OverloadedStrings #-}
 
@@ -8,6 +9,7 @@
 import Control.Monad
 import Control.Monad.Trans.Resource (MonadResource, runResourceT)
 import Data.ByteString.Char8 as BS
+import qualified Data.ByteString.Lazy as BL
 import Data.Conduit
 import Data.Conduit.Binary as CB
 import Data.Conduit.List as CL
@@ -16,11 +18,9 @@
 import Network.Sendfile
 import Network.Socket
 import System.Directory
-import System.Exit
 import System.IO
-import System.Posix.Files
-import System.Process
 import System.Timeout
+import System.EasyFile
 import Test.Hspec
 
 ----------------------------------------------------------------
@@ -29,28 +29,34 @@
 spec = do
     describe "sendfile" $ do
         it "sends an entire file" $ do
-            sendFile EntireFile `shouldReturn` ExitSuccess
+            sendFile EntireFile `shouldReturn` True
         it "sends a part of file" $ do
-            sendFile (PartOfFile 2000 1000000) `shouldReturn` ExitSuccess
+            sendFile (PartOfFile 2000 1000000) `shouldReturn` True
         it "terminates even if length is over" $ do
             shouldTerminate $ sendIllegal (PartOfFile 2000 5000000)
         it "terminates even if offset is over" $ do
             shouldTerminate $ sendIllegal (PartOfFile 5000000 6000000)
+        -- On Windows, setFileSize throws an exception due to the
+        -- access permission. The test case will be finished but it is
+        -- not a right test.
         it "terminates even if the file is truncated" $ do
             shouldTerminate truncateFile
     describe "sendfileWithHeader" $ do
         it "sends an header and an entire file" $ do
-            sendFileH EntireFile `shouldReturn` ExitSuccess
+            sendFileH EntireFile `shouldReturn` True
         it "sends an header and a part of file" $ do
-            sendFileH (PartOfFile 2000 1000000) `shouldReturn` ExitSuccess
+            sendFileH (PartOfFile 2000 1000000) `shouldReturn` True
         it "sends a large header and an entire file" $ do
-            sendFileHLarge EntireFile `shouldReturn` ExitSuccess
+            sendFileHLarge EntireFile `shouldReturn` True
         it "sends a large header and a part of file" $ do
-            sendFileHLarge (PartOfFile 2000 1000000) `shouldReturn` ExitSuccess
+            sendFileHLarge (PartOfFile 2000 1000000) `shouldReturn` True
         it "terminates even if length is over" $ do
             shouldTerminate $ sendIllegalH (PartOfFile 2000 5000000)
         it "terminates even if offset is over" $ do
             shouldTerminate $ sendIllegalH (PartOfFile 5000000 6000000)
+        -- On Windows, setFileSize throws an exception due to the
+        -- access permission. The test case will be finished but it is
+        -- not a right test.
         it "terminates even if the file is truncated" $ do
             shouldTerminate truncateFileH
   where
@@ -59,10 +65,10 @@
 
 ----------------------------------------------------------------
 
-sendFile :: FileRange -> IO ExitCode
+sendFile :: FileRange -> IO Bool
 sendFile range = sendFileCore range []
 
-sendFileH :: FileRange -> IO ExitCode
+sendFileH :: FileRange -> IO Bool
 sendFileH range = sendFileCore range headers
   where
     headers = [
@@ -74,7 +80,7 @@
       , "\n"
       ]
 
-sendFileHLarge :: FileRange -> IO ExitCode
+sendFileHLarge :: FileRange -> IO Bool
 sendFileHLarge range = sendFileCore range headers
   where
     headers = [
@@ -86,7 +92,7 @@
       , "\n"
       ]
 
-sendFileCore :: FileRange -> [ByteString] -> IO ExitCode
+sendFileCore :: FileRange -> [ByteString] -> IO Bool
 sendFileCore range headers = bracket setup teardown $ \(s2,_) -> do
 #if MIN_VERSION_conduit(1,3,0)
     runResourceT $ runConduit (sourceSocket s2 .| sinkFile outputFile)
@@ -94,7 +100,9 @@
     runResourceT $ sourceSocket s2 $$ sinkFile outputFile
 #endif
     runResourceT $ copyfile range
-    system $ "cmp -s " ++ outputFile ++ " " ++ expectedFile
+    !f1 <- BL.readFile outputFile
+    !f2 <- BL.readFile expectedFile
+    return $! (f1 == f2)
   where
     copyfile EntireFile = do
         -- of course, we can use <> here
@@ -133,8 +141,8 @@
         killThread tid
         removeFileIfExists outputFile
         removeFileIfExists expectedFile
-    inputFile = "test/inputFile"
-    outputFile = "test/outputFile"
+    inputFile    = "test/inputFile"
+    outputFile   = "test/outputFile"
     expectedFile = "test/expectedFile"
 
 ----------------------------------------------------------------
@@ -176,7 +184,7 @@
         close s2
         killThread tid
         removeFileIfExists outputFile
-    inputFile = "test/inputFile"
+    inputFile  = "test/inputFile"
     outputFile = "test/outputFile"
 
 ----------------------------------------------------------------
@@ -229,8 +237,8 @@
         killThread tid
         removeFileIfExists tempFile
         removeFileIfExists outputFile
-    inputFile = "test/inputFile"
-    tempFile = "test/tempFile"
+    inputFile  = "test/inputFile"
+    tempFile   = "test/tempFile"
     outputFile = "test/outputFile"
     range = EntireFile
 

Reply via email to