Hi all, I would like to rebuild a kmod.src.rpm package for a specific kernel. When I try to do it, this message appears: Building target platforms: i686 Building for target i686 error: Failed build dependencies: kernel-xen-devel-i686 = 2.6.18-98.el5 is needed by mymodule-kmod-0.1.5-2.i686 kernel-PAE-devel-i686 = 2.6.18-98.el5 is needed by mymodule-kmod-0.1.5-2.i686. Is it possible to rebuild kmod.src.package only for certain kernel?? i don't need to rebuild this module for kernel-xen or kernel-PAE only for kernel-i686 ... Thanks. -- CL Martinez carlopmart {at} gmail {d0t} com
Nicolas Thierry-Mieg
2009-Jun-11 09:22 UTC
[CentOS] OT: rebuild kmod rpm package from src.rpm
carlopmart wrote:> Hi all, > > I would like to rebuild a kmod.src.rpm package for a specific kernel. > When I try to do it, this message appears: > > Building target platforms: i686 > Building for target i686 > error: Failed build dependencies: > kernel-xen-devel-i686 = 2.6.18-98.el5 is needed by > mymodule-kmod-0.1.5-2.i686 > kernel-PAE-devel-i686 = 2.6.18-98.el5 is needed by > mymodule-kmod-0.1.5-2.i686. > > Is it possible to rebuild kmod.src.package only for certain kernel?? i > don't need to rebuild this module for kernel-xen or kernel-PAE only for > kernel-i686 ... >Never done this for kmods, but I would try rpm -ivh the srpm, then edit the SPEC file to keep only the i686 stuff. then rpmbuild -ba your new specfile. This should be done as a regular user, see http://wiki.centos.org/HowTos/SetupRpmBuildEnvironment HTH
carlopmart wrote:> Hi all, > > I would like to rebuild a kmod.src.rpm package for a specific kernel. > When I try to do it, this message appears: > > Building target platforms: i686 > Building for target i686 > error: Failed build dependencies: > kernel-xen-devel-i686 = 2.6.18-98.el5 is needed by > mymodule-kmod-0.1.5-2.i686 > kernel-PAE-devel-i686 = 2.6.18-98.el5 is needed by > mymodule-kmod-0.1.5-2.i686. > > Is it possible to rebuild kmod.src.package only for certain kernel?? i > don't need to rebuild this module for kernel-xen or kernel-PAE only for > kernel-i686 ... > > Thanks.Somewhere in your spec file there is a kvariant defined, looks like this> # Define the variants for each architecture. > %define basevar "" > %ifarch i686 > %define paevar PAE > %endif > %ifarch i686 x86_64 > %define xenvar xen > %endif > > # If kvariants isn't defined on the rpmbuild line, build all variants for this $ > %{!?kvariants: %define kvariants %{?basevar} %{?xenvar} %{?paevar}}edit these lines to your needs in your case I would change it to this and it should work> # Define the variants for each architecture. > %define basevar "" > %ifarch i686 > #%define paevar PAE > %endif > %ifarch i686 x86_64 > %define xenvar xen > %endif > > # If kvariants isn't defined on the rpmbuild line, build all variants > %{!?kvariants: %define kvariants %{?basevar}}-- Toshaan <toshlinux at gmail.com> - http://www.toshaan.be
On Thu, Jun 11, 2009 at 1:55 AM, carlopmart<carlopmart at gmail.com> wrote:> Hi all, > > ?I would like to rebuild a kmod.src.rpm package for a specific kernel. > When I try to do it, this message appears: > > Building target platforms: i686 > Building for target i686 > error: Failed build dependencies: > ? ? ? ? ?kernel-xen-devel-i686 = 2.6.18-98.el5 is needed by > mymodule-kmod-0.1.5-2.i686 > ? ? ? ? kernel-PAE-devel-i686 = 2.6.18-98.el5 is needed by > mymodule-kmod-0.1.5-2.i686. > > ?Is it possible to rebuild kmod.src.package only for certain kernel?? i > don't need to rebuild this module for kernel-xen or kernel-PAE only for > kernel-i686 ...This CentOS wiki is for you: http://wiki.centos.org/HowTos/BuildingKernelModules Please go to section 3. Building a kernel module rpm package (kmod). There are some example lines near the end. This one may be of help: "In a similar fashion, you may select which kernel-variant kmod package(s) to build. For example: [user at host SPECS]$ rpmbuild -bb --target=`uname -m` --define 'kvariants ""' cifs-kmod.spec 2> build-err.log | tee build-out.log will build just the base-kernel kmod package. " Akemi