Bug 496464 - don't install %if-ed BuildRequires into the buildroot
don't install %if-ed BuildRequires into the buildroot
Product: Fedora Hosted Projects
Classification: Retired
Component: mock (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Clark Williams
Depends On:
  Show dependency treegraph
Reported: 2009-04-19 08:46 EDT by Levente Farkas
Modified: 2013-01-10 00:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-04-30 07:28:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Levente Farkas 2009-04-19 08:46:00 EDT
if i try to build latest rhel-5's kernel-2.6.18-128.1.6.el5 in mock-0.9.14-1.el5 then it's failed, because mock do not install unifdef into the buildroot. the reason for this may be because the spec file contains:
%if %{with_headers}
BuildRequires: unifdef
and even if with_headers defined as 1 mock still not install unifdef into the buildroot. the following command gives this result:
mock --rebuild --target="noarch,i386,i686" --without=pae --without=debug --without=debuginfo kernel-2.6.18-128.1.6.el5.src.rpm
so imho it's a bug.
Comment 1 Clark Williams 2009-04-19 10:59:45 EDT
mock uses the rpmUtils package provded by yum to extract required packages from an SRPM and install them. Chances are the dependency for unifdef is not being recorded in the SRPM. 

Try this on your srpm:

$ rpm -qp --requires kernel-2.6.18-128.1.6.el5.src.rpm | grep unifdef

I tried this on a 2.6.28-128.1.1.el5.src.rpm and it did in fact show unifdef in the output. If unifdef shows up then something is amiss in mock/yum/rpm. If it doesn't show up then the SRPM is probably hosed.
Comment 2 Levente Farkas 2009-04-19 11:13:26 EDT
i also try it with kernel-2.6.18-128.1.6.el5.src.rpm and kernel-.6.28-128.1.1.el5.src.rpm too. the strange thing is that while it's missing from the first it's in the second?
Comment 3 Levente Farkas 2009-04-19 11:27:33 EDT
ok it's not happened with rhel's kernel just with centos kernel:-(
Comment 4 Clark Williams 2009-04-19 14:14:50 EDT
I'd suspect something changed in the build process that caused with_headers to be undefined.

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