From patchwork Thu Nov 8 19:56:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 10674953 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1637914E2 for ; Thu, 8 Nov 2018 19:56:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05C0C299A3 for ; Thu, 8 Nov 2018 19:56:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC6A72AE69; Thu, 8 Nov 2018 19:56:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 802EE299A3 for ; Thu, 8 Nov 2018 19:56:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725882AbeKIFdd (ORCPT ); Fri, 9 Nov 2018 00:33:33 -0500 Received: from mail.skyhub.de ([5.9.137.197]:47808 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725764AbeKIFdd (ORCPT ); Fri, 9 Nov 2018 00:33:33 -0500 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (blast.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id RgchpIW6QK3B; Thu, 8 Nov 2018 20:56:32 +0100 (CET) Received: from zn.tnic (p200300EC2BD03D00329C23FFFEA6A903.dip0.t-ipconnect.de [IPv6:2003:ec:2bd0:3d00:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id DE1E91EC0755; Thu, 8 Nov 2018 20:56:31 +0100 (CET) From: Borislav Petkov To: LKML Cc: Masahiro Yamada , Michal Marek , linux-kbuild@vger.kernel.org Subject: [PATCH] kbuild/builddeb: Fix building .deb packages out-of-tree Date: Thu, 8 Nov 2018 20:56:24 +0100 Message-Id: <20181108195624.25410-1-bp@alien8.de> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Borislav Petkov When building a .deb package with make O=/tmp/b oldconfig cd /tmp/b make bindeb-pkg the build fails with fakeroot -u debian/rules binary *** *** Configuration file ".config" not found! *** *** Please run some configurator (e.g. "make oldconfig" or *** "make menuconfig" or "make xconfig"). *** make[12]: *** [/mnt/kernel/kernel/linux/scripts/kconfig/Makefile:69: syncconfig] Error 1 make[11]: *** [/mnt/kernel/kernel/linux/Makefile:544: syncconfig] Error 2 make[10]: *** [Makefile:640: include/config/auto.conf] Error 2 make[9]: *** [Makefile:15: __sub-make] Error 2 because ($MAKE -s image_name) in the subshell is missing KBUILD_SRC and cannot find .config. Passing in KBUILD_SRC= for the current pwd fixes the build. Signed-off-by: Borislav Petkov Cc: Masahiro Yamada Cc: Michal Marek Cc: --- scripts/package/builddeb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 90c9a8ac7adb..149bbbd8e98d 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -81,7 +81,7 @@ else cp System.map "$tmpdir/boot/System.map-$version" cp $KCONFIG_CONFIG "$tmpdir/boot/config-$version" fi -cp "$($MAKE -s image_name)" "$tmpdir/$installed_image_path" +cp "$($MAKE KBUILD_SRC= -s image_name)" "$tmpdir/$installed_image_path" if grep -q "^CONFIG_OF=y" $KCONFIG_CONFIG ; then # Only some architectures with OF support have this target