0

I have written a module that gets distributed as a .deb file and rebuilt with kernel updates using DKMS. What I would like is to be able to restrict the system from upgrading the kernel beyond what the module can be compatible with. For example, the module should be rebuilt for any kernel upgrade up to 4.19.1. Ideally, this would be built into .deb file but a second solution would just be restricting the system from installing kernels beyond a certain version. a third option would be presenting the user with a warning that the module won't work with the kernel version being installed.

In the past the driver was installed manually and had to be rebuilt with each kernel update which the user was unaware of. The source file header checked the kernel version for compatibility and wouldn't build if it was outside the allowed kernel range.

  • Deb packages have version dependency as equal, newer than, older than. – 0andriy Jul 17 '19 at 21:09
  • The problem with your question is you use the terms 'system' and 'the user' interchangeably, all the while them being synonymous with ... root. You really can't restrict root -- just advise her. –  Jul 17 '19 at 21:19
  • BUILD_EXCLUSIVE_KERNEL=[regex] solves the problem partially by restricting DKMS from trying to build the module on incompatible kernels. If I couple this with a dpkg restriction on what kernels can be installed, it is a decent solution – SeattleRainDog Jul 17 '19 at 23:35

0 Answers0