Skip to content

Commit

Permalink
ensure ruby-selinux component is included consistently across runtimes
Browse files Browse the repository at this point in the history
  • Loading branch information
h0tw1r3 committed Apr 17, 2024
1 parent 436024a commit 2cf78f2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 4 additions & 1 deletion configs/projects/_pdk-components.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
proj.component "ruby-#{proj.ruby_version}"

proj.component 'ruby-augeas' unless platform.is_windows?
proj.component 'ruby-selinux' if platform.is_el? || platform.is_fedora?
# We only build ruby-selinux for EL, Fedora, Debian and Ubuntu (amd64/i386)
if platform.is_el? || platform.is_fedora? || platform.is_debian? || (platform.is_ubuntu? && platform.architecture !~ /ppc64le$/)
proj.component 'ruby-selinux'
end

# Additional Rubies
if proj.respond_to?(:additional_rubies)
Expand Down
6 changes: 2 additions & 4 deletions configs/projects/_shared-agent-components.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@
proj.component 'ruby-augeas' unless platform.is_windows?
proj.component 'ruby-shadow' unless platform.is_aix? || platform.is_windows?
# We only build ruby-selinux for EL, Fedora, Debian and Ubuntu (amd64/i386)
if platform.is_el? || platform.is_fedora? || platform.name =~ /debian|ubuntu/
if platform.name !~ /ubuntu-.*-ppc64el/
proj.component 'ruby-selinux'
end
if platform.is_el? || platform.is_fedora? || platform.is_debian? || (platform.is_ubuntu? && platform.architecture !~ /ppc64le$/)
proj.component 'ruby-selinux'
end

# libedit is used instead of readline on these platforms
Expand Down
4 changes: 2 additions & 2 deletions configs/projects/bolt-runtime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@
proj.component 'rubygem-winrm-fs'

# Components from puppet-runtime included to support apply on localhost
# Only bundle SELinux gem for RHEL,Centos,Fedora
if platform.is_el? || platform.is_fedora?
# We only build ruby-selinux for EL, Fedora, Debian and Ubuntu (amd64/i386)
if platform.is_el? || platform.is_fedora? || platform.is_debian? || (platform.is_ubuntu? && platform.architecture !~ /ppc64le$/)
proj.component 'ruby-selinux'
end

Expand Down

0 comments on commit 2cf78f2

Please sign in to comment.