Bug 2031255 - dkms mktarball ignores -k options beyond the first
Summary: dkms mktarball ignores -k options beyond the first
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: dkms
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Simone Caronni
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-10 20:59 UTC by Jan Edler
Modified: 2024-07-09 03:47 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-07-09 03:47:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jan Edler 2021-12-10 20:59:42 UTC
Description of problem:
When more than one -k option is passed to dkms mktarball, only the first has any effect.
Error messages indicate the problem:

Marking modules for 3.10.0-862.14.4.el7.x86_64 (x86_64) for archiving...
/usr/sbin/dkms: line 1677: local: intree_module_dir: readonly variable
/usr/sbin/dkms: line 1678: local: temp_module_dir: readonly variable

The errors are generated for the 2nd and subsequent iteration of the first "for" loop of the make_tarball() function.


Version-Release number of selected component (if applicable):
3.0.2-1.el7


How reproducible:
Very

Steps to Reproduce:
1. mktarball -m foo -v 1.0 -k 3.10.0-862.14.4.el7.x86_64 -k 3.10.0-957.27.2.el7.x86_64
2. Look in the resulting tarball

Actual results:
Only the first kernel's modules are included in the tarball


Expected results:
Modules for all specified kernels should be included.

Additional info:
It seems to work if the two -r options are removed for the two local variables defined in that first "for" loop of make_tarball().
Shell local variables have function scope, not loop iteration scope.

Comment 1 Jan Edler 2021-12-10 21:40:19 UTC
The same mistake with local -r appears in the last "for" loop of load_tarball(), and causes all but one kernel to be ignored there, with similar error messages from the shell.

Comment 2 Troy Dawson 2024-07-09 03:47:41 UTC
EPEL 7 entered end-of-life (EOL) status on 2024-06-30.\n\nEPEL 7 is no longer maintained, which means that it\nwill not receive any further security or bug fix updates.\n As a result we are closing this bug.


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