Bug 82271

Summary: mkinitrd SRPM needs, but doesn't BuildRequire, dietlibc
Product: [Retired] Red Hat Public Beta Reporter: Ed Blackman <ed-keyword-bugzilla.redhat.com.4b59cf>
Component: mkinitrdAssignee: Erik Troan <ewt>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: phoebeCC: woodard
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-01-26 15:51:48 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
Patch that fixes the problem
none
patch that fixes the problem none

Description Ed Blackman 2003-01-20 18:34:53 UTC
Description of problem:
The mkinitrd source rpm requires dietlibc to be present to build, but does not
specify that BuildRequires: dietlibc (or /usr/bin/diet).  If it's not present
during build, the following errors occur:

make[1]: Entering directory `/home/bob/rpmroot/BUILD/mkinitrd-3.4.28/nash'
diet cc -Wall -DVERSION=\"3.4.28\" -g   -c -o nash.o nash.c
make[1]: diet: Command not found
make[1]: *** [nash.o] Error 127

[...]

Processing files: mkinitrd-3.4.28-1
error: File not found: /home/bob/rpmroot/tmp/mkinitrd-root/sbin/nash
error: File not found by glob:
/home/bob/rpmroot/tmp/mkinitrd-root/usr/share/man/man8/nash.8*


Version-Release number of selected component (if applicable):
mkinitrd-3.4.28-1.src.rpm

How reproducible:
always

Steps to Reproduce:
1. Ensure dietlibc package is not installed.
2. Attempt to rebuild mkinitrd source RPM.
3. Observe errors.

Comment 1 Ben Woodard 2003-01-24 01:37:37 UTC
Created attachment 89559 [details]
Patch that fixes the problem

Noticed the same problem here.

Comment 2 Ben Woodard 2003-01-24 01:45:10 UTC
Created attachment 89560 [details]
patch that fixes the problem

Figured out that it is not just a build require it is a full fledged require.

Comment 3 Ben Woodard 2003-01-24 01:48:07 UTC
This problem is also in the Phoebe beta and so we should fix it before 8.1 comes
out.

Comment 4 Jeremy Katz 2003-01-24 01:58:48 UTC
Umm, no.  It's linked statically, so it's definitely not needed at runtime.  And
the build time dep can't be added because dietlibc doesn't exist on all arches
and rpm doesn't have the concept of arch colouring for build deps.

Comment 5 Ed Blackman 2003-01-24 02:19:00 UTC
No arch coloring of build dependencies?  Then what is this fragment of the
kernel-2.4.18-18.8.0.src.rpm spec file doing?  Isn't this exactly the kind of
thing that would be needed for mkinitrd?

%ifarch s390 s390x
BuildRequires: gcc >= 2.95.3
%else
%ifarch %{all_ppc}
BuildRequires: gcc >= 2.96-75
%else
BuildRequires: gcc >= 2.96-98
%endif
%endif


Comment 6 Erik Troan 2003-01-26 15:51:48 UTC
that bit in the kernel doesn't work the way it should -- the dependencies don't
get coded in the header (though you could argue it's better then nothing I guess).