Skip to content

Conversation

@scaronni
Copy link
Member

@scaronni scaronni commented Apr 22, 2025

Add a generic command that gets executed at the end of "install/uninstall" phases for modules. The post_transaction is configured in /etc/dkms/framework.conf and if set to any non-null value the command in there is executed with the kernel version that is the target of the command as the first parameter.

This can be set on a per-site or by distribution packagers of DKMS.

It's executed only at the end of commands that change the content of the kernel modules folder; so an install, autoinstall and remove|unbuild|uninstall command. When the directive is not set (the default) there is no behavior change for DKMS.

The action generates a log in the DKMS working directory using the facilities already provided by DKMS.

This originates from a need in NVIDIA for various components, (restarting services, recreating the initrd, etc.) but judging from a few Debian and Ubuntu packages I checked, this could remove all the postinst scripts that take care of calling update-initramfs, for example: https://salsa.debian.org/broadcom-sta-team/broadcom-sta/-/blob/debian/6.30.223.271-26/debian/broadcom-sta-common.postinst?ref_type=tags

@scaronni
Copy link
Member Author

Definitely open to rename post_transaction to something else.

The failures in the pipelines are unrelated to this, I'll make a separate Pull Request to fix them.

@scaronni
Copy link
Member Author

@anbe42 @amilonenv @zeroepoch opinions? Besides my use cases, I see the opportunity for removing lots of code in most DKMS packages.

@scaronni scaronni force-pushed the post-action branch 19 times, most recently from 597924b to 364e224 Compare April 25, 2025 12:17
@scaronni scaronni marked this pull request as ready for review April 25, 2025 16:43
@scaronni
Copy link
Member Author

I'm ready this one, waiting a bit more if anyone has anything to add

@scaronni scaronni force-pushed the post-action branch 6 times, most recently from 5a25a28 to c6cb871 Compare April 26, 2025 10:13
@scaronni scaronni marked this pull request as draft April 26, 2025 10:13
@scaronni scaronni marked this pull request as ready for review April 28, 2025 16:18
@scaronni scaronni merged commit f7f526c into main Apr 29, 2025
58 checks passed
@scaronni scaronni deleted the post-action branch May 7, 2025 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants