From patchwork Wed Oct 14 06:54:25 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Nieder X-Patchwork-Id: 53606 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9E6md8A024635 for ; Wed, 14 Oct 2009 06:48:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753200AbZJNGq3 (ORCPT ); Wed, 14 Oct 2009 02:46:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754656AbZJNGq3 (ORCPT ); Wed, 14 Oct 2009 02:46:29 -0400 Received: from mail-yx0-f188.google.com ([209.85.210.188]:39341 "EHLO mail-yx0-f188.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753200AbZJNGq2 (ORCPT ); Wed, 14 Oct 2009 02:46:28 -0400 Received: by yxe26 with SMTP id 26so5099407yxe.4 for ; Tue, 13 Oct 2009 23:45:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=P5hWJ5n3LT9DbsBcaQPkFwGvNiU9BIkyzxV1HrXrCZc=; b=rwhzKrVqcnovFsNl01KBe4UEFNjA015L1ZrVsJSQbob4FzPd7bE9Ibhb2m6Y98krpd uFkwtsPuYSnsbBam8CdVxLMIytsWovBd0AY9d7K1MRRnqlTiPnRZhUDHJb4wG58iOTWW 8IZUQE1N+MwXcT1uV0CyVVwS4ZOwWpgh/Si+k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=wZJRH5H5qL1MNed03S49Rwy5fuBXuxjC9tHY0rIVgUV4T35NQVaV1hIHMKEvZ2lKvl TNpPJcTvENYRwOiqrNPAelrMZsuowHqVXszF8HhQBwyci0Wv79mErf9AfQgzUYoFVVWI cpxlm1LovTyWohzQC/8QviwcQ5dZ8BixVUcg8= Received: by 10.101.126.11 with SMTP id d11mr6962973ann.29.1255502752024; Tue, 13 Oct 2009 23:45:52 -0700 (PDT) Received: from progeny.tock (c-98-212-3-231.hsd1.il.comcast.net [98.212.3.231]) by mx.google.com with ESMTPS id 21sm3550171yxe.13.2009.10.13.23.45.50 (version=SSLv3 cipher=RC4-MD5); Tue, 13 Oct 2009 23:45:51 -0700 (PDT) Date: Wed, 14 Oct 2009 01:54:25 -0500 From: Jonathan Nieder To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , maximilian attems , Frans Pop Subject: [PATCH resend 1/2] scripts/package: add ROOTCMD variable Message-ID: <20091014065425.GA8771@progeny.tock> References: <20091014064622.GA8711@progeny.tock> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20091014064622.GA8711@progeny.tock> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org diff --git a/scripts/package/Makefile b/scripts/package/Makefile index f67cc88..14b65a8 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile @@ -53,7 +53,8 @@ rpm-pkg rpm: $(objtree)/kernel.spec FORCE set -e; \ mv -f $(objtree)/.tmp_version $(objtree)/.version - $(RPM) $(RPMOPTS) --target $(UTS_MACHINE) -ta ../$(KERNELPATH).tar.gz + $(ROOTCMD) $(RPM) $(RPMOPTS) --target $(UTS_MACHINE) \ + -ta ../$(KERNELPATH).tar.gz rm ../$(KERNELPATH).tar.gz clean-files := $(objtree)/kernel.spec @@ -70,8 +71,8 @@ binrpm-pkg: $(objtree)/binkernel.spec FORCE set -e; \ mv -f $(objtree)/.tmp_version $(objtree)/.version - $(RPM) $(RPMOPTS) --define "_builddir $(objtree)" --target \ - $(UTS_MACHINE) -bb $< + $(ROOTCMD) $(RPM) $(RPMOPTS) --define "_builddir $(objtree)" \ + --target $(UTS_MACHINE) -bb $< clean-files += $(objtree)/binkernel.spec @@ -79,7 +80,7 @@ clean-files += $(objtree)/binkernel.spec # --------------------------------------------------------------------------- deb-pkg: FORCE $(MAKE) KBUILD_SRC= - $(CONFIG_SHELL) $(srctree)/scripts/package/builddeb + $(ROOTCMD) $(CONFIG_SHELL) $(srctree)/scripts/package/builddeb clean-dirs += $(objtree)/debian/ @@ -88,7 +89,7 @@ clean-dirs += $(objtree)/debian/ # --------------------------------------------------------------------------- tar%pkg: FORCE $(MAKE) KBUILD_SRC= - $(CONFIG_SHELL) $(srctree)/scripts/package/buildtar $@ + $(ROOTCMD) $(CONFIG_SHELL) $(srctree)/scripts/package/buildtar $@ clean-dirs += $(objtree)/tar-install/ @@ -96,10 +97,10 @@ clean-dirs += $(objtree)/tar-install/ # Help text displayed when executing 'make help' # --------------------------------------------------------------------------- help: FORCE + @echo ' Set ROOTCMD={sudo|fakeroot -u|super|...} and make as non-root:' @echo ' rpm-pkg - Build both source and binary RPM kernel packages' @echo ' binrpm-pkg - Build only the binary kernel package' @echo ' deb-pkg - Build the kernel as an deb package' @echo ' tar-pkg - Build the kernel as an uncompressed tarball' @echo ' targz-pkg - Build the kernel as a gzip compressed tarball' @echo ' tarbz2-pkg - Build the kernel as a bzip2 compressed tarball' -