[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Depending on kernel >= 2.6



On Thu, 02 Sep 2004 10:34:16 -0600, Gunnar Wolf wrote:
[...]
> 
> - How can I mark a package to depend on having kernel 2.6 or higher?
>   Even more, how can I make it build-depend on it? (If I am not
>   mistaken, I will only need a kernel 2.6.x installed in order to
>   build, even though the system can be running 2.4.x)

Build-dep on linux-kernel-headers.  This package contains 2.6 kernel
headers for glibc to use, and contains epoll stuff.

> - What naming scheme should I use? Cherokee's upstream suggests 
>   libcherokee-base and libcherokee-base-epoll 
> - Just to check on how they manage to do this: Do any such packages
>   currently exist? Please point me to an example so I can base my work
>   on them (I checked module-init-tools/modutils, but what they have is
>   a conflicts: - I would much prefer a cleaner, more generic solution)
> 
> Greetings,

Instead of having two separate packages, I would recommend changing the
source (or convincing upstream to do so) to detect epoll support at
runtime.  If epoll support is there, the program can use it; otherwise, it
can fall back to something else.  If that's not a possibility, you could
do something similar to what lvm-common does; it provides a wrapper for
lvm10 and lvm2, running the proper version depending on what kernel driver
is loaded.  A scheme like that could be modified to run the epoll-capable
binaries if the running kernel supports epoll; otherwise, fall back to
other binaries.

A simplistic let-the-user-choose system is destined to be buggy
(especially if the two packages conflict); upgrading from 2.4 -> 2.6, or
switching between kernels means the binary will break on the kernel it's
not designed for.




Reply to: