Bug 15117 - Dracut creates bogus directories within the initramfs
Summary: Dracut creates bogus directories within the initramfs
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Colin Guthrie
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-22 19:59 CET by Theodoros Kalamatianos
Modified: 2015-01-23 11:29 CET (History)
0 users

See Also:
Source RPM: dracut-038-9.mga5.src.rpm
CVE:
Status comment:


Attachments

Description Theodoros Kalamatianos 2015-01-22 19:59:44 CET
Description of problem:

On my system dracut includes bogus directories in the created initramfs. From the output of lsinitrd:

drwxr-xr-x   2 root     root            0 Jan  3 04:55 0x8000000000000000,
drwxr-xr-x   2 root     root            0 Jan  3 04:55 2.2.5)
drwxr-xr-x   2 root     root            0 Jan  3 04:55 2.3.99)
drwxr-xr-x   2 root     root            0 Jan  3 04:55 ABI:
drwxr-xr-x   2 root     root            0 Jan  3 04:55 Linux
drwxr-xr-x   2 root     root            0 Jan  3 04:55 OS

Searching around points towards the output of `ldconfig -pN`,  as parsed in /usr/lib/dracut/dracut-functions and /usr/lib/dracut/dracut-functions.sh. On my system the output of `ldconfig -pN` is along these lines:

libnvidia-tls.so.340.65 (libc6,x86-64, hwcap: 0x8000000000000000, OS ABI: Linux 2.3.99) => /usr/lib64/nvidia-current/tls/libnvidia-tls.so.340.65

The dracut script code tries to extract the last token using a shell loop and does not account for the extra tokens. Adding this snippet as the first statement of the loop should fix this issue by filtering out the initial part of each line:

d="${d##* => }";

This change also makes the a, b and c variables for `read' unnecessary.


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

dracut-038-9.mga5


How reproducible:

Always


Steps to Reproduce:
1. install the nvidia packages
2. run dracut -f
3. use lsinitrd to view the file list of the initrd


Reproducible: 

Steps to Reproduce:
David Walser 2015-01-22 22:57:58 CET

Assignee: bugsquad => mageia

Comment 1 Colin Guthrie 2015-01-23 11:29:14 CET
Seems addressed by http://git.kernel.org/cgit/boot/dracut/dracut.git/commit/?id=c59779cf9337bc0fc48c7a4d8437f7253f6822c3

Added to our package now.

(tempted to upgrade to 040, but it's quite late and I've not got too much time to address new issues!)

Status: NEW => RESOLVED
Resolution: (none) => FIXED


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