From: "Guido Günther" <agx@sigxcpu.org>
To: Nathan Chancellor <nathan@kernel.org>, Nicolas Schier <nsc@kernel.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
"Guido Günther" <agx@sigxcpu.org>
Subject: [PATCH v2 2/2] kbuild: deb-pkg: allow to set package name version
Date: Sun, 25 Oct 2026 17:46:36 +0100 [thread overview]
Message-ID: <20261025-deb-pkg-v2-2-8c33a4ac18ad@sigxcpu.org> (raw)
In-Reply-To: <20261025-deb-pkg-v2-0-8c33a4ac18ad@sigxcpu.org>
Instead of hardcoding ${KERNELRELEASE} in the package name allow
the user to override this.
This can be useful if one doesn't want to accumulate different packages
for every commit or micro version bump by setting
KDEB_PKGNAMEVERSION=7.3 or even KDEB_PKGNAMEVERSION=stable.
Signed-off-by: Guido Günther <agx@sigxcpu.org>
---
scripts/package/mkdebian | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index d4b007b38a475..44ca9991fd6f4 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -172,6 +172,12 @@ else
packagename=linux-image
fi
+if [ "${KDEB_PKGNAMEVERSION:+set}" ]; then
+ packagenameversion=$KDEB_PKGNAMEVERSION
+else
+ packagenameversion=$KERNELRELEASE
+fi
+
debarch=
set_debarch
@@ -215,7 +221,7 @@ Build-Depends-Arch: bc, bison, flex,
python3:native, rsync
Homepage: https://www.kernel.org/
-Package: $packagename-${KERNELRELEASE}
+Package: $packagename-${packagenameversion}
Architecture: $debarch
Description: Linux kernel, version ${KERNELRELEASE}
This package contains the Linux kernel, modules and corresponding other
@@ -238,7 +244,7 @@ EOF
if is_enabled CONFIG_MODULES; then
cat <<EOF >> debian/control
-Package: linux-headers-${KERNELRELEASE}
+Package: linux-headers-${packagenameversion}
Architecture: $debarch
Build-Profiles: <!pkg.${sourcename}.nokernelheaders>
Description: Linux kernel headers for ${KERNELRELEASE} on $debarch
@@ -252,7 +258,7 @@ fi
if is_enabled CONFIG_DEBUG_INFO; then
cat <<EOF >> debian/control
-Package: linux-image-${KERNELRELEASE}-dbg
+Package: linux-image-${packagenameversion}-dbg
Section: debug
Architecture: $debarch
Build-Profiles: <!pkg.${sourcename}.nokerneldbg>
--
2.53.0
prev parent reply other threads:[~2026-10-25 16:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-25 16:46 [PATCH v2 0/2] " Guido Günther
2026-10-25 16:46 ` [PATCH v2 1/2] kbuild: builddeb: Use ${KERNELRELEASE} consistently Guido Günther
2026-10-25 16:46 ` Guido Günther [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261025-deb-pkg-v2-2-8c33a4ac18ad@sigxcpu.org \
--to=agx@sigxcpu.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®