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

Derek Atkins warlord@MIT.EDU
Thu, 17 Nov 2005 22:32:42 -0500


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
>
> -------------------------------------------------------------
>
> --- openafs.spec        2005-10-23 06:56:21.000000000 -0700
> +++ openafs.spec.corrected_depmod       2005-11-17 18:27:53.000000000 -0800
> @@ -1110,37 +1110,37 @@
>
>  %if %{up_package}
>  %post kernel
> -/sbin/depmod -ae
> +/sbin/depmod -ae %{kernvers}
>
>  %postun kernel
> -/sbin/depmod -ae
> +/sbin/depmod -ae %{kernvers}
>
>  %endif
>  %if %{smp_package}
>
>  %post kernel-smp
> -/sbin/depmod -ae
> +/sbin/depmod -ae %{kernvers}
>
>  %postun kernel-smp
> -/sbin/depmod -ae
> +/sbin/depmod -ae %{kernvers}
>
>  %endif
>  %if %{bigmem_package}
>
>  %post kernel-bigmem
> -/sbin/depmod -ae
> +/sbin/depmod -ae %{kernvers}
>
>  %postun kernel-bigmem
> -/sbin/depmod -ae
> +/sbin/depmod -ae %{kernvers}
>
>  %endif
>  %if %{hugemem_package}
>
>  %post kernel-hugemem
> -/sbin/depmod -ae
> +/sbin/depmod -ae %{kernvers}
>
>  %postun kernel-hugemem
> -/sbin/depmod -ae
> +/sbin/depmod -ae %{kernvers}
>
>  %endif
>  %endif
>
> -------------------------------------------------------------
>
> -- 
> 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