Bug 1139006

Summary: The MODULE_CONF directive is not onorated
Product: [Fedora] Fedora Reporter: Goffredo Baroncelli <kreijack>
Component: dkmsAssignee: Simone Caronni <negativo17>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 21CC: charles_rose, mario_limonciello, negativo17, tcallawa
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: dkms-2.2.0.3-26.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-23 04:25:11 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 Goffredo Baroncelli 2014-09-07 12:27:18 UTC
Description of problem:
The MODULE_CONF directive is ignored at installing time

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

How reproduce:
Add a MODULE_CONF directive in the dkms.conf file, and you see that
no file is udated under /etc/modprobe.d/<packagename>.conf

Steps to Reproduce:
1) create an empty file /etc/modprobe.d/dkms.conf
2) create a test package
3) Add a MODULE_CONF directive in the test package dkms.conf file
4) install the test package

Actual results:
The directive is not inserted in the /etc/modprobe.d/dkms.conf

Expected results:
The directive should be inserted in the /etc/modprobe.d/dkms.conf

Additional info:

The root of the problem should be in the commit 13d61e8e744 - "Update bash syntax patch" [1],
which changed a line in the function moduleconfig_update_obsoletes()
as following

[...]
   - [[ ${modules_conf_obsoletes[@]} ]] || return 0
  -+ [[ "${modules_conf_obsoletes[*]}" ]] || return 0
  ++ IFS=; [[ "${modules_conf_obsoletes[*]}" ]] || return 0
[...]

Unfortunately if the test fails, the IFS variable is set to ''.
This leads the rest of the code runs wrongly.

A solution I suggest to protect the code by '( )':


   - [[ ${modules_conf_obsoletes[@]} ]] || return 0
  -+ IFS=; [[ "${modules_conf_obsoletes[*]}" ]] || return 0
  ++ ( IFS=; [[ "${modules_conf_obsoletes[*]}" ]] ) || return 0

The severity is high because this change may break existing installation


[1] http://pkgs.fedoraproject.org/cgit/dkms.git/commit/dkms-bash-syntax-fix.patch?h=f21&id=13d61e8e744d92d254cb722fd3e4c30891f481c8

Comment 1 Simone Caronni 2014-09-08 11:05:47 UTC
Thanks very much for spotting and providing the fix. DKMS is unmaintained upstream.

Are you a packager already? Would you like to become comaintainer for DKMS in Fedora/EPEL?

Comment 2 Fedora Update System 2014-09-08 11:43:48 UTC
dkms-2.2.0.3-26.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/dkms-2.2.0.3-26.el5

Comment 3 Fedora Update System 2014-09-08 11:44:01 UTC
dkms-2.2.0.3-26.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/dkms-2.2.0.3-26.el6

Comment 4 Fedora Update System 2014-09-08 11:44:12 UTC
dkms-2.2.0.3-26.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/dkms-2.2.0.3-26.el7

Comment 5 Fedora Update System 2014-09-08 11:44:24 UTC
dkms-2.2.0.3-26.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/dkms-2.2.0.3-26.fc19

Comment 6 Fedora Update System 2014-09-08 11:44:44 UTC
dkms-2.2.0.3-26.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/dkms-2.2.0.3-26.fc20

Comment 7 Fedora Update System 2014-09-08 11:45:05 UTC
dkms-2.2.0.3-26.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/dkms-2.2.0.3-26.fc21

Comment 8 Fedora Update System 2014-09-08 16:06:33 UTC
Package dkms-2.2.0.3-26.el7:
* should fix your issue,
* was pushed to the Fedora EPEL 7 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing dkms-2.2.0.3-26.el7'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2014-2501/dkms-2.2.0.3-26.el7
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2014-09-23 04:25:11 UTC
dkms-2.2.0.3-26.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2014-09-26 09:01:50 UTC
dkms-2.2.0.3-26.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2014-09-26 09:04:47 UTC
dkms-2.2.0.3-26.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2014-09-26 17:01:48 UTC
dkms-2.2.0.3-26.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 2014-09-27 18:46:52 UTC
dkms-2.2.0.3-26.el7 has been pushed to the Fedora EPEL 7 stable repository.  If problems still persist, please make note of it in this bug report.