Giter VIP home page Giter VIP logo

btfs's Introduction

BTFS (bittorrent filesystem)

What is this?

With BTFS, you can mount any .torrent file or magnet link and then use it as any read-only directory in your file tree. The contents of the files will be downloaded on-demand as they are read by applications. Tools like ls, cat and cp works as expected. Applications like vlc and mplayer can also work without changes.

Example usage

$ mkdir mnt
$ btfs video.torrent mnt
$ cd mnt
$ vlc video.mp4

To unmount and shutdown:

$ fusermount -u mnt

Installing on Debian/Ubuntu

# apt-get install btfs

Installing on Arch Linux

# pacman -S btfs

Installing on Gentoo

# emerge -av btfs

Installing on Fedora

# dnf install fuse-btfs

Installing on Fedora OSTree

$ rpm-ostree install fuse-btfs

OpenSUSE

# zypper install btfs

Installing on macOS

Use brew to install on macOS.

$ brew install btfs

Dependencies (on Linux)

  • fuse ("fuse" in Ubuntu 16.04)
  • libtorrent ("libtorrent-rasterbar8" in Ubuntu 16.04)
  • libcurl ("libcurl3" in Ubuntu 16.04)

Building from git on a recent Debian/Ubuntu

$ sudo apt-get install autoconf automake libfuse-dev libtorrent-rasterbar-dev libcurl4-openssl-dev g++
$ git clone https://github.com/johang/btfs.git btfs
$ cd btfs
$ autoreconf -i
$ ./configure
$ make

And optionally, if you want to install it:

$ make install

Building on macOS

Use brew to get the dependencies.

$ brew install Caskroom/cask/osxfuse libtorrent-rasterbar autoconf automake pkg-config
$ git clone https://github.com/johang/btfs.git btfs
$ cd btfs
$ autoreconf -i
$ ./configure
$ make

And optionally, if you want to install it:

$ make install

btfs's People

Contributors

a1346054 avatar aa3eethi avatar boredsquirrel avatar cprecioso avatar drdub avatar dthadi3 avatar felixonmars avatar greenboxal avatar hilariousperson avatar johang avatar nesro avatar pataquets avatar plasmapower avatar qarkai avatar rnhmjoj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

btfs's Issues

Encryption?

Hey, does this support encryption? I noticed that that was missing from the man page and I usually use it when I'm using other clients. Ta.

Ability for autofs mount

Hello,

I currently cannot get it to work with fstab/autofs. Is there something you need to implement for this?

btplay needs to escape spaces or quote path names

When you open files using btplay, on line 84 or the file name contains space is it (ie the name of the file being torrented) then the player will be unable to find the file(s).

maybe you could use: media = map(lambda x: '"' + x + '"', media)

clarify if this shares files

it is unclear from the description if this tool actually starts sharing files once they are downloaded locally. it would be great to have more information about how this is implemented, basically - which library is running in the back, does it stream files and generally how it works and so on.

macOS: hung during umount, crashes on mount after kill -9

hi, I installed btfs from homebrew, this is the version:

$ btfs -v
btfs version: 2.18
libtorrent version: 1.2.0.0
OSXFUSE 3.8.3
FUSE library version: 2.9.7
fuse: no mount point

I have mounted and successfully downloaded a file from a torrent and then, when I did umount <dir>, everything hung up: btfs, umount process, all processes trying to read that folder and its parent. I had to kill -9 it. Since i was running it with -d switch, here's its log on exit:

listxattr / 0
   unique: 5, success, outsize: 24
unique: 6, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 49399
getattr /
   unique: 6, success, outsize: 136
unique: 2, opcode: STATFS (17), nodeid: 1, insize: 40, pid: 49399
statfs /
   unique: 2, success, outsize: 96
unique: 7, opcode: FORGET (2), nodeid: 3, insize: 48, pid: 49399
FORGET 3/1
DELETE: 3
unique: 3, opcode: FORGET (2), nodeid: 2, insize: 48, pid: 49399
unique: 4, opcode: DESTROY (38), nodeid: 1, insize: 40, pid: 49399
FORGET 2/1
DELETE: 2
unique: 5, opcode: INTERRUPT (36), nodeid: 0, insize: 48, pid: 49399
INTERRUPT: 4
umount: /Users/constb/Downloads/555: not currently mounted
Killed: 9

Now the problem is I cannot mount any torrent, here's what's happening:

