Closed dialt0ne closed 9 years ago
I just added osrelease
and osmajorrelease
facts. Will be in the next fpm-cookery release.
Hope that helps! :smiley:
I just release a new version to rubygems.
@bernd, could you please provide some example of how to use osmajorrelease
with recipe DSL?
For the moment, I do something like that but not sure that this is right way
platforms [:redhat, :centos] do
case FPM::Cookery::Facts.osmajorrelease
when '5', '6'
depends 'shadow-utils', 'initscripts','chkconfig', 'openssl'
when '7'
depends 'shadow-utils', 'systemd', 'chkconfig', 'openssl-devel'
end
build_depends 'openssl-devel'
end
Thanks in advance
@bborysenko That's how I use it! :smile:
Would it be possible to have "operatingsystemmajrelease" available as a fact - maybe "osmajor"?
Some rpm names changed between CentOS 6 and 7 - specifically db4 vs. libdb4. Also systemd vs. upstart, etc. etc.