* [PATCH v2 0/2] kbuild: deb-pkg: allow to set package name version
@ 2026-10-25 16:46 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 ` [PATCH v2 2/2] kbuild: deb-pkg: allow to set package name version Guido Günther
0 siblings, 2 replies; 3+ messages in thread
From: Guido Günther @ 2026-10-25 16:46 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>
---
Changes in v2:
- Let "scripts/package/builddeb" use ${KERNELRELEASE} when referring to
the kernel release rather than using $version. Split into a separate
commit as this can be useful on its own.
- Link to v1: https://patch.msgid.link/20261019-deb-pkg-v1-1-7f8e60bbede5@sigxcpu.org
To: Nathan Chancellor <nathan@kernel.org>
To: Nicolas Schier <nsc@kernel.org>
Cc: linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
Guido Günther (2):
kbuild: builddeb: Use ${KERNELRELEASE} consistently
kbuild: deb-pkg: allow to set package name version
scripts/package/builddeb | 4 ++--
scripts/package/mkdebian | 12 +++++++++---
2 files changed, 11 insertions(+), 5 deletions(-)
---
base-commit: c03c1a14507dfaf8b856c2608f9ac216021fc222
change-id: 20261019-deb-pkg-a6ef2837687e
Best regards,
--
Guido Günther <agx@sigxcpu.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 1/2] kbuild: builddeb: Use ${KERNELRELEASE} consistently
2026-10-25 16:46 [PATCH v2 0/2] kbuild: deb-pkg: allow to set package name version Guido Günther
@ 2026-10-25 16:46 ` Guido Günther
2026-10-25 16:46 ` [PATCH v2 2/2] kbuild: deb-pkg: allow to set package name version Guido Günther
1 sibling, 0 replies; 3+ messages in thread
From: Guido Günther @ 2026-10-25 16:46 UTC (permalink / raw)
To: Nathan Chancellor, Nicolas Schier
Cc: linux-kbuild, linux-kernel, Guido Günther
Only use $version when it affects the package name, other places
should use ${KERNELRELEASE}.
Signed-off-by: Guido Günther <agx@sigxcpu.org>
---
scripts/package/builddeb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index ba1defc616524..5fdc9ea0dcca4 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -147,8 +147,8 @@ install_kernel_headers () {
"${srctree}/scripts/package/install-extmod-build" "${pdir}/usr/src/linux-headers-${version}"
fi
- mkdir -p $pdir/lib/modules/$version/
- ln -s /usr/src/linux-headers-$version $pdir/lib/modules/$version/build
+ mkdir -p $pdir/lib/modules/${KERNELRELEASE}/
+ ln -s /usr/src/linux-headers-$version $pdir/lib/modules/${KERNELRELEASE}/build
}
install_libc_headers () {
--
2.53.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 2/2] kbuild: deb-pkg: allow to set package name version
2026-10-25 16:46 [PATCH v2 0/2] kbuild: deb-pkg: allow to set package name version 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
1 sibling, 0 replies; 3+ messages in thread
From: Guido Günther @ 2026-10-25 16:46 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>
--
2.53.0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-25 16:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-25 16:46 [PATCH v2 0/2] kbuild: deb-pkg: allow to set package name version 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 ` [PATCH v2 2/2] kbuild: deb-pkg: allow to set package name version 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®