libfuse3 0.1.0.0 → 0.1.1.0
raw patch · 5 files changed
+31/−8 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +5/−0
- README.md +16/−2
- configure.ac +1/−1
- libfuse3.cabal +1/−1
- src/System/LibFuse3/Internal.hsc +8/−4
CHANGELOG.md view
@@ -1,5 +1,10 @@ # Revision history for libfuse3 +## 0.1.1.0 -- 2020-08-29++* Improve the situation with signals+ * Now possible to unmount the filesystem with signals, but have to be sent twice.+ ## 0.1.0.0 -- 2020-08-27 * First version. Released on an unsuspecting world.
README.md view
@@ -7,6 +7,18 @@ - Executables using `libfuse3` should be compiled with the threaded runtime (`-threaded`). - Developed and tested on Linux only. Not tested on other UNIXes such as BSD and MacOS because I don't own them / machines to run them on. +## System dependencies++This package depends on the C library [libfuse][libfuse] and `pkg-config`. Please install them with your system package manager before building this package. For example, on Ubuntu:++```sh+sudo apt-get update && sudo apt-get install libfuse3-dev pkg-config+```++**NOTE:** `libfuse3-dev` is not available until Ubuntu-20.04 (a.k.a. "focal").++**NOTE2:** Not to be confused with `libfuse-dev` (whose version is 2.x). It can coexist with `libfuse3-dev`, but it is incompatible with this package.+ ## Building from HEAD This packages uses the `./configure` script, but it is not checked into the git repository. To build the source checked out from git, you must generate it from `configure.ac` before invoking any of the `cabal` commands:@@ -30,13 +42,15 @@ ## Known issues and limitations -- Can't stop the process and unmount with signals. You have to use `fusermount -u` to unmount.+- A signal needs to be sent twice to stop the process and unmount the filesystem.+ - This means you have to run `kill -2 <pid>` twice or hit `Ctrl-C` twice (if running in foreground).+ - On the other hand, `fusermount -u` can unmount the filesystem on the first attempt. - Not all Haskell-friendly bindings to the FUSE operations are implemented yet, including but not limited to: - `struct fuse_conn_info`. The availability of filesystem capabilities such as `FUSE_CAP_HANDLE_KILLPRIV` can't be checked. - Setting the fields of `struct fuse_file_info` from the certain fuse operations. - Look for the `TODO` comments in the source tree for more specific topics. -If you are able to implement any of these, that would be very appreciated! Please open a PR to contribute.+If you are able to fix/implement any of these, that would be very appreciated! Please open a PR to contribute. ## Related works
configure.ac view
@@ -1,4 +1,4 @@-AC_INIT([Haskell libfuse3 package], [0.1.0.0])+AC_INIT([Haskell libfuse3 package], [0.1.1.0]) # Safety check: Ensure that we are in the correct source directory. AC_CONFIG_SRCDIR([libfuse3.cabal])
libfuse3.cabal view
@@ -3,7 +3,7 @@ -- For further documentation, see http://haskell.org/cabal/users-guide/ name: libfuse3-version: 0.1.0.0+version: 0.1.1.0 synopsis: A Haskell binding for libfuse-3.x description: Bindings for libfuse, the FUSE userspace reference implementation, of version 3.x. Compatible with Linux. -- bug-reports:
src/System/LibFuse3/Internal.hsc view
@@ -887,7 +887,7 @@ withSignalHandlers exitHandler = bracket_ setHandlers resetHandlers where setHandlers = do- let sigHandler = Signals.CatchOnce exitHandler+ let sigHandler = Signals.Catch exitHandler void $ Signals.installHandler Signals.sigINT sigHandler Nothing void $ Signals.installHandler Signals.sigHUP sigHandler Nothing void $ Signals.installHandler Signals.sigTERM sigHandler Nothing@@ -923,9 +923,13 @@ -- here, we're finally inside the daemon process, we can run the main loop procMain pFuse cloneFd = do session <- C.fuse_get_session pFuse- -- TODO calling fuse_session_exit doesn't stop fuse_loop_mt_31!- -- @fusermount -u@ successfully kills the process but SIGINT doesn't- -- TODO try non-multithreaded loop+ -- Due to some interaction between GHC runtime, calling fuse_session_exit once doesn't+ -- stop fuse_loop_mt_31. On receiving a second signal the loop exits and the filesystem+ -- is unmounted.+ -- Adding the RTS option @--install-signal-handlers=no@ does not fix the issue.+ --+ -- On the other hand, @fusermount -u@ successfully unmounts the filesystem on the first+ -- attempt. withSignalHandlers (C.fuse_session_exit session) $ do retVal <- C.fuse_loop_mt_31 pFuse cloneFd if retVal == 0