Hello community, here is the log from the commit of package ghc-hslogger for openSUSE:Factory checked in at 2016-07-21 08:11:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-hslogger (Old) and /work/SRC/openSUSE:Factory/.ghc-hslogger.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-hslogger" Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-hslogger/ghc-hslogger.changes 2015-05-21 08:34:42.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-hslogger.new/ghc-hslogger.changes 2016-07-21 08:11:35.000000000 +0200 @@ -1,0 +2,6 @@ +Sun Jul 10 17:32:30 UTC 2016 - [email protected] + +- Update to version 1.2.10 revision 0 with cabal2obs. + This update obsoletes ghc-hslogger.rpmlintrc. + +------------------------------------------------------------------- Old: ---- ghc-hslogger.rpmlintrc hslogger-1.2.9.tar.gz New: ---- hslogger-1.2.10.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-hslogger.spec ++++++ --- /var/tmp/diff_new_pack.oHCDYw/_old 2016-07-21 08:11:36.000000000 +0200 +++ /var/tmp/diff_new_pack.oHCDYw/_new 2016-07-21 08:11:36.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package ghc-hslogger # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,21 +17,15 @@ %global pkg_name hslogger - -Name: ghc-hslogger -Version: 1.2.9 +Name: ghc-%{pkg_name} +Version: 1.2.10 Release: 0 Summary: Versatile logging framework License: BSD-3-Clause Group: System/Libraries - Url: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz -Source1: ghc-hslogger.rpmlintrc -BuildRoot: %{_tmppath}/%{name}-%{version}-build - BuildRequires: ghc-Cabal-devel -BuildRequires: ghc-rpm-macros # Begin cabal-rpm deps: BuildRequires: ghc-containers-devel BuildRequires: ghc-directory-devel @@ -39,8 +33,10 @@ BuildRequires: ghc-network-devel BuildRequires: ghc-old-locale-devel BuildRequires: ghc-process-devel +BuildRequires: ghc-rpm-macros BuildRequires: ghc-time-devel BuildRequires: ghc-unix-devel +BuildRoot: %{_tmppath}/%{name}-%{version}-build # End cabal-rpm deps %description @@ -52,28 +48,29 @@ messages based on the priority and source. hslogger also has a syslog handler built in. - %package devel Summary: Haskell %{pkg_name} library development files Group: Development/Libraries/Other +Requires: %{name} = %{version}-%{release} Requires: ghc-compiler = %{ghc_version} Requires(post): ghc-compiler = %{ghc_version} Requires(postun): ghc-compiler = %{ghc_version} -Requires: %{name} = %{version}-%{release} %description devel This package provides the Haskell %{pkg_name} library development files. - %prep %setup -q -n %{pkg_name}-%{version} + %build %ghc_lib_build + %install %ghc_lib_install + %post devel %ghc_pkg_recache ++++++ hslogger-1.2.9.tar.gz -> hslogger-1.2.10.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hslogger-1.2.9/hslogger.cabal new/hslogger-1.2.10/hslogger.cabal --- old/hslogger-1.2.9/hslogger.cabal 2015-05-16 04:45:18.000000000 +0200 +++ new/hslogger-1.2.10/hslogger.cabal 2016-05-29 15:42:33.000000000 +0200 @@ -1,5 +1,5 @@ Name: hslogger -Version: 1.2.9 +Version: 1.2.10 License: BSD3 Maintainer: John Goerzen <[email protected]> Author: John Goerzen @@ -27,7 +27,10 @@ testsrc/Tests.hs, testsrc/runtests.hs, winbuild.bat -Cabal-Version: >= 1.6 +Cabal-Version: >= 1.8 +source-repository head + type: git + location: [email protected]:jgoerzen/hslogger.git flag small_base description: choose the new smaller, split-up base package. @@ -53,13 +56,15 @@ -- GHC-Options: -O2 Hs-Source-Dirs: src -Executable runtests +test-suite runtests + type: exitcode-stdio-1.0 if flag(buildtests) Buildable: True else Buildable: False Main-Is: runtests.hs - HS-Source-Dirs: testsrc, . + HS-Source-Dirs: testsrc, ., src Extensions: ExistentialQuantification, OverlappingInstances, UndecidableInstances, CPP - + build-depends: base + , HUnit diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hslogger-1.2.9/src/System/Log/Handler/Growl.hs new/hslogger-1.2.10/src/System/Log/Handler/Growl.hs --- old/hslogger-1.2.9/src/System/Log/Handler/Growl.hs 2015-05-16 04:45:18.000000000 +0200 +++ new/hslogger-1.2.10/src/System/Log/Handler/Growl.hs 2016-05-29 15:42:33.000000000 +0200 @@ -39,12 +39,12 @@ getFormatter = formatter emit gh lr _ = let pkt = buildNotification gh nmGeneralMsg lr - in mapM_ (sendNote (skt gh) pkt) (targets gh) + in mapM_ (sendNote (skt gh) pkt) (targets gh) close gh = let pkt = buildNotification gh nmClosingMsg - (WARNING, "Connection closing.") + (WARNING, "Connection closing.") s = skt gh - in mapM_ (sendNote s pkt) (targets gh) >> sClose s + in mapM_ (sendNote s pkt) (targets gh) >> sClose s sendNote :: Socket -> String -> HostAddress -> IO Int sendNote s pkt ha = sendTo s pkt (SockAddrInet 9887 ha) @@ -94,7 +94,7 @@ foldl packIt [] appNotes, ['\x0' .. (chr (length appNotes - 1))] ] packIt a b = a ++ (emitLen16 b) ++ b - appNotes = [ nmGeneralMsg, nmClosingMsg ] + appNotes = [ nmGeneralMsg, nmClosingMsg ] emitLen8 v = [chr $ length v] {- | Adds a remote machine's address to the list of targets that will @@ -125,9 +125,9 @@ -- Creates a network packet containing a notification record. buildNotification :: GrowlHandler - -> String + -> String -> LogRecord - -> String + -> String buildNotification gh nm (p, msg) = concat fields where fields = [ ['\x1', '\x5'], emit16 (toFlags p), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hslogger-1.2.9/src/System/Log/Handler/Syslog.hs new/hslogger-1.2.10/src/System/Log/Handler/Syslog.hs --- old/hslogger-1.2.9/src/System/Log/Handler/Syslog.hs 2015-05-16 04:45:18.000000000 +0200 +++ new/hslogger-1.2.10/src/System/Log/Handler/Syslog.hs 2016-05-29 15:42:33.000000000 +0200 @@ -29,6 +29,7 @@ -} module System.Log.Handler.Syslog( + SyslogHandler, -- No constructors. -- * Handler Initialization openlog, -- * Advanced handler initialization @@ -247,7 +248,7 @@ getLevel sh = priority sh setFormatter sh f = sh{formatter = f} getFormatter sh = formatter sh - emit sh (_, msg) _ = do + emit sh (prio, msg) _ = do when (elem PERROR (options sh)) (hPutStrLn stderr msg) pidPart <- getPidPart void $ sendstr (toSyslogFormat msg pidPart) @@ -261,7 +262,7 @@ sendstr (genericDrop sent omsg) toSyslogFormat msg pidPart = "<" ++ code ++ ">" ++ identity' ++ pidPart ++ ": " ++ msg ++ "\0" - code = show (makeCode (facility sh) (priority sh)) + code = show $ makeCode (facility sh) prio identity' = identity sh getPidPart = if elem PID (options sh) then getPid >>= \pid -> return ("[" ++ pid ++ "]") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hslogger-1.2.9/testsrc/Tests.hs new/hslogger-1.2.10/testsrc/Tests.hs --- old/hslogger-1.2.9/testsrc/Tests.hs 2015-05-16 04:45:18.000000000 +0200 +++ new/hslogger-1.2.10/testsrc/Tests.hs 2016-05-29 15:42:33.000000000 +0200 @@ -1,14 +1,22 @@ {- arch-tag: Tests main file Copyright (C) 2004 John Goerzen <[email protected]> License: BSD3 - -} - module Tests(tests) where + import Test.HUnit -test1 = TestCase ("x" @=? "x") +import System.Log -tests = TestList [TestLabel "test1" test1] +tests = TestList [TestLabel "priority levels" priorityLevels] +priorityLevels :: Test +priorityLevels = TestList [ + TestCase ( DEBUG <= DEBUG @=? True), + TestCase ( DEBUG <= INFO @=? True), + TestCase ( INFO <= WARNING @=? True), + TestCase ( WARNING <= ERROR @=? True), + TestCase ( INFO <= ERROR @=? True), + TestCase ( ERROR > INFO @=? True) + ]
