This should help folks who want the old-style gem-rpm conversions
* with this flag, old behavior: rubygem-name
* without flag, default behavior: rubygem(name)
The 'default' behavior has been this behavior since 0.4.23 for most
users.
If you changed the package name prefix via --gem-package-prefix or
--gem-package-name-prefix then this behavior was broken.
It was fixed in #585.
But, I don't want folks relying on old behavior to be screwed
when that behavior mysteriously vanishes! This should be a good
enough work around for now.
Reported by Ryan Doherty via the fpm-users mailing list.
With rpms, if `--architecture` and `--rpm-os` are specified and
different than the host, `--target` would be passed to `rpmbuild` twice,
causing an error.
Example: an OS X host (`uname -s` = "Darwin") with x86_64 architecture
building for `--rpm-os linux` and `--architecture noarch`.
This change only adds `--target` to the `rpmbuild` args once, fixing
this specific error.
Otherwise this can happen:
$ fpm -t deb -s cpan --verbose 'Lingua::JA::Romanize::Japanese'
Asking metacpan about a module {:module=>"Lingua::JA::Romanize::Japanese", :level=>:info}
Downloading perl module {:distribution=>"Lingua-JA-Romanize-Japanese", :version=>nil, :level=>:info}
Setting package name from 'name' {:name=>"Lingua-JA-Romanize-Japanese", :level=>:info}
/usr/lib/ruby/gems/1.9.1/gems/fpm-1.1.0/lib/fpm/package/cpan.rb:86:in `input': undefined method `join' for nil:NilClass (NoMethodError)
from /usr/lib/ruby/gems/1.9.1/gems/fpm-1.1.0/lib/fpm/command.rb:299:in `block in execute'
from /usr/lib/ruby/gems/1.9.1/gems/fpm-1.1.0/lib/fpm/command.rb:298:in `each'
from /usr/lib/ruby/gems/1.9.1/gems/fpm-1.1.0/lib/fpm/command.rb:298:in `execute'
from /usr/lib/ruby/gems/1.9.1/gems/clamp-0.6.3/lib/clamp/command.rb:67:in `run'
from /usr/lib/ruby/gems/1.9.1/gems/fpm-1.1.0/lib/fpm/command.rb:449:in `run'
from /usr/lib/ruby/gems/1.9.1/gems/clamp-0.6.3/lib/clamp/command.rb:125:in `run'
from /usr/lib/ruby/gems/1.9.1/gems/fpm-1.1.0/bin/fpm:8:in `<top (required)>'
from /usr/bin/fpm:23:in `load'
from /usr/bin/fpm:23:in `<main>'
tar flags.
The reason for this is that if we do output, it fails like so;
1) FPM::Package::Deb#tar_flags should set the group for the package's data files
Failure/Error: @package.output(@target)
FPM::Util::ProcessFailed:
tar failed (exit code 2). Full command was:["tar", "-C", "/tmp/package-deb-staging20140423-5427-10uiv96", "-z", "--numeric-owner", "--owner", "0", "--group", "nogroup", "-cf", "/tmp/package-deb-build20140423-5427-19uvbmw/data.tar.gz", "."]
Because 'nogroup' isn't a valid group when tar is run, but we want to check
that 'nogroup' is set in the tar args, not that tar works ;)