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.
Description of problem:
/sbin/modprobe symlink is not created when installing kmod using rpm. I have seen this same issue with the bash rpm as well, but lets limit the scope to just kmod for now.
Listing the package contents does not show /sbin/modprobe, but running a query --provides against the package shows that it is supposed to provide /sbin/modprobe.
PROVIDES:
rpm -qvp kmod-20-5.el7.x86_64.rpm --provides
manual: /sbin/modprobe
manual: kmod = 20-5.el7
manual: kmod(x86-64) = 20-5.el7
manual: module-init-tools = 4.0-1
LISTING (no /sbin/modprobe):
rpm -qvlp kmod-20-5.el7.x86_64.rpm
drwxr-xr-x 2 root root 0 Jun 3 2015 /etc/depmod.d
-rw-r--r-- 1 root root 116 Jun 3 2015 /etc/depmod.d/dist.conf
drwxr-xr-x 2 root root 0 Jun 3 2015 /etc/modprobe.d
-rwxr-xr-x 1 root root 150656 Jun 3 2015 /usr/bin/kmod
drwxr-xr-x 2 root root 0 Jun 3 2015 /usr/lib/modprobe.d
lrwxrwxrwx 1 root root 11 Jun 3 2015 /usr/sbin/depmod -> ../bin/kmod
lrwxrwxrwx 1 root root 11 Jun 3 2015 /usr/sbin/insmod -> ../bin/kmod
lrwxrwxrwx 1 root root 11 Jun 3 2015 /usr/sbin/lsmod -> ../bin/kmod
lrwxrwxrwx 1 root root 11 Jun 3 2015 /usr/sbin/modinfo -> ../bin/kmod
lrwxrwxrwx 1 root root 11 Jun 3 2015 /usr/sbin/modprobe -> ../bin/kmod
lrwxrwxrwx 1 root root 11 Jun 3 2015 /usr/sbin/rmmod -> ../bin/kmod
-rwxr-xr-x 1 root root 17087 Jun 3 2015 /usr/sbin/weak-modules
-rw-r--r-- 1 root root 3235 Jun 3 2015 /usr/share/bash-completion/completions/kmod
drwxr-xr-x 2 root root 0 Jun 3 2015 /usr/share/doc/kmod-20
-rw-r--r-- 1 root root 26432 Oct 27 2014 /usr/share/doc/kmod-20/COPYING
-rw-r--r-- 1 root root 15829 Mar 1 2015 /usr/share/doc/kmod-20/NEWS
-rw-r--r-- 1 root root 3522 Dec 13 2014 /usr/share/doc/kmod-20/README
-rw-r--r-- 1 root root 1982 Mar 1 2015 /usr/share/doc/kmod-20/TODO
-rw-r--r-- 1 root root 1606 Jun 3 2015 /usr/share/man/man5/depmod.d.5.gz
lrwxrwxrwx 1 root root 15 Jun 3 2015 /usr/share/man/man5/modprobe.conf.5.gz -> modprobe.d.5.gz
-rw-r--r-- 1 root root 3122 Jun 3 2015 /usr/share/man/man5/modprobe.d.5.gz
-rw-r--r-- 1 root root 1047 Jun 3 2015 /usr/share/man/man5/modules.dep.5.gz
-rw-r--r-- 1 root root 38 Jun 3 2015 /usr/share/man/man5/modules.dep.bin.5.gz
-rw-r--r-- 1 root root 2408 Jun 3 2015 /usr/share/man/man8/depmod.8.gz
-rw-r--r-- 1 root root 930 Jun 3 2015 /usr/share/man/man8/insmod.8.gz
-rw-r--r-- 1 root root 948 Jun 3 2015 /usr/share/man/man8/kmod.8.gz
-rw-r--r-- 1 root root 788 Jun 3 2015 /usr/share/man/man8/lsmod.8.gz
-rw-r--r-- 1 root root 1637 Jun 3 2015 /usr/share/man/man8/modinfo.8.gz
-rw-r--r-- 1 root root 3580 Jun 3 2015 /usr/share/man/man8/modprobe.8.gz
-rw-r--r-- 1 root root 1146 Jun 3 2015 /usr/share/man/man8/rmmod.8.gz
SCRIPTS (N/A):
rpm -qvp kmod-20-5.el7.x86_64.rpm --scripts
Version-Release number of selected component (if applicable):
kmod-20-5.el7.x86_64.rpm
How reproducible:
Install kmod-20-5.el7.x86_64.rpm or use rpm2cpio kmod-20-5.el7.x86_64.rpm | cpio -id and inspect the contents. You will not find /sbin/modprobe
Steps to Reproduce:
Assuming the kmod is already installed here.
1. rm -f /sbin/modprobe
2. rpm -ivp kmod-20-5.el7.x86_64.rpm --force (or you can just rpm2cpio the thing since the rpm does not have any sciplets)
3. Verify /sbin/modprobe is there which it is not
Actual results:
rpm installs, but /sbin/modprobe is not there.
Expected results:
/sbin/modprobe is a symlink to ../bin/kmod
Additional info:
This also appears to occur with the bash rpm package as well.
So it looks like the root '/' has bin, lib, and lib64 symlinked to the respective 'usr' dirs.
That is misleading... when an rpm specifically says that it provides /sbin/modprobe, but it is really providing /usr/sbin/modprobe.
One of the changes in Fedora that was included in RHEL 7 is that directories that had versions in both / and /usr (bin, sbin, lib, lib64) have been merged. https://fedoraproject.org/wiki/Features/UsrMove /usr/sbin is now the actual directory, and is where kmod installs its files, and /sbin is a symlink to /usr/sbin.
Files are generally not listed in the Provides metadata for an rpm. Rpm instead resolves path requirements based on the file lists. The Provides: /sbin/modprobe is added for compatibility with older packages. Packages that depend on modprobe that were created before the usr merge may have used Requires: /sbin/modprobe, which is no longer part of the file list provided by the kmod package, and by explicitly adding /sbin/modprobe to the package metadata these requirements can continue to be used.