Bug 1484293 - kmodtool fails in akmods - depmod not found
Summary: kmodtool fails in akmods - depmod not found
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: kmodtool
Version: el6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nicolas Chauvet (kwizart)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-23 08:21 UTC by nicolas.vieville
Modified: 2017-10-26 09:47 UTC (History)
7 users (show)

Fixed In Version: kmodtool-1-27.el6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-26 09:47:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
kmodtool-001_rhel6.patch (3.85 KB, patch)
2017-08-23 08:21 UTC, nicolas.vieville
no flags Details | Diff
kmodtool-001_rhel6.patch (4.47 KB, patch)
2017-08-23 09:57 UTC, nicolas.vieville
no flags Details | Diff

Description nicolas.vieville 2017-08-23 08:21:26 UTC
Created attachment 1316985 [details]
kmodtool-001_rhel6.patch

Description of problem:

While trying to install broadcom-wl and akmod-wl packages build from rawhide sources of rpmfusion repository (SPEC modified for el6) on CentOS-6.9-x86_64, the process fails saying that 'depmod' is not found. Another glitch is that the kernel modules path is /lib/modules for RHEL6 and /usr/lib/modules for RHEL7/Fedora.

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

kmodtool-1-24.el6.noarch.rpm from /epel/testing/6/x86_64/ repository

How reproducible:

- Fresh install of CentOS-6.9-x86_64
- Install epel-release-latest-6.noarch.rpm
- Enable epel-testing repository for akmods and kmodtool packages only 
  (includepkgs=kmodtool akmods)
- Install akmods and kmodtool
- Install broadcom-wl and akmod-wl packages (build specially - not provided)
- Launch command akmods --kernel 2.6.32-696.6.3.el6.x86_64

Steps to Reproduce:
1.
2.
3.

Actual results:

Failed

Expected results:

Installs without error and warnings

Additional info:

Patch for kmodtool provided to correct the issue (corrected paths for depmod and lib/modules) on CentOS-6.9-x86_64 (not sure it will work with RHEL6 - haven't tested because no RHEL6 available in my environment). The patched kmodtool works on CentOS-6 and CentOS-7.

I remain available for any questions about it

Cordially,


-- 
NVieville

Comment 1 Nicolas Chauvet (kwizart) 2017-08-23 08:48:56 UTC
This patch looks good. But the only thing to test is either /lib or /sbin are symlinks. If it's the case, then best is to use a macro once instead of duplicating various places where a the /usr change is needed.

I would use something like:

	if [[ -h /sbin ]] ; then
		echo '%global _prefix_usr   '/usr/
	fi
Then :
%{?_prefix_usr}/sbin/depmod
%{?_prefix_usr}/lib/modules/${kernel_uname_r}/extra/${kmodname}/
.etc

I'm not sure why variables are used instead of rpm macros here.

Comment 2 nicolas.vieville 2017-08-23 09:57:04 UTC
Created attachment 1317034 [details]
kmodtool-001_rhel6.patch

(In reply to Nicolas Chauvet (kwizart) from comment #1)
> This patch looks good. But the only thing to test is either /lib or /sbin
> are symlinks. If it's the case, then best is to use a macro once instead of
> duplicating various places where a the /usr change is needed.
> 
> I would use something like:
> 
> 	if [[ -h /sbin ]] ; then
> 		echo '%global _prefix_usr   '/usr/
> 	fi
> Then :
> %{?_prefix_usr}/sbin/depmod
> %{?_prefix_usr}/lib/modules/${kernel_uname_r}/extra/${kmodname}/
> .etc
> 
> I'm not sure why variables are used instead of rpm macros here.

Hello Nicolas,

Here is the modified patch (applied your suggestion from #1484295 to build a git am version of the patch).

I've modified where possible the patch to use rpm macros, but unfortunately as the path to the lib/modules directory is used in both "parts" of the script kmodtool (shell script and rpm directives for SPEC file), I've kept the ${usr_lib_modules} variable form.

Hope this will fit the way this script was created.

These modification have been tested on my CentOS-6.9 VM, and worked correctly.

Cordially,


-- 
NVieville

Comment 3 nicolas.vieville 2017-09-24 16:19:17 UTC
Hello Nicolas,

Maybe you would be interested in Robert Scheck commit on kmodtool pagure folder:

https://src.fedoraproject.org/rpms/kmodtool/c/888d8b8136c454c04dc63307f1f8e341012971f8?branch=master

This patch addresses depmod path but doesn't deals with /lib/modules one.

Maybe it would be worth seeing if this patch addresses all the situations the users will encounter while building modules?

I didn't drop any message to Robert Scheck about this current bug report.

Cordially,


-- 
NVieville

Comment 4 Robert Scheck 2017-10-09 15:09:12 UTC
Nicolas, my commit happened independent of this bug report. I applied
your patch now, because I need a working kmodtool ASAP to unbreak our
builds here.

Comment 5 nicolas.vieville 2017-10-09 17:58:07 UTC
Robert,

Your welcome. My goal in providing this patch was to allow to port some akmods packages for epel6/7 (specially from rpmfusion). I saw your commit after filling this bug report, and began to discuss about it above before taking any decision.

I also opened a bug report for akmods #1484295 for the same goal. Kwizart applied my proposed patch in master and el6 branch of akmods, but not in the other branches as they provide systemctl. 
Maybe, as it is a conditional test, would it be ok to apply it to all branches.

Cordially,


-- 
NVieville

Comment 6 Fedora Update System 2017-10-11 07:47:37 UTC
kmodtool-1-27.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-1840d9a2d4

Comment 7 Fedora Update System 2017-10-26 09:47:11 UTC
kmodtool-1-27.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.


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