From patchwork Sat Jan 12 15:19:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "David R. Bild" X-Patchwork-Id: 1969291 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 42EF13FC5A for ; Sat, 12 Jan 2013 15:20:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753726Ab3ALPUR (ORCPT ); Sat, 12 Jan 2013 10:20:17 -0500 Received: from mail-ie0-f174.google.com ([209.85.223.174]:47369 "EHLO mail-ie0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753513Ab3ALPUQ (ORCPT ); Sat, 12 Jan 2013 10:20:16 -0500 Received: by mail-ie0-f174.google.com with SMTP id c11so3440134ieb.19 for ; Sat, 12 Jan 2013 07:20:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=x3rwr6B2p8+fOxMNne8x8xzOEZa7jwFQkG3O5kg1Wu8=; b=b6IIwK1+/5TOR/6Buo7pIfabgeSzvCWfQt58wqJ52g/fevMS8OcwqeSoaMacJg5IeS TKs8rbcB1TTRk6MMSTmeABwO+xuCd4FEV6ajMpAhmNjAnvqgXaAUgzvPTlIRELSPeXki 1D61drOJ2F6RaC1BieiI1MvkTrWm/qTxcQ4zEOFJG3SDBT2cQMc6LP5l41CEGJ3ad3HG EyO30tgNSSPDmfLBpHMvFfbOeFRRzb2ZzJX/bTUkapAPw46NgEGmNyHAc8nczMyt1F3S OUoNFH5//Cw7Ly8g4eJHknnxEeprgYWuSsRUiAp9aAO8UD7lOG7vwOpUAPo9W64N3h9O Vnkg== X-Received: by 10.50.152.198 with SMTP id va6mr2375577igb.42.1358004014436; Sat, 12 Jan 2013 07:20:14 -0800 (PST) Received: from jemez.davidbild.org (adsl-99-121-239-246.dsl.sfldmi.sbcglobal.net. [99.121.239.246]) by mx.google.com with ESMTPS id az6sm2045363igb.11.2013.01.12.07.20.13 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 12 Jan 2013 07:20:14 -0800 (PST) From: "David R. Bild" To: Michal Marek Cc: "David R. Bild" , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, trivial@kernel.org Subject: [PATCH] kbuild: clear KBUILD_SRC when calling 'make' in RPM spec Date: Sat, 12 Jan 2013 10:19:19 -0500 Message-Id: <1358003959-5533-1-git-send-email-drbild@umich.edu> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQkbTNulv5h+9H5jKIUUUd/LR8yN7dyUfGgTIvqMtAyFNwFzpT2OyYkTxtAVbbJbur5xgchc Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org From: "David R. Bild" 'make rpm-pkg' and 'make binrpm-pkg' fail when the kernel source is read-only. Specifically, when the RPM spec generated by scripts/package/mkspec is run, KBUILD_SRC happens to be set to the source location and thus the invocation of 'make headers_install' fails when an internal call to 'filechk' tries to write a file into the source tree. The fix is to clear KBUILD_SRC for the 'make headers_install' invocation in the spec file, as is already done for the 'make modules_install' invocation. Signed-off-by: David R. Bild --- scripts/package/mkspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/package/mkspec b/scripts/package/mkspec index 4bf17dd..fbbfd08 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -95,7 +95,7 @@ echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" echo "%endif" echo "%endif" -echo 'make %{?_smp_mflags} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr headers_install' +echo 'make %{?_smp_mflags} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr KBUILD_SRC= headers_install' echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE" echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE"