Bug 2207776

Summary: [spec] sos has a runtime-requires python-setuptools, but does not Require: it
Product: Red Hat Enterprise Linux 9 Reporter: Neil Hanlon <neil>
Component: sosAssignee: Pavel Moravec <pmoravec>
Status: CLOSED ERRATA QA Contact: Miroslav HradĂ­lek <mhradile>
Severity: low Docs Contact:
Priority: unspecified    
Version: 9.2CC: agk, jcastillo, mhradile, plambri, sbradley, theute
Target Milestone: rcKeywords: Reopened, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: sos-4.6.0-2.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-07 08:56:30 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:

Description Neil Hanlon 2023-05-16 20:15:18 UTC
Description of problem:

sos report does not pull in python3-setuptools, leading to to the output below (in Additional Information).

Version-Release number of selected component (if applicable): 4.5.1-3.el9_2


How reproducible: always


Steps to Reproduce:
1. Install a system without python3-setuptools
2. `dnf -y install sos`
3. `sos` <-- Failure will occur here
4. `dnf -y install python3-sos`
4. `sos` <-- SOS will now work

Actual results:

`sos` command fails to run due to missing runtime dependency

Expected results:

`dnf -y install sos` pulls in python3-setuptools as a requirement

Additional info:

```
[root@3e846a53ceae /]# sos report
Traceback (most recent call last):
  File "/usr/sbin/sos", line 21, in <module>
    sos = SoS(sys.argv[1:])
  File "/usr/lib/python3.9/site-packages/sos/__init__.py", line 60, in __init__
    import sos.report
  File "/usr/lib/python3.9/site-packages/sos/report/__init__.py", line 19, in <module>
    import sos.report.plugins
  File "/usr/lib/python3.9/site-packages/sos/report/plugins/__init__.py", line 13, in <module>
    from sos.utilities import (sos_get_command_output, import_module, grep,
  File "/usr/lib/python3.9/site-packages/sos/utilities.py", line 26, in <module>
    from pkg_resources import parse_version as version_parse
ModuleNotFoundError: No module named 'pkg_resources'
[root@3e846a53ceae /]# dnf -y install python3-setuptools
...
Installed:
  python3-setuptools-53.0.0-12.el9.noarch
[root@3e846a53ceae /]# sos report

sosreport (version 4.5.1)
```

Comment 1 Pavel Moravec 2023-05-16 20:40:22 UTC
A good catch, https://github.com/sosreport/sos/pull/3241 raised for it.

Comment 6 Pavel Moravec 2023-06-27 13:54:30 UTC
Hello,
this bug is assumed to be fixed in errata https://access.redhat.com/errata/RHBA-2023:3801 so I am closing this BZ as fixed in current release.

If you feel otherwise, please reopen the BZ and provide details what is missing.

Comment 17 errata-xmlrpc 2023-11-07 08:56:30 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 (sos 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/RHEA-2023:6708