Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import additional facts? #98

Closed
dialt0ne opened this issue Dec 17, 2014 · 5 comments
Closed

Import additional facts? #98

dialt0ne opened this issue Dec 17, 2014 · 5 comments

Comments

@dialt0ne
Copy link

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.

@bernd
Copy link
Owner

bernd commented Feb 22, 2015

I just added osrelease and osmajorrelease facts. Will be in the next fpm-cookery release.

Hope that helps! 😃

bernd added a commit that referenced this issue Feb 22, 2015
Changes:

* Use FPM exclude code. (#102)
* Add "osrelease" and "osmajorrelease" facts. (#98)
* Avoid using "git ls-files" in gemspec. (beddari / #96)
@bernd
Copy link
Owner

bernd commented Feb 22, 2015

I just release a new version to rubygems.

@bborysenko
Copy link

@bernd, could you please provide some example of how to use osmajorrelease with recipe DSL?

@bborysenko
Copy link

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

@bernd
Copy link
Owner

bernd commented Oct 27, 2015

@bborysenko That's how I use it! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants