diff options
author | Mike Marciniszyn <mike.marciniszyn@intel.com> | 2013-06-24 08:48:37 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2013-06-24 15:26:14 +0200 |
commit | c398ff00f55d56bec8eb116e9ad3d226998230fa (patch) | |
tree | 73752c6ec9b6eaee37f9b61eb0c90744504e26c8 /scripts/package | |
parent | cdf2bc632ebc9ef512345fe8e6015edfd367e256 (diff) | |
download | lwn-c398ff00f55d56bec8eb116e9ad3d226998230fa.tar.gz lwn-c398ff00f55d56bec8eb116e9ad3d226998230fa.zip |
kbuild: fix error when building from src rpm
The following issue can be reproduced with Linus' tree on
an x86_64 server.
>+ cp /home/user/rpmbuild-test/BUILDROOT/kernel-3.9.2.x86_64/boot/vmlinuz-3.9.2
>cp: missing destination file operand after
>/home/user/rpmbuild-test/BUILDROOT/kernel-3.9.2-1.x86_64/boot/vmlinuz-3.9.2'
>Try `cp --help' for more information.
>error: Bad exit status from /var/tmp/rpm-tmp.R4o0iI (%install)
Here are the commands to reproduce:
make defconfig
make rpm-pkg
Use the resulting src rpm to build as follows:
mkdir ~/rpmbuild-test
cd ~/rpmbuild-test
rpmbuild --rebuild --define "_topdir `pwd`" -vv ~/rpmbuild/SRPMS/kernel-3.10.0_rc1+-1.src.rpm
The issue is because the %install script uses $KBUILD_IMAGE and it hasn't
been set since it is only available in the kbuild system and not in the
%install script.
This patch adds a Makefile target to emit the image_name that can be used
and modifies the mkspec to use the dynamic name in %install.
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/package')
-rwxr-xr-x | scripts/package/mkspec | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/package/mkspec b/scripts/package/mkspec index fbbfd08853d3..fdd3fbf4d4a4 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -74,6 +74,7 @@ echo "" fi echo "%install" +echo 'KBUILD_IMAGE=$(make image_name)' echo "%ifarch ia64" echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi $RPM_BUILD_ROOT/lib/modules' echo 'mkdir -p $RPM_BUILD_ROOT/lib/firmware' |