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

Let salt-ssh use 'platform-python' binary in RHEL8 #191

Merged
merged 1 commit into from
Dec 4, 2019
Merged

Let salt-ssh use 'platform-python' binary in RHEL8 #191

merged 1 commit into from
Dec 4, 2019

Conversation

cbbayburt
Copy link
Contributor

RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when creating the sh shim.

What issues does this PR fix or reference?

Previous Behavior

In RHEL8, salt-ssh failed unless Python is installed from the Python module.

New Behavior

salt-ssh works with the base platform-python binary.

Tests written?

No

Commits signed with GPG?

Yes

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

@@ -147,7 +147,7 @@
then SUDO="sudo "
fi
EX_PYTHON_INVALID={EX_THIN_PYTHON_INVALID}
PYTHON_CMDS="python3 python27 python2.7 python26 python2.6 python2 python"
PYTHON_CMDS="python3 /usr/libexec/platform-python3.6 python27 python2.7 python26 python2.6 python2 python"
Copy link
Member

Choose a reason for hiding this comment

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

Just a minor question - why not doing it more generic? like:

Suggested change
PYTHON_CMDS="python3 /usr/libexec/platform-python3.6 python27 python2.7 python26 python2.6 python2 python"
PYTHON_CMDS="python3 /usr/libexec/platform-python python27 python2.7 python26 python2.6 python2 python"

Would that work?

Copy link
Contributor

Choose a reason for hiding this comment

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

if that work, I would move it to the end of the list, so in case that another python package is installed, that will be used

Copy link
Member

Choose a reason for hiding this comment

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

well, python 3 should be prefered over python 2.
The code iterrate over the list and the first wins.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@meaksh I wanted to explicitly add the version so the ordering is clear, but since it's not 3 but 3.6, I think your suggestion makes sense to future-proof this.

RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
@meaksh meaksh merged commit 2a851c5 into openSUSE:openSUSE-2019.2.0 Dec 4, 2019
meaksh pushed a commit that referenced this pull request Dec 4, 2019
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
meaksh pushed a commit that referenced this pull request Dec 4, 2019
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
brejoc pushed a commit that referenced this pull request Jan 31, 2020
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
meaksh pushed a commit that referenced this pull request Mar 10, 2020
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
brejoc pushed a commit that referenced this pull request Mar 20, 2020
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
meaksh pushed a commit that referenced this pull request Mar 23, 2020
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
meaksh pushed a commit that referenced this pull request Mar 24, 2020
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
brejoc pushed a commit that referenced this pull request Apr 8, 2020
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
meaksh pushed a commit that referenced this pull request Apr 30, 2020
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
meaksh pushed a commit that referenced this pull request May 20, 2020
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
meaksh pushed a commit that referenced this pull request Sep 20, 2021
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
meaksh pushed a commit that referenced this pull request Sep 23, 2021
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
meaksh pushed a commit that referenced this pull request Sep 23, 2021
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
agraul pushed a commit that referenced this pull request Jan 19, 2022
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
agraul pushed a commit that referenced this pull request Jan 21, 2022
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
agraul pushed a commit that referenced this pull request Jan 25, 2022
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
meaksh pushed a commit that referenced this pull request Dec 28, 2022
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
meaksh pushed a commit that referenced this pull request Dec 29, 2022
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
meaksh pushed a commit that referenced this pull request Dec 29, 2022
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
meaksh pushed a commit that referenced this pull request Mar 22, 2023
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
meaksh pushed a commit that referenced this pull request Apr 10, 2023
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
meaksh pushed a commit that referenced this pull request Apr 19, 2023
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
meaksh pushed a commit that referenced this pull request Oct 29, 2024
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants