From patchwork Mon Jun 8 20:19:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Davis X-Patchwork-Id: 6567921 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5FEE39F1C1 for ; Mon, 8 Jun 2015 20:19:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 566B6203A4 for ; Mon, 8 Jun 2015 20:19:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6D5D420272 for ; Mon, 8 Jun 2015 20:19:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752720AbbFHUTe (ORCPT ); Mon, 8 Jun 2015 16:19:34 -0400 Received: from mail-oi0-f44.google.com ([209.85.218.44]:35149 "EHLO mail-oi0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753322AbbFHUTd (ORCPT ); Mon, 8 Jun 2015 16:19:33 -0400 Received: by oihd6 with SMTP id d6so101202926oih.2; Mon, 08 Jun 2015 13:19:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MH+yIxG/l/wnYyMs8DiEj/H4OTLo5ekIdD5g7ABjKL0=; b=balASLfsAuAqPf6IwVNRdqBRHCkz3bfU3Ykt8loortFbYbpavTmR6/CcXjMcF0+DKK rTCMeFYcroxtFbce0o+bzHzPCoc1xh5h85XJLHwv+E15MvWQTjuf0aL84T/sAIVi7VLG TfGrQvcYTWALwXSOvMAjO+Pc4Pw5POa5zSSeq7ttcfdAdj4ULKtNgki9vJUAw2RxScn+ r8eSEUpEXSirczeMSn4kwo4OFYdoGzVsHZgSqx5YRqqNuQe4Th6uvMxGfSEC+NakN87O 9TjC3xkPBZexwPB+zuONFnErr7+DhNH4f8Z2z11z+8RbdBiGt0zeqoL0+3OG+8/a/vQg QYdg== X-Received: by 10.182.142.202 with SMTP id ry10mr4927723obb.27.1433794772803; Mon, 08 Jun 2015 13:19:32 -0700 (PDT) Received: from krebstar.localdomain (krebstar.arl.arizona.edu. [128.196.124.160]) by mx.google.com with ESMTPSA id w20sm2502998oiw.12.2015.06.08.13.19.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Jun 2015 13:19:31 -0700 (PDT) From: Jim Davis To: mmarek@suse.cz, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jim Davis Subject: [PATCH] scripts/package/Makefile: rpmbuild is needed for rpm targets Date: Mon, 8 Jun 2015 13:19:08 -0700 Message-Id: <1433794748-6570-1-git-send-email-jim.epost@gmail.com> X-Mailer: git-send-email 2.4.2 In-Reply-To: References: Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Before rpm release 4.1, in 2002, either the rpm command or the rpmbuild command could be used in the rpm-pkg or binrpm-pkg targets, and the Makefile chose the rpm command if the rpmbuild command wasn't found. After release 4.1, however, the rpm command could no longer be used in place of the rpmbuild command. As the rpmbuild command is not installed by default, this can lead to failures with the rpm-pkg and binrpm-pkg targets: rpm --define "_builddir ." --target \ x86_64 -bb ./binkernel.spec rpm --target: unknown option scripts/package/Makefile:60: recipe for target 'binrpm-pkg' failed Change the Makefile to use rpmbuild unconditionally to avoid this. Signed-off-by: Jim Davis --- scripts/package/Makefile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) -- 2.4.2 -- 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/Makefile b/scripts/package/Makefile index 99ca6e7..8b11d5a 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile @@ -21,10 +21,6 @@ # Note that the rpm-pkg target cannot be used with KBUILD_OUTPUT, # but the binrpm-pkg target can; for some reason O= gets ignored. -# Do we have rpmbuild, otherwise fall back to the older rpm -RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \ - else echo rpm; fi) - # Remove hyphens since they have special meaning in RPM filenames KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE)) # Include only those top-level files that are needed by make, plus the GPL copy @@ -51,7 +47,7 @@ rpm-pkg rpm: FORCE rm -f $(objtree)/.scmversion $(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version mv -f $(objtree)/.tmp_version $(objtree)/.version - $(RPM) $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz + rpmbuild --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz rm $(KERNELPATH).tar.gz kernel.spec # binrpm-pkg @@ -62,7 +58,7 @@ binrpm-pkg: FORCE $(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version mv -f $(objtree)/.tmp_version $(objtree)/.version - $(RPM) $(RPMOPTS) --define "_builddir $(objtree)" --target \ + rpmbuild --define "_builddir $(objtree)" --target \ $(UTS_MACHINE) -bb $(objtree)/binkernel.spec rm binkernel.spec