From patchwork Thu Oct 15 13:35:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Nieder X-Patchwork-Id: 54017 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 n9FDVFh6022061 for ; Thu, 15 Oct 2009 13:31:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758080AbZJON2m (ORCPT ); Thu, 15 Oct 2009 09:28:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758422AbZJON2m (ORCPT ); Thu, 15 Oct 2009 09:28:42 -0400 Received: from fg-out-1718.google.com ([72.14.220.152]:57074 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758080AbZJON2l (ORCPT ); Thu, 15 Oct 2009 09:28:41 -0400 Received: by fg-out-1718.google.com with SMTP id 16so485863fgg.1 for ; Thu, 15 Oct 2009 06:26:53 -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=Ija1HiCbGaAu+wTd3i5iyZyYq4nH2yZn+uBs3xPLr7M=; b=N/Qiz25CEL8KqCGI1Q/aAdPT3x9kyH6pRtvoYKgfLhbf/OTttazLE2HB7xl7LYvaRx Sqd1FVLOTgi58kKxDdmRDztULpvmLBCXzkyeG/opcYUHF7Uk2yu5u2tJ3Hz+QLGTEkiC erB0eCCqs1ioT9RiIEvT6YvR22lntAkVLPkno= 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=rMHKi1JTSMPEBgwJTD4Y5cSNcARCCcGVnpj/4kBgF3vJfijzvLd+ChVS8hhCuIGB4e Rv3CaM7ltbgZJVrKhD+bmzorjBGGS1Imdg8JjTtG9TLpz6fisEhTJozUh/vtW7+fhfT3 izOfdAuNdAiHtQZLWCVN5eVFtMGK32zdQh6pg= Received: by 10.86.13.37 with SMTP id 37mr164421fgm.58.1255613213371; Thu, 15 Oct 2009 06:26:53 -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 4sm2250497fge.7.2009.10.15.06.26.51 (version=SSLv3 cipher=RC4-MD5); Thu, 15 Oct 2009 06:26:52 -0700 (PDT) Date: Thu, 15 Oct 2009 08:35:32 -0500 From: Jonathan Nieder To: linux-kbuild@vger.kernel.org Cc: maximilian attems , Sam Ravnborg , Frans Pop Subject: [PATCH v2 1/2] scripts/package: add KBUILD_PKG_ROOTCMD variable Message-ID: <20091015133532.GB6718@progeny.tock> References: <20091014064622.GA8711@progeny.tock> <20091014071627.GA6256@merkur.ravnborg.org> <200910141159.03799.elendil@planet.nl> <20091014110331.GZ28231@baikonur.stro.at> <20091015133139.GA6718@progeny.tock> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20091015133139.GA6718@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..6997f38 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 + $(KBUILD_PKG_ROOTCMD) $(RPM) $(RPMOPTS) --target $(UTS_MACHINE) \ + -ta ../$(KERNELPATH).tar.gz rm ../$(KERNELPATH).tar.gz clean-files := $(objtree)/kernel.spec @@ -70,8 +71,9 @@ binrpm-pkg: $(objtree)/binkernel.spec FORCE set -e; \ mv -f $(objtree)/.tmp_version $(objtree)/.version - $(RPM) $(RPMOPTS) --define "_builddir $(objtree)" --target \ - $(UTS_MACHINE) -bb $< + $(KBUILD_PKG_ROOTCMD) $(RPM) $(RPMOPTS) \ + --define "_builddir $(objtree)" \ + --target $(UTS_MACHINE) -bb $< clean-files += $(objtree)/binkernel.spec @@ -79,7 +81,8 @@ clean-files += $(objtree)/binkernel.spec # --------------------------------------------------------------------------- deb-pkg: FORCE $(MAKE) KBUILD_SRC= - $(CONFIG_SHELL) $(srctree)/scripts/package/builddeb + $(KBUILD_PKG_ROOTCMD) $(CONFIG_SHELL) \ + $(srctree)/scripts/package/builddeb clean-dirs += $(objtree)/debian/ @@ -88,7 +91,8 @@ clean-dirs += $(objtree)/debian/ # --------------------------------------------------------------------------- tar%pkg: FORCE $(MAKE) KBUILD_SRC= - $(CONFIG_SHELL) $(srctree)/scripts/package/buildtar $@ + $(KBUILD_PKG_ROOTCMD) $(CONFIG_SHELL) \ + $(srctree)/scripts/package/buildtar $@ clean-dirs += $(objtree)/tar-install/ @@ -96,10 +100,10 @@ clean-dirs += $(objtree)/tar-install/ # Help text displayed when executing 'make help' # --------------------------------------------------------------------------- help: FORCE + @echo ' Set KBUILD_PKG_ROOTCMD={sudo|fakeroot -u|...} 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' -