Hello community, here is the log from the commit of package ghc-fast-logger for openSUSE:Factory checked in at 2016-10-14 09:06:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-fast-logger (Old) and /work/SRC/openSUSE:Factory/.ghc-fast-logger.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-fast-logger" Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-fast-logger/ghc-fast-logger.changes 2016-07-20 09:18:30.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-fast-logger.new/ghc-fast-logger.changes 2016-10-14 09:06:20.000000000 +0200 @@ -1,0 +2,5 @@ +Sat Oct 1 17:18:08 UTC 2016 - [email protected] + +- Update to version 2.4.7 with cabal2obs. + +------------------------------------------------------------------- Old: ---- fast-logger-2.4.6.tar.gz New: ---- fast-logger-2.4.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-fast-logger.spec ++++++ --- /var/tmp/diff_new_pack.3kIFoK/_old 2016-10-14 09:06:21.000000000 +0200 +++ /var/tmp/diff_new_pack.3kIFoK/_new 2016-10-14 09:06:21.000000000 +0200 @@ -19,15 +19,14 @@ %global pkg_name fast-logger %bcond_with tests Name: ghc-%{pkg_name} -Version: 2.4.6 +Version: 2.4.7 Release: 0 Summary: A fast logging system License: BSD-3-Clause -Group: System/Libraries +Group: Development/Languages/Other 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 -# Begin cabal-rpm deps: BuildRequires: ghc-array-devel BuildRequires: ghc-auto-update-devel BuildRequires: ghc-bytestring-builder-devel @@ -43,7 +42,6 @@ %if %{with tests} BuildRequires: ghc-hspec-devel %endif -# End cabal-rpm deps %description A fast logging system. @@ -62,20 +60,14 @@ %prep %setup -q -n %{pkg_name}-%{version} - %build %ghc_lib_build - %install %ghc_lib_install - %check -%if %{with tests} -%{cabal} test -%endif - +%cabal_test %post devel %ghc_pkg_recache ++++++ fast-logger-2.4.6.tar.gz -> fast-logger-2.4.7.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fast-logger-2.4.6/ChangeLog.md new/fast-logger-2.4.7/ChangeLog.md --- old/fast-logger-2.4.6/ChangeLog.md 2016-04-26 09:41:24.000000000 +0200 +++ new/fast-logger-2.4.7/ChangeLog.md 2016-09-29 04:00:40.000000000 +0200 @@ -1,3 +1,7 @@ +## 2.4.7 + +* Fixing interleaved log output when messages are larger than buffer size. [#103](https://github.com/kazu-yamamoto/logger/pull/103) + ## 2.4.6 * Ensuring that stdio is flushed. [#92](https://github.com/kazu-yamamoto/logger/pull/92) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fast-logger-2.4.6/System/Log/FastLogger/File.hs new/fast-logger-2.4.7/System/Log/FastLogger/File.hs --- old/fast-logger-2.4.6/System/Log/FastLogger/File.hs 2016-04-26 09:41:24.000000000 +0200 +++ new/fast-logger-2.4.7/System/Log/FastLogger/File.hs 2016-09-29 04:00:40.000000000 +0200 @@ -9,8 +9,8 @@ -- | The spec for logging files data FileLogSpec = FileLogSpec { log_file :: FilePath - , log_file_size :: Integer - , log_backup_number :: Int + , log_file_size :: Integer -- ^ Max log file size (in bytes) before requiring rotation. + , log_backup_number :: Int -- ^ Max number of rotated log files to keep around before overwriting the oldest one. } -- | Checking if a log file can be written. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fast-logger-2.4.6/System/Log/FastLogger/Logger.hs new/fast-logger-2.4.7/System/Log/FastLogger/Logger.hs --- old/fast-logger-2.4.6/System/Log/FastLogger/Logger.hs 2016-04-26 09:41:24.000000000 +0200 +++ new/fast-logger-2.4.7/System/Log/FastLogger/Logger.hs 2016-09-29 04:00:40.000000000 +0200 @@ -10,6 +10,7 @@ import Control.Concurrent (MVar, newMVar, withMVar) import Control.Monad (when) +import Foreign.Marshal.Alloc (allocaBytes) import Foreign.Ptr (plusPtr) import System.Log.FastLogger.FileIO import System.Log.FastLogger.IO @@ -35,7 +36,13 @@ pushLog fd logger@(Logger mbuf size ref) nlogmsg@(LogStr nlen nbuilder) | nlen > size = do flushLog fd logger - withMVar mbuf $ \buf -> toBufIOWith buf size (write fd) nbuilder + + -- Make sure we have a large enough buffer to hold the entire + -- contents, thereby allowing for a single write system call and + -- avoiding interleaving. This does not address the possibility + -- of write not writing the entire buffer at once. + allocaBytes nlen $ \buf -> withMVar mbuf $ \_ -> + toBufIOWith buf nlen (write fd) nbuilder | otherwise = do mmsg <- atomicModifyIORef' ref checkBuf case mmsg of diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fast-logger-2.4.6/fast-logger.cabal new/fast-logger-2.4.7/fast-logger.cabal --- old/fast-logger-2.4.6/fast-logger.cabal 2016-04-26 09:41:24.000000000 +0200 +++ new/fast-logger-2.4.7/fast-logger.cabal 2016-09-29 04:00:40.000000000 +0200 @@ -1,11 +1,12 @@ Name: fast-logger -Version: 2.4.6 +Version: 2.4.7 Author: Kazu Yamamoto <[email protected]> Maintainer: Kazu Yamamoto <[email protected]> License: BSD3 License-File: LICENSE Synopsis: A fast logging system Description: A fast logging system +Homepage: https://github.com/kazu-yamamoto/logger Category: System Cabal-Version: >= 1.8 Build-Type: Simple
