Kmod's new usr-lib-modules.patch breaks Vanilla kernel RPM building
I found, that the latest Tumbleweek Kmod patch usr-lib-modules.patch breaks Vanilla kernel RPM building. I use "make binrpm-pkg". This breaks the "depmod_hack_needed" hack in scripts/depmod.sh. See this example build of Linux-6.1.36: myuser@mybox:/usr/src/linux-6.1-lts/linux-6.1.36> make binrpm-pkg [...] INSTALL /home/myuser/rpmbuild/BUILDROOT/kernel-6.1.36_myuser1-1.x86_64/lib/modules/6.1.36-myuser1/kernel/sound/x86/snd-hdmi-lpe-audio.ko INSTALL /home/myuser/rpmbuild/BUILDROOT/kernel-6.1.36_myuser1-1.x86_64/lib/modules/6.1.36-myuser1/kernel/sound/xen/snd_xen_front.ko INSTALL /home/myuser/rpmbuild/BUILDROOT/kernel-6.1.36_myuser1-1.x86_64/lib/modules/6.1.36-myuser1/kernel/virt/lib/irqbypass.ko DEPMOD /home/myuser/rpmbuild/BUILDROOT/kernel-6.1.36_myuser1-1.x86_64/lib/modules/6.1.36-myuser1 depmod: ERROR: could not open directory /home/myuser/rpmbuild/BUILDROOT/kernel-6.1.36_myuser1-1.x86_64/usr/lib/modules/99.98.6.1.36-myuser1: No such file or directory depmod: FATAL: could not search modules: No such file or directory make[2]: *** [Makefile:1942: modules_install] Error 1 error: Bad exit status from /var/tmp/rpm-tmp.PiILLZ (%install) RPM build warnings: line 22: It's not recommended to have unversioned Obsoletes: Obsoletes: kernel-headers RPM build errors: Bad exit status from /var/tmp/rpm-tmp.PiILLZ (%install) There are probably multiple possible solutions or hacks. The new "depmod" uses "/usr" as a static prefix for kernel modules. This can't be disabled via command line options. I compiled kmod with usr-lib-modules.patch disabled and use "depmod" from the modified package temporary for "make binrpm-pkg". This works. Are there better solutions available? Björn
Hello, On Thu, Jun 29, 2023 at 11:40:32AM +0200, Bjoern Voigt wrote:
I found, that the latest Tumbleweek Kmod patch usr-lib-modules.patch breaks Vanilla kernel RPM building.
I use "make binrpm-pkg". This breaks the "depmod_hack_needed" hack in scripts/depmod.sh. See this example build of Linux-6.1.36:
myuser@mybox:/usr/src/linux-6.1-lts/linux-6.1.36> make binrpm-pkg [...] INSTALL /home/myuser/rpmbuild/BUILDROOT/kernel-6.1.36_myuser1-1.x86_64/lib/modules/6.1.36-myuser1/kernel/sound/x86/snd-hdmi-lpe-audio.ko INSTALL /home/myuser/rpmbuild/BUILDROOT/kernel-6.1.36_myuser1-1.x86_64/lib/modules/6.1.36-myuser1/kernel/sound/xen/snd_xen_front.ko INSTALL /home/myuser/rpmbuild/BUILDROOT/kernel-6.1.36_myuser1-1.x86_64/lib/modules/6.1.36-myuser1/kernel/virt/lib/irqbypass.ko DEPMOD /home/myuser/rpmbuild/BUILDROOT/kernel-6.1.36_myuser1-1.x86_64/lib/modules/6.1.36-myuser1 depmod: ERROR: could not open directory /home/myuser/rpmbuild/BUILDROOT/kernel-6.1.36_myuser1-1.x86_64/usr/lib/modules/99.98.6.1.36-myuser1: No such file or directory depmod: FATAL: could not search modules: No such file or directory make[2]: *** [Makefile:1942: modules_install] Error 1 error: Bad exit status from /var/tmp/rpm-tmp.PiILLZ (%install)
RPM build warnings: line 22: It's not recommended to have unversioned Obsoletes: Obsoletes: kernel-headers
RPM build errors: Bad exit status from /var/tmp/rpm-tmp.PiILLZ (%install)
There are probably multiple possible solutions or hacks. The new "depmod" uses "/usr" as a static prefix for kernel modules. This can't be disabled via command line options. I compiled kmod with usr-lib-modules.patch disabled and use "depmod" from the modified package temporary for "make binrpm-pkg". This works.
Are there better solutions available?
None yet, see https://bugzilla.opensuse.org/show_bug.cgi?id=1212835 Thanks Michal
If the original poster (or anyone else) is still interested, I've posted a patch at (https://lists.opensuse.org/archives/list/factory@lists.opensuse.org/thread/L...) along with links to other lists and to Bugzilla where fixes for the issue are being discussed.
On Thu, Jul 20, 2023 at 08:02:09PM -0000, Mark Rubin wrote:
If the original poster (or anyone else) is still interested, I've posted a patch at (https://lists.opensuse.org/archives/list/factory@lists.opensuse.org/thread/L...) along with links to other lists and to Bugzilla where fixes for the issue are being discussed.
The current kmod in Factory has a compatibility change that should address this problem. Upstream suggests to set MODLIB directly on the make commandline as a workaround. Thanks Michal
participants (3)
-
Bjoern Voigt
-
Mark Rubin
-
Michal Suchánek