Bug 471263

Summary: Disable kernel-firmware package/dependency for s390x
Product: [Fedora] Fedora Reporter: Brad Hinson <bhinson>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 10CC: dwmw2, kernel-maint, maurizio.antillon, quintela
Target Milestone: ---   
Target Release: ---   
Hardware: s390x   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-25 15:15:51 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:
Bug Depends On:    
Bug Blocks: 467765    

Description Brad Hinson 2008-11-12 17:53:29 UTC
Description of problem:
rpmbuild of kernel on s390x does not produce a kernel-firmware package.  So installing kernel gives dependency error:

# rpm -i kernel-2.6.27.5-32.fc9.s390x.rpm 
error: Failed dependencies:
	kernel-firmware >= 2.6.27.5-32.fc9 is needed by kernel-2.6.27.5-32.fc9.s390x

The kernel-firmware package looks unnecessary on this arch anyway.  Can it be disabled in the spec?  Or can we disable the kernel-firmware rpm dependency on certain arches?

Version-Release number of selected component (if applicable):
kernel-2.6.27.5-32.fc9

Comment 1 Dave Jones 2008-11-12 18:12:18 UTC
does adding 

%define with_firmware 0

to the %ifarch s390x section around line 300 in the specfile
do the right thing?

Comment 2 David Woodhouse 2008-11-12 18:30:17 UTC
rpmbuild of kernel doesn't produce a kernel-firmware package on _any_ architecture. The kernel-firmware package is noarch.

Comment 3 Dave Jones 2008-11-12 18:34:56 UTC
oh, yeah. hmm.

we could make the Requires: dependant on %ifnarch s390x maybe.

given the absence of PCI/USB on s390's I doubt there's anything useful in the firmware rpm at all on that arch.

Comment 4 David Woodhouse 2008-11-12 18:49:36 UTC
That would be possible. But why bother with a special case?

Comment 5 Brad Hinson 2008-11-12 19:01:26 UTC
%define kernel_prereq  ... kernel-firmware >= %{rpmversion}-%{pkg_release}

With that line in the spec, wouldn't all arches depend on kernel-firmware?  I think we need a special case here.

Comment 6 Dave Jones 2008-11-12 19:10:54 UTC
completely untested, but something like ..

--- F-10/kernel.spec~	2008-11-12 14:07:13.000000000 -0500
+++ F-10/kernel.spec	2008-11-12 14:09:58.000000000 -0500
@@ -422,7 +422,10 @@ Summary: The Linux kernel
 # Packages that need to be installed before the kernel is, because the %post
 # scripts use them.
 #
-%define kernel_prereq  fileutils, module-init-tools, initscripts >= 8.11.1-1, mkinitrd >= 6.0.61-1, kernel-firmware >= %{rpmversion}-%{pkg_release}
+%define kernel_prereq  fileutils, module-init-tools, initscripts >= 8.11.1-1, mkinitrd >= 6.0.61-1
+%ifnarch s390x
+%define kernelfw_prereq kernel-firmware >= %{rpmversion}-%{pkg_release}
+%endif
 
 #
 # This macro does requires, provides, conflicts, obsoletes for a kernel package.
@@ -437,7 +440,7 @@ Provides: kernel-drm = 4.3.0\
 Provides: kernel-drm-nouveau = 11\
 Provides: kernel-modeset = 1\
 Provides: kernel-uname-r = %{KVERREL}%{?1:.%{1}}\
-Requires(pre): %{kernel_prereq}\
+Requires(pre): %{kernel_prereq} %{kernelfw_prereq}\
 Conflicts: %{kernel_dot_org_conflicts}\
 Conflicts: %{package_conflicts}\
 %{expand:%%{?kernel%{?1:_%{1}}_conflicts:Conflicts: %%{kernel%{?1:_%{1}}_conflicts}}}\

might do the trick.

Comment 7 Brad Hinson 2008-11-12 19:25:58 UTC
That, together with comment 1, should do the trick.  Comment 6 leads to rpmbuild error though:

error: line 484: Dependency tokens must begin with alpha-numeric, '_' or '/': Requires(pre): fileutils, module-init-tools, initscripts >= 8.11.1-1, mkinitrd >= 6.0.39-1 %{kernel_fw_prereq}

I think it's because Requires(pre) is inside of "%define kernel_reqprovconf", so maybe it doesn't like the space between %{kernel_prereq} and %{kernel_fw_prereq}\

Comment 9 David Woodhouse 2008-11-13 01:54:30 UTC
(In reply to comment #5)
> %define kernel_prereq  ... kernel-firmware >= %{rpmversion}-%{pkg_release}
> 
> With that line in the spec, wouldn't all arches depend on kernel-firmware?  

Yes. That is the intention.

> I think we need a special case here.

Why? Why not just install kernel-firmware?

I see no need for making S390 a special case.

Comment 10 Brad Hinson 2008-11-13 18:18:11 UTC
In response to comment 2:

If rpmbuild doesn't produce kernel-firmware on any arch, what is the process to produce this package?  I'm bootstrapping Fedora on a new arch using koji, so it would be nice if rpmbuild produced all necessary packages automatically.

Stepping back though, do we expect that kernel-firmware is necessary on every arch?  Looking through the file list, this looks like firmware for x86* only.  Why the hard dependency on a package most other arches will never need?

Comment 11 David Woodhouse 2008-11-13 18:23:00 UTC
The kernel is a special case -- it's built for 'noarch' in addition to the binary architectures. It is the noarch build which produces the kernel-doc and kernel-firmware packages.

The contents of the kernel-firmware package are not only for x86*.

Comment 12 Bug Zapper 2008-11-26 05:15:39 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 13 Brad Hinson 2008-12-01 18:09:13 UTC
I did rpmbuild --target noarch, and on s390x there was no kernel-firmware package built.

If the contents of kernel-firmware aren't for x86 only, then can we maintain a list of arches where firmware doesn't apply?  (starting with s390x)

Comment 14 Chuck Ebbert 2009-04-15 20:47:34 UTC
(In reply to comment #13)
> I did rpmbuild --target noarch, and on s390x there was no kernel-firmware
> package built.

What did get built?

Comment 15 Brad Hinson 2009-06-25 15:15:51 UTC
Sorry, lost my test system.  I believe this has been worked out in F11, or it's not an issue any more.  Closing.