Bug 1186927 - Broken Kernel symlinks due to usrmerge ...
Summary: Broken Kernel symlinks due to usrmerge ...
Status: RESOLVED DUPLICATE of bug 1186710
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Kernel (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Critical (vote)
Target Milestone: ---
Assignee: openSUSE Kernel Bugs
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-07 10:47 UTC by Stefan Dirsch
Modified: 2021-06-07 11:15 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Dirsch 2021-06-07 10:47:13 UTC
:/usr/lib/modules/5.12.9-1-default # ll
total 0
lrwxrwxrwx 1 root root 50 Jun  3 23:57 build -> ../../../usr/src/linux-5.12.9-1-obj/x86_64/default
lrwxrwxrwx 1 root root 31 Jun  3 23:57 source -> ../../../usr/src/linux-5.12.9-1

:/usr/lib/modules/5.12.9-1-default # ll source
lrwxrwxrwx 1 root root 31 Jun  3 23:57 source -> ../../../usr/src/linux-5.12.9-1

:/usr/lib/modules/5.12.9-1-default # cd ../../../usr/src/linux-5.12.9-1
bash: cd: ../../../usr/src/linux-5.12.9-1: No such file or directory

Due to this nvidia driver build fails now in TW. :-(

For now I workarounded the issue in the build.

+%if 0%{?suse_version} >= 1550
+    src=/usr/src/linux-$(make %{?jobs:-j%jobs} -siC %{kernel_source $flavor} kernelrelease | cut -d "-" -f 1,2)
+%else
     src=/lib/modules/$(make %{?jobs:-j%jobs} -siC %{kernel_source $flavor} kernelrelease)/source
+%endif
     rm -rf obj/$flavor
     cp -r source obj/$flavor
     make %{?jobs:-j%jobs} -C /usr/src/linux-obj/%_target_cpu/$flavor modules M=$PWD/obj/$flavor/%{version} SYSSRC="$src" SYSOUT=/usr/src/linux-obj/%_target_cpu/$flavor
@@ -215,7 +219,11 @@
 export INSTALL_MOD_PATH=%{buildroot}
 export INSTALL_MOD_DIR=updates
 for flavor in %flavors_to_build; do
+%if 0%{?suse_version} >= 1550
+    export SYSSRC=/usr/src/linux-$(make %{?jobs:-j%jobs} -siC %{kernel_source $flavor} kernelrelease | cut -d "-" -f 1,2)
+%else
     export SYSSRC=/lib/modules/$(make %{?jobs:-j%jobs} -siC %{kernel_source $flavor} kernelrelease)/source
+%endif
     make %{?jobs:-j%jobs} -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install M=$PWD/obj/$flavor/%{version}
     #install -m 644 $PWD/obj/$flavor/%{version}/{nv-linux.o,nv-kernel.o} \
     #  %{buildroot}/lib/modules/*-$flavor/updates
Comment 1 Stefan Dirsch 2021-06-07 11:05:23 UTC
That's really only a temporary workaround. Things may fail at any time, e.g. it doesn't work for Devel:Kernel:Master

[...]
+ make -j16 -f Makefile nv-linux.o SYSSRC=/usr/src/linux-5.13.0-rc5 SYSOUT=/usr/src/linux-obj/x86_64/default
[   97s] make[1]: *** /usr/src/linux-5.13.0-rc5: No such file or directory.  Stop.
[...]
Comment 2 Stefan Dirsch 2021-06-07 11:15:18 UTC
Duplicate.

*** This bug has been marked as a duplicate of bug 1186710 ***