Bug 149249 - RFE: Way to depend on a specific kernel package (including arch)
Summary: RFE: Way to depend on a specific kernel package (including arch)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Rik van Riel
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC4Blocker
TreeView+ depends on / blocked
 
Reported: 2005-02-21 17:29 UTC by Ville Skyttä
Modified: 2007-11-30 22:11 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-05-28 08:29:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ville Skyttä 2005-02-21 17:29:59 UTC
Currently, there's no way to depend on a specific kernel package in a way that
includes the kernel's arch.  Such a dependency is needed in kernel module packages.

Even N = V-R style dependencies (excluding the arch) cannot be made very
robustly now:

- Dependency on /boot/vmlinuz-$uname is not portable.

- Dependency on "kernel = version-release" is not reliable due to the broad
"Provides: kernel = version" provision (note: no release tag in it) in _all_
kernel packages, causing _any_ installed variant (SMP, etc) to satisfy the
dependency on a specific "kernel = version-release", *and* for any release that
has the required version.  IOW, a kernel-smp-V-R package has "Provides: kernel =
V", which satisfies for example "Requires: kernel = V-X" which is not desirable
in this case (think UP kernel module packages).

- Dependency on a dir below /lib/modules/$uname might be satisfied by a
non-kernel package, eg. a "buggy" module package.  Ditto (although less
probable) for files below it.  But this still doesn't include the arch.

Suggested remedy: an additional provision, something like:

  Provides: kernel(abi) = <output of "uname -r" for that kernel>-%{_target_cpu}

Using "uname -r" this way is consistent with most of the versioned things in the
kernel package.  Alternatively:

  Provides: kernel(abi) = %{version}-%{release}-%{_target_cpu}     # UP kernel
  Provides: kernel-smp(abi) = %{version}-%{release}-%{_target_cpu} # SMP kernel
  # etc...

That would work too, but I personally think it's not as easy to work with as
"uname -r".

Yes, generic arch-qualified dependencies in rpm would be a nifty feature that
could help with this issue (assuming eg. the broad "kernel = V" provision in all
kernel packages wouldn't interfere with it).  It's not needed in very many
packages outside of kernel and modules though, and the workarounds are trivial,
so I guess such a RFE would be promptly closed as WONTFIX referring to these
very workarounds.

Comment 1 Ville Skyttä 2005-02-21 17:41:04 UTC
One more alternative:

   kernel-%{_target_cpu} = %{version}-%{release}
   kernel-smp-%{_target_cpu} = %{version}-%{release}

This is analoguous with the kernel*-devel-%{_target_cpu} provisions in Rawhide's
kernel*-devel packages.

Comment 2 Ville Skyttä 2005-03-15 17:18:53 UTC
...one more for the road (my preferred one, I think):

  kernel-%{_target_cpu} = <uname -r output>

Comment 3 Rik van Riel 2005-03-15 17:43:07 UTC
That would be:

kernel-%{_target_cpu} = %{KVERREL}

Easy enough.  I'll propose a patch today (and will probably commit it
today, too).

Comment 4 Ville Skyttä 2005-03-15 18:26:58 UTC
Thanks.  But be sure to take the "variant" into account, like:

  kernel-%{_target_cpu} = %{KVERREL}
  kernel-%{_target_cpu} = %{KVERREL}smp
  kernel-%{_target_cpu} = %{KVERREL}xen0
  kernel-%{_target_cpu} = %{KVERREL}xenU

Comment 5 Rik van Riel 2005-03-15 18:35:41 UTC
I now have:

Provides: kernel-%{_target_cpu} = %{rpmversion}-%{release}
Provides: kernel-smp-%{_target_cpu} = %{rpmversion}-%{release}
Provides: kernel-xen0-%{_target_cpu} = %{rpmversion}-%{release}
Provides: kernel-xenU-%{_target_cpu} = %{rpmversion}-%{release}

Chris, Ville, which do you prefer ?

Comment 6 Rik van Riel 2005-03-15 18:51:17 UTC
OK, Chris prefers the variant proposed by Ville.  I'll go with that...

After all, you guys are my target audience ;)

*edits spec file and proposes new patch*

Comment 7 Rik van Riel 2005-03-15 19:51:04 UTC
OK, the new patch was accepted.  I just committed a change to rawhide cvs that
adds headers of this form:

Provides: kernel-%{_target_cpu} = %{rpmversion}-%{release}smp

The next rawhide kernel build should have them.

Comment 8 Warren Togami 2005-05-16 08:29:52 UTC
Everyone satisfied?  close?

Comment 9 Chris Feist 2005-05-16 18:20:35 UTC
This will work for my module packages, thanks Rik!


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