From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 7C7101FF0B7 for ; Fri, 30 Oct 2026 12:09:27 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 57261215CA; Fri, 30 Oct 2026 12:09:25 +0100 (CET) From: Stoiko Ivanov To: pve-devel@lists.proxmox.com Subject: [PATCH zfsonlinux] d/patches: add patch to fetch zfs_gitrev from d/changelog Date: Fri, 30 Oct 2026 12:09:06 +0100 Message-ID: <20261030110910.615366-1-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793358560708 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.470 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: GPSXNP7ZMM2ISGFKIBFEZK67XJFSRJNF X-Message-ID-Hash: GPSXNP7ZMM2ISGFKIBFEZK67XJFSRJNF X-MailFrom: s.ivanov@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- ...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 +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 +--- + 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