Message ID | 20230312200731.599706-3-masahiroy@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp858782wrd; Sun, 12 Mar 2023 13:09:15 -0700 (PDT) X-Google-Smtp-Source: AK7set9KqhNjdYNQoMwnYqVd36z04PFZebI63ZaV650zfsrQyv3rdeijI44HUSmoHUAa66T8pEWJ X-Received: by 2002:a17:902:c1cd:b0:19e:32da:e458 with SMTP id c13-20020a170902c1cd00b0019e32dae458mr27011104plc.63.1678651755120; Sun, 12 Mar 2023 13:09:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678651755; cv=none; d=google.com; s=arc-20160816; b=LgPKx8S+xVM9g1MwkMhbz47x3qY3iPvMZrPP/q3UPkGW0HnBTTqCGrc6XD3v4OLQ8H +EgCNeMEqU/PQdlf+cd4EPVn4lNfPf5g9RQvPntxQZ0OV1eqYgItEx7uIDUsOKX1Fx4m gMMEmABy+lixQ56Xu5BqvwnblWB2VJhviRW8JLBhD/i0vfSpCmR17ueW10CHbhmuxa/L XPmxL1fv4G33C8VhmWv3QwWN6BjUdJYNDC/v73n2Z3cFDsNOWaD2ROsIw+ScdnGo0+IP ruu08NtLmcYEAymUI8/3TXJ22DXRo0Kh1p/MEv1KZCgCZk0iGfed81Ef+U+axp/jlaPH O7zA== 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 :dkim-signature; bh=Wpt07xGCzUYwwU0qOSiU2xchNmq5uXpaDPNJnzLwkcY=; b=spfVDhrYk05nQN1YjP8kKgoV9Wt3ybfWAQcPVCuXrAIkYUbRceBXbR7ig1DzjuJMn9 5E2eTkw0CRyRi9OYKN1lGPfULS0Z8jsPkEObBihKV7p3K57t2dE7j27nSCS2AB4Ex9Sr T9/XyH02Lxw98nH5L2hzu+RS8XXHr8hxjsGlHZni1exMAtifNgMLoQzMRmXK+2OqXLLX aiQI7iw1SHfZHvdQEIB7nImE00/x7Esd92epMqaMAitmaTTV147ITGpIEzxFFzYdZPsS Qf8xLysNTGy6NWS+hpQk6lZq6zny5v7QVQ70tdFtbE+n9mBQUGz7wTypYNye6kdk8Ow1 p+jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Q+2+5fa4; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x10-20020a170902ec8a00b00198eff37f1dsi4704438plg.90.2023.03.12.13.09.00; Sun, 12 Mar 2023 13:09:15 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Q+2+5fa4; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230468AbjCLUHr (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Sun, 12 Mar 2023 16:07:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230435AbjCLUHq (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 12 Mar 2023 16:07:46 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B899F2B62A; Sun, 12 Mar 2023 13:07:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 621F1B800C1; Sun, 12 Mar 2023 20:07:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47CAFC433D2; Sun, 12 Mar 2023 20:07:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678651659; bh=SI4KrO3CvzpG6Y/Rp16w4y1l1Nd7kr9KP+ChdCjrOeQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q+2+5fa4v5cYlQ+p8KguN3K7xXgWQIobJ2DE5WgySuLDWDLzGbbxshaX1ghB0jkr7 m3YLN0RteXm6hDcZg3v4FZ7sjF3qtdIAarJBhPULG8oOhBmCZjttqV9Xoo/yuxgMSN Ol6FN4QbtZsX7d+vECxsqA2KNkxFs15uW2nutkX6JpdxCj5aSlcLsDrYR0+pRfTOAt VDc5HxOrtSQqiYyEE700/fGWmCputAxGbFNAiRStl8mkidc21cnpt9/eE+0M4lKRh5 eY6qdcgHPd2flcem3+Bsxn56zAY0U/GjbZYvctLX8dd/w3X2Ho65J6G++DvzmEUSRb qfuY7rkhyEwHw== From: Masahiro Yamada <masahiroy@kernel.org> To: linux-kbuild@vger.kernel.org Cc: Linus Torvalds <torvalds@linux-foundation.org>, linux-kernel@vger.kernel.org, Masahiro Yamada <masahiroy@kernel.org>, =?utf-8?q?P=C3=A9ter_Ujfalusi?= <peter.ujfalusi@linux.intel.com>, Nathan Chancellor <nathan@kernel.org>, Nick Desaulniers <ndesaulniers@google.com>, Nicolas Schier <nicolas@fjasle.eu> Subject: [PATCH 2/6] kbuild: deb-pkg: do not take KERNELRELEASE from the source version Date: Mon, 13 Mar 2023 05:07:27 +0900 Message-Id: <20230312200731.599706-3-masahiroy@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230312200731.599706-1-masahiroy@kernel.org> References: <20230312200731.599706-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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?1760193942799649244?= X-GMAIL-MSGID: =?utf-8?q?1760193942799649244?= |
Series |
kbuild: fix some packaging issues, and use git-archive for source package
|
|
Commit Message
Masahiro Yamada
March 12, 2023, 8:07 p.m. UTC
KERNELRELEASE does not need to match the package version in changelog.
Rather, it conventially matches what is called 'ABINAME', which is a
part of the binary package names.
Both are the same by default, but the former might be overridden by
KDEB_PKGVERSION. In this case, the resulting package would not boot
because /lib/modules/$(uname -r) does not point the module directory.
Partially revert 3ab18a625ce4 ("kbuild: deb-pkg: improve the usability
of source package").
Reported-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Fixes: 3ab18a625ce4 ("kbuild: deb-pkg: improve the usability of source package")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
scripts/package/deb-build-option | 9 ++++-----
scripts/package/mkdebian | 1 +
2 files changed, 5 insertions(+), 5 deletions(-)
Comments
Hi, On 12/03/2023 22:07, Masahiro Yamada wrote: > KERNELRELEASE does not need to match the package version in changelog. > Rather, it conventially matches what is called 'ABINAME', which is a > part of the binary package names. > > Both are the same by default, but the former might be overridden by > KDEB_PKGVERSION. In this case, the resulting package would not boot > because /lib/modules/$(uname -r) does not point the module directory. > > Partially revert 3ab18a625ce4 ("kbuild: deb-pkg: improve the usability > of source package"). Thank you, I have tested locally and in our CI, bindeb-pkg target works again. Tested-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> > > Reported-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> > Fixes: 3ab18a625ce4 ("kbuild: deb-pkg: improve the usability of source package") > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> > --- > > scripts/package/deb-build-option | 9 ++++----- > scripts/package/mkdebian | 1 + > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/scripts/package/deb-build-option b/scripts/package/deb-build-option > index b079b0d121d4..bd53624318f2 100755 > --- a/scripts/package/deb-build-option > +++ b/scripts/package/deb-build-option > @@ -8,9 +8,8 @@ if [ -z "${CROSS_COMPILE}${cross_compiling}" -a "${DEB_HOST_ARCH}" != "${DEB_BUI > fi > > version=$(dpkg-parsechangelog -S Version) > -version_upstream="${version%-*}" > -debian_revision="${version#${version_upstream}}" > -debian_revision="${debian_revision#*-}" > +debian_revision="${version##*-}" > > -echo KERNELRELEASE=${version_upstream} > -echo KBUILD_BUILD_VERSION=${debian_revision} > +if [ "${version}" != "${debian_revision}" ]; then > + echo KBUILD_BUILD_VERSION=${debian_revision} > +fi > diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian > index c6fbfb9f74ba..31b050368cd0 100755 > --- a/scripts/package/mkdebian > +++ b/scripts/package/mkdebian > @@ -244,6 +244,7 @@ KERNELRELEASE = ${KERNELRELEASE} > build-indep: > build-arch: > \$(MAKE) -f \$(srctree)/Makefile ARCH=${ARCH} \ > + KERNELRELEASE=\$(KERNELRELEASE) \ > \$(shell \$(srctree)/scripts/package/deb-build-option) \ > olddefconfig all >
diff --git a/scripts/package/deb-build-option b/scripts/package/deb-build-option index b079b0d121d4..bd53624318f2 100755 --- a/scripts/package/deb-build-option +++ b/scripts/package/deb-build-option @@ -8,9 +8,8 @@ if [ -z "${CROSS_COMPILE}${cross_compiling}" -a "${DEB_HOST_ARCH}" != "${DEB_BUI fi version=$(dpkg-parsechangelog -S Version) -version_upstream="${version%-*}" -debian_revision="${version#${version_upstream}}" -debian_revision="${debian_revision#*-}" +debian_revision="${version##*-}" -echo KERNELRELEASE=${version_upstream} -echo KBUILD_BUILD_VERSION=${debian_revision} +if [ "${version}" != "${debian_revision}" ]; then + echo KBUILD_BUILD_VERSION=${debian_revision} +fi diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian index c6fbfb9f74ba..31b050368cd0 100755 --- a/scripts/package/mkdebian +++ b/scripts/package/mkdebian @@ -244,6 +244,7 @@ KERNELRELEASE = ${KERNELRELEASE} build-indep: build-arch: \$(MAKE) -f \$(srctree)/Makefile ARCH=${ARCH} \ + KERNELRELEASE=\$(KERNELRELEASE) \ \$(shell \$(srctree)/scripts/package/deb-build-option) \ olddefconfig all