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

fix: policycoreutils python package name #63

Merged

Conversation

mikaellanger
Copy link
Contributor

I have a few legacy hosts with Centos 7 where trying to install python-policycoreutils fails.

At least in Centos 7 the packages is named policycoreutils-python, and finding no such package here either https://pkgs.org/download/python-policycoreutils

Signed-off-by: mikaellanger <mikael.langer@gmail.com>
@mikaellanger mikaellanger changed the title Fix policycoreutils python package name fix: policycoreutils python package name Mar 9, 2023
@github-actions github-actions bot added the bugfix label Mar 9, 2023
Copy link
Contributor

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

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

Two things. This task is used in several roles, so should update all them.

I also think this is going to be a problem for redhat 8+, since this package has been renamed.

@mikaellanger
Copy link
Contributor Author

Two things. This task is used in several roles, so should update all them.

You mean the same task is duplicated in more places in this repo? Sure.

I also think this is going to be a problem for redhat 8+, since this package has been renamed.

AFAIK it was renamed from policycoreutils-python to python3-policycoreutils, so I believe it's still fine for redhat 8+?

@SuperQ
Copy link
Contributor

SuperQ commented Mar 9, 2023

Hmm, I guess if python3 is a good enough signal, it should work.

@gardar
Copy link
Member

gardar commented Mar 9, 2023

The definition is present in these files:

_prometheus_selinux_packages: "{{ ['libselinux-python', 'python-policycoreutils']
if ansible_python_version is version('3', '<') else
['python3-libselinux', 'python3-policycoreutils'] }}"

name: "{{ ['libselinux-python', 'python-policycoreutils']
if ansible_python_version is version('3', '<') else
['python3-libselinux', 'python3-policycoreutils'] }}"

name: "{{ ['libselinux-python', 'python-policycoreutils']
if ansible_python_version is version('3', '<') else
['python3-libselinux', 'python3-policycoreutils'] }}"

The package change came with python3 on redhat based platforms, that's why I thought the cleanest approach would be to make the conditional work on the python interpreter. (and yes you can blame me for the package name typo - whoops :) )

@github-actions github-actions bot added bugfix and removed bugfix labels Mar 9, 2023
@mikaellanger
Copy link
Contributor Author

Changed the other two places.

The package change came with python3 on redhat based platforms, that's why I thought the cleanest approach would be to make the conditional work on the python interpreter.

Based on available packages I agree that seems to be correct, yes.

@gardar
Copy link
Member

gardar commented Mar 10, 2023

@mikaellanger please fix sign-off

Copy link
Contributor

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

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

Just need to fix the DCO.

Signed-off-by: mikaellanger <mikael.langer@gmail.com>
@mikaellanger mikaellanger force-pushed the fix-policycoreutils-python branch from d22df30 to 6394a87 Compare March 13, 2023 08:40
@github-actions github-actions bot added bugfix and removed bugfix labels Mar 13, 2023
@mikaellanger
Copy link
Contributor Author

Done

@gardar gardar merged commit 837e940 into prometheus-community:main Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants