Elan Ruusamäe glen at pld-linux.org
Mon Jul 1 09:50:45 CEST 2013

On 29.06.2013 22:17, Lukasz Glebicki wrote:
> kernel-video-nvidia package requires kernel-drm to load nvidia module.
> In the other hand this driver on kernel-longterm works without drm. How to fix
> it a SPEC or in macros?

you can't fix it in macros, because that drm dependency is package 

so, how i see it:

first you need macros, that have fixed -n option for the %kernel_releq 
macros [1]:

BuildRequires: rpmbuild(macros) >= 1.664

second, you need to put to subpackage appropriate "-drm" dependency [2]:
<http://git.pld-linux.org/?p=packages/VirtualBox.git;a=blob;f=VirtualBox.spec;h=ab8f58becdfaa010b1dc7784bfe08867083f3758;hb=0ccbe8d9c4e6f64debb5f80e79db89c2fc422791#l512>%requires_releq_kernel -n drm

and third, you can add versioned check:
%if %{ kernel_version}" > "3.4"
%requires_releq_kernel -n drm

i hope rpm can compare two vs three dot versions, if not, we need new 
macro which consists only MAJOR.MINOR of kernel version



More information about the pld-devel-en mailing list