Bug 132456

Summary: mkinitrd fails to compute dependecies from custom kernel modules.dep
Product: [Fedora] Fedora Reporter: Lubomir Bulej <pallas>
Component: mkinitrdAssignee: Jeremy Katz <katzj>
Status: CLOSED DUPLICATE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 19:05:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
A patch to mkinitrd to fix the problem
none
A fragment of mkinitrd computing module dependencies
none
modules.dep from kernel version 2.6.8-1.521-ps
none
modules.dep from kernel version 2.6.8-1.541-ps none

Description Lubomir Bulej 2004-09-13 16:59:19 UTC
Description of problem:
mkinitrd fails to compute dependencies from certain modules.dep
files, which results for example in failing to compute that
ext3 depends on jbd, which is then not included in the initramfs.

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

How reproducible:
always

Steps to Reproduce:
1. set the locale to
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

2. make sure you have gawk-3.1.4-1
  
3. test on the attached modules.dep files with
   the attached script extracted from mkinitrd
   dependency calcucation function

Actual results:
mkinitrd fails to compute ext3 dependency on jbd

Expected results:
mkinitrd should realize ext3 depends on jbd and include
jbd in initramfs

Additional info:
See attached patch. Setting LC_CTYPE=C before the AWK
invocation appears to fix the problem. 

Interestingly enough, changing the line containing 
dep=sprintf(..., dep, ...) to 
tmp=sprintf(..., dep, ...); dep=tmp also fixes the problem,
although I don't know why.

Comment 1 Lubomir Bulej 2004-09-13 17:02:53 UTC
Created attachment 103790 [details]
A patch to mkinitrd to fix the problem

Comment 2 Lubomir Bulej 2004-09-13 17:05:50 UTC
Created attachment 103791 [details]
A fragment of mkinitrd computing module dependencies

This is an excerpt from mkinitrd I used for testing. I suspect that the locale
setting of en_US.UTF-8 is required to reproduce the bug. The modules.dep from
2.6.8-1.521-ps kernel works with original mkinitrd, whereas the file from
2.6.8-1.541-ps kernel does not. After adding LC_CTYPE before the AWK
invocation, it works with both files.

Comment 3 Lubomir Bulej 2004-09-13 17:06:33 UTC
Created attachment 103792 [details]
modules.dep from kernel version 2.6.8-1.521-ps

This modules.dep file works with the original mkinitrd.

Comment 4 Lubomir Bulej 2004-09-13 17:07:22 UTC
Created attachment 103793 [details]
modules.dep from kernel version 2.6.8-1.541-ps

This module.dep does not work with the original mkinitrd.

Comment 5 Jeremy Katz 2004-09-13 17:09:30 UTC
This is due to a bug in gawk.  We've reverted back to gawk 3.1.3-9 in
the devel tree.

*** This bug has been marked as a duplicate of 131498 ***

Comment 6 Red Hat Bugzilla 2006-02-21 19:05:36 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.