Hello community,

here is the log from the commit of package ghc-hdaemonize for openSUSE:Factory 
checked in at 2017-08-31 20:56:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-hdaemonize (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-hdaemonize.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-hdaemonize"

Thu Aug 31 20:56:13 2017 rev:4 rq:513378 version:0.5.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-hdaemonize/ghc-hdaemonize.changes    
2017-06-04 01:57:36.175069994 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-hdaemonize.new/ghc-hdaemonize.changes       
2017-08-31 20:56:14.733253822 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:07:49 UTC 2017 - [email protected]
+
+- Update to version 0.5.4.
+
+-------------------------------------------------------------------

Old:
----
  hdaemonize-0.5.3.tar.gz

New:
----
  hdaemonize-0.5.4.tar.gz

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

Other differences:
------------------
++++++ ghc-hdaemonize.spec ++++++
--- /var/tmp/diff_new_pack.ixZMsY/_old  2017-08-31 20:56:15.581134692 +0200
+++ /var/tmp/diff_new_pack.ixZMsY/_new  2017-08-31 20:56:15.605131321 +0200
@@ -18,7 +18,7 @@
 
 %global pkg_name hdaemonize
 Name:           ghc-%{pkg_name}
-Version:        0.5.3
+Version:        0.5.4
 Release:        0
 Summary:        Library to handle the details of writing daemons for UNIX
 License:        BSD-3-Clause

++++++ hdaemonize-0.5.3.tar.gz -> hdaemonize-0.5.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hdaemonize-0.5.3/System/Posix/Daemonize.hs 
new/hdaemonize-0.5.4/System/Posix/Daemonize.hs
--- old/hdaemonize-0.5.3/System/Posix/Daemonize.hs      2017-05-14 
11:07:37.000000000 +0200
+++ new/hdaemonize-0.5.4/System/Posix/Daemonize.hs      2017-05-29 
00:46:01.000000000 +0200
@@ -6,41 +6,9 @@
   -- * Building system services
   serviced, CreateDaemon(..), simpleDaemon,
   -- * Intradaemon utilities
-  fatalError, exitCleanly
-  -- * An example
-  --
-  -- | Here is an example of a full program which writes a message to
-  -- syslog once a second proclaiming its continued existance, and
-  -- which installs its own SIGHUP handler.  Note that you won't
-  -- actually see the message once a second in the log on most
-  -- systems.  @syslogd@ detects repeated messages and prints the
-  -- first one, then delays for the rest and eventually writes a line
-  -- about how many times it has seen it.
-  --
-  -- > {-# LANGUAGE OverloadedStrings #-}
-  -- > module Main where
-  -- >
-  -- > import System.Posix.Daemonize (CreateDaemon(..), serviced, simpleDaemon)
-  -- > import System.Posix.Signals (installHandler, Handler(Catch), sigHUP, 
fullSignalSet)
-  -- > import System.Posix.Syslog (syslogUnsafe, Facility(DAEMON), 
Priority(Notice))
-  -- > import Control.Concurrent (threadDelay)
-  -- > import Control.Monad (forever)
-  -- >
-  -- > main :: IO ()
-  -- > main = serviced stillAlive
-  -- >
-  -- > stillAlive :: CreateDaemon ()
-  -- > stillAlive = simpleDaemon { program = stillAliveMain }
-  -- >
-  -- > stillAliveMain :: () -> IO ()
-  -- > stillAliveMain _ = do
-  -- >   installHandler sigHUP (Catch taunt) (Just fullSignalSet)
-  -- >   forever $ do threadDelay (10^6)
-  -- >                syslog DAEMON Notice "I'm still alive!"
-  -- >
-  -- > taunt :: IO ()
-  -- > taunt = syslogUnsafe DAEMON Notice "I sneeze in your general direction, 
you and your SIGHUP."
-
+  fatalError, exitCleanly,
+  -- * Logging utilities
+  syslog
   ) where
 
 {- originally based on code from
@@ -64,15 +32,17 @@
 
 import Data.ByteString (ByteString)
 import qualified Data.ByteString.Char8 as ByteString
+import Data.ByteString.Unsafe (unsafeUseAsCStringLen)
 import Data.Maybe (isNothing, fromMaybe, fromJust)
 import System.Environment
 import System.Exit
 import System.Posix
-import System.Posix.Syslog 
(withSyslog,SyslogConfig(..),Option(..),Priority(..),PriorityMask(..),Facility(..),syslogUnsafe)
+import System.Posix.Syslog (Priority(..), Facility(Daemon), Option, withSyslog)
+import qualified System.Posix.Syslog as Log
 import System.FilePath.Posix (joinPath)
 
 syslog :: Priority -> ByteString -> IO ()
-syslog = syslogUnsafe DAEMON
+syslog pri msg = unsafeUseAsCStringLen msg (Log.syslog (Just Daemon) pri)
 
 -- | Turning a process into a daemon involves a fixed set of
 -- operations on unix systems, described in section 13.3 of Stevens
@@ -153,7 +123,7 @@
         args <- getArgs
         process daemon' args
     where
-      program' daemon = withSyslog (SyslogConfig (ByteString.pack $ fromJust $ 
name daemon) (syslogOptions daemon) DAEMON NoMask) $ \_ ->
+      program' daemon = withSyslog (fromJust (name daemon)) (syslogOptions 
daemon) Daemon $
                       do let log = syslog Notice
                          log "starting"
                          pidWrite daemon
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hdaemonize-0.5.3/hdaemonize.cabal 
new/hdaemonize-0.5.4/hdaemonize.cabal
--- old/hdaemonize-0.5.3/hdaemonize.cabal       2017-05-14 11:07:37.000000000 
+0200
+++ new/hdaemonize-0.5.4/hdaemonize.cabal       2017-05-29 00:46:01.000000000 
+0200
@@ -1,5 +1,5 @@
 Name:          hdaemonize
-Version:       0.5.3
+Version:       0.5.4
 Cabal-Version:  >= 1.6
 License:       BSD3
 License-file:   LICENSE
@@ -15,13 +15,13 @@
                command line handling, dropping privileges).
 Build-Type:    Simple
 Extra-Source-Files:    README.md
-Tested-With: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1
+Tested-With: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1, GHC == 
8.0.2
 
 Library
   Build-Depends:    base >= 4 && < 5
                   , bytestring
                   , unix
-                  , hsyslog == 4
+                  , hsyslog == 5.*
                   , extensible-exceptions
                   , filepath
                   , mtl


Reply via email to