Our dkms is quite old and since it contains a lot of patches it needs a lot of love before we can update it. Scheduled for MGA10. https://github.com/dell/dkms/releases
Target Milestone: --- => Mageia 10
Thanks for the comment, Stig. Forwarding to the kernel people.
Assignee: bugsquad => kernel
Source RPM: (none) => dkms-2.0.19-46.mga9.src.rpm
See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=17198CC: (none) => j.alberto.vc
CC: (none) => ngompa13
I will try to give a hand on this, but I don't know how far I can go
Created attachment 14222 [details] 1st Try of spec for dkms 3.0.12 I part from the work done in https://svnweb.mageia.org/packages/cauldron/dkms/branches/WIP/current/ And also the spec for dkms 3.0.12 in fedora, I have to redo some mageia patches and drop a lot that can't be imported to this version due lot of changes in sources Of course my work need revision, but I install the produced rpm, reboot my system, uninstall and reinstall a dkms module and look normal for me
Created attachment 14223 [details] dkms 3.0.12 version of symvers pacth
Created attachment 14224 [details] dkms 3.0.12 version of norpm patch
Created attachment 14225 [details] dkms 3.0.12 versionof detect-Mageia patch
Attachment 14223 description: dkms 3.0.12 version of this pacth => dkms 3.0.12 version of symvers pacth
CC: (none) => geex+mageia
I was using the created package but the modules are not rebuilt when new kernels are installed, and fail when I do by hand, so I need to do more test/research
This version have /usr/lib/dkms/dkms_autoinstaller that is very different of our current /usr/sbin/dkms_autoinstaller I need to do some test but look like if we succeed to update to this branch we also must modify the dkms_autoinstaller line in the kernel spec
Created attachment 14344 [details] Some corrections to the spec I did try to reproduce the messages in plymouth when the module is builded on boot time but not works, also an alias in the new dkms_autoinstaller is not working I did perform some test and this time all seems working For kernels is needed change in the spec if [ -z "$DURING_INSTALL" ] ; then %if %{versionednamingscheme} if [ -x /usr/sbin/dkms_autoinstaller -a -d /usr/src/kernel-%{kversion}-$kernel_flavour-%{buildrpmrel} ]; then /usr/sbin/dkms_autoinstaller start %{kversion}-$kernel_flavour-%{buildrpmrel} %else if [ -x /usr/sbin/dkms_autoinstaller -a -d /usr/src/kernel-%{kversion}-$kernel_flavour-%{rpmrel} ]; then /usr/sbin/dkms_autoinstaller start %{kversion}-$kernel_flavour-%{rpmrel} %endif fi fi By if [ -z "$DURING_INSTALL" ] ; then %if %{versionednamingscheme} /usr/libexec/dkms_autoinstaller start %{kversion}-$kernel_flavour-%{buildrpmrel} %else /usr/libexec/dkms_autoinstaller start %{kversion}-$kernel_flavour-%{rpmrel} %endif fi Or if you wish you can replace /usr/libexec/dkms_autoinstaller start by /sbin/dkms autoinstall --kernelver
Attachment 14222 is obsolete: 0 => 1
(In reply to katnatek from comment #9) > Created attachment 14344 [details] > Some corrections to the spec > > I did try to reproduce the messages in plymouth when the module is builded > on boot time but not works, also an alias in the new dkms_autoinstaller is > not working > > I did perform some test and this time all seems working > > For kernels is needed change in the spec > > if [ -z "$DURING_INSTALL" ] ; then > %if %{versionednamingscheme} > if [ -x /usr/sbin/dkms_autoinstaller -a -d > /usr/src/kernel-%{kversion}-$kernel_flavour-%{buildrpmrel} ]; then > /usr/sbin/dkms_autoinstaller start > %{kversion}-$kernel_flavour-%{buildrpmrel} > %else > if [ -x /usr/sbin/dkms_autoinstaller -a -d > /usr/src/kernel-%{kversion}-$kernel_flavour-%{rpmrel} ]; then > /usr/sbin/dkms_autoinstaller start > %{kversion}-$kernel_flavour-%{rpmrel} > %endif > fi > fi > > By > > if [ -z "$DURING_INSTALL" ] ; then > %if %{versionednamingscheme} > /usr/libexec/dkms_autoinstaller start > %{kversion}-$kernel_flavour-%{buildrpmrel} > %else > /usr/libexec/dkms_autoinstaller start > %{kversion}-$kernel_flavour-%{rpmrel} > %endif > fi > > Or if you wish you can replace /usr/libexec/dkms_autoinstaller start by > /sbin/dkms autoinstall --kernelver Take care if you choose /usr/libexec/dkms_autoinstaller of make works this alias log_daemon_msg='/bin/echo -n' Because i get complains about log_daemon_msg not found
Created attachment 14353 [details] Clean version of dkms 3 spec I add two more patchs and clean almost all the spec
Attachment 14344 is obsolete: 0 => 1
Created attachment 14354 [details] Emulate destination override in dkms 2 This need to be reviewed because is not a direct replacement, by example dkms-anbox in dkms 2 store modules in dkms/updates but this change split the mosules in dkms/ashmem_linux and dkms/binder_linux But dkms-vhba in dkms 2 store the module in dkms/vhba and this changes keep that
Created attachment 14355 [details] Patch to replace alias by functions I replace alias by functions, this works for me, but of course you can review and change
Created attachment 14434 [details] Alternative destination override patch This is most similar to behavior in dkms 2 but still not direct replace, clean installing some modules dkms 2 installs it in dkms/*/mod_name and this to dkms/kernel/*/mod_name I let to you from here , I don't know if it is possible to remove all dkms modules before update to this version and rebuild after, or handle the remove of legacy path modules to each dkms-foo spec
Created attachment 14588 [details] 3rd version of destination override patch I use sed to remove ^/kernel from the path and I think this works as expected but need test and compare with dkms2 behavior for other modules At less with dkms-vhba the destination path is the same This is the result of remove dkms-vhba still with dkms2 rpm -e --nodeps dkms-vhba -------- Uninstall Beginning -------- Module: vhba Version: 20211218-2.mga9 Kernel: 6.6.37-desktop-1.mga9 (x86_64) ------------------------------------- Status: Before uninstall, this module version was ACTIVE on this kernel. vhba.ko.xz: - Uninstallation - Deleting from: /lib/modules/6.6.37-desktop-1.mga9/dkms/vhba/ - Original module - No original module was found for this module on this kernel. - Use the dkms install command to reinstall any previous module version. depmod........ DKMS: uninstall Completed. ------------------------------ Deleting module version: 20211218-2.mga9 completely from the DKMS tree. ------------------------------ Done. Then install my dkms3 version (sorry for the output in spanish) urpmi ./RPMS/noarch/dkms-3.0.12-1.WIP.mga9.noarch.rpm SEGURIDAD: Los siguientes paquetes _NO_ están firmados (OK ((none))): ./RPMS/noarch/dkms-3.0.12-1.WIP.mga9.noarch.rpm instalando dkms-3.0.12-1.WIP.mga9.noarch.rpm desde ./RPMS/noarch Preparando... ################################################################################################## 1/1: dkms ################################################################################################## inactive 1/2: quitando dkms-2.0.19-46.mga9.noarch ################################################################################################## quitando paquete dkms-minimal-2.0.19-46.mga9.noarch 2/2: quitando dkms-minimal-2.0.19-46.mga9.noarch ################################################################################################## And install again dkms-vhba urpmi dkms-vhba Marcando dkms-vhba como instalado a mano, no se marcara como huerfano writing /var/lib/rpm/installed-through-deps.list https://mirror.math.princeton.edu/pub/mageia/distrib/9/x86_64/media/core/release/dkms-vhba-20211218-2.mga9.noarch.rpm instalando dkms-vhba-20211218-2.mga9.noarch.rpm desde /var/cache/urpmi/rpms Preparando... ################################################################################################## 1/1: dkms-vhba ################################################################################################## Creating symlink /var/lib/dkms/vhba/20211218-2.mga9/source -> /usr/src/vhba-20211218-2.mga9 The kernel is built without module signing facility, modules won't be signed Building module: Cleaning build area... make -j4 KERNELRELEASE=6.6.37-desktop-1.mga9 KDIR=/lib/modules/6.6.37-desktop-1.mga9/build..... Cleaning build area... vhba.ko.xz: Running module version sanity check. - Original module - No original module exists within this kernel - Installation - Installing to /lib/modules/6.6.37-desktop-1.mga9/dkms//vhba/ depmod..... As you see, the destination path is the same
Attachment 14434 is obsolete: 0 => 1 Attachment 14354 is obsolete: 0 => 1
I reinstall kernel server from Bug#33373 As the current dkms options in kernel spec are not compatible with dkms 3 then the module was not built when install the kernel but when reboot and select kernel server systemctl status dkms.service ● dkms.service - Builds and install new kernel modules through DKMS Loaded: loaded (/usr/lib/systemd/system/dkms.service; enabled; preset: enabled) Active: active (exited) since Thu 2024-07-11 19:41:39 CST; 3min 28s ago Docs: man:dkms(8) Process: 797 ExecStart=/usr/sbin/dkms autoinstall --verbose --kernelver 6.6.37-server-1.mga9 (code=exited, status=0/SUCCESS) Main PID: 797 (code=exited, status=0/SUCCESS) CPU: 12.230s jul 11 19:41:02 jgrey.phoenix dkms[2637]: make: se sale del directorio '/usr/src/kernel-6.6.37-server-1.mga9' jul 11 19:41:02 jgrey.phoenix dkms[1562]: vhba.ko.xz: jul 11 19:41:02 jgrey.phoenix dkms[1562]: Running module version sanity check. jul 11 19:41:06 jgrey.phoenix dkms[1562]: - Original module jul 11 19:41:06 jgrey.phoenix dkms[1562]: - No original module exists within this kernel jul 11 19:41:06 jgrey.phoenix dkms[1562]: - Installation jul 11 19:41:06 jgrey.phoenix dkms[1562]: - Installing to /lib/modules/6.6.37-server-1.mga9/dkms//vhba/ jul 11 19:41:06 jgrey.phoenix dkms[1562]: do_depmod 6.6.37-server-1.mga9 jul 11 19:41:39 jgrey.phoenix dkms[797]: dkms autoinstall on 6.6.37-server-1.mga9/x86_64 succeeded for vhba jul 11 19:41:39 jgrey.phoenix systemd[1]: Finished dkms.service.
Other side effect of migrate to this version is if you install new dkms-module the module is only build for the current kernel If you want to emulate the dkms 2 behavior, I suggest add to each dkms-module spec at end of the %post section for kernel in $(find /lib/modules/* -maxdepth 0 -type d|sed -e 's|/lib/modules/||') ; do /usr/libexec/dkms_autoinstaller start $kernel ; done