Re: kernel provide 2.6.9. Too bad.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le dimanche 31 octobre 2004 à 09:54 -0500, Andrew a écrit : 
> 
> Matias Féliciano wrote:
> > Le samedi 30 octobre 2004 à 23:40 -0400, Andrew a écrit :
> > 
> [snip] -- from your unicorn.spec...
> >>Release: %{release}_%{krelver}
> >>Requires: kernel = %{kversion}
> Shouldn't that be
> Requires: kernel = %{version}-%{release}
> since you are building a module for a specific release?

The SRPMS :
unicorn-0.8.7-mat.2.src.rpm
Version = 0.8.7  (not related to the version of the kernel)
Release = mat.2

The RPMS :
kernel-module-unicorn-atm-0.8.7-mat.2_2.6.9_1.643.i686.rpm
Version : 0.8.7
Release : mat.2_2.6.9_1.643.mat.1

The release is "special". It has two parts :
mat.2 : come from the SRPMS (or .spec file)
_2.6.9_1.643.mat.1 : come from the kernel version tree used when the
package is build. '-' is forbidden in the release number. This can be
anything but should be different for each kernel.

Unlike a classic package, there is not one binary, but one per kernel
version.

Example :
I have two kernels (fixed, that is : without the "non finite" provide
"kernel = 2.6.9") :
kernel-2.6.9-1.643.mat.1
kernel-2.6.9-1.649.mat.1

And two module packages :
kernel-module-unicorn-atm-0.8.7-mat.2_2.6.9_1.643.mat.1
kernel-module-unicorn-atm-0.8.7-mat.2_2.6.9_1.649.mat.1

These two RPMS come from the same SRPMS.
kernel-module-unicorn-atm-0.8.7-mat.2_2.6.9_1.643.mat.1 is build with
kernel-2.6.9-1.643.mat.1 and require "kernel = 2.6.9-1.643.mat.1" to
work when installed. 
$ rpm -q --requires kernel-module-unicorn-atm-0.8.7-mat.2_2.6.9_1.643.mat.1 | grep kernel
kernel = 2.6.9-1.643.mat.1

Hopefully, it is the case :-)

To build a specific kernel-module-unicorn-atm :
$ rpmbuild -bb --target i686 --define "kernel 3.2.13-1" unicorn.spec
Building target platforms: i686
Building for target i686
error: Failed build dependencies:
        kernel = 3.2.13-1 is needed by unicorn-0.8.7-mat.2.i686

Ooops. I have to install kernel-3.2.13-1.

Kernel-module-unicorn-atm-0.8.7-mat.2_2.6.9_1.643.mat.1 is clearly
dedicated to kernel-2.6.9-1.643.mat.1 only :
$ rpm -q -l kernel-module-unicorn-atm-0.8.7-mat.2_2.6.9_1.643.mat.1
/lib/modules/2.6.9-1.643.mat.1/kernel/extra/unicorn_pci_atm.ko

It is completely useless without a kernel 2.6.9-1.643.mat.1 . So it
depend on a specific version of kernel. If kernel-2.6.9-1.643.mat.1 is
removed, kernel-module-unicorn-atm-0.8.7-mat.2_2.6.9_1.643.mat.1 should
be removed. Like "yum remove gtk2" will remove all packages that require
gtk2 to work properly.

In my "fixed" system, this works as expected :
$ yum remove kernel-2.6.9-1.643.mat.1
[...]
Dependencies Resolved
Transaction Listing:
  Remove: kernel.i686 0:2.6.9-1.643.mat.1

Performing the following to resolve dependencies:  <=========
  Remove: kernel-module-unicorn-atm.i686 0:0.8.7-mat.2_2.6.9_1.643.mat.1
Is this ok [y/N]: n

What append if I install the """corrupted""" Fedora kernel :
$ rpm -q kernel
kernel-2.6.9-1.649.mat.1
kernel-2.6.9-1.643.mat.1
kernel-2.6.9-1.649  <=== it's here.

$ yum remove kernel-2.6.9-1.643.mat.1
Dependencies Resolved
Transaction Listing:
  Remove: kernel.i686 0:2.6.9-1.643.mat.1
Is this ok [y/N]: n

kernel-2.6.9-1.649 ("Provides: kernel = 2.6.9") provide the requirement
for kernel-module-unicorn-atm-0.8.7-mat.2_2.6.9_1.643.mat.1 (Requires:
kernel = kernel-2.6.9-1.643.mat.1). So kernel-module-unicorn-atm-0.8.7-
mat.2_2.6.9_1.643.mat.1 is not marked as a dependency that should be
removed.

NB : "Provides: kernel = 2.6.9-1.649" give the requirement of "Requires:
kernel = 2.6.9".


Another problem (with kernel-2.6.9-1.649 installed) :
rpmbuild -bb --target i686 --define "kernel 2.6.9-999999" unicorn.spec
Building target platforms: i686
Building for target i686
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.94844
+ umask 022
+ cd /home/admin/rpmbuild/BUILD
+ LANG=C
[...]
make CC=gcc -C /lib/modules/2.6.9-999999/build
SUBDIRS=/home/admin/rpmbuild/BUILD/unicorn/unicorn_pci modules
make: *** /lib/modules/2.6.9-999999/build: No such file or directory.
Stop.


Without kernel-2.6.9-1.649
rpmbuild -bb --target i686 --define "kernel 2.6.9-999999" unicorn.spec
Building target platforms: i686
Building for target i686
error: Failed build dependencies:
        kernel = 2.6.9-999999 is needed by unicorn-0.8.7-mat.2.i686


It's a dependency problem.

> >>Release: %{release}_%{krelver}

When unicorn is build (for kernel-2.6.9-1.643.mat.1) :
%{release} = mat.2
%{krelver} = 2.6.9_1.643.mat.1

> >>Requires: kernel = %{kversion}

%{kversion} = 2.6.9-1.643.mat.1

> Shouldn't that be
> Requires: kernel = %{version}-%{release}

No. This will be replaced by :
Requires: kernel = 0.8.7-mat.2 


Ooops, my package does not support smp...

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=


[Index of Archives]     [Fedora Desktop]     [Fedora SELinux]     [Photo Sharing]     [Yosemite Forum]     [KDE Users]