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

Rocky does not have a separate venv package #665

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
##
## CentOS has no extra package for venv
##
unless $facts['os']['name'] == 'CentOS' {
unless $facts['os']['name'] in ['CentOS', 'Rocky'] {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably true for Alma as well? Can't we check for os family RedHat instead?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have currently no way to check Alma nor RH. I suspect it is true, but I have no way to find out.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I must not lie. It is also true for alma. Redhat has recently closed its source, unable to check them. Do you know the familyname for alma?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding "AlmaLinux" and "Rocky" to metadata.json (using version "8" I guess?) will run the acceptance tests against these OS and report success / failure.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggesting to use OS family instead
unless $facts['os']['family'] == 'RedHat'
should work for RHEL, CentOS Stream, AlmaLinux, RockyLinux,...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. will fix, update, change today or friday.

package { 'python-venv':
ensure => $python::venv,
name => "${python}-venv",
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/python_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
it { is_expected.to contain_package('pip') }
end

if %w[Archlinux CentOS].include?(facts[:os]['name'])
if %w[Archlinux CentOS Rocky].include?(facts[:os]['name'])
it { is_expected.not_to contain_package('python-venv') }
else
it { is_expected.to contain_package('python-venv') }
Expand Down Expand Up @@ -58,7 +58,7 @@
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_package('pip').with(ensure: 'present') }

it { is_expected.to contain_package('python-venv').with(ensure: 'present') } unless facts[:os]['name'] == 'CentOS'
it { is_expected.to contain_package('python-venv').with(ensure: 'present') } unless %w[CentOS Rocky].include?(facts[:os]['name'])
end

case facts[:os]['family']
Expand Down
Loading