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 Wed, 31 Mar 2004, Alexander Dalloz wrote:

> Am Mi, den 31.03.2004 schrieb James Olin Oden um 03:10:
> 
> > 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). 
> > 
> > Cheers...james
> 
> As far as I understand the problem is small, because it only makes sense
> to evaluate the "uname -r" string at RPM build time and not during
> installation. IT would be bad if in %install section the kernel module
> would be put into the evaluated kernel modules directory, whether it
> fits or not. This is just because a kernel module is absolutely kernel
> specific.
>
I absolutely agree, I was just explaining the limitations.
 
> The evaluation is only for doing the rpmbuild run easier, right?
>
Re-worded, scriptlets are, today, only evaluated at build time.  Someday,
when I get the time (or someone else does) they will be also, optionally,
evaluated at install time.   Still in your case, this is one you would 
only want evaluated at build time.  

Cheers...james 
> Alexander
> 
> 
> 


_______________________________________________
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