Bug 471263 - Disable kernel-firmware package/dependency for s390x
Disable kernel-firmware package/dependency for s390x
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
s390x Linux
medium Severity medium
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
Depends On:
Blocks: ZedoraTracker
  Show dependency treegraph
Reported: 2008-11-12 12:53 EST by Brad Hinson
Modified: 2013-01-21 15:06 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-06-25 11:15:51 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 Brad Hinson 2008-11-12 12:53:29 EST
Description of problem:
rpmbuild of kernel on s390x does not produce a kernel-firmware package.  So installing kernel gives dependency error:

# rpm -i kernel- 
error: Failed dependencies:
	kernel-firmware >= is needed by kernel-

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):
Comment 1 Dave Jones 2008-11-12 13:12:18 EST
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 13:30:17 EST
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 13:34:56 EST
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 13:49:36 EST
That would be possible. But why bother with a special case?
Comment 5 Brad Hinson 2008-11-12 14:01:26 EST
%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 14:10:54 EST
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}
 # 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 14:25:58 EST
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-12 20:54:30 EST
(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 13:18:11 EST
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 13:23:00 EST
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 00:15:39 EST
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:
Comment 13 Brad Hinson 2008-12-01 13:09:13 EST
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 16:47:34 EDT
(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 11:15:51 EDT
Sorry, lost my test system.  I believe this has been worked out in F11, or it's not an issue any more.  Closing.

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