From patchwork Wed Oct 14 06:55:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Nieder X-Patchwork-Id: 53607 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 n9E6md8B024635 for ; Wed, 14 Oct 2009 06:48:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754816AbZJNGru (ORCPT ); Wed, 14 Oct 2009 02:47:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754817AbZJNGrt (ORCPT ); Wed, 14 Oct 2009 02:47:49 -0400 Received: from mail-gx0-f212.google.com ([209.85.217.212]:65359 "EHLO mail-gx0-f212.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754816AbZJNGrt (ORCPT ); Wed, 14 Oct 2009 02:47:49 -0400 Received: by gxk4 with SMTP id 4so11676240gxk.8 for ; Tue, 13 Oct 2009 23:47:11 -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=Vi2g2wromz3tRWiYtfObVAWJnERIagEd+y/hWuGjHyA=; b=nF+ZunRkbJRuV15HE9tjGcHnD+fY7QtZ5L1ynI8zPpnOrbNFkHQWS/pILTGbQNVJjK 2+BAcK0KDnBGU8wVT99Zuej1sK4dUIpf7aHHU4BzqZLQSuEDTKl1ADCaoG563X576dZH 3GPafSKBO/JFKIJ3AABV1JydWJYR4vXClgk9E= 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=H0mVw+O5RXvMVRBx1hqXovH7Mz8Q+jjMmzeuOrz4egzC9v2csMVb1oWmnfJgQ1+Mt+ 2fMiMoAbnSVeDeZM3LFCbwtWnNDoG77P2iS01qQk5YnibVsaeHDQBF4jWsepP8f8GVl6 hXW0zB/Q2SN81AKgyYnaOZwBNeP2Jjo9OaBUo= Received: by 10.150.104.11 with SMTP id b11mr14287338ybc.21.1255502831412; Tue, 13 Oct 2009 23:47:11 -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 16sm264603gxk.7.2009.10.13.23.47.10 (version=SSLv3 cipher=RC4-MD5); Tue, 13 Oct 2009 23:47:11 -0700 (PDT) Date: Wed, 14 Oct 2009 01:55:47 -0500 From: Jonathan Nieder To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , maximilian attems , Frans Pop Subject: [PATCH resend 2/2] scripts/package: use fakeroot if available Message-ID: <20091014065547.GB8771@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 14b65a8..14fdeda 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile @@ -1,6 +1,15 @@ # Makefile for the different targets used to generate full packages of a kernel # It uses the generic clean infrastructure of kbuild +# How to acquire (fake) root privileges +ifndef ROOTCMD +ifneq ($(shell id -u),0) +ifeq ($(shell which fakeroot >/dev/null 2>&1 && echo found),found) +ROOTCMD := fakeroot -u +endif +endif +endif + # RPM target # --------------------------------------------------------------------------- # The rpm target generates two rpm files: