Hello community,

here is the log from the commit of package ghc-postgresql-libpq for 
openSUSE:Factory checked in at 2020-11-11 20:46:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-postgresql-libpq (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-postgresql-libpq.new.26437 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-postgresql-libpq"

Wed Nov 11 20:46:06 2020 rev:4 rq:847474 version:0.9.4.3

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/ghc-postgresql-libpq/ghc-postgresql-libpq.changes    
    2020-09-07 22:03:25.138101008 +0200
+++ 
/work/SRC/openSUSE:Factory/.ghc-postgresql-libpq.new.26437/ghc-postgresql-libpq.changes
     2020-11-11 20:46:07.639630744 +0100
@@ -1,0 +2,11 @@
+Tue Nov  3 10:08:50 UTC 2020 - psim...@suse.com
+
+- Update postgresql-libpq to version 0.9.4.3.
+  0.9.4.3
+  -------
+
+  - Support `bytestring-0.11`
+  - Allow `Win32-2.10.0.0`
+  - Make `PQconsumeInput` FFI call `safe`
+
+-------------------------------------------------------------------

Old:
----
  postgresql-libpq-0.9.4.2.tar.gz
  postgresql-libpq.cabal

New:
----
  postgresql-libpq-0.9.4.3.tar.gz

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

Other differences:
------------------
++++++ ghc-postgresql-libpq.spec ++++++
--- /var/tmp/diff_new_pack.AOYUVW/_old  2020-11-11 20:46:08.531631629 +0100
+++ /var/tmp/diff_new_pack.AOYUVW/_new  2020-11-11 20:46:08.535631634 +0100
@@ -19,13 +19,12 @@
 %global pkg_name postgresql-libpq
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.9.4.2
+Version:        0.9.4.3
 Release:        0
 Summary:        Low-level binding to libpq
 License:        BSD-3-Clause
 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
@@ -52,7 +51,6 @@
 
 %prep
 %autosetup -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
 
 %build
 %ghc_lib_build

++++++ postgresql-libpq-0.9.4.2.tar.gz -> postgresql-libpq-0.9.4.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postgresql-libpq-0.9.4.2/CHANGELOG.md 
new/postgresql-libpq-0.9.4.3/CHANGELOG.md
--- old/postgresql-libpq-0.9.4.2/CHANGELOG.md   2018-09-24 23:09:34.000000000 
+0200
+++ new/postgresql-libpq-0.9.4.3/CHANGELOG.md   2001-09-09 03:46:40.000000000 
+0200
@@ -1,3 +1,10 @@
+0.9.4.3
+-------
+
+- Support `bytestring-0.11`
+- Allow `Win32-2.10.0.0`
+- Make `PQconsumeInput` FFI call `safe`
+
 0.9.4.2
 -------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postgresql-libpq-0.9.4.2/postgresql-libpq.cabal 
new/postgresql-libpq-0.9.4.3/postgresql-libpq.cabal
--- old/postgresql-libpq-0.9.4.2/postgresql-libpq.cabal 2018-09-24 
23:09:34.000000000 +0200
+++ new/postgresql-libpq-0.9.4.3/postgresql-libpq.cabal 2001-09-09 
03:46:40.000000000 +0200
@@ -1,69 +1,80 @@
-Name:                postgresql-libpq
-Version:             0.9.4.2
-Synopsis:            low-level binding to libpq
-
-Description:         This is a binding to libpq: the C application
-                     programmer's interface to PostgreSQL. libpq is a
-                     set of library functions that allow client
-                     programs to pass queries to the PostgreSQL
-                     backend server and to receive the results of
-                     these queries.
-
-Homepage:            https://github.com/phadej/postgresql-libpq
-License:             BSD3
-License-file:        LICENSE
-Author:              Grant Monroe, Leon P Smith, Joey Adams
-Maintainer:          Oleg Grenrus <oleg.gren...@iki.fi>
-Copyright:           (c) 2010 Grant Monroe
-                     (c) 2011 Leon P Smith
-Category:            Database
-Build-type:          Custom
-Extra-source-files:  cbits/noticehandlers.h
-Cabal-version:       >=1.8
-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.2,
-  GHC==8.2.2,
-  GHC==8.4.3,
-  GHC==8.6.1
+name:               postgresql-libpq
+version:            0.9.4.3
+synopsis:           low-level binding to libpq
+description:
+  This is a binding to libpq: the C application
+  programmer's interface to PostgreSQL. libpq is a
+  set of library functions that allow client
+  programs to pass queries to the PostgreSQL
+  backend server and to receive the results of
+  these queries.
+
+homepage:           https://github.com/haskellari/postgresql-libpq
+bug-reports:        https://github.com/haskellari/postgresql-libpq/issues
+license:            BSD3
+license-file:       LICENSE
+author:             Grant Monroe, Leon P Smith, Joey Adams
+maintainer:         Oleg Grenrus <oleg.gren...@iki.fi>
+copyright:
+  (c) 2010 Grant Monroe
+  (c) 2011 Leon P Smith
+
+category:           Database
+build-type:         Custom
+extra-source-files: cbits/noticehandlers.h
+cabal-version:      >=1.10
+tested-with:
+  GHC ==7.0.4
+   || ==7.2.2
+   || ==7.4.2
+   || ==7.6.3
+   || ==7.8.4
+   || ==7.10.3
+   || ==8.0.2
+   || ==8.2.2
+   || ==8.4.4
+   || ==8.6.5
+   || ==8.8.4
+   || ==8.10.2
 
-extra-source-files:
-  CHANGELOG.md
+extra-source-files: CHANGELOG.md
 
-Custom-setup
+custom-setup
   setup-depends:
-    base >= 4.3 && <5, Cabal >= 1.10 && <2.5
+      base   >=4.3  && <5
+    , Cabal  >=1.10 && <3.3
 
 -- If true,  use pkg-config,  otherwise use the pg_config based build
 -- configuration
-Flag use-pkg-config
+flag use-pkg-config
   default: False
   manual:  True
 
-Library
-  hs-source-dirs:      src
-  c-sources:           cbits/noticehandlers.c
-  include-dirs:        cbits
-  Exposed-modules:     Database.PostgreSQL.LibPQ
-                       Database.PostgreSQL.LibPQ.Internal
-  Build-depends:       base       >=4.3     && <4.13
-                     , bytestring >=0.9.1.0 && <0.11
+library
+  default-language: Haskell2010
+  hs-source-dirs:   src
+  c-sources:        cbits/noticehandlers.c
+  include-dirs:     cbits
+  exposed-modules:
+    Database.PostgreSQL.LibPQ
+    Database.PostgreSQL.LibPQ.Internal
+
+  other-modules:    Database.PostgreSQL.LibPQ.Compat
+  build-depends:
+      base        >=4.3     && <4.15
+    , bytestring  >=0.9.1.0 && <0.12
 
   if !os(windows)
-    Build-depends:     unix  >=2.4.2.0 && <2.8
+    build-depends: unix >=2.4.2.0 && <2.8
 
   if os(windows)
-    Build-depends:     Win32 >=2.2.0.2 && <2.7
+    build-depends: Win32 >=2.2.0.2 && <2.11
 
-  GHC-Options:       -Wall
+  ghc-options:      -Wall
 
   if flag(use-pkg-config)
-    Pkgconfig-depends:   libpq >=9.3
+    pkgconfig-depends: libpq ==9.3 || >9.3
+
   else
     if os(windows)
       -- Due to https://sourceware.org/bugzilla/show_bug.cgi?id=22948,
@@ -71,29 +82,29 @@
       -- libpq.dll directly, which can lead to segfaults. As a temporary hack,
       -- we force ld to link against the libpq.lib import library directly
       -- by specifying libpq here.
-      Extra-Libraries:   libpq
+      extra-libraries: libpq
+
     else
-      Extra-Libraries:     pq
+      extra-libraries: pq
+
       if os(openbsd)
-        Extra-Libraries:     crypto ssl
+        extra-libraries:
+          crypto
+          ssl
 
   -- Other-modules:
-  Build-tools:       hsc2hs
+  build-tools:      hsc2hs -any
 
 test-suite smoke
-  type:           exitcode-stdio-1.0
-  main-is:        Smoke.hs
-  hs-source-dirs: test
+  default-language: Haskell2010
+  type:             exitcode-stdio-1.0
+  main-is:          Smoke.hs
+  hs-source-dirs:   test
   build-depends:
-    base,
-    bytestring,
-    postgresql-libpq
+      base
+    , bytestring
+    , postgresql-libpq
 
 source-repository head
   type:     git
-  location: https://github.com/phadej/postgresql-libpq
-
-source-repository this
-  type:     git
-  location: https://github.com/phadej/postgresql-libpq
-  tag:      v0.9.4.0
+  location: https://github.com/haskellari/postgresql-libpq
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/postgresql-libpq-0.9.4.2/src/Database/PostgreSQL/LibPQ/Compat.hs 
new/postgresql-libpq-0.9.4.3/src/Database/PostgreSQL/LibPQ/Compat.hs
--- old/postgresql-libpq-0.9.4.2/src/Database/PostgreSQL/LibPQ/Compat.hs        
1970-01-01 01:00:00.000000000 +0100
+++ new/postgresql-libpq-0.9.4.3/src/Database/PostgreSQL/LibPQ/Compat.hs        
2001-09-09 03:46:40.000000000 +0200
@@ -0,0 +1,27 @@
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE MagicHash #-}
+module Database.PostgreSQL.LibPQ.Compat where
+
+import Data.ByteString.Internal (ByteString(..))
+import Data.Word (Word8)
+import Foreign.ForeignPtr (ForeignPtr)
+
+#if MIN_VERSION_bytestring(0,11,0)
+import Data.ByteString.Internal (plusForeignPtr)
+#endif
+
+withPS :: ByteString -> (ForeignPtr Word8 -> Int -> Int -> r) -> r
+#if MIN_VERSION_bytestring(0,11,0)
+withPS (BS fp len)     kont = kont fp 0   len
+#else
+withPS (PS fp off len) kont = kont fp off len
+#endif
+{-# INLINE withPS #-}
+
+mkPS :: ForeignPtr Word8 -> Int -> Int -> ByteString
+#if MIN_VERSION_bytestring(0,11,0)
+mkPS fp off len = BS (plusForeignPtr fp off) len
+#else
+mkPS fp off len = PS fp off len
+#endif
+{-# INLINE mkPS #-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/postgresql-libpq-0.9.4.2/src/Database/PostgreSQL/LibPQ/Internal.hs 
new/postgresql-libpq-0.9.4.3/src/Database/PostgreSQL/LibPQ/Internal.hs
--- old/postgresql-libpq-0.9.4.2/src/Database/PostgreSQL/LibPQ/Internal.hs      
2018-09-24 23:09:34.000000000 +0200
+++ new/postgresql-libpq-0.9.4.3/src/Database/PostgreSQL/LibPQ/Internal.hs      
2001-09-09 03:46:40.000000000 +0200
@@ -11,12 +11,13 @@
 --
 -----------------------------------------------------------------------------
 
-{-# LANGUAGE BangPatterns, EmptyDataDecls #-}
+{-# LANGUAGE BangPatterns   #-}
+{-# LANGUAGE EmptyDataDecls #-}
 
 module Database.PostgreSQL.LibPQ.Internal where
 
+import Control.Concurrent.MVar (MVar)
 import Foreign
-import Control.Concurrent.MVar ( MVar )
 
 
 -- | 'Connection' encapsulates a connection to the backend.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/postgresql-libpq-0.9.4.2/src/Database/PostgreSQL/LibPQ.hsc 
new/postgresql-libpq-0.9.4.3/src/Database/PostgreSQL/LibPQ.hsc
--- old/postgresql-libpq-0.9.4.2/src/Database/PostgreSQL/LibPQ.hsc      
2018-09-24 23:09:34.000000000 +0200
+++ new/postgresql-libpq-0.9.4.3/src/Database/PostgreSQL/LibPQ.hsc      
2001-09-09 03:46:40.000000000 +0200
@@ -238,7 +238,6 @@
 import qualified Data.ByteString.Internal as B ( fromForeignPtr
                                                , c_strlen
                                                , createAndTrim
-                                               , ByteString(..)
                                                )
 import qualified Data.ByteString as B
 
@@ -246,6 +245,7 @@
 
 import Data.Typeable
 
+import Database.PostgreSQL.LibPQ.Compat
 import Database.PostgreSQL.LibPQ.Internal
 
 #if __GLASGOW_HASKELL__ >= 700
@@ -1045,8 +1045,8 @@
        return $ B.fromForeignPtr fp 0 $ fromIntegral len
 
 
--- | Returns the error message most recently generated by an operation
--- on the connection.
+-- | Returns the error message associated with the command, or an
+-- empty string if there was no error.
 resultErrorMessage :: Result
                    -> IO (Maybe B.ByteString)
 resultErrorMessage = flip maybeBsFromResult c_PQresultErrorMessage
@@ -1203,9 +1203,9 @@
 -- values, these functions will act as though the result has zero rows
 -- and zero columns.
 
--- | Returns the number of rows (tuples) in the query result. Because
--- it returns an integer result, large result sets might overflow the
--- return value on 32-bit operating systems.
+-- | Returns the number of rows (tuples) in the query result.  (Note
+-- that PGresult objects are limited to no more than INT_MAX rows, so
+-- an int result is sufficient.)
 ntuples :: Result
         -> IO Row
 ntuples res = withResult res (return . toRow . c_PQntuples)
@@ -2170,7 +2170,7 @@
         else do
           fp <- newForeignPtr finalizerFree (castPtr np)
           len  <- #{peek PGnotice, len} np
-          return $! Just $! B.PS fp (#offset PGnotice, str) len
+          return $! Just $! mkPS fp (#offset PGnotice, str) len
 
 -- $largeobjects
 
@@ -2510,7 +2510,7 @@
 foreign import ccall unsafe "libpq-fe.h PQnotifies"
     c_PQnotifies :: Ptr PGconn -> IO (Ptr Notify)
 
-foreign import ccall unsafe "libpq-fe.h PQconsumeInput"
+foreign import ccall        "libpq-fe.h PQconsumeInput"
     c_PQconsumeInput :: Ptr PGconn -> IO CInt
 
 foreign import ccall unsafe "libpq-fe.h PQisBusy"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postgresql-libpq-0.9.4.2/test/Smoke.hs 
new/postgresql-libpq-0.9.4.3/test/Smoke.hs
--- old/postgresql-libpq-0.9.4.2/test/Smoke.hs  2018-09-24 23:09:34.000000000 
+0200
+++ new/postgresql-libpq-0.9.4.3/test/Smoke.hs  2001-09-09 03:46:40.000000000 
+0200
@@ -10,7 +10,12 @@
     env <- getEnvironment
     case lookup "DATABASE_CONNSTRING" env of
         Nothing -> putStrLn "Set DATABASE_CONNSTRING environment variable"
-        Just s  -> smoke (BS8.pack s)
+        Just s  -> smoke (BS8.pack (special s))
+  where
+    -- https://www.appveyor.com/docs/services-databases/
+    special "appveyor" = "dbname='TestDb' user='postgres' 
password='Password12!'"
+    special "travis"   = ""
+    special s          = s
 
 smoke :: BS8.ByteString -> IO ()
 smoke connstring = do
_______________________________________________
openSUSE Commits mailing list -- commit@lists.opensuse.org
To unsubscribe, email commit-le...@lists.opensuse.org
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/commit@lists.opensuse.org

Reply via email to