From patchwork Tue Oct 27 13:53:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 307251 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 42B50C83012 for ; Tue, 27 Oct 2020 16:56:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 06E7D21D24 for ; Tue, 27 Oct 2020 16:56:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603817813; bh=In6ODsqjDUsLruB/vRc+eDv8J/cXj5mUeu0tSPrUbnU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=fMuzTCJvFBXfvrGBK+XbLlKbgXjyoty16QwgQ49UzWgie/oV9dWrVPG7cA1emUYbh h/VLTHZPR+IfIW0IbNdE8Pyw8pYqTfmuOmfPbMY0Z5L7Ye/pe7Ys1QinfnilVvNdau wQ9dhMZ7RpQeXZpVJdkTIx8xgbfi9GA7gYCbP0Is= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1814528AbgJ0Q4v (ORCPT ); Tue, 27 Oct 2020 12:56:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:45794 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1794139AbgJ0PKJ (ORCPT ); Tue, 27 Oct 2020 11:10:09 -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 DAF4620657; Tue, 27 Oct 2020 15:10:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603811408; bh=In6ODsqjDUsLruB/vRc+eDv8J/cXj5mUeu0tSPrUbnU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GaziSQlLJ7P3O+MZDJ485fcM4B52xfqjxkuLiueJaoXjmipkHZGCySKlR0YY6hjdn /yOgXN1tsEMWB4QC0g6kg2cDLmRcUj/L7Hz+vmTtsrf42Kp5jftzj7dzVK7+ykKQRg cknG9hzOQVgTOphXKqtGn51H4Xe7MyGMMjq9CZWs= 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.8 452/633] kbuild: deb-pkg: do not build linux-headers package if CONFIG_MODULES=n Date: Tue, 27 Oct 2020 14:53:15 +0100 Message-Id: <20201027135543.921506910@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@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 df1adbfb8ead0..9342517778bf3 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