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

Already on GitHub? Sign in to your account

RPM fails with --prefix applied #98

tomashley opened this Issue Aug 30, 2011 · 9 comments


None yet
6 participants

If I apply a --prefix switch when building an rpm I get a 'No such file or directory' error. This doesn't occur if I create a puppet manifest.

fpm -s dir -t rpm --name "dnsnet-tc"  -a noarch --prefix /opt/place apache-tomcat-6.0.26/  
["rsync", "-a", "apache-tomcat-6.0.26/", "/home/tomash/build-rpm-dnsnet-tc-1.0.noarch.rpm/tarbuild/opt/place/apache-tomcat-6.0.26/"]
/home/tomash/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/find.rb:38:in `block in find': No such file or directory     (Errno::ENOENT)
    from /home/tomash/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/find.rb:38:in `collect!'
from /home/tomash/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/find.rb:38:in `find'
from /home/tomash/.rvm/gems/ruby-1.9.2-p290/gems/fpm-0.3.7/lib/fpm/package.rb:147:in `block in render_spec'
from /home/tomash/.rvm/gems/ruby-1.9.2-p290/gems/fpm-0.3.7/lib/fpm/package.rb:146:in `each'
from /home/tomash/.rvm/gems/ruby-1.9.2-p290/gems/fpm-0.3.7/lib/fpm/package.rb:146:in `render_spec'
from /home/tomash/.rvm/gems/ruby-1.9.2-p290/gems/fpm-0.3.7/lib/fpm/package.rb:157:in `block in generate_specfile'
from /home/tomash/.rvm/gems/ruby-1.9.2-p290/gems/fpm-0.3.7/lib/fpm/package.rb:156:in `open'
from /home/tomash/.rvm/gems/ruby-1.9.2-p290/gems/fpm-0.3.7/lib/fpm/package.rb:156:in `generate_specfile'
from /home/tomash/.rvm/gems/ruby-1.9.2-p290/gems/fpm-0.3.7/lib/fpm/builder.rb:180:in `generate_specfile'
from /home/tomash/.rvm/gems/ruby-1.9.2-p290/gems/fpm-0.3.7/lib/fpm/builder.rb:114:in `block in assemble!'
from /home/tomash/.rvm/gems/ruby-1.9.2-p290/gems/fpm-0.3.7/lib/fpm/builder.rb:95:in `chdir'
from /home/tomash/.rvm/gems/ruby-1.9.2-p290/gems/fpm-0.3.7/lib/fpm/builder.rb:95:in `assemble!'
from /home/tomash/.rvm/gems/ruby-1.9.2-p290/gems/fpm-0.3.7/lib/fpm/program.rb:51:in `run'
from /home/tomash/.rvm/gems/ruby-1.9.2-p290/gems/fpm-0.3.7/bin/fpm:20:in `<top (required)>'
from /home/tomash/.rvm/gems/ruby-1.9.2-p290/bin/fpm:19:in `load'
from /home/tomash/.rvm/gems/ruby-1.9.2-p290/bin/fpm:19:in `<main>'

fpm -s dir -t puppet --name "dnsnet-tc"  -a noarch --prefix /opt/place apache-tomcat-6.0.26/
["rsync", "-a", "apache-tomcat-6.0.26/", "/home/tomash/build-puppet-dnsnet-tc/tarbuild/opt/place/apache-tomcat-6.0.26/"]
Created /home/tomash/dnsnet-tc

it fails on a deb and a solaris type package too


tabletcorry commented Aug 30, 2011

Cannot reproduce on ruby 1.8.6, or 1.8.7.

Can you try this on an older ruby to see if this is a ruby issue, or environmental issue?

It worked on 1.8.6
fails in 1.9.1 and 1.9.2
I'm using rvm

askreet commented Nov 10, 2011

I have the same issue with 1.9.2 -- trying an older version of Ruby now.

askreet commented Nov 10, 2011

Build succeeded using RubyEE 1.8.7 -- although I get different errors during package install.

Still broken. Any idea when this will be fixed with more recent versions of Ruby?

askreet commented Jan 20, 2012

I looked at this a bit more. The issue is that Find.find has changed in 1.9 to throw an error if the directory does not exist. I don't think --prefix does what we're expecting it to do. Namely, install a directory of files into a different target directory than the source directory specified by FPM.


r4um commented Mar 6, 2013

This has been fixed in 0.4.x with the large code refactor (#53) and 37ce4c6. --prefix works as expected.
Update if this is still a problem. Closing.

@r4um r4um closed this Mar 6, 2013

This appears to have re-surfaced on 1.0.2. Downgrading to 0.4.2 made it go away

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment