Re: How to define /lib/modules/`uname -r` in a spec file?

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

 



On Tue, 30 Mar 2004, James Olin Oden wrote:

> On Tue, 30 Mar 2004, Cameron, Thomas wrote:
> 
> > Howdy all -
> > 
> > Forgive my ingnorance, but I am fairly new to building RPMs.
> > 
> > I have built an RPM for a kernel module for Linux on the mainframe,
> > but I had to hard code /lib/modules/2.4.21-9.EL/misc in the %install
> > section of the spec file.
> > 
> > Is there a way to specify the /lib/modules/`uname -r`/misc directory
> > so that the kernel module gets put in the correct directory based on
> > the running version of the kernel?
> > 
> Yeah sure, you need to use the %() macro.  It allows you to do what
> back ticks do.  The only problem is that it will only do this at build 
> time (i.e. it evaluates the macro at build time not install time). 

Yup, you'll want to make it possible to override the target kernel 
version. There are countless gotchas in kernel module packaging, luckily 
most of them have bearable workarounds. Have a look at alsa-driver src.rpm 
at fedora.us repository for an example how to deal with various issues 
like getting the correct build flags from the kernel source, how to set 
dependencies (hint: "Requires: kernel = <version>-<release>" wont cut it 
with RH kernels) etc.

	- Panu -


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux