Closed quulah closed 8 years ago
As a quick hack I added:
@fpm.attributes[:rpm_os] = 'linux'
to package.rb and it seems to work:
$ rpm -q --qf '%{os}\n' -p redis-server-3.0.5-0.x86_64.rpm
linux
Now it installs. There's something wrong with the postinstall still, but might be related to the newer 3.0.5 version.
fpm-cookery is not made for building RPM packages on OS X. (for example) You have to build on the target platform. Building packages for a different target platform only makes sense if you can cross-compile or have platform independent stuff like Java.
I think this use case makes sense and thanks @quulah for documenting how to do it!
fpm itself does indeed have as a design goal (... holy grail) to be able to build any package format from any os. That being said I'm perfectly fine with fpm-cookery not having that goal :)
I was building a .rpm for CentOS 7 on Mac OSX. Specifically Redis.
The resulting .rpm package has os set to "darwin", which breaks the installation. Should be "linux".
fpm seems to have the option --rpm-os:
Could this be used by fpm-cookery?