* [PATCH zfsonlinux] d/patches: add patch to fetch zfs_gitrev from d/changelog
@ 2026-10-30 11:09 Stoiko Ivanov
0 siblings, 0 replies; only message in thread
From: Stoiko Ivanov @ 2026-10-30 11:09 UTC (permalink / raw)
To: pve-devel
This is a purely cosmetic fix for inconsistencies in the ouput of
`sysctl kernel.spl.gitrev` for our kernels.
Tested by building kernels via sbuild and directly via make deb, and
checking the results.
Difference can for example be observed in 7.0.14-19-pve vs.
7.0.14-26-pve.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
...rev.sh-prefer-version-from-d-changel.patch | 46 +++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 47 insertions(+)
create mode 100644 debian/patches/0026-scripts-make_gitrev.sh-prefer-version-from-d-changel.patch
diff --git a/debian/patches/0026-scripts-make_gitrev.sh-prefer-version-from-d-changel.patch b/debian/patches/0026-scripts-make_gitrev.sh-prefer-version-from-d-changel.patch
new file mode 100644
index 000000000..53bc6917c
--- /dev/null
+++ b/debian/patches/0026-scripts-make_gitrev.sh-prefer-version-from-d-changel.patch
@@ -0,0 +1,46 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Stoiko Ivanov <s.ivanov@proxmox.com>
+Date: Thu, 29 Oct 2026 13:18:53 +0100
+Subject: [PATCH] scripts/make_gitrev.sh: prefer version from d/changelog
+
+make_gitrev.sh is called by make to create zfs_gitrev.h, which is
+used to identify the source-version of a build in the sysctl
+`kernel.spl.gitrev`. I noticed the discrepancy between kernel's
+build via `sbuild` (kernel.spl.gitrev = unknown) or directly
+(kernel.spl.gitrev looks like zfs-2.4.4-0-g71a9f95786).
+
+afaict the issue is purely cosmetic, and I ran into while comparing
+sysctl output of 2 kernels.
+
+make_gitrev.sh relies on having a .git for finding the information,
+which is available (as pointer to the submodule) in a checkout of
+pve-kernel, but not in the source-package used by sbuild.
+
+creating the file and commiting it to the source-package would be an
+alternative - but having the version from d/changelog conveys the
+same information for our released kernels.
+
+keeping the fallback to the git revision for direct builds which don't
+have debian/ copied inside.
+
+Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
+---
+ scripts/make_gitrev.sh | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/scripts/make_gitrev.sh b/scripts/make_gitrev.sh
+index f85c9db097f0049bc83d06c988085b9f446df892..2b50cf4bcb9d414892fe958199a5032b563912ab 100755
+--- a/scripts/make_gitrev.sh
++++ b/scripts/make_gitrev.sh
+@@ -50,8 +50,10 @@ case "${GITREV}" in
+ *) ;;
+ esac
+
++# prefer the version from debian/changelog for our in-kernel builds
+ ZFS_GITREV=$({ cd "${top_srcdir}" &&
+- git describe --always --long --dirty 2>/dev/null; } || :)
++ dpkg-parsechangelog -S Version 2>/dev/null ||
++ git describe --always --long --dirty 2>/dev/null;} ||:)
+
+ if [ -z "${ZFS_GITREV}" ]
+ then
diff --git a/debian/patches/series b/debian/patches/series
index 9a550e1c2..6438a77f1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -23,3 +23,4 @@
0023-L2ARC-Preserve-L2HDR-in-arc_release-for-in-flight-wr.patch
0024-arc-fix-race-between-arc_release-and-arc_read_done.patch
0025-Linux-drop-cached-pages-in-zfs_rezget.patch
+0026-scripts-make_gitrev.sh-prefer-version-from-d-changel.patch
--
2.47.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-30 11:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-30 11:09 [PATCH zfsonlinux] d/patches: add patch to fetch zfs_gitrev from d/changelog Stoiko Ivanov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox