Bug 1976731 - [RHEL-9] Broken dependencies: stratis-cli
Summary: [RHEL-9] Broken dependencies: stratis-cli
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: stratis-cli
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: 9.0 Beta
Assignee: Bryan Gurney
QA Contact: Filip Suba
URL:
Whiteboard:
Depends On:
Blocks: 1898842
TreeView+ depends on / blocked
 
Reported: 2021-06-28 05:56 UTC by Petr Zatko
Modified: 2021-12-07 22:11 UTC (History)
4 users (show)

Fixed In Version: stratis-cli-2.4.2-3.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-12-07 22:10:18 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Petr Zatko 2021-06-28 05:56:06 UTC
Description of problem:
stratis-cli has broken dependencies in RHEL-9

Version-Release number of selected component (if applicable):
RHEL-9.0.0-20210626.0
stratis-cli-2.4.2-2.el9

Steps to Reproduce:
Try to install the package

Actual results:
package: stratis-cli-2.4.2-2.el9.noarch from AppStream
  unresolved deps:
    python3.9dist(semantic-version)
    python3.9dist(wcwidth)

Expected result:
Package installable and no broken dependencies

Comment 1 mulhern 2021-06-28 11:31:43 UTC
You'll have to explain how you arrived at this problem.

Here is the spec file for stratis-cli for RHEL9:
https://src.osci.redhat.com/rpms/stratis-cli/blob/rhel-9.0.0-beta/f/stratis-cli.spec
It requires neither semantic_version nor wcwidth.

According to our understanding these explicit requires in the RHEL9 spec file should
ensure that only these packages are required during the installation.
The same approach worked excellently well in RHEL8.

It seems like, even with the spec file that we use, dependencies are now
being generated from the upstream Python package's setup.py.
That's wrong, and that is precisely what we need to fix.

Do you have any further information on why that is happening in RHEL9
and not in RHEL8?

Thanks!

- mulhern

Comment 2 mulhern 2021-06-28 12:22:34 UTC
%py3_install is what builds the egg-info package; in that package is information about the requirements.
It is possible that RHEL9 packaging is somehow ignoring explicit requirements in spec file and extracting them from the egg-info directory instead.
If so, we need to figure out how to prevent that or override it.

Comment 3 Bryan Gurney 2021-06-28 12:50:30 UTC
I installed RHEL-9.0.0-20210626.0 on a test system, and executed "dnf install stratisd stratis-cli, and this is the output from that command:

Error: 
 Problem: conflicting requests
  - nothing provides python3.9dist(semantic-version) needed by stratis-cli-2.4.2-2.el9.noarch
  - nothing provides python3.9dist(wcwidth) needed by stratis-cli-2.4.2-2.el9.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

...and yet, neither of those packages are specified as a "Requires:" in the stratis-cli.spec file.

Comment 5 mulhern 2021-06-28 16:07:45 UTC
@pzatko We have reproduced the problem and understand why it is happening although we don't yet know what the solution should be.

Did you encounter this error as part of some automated rebuild activity or did you run across it by accident, or...?

Thanks!

Comment 6 Bryan Gurney 2021-06-28 17:53:34 UTC
It seems that mock is now scanning setup.py for the "install_requires" section.  If I add a patch file with the following, it successfully builds in mock, without the dependencies:

--- setup.py.orig	2021-06-28 12:47:21.861294270 -0400
+++ setup.py	2021-06-28 12:47:36.575294270 -0400
@@ -51,8 +51,6 @@ setuptools.setup(
         "justbytes>=0.14",
         "psutil",
         "python-dateutil",
-        "semantic_version",
-        "wcwidth",
     ],
     package_dir={"": "src"},
     packages=setuptools.find_packages("src"),

Comment 7 Bryan Gurney 2021-06-28 18:20:50 UTC
I've submitted a pull request to c9s using the patch mentioned above, at the following URL:  https://gitlab.com/redhat/centos-stream/rpms/stratis-cli/-/merge_requests/4

Comment 10 Petr Zatko 2021-06-29 05:07:50 UTC
@mulhern we run `dnf repoclosure` test on every compose, to find packages with broken dependencies, as part of RTT compose tier1 testing.

Comment 11 Bryan Gurney 2021-06-29 19:40:54 UTC
A fix has been merged into c9s as stratis-cli-2.4.2-3.

Comment 15 Filip Suba 2021-07-12 10:25:42 UTC
Verified with stratis-cli-2.4.2-3.el9.


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