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 2174837

Summary: dnf should be able to automatically select driver packages for installation
Product: Red Hat Enterprise Linux 9 Reporter: ralf.probst
Component: dnfAssignee: Dave Cantrell <dcantrell>
Status: CLOSED MIGRATED QA Contact: swm-qe
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: bfinger, james.antill, mcurlej, ngompa13, pkratoch, ralf.probst
Target Milestone: rcKeywords: MigratedToJIRA, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-25 18:57:51 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 ralf.probst 2023-03-02 13:06:34 UTC
Summary:
RFE: dnf should be able to automatically select driver packages for installation

---

Description:
Description of problem:

We are looking for a way to use either yum or dnf to install required RPM packages from a repository of drivers we provide to our customers, depending on the hardware present in the customer's server. As an example, here is our repository for RHEL 9.0:

https://patches.ts.fujitsu.com/linux/pldp/RHEL9/rhel9/

The RPM packages already contain "provides" properties which look like:

# rpm -q --provides -p kmod-mlnx-en-5.7-3.el9.0.x86_64.rpm | grep modalias
modalias(auxiliary:mlx5_core.eth) = 5.7_1.0.2
modalias(auxiliary:mlx5_core.eth-rep) = 5.7_1.0.2
modalias(auxiliary:mlx5_core.sf) = 5.7_1.0.2
modalias(pci:v000015B3d0000101[3456789ABCDEF]sv*sd*bc*sc*i*) = 5.7_1.0.2
modalias(pci:v000015B3d0000102[13]sv*sd*bc*sc*i*) = 5.7_1.0.2
modalias(pci:v000015B3d0000A2D[236CF]sv*sd*bc*sc*i*) = 5.7_1.0.2

It appears that the v... and d... (e.g. "cv000015B3d0000A2D") correspond to PCIe vendor and device codes of the respective hardware.

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

How reproducible:
always

Steps to Reproduce:
1. Try to install only those RPM packages from a repository of drivers which correspond to the hardware of a system

Actual results:
You have to manually specify the correct packages which are needed for a specific hardware configuration

Expected results:
There is an option available in yum/dnf which automatically installs only the required hardware driver packages from a repository which contains many more driver packages

Additional info:
This works fine with e.g. SUSE's SLES 15. They provide a special option to their dnf equivalent called "zypper". Their documentation can be found here:
https://documentation.suse.com/sles/15-SP4/html/SLES-all/cha-sw-cl.html#sec-zypper-softman-util

Provided the corresponding YUM repository is registered (below referred to as "PRIMERGY PLDP") one may use the following command:

zypper install-new-recommends --no-recommends -r "PRIMERGY PLDP"

This will then check the existing hardware (USB & PCIe IDs, etc.) and select all RPM packages with matching "modalias" patterns.

We are looking for a similar functionality of RHEL, e.g. using yum or dnf which will then trigger the selection and installation of RPM package matching the system's installed hardware configuration. This should not require to provide the driver name and/or the PCIe codes on the command line.

Comment 1 Dave Cantrell 2023-03-06 16:29:29 UTC
Can you give me more details about the repository that you are installing from and what the expected user workflow would be for this?  Are you expecting the main dnf transaction to automatically add driver packages for hardware present in the system or are you expecting that to be a distinct operation from regular dnf operations?

Comment 2 ralf.probst 2023-03-08 13:33:04 UTC
(In reply to David Cantrell from comment #1)
> Can you give me more details about the repository that you are installing
> from and what the expected user workflow would be for this?  Are you
> expecting the main dnf transaction to automatically add driver packages for
> hardware present in the system or are you expecting that to be a distinct
> operation from regular dnf operations?

Sorry for the delayed answer, just didn't get a notification that there was an answer pending.

The repository we are installing from is
https://patches.ts.fujitsu.com/linux/pldp/RHEL9/rhel9/

Regarding the expected user workflow:
A user might use
dnf install-by-modalias [-r “<name of repository>”]
which would then check with the system’s PCIe/USB etc. components whether or not
a RPM package’s “modalias” provides entries in each or the provided repository matches.
Those packages are then (proposed to be) installed.

Comment 3 Dave Cantrell 2023-03-08 15:37:27 UTC
OK, thanks for the clarification.  I am going to take a look at this in more detail and see what plan I can come up with.  My initial thought is this is going to be out of scope for core dnf functionality, but it is ideal for a dnf plugin.  But let me play around with this for some days and post here with an update next week.

Comment 5 RHEL Program Management 2023-08-16 13:20:01 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 6 RHEL Program Management 2023-08-25 18:57:51 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues.