Skip to content

Commit

Permalink
Fixes #31909 - Enable pki-core DNF module on EL8
Browse files Browse the repository at this point in the history
On EL8 the pki-core module is needed by candlepin. candlepin-selinux
pulls in candlepin. This means that in the installer the SELinux
workaround hook needs to enable the module.
  • Loading branch information
ekohl authored and ehelms committed Feb 18, 2021
1 parent da2a5fc commit e1f21bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hooks/boot/01-kafo-hook-extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ def el7?
facts[:os][:release][:major] == '7' && facts[:os][:family] == 'RedHat'
end

def el8?
facts[:os][:release][:major] == '8' && facts[:os][:family] == 'RedHat'
end

def log_and_say(level, message, do_say = true, do_log = true)
style = case level
when :error
Expand Down
5 changes: 5 additions & 0 deletions hooks/pre/32-install_selinux_packages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,10 @@
packages << 'candlepin-selinux' if katello_enabled?
packages << 'pulpcore-selinux' if pulpcore_enabled?

if katello_enabled? && el8?
# candlepin-selinux pulls in candlepin which requires pki-core
execute!('dnf module enable pki-core --assumeyes', false, true)
end

ensure_packages(packages, 'installed')
end

0 comments on commit e1f21bb

Please sign in to comment.