Git Product home page Git Product logo

rfuse's People

Contributors

ananace avatar ddk50 avatar krissi avatar leoc avatar lwoggardner 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

rfuse's Issues

unable to build in Debian Buster

I'm having trouble building rfuse in newer releases of debian or ubuntu. As I tried to build it with the same ruby version as in earlier releases, my suspicion is that is might have something to do with the version if fuse (2.9.9 vs. 2.9.7 in earlier releases).

Using the ruby docker images this can be reproduced. Using ruby:2.5-stretch the build succeeds, but using ruby:2.5-buster, the build fails.

$ docker run --rm -ti ruby:2.5-buster bash
...
root@ac0cf92bd82f:/# apt-get update && apt-get install libfuse-dev && gem install rfuse

The result is:

Building native extensions. This could take a while...
ERROR:  Error installing rfuse:
	ERROR: Failed to build gem native extension.

    current directory: /usr/local/bundle/gems/rfuse-1.1.2/ext/rfuse
/usr/local/bin/ruby -I /usr/local/lib/ruby/site_ruby/2.5.0 -r ./siteconf20200607-293-1y4fqw1.rb extconf.rb
checking for rb_errinfo()... yes
checking for rb_set_errinfo()... yes
checking for -lfuse... yes
creating Makefile

current directory: /usr/local/bundle/gems/rfuse-1.1.2/ext/rfuse
make "DESTDIR=" clean

current directory: /usr/local/bundle/gems/rfuse-1.1.2/ext/rfuse
make "DESTDIR="
compiling bufferwrapper.c
bufferwrapper.c: In function 'bufferwrapper_new':
bufferwrapper.c:7:7: warning: function might be candidate for attribute 'noreturn' [-Wsuggest-attribute=noreturn]
 VALUE bufferwrapper_new(VALUE class)
       ^~~~~~~~~~~~~~~~~
