Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1976731

Summary: [RHEL-9] Broken dependencies: stratis-cli
Product: Red Hat Enterprise Linux 9 Reporter: Petr Zatko <pzatko>
Component: stratis-cliAssignee: Bryan Gurney <bgurney>
Status: CLOSED CURRENTRELEASE QA Contact: Filip Suba <fsuba>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: amulhern, cwei, dkeefe, fsuba
Target Milestone: betaKeywords: Triaged
Target Release: 9.0 BetaFlags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: stratis-cli-2.4.2-3.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-12-07 22:10:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1898842    

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.