[OpenAFS-devel] Do depmod for correct kernel version on kernel module post-install

Derek Atkins warlord@MIT.EDU
Fri, 18 Nov 2005 12:40:20 -0500


I'm sure it works fine for 2.6 builds..  It's 2.4 that worries me.

%{kxmoddir} is sometimes modified..  (see the files section).
Perhaps I need to duplicate the files section into the depmod.
I suspect that would do the right thing in all cases.

-derek

Quoting Mike Polek <mike@pictage.com>:

> I tested it with 2.6.13-1.1532_FC4smp and 2.6.13-1.1532_FC4, and it
> worked just fine.
>
> I assumed that the definition of kxmoddir is correct in the .spec file:
>
> %define kxmoddir %{kmoddir}/%{kernvers}
>
> and I assumed that the directories under /lib/modules accurately
> match the output of `uname -r`.
>
> According to the depmod man page:
> ---
>   If a version is provided, then that kernel version's  module  directory
>   is  used, rather than the current kernel version (as returned by
>   "uname -r").
> ---
>
> However, I haven't tested it on various platforms that might use the
> same/similar spec file. And I didn't test it with a 2.4 kernel. In order
> for me to be 100% sure, I'd have to test it for all relevant scenarios.
> But at the very least, if when installing for the running kernel
> the %{kernvers} variable matches, then it shouldn't break anything
> for the case in which it currently operates correctly.
>
> Thanks,
> Mike
>
> Derek Atkins wrote:
>> Are you sure this works for the -smp (et al) packages?  I /suspect/ it will
>> work, but I'm not 100% sure.  I've added it in, but I'm not 100% 
>> convinced it
>> will work on both 2.4 and 2.6, especially when trying to build the various
>> modules for the different kernel types.
>>
>> -derek
>>
>> Quoting Mike Polek <mike@pictage.com>:
>>
>>> Not sure if this should go here, or to the -bugs list. Sorry if
>>> it's the wrong one.
>>>
>>> In the openafs.spec file for building the RPMs, it's set up to
>>> do a "depmod -ae" when the kernel module is installed. However,
>>> it assumes that the module being installed is for the running
>>> kernel. We're doing automated installs where we install the new
>>> kernel and the openafs kernel module RPMs at the same time, while
>>> running under the old kernel. I believe the following patch to
>>> the openafs.spec file will update the depmod.* files for the
>>> install kernel vs. the running kernel when installing a new
>>> kernel module RPM.
>>>
>>> Thanks!!
>>> Mike
>
> -- 
> Michael Polek
> Manager of System Operations
> Pictage, Inc.
> 1580 Francisco Street, Ste. 101
> Torrance, CA 90501
> (310) 525-1600 ext. 628
> mike@pictage.com
> Czar of all the Russias
> --
> Opinions are my own and do not necessarily reflect those
> of the company. Viewer discretion is advised.
> Please do not make any inferences about what is in this email
> beyond what is stated. If there is any unclarity in this email,
> please ask the author of the email for clarification. Any assumptions
> about the content of this email or what it means are solely the
> responsibility of the reader.
> E Pluribus Unum. Annuit Coeptis. Novus Ordo Seclorum.
>
> Confidentiality Notice:
>
> This message, together with any attachments, is intended only for the use of
> the individual or entity to which it is addressed. It may contain
> information that is confidential and prohibited from disclosure. If you are
> not the intended recipient, you are hereby notified that any dissemination
> or copying of this message or any attachment is strictly prohibited. If you
> have received this item in error, please notify the original sender and
> destroy this item, along with any attachments.
> _______________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-devel
>



-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available