Description of problem: Recently wondered after a kernel upgrade why my wireless was not working. New kernel was installed, but new dkms modules had not been build. Then discovered that dkms_autoinstaller has not been run, which is apparently launched from mandriva-everytime.service ( /etc/init.d/mandrake_everytime ) which is masked here. This should be run from a separate service IMHO, and not from mandriva-everytime. Are there any objections on splitting out the dkms related block into a separate service in the dkms package? Like dkms-autorebuild.service or something like that? [~] grep -A3 ^DKMS_TOOL /etc/init.d/mandrake_everytime DKMS_TOOL=/usr/sbin/dkms_autoinstaller if [ "$DKMS_ONBOOT" != "no" ] && [ -x $DKMS_TOOL ]; then $DKMS_TOOL start fi Apart from that documentation is missing that this is triggered from mandriva-everytime.service and that it can be disabled via DKMS_ONBOOT=no. Reproducible: Steps to Reproduce:
Adding more people in CC, please read the proposal and add your objections or ACK.
Status: NEW => ASSIGNEDCC: (none) => doktor5000, mageia, mageia, marja11, thierry.vignaud, tmb
Yeah, the most logical place for dkms autobuild service would be to move it from mandrake_everytime to main dkms package
I agree with Thomas' comment. Feel free to move it into it's own service unit.
commit 052f95ee56dcc8cb8e815b7dadb2056caf484128 Author: doktor5000 <doktor5000@...> Date: Tue Nov 24 15:27:51 2015 +0100 Split out dkms module (re)build from mandrake_everytime The rebuild of the dkms modules should not be triggered by mandrake_everytime which is itself triggered via mandriva-everytime.service, as people might want to disable this service, as harddrake often takes a lot of time to run and hence blocks the boot. This has been split out into a separate script into the dkms package, /usr/sbin/dkms-autorebuild.sh including a systemd service that calls this on every boot and some documentation was added to the script on how to disable the dkms module rebuild. Overall the same should be done for all the other parts of mandrake_everytime to split them out into separate scripts to msec, harddrake and other affected packages after reviewing them to be able to kill mandrake_everytime legacy. mga#17194 --- Commit Link: http://gitweb.mageia.org/software/forks/initscripts/commit/?id=052f95ee56dcc8cb8e815b7dadb2056caf484128
Hopefully that first bit was OK, for the git handling I mean :) I'll commit my changes to dkms and the patch from above commit for the initscripts package and would then ask the people in CC to briefly check before I submit those.
Ok, both bits are commited now, please check: http://svnweb.mageia.org/packages?view=revision&revision=905759 and http://svnweb.mageia.org/packages?view=revision&revision=905764
And please ignore the added dkms_2.2.0.3.orig.tar.gz in sha1.lst, somehow that got in through mgarepo sync but that's nothing to do with this change. More for some future homework - after all our dkms package is totally outdated and has way too much patches that have not been upstreamed. Although there's one patch that is only partly related that might need some feedback, I don't know why it had output to stdout done this way: > /dev/stdout instead of the simple echo without redirection, but this breaks systemd logging and also looks pretty strange to me in the first place (what we had before). http://svnweb.mageia.org/packages/cauldron/dkms/current/SOURCES/dkms-2.0.19-mga-remove_dev_stdout_output_loc.patch?view=markup
No objections/feedback at all? This is what Colin mentioned briefly on IRC: > [17:07] <coling> doktor5000, also in the DKMS package, I would add both your files as actual files in the SOURCES folder rather than inline in the specs, but that's more my own stylistic thing. > [17:08] <coling> doktor5000, You can also avoid the -x $DKMS_TOOL test in the script as it's presumably in the same package now? > [17:08] <coling> doktor5000, also you don't seem to source /etc/sysconfig/system so you cannot check the DKMS_ONBOOT variable to disable it, however, I would be tempted to just deprecate this anyway. Why have a sysconfig variable to disable soemthing when you can just systemctl disable the unit? > [17:09] <coling> Ultimately, I'd just avoid the whole dkms-autorebuild.sh script and just run "ExecStart=/usr/sbin/dkms_autoinstaller start" directly in the unit. > [17:10] <coling> You can also set "Environment=verbose=yes" in the [Service] section to get the verbose logging you want. > [17:11] <coling> Lastly, is the Alias= important? Did we ever have a legacy service called dkms_autoinstaller? or is it how it's named on other popular distros? If not, just drop it! Sourcing /etc/sysconfig/system for DKMS_ONBOOT was missed, but already added that back. Using "ExecStart=/usr/sbin/dkms_autoinstaller start" instead of my separate script is also possible. I could then also add a short check during dkms %post if DKMS_ONBOOT=no is set in /etc/sysconfig/system (or if exported otherwise) and systemctl disable the new unit.
(In reply to Florian Hubold from comment #8) > No objections/feedback at all? As there have been no objections, pushed both as dkms-2.0.19-35.mga6 and initscripts-9.55-17.mga6, please report resulting breakages. I'll try to work on dkms to get it synced with current upstream, as mentioned previously.
Status: ASSIGNED => RESOLVEDResolution: (none) => FIXED
Created attachment 9073 [details] Patch to ensure mandriva-everytime runs after dkms-autorebuild There are two problems with the previous changes: 1) The patch to stop mandrake_everytime launching dkms_autoinstaller is not being applied when the initscripts package is built. This is because the patch has been added to the spec file as a Source, not as a Patch. This results in both the dkms-autorebuild and mandriva-everytime services launching dkms_autoinstaller, which causes random dkms build errors (bug 19984). 2) Once the above is fixed, the mandriva-everytime service can run and launch service_hardrake before dkms-autorebuild is finished. If a proprietary graphics driver is being built, service_harddrake will detect the driver module is not available and reconfigure the system to use the free driver. The attached patch fixes the second problem. If there are no objections, I'll push this and fix the initscripts spec file.
CC: (none) => mageia
Keywords: (none) => PATCHStatus: RESOLVED => REOPENEDBlocks: (none) => 19984Resolution: FIXED => (none)
commit 28040895254b87119947c793d52b224004a0f9f4 Author: Martin Whitaker <mageia@...> Date: Sat Mar 11 23:45:52 2017 +0000 Ensure mandriva-everytime service runs after dkms-autorebuild service (mga#17194). mandrake_everytime calls service_hardrake. If this runs before dkms has finished building a proprietary graphics driver, it will reconfigure the system to use the free driver. --- Commit Link: http://gitweb.mageia.org/software/forks/initscripts/commit/?id=28040895254b87119947c793d52b224004a0f9f4
Patches applied in subversion: http://svnweb.mageia.org/packages?view=revision&revision=1092590 This should now be fixed.
Status: REOPENED => RESOLVEDResolution: (none) => FIXED