diff options
author | Jeff '2 bits' Bachtel <jbachtel@bericotechnologies.com> | 2014-05-07 17:53:02 +0000 |
---|---|---|
committer | EC2 Default User <jbachtel@bericotechnologies.com> | 2014-05-07 18:42:25 +0000 |
commit | fb5bd35fc2c67efae47f75d17870f47fe7c95ac9 (patch) | |
tree | d66e3e17eeb85e10f074eef92439ab0d662d42d6 /ext | |
parent | f1e7d2c2ec1faa0a121418452f1bff52db2bdfaf (diff) | |
download | puppet-fb5bd35fc2c67efae47f75d17870f47fe7c95ac9.tar.gz |
Previously, RPMS built on Amazon Linux would
point to the improper ruby directory, or
would have improper dependencies.
Use %{amzn} as a rpm macro to determine if the
rpm is being built on an Amazon Linux distro.
If %{amzn} is set, use the Fedora/RHEL7 method
of discovering ruby lib directory. Use the
RHEL 6 init system (sysvinit). Use the RHEL 5
libselinux-ruby dependency.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/redhat/puppet.spec.erb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/redhat/puppet.spec.erb b/ext/redhat/puppet.spec.erb index 15d4eeefd..ee982a3f6 100644 --- a/ext/redhat/puppet.spec.erb +++ b/ext/redhat/puppet.spec.erb @@ -3,7 +3,7 @@ # Fedora 17 ships with ruby 1.9, RHEL 7 with ruby 2.0, which use vendorlibdir instead # of sitelibdir. Adjust our target if installing on f17 or rhel7. -%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || %{_vendor} == "amazon" +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || 0%{?amzn} >= 1 %global puppet_libdir %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["vendorlibdir"]') %else %global puppet_libdir %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["sitelibdir"]') @@ -48,7 +48,7 @@ Requires: rubygem-json %if 0%{?fedora} || 0%{?rhel} >= 6 %{!?_without_selinux:Requires: ruby(selinux), libselinux-utils} %else -%if ( 0%{?rhel} && 0%{?rhel} == 5 ) || %{_vendor} == "amazon" +%if ( 0%{?rhel} && 0%{?rhel} == 5 ) || 0%{?amzn} >= 1 %{!?_without_selinux:Requires: libselinux-ruby, libselinux-utils} %endif %endif |