Message ID | 3351f907cfd0b5d8372e858a8ec9065cc2bd91df.1679434718.git.kevin@kevinlocke.name |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2029207wrt; Tue, 21 Mar 2023 14:56:18 -0700 (PDT) X-Google-Smtp-Source: AK7set/6NHUAV+3F3A0vWIkgm+Bj8nTTQsB1NQA+LStoYr3p2pyoyYgCNl5HQ4sZZulHeoXLRG7k X-Received: by 2002:a17:90b:4b90:b0:23f:580d:b252 with SMTP id lr16-20020a17090b4b9000b0023f580db252mr1184828pjb.36.1679435778546; Tue, 21 Mar 2023 14:56:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679435778; cv=none; d=google.com; s=arc-20160816; b=wpFpodoP0j1KHHWBWXmHybH53aEjpTurtwB1AEIwkGTy+kI2HR3iQMzMZLK2tHV6AO emXATkomiKyXqKGyupNLNQLjtLWMlRqwS82k/bA5Wc5QeIcRNJ1GNrEXH+GANVhzpWrX FJBb4u0T6tZelXC+MgfKq3icgvDGquvFrk0VnI6czKaec3wtEM+RJBghR662Hh8WsJt3 DSjWJi0pixMtlDPBRtXN4kkomtOkmt1qO6rUhVsuTspeFVH37hDNW34iWKRd5TFldaDu AYPQ/PJjrhaNo1VulnwYxdM7FjEO7dkMqrr51t25yQrnyp0xz76giM44cPr8zIjKRzSK kOlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ij3YD9XhTAz/cP8pyodD1vlUCRrhQEMh3SSFDaqsujQ=; b=F+pXbL6e40wjmJW7rDx0dynfgECCc2TGUUlCekKwK+Y6yrLaeVLmPSzSsNsU8t9O7l tDYQyCx3QengUAx78TqyHq7ANeP/W7iu2rZbaJzv1oyZfGWsYKaYYf1EySi0XEnKaSJy IHmozHjvSrv4uhvGZLKftDDwsbK/mFvGVbRwDWURzyLCxagJcPGYUfQ5fZwNqOkk04fQ E8i+7RGFSVX0SNLH8D73TDYqBuANiVjB40fAuOoOXAFair+xdJ6AWJL6jp2EcAlhV/fG aZfUFZig3mXkqjle+68Ilt+hsVrNKGAp//Du8J046t3+qip+p9phH2aQVrIqrkHjnPsP bNdA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kevinlocke.name Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n8-20020a170903110800b0019e8ffc177asi15487207plh.367.2023.03.21.14.56.01; Tue, 21 Mar 2023 14:56:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kevinlocke.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229878AbjCUVjo (ORCPT <rfc822;ezelljr.billy@gmail.com> + 99 others); Tue, 21 Mar 2023 17:39:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229555AbjCUVjn (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 21 Mar 2023 17:39:43 -0400 Received: from vulcan.kevinlocke.name (vulcan.kevinlocke.name [107.191.43.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F50F13504; Tue, 21 Mar 2023 14:39:41 -0700 (PDT) Received: from kevinolos.kevinlocke.name (2600-6c67-5000-0a52-0183-7c34-952d-b30a.res6.spectrum.com [IPv6:2600:6c67:5000:a52:183:7c34:952d:b30a]) (Authenticated sender: kevin@kevinlocke.name) by vulcan.kevinlocke.name (Postfix) with ESMTPSA id 5D97537D9B56; Tue, 21 Mar 2023 21:39:37 +0000 (UTC) Received: by kevinolos.kevinlocke.name (Postfix, from userid 1000) id EDD221300353; Tue, 21 Mar 2023 15:39:35 -0600 (MDT) From: Kevin Locke <kevin@kevinlocke.name> To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada <masahiroy@kernel.org>, Linus Torvalds <torvalds@linux-foundation.org>, Nathan Chancellor <nathan@kernel.org>, Nick Desaulniers <ndesaulniers@google.com>, Nicolas Schier <nicolas@fjasle.eu>, linux-kernel@vger.kernel.org Subject: [PATCH v2] kbuild: deb-pkg: set version for linux-headers paths Date: Tue, 21 Mar 2023 15:39:22 -0600 Message-Id: <3351f907cfd0b5d8372e858a8ec9065cc2bd91df.1679434718.git.kevin@kevinlocke.name> X-Mailer: git-send-email 2.39.2 In-Reply-To: <4a55805c694cff4cc9281961f2d457262bea48e6.1679423785.git.kevin@kevinlocke.name> References: <4a55805c694cff4cc9281961f2d457262bea48e6.1679423785.git.kevin@kevinlocke.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761006048266731932?= X-GMAIL-MSGID: =?utf-8?q?1761016050688342567?= |
Series |
[v2] kbuild: deb-pkg: set version for linux-headers paths
|
|
Commit Message
Kevin Locke
March 21, 2023, 9:39 p.m. UTC
As a result of the switch to dh_listpackages, $version is no longer set
when install_kernel_headers() is called. This causes files in the
linux-headers deb package to be installed to a path with an empty
$version (e.g. /usr/src/linux-headers-/scripts/sign-file rather than
/usr/src/linux-headers-6.3.0-rc3/scripts/sign-file).
To avoid this, while continuing to use the version information from
dh_listpackages, pass $version from $package as the second argument
of install_kernel_headers().
Fixes: 36862e14e316 ("kbuild: deb-pkg: use dh_listpackages to know enabled packages")
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
---
Good idea! Thanks for the quick review and feedback. Here's an updated
version.
Changes since v1:
* Pass version as the second argument to install_kernel_headers(),
rather than as a global variable, as suggested by Masahiro Yamada.
scripts/package/builddeb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On Wed, Mar 22, 2023 at 6:39 AM Kevin Locke <kevin@kevinlocke.name> wrote: > > As a result of the switch to dh_listpackages, $version is no longer set > when install_kernel_headers() is called. This causes files in the > linux-headers deb package to be installed to a path with an empty > $version (e.g. /usr/src/linux-headers-/scripts/sign-file rather than > /usr/src/linux-headers-6.3.0-rc3/scripts/sign-file). > > To avoid this, while continuing to use the version information from > dh_listpackages, pass $version from $package as the second argument > of install_kernel_headers(). > > Fixes: 36862e14e316 ("kbuild: deb-pkg: use dh_listpackages to know enabled packages") > Signed-off-by: Kevin Locke <kevin@kevinlocke.name> > --- Applied to linux-kbuild/fixes. Thanks. > Good idea! Thanks for the quick review and feedback. Here's an updated > version. > > Changes since v1: > * Pass version as the second argument to install_kernel_headers(), > rather than as a global variable, as suggested by Masahiro Yamada. > > scripts/package/builddeb | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/scripts/package/builddeb b/scripts/package/builddeb > index c5ae57167d7c..7b23f52c70c5 100755 > --- a/scripts/package/builddeb > +++ b/scripts/package/builddeb > @@ -162,6 +162,7 @@ install_linux_image_dbg () { > > install_kernel_headers () { > pdir=$1 > + version=$2 > > rm -rf $pdir > > @@ -229,7 +230,7 @@ do > linux-libc-dev) > install_libc_headers debian/linux-libc-dev;; > linux-headers-*) > - install_kernel_headers debian/linux-headers;; > + install_kernel_headers debian/linux-headers ${package#linux-headers-};; > esac > done > > -- > 2.39.2 >
diff --git a/scripts/package/builddeb b/scripts/package/builddeb index c5ae57167d7c..7b23f52c70c5 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -162,6 +162,7 @@ install_linux_image_dbg () { install_kernel_headers () { pdir=$1 + version=$2 rm -rf $pdir @@ -229,7 +230,7 @@ do linux-libc-dev) install_libc_headers debian/linux-libc-dev;; linux-headers-*) - install_kernel_headers debian/linux-headers;; + install_kernel_headers debian/linux-headers ${package#linux-headers-};; esac done