From patchwork Tue Jun 4 18:00:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Marciniszyn, Mike" X-Patchwork-Id: 2661361 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 98B833FC8C for ; Tue, 4 Jun 2013 18:00:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750767Ab3FDSAc (ORCPT ); Tue, 4 Jun 2013 14:00:32 -0400 Received: from mga01.intel.com ([192.55.52.88]:44533 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750748Ab3FDSAb (ORCPT ); Tue, 4 Jun 2013 14:00:31 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 04 Jun 2013 11:00:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,801,1363158000"; d="scan'208";a="344694358" Received: from sedona.ch.intel.com ([143.182.228.65]) by fmsmga001.fm.intel.com with ESMTP; 04 Jun 2013 11:00:47 -0700 Received: from phlsvsles11.ph.intel.com (phlsvsles11.ph.intel.com [10.228.195.43]) by sedona.ch.intel.com (8.13.6/8.14.3/Standard MailSET/Hub) with ESMTP id r54I0Rrk007156; Tue, 4 Jun 2013 11:00:27 -0700 Received: from phlsvslse11.ph.intel.com (localhost [127.0.0.1]) by phlsvsles11.ph.intel.com with ESMTP id r54I0QrC012460; Tue, 4 Jun 2013 14:00:26 -0400 Subject: [PATCH 2] kbuild: fix error when building from src rpm To: Michal Marek From: Mike Marciniszyn Cc: linux-kbuild@vger.kernel.org Date: Tue, 04 Jun 2013 14:00:26 -0400 Message-ID: <20130604180026.12438.55336.stgit@phlsvslse11.ph.intel.com> User-Agent: StGit/0.16 MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org The following issue can be reproduced with Linus' tree. + 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) make defconfig HOSTCC scripts/basic/fixdep HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/conf *** Default configuration is based on 'x86_64_defconfig' # # configuration written to .config # 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. echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" It probably isn't as simple as allowing it to come from the environment, since it might be architecture specific. This patch changes the manual install code to user the kernel's make install with an INSTALL_PATH override. installkernel with then install the files into $RPM_BUILD_ROOT/boot. Signed-off-by: Mike Marciniszyn --- scripts/package/mkspec | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/scripts/package/mkspec b/scripts/package/mkspec index fbbfd08..9b4f209 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -83,17 +83,7 @@ echo 'mkdir -p $RPM_BUILD_ROOT/lib/firmware' echo "%endif" echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{?_smp_mflags} KBUILD_SRC= modules_install' -echo "%ifarch ia64" -echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE" -echo 'ln -s '"efi/vmlinuz-$KERNELRELEASE" '$RPM_BUILD_ROOT'"/boot/" -echo "%else" -echo "%ifarch ppc64" -echo "cp vmlinux arch/powerpc/boot" -echo "cp arch/powerpc/boot/"'$KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" -echo "%else" -echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" -echo "%endif" -echo "%endif" +echo 'INSTALL_PATH=$RPM_BUILD_ROOT/boot make %{?_smp_mflags} KBUILD_SRC= 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"