public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: Mike Marciniszyn <mike.marciniszyn@intel.com>
Cc: linux-kbuild@vger.kernel.org, mmarcini@yahoo.com
Subject: Re: [PATCH v6] kbuild: fix error when building from src rpm
Date: Sun, 23 Jun 2013 22:29:19 +0200	[thread overview]
Message-ID: <51C75A9F.4080401@suse.cz> (raw)
In-Reply-To: <20130607162533.19157.25779.stgit@phlsvslse11.ph.intel.com>

Hi Mike, sorry for the late feedback.

Dne 7.6.2013 18:25, Mike Marciniszyn napsal(a):
> The following issue can be reproduced with Linus' tree on
> and 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>
> ---
>  Makefile               |    6 ++++++
>  scripts/package/mkspec |    1 +
>  2 files changed, 7 insertions(+)
> 
> diff --git a/Makefile b/Makefile
> index cd11e88..5b2217c 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1275,6 +1275,12 @@ clean: $(clean-dirs)
>  		-o -name modules.builtin -o -name '.tmp_*.o.*' \
>  		-o -name '*.gcno' \) -type f -print | xargs rm -f
>  
> +# For probing for image name
> +# ---------------------------------------------------------------------------
> +.PHONY += image_name

The variable name is without the leading dot.


> +image_name: FORCE
> +	@echo $(KBUILD_IMAGE)

There is no need for FORCE, after you properly mark the target as phony.
Also, please move it next to the similar 'kernelrelease' and
'kernelversion' targets.

Michal

  parent reply	other threads:[~2013-06-23 20:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-07 16:25 [PATCH v6] kbuild: fix error when building from src rpm Mike Marciniszyn
2013-06-07 16:27 ` Marciniszyn, Mike
2013-06-23 20:29 ` Michal Marek [this message]
2013-06-24 12:54   ` Marciniszyn, Mike

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51C75A9F.4080401@suse.cz \
    --to=mmarek@suse.cz \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=mike.marciniszyn@intel.com \
    --cc=mmarcini@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox