Bug 1597956 - Beaker should use DNF API instead of yum and rpmUtils
Summary: Beaker should use DNF API instead of yum and rpmUtils
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: general
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 27.0
Assignee: Renan Rodrigo Barbosa
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-04 03:18 UTC by Dan Callaghan
Modified: 2019-11-27 15:33 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-27 15:33:16 UTC
Embargoed:


Attachments (Terms of Use)

Description Dan Callaghan 2018-07-04 03:18:36 UTC
Description of problem:
Beaker uses rpmUtils Python package from yum, which is no longer available in Fedora 29+.

Version-Release number of selected component (if applicable):
25.4

How reproducible:
easily

Steps to Reproduce:
1. try to build Beaker RPM in rawhide

Actual results:
BUILDSTDERR: Exception occurred:
BUILDSTDERR:   File "../Server/bkr/server/model/tasklibrary.py", line 14, in <module>
BUILDSTDERR:     import rpmUtils.miscutils
BUILDSTDERR: ImportError: No module named rpmUtils.miscutils
BUILDSTDERR: The full traceback has been saved in /tmp/sphinx-err-DFj8pv.log, if you want to report the issue to the developers.
BUILDSTDERR: Please also report this if it was a user error, so that a better error message can be provided next time.
BUILDSTDERR: A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
BUILDSTDERR: make[1]: *** [Makefile:165: man] Error 2
make[1]: Leaving directory '/builddir/build/BUILD/beaker-25.5.git.12.bc73fd36f/documentation'
BUILDSTDERR: make: *** [Makefile:22: build] Error 2
BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.utkrjz (%build)

Expected results:
Should build successfully. Ideally we want Beaker itself to work on Fedora 29 too so the solution here is not just to hack the docs build but to actually remove the dependency on rpmUtils.

Additional info:
dnf may provide a suitable replacement for whatever we are using from rpmUtils, however the Beaker server code base has to continue working on RHEL6 where dnf is not available. We might need two separate code paths (one for yum distros, one for dnf distros).

Comment 1 Dan Callaghan 2018-07-06 00:39:02 UTC
Actually the problem is a little subtler. Yum is still present in Fedora 29 but it is becoming increasingly more broken. The latest problem seems to be a conflict with python2 (maybe because of the removal of /usr/bin/python) which prevents the yum package from being installed. The impact of that on Beaker is much broader than just our usage of the rpmUtils package, we import and use yum code in several places also.

So it means there is a very short-term workaround we can use to get the builds going again in rawhide: we just add an explicitly BuildRequires on yum (it should have been there from the beginning).

https://gerrit.beaker-project.org/6185

However, this means at some point in the very near future we will need to drop the yum dependency entirely and switch to the DNF API. By Fedora 30 if not earlier. So I will convert this bug to be about that.

Comment 2 Dan Callaghan 2018-07-06 02:32:02 UTC
Oh yeah, this is definitely happening sooner rather than later. I just found:

https://fedoraproject.org/wiki/Changes/Deprecate_YUM_3

which is not accepted yet but is likely to be accepted in some form or another for Fedora 29 or Fedora 30. We will need to replace Beaker's usage of Yum (v3) APIs at that point if we want to continue building on Fedora.


Note You need to log in before you can comment on or make changes to this bug.