bundler installed fpm makes rpms that install to wrong place #277

Closed
realpdm opened this Issue Oct 17, 2012 · 4 comments

3 participants

@realpdm

For $long_story reason I installed fpm with bundler into its own directory..
14:26 CDT | aspdo008:~/fpm>cat Gemfile
source "https://rubygems.org"
gem "fpm"

then:

bundle install --path=vendor/ --binstubs=bin/

14:26 CDT | aspdo008:~/fpm> bin/fpm --debug --verbose -s gem -t rpm --gem-package-name-prefix ha-rubygem --gem-gem /usr/local/bin/gem passenger
Setting attribute {"output_type":"rpm","level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"input_type":"gem","level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"chdir":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"prefix":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"package":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"name":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"verbose?":true,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"debug?":true,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"version":1.0,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"iteration":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"epoch":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"license":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"vendor":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"category":"none","level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"dependencies":[],"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"provides":[],"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"conflicts":[],"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"replaces":[],"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"config_files":[],"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"architecture":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"maintainer":"pmoore@aspdo008.aus1.homeaway.live","level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"package_name_suffix":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"edit?":false,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"excludes":[],"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"description":"no description","level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"url":"http://example.com/no-uri-given","level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"inputs":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"post_install":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"pre_install":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"post_uninstall":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"pre_uninstall":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"after_install":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"before_install":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"after_remove":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"before_remove":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"template_scripts?":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"template_value":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"workdir":"/tmp","level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"gem_bin_path":"/home/pmoore/fpm/vendor/ruby/1.9.1/bin","level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"gem_package_prefix":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"gem_package_name_prefix":"ha-rubygem","level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"gem_gem":"/usr/local/bin/gem","level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"gem_fix_name?":true,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"gem_fix_dependencies?":true,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"deb_ignore_iteration_in_dependencies?":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"deb_pre_depends":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"deb_compression":"gzip","level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"deb_custom_control":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"deb_config":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"deb_templates":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"deb_installed_size":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"deb_priority":"extra","level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"deb_user":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"deb_group":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"rpm_user":"root","level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"rpm_group":"root","level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"rpm_rpmbuild_define":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"rpm_digest":"md5","level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"rpm_compression":"gzip","level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"python_bin":"python","level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"python_easyinstall":"easy_install","level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"python_pypi":"http://pypi.python.org/simple","level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"python_package_prefix":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"python_package_name_prefix":"python","level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"python_fix_name?":true,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"python_fix_dependencies?":true,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"python_install_bin":"/usr/bin","level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"python_install_lib":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"python_install_data":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"pear_package_name_prefix":"php-pear","level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"pear_channel":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Setting attribute {"pear_channel_update?":null,"level":"debug","file":"fpm/command.rb","line":"277","method":"block (2 levels) in execute"}
Trying to download {"gem":"passenger","version":null,"level":"info","file":"fpm/package/gem.rb","line":"71","method":"download"}
Fetching: passenger-3.0.17.gem (100%)
Using gem file {"path":"/home/pmoore/fpm/vendor/ruby/1.9.1/cache/passenger-3.0.17.gem","level":"info","file":"fpm/package/gem.rb","line":"62","method":"download_if_necessary"}
Running command {"args":["/usr/local/bin/gem","install","--quiet","--no-ri","--no-rdoc","--install-dir","/tmp/package-gem-staging20121017-31326-1qp6f7z/home/pmoore/fpm/vendor/ruby/1.9.1","--ignore-dependencies","-E","--bindir","/tmp/package-gem-staging20121017-31326-1qp6f7z/home/pmoore/fpm/vendor/ruby/1.9.1/bin","/home/pmoore/fpm/vendor/ruby/1.9.1/cache/passenger-3.0.17.gem"],"level":"debug","file":"fpm/util.rb","line":"29","method":"safesystem"}
Successfully installed passenger-3.0.17
1 gem installed
Setting from flags: epoch= {"level":"info","file":"fpm/command.rb","line":"313","method":"block in execute"}
Setting from flags: iteration= {"level":"info","file":"fpm/command.rb","line":"313","method":"block in execute"}
Converting gem to rpm {"level":"info","file":"fpm/package.rb","line":"185","method":"convert"}
Cleaning up staging path {"path":"/tmp/package-rpm-staging20121017-31326-13975ne","level":"debug","file":"fpm/package.rb","line":"269","method":"cleanup_staging"}
Reading template {"path":"/home/pmoore/fpm/vendor/ruby/1.9.1/gems/fpm-0.4.20/lib/fpm/../../templates/rpm.erb","level":"info","file":"fpm/package.rb","line":"315","method":"template"}
Running rpmbuild {"args":["rpmbuild","-bb","--define","buildroot /tmp/package-rpm-build20121017-31326-14qmr7c/BUILD","--define","_topdir /tmp/package-rpm-build20121017-31326-14qmr7c","--define","_sourcedir /tmp/package-rpm-build20121017-31326-14qmr7c","--define","_rpmdir /tmp/package-rpm-build20121017-31326-14qmr7c/RPMS","/tmp/package-rpm-build20121017-31326-14qmr7c/SPECS/ha-rubygem-passenger.spec"],"level":"info","file":"fpm/package/rpm.rb","line":"197","method":"output"}
Running command {"args":["rpmbuild","-bb","--define","buildroot /tmp/package-rpm-build20121017-31326-14qmr7c/BUILD","--define","_topdir /tmp/package-rpm-build20121017-31326-14qmr7c","--define","_sourcedir /tmp/package-rpm-build20121017-31326-14qmr7c","--define","_rpmdir /tmp/package-rpm-build20121017-31326-14qmr7c/RPMS","/tmp/package-rpm-build20121017-31326-14qmr7c/SPECS/ha-rubygem-passenger.spec"],"level":"debug","file":"fpm/util.rb","line":"29","method":"safesystem"}
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.uvgJ4t
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.zZOJ5j
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.iMoY69
Processing files: ha-rubygem-passenger-3.0.17-1.noarch
Wrote: /tmp/package-rpm-build20121017-31326-14qmr7c/RPMS/noarch/ha-rubygem-passenger-3.0.17-1.noarch.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.C5OZK2
Created rpm {"path":"ha-rubygem-passenger-3.0.17-1.noarch.rpm","file":"fpm/command.rb","line":"377","method":"execute"}

14:26 CDT | aspdo008:~/fpm>rpm -qlp ha-rubygem-passenger-3.0.17-1.noarch.rpm| head
/home/pmoore/fpm/vendor/ruby/1.9.1/bin/passenger
/home/pmoore/fpm/vendor/ruby/1.9.1/bin/passenger-config
/home/pmoore/fpm/vendor/ruby/1.9.1/bin/passenger-install-apache2-module
/home/pmoore/fpm/vendor/ruby/1.9.1/bin/passenger-install-nginx-module
/home/pmoore/fpm/vendor/ruby/1.9.1/bin/passenger-memory-stats
/home/pmoore/fpm/vendor/ruby/1.9.1/bin/passenger-status
/home/pmoore/fpm/vendor/ruby/1.9.1/cache/passenger-3.0.17.gem
/home/pmoore/fpm/vendor/ruby/1.9.1/doc
/home/pmoore/fpm/vendor/ruby/1.9.1/gems/passenger-3.0.17/DEVELOPERS.TXT
/home/pmoore/fpm/vendor/ruby/1.9.1/gems/passenger-3.0.17/INSTALL

@realpdm

Hmm, I guess it is basing the path on fpm's install path some how?

14:30 CDT | aspdo008:~/fpm>bin/fpm --help | grep gem-bin-path
--gem-bin-path DIRECTORY (gem only) The directory to install gem executables (default: "/home/pmoore/fpm/vendor/ruby/1.9.1/bin")

@realpdm

Adding --prefix=/usr/local/lib/ruby/gems/1.9.1 seems to be a workaround

@jordansissel

@realpdm it's basing it on the Gem environment, see the output of 'gem env' to see what's going on.

Then again, if you're running fpm from git, and done with bundle install, possibly with rvm, it's going to make your gem env go a bit crazy - unfortunate side effect :\

@r4um
Collaborator

Closing, please update if still an issue.

@r4um r4um closed this Jul 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment