* [PATCH] kbuild: deb-pkg: allow to set package name version
@ 2026-10-19 19:16 Guido Günther
2026-10-20 20:02 ` Nicolas Schier
0 siblings, 1 reply; 4+ messages in thread
From: Guido Günther @ 2026-10-19 19:16 UTC (permalink / raw)
To: Nathan Chancellor, Nicolas Schier
Cc: linux-kbuild, linux-kernel, Guido Günther
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>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] kbuild: deb-pkg: allow to set package name version
2026-10-19 19:16 [PATCH] kbuild: deb-pkg: allow to set package name version Guido Günther
@ 2026-10-20 20:02 ` Nicolas Schier
2026-10-20 20:16 ` Thomas Weißschuh
2026-10-20 21:16 ` Guido Günther
0 siblings, 2 replies; 4+ messages in thread
From: Nicolas Schier @ 2026-10-20 20:02 UTC (permalink / raw)
To: Guido Günther; +Cc: Nathan Chancellor, linux-kbuild, linux-kernel
On Mon, Oct 19, 2026 at 09:16:14PM +0200, Guido Günther wrote:
> 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.
I am not yet convinced, that this is a good idea. Do you want to
elaborate a bit more, why you think this is necessary? Have you tested
your patch? I don't like that source package name and binary package
name divert w/o good reasoning.
Kind regards
Nicolas
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] kbuild: deb-pkg: allow to set package name version
2026-10-20 20:02 ` Nicolas Schier
@ 2026-10-20 20:16 ` Thomas Weißschuh
2026-10-20 21:16 ` Guido Günther
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Weißschuh @ 2026-10-20 20:16 UTC (permalink / raw)
To: Nicolas Schier, Guido Günther, Nathan Chancellor,
linux-kbuild, linux-kernel
On 2026-10-20 22:02:25+0200, Nicolas Schier wrote:
> On Mon, Oct 19, 2026 at 09:16:14PM +0200, Guido Günther wrote:
> > 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.
>
> I am not yet convinced, that this is a good idea. Do you want to
> elaborate a bit more, why you think this is necessary? Have you tested
> your patch? I don't like that source package name and binary package
> name divert w/o good reasoning.
FWIW we have something similar for the Arch Linux packaging with
PACMAN_PKGBASE. It is the complement to the proposed patch, as Arch Linux
by default does *not* allow multiple installed kernel packages of a
single type at the same time. PACMAN_PKGBASE allows this.
KDEB_PKGNAMEVERSION would enable the Arch Linux behavior for the Debian
packages. Personally I would have found this convenient in the past.
Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] kbuild: deb-pkg: allow to set package name version
2026-10-20 20:02 ` Nicolas Schier
2026-10-20 20:16 ` Thomas Weißschuh
@ 2026-10-20 21:16 ` Guido Günther
1 sibling, 0 replies; 4+ messages in thread
From: Guido Günther @ 2026-10-20 21:16 UTC (permalink / raw)
To: Nicolas Schier, Nathan Chancellor, linux-kbuild, linux-kernel
Hi Nicolas,
On Tue, Oct 20, 2026 at 10:02:25PM +0200, Nicolas Schier wrote:
> On Mon, Oct 19, 2026 at 09:16:14PM +0200, Guido Günther wrote:
> > 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.
>
> I am not yet convinced, that this is a good idea. Do you want to
> elaborate a bit more, why you think this is necessary? Have you tested
> your patch? I don't like that source package name and binary package
> name divert w/o good reasoning.
The source and the binary package names can already differ due to the
`KDEB_SOURCENAME` variable (and we're making use of that).
What this patch adds is the ability to control the suffix so we can
e.g. build a `linux-ng-foo` and a `linux-stable-bar` instead of having a
linux-image-7.3.17, linux-image-7.3.18 (or with git versions or …). It's
just about having a bit more control over the generated binary package
names so we can decide what replaces what on upgrades.
I have tested the patch with and without setting KDEB_PKGNAMEVERSION.
Without setting this variable nothing should change for existing users.
Cheers,
-- Guido
>
> Kind regards
> Nicolas
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-10-20 21:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-19 19:16 [PATCH] kbuild: deb-pkg: allow to set package name version Guido Günther
2026-10-20 20:02 ` Nicolas Schier
2026-10-20 20:16 ` Thomas Weißschuh
2026-10-20 21:16 ` Guido Günther
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®