[ATrpms-devel] suspend2 kernel provides
Alexander Bergolth
leo at strike.wu-wien.ac.at
Mon May 15 21:39:18 CEST 2006
On 05/15/2006 05:34 PM, Axel Thimm wrote:
> On Mon, May 15, 2006 at 04:59:05PM +0200, Alexander Bergolth wrote:
>>I noticed that the suspend2-kernels are providing something like
>>kernel-suspend2 = 2.6.16-1.2111_1.99.rhfc5.cubbi_suspend2_8k
>>instead of
>>kernel = 2.6.16-1.2111_1.99.rhfc5.cubbi_suspend2_8k
>>(The same applies to kernel-suspend2-smp vs. kernel-smp.)
>>
>>This leads to problems when compiling external kernel-modules like
>>openafs (sorry axel ;)) as they, of course, all have
>>Requires: kernel = %{kversion}
>>instead of
>>Requires: kernel-suspend2 = %{kversion}
>>... in their spec-files.
>
> That's broken anyhow, because any kernel 2.6.16 will satify it. That's
> why kmdls don't rely on the kernel Provides. So your best bet is to
> remove that dependency from the specfile.
If the kernel-module requires kernel =
2.6.16-1.2111_1.99.rhfc5.cubbi_suspend2_8k, only a kernel with that
loong version-string (including ...cubbi_suspend2_8k) will satisfy the
dependency. Or am I missing something?
>>Is there a reason why you named it kernel-suspend2 instead of just kernel?
>
> Yes, so it can live in the stable section. Otherwise it would be
> installed by on every ATrpms user as the default kernel.
I did mean the name of the _capability_ that it provides, not the name
of the rpm. If you only add
Provides: kernel = 2.6.16-1.2111_1.99.rhfc5.cubbi_suspend2_8k
instead of
Provides: kernel-suspend2 = 2.6.16-1.2111_1.99.rhfc5.cubbi_suspend2_8k
but still name the RPM kernel-suspend2-..., the package won't be
considered as
an upgrade, will it??? (At last unless the second package defines an
obsoletes-tag.)
I did some basic tests to verify my assertion, at least apt and smart
will not suggest to upgrade a package if there is another one with a
different name that provides a higher version of the same capability:
$ rpm -qp --provides rpmtest-1-1.i386.rpm
rpmtest = 1-1
$ rpm -qp --provides rpmtest-alternative-2-1.i386.rpm
rpmtest = 2-1
rpmtest-alternative = 2-1
If rpmtest-1-1 is installed, apt and smart won't consider
rpmtest-alternative as an upgrade even though it provides a higher
version of the same capability.
>>I believe there should be at least an additional
>>Provides: kernel = %{suspend2version}
>>... to avoid having to rewrite all third party spec-files...
>
> Only the broken specfiles :)
No, that's unfair. You cannot expect a third party rpm-packager to know
that you are building _kernel_-rpms that provide kernel-suspend2 instead
of kernel.
> Maybe you'd like to get openafs into ATrpms with a proper kmdl? Once
> integrated, kmdls for new kernels will automatically be generated
> inclusing suspend2 kernels.
I'd really like to do that but I don't believe it is the right way to
modify every third party src-rpm (if it's not really necessary). The
OpenAFS kernel module requires any kernel to be built against. The
kernel-suspend2 kernels satisfy this requirement, so why should the
OpenAFS-module require kernel-suspend2 instead of kernel =
2.6.16-1.2111_1.99.rhfc5.cubbi_suspend2_8k?
The solution I'm using now is: I'm building an openafs-kernel-module
using an unmodified version of the spec-file. This leads to an rpm with
the requirement "kernel-smp =
2.6.16-1.2111_1.99.rhfc5.cubbi_suspend2_8k". Then I'm using the
following "bridging"-rpm to satisfy the dependency:
$ rpm -q --requires dummy-kernel-suspend2 |grep kernel
kernel-suspend2-smp = 2.6.16-1.2111_1.99.rhfc5.cubbi_suspend2_8k
$ rpm -q --provides dummy-kernel-suspend2 |grep kernel
kernel-smp = 2.6.16-1.2111_1.99.rhfc5.cubbi_suspend2_8k
dummy-kernel-suspend2 = 2.6.16-1.2111_1.99.rhfc5.cubbi_suspend2_8ksmp
But this kludge wouldn't be necessary if the kernel-suspend2 rpm would
provide kernel-smp = 2.6.16-1.2111_1.99.rhfc5.cubbi_suspend2_8k.
Cheers,
--leo
--
-----------------------------------------------------------------------
Alexander.Bergolth at wu-wien.ac.at Fax: +43-1-31336-906050
Zentrum fuer Informatikdienste - Wirtschaftsuniversitaet Wien - Austria
More information about the atrpms-devel
mailing list