Bug 1002551

Summary: generated rpm fails postinstall searching for common.postinst in the wrong place
Product: [Fedora] Fedora EPEL Reporter: Olivier LAHAYE <olivier.lahaye1>
Component: dkmsAssignee: Simone Caronni <negativo17>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: el6CC: mario_limonciello, negativo17, tcallawa
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: dkms-2.2.0.3-17.fc18 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-29 17:41:27 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:

Description Olivier LAHAYE 2013-08-29 12:46:08 UTC
Description of problem:
generated rpm (dkms mkrpm) fails postinstall searching for common.postinst in the wrong place.

Version-Release number of selected component (if applicable):
$ rpm -qi dkms
Name        : dkms
Version     : 2.2.0.3
Release     : 8.fc17
Architecture: noarch
Install Date: lun. 19 août 2013 10:33:41 CEST
Group       : System Environment/Base
Size        : 212254
License     : GPLv2+
Signature   : RSA/SHA256, mer. 26 juin 2013 19:20:19 CEST, Key ID 50e94c991aca3465
Source RPM  : dkms-2.2.0.3-8.fc17.src.rpm
Build Date  : mar. 25 juin 2013 14:02:20 CEST
Build Host  : buildvm-13.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : http://linux.dell.com/dkms
Summary     : Dynamic Kernel Module Support Framework

How reproducible:
100%

Steps to Reproduce:
1. dkms mkrpm ....
2.
3.

Actual results:
when installing the resulting rpm, the %post fails searching for /usr/lib64/dkms/common.postinst while file is located in /usr/lib/dkms/common.postinst.

Expected results:
No failure.

Additional info:
in dkms.spec, the file common.postinst is packaged in %{_prefix}/lib/dkms/common.postinst but the file %{_sysconfig}/dkms/template-dkms-mkrpm.spec (line 55) is searching in %{_libdir}/dkms/common.postinst

Either put the file in %[_libdir}/dkms or %{_prefix}/lib/dkms and use this location at both places (dkms.spec and template-dkms-mkrpm.spec)

Comment 1 Simone Caronni 2013-08-29 12:52:50 UTC
Hello,

this should be fixed with dkms-2.2.0.3-14.el6 that is in EPEL stable repository since the end of July. It was already reported in another bug.

Can you please try again with the update?

Changelog here:

http://koji.fedoraproject.org/koji/buildinfo?buildID=436634

Comment 2 Olivier LAHAYE 2013-08-29 13:00:58 UTC
Not fixed.

File common.postinst still located in /usr/lib/dkms/common.postinst which is correct, but file /etc/dkms/template-dkms-mkrpm.spec (line 55) still points to /usr/lib64/dkms/common.postinst

I think that replacing %{_libdir}/dkms with %{_dkmsdir} in template-dkms-mkrpm.spec line 55 should fix the problem.

Comment 3 Simone Caronni 2013-08-29 14:00:45 UTC
Confirmed, the fix seems to be only the change you mentioned.

Tested here on a local CentOS VM.

Can you please test this? I will issue an update immediately after:

http://koji.fedoraproject.org/koji/taskinfo?taskID=5869542

Thanks for the fix.

Comment 4 Simone Caronni 2013-08-29 14:07:04 UTC
Well sort of, as _dkmsdir expands to /var/lib/dkms; I missed the define at the top of the spec file template.

Please test this and not the one in the previous comment:

http://koji.fedoraproject.org/koji/taskinfo?taskID=5869683

Comment 5 Olivier LAHAYE 2013-08-29 14:16:58 UTC
You are right, my proposal was wrong :)

Tested, it works fine!

Now the generated noarch dksm package finds its postinstall script and installs flawlessly.

Thanks for the ultra fast fix :-) (and sorry for my bad proposal).

Comment 6 Simone Caronni 2013-08-29 14:20:20 UTC
No worries, thanks for debugging it!
Pushing an update now, please leave Karma so it goes faster into the stable distribution.

Comment 7 Fedora Update System 2013-08-29 14:22:31 UTC
dkms-2.2.0.3-17.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/dkms-2.2.0.3-17.fc19

Comment 8 Fedora Update System 2013-08-29 14:22:51 UTC
dkms-2.2.0.3-17.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/dkms-2.2.0.3-17.fc18

Comment 9 Fedora Update System 2013-08-29 14:23:13 UTC
dkms-2.2.0.3-17.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/dkms-2.2.0.3-17.el6

Comment 10 Fedora Update System 2013-08-29 14:23:34 UTC
dkms-2.2.0.3-17.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/dkms-2.2.0.3-17.el5

Comment 11 Fedora Update System 2013-08-29 17:41:27 UTC
dkms-2.2.0.3-17.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2013-08-29 17:42:00 UTC
dkms-2.2.0.3-17.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2013-08-29 22:23:56 UTC
dkms-2.2.0.3-17.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2013-08-29 22:24:04 UTC
dkms-2.2.0.3-17.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.