[Pkg-haskell-maintainers] Bug#703417: haskell-hfuse: fails to build with GHC 7.6
Colin Watson
cjwatson at ubuntu.com
Tue Mar 19 11:15:44 UTC 2013
Package: haskell-hfuse
Version: 0.2.4.1-1
Severity: important
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch raring
The current haskell-hfuse in experimental fails to build against GHC 7.6
(tested in Ubuntu raring) as follows:
debian/hlibrary.setup build --builddir=dist-ghc
Building HFuse-0.2.4.1...
Preprocessing library HFuse-0.2.4.1...
[1 of 1] Compiling System.Fuse ( dist-ghc/build/System/Fuse.hs, dist-ghc/build/System/Fuse.o )
System/Fuse.hsc:73:40:
Module `System.IO.Error' does not export `catch'
make: *** [build-ghc-stamp] Error 1
This has been fixed upstream, although there hasn't been a new release
yet. Here's a patch.
* Backport upstream patch to fix compilation with GHC 7.6.
diff -Nru haskell-hfuse-0.2.4.1/debian/patches/ghc-7.6.patch haskell-hfuse-0.2.4.1/debian/patches/ghc-7.6.patch
--- haskell-hfuse-0.2.4.1/debian/patches/ghc-7.6.patch 1970-01-01 01:00:00.000000000 +0100
+++ haskell-hfuse-0.2.4.1/debian/patches/ghc-7.6.patch 2013-03-19 02:18:15.000000000 +0000
@@ -0,0 +1,73 @@
+Description: Fix compilation with GHC 7.6
+Author: Amit Aryeh Levy <amit at amitlevy.com>
+Origin: upstream, https://github.com/toothbrush/hfuse/commit/45650d8e743762004ce3949f11475b4eadbe384c.patch
+Last-Update: 2013-03-19
+
+Index: b/System/Fuse.hsc
+===================================================================
+--- 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 @@
+ 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 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 @@
+ -- 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 @@
+
+ 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
diff -Nru haskell-hfuse-0.2.4.1/debian/patches/series haskell-hfuse-0.2.4.1/debian/patches/series
--- haskell-hfuse-0.2.4.1/debian/patches/series 1970-01-01 01:00:00.000000000 +0100
+++ haskell-hfuse-0.2.4.1/debian/patches/series 2013-03-19 02:15:47.000000000 +0000
@@ -0,0 +1 @@
+ghc-7.6.patch
Thanks,
--
Colin Watson [cjwatson at ubuntu.com]
More information about the Pkg-haskell-maintainers
mailing list