[opensuse-factory] Question about VirtualBox RPMs
Hi, VirtualBox fails to build with kernel 4.16-rc1 and higher due to an incompatibility in the vboxvideo module. It seems that the modifications will be substantial. As this module is not needed for newer kernels, I would like to conditionally disable building this component whenever the kernel version is >= 4.16, or if the Kernel_HEAD_standard repo is used. Unfortunately, I have not been able to find the appropriate macro to test either of these conditions. Please point me to the appropriate documentation, or suggest an appropriate work-around. Thanks, Larry -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Hello, On Mon, 5 Mar 2018 12:11:54 -0600 Larry Finger <Larry.Finger@lwfinger.net> wrote:
Hi,
VirtualBox fails to build with kernel 4.16-rc1 and higher due to an incompatibility in the vboxvideo module. It seems that the modifications will be substantial. As this module is not needed for newer kernels, I would like to conditionally disable building this component whenever the kernel version is >= 4.16, or if the Kernel_HEAD_standard repo is used. Unfortunately, I have not been able to find the appropriate macro to test either of these conditions.
There is no macro for that. However, rpm allows executing arbitrary programs as part of macro definition. If you can write a script that your kernel-devel package is >= 4.16 you can define a macro based on output of said script and apply options/patches/... accordingly. eg %define patchversion %(rpm -q --qf '%{VERSION}' kernel-devel) # Compare the kernel version to the given argument, return value semantics # same as strcmp(3). Example: %%if %%{kver_cmp 4.8} > 0 ... %%endif %define kver_cmp() %{lua: print(rpm.vercmp(rpm.expand("%patchversion"), rpm.expand("%1")))} Thanks Michal -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (2)
-
Larry Finger
-
Michal Suchánek