Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

FPM doesnt handle linux FIFO named pipes #347

Closed
Finchster opened this Issue · 2 comments

3 participants

@Finchster

Linking {:file=>"fpm/package/dir.rb", :destination=>"/tmp/package-dir-staging20130120-2901-jngbb6/dir1/dir2/dir3/pipe", :method=>"copy", :line=>"113", :source=>"/dir1/dir2/dir3/pipe", "method"=>"input", :level=>:debug}
Copying {:file=>"fpm/package/dir.rb", :destination=>"/tmp/package-dir-staging20130120-2901-jngbb6/dir1/dir2/dir3/pipe", :method=>"copy", :line=>"117", :source=>"/dir1/dir2/dir3/pipe", "method"=>"input", :level=>:debug}
/usr/lib64/ruby/1.8/fileutils.rb:1257:in copy': cannot handle FIFO (RuntimeError)
from /usr/lib64/ruby/1.8/fileutils.rb:452:in
copy_entry'
from /usr/lib64/ruby/1.8/fileutils.rb:1331:in traverse'
from /usr/lib64/ruby/1.8/fileutils.rb:449:in
copy_entry'
from /usr/lib64/ruby/gems/1.8/gems/fpm-0.4.27/lib/fpm/package/dir.rb:118:in copy'
from /usr/lib64/ruby/gems/1.8/gems/fpm-0.4.27/lib/fpm/package/dir.rb:81:in
clone'
from /usr/lib64/ruby/1.8/find.rb:39:in find'
from /usr/lib64/ruby/1.8/find.rb:38:in
catch'
from /usr/lib64/ruby/1.8/find.rb:38:in find'
from /usr/lib64/ruby/gems/1.8/gems/fpm-0.4.27/lib/fpm/package/dir.rb:79:in
clone'
from /usr/lib64/ruby/gems/1.8/gems/fpm-0.4.27/lib/fpm/package/dir.rb:36:in input'
from /usr/lib64/ruby/gems/1.8/gems/fpm-0.4.27/lib/fpm/package/dir.rb:32:in
chdir'
from /usr/lib64/ruby/gems/1.8/gems/fpm-0.4.27/lib/fpm/package/dir.rb:32:in input'
from /usr/lib64/ruby/gems/1.8/gems/fpm-0.4.27/lib/fpm/command.rb:316:in
execute'
from /usr/lib64/ruby/gems/1.8/gems/fpm-0.4.27/lib/fpm/command.rb:315:in each'
from /usr/lib64/ruby/gems/1.8/gems/fpm-0.4.27/lib/fpm/command.rb:315:in
execute'
from /usr/lib64/ruby/gems/1.8/gems/clamp-0.3.1/lib/clamp/command.rb:64:in run'
from /usr/lib64/ruby/gems/1.8/gems/clamp-0.3.1/lib/clamp/command.rb:126:in
run'
from /usr/lib64/ruby/gems/1.8/gems/fpm-0.4.27/bin/fpm:8
from /usr/bin/fpm:19:in `load'
from /usr/bin/fpm:19

server:~ # ls -l /dir1/dir2/dir3/pipe
prw-rw-r-- 1 user owner 0 Nov 7 16:51 /dir1/dir2/dir3/pipe

Excluding all files in the directory does not work and produces the same error:

"--exclude /dir1/dir2/dir3/*"

@rvavruch

Experiencing the same issue. See output here: https://gist.github.com/rvavruch/5759433

Also tried excluding the file but it seems all the files get copied first and then excluded.

I don't need the socket file it is breaking on, so I hacked the following solution to get it to skip the socket file, from /lib/fpm/package/dir.rb:89

def copy(source, destination)
    if File.socket?(source)
        return
    end

This may not be a solution for everyone, but it solves it for me.

@r4um
Collaborator

There is no portable inbuilt way to create/handle named pipes in ruby. Options
1. Call mkfifo if available
2. Make a FFI call to mkfifo

There is a mkfifo gem but its a C extension :(.

@jordansissel jordansissel closed this in #511
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.