$ btfs -d example.torrent 555
FUSE library version: 2.9.7
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
unique: 2, opcode: INIT (26), nodeid: 0, insize: 56, pid: 50397
INIT: 7.19
flags=0xf8000008
max_readahead=0x00100000
   INIT: 7.19
   flags=0x00000010
   max_readahead=0x00100000
   max_write=0x02000000
   max_background=0
   congestion_threshold=0
   unique: 2, success, outsize: 40
unique: 3, opcode: STATFS (17), nodeid: 1, insize: 40, pid: 0
statfs /
unique: 2, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 87
getattr /
   unique: 2, success, outsize: 136
libc++abi.dylib: terminating with uncaught exception of type boost::system::system_error: invalid torrent handle used
unique: 4, opcode: STATFS (17), nodeid: 1, insize: 40, pid: 87
statfs /
Abort trap: 6

I tried deleting its temp folder which is apparently ~/btfs and this changed nothing…

Windows support

Do you think that it might be possible to get btfs to work under windows? (using something like dokan for instance)

If yes, what do you estimate the work to do in order to adapt the current code?

Thanks!

2.14 build failure on macOS

==> autoreconf --force --install
configure.ac:20: installing './compile'
configure.ac:5: installing './install-sh'
configure.ac:5: installing './missing'
src/Makefile.am: installing './depcomp'
==> ./configure --disable-debug --disable-dependency-tracking --disable-silent-rules --prefix=/usr/local/Cellar/btfs/2.14
configure: WARNING: unrecognized options: --disable-debug
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether clang++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of clang++... none
checking for pkg-config... /usr/local/opt/pkg-config/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for fuse >= 2.7.3... yes
checking for libtorrent-rasterbar >= 1.0.0... yes
checking for libcurl >= 7.22.0... yes
checking for gcc... clang
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking whether clang understands -c and -o together... yes
checking dependency style of clang... none
checking how to run the C preprocessor... clang -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for off_t... yes
checking for size_t... yes
checking for memset... yes
checking for mkdir... yes
checking for realpath... yes
checking for strdup... yes
checking for pthread_setname_np in -lpthread... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating man/Makefile
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating scripts/Makefile
config.status: executing depfiles commands
configure: WARNING: unrecognized options: --disable-debug
==> make install
Making install in src
clang++ -DPACKAGE_NAME=\"btfs\" -DPACKAGE_TARNAME=\"btfs\" -DPACKAGE_VERSION=\"2.14\" -DPACKAGE_STRING=\"btfs\ 2.14\" -DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"https://github.com/johang/btfs\" -DPACKAGE=\"btfs\" -DVERSION=\"2.14\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MEMSET=1 -DHAVE_MKDIR=1 -DHAVE_REALPATH=1 -DHAVE_STRDUP=1 -DHAVE_LIBPTHREAD=1 -I.  -Wall -Wextra -Wconversion -Wsign-compare -Wsign-conversion -Wno-unused-parameter -D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE -I/usr/local/include/osxfuse/fuse -DTORRENT_DISABLE_LOGGING -DTORRENT_USE_OPENSSL -DBOOST_ASIO_HASH_MAP_BUCKETS=1021 -DBOOST_EXCEPTION_DISABLE -DBOOST_ASIO_ENABLE_CANCELIO -DTORRENT_LINKING_SHARED -I/usr/local/Cellar/libtorrent-rasterbar/1.1.4/include -I/usr/local/Cellar/libtorrent-rasterbar/1.1.4/include/libtorrent   -std=c++11 -g -O2 -c -o btfs-btfs.o `test -f 'btfs.cc' || echo './'`btfs.cc
clang++ -std=c++11 -g -O2   -o btfs btfs-btfs.o -L/usr/local/lib -losxfuse -L/usr/local/Cellar/libtorrent-rasterbar/1.1.4/lib -ltorrent-rasterbar -lboost_system -lcurl -lpthread 
Undefined symbols for architecture x86_64:
  "libtorrent::session_handle::wait_for_alert(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> >)", referenced from:
      alert_queue_loop(void*) in btfs-btfs.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [btfs] Error 1