bufferwrapper.c: At top level:
cc1: warning: unrecognized command line option '-Wno-self-assign'
cc1: warning: unrecognized command line option '-Wno-constant-logical-operand'
cc1: warning: unrecognized command line option '-Wno-parentheses-equality'
compiling context.c
compiling file_info.c
file_info.c: In function 'file_info_new':
file_info.c:67:7: warning: function might be candidate for attribute 'noreturn' [-Wsuggest-attribute=noreturn]
 VALUE file_info_new(VALUE class){
       ^~~~~~~~~~~~~
file_info.c: At top level:
cc1: warning: unrecognized command line option '-Wno-self-assign'
cc1: warning: unrecognized command line option '-Wno-constant-logical-operand'
cc1: warning: unrecognized command line option '-Wno-parentheses-equality'
compiling filler.c
compiling helper.c
compiling intern_rfuse.c
compiling pollhandle.c
In file included from /usr/local/include/ruby-2.5.0/ruby.h:33,
                 from pollhandle.c:1:
pollhandle.c: In function 'wrap_pollhandle':
/usr/local/include/ruby-2.5.0/ruby/ruby.h:1145:63: warning: cast between incompatible function types from 'int (*)(struct fuse_pollhandle *)' to 'void (*)(void *)' [-Wcast-function-type]
     rb_data_object_wrap((klass),(sval),(RUBY_DATA_FUNC)(mark),(RUBY_DATA_FUNC)(free))
                                                               ^
pollhandle.c:40:10: note: in expansion of macro 'Data_Wrap_Struct'
   return Data_Wrap_Struct(rPollHandle, NULL, pollhandle_destroy, ph);
          ^~~~~~~~~~~~~~~~
pollhandle.c: In function 'pollhandle_new':
pollhandle.c:12:7: warning: function might be candidate for attribute 'noreturn' [-Wsuggest-attribute=noreturn]
 VALUE pollhandle_new(VALUE class)
       ^~~~~~~~~~~~~~
pollhandle.c: At top level:
cc1: warning: unrecognized command line option '-Wno-self-assign'
cc1: warning: unrecognized command line option '-Wno-constant-logical-operand'
cc1: warning: unrecognized command line option '-Wno-parentheses-equality'
compiling rfuse.c
In file included from /usr/include/x86_64-linux-gnu/sys/stat.h:446,
                 from /usr/local/include/ruby-2.5.0/ruby/defines.h:117,
                 from /usr/local/include/ruby-2.5.0/ruby/ruby.h:29,
                 from /usr/local/include/ruby-2.5.0/ruby.h:33,
                 from rfuse.c:9:
/usr/include/x86_64-linux-gnu/bits/statx.h:25:8: error: redefinition of 'struct statx_timestamp'
 struct statx_timestamp
        ^~~~~~~~~~~~~~~
In file included from rfuse.c:6:
/usr/include/linux/stat.h:56:8: note: originally defined here
 struct statx_timestamp {
        ^~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/stat.h:446,
                 from /usr/local/include/ruby-2.5.0/ruby/defines.h:117,
                 from /usr/local/include/ruby-2.5.0/ruby/ruby.h:29,
                 from /usr/local/include/ruby-2.5.0/ruby.h:33,
                 from rfuse.c:9:
/usr/include/x86_64-linux-gnu/bits/statx.h:36:8: error: redefinition of 'struct statx'
 struct statx
        ^~~~~
In file included from rfuse.c:6:
/usr/include/linux/stat.h:99:8: note: originally defined here
 struct statx {
        ^~~~~
rfuse.c: In function 'return_error':
rfuse.c:64:18: warning: cast between incompatible function types from 'int (*)(VALUE *)' {aka 'int (*)(long unsigned int *)'} to 'VALUE (*)()' {aka 'long unsigned int (*)()'} [-Wcast-function-type]
   res=rb_protect((VALUE (*)())unsafe_return_error,Qnil,&error);
                  ^
In file included from /usr/local/include/ruby-2.5.0/ruby.h:33,
                 from rfuse.c:9:
rfuse.c: In function 'unsafe_fsyncdir':
rfuse.c:1193:53: warning: initialization of 'long unsigned int' from 'VALUE *' {aka 'long unsigned int *'} makes integer from pointer without a cast [-Wint-conversion]
   return rb_funcall(args[0],rb_intern("fsyncdir"),4,&args[1]);
                                                     ^
/usr/local/include/ruby-2.5.0/ruby/ruby.h:2470:35: note: in definition of macro 'rb_funcall'
  const VALUE rb_funcall_args[] = {__VA_ARGS__}; \
                                   ^~~~~~~~~~~
rfuse.c:1193:53: note: (near initialization for 'rb_funcall_args[0]')
   return rb_funcall(args[0],rb_intern("fsyncdir"),4,&args[1]);
                                                     ^
/usr/local/include/ruby-2.5.0/ruby/ruby.h:2470:35: note: in definition of macro 'rb_funcall'
  const VALUE rb_funcall_args[] = {__VA_ARGS__}; \
                                   ^~~~~~~~~~~
In file included from /usr/local/include/ruby-2.5.0/ruby.h:33,
                 from rfuse.c:9:
rfuse.c: In function 'rf_new':
/usr/local/include/ruby-2.5.0/ruby/ruby.h:1145:63: warning: cast between incompatible function types from 'int (*)(struct intern_fuse *)' to 'void (*)(void *)' [-Wcast-function-type]
     rb_data_object_wrap((klass),(sval),(RUBY_DATA_FUNC)(mark),(RUBY_DATA_FUNC)(free))
                                                               ^
rfuse.c:1923:8: note: in expansion of macro 'Data_Wrap_Struct'
   self=Data_Wrap_Struct(class, 0, intern_fuse_destroy, inf);
        ^~~~~~~~~~~~~~~~
rfuse.c: At top level:
cc1: warning: unrecognized command line option '-Wno-self-assign'
cc1: warning: unrecognized command line option '-Wno-constant-logical-operand'
cc1: warning: unrecognized command line option '-Wno-parentheses-equality'
make: *** [Makefile:243: rfuse.o] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/local/bundle/gems/rfuse-1.1.2 for inspection.
Results logged to /usr/local/bundle/extensions/x86_64-linux/2.5.0/rfuse-1.1.2/gem_make.out

Is there something that can be done to fix this?

rfuse.rb

In the rfuse.rb file, class FuseDelegator < Fuse the initialize method calls super(mountpoint,options) while the Fuse class in the scope does not have an initialize method. This results in a wrong number of arguments (given 2, expected 0) (ArgumentError).

File contents end at NULL bytes

rfuse-1.0.3
ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux] on debian squeeze

I'm currently trying to implement a fuse-filesystem in ruby and stubled upon your fine gem.
It work's find most of the time but fails on the file-read-operation, if the contents of the file
contains NULL bytes:

def read(ctx,path,size,offset,fi)
s=IO.read("/tmp/temp.tar",size,offset)
return s
end

The contents end at the first NULL byte. What I wanted to do is some virtual, read/only fs which simulates
TAR archives for subdirectories.

Can you help me?

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.