[OpenAFS-devel] openafs spec-file kernel-detection
Derek Atkins
warlord@MIT.EDU
Tue, 16 May 2006 09:45:45 -0400
Hi,
Alexander Bergolth <leo@strike.wu-wien.ac.at> writes:
> Thanks.
> Another issue that I noticed is the way how the kernel-depencency is
> specified in the spec-file:
> Requires: kernel = %{kversion}
>
> Current kernels provide the kernel capability for both only <version>
> and <version>-<release>:
Current kernels, yes, but not older kernels. For example, on RHEL3:
[root@vmware-rhel3 root]# rpm -q --provides kernel
kernel = 2.4.21
kernel-drm = 4.1.0
kernel-drm = 4.2.0
kernel-drm = 4.3.0
kernel = 2.4.21-4.EL
> Unfortunately the first capability causes rpm to register a general
> capability for 2.6.16 regardless of the exact release and renders the
> last capability (kernel = 2.6.16-1.2111_FC5, including the
> release-string) effectless. See
> http://distro.conectiva.com.br/pipermail/apt-rpm/2003-August/001951.html
Well, I do use kernel{,-smp} = {kvers}-{krel} -- so it does put
kernel-smp = 2.4.21-4.EL
into the RPM for SMP kernels. So technically I'm not using the first
capability, I'm using the "last" capability. Looking at the FC1
OpenAFS RPMs it looks like the dependency isn't quite right, but it
seems to work anyways. The OpenAFS kernel RPM there has:
kernel = 2.4.22-1.2155
Whereas the kernel itself provides:
kernel = 2.4.22-1.2155.nptl
I'm fairly sure that this is fixed by your patch to openafs-kvers-is.sh
so I'm not too worried about it.
> The Fedora Extras kernel module guidelines suggest that kernel modules
> should require "kernel-%{_target_cpu} = ${verrel}${variant}", like
> Requires: kernel-i686 = 2.6.14-1.1776_FC4
>
> See http://www.fedoraproject.org/wiki/Packaging/KernelModules for details.
Oh, I know all about that. I just can't follow it because it doesn't
exist on all the platforms I support.
> Since the kernels provide only the exact "<version>-<release>" string
> for "kernel-%{_target_cpu}" (see above), dependency checks should work
> using this approach.
Unfortunately because not all OSes I support use this feature I cannot
use it. So until I drop support for RHEL3 (and FC1) then I cannot
switch over to using the kernel-%{_target_cpu} requirement, because it
just wont work.
Sorry.
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord@MIT.EDU PGP key available