From patchwork Tue Oct 27 13:53:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 307319 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 903C4C56202 for ; Tue, 27 Oct 2020 16:37:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 424BD21655 for ; Tue, 27 Oct 2020 16:37:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603816633; bh=YccVSx6ZuaiM4zc5OSZp35HbuBOuCVZ448jsDKpaK3w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=dEFnh34FXTcuu7grGxJlba5S+Goljm8rKN06Al/RKc0pUBwrabZ57FQLk7QJYxvBc U0AqS4dyRuTqGzKfZ4cogT3za6Bzoq43NKEWgy6Pj4q/B/JTwJX/aXBIVjFn3P9D6g f6Fa49nFAywflIaQix/pk7BnFnxKoyqPpAbaej1c= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1811086AbgJ0QhL (ORCPT ); Tue, 27 Oct 2020 12:37:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:42018 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1801941AbgJ0PpK (ORCPT ); Tue, 27 Oct 2020 11:45:10 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 85BF9223B0; Tue, 27 Oct 2020 15:45:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603813509; bh=YccVSx6ZuaiM4zc5OSZp35HbuBOuCVZ448jsDKpaK3w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dZ8lh61oe1tRyXxOChWmcDl9sVIXN8HO3FnYHE8Zya+krMBR3cI+oRZ+RttehUACB vxtIe/BAFMQoprGz7Qryqi06Zz3v7nSkI3Uqa8+qwnvXHpHKBudrHsSc8ah+1SLeAo jX2wV1NoFsNHPP5yD5y9aU0NXScWvB38e91gk2y4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Josh Triplett , Masahiro Yamada , Sasha Levin Subject: [PATCH 5.9 544/757] kbuild: deb-pkg: do not build linux-headers package if CONFIG_MODULES=n Date: Tue, 27 Oct 2020 14:53:14 +0100 Message-Id: <20201027135516.015553377@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135450.497324313@linuxfoundation.org> References: <20201027135450.497324313@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Masahiro Yamada [ Upstream commit bac977cbc0d6731fb8e67c2be0e4acbd959e10b3 ] Since commit 269a535ca931 ("modpost: generate vmlinux.symvers and reuse it for the second modpost"), with CONFIG_MODULES disabled, "make deb-pkg" (or "make bindeb-pkg") fails with: find: ‘Module.symvers’: No such file or directory If CONFIG_MODULES is disabled, it doesn't really make sense to build the linux-headers package. Fixes: 269a535ca931 ("modpost: generate vmlinux.symvers and reuse it for the second modpost") Reported-by: Josh Triplett Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin --- scripts/package/builddeb | 6 ++++-- scripts/package/mkdebian | 19 ++++++++++++------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 6df3c9f8b2da6..8277144298a00 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -202,8 +202,10 @@ EOF done if [ "$ARCH" != "um" ]; then - deploy_kernel_headers debian/linux-headers - create_package linux-headers-$version debian/linux-headers + if is_enabled CONFIG_MODULES; then + deploy_kernel_headers debian/linux-headers + create_package linux-headers-$version debian/linux-headers + fi deploy_libc_headers debian/linux-libc-dev create_package linux-libc-dev debian/linux-libc-dev diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian index 48fbd3d0284a8..ccd46aad1dff6 100755 --- a/scripts/package/mkdebian +++ b/scripts/package/mkdebian @@ -183,13 +183,6 @@ Description: Linux kernel, version $version This package contains the Linux kernel, modules and corresponding other files, version: $version. -Package: $kernel_headers_packagename -Architecture: $debarch -Description: Linux kernel headers for $version on $debarch - This package provides kernel header files for $version on $debarch - . - This is useful for people who need to build external modules - Package: linux-libc-dev Section: devel Provides: linux-kernel-headers @@ -200,6 +193,18 @@ Description: Linux support headers for userspace development Multi-Arch: same EOF +if is_enabled CONFIG_MODULES; then +cat <> debian/control + +Package: $kernel_headers_packagename +Architecture: $debarch +Description: Linux kernel headers for $version on $debarch + This package provides kernel header files for $version on $debarch + . + This is useful for people who need to build external modules +EOF +fi + if is_enabled CONFIG_DEBUG_INFO; then cat <> debian/control