make: *** [install-recursive] Error 1
/usr/local/Homebrew/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/python.rb
/usr/local/Homebrew/Library/Homebrew/debrew.rb:11:in `raise'
BuildError: Failed executing: make install
1. raise
2. ignore
3. backtrace
4. irb
5. shell
Choose an action: 

suggestion

line 285 btfs.cc , std::auto_ptrlibtorrent::alert a = session->pop_alert();

auto_ptr is deprecated , use unique_ptr instead or shared_ptr

just a suggestion.

RAM consumption

Is there any way to reduce memory usage? I'm trying to port btfs for embedded devices and found that 256MB RAM is not enough to running it.

Ready to test any thoughts on mipsel/x86/arm hardware.

SHA-256 mismatch for v2.18.tar.gz

Homebrew users currently cannot build btfs from source due to a SHA-256 checksum mismatch for v2.18.tar.gz (https://github.com/johang/btfs/archive/v2.18.tar.gz)

2017-11-26 20:24:59 -0500 the SHA-256 was
faccec8715ed2dd2193ae4e026c1735ff354bba635b9bb60d2642e2895aa5674

Now it's changed to
bb9679045540554232eff303fc4f615d28eb4023461eae3f65f08f2427ec9ef2

Do you have any idea what happened here? To rule out malicious circumstances, we'll need to know why the file has changed before the checksum can be updated in Homebrew. Thanks!

lower performance than P2P client

I found that download performance through btfs in ubuntu is lower than BT client, such like uTorrent.
The BTFS is installed by command:
apt-get install btfs

I execute command like:
btfs /mnt
rsync -av /mnt/* /root/Desktop/testfolder

It there anything need to set to enhance it?

Files added through CLI not showing in Web UI

When I add a file using the following command:

btfs add file1.txt

I cannot see the file when I'm looking at this link http://127.0.0.1:5001/btfs/webui

However, If I load a file or create a folder from the web ui, then I run this command in the terminal

btfs files ls

I can properly see the files in the CLI

Is there a way to fix this or am I missing something?

Kindly let me know your thoughts

Apt does to refer to latest version

$ sudo apt search btfs
Sorting... Done
Full Text Search... Done
btfs/bionic,bionic 2.18-1build1 amd64
  access torrent files as a filesystem

fuse: missing mountpoint parameter

I have built btfs for LibreELEC.
btfs magnet mountpoint returns fuse: missing mountpoint parameter and nothing happens.
What I am missing?

Log location

Can we specify the location of the log file in /etc/default/btfs?

How to remove log messages

Hi

I want to use btfs on a Live distribution (Debian) : all is on memoy.

Currently, i read files stored on a nfs server.
Now, i want to use a bittorrent server.

But, btfs does very verbose logs : with 5 minutes, all the memory is full

With the help of the doc of libtorrent, i tried to disable the logs : in the file btfs.cc, i replaced

                libtorrent::alert::tracker_notification |
                libtorrent::alert::stats_notification |  
                libtorrent::alert::storage_notification |
                libtorrent::alert::progress_notification |
                libtorrent::alert::status_notification | 
                libtorrent::alert::error_notification | 
                libtorrent::alert::dht_notification |
                libtorrent::alert::peer_notification;

by
0;

The program builds and runs. But, the files are not shared.

How can i remove these very verbose logs ?

Thanks.

customizing target save path

Is it true that the directory $HOME/btfs is always created? I can't find where the target is defined in main() before calling populate_target(). How do I prevent this directory to be created? I'd like it to be a sibling of the mount point, which for me is in /tmp.

btfs/src/btfs.cc

Lines 763 to 773 in 2e19c6c

populate_target(std::string& target, char *arg) {
std::string templ;
if (arg) {
templ += arg;
} else if (getenv("HOME")) {
templ += getenv("HOME");
templ += "/btfs";
} else {
templ += "/tmp/btfs";
}

load in kernel

Is possible to do a version to compile and load in kernel?
I have a project where I can download the iso from http and ftp server working god, in boot, using slax and ipxe, but will be bether use a torrent for performance and etc.

Hangs system and gives error message

Installed on macOS 10.15 with Homebrew, Fuse and necessary Preferences settings.

$ btfs 'magnet:<snip>' foo
$ ls

(Hangs a full minute before finally performing the ls. Does not respond to SIGINT. No other shells can list the directory during this time either. Actually, the whole OS is partially unresponsive.) Then:

$ ls foo
ls: foo: Device not configured

The software thus appears unusable as-is. Please advice.

$ btfs --version
btfs version: 2.21
libtorrent version: 1.2.6.0
OSXFUSE 3.11.0
FUSE library version: 2.9.7
fuse: no mount point

Segmentation fault

Watching and shuffling through a video file produces a segmentation fault.

Initial command btfs -d torrents/av.torrent mnt2


handle_piece_finished_alert: 1398
handle_piece_finished_alert: 1403
handle_piece_finished_alert: 1401
handle_piece_finished_alert: 1404
handle_piece_finished_alert: 1389
unique: 8, opcode: READ (15), nodeid: 4, insize: 80, pid: 5015
read[0] 65536 bytes from 338395136 flags: 0x0
handle_read_piece_alert: piece 1290 size 0
Segmentation fault: 11

OSX Sierra

btfs --version
btfs version: 2.15
libtorrent version: 1.1.4.0
OSXFUSE 3.6.3
FUSE library version: 2.9.7
fuse: no mount point

compile error in raspbian

I got this message when I try to compile it.

pkg -l| grep torrent
ii libtorrent-dev:armhf 0.13.7-1 armhf C++ BitTorrent library by Rakshasa (development files)
ii libtorrent-rasterbar-dev 1.1.5-1 armhf Development files for libtorrent-rasterbar
ii libtorrent-rasterbar9 1.1.5-1 armhf C++ bittorrent library by Rasterbar Software
ii libtorrent20:armhf 0.13.7-1 armhf C++ BitTorrent library by Rakshasa

make[1]: Entering directory '/usr/local/src/btfs/src'
g++ -std=c++11 -Wall -Wextra -Wconversion -Wsign-compare -Wsign-conversion -Wno-unused-parameter -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -DTORRENT_USE_OPENSSL -DBOOST_ASIO_HASH_MAP_BUCKETS=1021 -DBOOST_EXCEPTION_DISABLE -DBOOST_ASIO_ENABLE_CANCELIO -DTORRENT_LINKING_SHARED -I/usr/include/libtorrent -g -O2 -o btfs btfs-btfs.o -lfuse -pthread -ltorrent-rasterbar -lboost_system -lcurl -lpthread
/usr/bin/ld: btfs-btfs.o: in function btfs_init(fuse_conn_info*)': /usr/local/src/btfs/src/btfs.cc:635: undefined reference to libtorrent::settings_pack::set_str(int, std::string)'
/usr/bin/ld: /usr/local/src/btfs/src/btfs.cc:639: undefined reference to libtorrent::settings_pack::set_str(int, std::string)' /usr/bin/ld: btfs-btfs.o: in function setup()':
/usr/local/src/btfs/src/btfs.cc:213: undefined reference to libtorrent::file_storage::file_path(int, std::string const&) const' /usr/bin/ld: /usr/local/src/btfs/src/btfs.cc:240: undefined reference to libtorrent::file_storage::file_path(int, std::string const&) const'
/usr/bin/ld: btfs-btfs.o: in function handle_read_piece_alert': /usr/local/src/btfs/src/btfs.cc:253: undefined reference to libtorrent::read_piece_alert::message() const'
/usr/bin/ld: btfs-btfs.o: in function boost::detail::sp_if_not_array<libtorrent::torrent_info>::type boost::make_shared<libtorrent::torrent_info, char*&, boost::reference_wrapper<boost::system::error_code> const>(char*&, boost::reference_wrapper<boost::system::error_code> const&&)': /usr/include/boost/smart_ptr/make_shared_object.hpp:254: undefined reference to libtorrent::torrent_info::torrent_info(std::string const&, boost::system::error_code&, int)'
/usr/bin/ld: btfs-btfs.o: in function populate_metadata': /usr/local/src/btfs/src/btfs.cc:868: undefined reference to libtorrent::parse_magnet_uri(std::string const&, libtorrent::add_torrent_params&, boost::system::error_code&)'
collect2: error: ld returned 1 exit status

How it downloads - documentation request

Hello,
would you please describe in docs or github readme how the torrent files are downloaded on read() operation?

For example, if I mount a torrent file with a movie, and then I use mplayer to play the movie, is it going to be downloaded from beginning to the end? Or is it downloaded on background as like any other torrent client would download it, meaning parts of the beginning of the file will be missing long time after the download starts, so the file will be basically unplayable until it is completely downloaded?

Is the file downloaded on background? Or is the data downloaded only on demand upon read() operation?

I tried to mount a torrent with some movie, and it appears to be downloading all the time even if no files are read from the filesystem. A brief description how it operates would be really useful. Thank you!

Torrent being downloaded completely soon after mounted

Well, I'm sorry if this is an invalid bug and this is the default behavior of btfs, but the description in the readme says that the files are downloaded as needed, not all at once.

The contents of the files will be downloaded on-demand as they are read by applications

I am using version 2.24 from the archlinux repository, with kernel 5.11.11 and kde plasma 5.21.3

Streaming freezes when disk is full

What should happen
When streaming a large torrent, streaming should continue regardless of available disk space.

What happens
When the backing hard disk gets full, streaming freezes.

How to Reproduce
Try streaming a large torrent from a constrained storage, such as a LiveCD / LiveUSB.

get stuck at processing files within the mounted torrent around the size of 2,147 GB

OS: 14.03 LTS 64bit

I am using btfs to mount torrents in order to copy some containing files into my host fs.

I tested copying with shell (cp) or GUI (file explorer). The shell doesnt return, the progress dialog can be closed but unmounting does not work: fusermount -u results in failed to unmount, Device or resource budy. I have to kill the process first. HDD space is definitely not the issue here.
I tried different torrents. I coundnt find any --verbose flag to get you with more info, sorry.

btfs 2.11 crash

Since version 2.11 btfs is crashing immediately after mounting a torrent.

$ mkdir ~/torrent
$ btfs magnet:?xt=urn:btih:84b1be796023afa4381d8a9f7447fc440b0eb0d5 ~/torrent
$ ls ~/torrent
ls: cannot access '/home/rnhmjoj/torrent': Transport endpoint is not connected

I have tried this on a couple of different systems and it's consistent. Is there a log or something to debug it?

ERROR Log

what can it mean?

BTFS is up-to-date.
2021-04-04T17:40:02.417+0200 ←[31mERROR←[0m storage/contracts get payout status batch error:rpc error: code = Canceled desc = context canceled
2021-04-05T12:31:19.134+0200 ←[31mERROR←[0m spin Failed to sync btt-tx: Get "https://api.trongrid.io/v1/accounts/TDCD9hDcHNWbGmwZAzKeczsyrqgduNRL4W/transactions?limit=200&only_to=true&order_by=block_timestamp,asc&min_block_timestamp=0": dial tcp: lookup api.trongrid.io: no such host
2021-04-12T02:04:38.080+0200 ←[31mERROR←[0m spin failed to send data to status server: context deadline exceeded
2021-04-12T02:04:38.080+0200 ←[31mERROR←[0m spin Failed to sync host stats: Failed to query stats from Hub service: context deadline exceeded

Always download same torrrent to same subdirectory

It might be nice if btfs would reuse the same directory for the same torrent instead of generating new directories with each mount (e.g. if the directory was <btfs data directory>/<torrent info hash>). It would be great if a mount could then reuse old data if --keep was specified. Not sure if that is possible.

It's probably time to make btplay python3

In Debian we're dropping python2 scripts for the bullseye release (planned only in around 2 years from now). btplay seems like it should run just fine in python3, perhaps it's time to make it the default from btfs upstream? If it's done upstream then we wouldn't have to carry a patch for this in Debian.

thanks for all your work!

magnet

I try to mount the link. So that's that.
btfs 'magnet:?xt=urn:btih:88928d3ca7f5d71e39037279c1ee787a80de6ea0' /mnt/btfs/
The /mnt/btfs/ folder it is empty.
As soon as I open the same magnet link in the qbittorrent, files appear in the folder too. Can it work without qbittorrent?

Doesn't build with libtorrent-rasterbar 1.1

g++ -DPACKAGE_NAME=\"btfs\" -DPACKAGE_TARNAME=\"btfs\" -DPACKAGE_VERSION=\"2.8\" -DPACKAGE_STRING=\"btfs\ 2.8\" -DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"https://github.com/johang/btfs\" -DPACKAGE=\"btfs\" -DVERSION=\"2.8\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MEMSET=1 -DHAVE_MKDIR=1 -DHAVE_REALPATH=1 -DHAVE_STRDUP=1 -I.  -Wall -Wextra -Wconversion -Wsign-compare -Wsign-conversion -Wno-unused-parameter -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -DTORRENT_DISABLE_LOGGING -DTORRENT_USE_OPENSSL -DBOOST_ASIO_HASH_MAP_BUCKETS=1021 -msse4.2 -DBOOST_EXCEPTION_DISABLE -DBOOST_ASIO_ENABLE_CANCELIO -DTORRENT_LINKING_SHARED -I/usr/include/libtorrent  -D_FORTIFY_SOURCE=2  -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -MT btfs-btfs.o -MD -MP -MF .deps/btfs-btfs.Tpo -c -o btfs-btfs.o `test -f 'btfs.cc' || echo './'`btfs.cc
btfs.cc: In constructor 'btfs::Read::Read(char*, int, off_t, size_t)':
btfs.cc:115:48: warning: 'libtorrent::file_entry libtorrent::torrent_info::file_at(int) const' is deprecated [-Wdeprecated-declarations]
  libtorrent::file_entry file = ti.file_at(index);
                                                ^
In file included from btfs.cc:32:0:
/usr/include/libtorrent/torrent_info.hpp:352:14: note: declared here
   file_entry file_at(int index) const { return m_files.at_deprecated(index); }
              ^
btfs.cc: In function 'void setup()':
btfs.cc:203:32: warning: 'libtorrent::file_entry libtorrent::torrent_info::file_at(int) const' is deprecated [-Wdeprecated-declarations]
   char *p = strdup(ti.file_at(i).path.c_str());
                                ^
In file included from btfs.cc:32:0:
/usr/include/libtorrent/torrent_info.hpp:352:14: note: declared here
   file_entry file_at(int index) const { return m_files.at_deprecated(index); }
              ^
btfs.cc:223:27: warning: 'libtorrent::file_entry libtorrent::torrent_info::file_at(int) const' is deprecated [-Wdeprecated-declarations]
   files["/" + ti.file_at(i).path] = i;
                           ^
In file included from btfs.cc:32:0:
/usr/include/libtorrent/torrent_info.hpp:352:14: note: declared here
   file_entry file_at(int index) const { return m_files.at_deprecated(index); }
              ^
btfs.cc: In function 'void* alert_queue_loop(void*)':
btfs.cc:354:30: warning: 'void libtorrent::session_handle::pop_alerts(std::deque<libtorrent::alert*>*)' is deprecated [-Wdeprecated-declarations]
   session->pop_alerts(&alerts);
                              ^
In file included from /usr/include/libtorrent/session.hpp:53:0,
                 from btfs.cc:33:
/usr/include/libtorrent/session_handle.hpp:916:8: note: declared here
   void pop_alerts(std::deque<alert*>* alerts);
        ^
btfs.cc: In function 'int btfs_getattr(const char*, stat*)':
btfs.cc:398:55: warning: 'libtorrent::file_entry libtorrent::torrent_info::file_at(int) const' is deprecated [-Wdeprecated-declarations]
   libtorrent::file_entry file = ti.file_at(files[path]);
                                                       ^
In file included from btfs.cc:32:0:
/usr/include/libtorrent/torrent_info.hpp:352:14: note: declared here
   file_entry file_at(int index) const { return m_files.at_deprecated(index); }
              ^
btfs.cc: In function 'void* btfs_init(fuse_conn_info*)':
btfs.cc:510:9: warning: 'libtorrent::session::session(const libtorrent::fingerprint&, std::pair<int, int>, const char*, int, int)' is deprecated [-Wdeprecated-declarations]
   alerts);
         ^
In file included from btfs.cc:33:0:
/usr/include/libtorrent/session.hpp:226:3: note: declared here
   session(fingerprint const& print
   ^
btfs.cc:519:54: warning: 'libtorrent::session_settings libtorrent::session_handle::settings() const' is deprecated [-Wdeprecated-declarations]
  libtorrent::session_settings se = session->settings();
                                                      ^
In file included from /usr/include/libtorrent/session.hpp:53:0,
                 from btfs.cc:33:
/usr/include/libtorrent/session_handle.hpp:810:20: note: declared here
   session_settings settings() const;
                    ^
btfs.cc:527:26: warning: 'void libtorrent::session_handle::set_settings(const libtorrent::session_settings&)' is deprecated [-Wdeprecated-declarations]
  session->set_settings(se);
                          ^
In file included from /usr/include/libtorrent/session.hpp:53:0,
                 from btfs.cc:33:
/usr/include/libtorrent/session_handle.hpp:808:8: note: declared here
   void set_settings(session_settings const& s);
        ^
btfs.cc: In function 'bool populate_metadata(libtorrent::add_torrent_params&, const char*)':
btfs.cc:632:8: error: no match for 'operator=' (operand types are 'boost::shared_ptr<libtorrent::torrent_info>' and 'libtorrent::torrent_info*')
   p.ti = new libtorrent::torrent_info((const char *) output.buf,
        ^
In file included from /usr/include/boost/smart_ptr/shared_array.hpp:24:0,
                 from /usr/include/boost/shared_array.hpp:17,
                 from /usr/include/libtorrent/torrent_info.hpp:42,
                 from btfs.cc:32:
/usr/include/boost/smart_ptr/shared_ptr.hpp:524:18: note: candidate: boost::shared_ptr<T>& boost::shared_ptr<T>::operator=(const boost::shared_ptr<T>&) [with T = libtorrent::torrent_info]
     shared_ptr & operator=( shared_ptr const & r ) BOOST_NOEXCEPT
                  ^
/usr/include/boost/smart_ptr/shared_ptr.hpp:524:18: note:   no known conversion for argument 1 from 'libtorrent::torrent_info*' to 'const boost::shared_ptr<libtorrent::torrent_info>&'
/usr/include/boost/smart_ptr/shared_ptr.hpp:533:18: note: candidate: template<class Y> boost::shared_ptr<T>& boost::shared_ptr<T>::operator=(const boost::shared_ptr<Y>&) [with Y = Y; T = libtorrent::torrent_info]
     shared_ptr & operator=(shared_ptr<Y> const & r) BOOST_NOEXCEPT
                  ^
/usr/include/boost/smart_ptr/shared_ptr.hpp:533:18: note:   template argument deduction/substitution failed:
btfs.cc:632:8: note:   mismatched types 'const boost::shared_ptr<X>' and 'libtorrent::torrent_info*'
   p.ti = new libtorrent::torrent_info((const char *) output.buf,
        ^
In file included from /usr/include/boost/smart_ptr/shared_array.hpp:24:0,
                 from /usr/include/boost/shared_array.hpp:17,
                 from /usr/include/libtorrent/torrent_info.hpp:42,
                 from btfs.cc:32:
/usr/include/boost/smart_ptr/shared_ptr.hpp:544:18: note: candidate: template<class Y> boost::shared_ptr<T>& boost::shared_ptr<T>::operator=(std::auto_ptr<_Tp1>&) [with Y = Y; T = libtorrent::torrent_info]
     shared_ptr & operator=( std::auto_ptr<Y> & r )
                  ^
/usr/include/boost/smart_ptr/shared_ptr.hpp:544:18: note:   template argument deduction/substitution failed:
btfs.cc:632:8: note:   mismatched types 'std::auto_ptr<Y>' and 'libtorrent::torrent_info*'
   p.ti = new libtorrent::torrent_info((const char *) output.buf,
        ^
In file included from /usr/include/boost/smart_ptr/shared_array.hpp:24:0,
                 from /usr/include/boost/shared_array.hpp:17,
                 from /usr/include/libtorrent/torrent_info.hpp:42,
                 from btfs.cc:32:
/usr/include/boost/smart_ptr/shared_ptr.hpp:562:77: note: candidate: template<class Ap> typename boost::detail::sp_enable_if_auto_ptr<Ap, boost::shared_ptr<T>&>::type boost::shared_ptr<T>::operator=(Ap) [with Ap = Ap; T = libtorrent::torrent_info]
     typename boost::detail::sp_enable_if_auto_ptr< Ap, shared_ptr & >::type operator=( Ap r )
                                                                             ^
/usr/include/boost/smart_ptr/shared_ptr.hpp:562:77: note:   template argument deduction/substitution failed:
/usr/include/boost/smart_ptr/shared_ptr.hpp: In substitution of 'template<class Ap> typename boost::detail::sp_enable_if_auto_ptr<Ap, boost::shared_ptr<T>&>::type boost::shared_ptr<T>::operator=(Ap) [with Ap = libtorrent::torrent_info*]':
btfs.cc:632:8:   required from here
/usr/include/boost/smart_ptr/shared_ptr.hpp:562:77: error: no type named 'type' in 'struct boost::detail::sp_enable_if_auto_ptr<libtorrent::torrent_info*, boost::shared_ptr<libtorrent::torrent_info>&>'
/usr/include/boost/smart_ptr/shared_ptr.hpp:584:18: note: candidate: template<class Y, class D> boost::shared_ptr<T>& boost::shared_ptr<T>::operator=(boost::movelib::unique_ptr<Y, D>) [with Y = Y; D = D; T = libtorrent::torrent_info]
     shared_ptr & operator=( boost::movelib::unique_ptr<Y, D> r )
                  ^
/usr/include/boost/smart_ptr/shared_ptr.hpp:584:18: note:   template argument deduction/substitution failed:
btfs.cc:632:8: note:   mismatched types 'boost::movelib::unique_ptr<Y, D>' and 'libtorrent::torrent_info*'
   p.ti = new libtorrent::torrent_info((const char *) output.buf,
        ^
btfs.cc:657:8: error: no match for 'operator=' (operand types are 'boost::shared_ptr<libtorrent::torrent_info>' and 'libtorrent::torrent_info*')
   p.ti = new libtorrent::torrent_info(r, ec);
        ^
In file included from /usr/include/boost/smart_ptr/shared_array.hpp:24:0,
                 from /usr/include/boost/shared_array.hpp:17,
                 from /usr/include/libtorrent/torrent_info.hpp:42,
                 from btfs.cc:32:
/usr/include/boost/smart_ptr/shared_ptr.hpp:524:18: note: candidate: boost::shared_ptr<T>& boost::shared_ptr<T>::operator=(const boost::shared_ptr<T>&) [with T = libtorrent::torrent_info]
     shared_ptr & operator=( shared_ptr const & r ) BOOST_NOEXCEPT
                  ^
/usr/include/boost/smart_ptr/shared_ptr.hpp:524:18: note:   no known conversion for argument 1 from 'libtorrent::torrent_info*' to 'const boost::shared_ptr<libtorrent::torrent_info>&'
/usr/include/boost/smart_ptr/shared_ptr.hpp:533:18: note: candidate: template<class Y> boost::shared_ptr<T>& boost::shared_ptr<T>::operator=(const boost::shared_ptr<Y>&) [with Y = Y; T = libtorrent::torrent_info]
     shared_ptr & operator=(shared_ptr<Y> const & r) BOOST_NOEXCEPT
                  ^
/usr/include/boost/smart_ptr/shared_ptr.hpp:533:18: note:   template argument deduction/substitution failed:
btfs.cc:657:8: note:   mismatched types 'const boost::shared_ptr<X>' and 'libtorrent::torrent_info*'
   p.ti = new libtorrent::torrent_info(r, ec);
        ^
In file included from /usr/include/boost/smart_ptr/shared_array.hpp:24:0,
                 from /usr/include/boost/shared_array.hpp:17,
                 from /usr/include/libtorrent/torrent_info.hpp:42,
                 from btfs.cc:32:
/usr/include/boost/smart_ptr/shared_ptr.hpp:544:18: note: candidate: template<class Y> boost::shared_ptr<T>& boost::shared_ptr<T>::operator=(std::auto_ptr<_Tp1>&) [with Y = Y; T = libtorrent::torrent_info]
     shared_ptr & operator=( std::auto_ptr<Y> & r )
                  ^
/usr/include/boost/smart_ptr/shared_ptr.hpp:544:18: note:   template argument deduction/substitution failed:
btfs.cc:657:8: note:   mismatched types 'std::auto_ptr<Y>' and 'libtorrent::torrent_info*'
   p.ti = new libtorrent::torrent_info(r, ec);
        ^
In file included from /usr/include/boost/smart_ptr/shared_array.hpp:24:0,
                 from /usr/include/boost/shared_array.hpp:17,
                 from /usr/include/libtorrent/torrent_info.hpp:42,
                 from btfs.cc:32:
/usr/include/boost/smart_ptr/shared_ptr.hpp:562:77: note: candidate: template<class Ap> typename boost::detail::sp_enable_if_auto_ptr<Ap, boost::shared_ptr<T>&>::type boost::shared_ptr<T>::operator=(Ap) [with Ap = Ap; T = libtorrent::torrent_info]
     typename boost::detail::sp_enable_if_auto_ptr< Ap, shared_ptr & >::type operator=( Ap r )
                                                                             ^
/usr/include/boost/smart_ptr/shared_ptr.hpp:562:77: note:   template argument deduction/substitution failed:
/usr/include/boost/smart_ptr/shared_ptr.hpp: In substitution of 'template<class Ap> typename boost::detail::sp_enable_if_auto_ptr<Ap, boost::shared_ptr<T>&>::type boost::shared_ptr<T>::operator=(Ap) [with Ap = libtorrent::torrent_info*]':
btfs.cc:657:8:   required from here
/usr/include/boost/smart_ptr/shared_ptr.hpp:562:77: error: no type named 'type' in 'struct boost::detail::sp_enable_if_auto_ptr<libtorrent::torrent_info*, boost::shared_ptr<libtorrent::torrent_info>&>'
/usr/include/boost/smart_ptr/shared_ptr.hpp:584:18: note: candidate: template<class Y, class D> boost::shared_ptr<T>& boost::shared_ptr<T>::operator=(boost::movelib::unique_ptr<Y, D>) [with Y = Y; D = D; T = libtorrent::torrent_info]
     shared_ptr & operator=( boost::movelib::unique_ptr<Y, D> r )
                  ^
/usr/include/boost/smart_ptr/shared_ptr.hpp:584:18: note:   template argument deduction/substitution failed:
btfs.cc:657:8: note:   mismatched types 'boost::movelib::unique_ptr<Y, D>' and 'libtorrent::torrent_info*'
   p.ti = new libtorrent::torrent_info(r, ec);
        ^
Makefile:385: recipe for target 'btfs-btfs.o' failed
make[1]: *** [btfs-btfs.o] Error 1
make[1]: Leaving directory '/build/btfs/src/btfs/src'
Makefile:346: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Add RAM-only mode

Please add a mode that does not save anything to the backing hard disk.

Reasoning:

  • Allows amnesiac usage, untraceable, no clues left on hard disk.
  • Allows diskless usage.
  • Allows streaming of huge files, larger than local storage.

I tried to use BTFS for clonezilla image transfers, but there is no disk available during that process, so it did not work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.