On Sat, 27 Jul 2019 14:57:43 +0200
Stefan Seyfried
Am 27.07.19 um 13:55 schrieb Michal Suchánek:
On Sat, 27 Jul 2019 11:36:36 +0200 Michal Suchánek
wrote: On Fri, 26 Jul 2019 13:55:34 -0500 Larry Finger
wrote: On 7/26/19 1:20 PM, Michal Suchánek wrote:
On Fri, 26 Jul 2019 11:56:47 -0500 Larry Finger
wrote: What is the magic incantation needed for the VirtualBox spec file so that the kernel modules in the virtualbox-host-kmp package will be built when the kernel changes?
I thought this was being done correctly, but situations such as noted in boo#1142995 keep popping up.
There is a magic incantation in kernel-default-base that reportedly works for Factory. For Leap release repos you need to arrange something with Maintenanace because released packages are not rebuilt otherwise. Technically it should not be required for the release repos, either.
Actually, the failure noted above was for Tumbleweed.
In Factory Virtualbox KMPs should already depend on the kernel version they were built against and become uninstallable when the kernel changes. However, it is not OBS itself checking this rebuild condition. There is a bot somewhere which checks this and rebuilds the packages from time to time. Apparently you can get broken packages released or completely broken Factory due to bad timing. Having a snapshot always checked for uninstallable packages before it is released should be doable, though.
And it is done but Virtualbox has been the single KMP that does not have the dependency that triggers the rebuild. This looks like a bug in Virtualbox itself. There are KMP macros provided by kernel that add dependency on kernel version in Factory/TW and kernel symbols on Leap.
The problem AFAICS is, that virtualbox provides two KMP packages, for host and guest. The macros cannot handle that from what I can see (but I might be not reading them correctly).
Then just split it into multiple specfiles. There are actually two ways to do it: one with multiple spec files and package links, another with multibuild. Either way will simplify your speci file significantly leading to easier maintenance in the long run. Clearly the KMP macros are not used by Vbox because it is installed in different location: /lib/modules/5.1.16-1-default /lib/modules/5.1.16-1-default/extra /lib/modules/5.1.16-1-default/extra/vboxdrv.ko /lib/modules/5.1.16-1-default/extra/vboxnetadp.ko /lib/modules/5.1.16-1-default/extra/vboxnetflt.ko /lib/modules/5.1.16-1-default/extra/vboxpci.ko /lib/modules/5.2.1-1-default /lib/modules/5.2.1-1-default/updates /lib/modules/5.2.1-1-default/updates/crash.ko That aside the dependency on the current kernel version should be added to any packages that ship kernel modules regardless of the macro used so long as they are recognized by the rpm fint-requires.ksyms script. Clearly the dependency was added neither to vbox nor other KMPs: rpm -q --requires virtualbox-host-kmp-default-6.0.8_k5.1.16_1-3.2.x86_64 ; echo --- ; rpm -q --requires crash-kmp-default-7.2.6_k5.2.1_1-191.14.x86_64 /bin/sh /bin/sh /bin/sh /bin/sh coreutils grep kernel-default rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(PayloadIsXz) <= 5.2-1 --- /bin/sh /bin/sh /bin/sh /bin/sh coreutils grep kernel-default rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(PayloadIsXz) <= 5.2-1 Which begs the question why is crash rebuilt but Virtualbox not. Thanks Michal -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org