* [PATCH] kbuild: clear KBUILD_SRC when calling 'make' in RPM spec
@ 2013-01-12 15:19 David R. Bild
2013-02-22 9:57 ` Michal Marek
0 siblings, 1 reply; 2+ messages in thread
From: David R. Bild @ 2013-01-12 15:19 UTC (permalink / raw)
To: Michal Marek; +Cc: David R. Bild, linux-kbuild, linux-kernel, trivial
From: "David R. Bild" <drbild@umich.edu>
'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>
---
scripts/package/mkspec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 4bf17dd..fbbfd08 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -95,7 +95,7 @@ echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE"
echo "%endif"
echo "%endif"
-echo 'make %{?_smp_mflags} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr headers_install'
+echo 'make %{?_smp_mflags} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr KBUILD_SRC= headers_install'
echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE"
echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] kbuild: clear KBUILD_SRC when calling 'make' in RPM spec
2013-01-12 15:19 [PATCH] kbuild: clear KBUILD_SRC when calling 'make' in RPM spec David R. Bild
@ 2013-02-22 9:57 ` Michal Marek
0 siblings, 0 replies; 2+ messages in thread
From: Michal Marek @ 2013-02-22 9:57 UTC (permalink / raw)
To: David R. Bild; +Cc: linux-kbuild, linux-kernel, trivial
On Sat, Jan 12, 2013 at 10:19:19AM -0500, David R. Bild wrote:
> From: "David R. Bild" <drbild@umich.edu>
>
> '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>
Applied to kbuild.git#misc, thanks.
Michal
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-02-22 9:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-12 15:19 [PATCH] kbuild: clear KBUILD_SRC when calling 'make' in RPM spec David R. Bild
2013-02-22 9:57 ` Michal Marek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).