Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2461825yba; Mon, 15 Apr 2019 12:08:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwbbP1+pZlLxyD/moP2Pp3/wAhx7bR7ds9rDmi4tB5EkyyHosZCMBr7geS0pJg277yd95HZ X-Received: by 2002:a17:902:8a81:: with SMTP id p1mr78079502plo.106.1555355321507; Mon, 15 Apr 2019 12:08:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555355321; cv=none; d=google.com; s=arc-20160816; b=OKxd2Vjq11yQVcl20nSgxvNrdtvXDLM7fmvqKtKsB44WHprzJUOwu82ZAGTL01tR03 9ypMi+zBVs4RWvBHFcNcavCjy40VYjGJUmqMLxggCIVmrNk7wMaKb5ZfukxiTfrOIgM9 AzOzzWaMZCZos++DWJ4k2mhZe6ooersRv3WyBDN74M5GjgLw9nCE9PVYXOA+3PAvKpIs 7BCULO+/sdub2uT2M2r3Y6jtXQT8YFknktBApfE9x/9vJme/xaFi8xHFdLF9/rtHiwtm TMNZIRwu0TtINOGfqB4vPmhyIViBYrqs2w3BNRKxOv8nPpH0KUD/cxE+bAVtv7t3uD7D ERyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=C6y/Q7NqDZ6J6LWn+HoGm3CAk+YRVTBiAuHNTT4DVTo=; b=bxCqevMEkFBmS3xyWmOGQLACkbbjaYBhAstN4Rqf68mHyQeYV41LSctDzi02ZM1D9I /h4UW2yxnQ1OBMQS9flq4n50eYKiSIpz5BBdZGzN05uLSGNb7ry7zm89Yih1CZuxRAyf +hA939w2htdatWzRuEabUqHjwrEyz9WOqJhft4BlwQZe8qnhl4Z72M9PygutYhmlWUNb oUeX2xuR8eQWysIkiFJuLZ7Qo+/u4ship2CXj9dgEZMeH3mIzoqZZQgGWXupa5qXp4Jk ftAPe6VlE+terGncA49inE3MBEaeWGVgohQTihZRC5KmxGMn4Ov66dlqi60XfifAZ47h Bxuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Fps9GXCc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ci5si42232587plb.145.2019.04.15.12.08.24; Mon, 15 Apr 2019 12:08:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Fps9GXCc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729656AbfDOTHH (ORCPT + 99 others); Mon, 15 Apr 2019 15:07:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:41764 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729325AbfDOTHF (ORCPT ); Mon, 15 Apr 2019 15:07:05 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EE9782087C; Mon, 15 Apr 2019 19:07:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555355224; bh=HCyf28W2q6RYFGzfHnn73T0o6U1pk2uCmy6mOPUU+D4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fps9GXCc9/plEyj+lmG6ZHcieHnE7pkwPhgpLG8R/b22YhZQa+P5Fv0jtJxsVVCzG wSeD7Bg7jyyJnMZtF9+mZq9AJU/zEiUCknvYHbqSo2mIxZYs2zulU0tGCizT2mS8t5 crii3p4GuKcBHIWARAV/aOZ9x4LjYz7qyzoxqmY8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ard Biesheuvel , Masahiro Yamada , Sasha Levin Subject: [PATCH 4.19 037/101] kbuild: deb-pkg: fix bindeb-pkg breakage when O= is used Date: Mon, 15 Apr 2019 20:58:35 +0200 Message-Id: <20190415183742.418747020@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190415183740.341577907@linuxfoundation.org> References: <20190415183740.341577907@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 02826a6ba301b72461c3706e1cc66d5571cd327e ] Ard Biesheuvel reports bindeb-pkg with O= option is broken in the following way: ... LD [M] sound/soc/rockchip/snd-soc-rk3399-gru-sound.ko LD [M] sound/soc/rockchip/snd-soc-rockchip-pcm.ko LD [M] sound/soc/rockchip/snd-soc-rockchip-rt5645.ko LD [M] sound/soc/rockchip/snd-soc-rockchip-spdif.ko LD [M] sound/soc/sh/rcar/snd-soc-rcar.ko fakeroot -u debian/rules binary make KERNELRELEASE=4.19.0-12677-g19beffaf7a99-dirty ARCH=arm64 KBUILD_SRC= intdeb-pkg /bin/bash /home/ard/linux/scripts/package/builddeb Makefile:600: include/config/auto.conf: No such file or directory *** *** Configuration file ".config" not found! *** *** Please run some configurator (e.g. "make oldconfig" or *** "make menuconfig" or "make xconfig"). *** make[12]: *** [syncconfig] Error 1 make[11]: *** [syncconfig] Error 2 make[10]: *** [include/config/auto.conf] Error 2 make[9]: *** [__sub-make] Error 2 ... Prior to commit 80463f1b7bf9 ("kbuild: add --include-dir flag only for out-of-tree build"), both srctree and objtree were added to --include-dir redundantly, and the wrong code '$MAKE image_name' was working by relying on that. Now, the potential issue that had previously been hidden just showed up. '$MAKE image_name' recurses to the generated $(objtree)/Makefile and ends up with running in srctree, which is incorrect. It should be invoked with '-f $srctree/Makefile' (or KBUILD_SRC=) to be executed in objtree. Fixes: 80463f1b7bf9 ("kbuild: add --include-dir flag only for out-of-tree build") Reported-by: Ard Biesheuvel Signed-off-by: Masahiro Yamada Tested-by: Ard Biesheuvel Signed-off-by: Sasha Levin --- scripts/package/builddeb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 90c9a8ac7adb..0b31f4f1f92c 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 -s -f $srctree/Makefile image_name)" "$tmpdir/$installed_image_path" if grep -q "^CONFIG_OF=y" $KCONFIG_CONFIG ; then # Only some architectures with OF support have this target -- 2.19.1