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] kbuild: deb-pkg: allow to set package name version
Date: Mon, 19 Oct 2026 21:16:14 +0200 [thread overview]
Message-ID: <20261019-deb-pkg-v1-1-7f8e60bbede5@sigxcpu.org> (raw)
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>
---
base-commit: c03c1a14507dfaf8b856c2608f9ac216021fc222
change-id: 20261019-deb-pkg-a6ef2837687e
Best regards,
--
Guido Günther <agx@sigxcpu.org>
reply other threads:[~2026-10-19 19:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261019-deb-pkg-v1-1-7f8e60bbede5@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®