From patchwork Sat Sep 30 01:10:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 114529 Delivered-To: patch@linaro.org Received: by 10.140.104.133 with SMTP id a5csp1415177qgf; Fri, 29 Sep 2017 18:11:51 -0700 (PDT) X-Google-Smtp-Source: AOwi7QA7fbKxT3SVZo0seEOFRaU52nEK3kdZlX8B5BIksppeHtedHxoYK/GIZ1DWXWve0+2IZHiA X-Received: by 10.98.10.24 with SMTP id s24mr9395776pfi.155.1506733910945; Fri, 29 Sep 2017 18:11:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506733910; cv=none; d=google.com; s=arc-20160816; b=H6D2RjYuiBqK/7RGg7P0HhvAHjQJeeogqtqme7syuLJ3VnmYZocj28ZsVxPqnewn44 zHcqihNcOun/XILMrZPjfbbDqei/LPkM3nn0qWob2J8AciemGVG1J0y0nlu/aEawa8Bc EFErRt8v9rv/6H7Iiz8fMkJ8BLGfBizRlGtTZU57OLmu2x96UpzkRhGrCmxsBV3rCNIi lvuWzb7En3oH6nydOqJMLZJiMBODbAzfcqXGsWurZSAHIxLkJ6EZEp7HunpebIv6ySeb Tw+CT3iMsDUsPFqfT0UQ3mtaYLbvMa3cvTB74mqLtye86RHfN6hHruXO5uUdMcTIJEE/ 4Lng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=AFgqY+BuwxhB1VlXJQHa8qE8bGUvjeGTSSLSJUc7m+Q=; b=AEMjj4EAqm7VW2lesBNrTGQ4BtvZX0SnKat3VQroDmxBy3yIIaTOtL+TjHmv+5TZpp UhmkyEE/rLS27jlkN1KHwn+rkJZnyT4rRfmYAtDnomQRQGpdkQBmjOF8uAz6dXYtrkyc e5NjgzAhvHZw+YXlXkdzWkHxnZLerbj5XXxXVN4TFa4NYHJhNp/PSXTM44zX52y8qtQE UP9WV7aQmXaVghbIEO51rlgBiNQbc2hgjHcIfI/c5sqhl7ur9xlVXcRvjD4VpWDgX8qX MCo6oK69EwcPuwEw/ZIKjOGYhax1vRSRynZq6Tu14dnNy28eZWfFnekHXtHjqcRkg5Ld fkSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=LYy9ok41; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b11si4208362pls.503.2017.09.29.18.11.50; Fri, 29 Sep 2017 18:11:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=LYy9ok41; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752804AbdI3BLL (ORCPT + 26 others); Fri, 29 Sep 2017 21:11:11 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:26266 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752622AbdI3BLJ (ORCPT ); Fri, 29 Sep 2017 21:11:09 -0400 Received: from grover.sesame (FL1-122-131-185-176.osk.mesh.ad.jp [122.131.185.176]) (authenticated) by conuserg-07.nifty.com with ESMTP id v8U1AOKC030198; Sat, 30 Sep 2017 10:10:28 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com v8U1AOKC030198 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1506733828; bh=AFgqY+BuwxhB1VlXJQHa8qE8bGUvjeGTSSLSJUc7m+Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LYy9ok41HjHWNEkF7vMQRK5l5rbk5HsJptbokSfYnjkqpPjSX7SgYxZ4B7z0N0c07 GCy2DrMVBAyxhhiJuE+FQdU4QWpTXJo137OfDK+n6dvPiP8ORbGDB102AGzMhqnDyV ubaFF4sMI1up4CQ735o5WHYlUWA/uyymj1S0TUWegXm8SZiZyM7QTJY2w3QpeVkNec q/HeS9c34ChQL8JxZ64TbIfwaMheJUvp+jvD4ACHWIakqUlkZRmJaA0ng5azQcjnNW Vfe4RkXIuCbdsqXw78gbpQl0yBGYLoZ29q0/jWH5m2/y923ZG74Jf0htlMavD4vdtQ ObDG5m0re/wlA== X-Nifty-SrcIP: [122.131.185.176] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Matthias Kaehlcke , Behan Webster , Michal Marek , =?utf-8?q?Vin=C3=ADcius_Tinti?= , linux-kernel@vger.kernel.org Subject: [PATCH 8/9] kbuild: rpm-pkg: keep spec file until make mrproper Date: Sat, 30 Sep 2017 10:10:10 +0900 Message-Id: <1506733811-24636-8-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506733811-24636-1-git-send-email-yamada.masahiro@socionext.com> References: <1506733811-24636-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If build fails during (bin)rpm-pkg, the spec file is not cleaned by anyone until the next successful build of the package. We do not have to immediately delete the spec file in case somebody may want to take a look at it. Instead, make them ignored by git, and cleaned up by make mrproper. Signed-off-by: Masahiro Yamada --- .gitignore | 5 +++++ scripts/package/Makefile | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/.gitignore b/.gitignore index 0c39aa2..4f034b8 100644 --- a/.gitignore +++ b/.gitignore @@ -54,6 +54,11 @@ Module.symvers /Module.markers # +# RPM spec file (make rpm-pkg) +# +/*.spec + +# # Debian directory (make deb-pkg) # /debian/ diff --git a/scripts/package/Makefile b/scripts/package/Makefile index b559671..70eea1e 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile @@ -51,7 +51,6 @@ rpm-pkg rpm: FORCE $(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec $(call cmd,src_tar,$(KERNELPATH),kernel.spec) +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz - rm $(KERNELPATH).tar.gz kernel.spec # binrpm-pkg # --------------------------------------------------------------------------- @@ -60,7 +59,8 @@ binrpm-pkg: FORCE $(CONFIG_SHELL) $(MKSPEC) prebuilt > $(objtree)/binkernel.spec +rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \ $(UTS_MACHINE) -bb $(objtree)/binkernel.spec - rm binkernel.spec + +clean-files += $(objtree)/*.spec # Deb target # ---------------------------------------------------------------------------