Bug 182950 - missing arch/xen/Makefile, or bad .spec
missing arch/xen/Makefile, or bad .spec
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Juan Quintela
Brian Brock
:
: 185550 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-24 12:59 EST by John Reiser
Modified: 2007-11-30 17:11 EST (History)
5 users (show)

See Also:
Fixed In Version: 2.6.23-0.139.rc3.git10.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-27 17:22:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Reiser 2006-02-24 12:59:01 EST
Description of problem:  The file arch/xen/Makefile is missing, yet is called
for by the recipe in kernel-2.6.spec.



Version-Release number of selected component (if applicable):
kernel-2.6.15-1.1977_FC5

How reproducible:
Always

Steps to Reproduce:
1. rpm --install kernel-2.6.15-1.1977_FC5.src.rpm
2. rpmbuild -ba --target i686 kernel-2.6.spec
3.
  
Actual results:
  [snip]
+ echo '# i386'
+ cat .config
+ for i in '*.config'
+ mv kernel-2.6.15-i686-xen0.config .config
++ head -1 .config
++ cut -b 3-
+ Arch=xen
+ make ARCH=xen nonint_oldconfig
Makefile:438: .../BUILD/kernel-2.6.15/linux-2.6.15.i686/arch/xen/Makefile: No
such file or directory
make: *** No rule to make target
`.../BUILD/kernel-2.6.15/linux-2.6.15.i686/arch/xen/Makefile'.  Stop.


Expected results:
Successful build

Additional info:
Comment 1 Stephen Tweedie 2006-03-15 16:44:02 EST
Current spec files do not have any requirement for arch/xen: xen is built as a
sub-arch of the primary arch (i686, x86_64) these days, not as a separate arch.

This looks like you simply have a stale kernel config file left in your build
directory; can you reproduce this after removing all kernel-*.config files and
reinstalling a current kernel src rpm?  Please reopen if you still have trouble.
Comment 2 John Reiser 2006-03-15 17:44:50 EST
If there was a stale kernel config file in directory BUILD/kernel-2.6.15, and if
this was the cause of the failed "Steps to Reproduce", then that is a bug in
kernel-2.6.spec because it does not establish the proper initial conditions.  As
long as the .spec is going to use "for i in *.config" (instead of an explicit
list of .config that the current .src.rpm contains) then there should be a "rm
-f *.config" somewhere before the *.config files are extracted.

This seems very similar to bug #185550.
Comment 3 John Reiser 2006-03-15 19:09:48 EST
The "stale" configs come from SOURCES/kernel*.config, not from anywhere in
BUILD.  For instance, my SOURCES/kernel*.config now has 25 files, only 19 of
which were put there by the most recent kernel*.src.rpm.  The other 6 are left
over from March 2 (two weeks ago, "same" 2.6.15):
kernel-2.6.15-i686-guest-PAE.config etc.

The problem in the .spec starts with
-----
%ifarch %{all_x86}
%define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-i?86*.config
-----
and continues with
-----
cp -f %{all_arch_configs} .


# now run oldconfig over all the config files
for i in *.config
-----

So that strategy initiates and propagates stale kernel*.config from SOURCES into
BUILD.  Not even the rpmbuild parameter "--clean" is effective at removing such
staleness.
Comment 4 John Reiser 2006-03-15 19:18:53 EST
*** Bug 185550 has been marked as a duplicate of this bug. ***
Comment 10 Matthew Miller 2007-04-06 15:16:27 EDT
Fedora Core 5 and Fedora Core 6 are, as we're sure you've noticed, no longer
test releases. We're cleaning up the bug database and making sure important bug
reports filed against these test releases don't get lost. It would be helpful if
you could test this issue with a released version of Fedora or with the latest
development / test release. Thanks for your help and for your patience.

[This is a bulk message for all open FC5/FC6 test release bugs. I'm adding
myself to the CC list for each bug, so I'll see any comments you make after this
and do my best to make sure every issue gets proper attention.]
Comment 11 John Reiser 2007-04-07 17:40:36 EDT
The bug still applies to kernel-2.6.20-1.3045.fc7.src.rpm.  At line 1315 of the
.spec file:
-----
# now run oldconfig over all the config files
for i in *.config
do
-----
and "*.config" has not been removed before.  The result is that stale *.config
files (left over from other .src.rpm) will create errors.  The recipe of the
.spec file is not reliable because it does not guarantee a correct build.

I change the Version field of this bug report to "devel".
Comment 12 Matthew Miller 2007-04-08 14:28:03 EDT
thanks.
Comment 13 Dave Jones 2007-04-08 19:37:11 EDT
This is puzzling, as there's a 

@rm -f kernel-*-config

in the configs target of Makefile.config, which should get run before the spec
file runs oldconfig.

Maybe that's happening at the wrong place. Try tweaking that, to see if you can
get the desired effect.
Comment 14 Dave Jones 2007-08-27 15:19:49 EDT
the spec in rawhide has had quite an overhaul in recent times, including config
generation.  Does this change anything for the better?
Comment 15 John Reiser 2007-08-27 17:22:48 EDT
Yes, the .spec is now better because it removes .config files that cannot
pertain to the build at hand; see the quoted section below.  (This means that
simultaneous builds of different versions will encounter trouble, but that has
been true anyway.)

----- kernel-2.6.23-0.139.rc3.git10.fc8/SPECS/kernel.spec line 1192
# Remove configs not for the buildarch
for cfg in kernel-%{version}-*.config; do
  if [ `echo %{all_arch_configs} | grep -c $cfg` -eq 0 ]; then
    rm -f $cfg
  fi
done

%if !%{with_debug}
rm -f kernel-%{version}-*-debug.config
%endif

# now run oldconfig over all the config files
for i in *.config
do
  mv $i .config
-----

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