Commit e0367a61567de103b1946bf87115e15253194195
Committed by
Michal Marek
1 parent
7320bfa7cf
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
kbuild: clear KBUILD_SRC when calling 'make' in RPM spec
'make rpm-pkg' and 'make binrpm-pkg' fail when the kernel source is read-only. Specifically, when the RPM spec generated by scripts/package/mkspec is run, KBUILD_SRC happens to be set to the source location and thus the invocation of 'make headers_install' fails when an internal call to 'filechk' tries to write a file into the source tree. The fix is to clear KBUILD_SRC for the 'make headers_install' invocation in the spec file, as is already done for the 'make modules_install' invocation. Signed-off-by: David R. Bild <drbild@umich.edu> Signed-off-by: Michal Marek <mmarek@suse.cz>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
scripts/package/mkspec
... | ... | @@ -95,7 +95,7 @@ |
95 | 95 | echo "%endif" |
96 | 96 | echo "%endif" |
97 | 97 | |
98 | -echo 'make %{?_smp_mflags} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr headers_install' | |
98 | +echo 'make %{?_smp_mflags} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr KBUILD_SRC= headers_install' | |
99 | 99 | echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE" |
100 | 100 | |
101 | 101 | echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE" |