New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FPM doesnt handle linux FIFO named pipes #347

Closed
Finchster opened this Issue Jan 20, 2013 · 2 comments

Comments

Projects
None yet
3 participants
@Finchster

Finchster commented Jan 20, 2013

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:incopy_entry'
from /usr/lib64/ruby/1.8/fileutils.rb:1331:in traverse' from /usr/lib64/ruby/1.8/fileutils.rb:449:incopy_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:inclone'
from /usr/lib64/ruby/1.8/find.rb:39:in find' from /usr/lib64/ruby/1.8/find.rb:38:incatch'
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:inclone'
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:inchdir'
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:inexecute'
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:inexecute'
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:inrun'
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

This comment has been minimized.

rvavruch commented Jun 11, 2013

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

This comment has been minimized.

Contributor

r4um commented Aug 1, 2013

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 added a commit that referenced this issue Aug 1, 2013

Merge pull request #511 from r4um/issue-347
Closes #347 Handle copying of special files (pipe, socket, etc.)

prof-milki pushed a commit to prof-milki/xpm that referenced this issue Dec 18, 2014

jls
Merge pull request jordansissel#511 from r4um/issue-347
Closes jordansissel#347 Handle copying of special files (pipe, socket, etc.)

prof-milki pushed a commit to prof-milki/xpm that referenced this issue Dec 27, 2014

Merge pull request jordansissel#511 from r4um/issue-347
Closes jordansissel#347 Handle copying of special files (pipe, socket, etc.)

jordansissel added a commit that referenced this issue Apr 24, 2015

Merge pull request #511 from r4um/issue-347
Closes #347 Handle copying of special files (pipe, socket, etc.)

jordansissel added a commit that referenced this issue Jun 20, 2016

Merge pull request #511 from r4um/issue-347
Closes #347 Handle copying of special files (pipe, socket, etc.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment