-
Notifications
You must be signed in to change notification settings - Fork 12
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
Make "shaptools" available inside the Salt Bundle (venv-salt-minion) (bsc#1212695) #76
Make "shaptools" available inside the Salt Bundle (venv-salt-minion) (bsc#1212695) #76
Conversation
This commit makes use of RPM Supplements attribute to trigger the installation of the "python3-shaptools-venv-salt-minion" package when "venv-salt-minion" and "python3-shaptools" packages are going to be both installed on the system. This new "python3-shaptools-venv-salt-minion" just takes care of creating the necessary symlink to make "shaptools" available inside the Salt Bundle.
@arbulu89 What do you think about this approach? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yeoldegrove Looking from a far distance, it looks reasonable.
I have not tested myself, so I guess the user would need install the python3-shaptools-venv-salt-minion
package to make the formulas work
@@ -52,6 +52,17 @@ BuildArch: noarch | |||
%description | |||
API to expose SAP HANA functionalities | |||
|
|||
%package -n python3-shaptools-venv-salt-minion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see python3
used always. What if we need the py2 version?
Or is it irrelevant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, the "venv-salt-minion" package is only Python 3.
Are you supporting shap based formulas on Python 2 OSes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were when I implemented this package 5 years ago. Right now, I'm not really sure to be honest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also simply not support the py2 version use case in the "venv-salt-minion" use case.
Maybe a simple %if %{without python2}
condition could be wrapped around the sub-package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the notes 👍
So Salt Bundle is only Python 3, and from what I can see, formulas like "saphanabootstrap" are installing python3-shaptools
depending on the pythonversion
that is processing the Salt formula: https://github.com/SUSE/saphanabootstrap-formula/blob/main/hana/packages.sls#L32
Therefore if Salt Bundle is the one processing the formula, which is always Python 3, then the "python3-shaptools" package will be installed and, due to this PR, the new python3-shaptools-venv-salt-minion
package will get automatically installed. We are all fine here.
It doesn't really make to have a python 2 flavor of this integration with the Salt Bundle.
I would also simply not support the py2 version use case in the "venv-salt-minion" use case. Maybe a simple
%if %{without python2}
condition could be wrapped around the sub-package?
Agree as mentioned. It doesn't make sense a Python 2 flavor for the "venv-salt-minion".
IIUC the %if %{without python2}
is not really needed here - we always want to build the python3-shaptools-venv-salt-minion
package, AFAICS the "python-shaptools" always build python3 subpackages and for some OSes it additionally builds the python2 flavor.
Hey @arbulu89 , thanks for having a look here :) This new BTW this mechanism won't work in case "recommends" packages are disabled (like inside containers). Hth!. |
@meaksh This would be ready to merge from my perspective, if you did not find anything that speaks against it in the meantime. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@yeoldegrove thanks for the review and sorry for the delay here! I just pushed a new commit with the version bump as you requested. This should be ready now 👍 |
This is a proposal for a solution of the problem raised here: https://bugzilla.suse.com/show_bug.cgi?id=1212695
This PR makes use of RPM Supplements attribute to trigger the installation of the
python3-shaptools-venv-salt-minion
package when bothvenv-salt-minion
andpython3-shaptools
packages are going to be installed on the system.This new
python3-shaptools-venv-salt-minion
package just takes care of creating the necessary symlink to makeshaptools
available inside the Salt Bundle.If you want to give it a try:
Test OBS package with this changes: https://build.opensuse.org/package/show/home:PSuarezHernandez:branches:network:ha-clustering:sap-deployments:devel/python-shaptools
"venv-salt-minion" package for SLE15 (all SPs): https://build.opensuse.org/package/show/systemsmanagement:saltstack:bundle:SLE15/venv-salt-minion
Tracks: https://github.com/SUSE/spacewalk/issues/22411