[Pkg-haskell-commits] darcs: haskell-hfuse: Fix "fails to build with GHC 7.6"

takaki at asis.media-as.org takaki at asis.media-as.org
Fri Mar 22 02:05:48 UTC 2013


Fri Mar 22 02:00:16 UTC 2013  takaki at asis.media-as.org
  * Fix "fails to build with GHC 7.6"
  Ignore-this: c7b48df2a44795bd0d932d6836d5aba

    M ./changelog -3 +8
    A ./patches/
    A ./patches/ghc-7.6.patch
    A ./patches/series

Fri Mar 22 02:00:16 UTC 2013  takaki at asis.media-as.org
  * Fix "fails to build with GHC 7.6"
  Ignore-this: c7b48df2a44795bd0d932d6836d5aba
diff -rN -u old-haskell-hfuse//changelog new-haskell-hfuse//changelog
--- old-haskell-hfuse//changelog	2013-03-22 02:05:48.175020049 +0000
+++ new-haskell-hfuse//changelog	2013-03-22 02:05:48.179019817 +0000
@@ -1,9 +1,14 @@
-haskell-hfuse (0.2.4.1-3) UNRELEASED; urgency=low
+haskell-hfuse (0.2.4.1-3) experimental; urgency=low
 
-  * Depend on haskell-devscripts 0.8.13 to ensure this packages is built
+  [ Joachim Breitner ]
+  * Depend on haskell-devscripts 0.8.13 to ensure these packages are built
     against experimental
 
- -- Joachim Breitner <nomeata at debian.org>  Mon, 15 Oct 2012 16:17:32 +0200
+  [ TANIGUCHI Takaki ]
+  * debian/patches/ghc-7.6.patch: Fix "fails to build with GHC 7.6"
+    (Closes: #703417)
+
+ -- TANIGUCHI Takaki <takaki at debian.org>  Fri, 22 Mar 2013 10:56:29 +0900
 
 haskell-hfuse (0.2.4.1-2) experimental; urgency=low
 
diff -rN -u old-haskell-hfuse//patches/ghc-7.6.patch new-haskell-hfuse//patches/ghc-7.6.patch
--- old-haskell-hfuse//patches/ghc-7.6.patch	1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-hfuse//patches/ghc-7.6.patch	2013-03-22 02:05:48.183019741 +0000
@@ -0,0 +1,80 @@
+From 45650d8e743762004ce3949f11475b4eadbe384c Mon Sep 17 00:00:00 2001
+From: Amit Aryeh Levy <amit at amitlevy.com>
+Date: Mon, 19 Nov 2012 13:14:06 -0800
+Subject: [PATCH] Fixed compilation bugs for GHC 7.6
+
+---
+ System/Fuse.hsc | 29 +++++++++++++++--------------
+ 1 file changed, 15 insertions(+), 14 deletions(-)
+
+diff --git a/System/Fuse.hsc b/System/Fuse.hsc
+index f7347fd..1169e05 100644
+--- a/System/Fuse.hsc
++++ b/System/Fuse.hsc
+@@ -20,7 +20,7 @@
+ -- option).
+ --
+ -----------------------------------------------------------------------------
+-{-# LANGUAGE FlexibleContexts #-}
++{-# LANGUAGE FlexibleContexts, RankNTypes #-}
+ module System.Fuse
+     ( -- * Using FUSE
+ 
+@@ -52,7 +52,7 @@ module System.Fuse
+ import Prelude hiding ( Read )
+ 
+ import Control.Monad
+-import Control.Exception as E(Exception, handle, finally, SomeException)
++import Control.Exception as E(catch, Exception, IOException, handle, finally, SomeException)
+ import qualified Data.ByteString.Char8    as B
+ import qualified Data.ByteString.Internal as B
+ import qualified Data.ByteString.Unsafe   as B
+@@ -70,7 +70,7 @@ import System.Posix.IO ( OpenMode(..), OpenFileFlags(..) )
+ import qualified System.Posix.Signals as Signals
+ import GHC.IO.Handle(hDuplicateTo)
+ import System.Exit
+-import qualified System.IO.Error as IO(catch,ioeGetErrorString)
++import qualified System.IO.Error as IO(ioeGetErrorString)
+ 
+ -- TODO: FileMode -> Permissions
+ -- TODO: Arguments !
+@@ -757,16 +757,17 @@ fuseParseCommandLine pArgs =
+ -- Mimic's daemon()s use of _exit() instead of exit(); we depend on this in fuseMainReal,
+ -- because otherwise we'll unmount the filesystem when the foreground process exits.
+ daemon f = forkProcess d >> exitImmediately ExitSuccess
+-  where d = IO.catch (do createSession
+-                         changeWorkingDirectory "/"
+-                         -- need to open /dev/null twice because hDuplicateTo can't dup a ReadWriteMode to a ReadMode handle
+-                         withFile "/dev/null" WriteMode (\devNullOut ->
+-                           do hDuplicateTo devNullOut stdout
+-                              hDuplicateTo devNullOut stderr)
+-                         withFile "/dev/null" ReadMode (\devNullIn -> hDuplicateTo devNullIn stdin)
+-                         f
+-                         exitWith ExitSuccess)
+-                     (const exitFailure)
++  where d = E.catch (do 
++                        createSession
++                        changeWorkingDirectory "/"
++                        -- need to open /dev/null twice because hDuplicateTo can't dup a ReadWriteMode to a ReadMode handle
++                        withFile "/dev/null" WriteMode (\devNullOut ->
++                          do hDuplicateTo devNullOut stdout
++                             hDuplicateTo devNullOut stderr)
++                        withFile "/dev/null" ReadMode (\devNullIn -> hDuplicateTo devNullIn stdin)
++                        f
++                        exitWith ExitSuccess)
++                     (\(_ :: IOException) -> exitFailure)
+ 
+ -- Installs signal handlers for the duration of the main loop.
+ withSignalHandlers exitHandler f =
+@@ -843,7 +844,7 @@ fuseMain ops handler = do
+ 
+ fuseRun :: String -> [String] -> Exception e => FuseOperations fh -> (e -> IO Errno) -> IO ()
+ fuseRun prog args ops handler =
+-    IO.catch
++    E.catch
+        (withFuseArgs prog args (\pArgs ->
+          do cmd <- fuseParseCommandLine pArgs
+             case cmd of
+-- 
+1.8.1.5
+
diff -rN -u old-haskell-hfuse//patches/series new-haskell-hfuse//patches/series
--- old-haskell-hfuse//patches/series	1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-hfuse//patches/series	2013-03-22 02:05:48.187019689 +0000
@@ -0,0 +1 @@
+ghc-7.6.patch





More information about the Pkg-haskell-commits mailing list