all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH zfsonlinux] d/patches: add patch to fetch zfs_gitrev from d/changelog
@ 2026-10-30 11:09 Stoiko Ivanov
  2026-10-31 19:52 ` applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages 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] 2+ messages in thread

* applied: [PATCH zfsonlinux] d/patches: add patch to fetch zfs_gitrev from d/changelog
  2026-10-30 11:09 [PATCH zfsonlinux] d/patches: add patch to fetch zfs_gitrev from d/changelog Stoiko Ivanov
@ 2026-10-31 19:52 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2026-10-31 19:52 UTC (permalink / raw)
  To: pve-devel, Stoiko Ivanov

On Fri, 30 Oct 2026 12:09:06 +0100, Stoiko Ivanov wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/1] d/patches: add patch to fetch zfs_gitrev from d/changelog
      commit: 79a61635c30d1815ea2ea8af69c508bc2d8d50c2




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-31 19:53 UTC | newest]

Thread overview: 2+ messages (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
2026-10-31 19:52 ` applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal