From patchwork Mon Apr 15 20:35:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Marek X-Patchwork-Id: 2446811 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 222323FD8C for ; Mon, 15 Apr 2013 20:36:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756724Ab3DOUf0 (ORCPT ); Mon, 15 Apr 2013 16:35:26 -0400 Received: from cantor2.suse.de ([195.135.220.15]:37506 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756710Ab3DOUfY (ORCPT ); Mon, 15 Apr 2013 16:35:24 -0400 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 25E15A50E4; Mon, 15 Apr 2013 22:35:24 +0200 (CEST) Received: by pobox.suse.cz (Postfix, from userid 10020) id EBD6F6009; Mon, 15 Apr 2013 22:35:23 +0200 (CEST) From: Michal Marek To: linux-kbuild@vger.kernel.org Cc: jkosina@suse.cz, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] rpm-pkg: Do not write to the parent directory Date: Mon, 15 Apr 2013 22:35:06 +0200 Message-Id: <1366058108-3500-2-git-send-email-mmarek@suse.cz> X-Mailer: git-send-email 1.7.3.1 In-Reply-To: <1366058108-3500-1-git-send-email-mmarek@suse.cz> References: <1366058108-3500-1-git-send-email-mmarek@suse.cz> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Now that we only package explicitly listed files to the tarball, there is no need to abuse the parent directory. Signed-off-by: Michal Marek --- scripts/package/Makefile | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/package/Makefile b/scripts/package/Makefile index b70b33e..ab203c2 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile @@ -32,7 +32,6 @@ TAR_CONTENT := $(KBUILD_ALLDIRS) kernel.spec .config .scmversion Makefile \ Kbuild Kconfig COPYING $(wildcard localversion*) TAR_CONTENT := $(addprefix $(KERNELPATH)/,$(TAR_CONTENT)) MKSPEC := $(srctree)/scripts/package/mkspec -PREV := set -e; cd -P ..; # rpm-pkg # --------------------------------------------------------------------------- @@ -47,18 +46,17 @@ rpm-pkg rpm: $(objtree)/kernel.spec FORCE false; \ fi $(MAKE) clean - $(PREV) ln -sf $(srctree) $(KERNELPATH) + ln -sf $(srctree) $(KERNELPATH) $(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --save-scmversion - $(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(TAR_CONTENT) - $(PREV) rm $(KERNELPATH) + tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(TAR_CONTENT) + rm $(KERNELPATH) rm -f $(objtree)/.scmversion set -e; \ $(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version set -e; \ mv -f $(objtree)/.tmp_version $(objtree)/.version - - $(RPM) $(RPMOPTS) --target $(UTS_MACHINE) -ta ../$(KERNELPATH).tar.gz - rm ../$(KERNELPATH).tar.gz + $(RPM) $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz + rm $(KERNELPATH).tar.gz clean-files := $(objtree)/kernel.spec