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 2094880 - python3-pyusb-9.module+el8.1.0+4107+4a66eb87 is not considered as latest available
Summary: python3-pyusb-9.module+el8.1.0+4107+4a66eb87 is not considered as latest avai...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pyusb
Version: 8.6
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Florence Blanc-Renaud
QA Contact: Kaleem
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-08 14:20 UTC by Renaud Métrich
Modified: 2022-11-08 11:38 UTC (History)
7 users (show)

Fixed In Version: pyusb-1.0.0-9.1.module+el8.7.0+15691+2b2c1dd5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-08 09:36:24 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-8343 0 None None None 2022-06-09 08:07:03 UTC
Red Hat Issue Tracker RHELPLAN-124650 0 None None None 2022-06-08 14:33:29 UTC
Red Hat Product Errata RHBA-2022:7540 0 None None None 2022-11-08 09:36:44 UTC

Description Renaud Métrich 2022-06-08 14:20:57 UTC
Description of problem:

With RHEL8, there are 2 python3-pyusb packages available:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
# rpm -qi -p python3-pyusb-1.0.0-9.module+el8.1.0+4107+4a66eb87.noarch.rpm python3-pyusb-1.0.0-9.module+el8+2554+7a4ca32b.noarch.rpm
Name        : python3-pyusb
Version     : 1.0.0
Release     : 9.module+el8.1.0+4107+4a66eb87
[...]
Build Date  : Fri 30 Aug 2019 10:44:49 AM CEST
[...]

Name        : python3-pyusb
Version     : 1.0.0
Release     : 9.module+el8+2554+7a4ca32b
[...]
Build Date  : Fri 14 Dec 2018 10:27:55 PM CET
[...]
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

From the build dates and NEVRA, I would consider **python3-pyusb-1.0.0-9.module+el8.1.0+4107+4a66eb87.noarch.rpm** to be considered as latest available.
But for some reason RPM considers the other one (**python3-pyusb-1.0.0-9.module+el8+2554+7a4ca32b.noarch.rpm**) as latest, which causes the older package to be installed upon executing "yum update".

**rpmdev-vercmp** also gets fooled:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
# rpmdev-vercmp 1.0.0-9.module+el8.1.0+4107+4a66eb87 1.0.0-9.module+el8+2554+7a4ca32b
1.0.0-9.module+el8.1.0+4107+4a66eb87 < 1.0.0-9.module+el8+2554+7a4ca32b
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------


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

rpm-4.14.3-23.el8.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Install python3-pyusb

Actual results:

1.0.0-9.module+el8+2554+7a4ca32b gets installed

Expected results:

1.0.0-9.module+el8.1.0+4107+4a66eb87 gets installed

