-
Notifications
You must be signed in to change notification settings - Fork 142
Remove dnf-yum use #2979 #2985
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
Remove dnf-yum use #2979 #2985
Conversation
Remove DNF/YUM use for all current distro targets, replace primary prior function with zypper-changelog-lib. # Includes: - Remove all DNF/YUM use project wide, entailing the removal of the CentOS 'rockstor' distro.id target within pkg_mgmt.py. - Use zypper-changelog-lib, a Rockstor spin-off library, for pending 'rockstor' package changelog retrieval. Replaces prior primary purpose of DNF/YUM. - Add password-store sync for Web-UI changelog repo authentication: zypper-changelog-lib. - Make switch_repo() zypper only and remove run_command() use in favour of 'zypper --xmlout' specific wrappers. - Add pkg_update_info(), a zypper wrapper, to replaces the YUM/DNF cascade calls of now removed pkg_update_check(), pkg_changelog(), and pkg_infos(). - Remove unused downgrade_pkg(): used YUM. - Remove sole users of install_pkg(): smartmontools is installed via rpm dependency. - Move storageadmin exception handle from using rpm_build_info(), YUM dependency, to current_version(); an rpm wrapper. - Enhance current_version(), along with added test coverage. - Bundled fix for "Fix UnboundLocalError: local variable 'appliance'" rockstor#2983 - Fix Installed/Available package versions not appearing in available update details rockstor#2984. - Prioritise rockstor changelog retrieval over updates-list retrieval by delaying the latter - packaging lock contention issue. - Enact limited zypper re-trys re error 7 (zypper busy), logging either way: rockstor#2485 - Improve logging during repo change process. - Remove/remark-out redundant/excessive logging. - Associated performance improvement with all of the above rationalisations. rockstor#2285 rockstor#2286 - Associated type-hint improvements and re-Black formatting. - User hint re possible page refresh requirement: no changelog displayed. - Avoid re-direct by using updated url: re paid support.
TestingAvailable packages & rockstor repo config & switchAs these tests were conducted on fresh installs, and this branch specific unreleased version is newer than any yet released in the public repos, a pending 'rockstor' package changelog test will follow by way of a follow-up comment here. An rpm was built and installed on both a Leap 15.6 and a Slowroll instance.
Multiple subsequent back-and-forth selections between the currently two update repo selections were also tested there-after with the expected repo configuration resulting. |
Testing pending 'rockstor' update changelog.As mentioned in the prior comment, this rpm is the latest, so to test its significantly modified pkg management/reporting code, as if there were a newer rpms version available, we need to fake such a situation. The following procedure was followed. Leap 15.6 x86_64 host.This patch's associated rpm was uninstalled, and the install directory removed, and any repositories that may have been configured; followed by the installation of a 5.0.13-0 rpm but only for rpm DB purposes, as we need to test the existing code in the context of a newer changelog available. Hence faking an older rpm as being installed. This branches test rpm was then re-installed but its services were not started - they are not auto-started by the rpm itself by design, and the subsequent files were then moved aside: The above rpm removal process was then re-run to assert a 5.0.13-0 install (by rpm db); now that we have a clean copy of the files installed by a 5.0.15-2985 tucked-away (bar the rpm scriptlet functions re files) : And finally to supplanting the files of 5.0.13-0 with those of this proposed patch, while leaving the systems packaging subsystem only aware of the 5.0.13-0 install: |
|
On from the convoluted fake 5.0.13-0 install (rpm DB wise) that is actually a 5.0.15-2985 (this branch) install (files wise), we can now initiate its systemd services chain via:
And we see from the rockstor.log that this was retrieved via our spin-off zypper-changelog-lib library, as well as pkg_mgmt's log of the general updates list being skipped due to a zypper lock - likely held by zypper-changelog-lib at that time. The pending base OS updates list will be re-scanned on any subsequent page refresh. |
|
If we now supplant the Web-UI configured 'real' Rockstor-Testing repo with one that has as the latest rpm, the one build for this patch/PR: We see after a page refresh the following version offered: Rockstor 5.0.15-2985 update is available! With the same changelog as before as we do not incorporate changelog changes between published/tagged rpm releases. And so it remains the same as our last 5.0.15-0 release, at least until we rebuild this rpm with a prepared changelog patch. |
|
Using the faked 5.0.13-0 (by rpm DB) but actually running this branches code, we have a successfull all-except-rockstor package update via the "updates to the base OS (system updates)" option documented here (flahsing wifi icon): Resulting in only the 'rockstor' package remaining in this list, by way of a redundant notifier, and versions indicator: Note the before state of this same system & dialog in the original proposal text: 'Caveat' section. |
|
Further to the last comment, our faked as 5.0.13-0 (in rpm DB) branch code successfully updated to its own rpm instance via the Web-UI. |
|
On the basis of the tests detailed in the prior comments, I'll move to merge these changes which are likely larger that would be ideal; especially given our late testing phase status. However we were between a rock and a hard place here re our own prior dnf-yum related dependencies potentially holding up other OS wide updates. |
|
From rpm release 5.1.0-0, the first to include this patch, the following will remove the now unused dnf-yum related packages: The above covers both Leap and Tumbleweed-Slowroll OS bases, as such it will not find all packages requested for removal on any one system. It is expected that around 20 packages will be removed by this command. |
Remove DNF/YUM use for all current distro targets, replace primary prior function with zypper-changelog-lib.
Fixes #2979
Fixes #2983
Fixes #2984
Fixes #2485
Fixes #2285
Fixes #2286
Includes:
Note associated rpmbuild changes addressed in:
Caveat
There is the following know header indicator regression.
As per the faked scenario re older 'rockstor' version DB wise, in order that this branch sees its own rpm as an update, we are missing the 'rockstor' package update available Web-UI header indicator up-arrow to the right of the current version (top-right) indication:
With the above image taken from a system otherwise detailing both a changelog and newer version details , via 'SYSTEM -> Software Updates', as well as the same Installed/Available details displayed within the generalised flashing 'wifi' like indicator:
which in turn gives directions towards the dedicated page. Given this redundancy, it is proposed that this know regression is spun-off into a dedicated issue. Likely to be addressed during the next testing phase; with a possible cherry-pick to pending next Stable phase.