-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
The semanage_ports.py script needs to pick the correct version of python on a system with multiple installed #335
Comments
I would expect it to use the system Python via our custom fact. puppet-selinux/lib/facter/selinux_python_command.rb Lines 4 to 6 in 4633c26
Then rather than using the shebang, it should use the interpreter from the facts. Is this an actual problem that you can reproduce? |
Relevant #330 => I am also trying to build an RPM for EL8 and this is causing issues. Suggestion:
|
That sounds good to me. I would consider removing the fact as a breaking change but can deal with that. So perhaps first a PR to remove the need for the fact (which would be an enhancement) and then one to remove the fact? |
Sure, that's easy enough. Can mark the fact as deprecated. |
Sounds good to me. |
Fixed: * Moved the python discovery into the semanage_ports provider * Ensure that the correct python is chosen by attempting to load the `semanage` library * Removed the #! line from the semanage_ports.py file to fix RPM building * Removed CentOS 6 support from `test-acceptance-with-vagrant` since it will no longer function due to upstream deprecation Changed: * Marked the `selinux_python_command` fact as deprecated in the README since the logic now resides in the provider itself * Added support for Puppet 7 * Added Fedora 33 support Closes voxpupuli#335
Fixed: * Moved the python discovery into the semanage_ports provider * Ensure that the correct python is chosen by attempting to load the `semanage` library * Removed the #! line from the semanage_ports.py file to fix RPM building * Removed CentOS 6 support from `test-acceptance-with-vagrant` since it will no longer function due to upstream deprecation Changed: * Marked the `selinux_python_command` fact as deprecated in the README since the logic now resides in the provider itself * Added support for Puppet 7 * Added Fedora 33 support Closes voxpupuli#335
Fixed: * Moved the python discovery into the semanage_ports provider * Ensure that the correct python is chosen by attempting to load the `semanage` library * Removed the #! line from the semanage_ports.py file to fix RPM building * Removed CentOS 6 support from `test-acceptance-with-vagrant` since it will no longer function due to upstream deprecation Changed: * Marked the `selinux_python_command` fact as deprecated in the README since the logic now resides in the provider itself * Added support for Puppet 7 * Added Fedora 33 support Closes voxpupuli#335
Fixed: * Moved the python discovery into the semanage_ports provider * Ensure that the correct python is chosen by attempting to load the `semanage` library * Removed the #! line from the semanage_ports.py file to fix RPM building * Removed CentOS 6 support from `test-acceptance-with-vagrant` since it will no longer function due to upstream deprecation Changed: * Marked the `selinux_python_command` fact as deprecated in the README since the logic now resides in the provider itself * Added support for Puppet 7 * Added Fedora 33 support Closes voxpupuli#335
Pull Request (PR) description Fixed: Moved the python discovery into the semanage_ports provider Ensure that the correct python is chosen by attempting to load the semanage library Removed the #! line from the semanage_ports.py file to fix RPM building Removed CentOS 6 support from test-acceptance-with-vagrant since it will no longer function due to upstream deprecation Changed: Marked the selinux_python_command fact as deprecated in the README since the logic now resides in the provider itself This Pull Request (PR) fixes the following issues Fixes voxpupuli#335
@ekohl I think this is good to go, would you mind giving it another look when you have a chance? |
Pull Request (PR) description Fixed: Moved the python discovery into the semanage_ports provider Ensure that the correct python is chosen by attempting to load the semanage library Removed the #! line from the semanage_ports.py file to fix RPM building Removed CentOS 6 support from test-acceptance-with-vagrant since it will no longer function due to upstream deprecation Changed: Marked the selinux_python_command fact as deprecated in the README since the logic now resides in the provider itself This Pull Request (PR) fixes the following issues Fixes voxpupuli#335
Affected Puppet, Ruby, OS and module versions/distributions
Information
On systems with multiple python interpreters installed, one needs to be explicitly chosen so that the correct libraries are used.
I'm not exactly sure what the correct method for doing this is but it may be better to detect the system python using Ruby and then generate the script on the fly with the correct interpreter in place.
The text was updated successfully, but these errors were encountered: