How to force dkms_autoinstaller build and install even when status=installed-weak
Matt Domsch
Matt_Domsch at dell.com
Fri May 25 15:15:20 CDT 2007
On Fri, May 25, 2007 at 01:10:49PM +0700, Fajar A. Nugraha wrote:
> Hi list,
>
> I hope this is the right place to ask this question.
>
> Short summary :
> - RHEL5 (module-init-tools-3.3-0.pre3.1.16.0.1.el5) comes with
> /etc/depmod.d/depmod.conf.dist which says "search updates extra built-in
> weak-updates"
> - "dkms install", when it's status is not already installed, will
> install modules on /lib/modules/KERNEL_VERSION/extra, ignoring
> DEST_MODULE_LOCATION (at least that is the case with
> dkms-2.0.16-1.el5.rf) which is fine.
> - "dkms install" will also call weak-modules, which in turn install
> kabi-compatible module versions to weak-updates
> - RHEL5 will ignore weak-updates if the specified module already exists
> as built-in
> - /etc/init.d/dkms_autoinstaller will ignore modules with status
> "installed-weak"
>
> So, for modules like qla2xxx, this means that when a kernel update
> occurs, weak-modules will kick in, making dkms_autoinstaller refuse to
> rebuild and install that particular version, but the kernel will not use
> the weak-update.
>
> Possible tweaking on RHEL5 side :
> - I could remove /etc/depmod.d/depmod.conf.dist. But it will be
> installed again on next update, so this is not a good option.
> - I could edit /etc/depmod.d/depmod.conf.dist. But there will be
> depmod.conf.dist.rpmnew/rpmsave on next update, which could get messy,
> so this is not a good option.
> - I could use my own version of module-init-tools, and prevent upgrades
> from upstream from this package. But I'd rather not do this unless I
> absolutely have to.
Yeah, not really what you want. Built-in should override
weak-updates, as built-in *should* be newer than weak-updates, but
there's no actual code in module-init-tools to check that.
> Possible tweaking on dkms side :
> If there's a way to force dkms_autoinstaller to build and install even
> when status=installed-weak, I'd rather use it.
>
> I'm aware that forcing dkms_autoinstaller would result in an unnecessary
> overhead to build the module, but that's fine. It would probably be
> better if it just MOVE the module from weak-updates to either updates or
> extra.
>
> Is it possible?
>
> Regards,
> Fajar
Let me propose another solution. You really want to get rid of the
installed-weak module, and instead use one from extra/. So you need
to uninstall the one from installed-weak. The easiest way is to:
# dkms remove -m $module -v $version --all
# dkms add -m $module -v $version
# dkms build -m $module -v $version -k $newkernelversion
# dkms install -m $module -v $version -k $newkernelversion
The alternative is to just have weak-modules remove the module so it's
not considered installed-weak. Then the dkms_autoinstaller will build
it again and put it into extra/.
# find /lib/modules -name qla2x00.ko | /sbin/weak-modules --remove-modules
# /etc/init.d/dkms_autoinstaller start
Not sure how to make that be automatic, or even if that's desired for the general case. Probably not.
Thanks,
Matt
--
Matt Domsch
Software Architect
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
More information about the DKMS-devel
mailing list