Comment 1 Panu Matilainen 2022-06-09 08:00:23 UTC
(In reply to Renaud Métrich from comment #0)

> From the build dates and NEVRA, I would consider
> **python3-pyusb-1.0.0-9.module+el8.1.0+4107+4a66eb87.noarch.rpm** to be
> considered as latest available.
> But for some reason RPM considers the other one
> (**python3-pyusb-1.0.0-9.module+el8+2554+7a4ca32b.noarch.rpm**) as latest,
> which causes the older package to be installed upon executing "yum update".
> 
> **rpmdev-vercmp** also gets fooled:

Sorry but you got that backwards: rpm has precisely one algorithm it follows for comparing versions, us humans all have different ideas when it comes to versions involving more than simple integers. And that's why the only possibility is for us humans to cater to the versioning algorithm even when it seems at odds with intuition.

Rpm looks at the versions in segments of alphanumerics separated by other stuff, + and . and all being equal, and what happens in the above (AFAIR) is that the 1 and 2554 following el8 get compared side-by-side, and obviously 2554 is bigger.

Comment 2 Renaud Métrich 2022-06-09 08:16:52 UTC
Hi Panu,

No worry I understand where the issue comes from.
I'm just concerned now that some other packages may be affected by the computation, specially module ones.

Renaud.

Comment 3 Panu Matilainen 2022-06-09 08:39:49 UTC
Yup, modularity appending even more stuff at the end of release (where it doesn't belong at all) is making things worse.
I don't think there's a whole lot that can be done about it except to remind people to double-check their versioning, but if there's documentation or automation that creates constructs like in this case, that'd be something to address. Eg the .disttag rules for RHEL z-stream and the like were created long before modularity was invented and I don't know if those actually got adjusted for modularity (or if it's even possible, really)

Comment 5 Petr Pisar 2022-06-15 08:21:35 UTC
To fix this, it is necessary to insert ".1" before %{?dist} in a Release value of all spec files of the idm:client stream. Example:

--- a/pyusb.spec
+++ b/pyusb.spec
@@ -7,7 +7,7 @@
 
 Name: pyusb
 Version: 1.0.0
-Release: 9%{?dist}
+Release: 9.1%{?dist}
 Summary: Python bindings for libusb
 License: BSD
 URL: http://pyusb.sourceforge.net/

and rebuild the stream. You will need to do it all affected RHEL-8 minor releases.

Comment 7 Petr Pisar 2022-06-16 13:42:51 UTC
There are two more idm:client packages suffering from this problem:

python3-jwcrypto 0:0.5.0-1.module+el8+2554+7a4ca32b > 0:0.5.0-1.module+el8.1.0+4107+4a66eb87
python3-yubico   0:1.3.2-9.module+el8+2554+7a4ca32b > 0:1.3.2-9.module+el8.1.0+4107+4a66eb87

Comment 8 Florence Blanc-Renaud 2022-06-16 15:15:22 UTC
@ppisar thanks for raising the issue. I opened the following BZs to track everything:

(python-jwcrypto) Bug #2097800 - RHEL 8.6 package seen as older than RHEL 8.0 package
(python-yubico) Bug #2097803 - RHEL 8.6 package seen as older than RHEL 8.0 package

Comment 14 Sumedh Sidhaye 2022-07-18 07:20:53 UTC

Available Packages
python3-pyusb.noarch                                                 1.0.0-9.module+el8+2554+7a4ca32b                                                  rhel-AppStream-updates
python3-pyusb.noarch                                                 1.0.0-9.module+el8+2554+7a4ca32b                                                  rhel-AppStream        
[root@<vm-ip> ~]# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.0 (Ootpa)
[root@<vm-ip> ~]# 
[root@<vm-ip> ~]# rpm -q python3-pyusb
python3-pyusb-1.0.0-9.module+el8+2554+7a4ca32b.noarch
[root@<vm-ip> ~]# 

update pacakges using latest RHEL8.7 nightly repo

[root@<vm-ip> ~]# dnf update
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
app                                                                                                                                          772 kB/s | 7.8 MB     00:10    
base                                                                                                                                         357 kB/s | 2.4 MB     00:06    
Last metadata expiration check: 0:00:01 ago on Monday 18 July 2022 02:30:18 AM EDT.
Dependencies resolved.
=============================================================================================================================================================================
 Package                                         Arch            Version                                             Repository                                         Size
=============================================================================================================================================================================
...

 python3-pyusb                                   noarch          1.0.0-9.1.module+el8.7.0+15690+c8d45780             app                                                88 k

.....


after yum update

[root@<vm-ip> ~]# rpm -qi python3-pyusb
Name        : python3-pyusb
Version     : 1.0.0
Release     : 9.1.module+el8.7.0+15690+c8d45780
Architecture: noarch
Install Date: Monday 18 July 2022 02:47:55 AM EDT
Group       : Unspecified
Size        : 382434
License     : BSD
Signature   : RSA/SHA256, Thursday 14 July 2022 04:37:50 PM EDT, Key ID 199e2f91fd431d51
Source RPM  : pyusb-1.0.0-9.1.module+el8.7.0+15690+c8d45780.src.rpm
Build Date  : Friday 17 June 2022 06:00:24 PM EDT
Build Host  : s390-066.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : http://pyusb.sourceforge.net/
Summary     : Python bindings for libusb
Description :
PyUSB provides easy USB access to python. The module contains classes and
methods to support most USB operations.
[root@<vm-ip> ~]#

Comment 16 errata-xmlrpc 2022-11-08 09:36:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (idm:client and idm:DL1 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:7540


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