Implement YUM and DNF support on AIX#61361
Conversation
|
A better approach is to use the existing providers e.g. dnf/yum and have pkg state allow passing the provider e.g. On AIX you would say provider = yum . Solaris has more than two package providers, the open source and native. Also now and then Linux vendors change the package app they use. ??? Mac also have more than one pkg provider ??? The above state would then use the yum modules to get a list of packages installed, and then install 'abc' if required and then post install, get a list of packages again, just like on Linux. The existing Yum/RPM Module/Util code would be reused. |
|
@damon-atkins Understand where you are coming from, but AIX has a number of issues and might just be that special case since there are several yum versions to be be handled:
The newer AIX yum/dnf also are not quite that available from regular RedHat / Centos where the code is essentially 64-bit. On AIX the new yum/dnf code leverages 32-bit Python 3 and associated 32-bit libraries. Also on AIX the rpm's available from the AIX Toolbox are not quite the same as those from RedHat / Centos, the spec files are quite different and appear to have been forked and the changelog is inconsistent with those available from Fedora repo's, further complicating support. Noting that different versions of yum may co-exist depending on how the dnf/yum was installed (not a recommended action but could happen). Hence the code needs to distinguish between the different versions since the newer version of yum has additional options which are desirable. Hence stating provider = yum didn't quite cover the range of possibilities. As for Solaris, Solaris 10 will be 'nearly dead' (Princess Bride humor) come 2023, leaving Solaris 11 and IPS as the main targets for Solaris moving forward. Lastly, the implementation for AIX is similar for Linux, thereby maintaining consistency, for example: |
Ch3LL
left a comment
There was a problem hiding this comment.
We still support Debian 9 which has python 3.5 so we cannot add f strings yet.
|
Hi @dmurphy18 Solaris Open Source Package Manager https://www.opencsw.org/. And then their is also Homebrew for Mac. Being able to provide, a "provider" to the salt state, so it can override the module to be used for pkg.install etc I do not believe you will not be able to use the pkg state to install this software for example. Will execute the default package manager on AIX and not yum (assuming the native package manager on AIX has a pkg state). Which means like Solaris to use an alternative package manger you need to all the module directly from the a state (sls) file. |
|
@damon-atkins So this is for AIX, and extending what is currently there, filesets and rpm to install a rpm. I have actually tested this without the use of rpm extensions and if yum|dnf available, will attempt to use them to install, if fails will try to install as a fileset. For the removal case, AIX packaging will actually tell you if installed and an rpm, if so, very straight forward to uninstall as a fileset or as dnf|yum|rpm. Also wrote tests, based on actual outputs and usage, so believe most of the corner cases are addressed. Adding a provider to override the pkg support for yum would also need to address filesets too, since aixpkg.py supports both. Also the YUM and DNF implementations on AIX are being provided by IBM from their AIX Toolbox, the code changes are merely leveraging the IBM provided YUM and DNF support on AIX, similar to how yum and dnf are provided by RedHat on their OS's. see https://www.ibm.com/support/pages/aix-toolbox-linux-applications-downloads-alpha |
04d8341 to
b813523
Compare
|
@Ch3LL updated for your review comments, let me know if I missed a log.debug message where the English needs to be elaborated |
|
Thanks @dmurphy18 for answering the questions. |
Ch3LL
left a comment
There was a problem hiding this comment.
Just one suggestion, but not required.
|
rerun all |
|
re-run all |
What does this PR do?
Implement YUM and DNF support on AIX, older Python 2 yum, Python 3 yum and dnf
What issues does this PR fix or reference?
Fixes: #60912
Previous Behavior
Only support for rpm install using rpm
New Behavior
Supports use of older Python 2 yum and newer Python 3 yum and dnf on AIX
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
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.