redneb / hs-btrfs Goto Github PK
View Code? Open in Web Editor NEWHaskell bindings to the btrfs API
Home Page: https://hackage.haskell.org/package/btrfs
License: BSD 3-Clause "New" or "Revised" License
Haskell bindings to the btrfs API
Home Page: https://hackage.haskell.org/package/btrfs
License: BSD 3-Clause "New" or "Revised" License
Configuring btrfs-0.1.2.1...
> /tmp/stackage-build12/btrfs-0.1.2.1$ runghc -clear-package-db -global-package-db -package-db=/var/stackage/work/builds/nightly/pkgdb Setup build
Building btrfs-0.1.2.1...
Preprocessing library btrfs-0.1.2.1...
Capabilities.hsc:9:28: fatal error: sys/capability.h: No such file or directory
compilation terminated.
compiling dist/build/System/Linux/Capabilities_hsc_make.c failed (exit code 1)
command was: /usr/bin/gcc -c dist/build/System/Linux/Capabilities_hsc_make.c -o dist/build/System/Linux/Capabilities_hsc_make.o -fno-stack-protector -fno-stack-protector -D__GLASGOW_HASKELL__=800 -Dlinux_BUILD_OS=1 -Dx86_64_BUILD_ARCH=1 -Dlinux_HOST_OS=1 -Dx86_64_HOST_ARCH=1 -Iinclude -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/opt/ghc/8.0.1/lib/ghc-8.0.1/unix-2.7.2.0/include -I/opt/ghc/8.0.1/lib/ghc-8.0.1/time-1.6.0.1/include -I/opt/ghc/8.0.1/lib/ghc-8.0.1/bytestring-0.10.8.1/include -I/opt/ghc/8.0.1/lib/ghc-8.0.1/base-4.9.0.0/include -I/opt/ghc/8.0.1/lib/ghc-8.0.1/integer-gmp-1.0.0.1/include -I/opt/ghc/8.0.1/lib/ghc-8.0.1/include -I/opt/ghc/8.0.1/lib/ghc-8.0.1/include/
This is not entirely related with this package by maybe you have an idea of what is going on ... I need to know if a file is a symlink, since I don't want to call cloneRangeIfSame on a symlink, as that is useless and the ioctl fails. I was trying to use the functions in System.Posix.Files but they seem to be incapable of detecting simlinks in a read only snapshot. Do you have any idea what could cause this ? haskell/unix#79
System.Linux.Btrfs.ByteString
was created as an alternative to System.Linux.Btrfs
, which uses FilePath
to represent file paths. The problem with FilePath
is that it requires for file paths to be encoded/decoded according to the current locale. This could potentially cause issues when a raw path contains byte sequences that are not valid according to the encoding used.
Fortunately, GHC provides a good solution to this issue via its file system encoding, which ensures that in a decode/encode cycle RawFilePath -> FilePath -> RawFilePath
there will be no loss of information.
Therefore, I will drop System.Linux.Btrfs.ByteString
from this library, unless I hear a good argument in favor of keeping it.
When I try to run cloneRangeIfSame
in files in read only subvolumes created with btrfs fi sub snapshot -r
I get openFd: permission denied (Read-only file system) even
when running the executable as root. Is it possible to make cloneRangeIfSame
work in read-only snapshots ? In my tests the error comes up on the file in the file list of identical files, and looking at the code I see
withFd dstPath WriteOnly $ \fd
when opening the destination files. Perhaps this should also be ReadOnly
?
Hey,
I just stumbled over the following:
*Btrbkp> fromString ""
Just (fromString "*** Exception: Prelude.read: no parse
where I would expect to get a Nothing
back. Do you consider fixing things like these in your library?
What do you think of switching to the uuid package? (http://hackage.haskell.org/package/uuid)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.