git: d06582608186 - 2026Q2 - databases/rrdtool: Fix rrdtool resize on zfs FreeBSD 15

From: Nuno Teixeira <eduardo_at_FreeBSD.org>
Date: Mon, 29 Jun 2026 17:25:49 UTC
The branch 2026Q2 has been updated by eduardo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d065826081860fe343cb6e57920799ba5d1f8cb4

commit d065826081860fe343cb6e57920799ba5d1f8cb4
Author:     Tomohiro Hosaka <bokutin@bokut.in>
AuthorDate: 2026-06-29 16:34:37 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2026-06-29 17:24:58 +0000

    databases/rrdtool: Fix rrdtool resize on zfs FreeBSD 15
    
    It appears that `posix_fallocate` in FreeBSD 15 now returns `EOPNOTSUPP`
    instead of `EINVAL`.
    
    See also:
    https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/QZXFLC6E47UDM65GZAFDBZ2DJKIDT7N2/?sort=date
    https://github.com/mariadb-corporation/galera/issues/685
    
    PR:             296381
---
 databases/rrdtool/Makefile                    |  2 +-
 databases/rrdtool/files/patch-src_rrd__open.c | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/databases/rrdtool/Makefile b/databases/rrdtool/Makefile
index 50b268e6125f..ff6e68cba353 100644
--- a/databases/rrdtool/Makefile
+++ b/databases/rrdtool/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	rrdtool
 DISTVERSION=	1.9.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	databases graphics
 MASTER_SITES=	https://github.com/oetiker/rrdtool-1.x/releases/download/v${DISTVERSION}/
 
diff --git a/databases/rrdtool/files/patch-src_rrd__open.c b/databases/rrdtool/files/patch-src_rrd__open.c
new file mode 100644
index 000000000000..51f4d17c8203
--- /dev/null
+++ b/databases/rrdtool/files/patch-src_rrd__open.c
@@ -0,0 +1,11 @@
+--- src/rrd_open.c.orig	2024-07-29 08:43:48 UTC
++++ src/rrd_open.c
+@@ -372,7 +372,7 @@ rrd_file_t *rrd_open(
+          * EINVAL.  Ignore this error and continue anyway.
+          * Without this, resize isn't possible on ZFS filesystems.
+          */
+-        if (fret == EINVAL) {
++        if (fret == EINVAL || fret == EOPNOTSUPP) {
+             /* DO NOTHING */
+         } else if (fret) {
+             rrd_set_error("posix_fallocate '%s': %s", file_name,