How can I require a minimal kernel version for a deb package?

2

I am trying to make a deb package of software for makinging a NAS out of an Ubuntu installation. The software requires kernel patches to be applied therefore the package must use a special kernel build where I have applied the patches. How can I require a minimum kernel version requirment. Right now I am basing my stuff off of kernel 2.6.38-12.51-scst. But in the future I will update the kernel to stay current as much as possible. How can I setup the deb package to allow for the current kernel and ones to follow? They will all be tagged with -scst from this point on.

ianc1215

Posted 2011-10-04T00:31:30.603

Reputation: 2 884

Answers

1

In the control file for the .deb package, you can set the dependency line to require it.

Depends: kernel (>= 2.6.38-12.51)

I do not know the exact package name, but that's an example of the line.

Simon Sheehan

Posted 2011-10-04T00:31:30.603

Reputation: 8 641

@SimonSheehan Do you need that entire version string or can I just do kernel (>= 2.6.38) as a valid check? – Chef Pharaoh – 2017-12-20T20:12:32.310

@ChefPharaoh I don't currently have a machine to test that. Let me know if it does work though! – Simon Sheehan – 2017-12-22T14:52:49.207

@SimonSheehan Yes, seems to be working with just the main build number, which is a good thing for my purpose ;) – Chef Pharaoh – 2017-12-28T18:34:01.290

@Solignis if this helped you and worked, perhaps you should mark it as the correct answer. – Simon Sheehan – 2011-10-17T01:42:44.087

Yep just, did sry about the delay. – ianc1215 – 2011-10-19T19:39:54.190