Bug 959467

Summary: missing scsi (uapi) kernel-headers exported by kernel: libfc, fc pass thru
Product: [Fedora] Fedora Reporter: Steffen Maier <maier>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: brueckner, dan, dhorak, emilne, gansalmon, itamar, jonathan, kernel-maint, madhu.chinakonda, mgrf
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel-3.9.1-301.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 965662 (view as bug list) Environment:
Last Closed: 2013-05-15 17:29:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 804771, 959497, 965662    

Description Steffen Maier 2013-05-03 14:57:09 UTC
Description of problem:
kernel-headers.rpm does not contain all (uapi) headers exported by the kernel.

kernel.spec contains the following lines:
# glibc provides scsi headers for itself, for now
rm -rf $RPM_BUILD_ROOT/usr/include/scsi
rm -f $RPM_BUILD_ROOT/usr/include/asm*/atomic.h
rm -f $RPM_BUILD_ROOT/usr/include/asm*/io.h
rm -f $RPM_BUILD_ROOT/usr/include/asm*/irq.h

This seems to be in there before the current git://pkgs.fedoraproject.org/kernel.git was created, so I don't know when and why this was introduced. The last three lines seem no-ops nowadays, since the kernel does not export any such headers.

While above was true for only scsi/scsi.h (not the entire recursive scsi/ subdir), it's been fixed in kernel v2.6.24 with:
commit e629a7ddc0188e1bb9e956e698a9bd00c19c9854
Author: Olaf Hering <olh>
Date:   Tue Oct 16 23:27:01 2007 -0700
    do not export /usr/include/scsi in make headers_install

Above recursive removal breaks the following deliberate kernel header exports (in the scsi area):

v2.6.33-rc1~344^2~103
commit 07aac328342d6ca1725d901e1c5da8a1aa88f557
Author: Robert Love <robert.w.love>
Date:   Tue Nov 3 11:47:23 2009 -0800
    [SCSI] libfc: Export FC headers

v2.6.31-rc1~285^2~15
commit 9e4f5e29610162fd426366f3b29e3cc6e575b858
Author: James Smart <James.Smart>
Date:   Thu Mar 26 13:33:19 2009 -0400
    [SCSI] FC Pass Thru support

Those seem to have been converted during the uapi disintegration in v3.9 correctly with commits, so those changes are not the problem:
commit cf02820041668b14cbfa0fbd2bab45ac79bd6174
Author: David Howells <dhowells>
Date:   Wed Dec 19 16:07:25 2012 +0000
    UAPI: (Scripted) Disintegrate include/scsi/fc
commit ee7afd717c26299c85675d84c7ff89a9c989f4fa
Author: David Howells <dhowells>
Date:   Wed Dec 19 16:07:23 2012 +0000
    UAPI: (Scripted) Disintegrate include/scsi

Version-Release number of selected component (if applicable):
kernel-3.9.0-301.fc19

How reproducible:
every time

Steps to Reproduce:
1. Try to build s390utils-libzfcphbaapi / lib-zfcp-hbaapi-2.1-1.fc16.src.rpm, 
e.g. http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=1040913, which uses 
  
Actual results:
Missing exported kernel headers break user space builds.

Expected results:
User space builds can rely and use the deliberately exported kernel headers.

Additional info:
Could you please remove the rm's in kernel.spec?
I validated that this fixes the problem.

Comment 1 Josh Boyer 2013-05-03 15:03:25 UTC
Thanks for the detailed description.  I'll look at this today.

Comment 2 Josh Boyer 2013-05-03 15:03:44 UTC
Also, double thank you for not using the LTC bug proxy.

Comment 3 Josh Boyer 2013-05-06 14:24:17 UTC
Fixed in Fedora git.  Will be included in the next build.

Comment 4 Fedora Update System 2013-05-08 20:41:55 UTC
kernel-3.9.1-301.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/kernel-3.9.1-301.fc19

Comment 5 Fedora Update System 2013-05-09 17:55:40 UTC
Package kernel-3.9.1-301.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing kernel-3.9.1-301.fc19'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-7750/kernel-3.9.1-301.fc19
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-05-15 17:29:59 UTC
kernel-3.9.1-301.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.