Index: head/databases/rrdtool/Makefile =================================================================== --- head/databases/rrdtool/Makefile (revision 538810) +++ head/databases/rrdtool/Makefile (revision 538811) @@ -1,111 +1,111 @@ # Created by: Dmitry Sivachenko # $FreeBSD$ PORTNAME= rrdtool PORTVERSION= 1.7.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= databases graphics MASTER_SITES= http://oss.oetiker.ch/rrdtool/pub/ MAINTAINER= zeising@FreeBSD.org COMMENT= Round Robin Database Tools LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE CONFLICTS= rrdtool12-* CONFIGURE_ARGS= --disable-tcl CPPFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/freetype2 USE_RC_SUBR= rrdcached USE_LDCONFIG= yes GNU_CONFIGURE= yes USES= gmake gnome libtool pathfix pkgconfig shebangfix USE_GNOME= glib20 libxml2 INSTALL_TARGET= install-strip PORTEXAMPLES= cgi-demo.cgi OPTIONS_DEFINE= DEJAVU GRAPH MMAP NLS PERL PYTHON \ RUBY EXAMPLES DOCS OPTIONS_DEFAULT=DEJAVU GRAPH MMAP PERL OPTIONS_SUB= yes GRAPH_DESC= Enable the rrdtool graph command (needs cairo) DEJAVU_DESC= Use DejaVu fonts (requires X11) MMAP_DESC= Use mmap in rrd_update PERL_DESC= Build PERL module PYTHON_DESC= Build PYTHON bindings RUBY_DESC= Build RUBY bindings DEJAVU_RUN_DEPENDS= dejavu>0:x11-fonts/dejavu DOCS_CONFIGURE_ENABLE= docs DOCS_USES= groff GRAPH_CONFIGURE_OFF= --disable-rrdcgi --disable-rrd_graph GRAPH_LIB_DEPENDS= libfreetype.so:print/freetype2 \ libpng.so:graphics/png GRAPH_USE= GNOME=cairo,pango MMAP_CONFIGURE_ENABLE= mmap NLS_CONFIGURE_ENABLE= nls NLS_USE= GNOME=intltool NLS_USES= gettext localbase PERL_CONFIGURE_OFF= --disable-perl PERL_CONFIGURE_ON= --enable-perl --enable-perl-site-install PERL_MAKE_ARGS= PERL_MAKE_OPTIONS='PREFIX="${PREFIX}" INSTALLPRIVLIB="${PREFIX}/lib" INSTALLARCHLIB="${PREFIX}/lib"' PERL_USES= perl5 PYTHON_CONFIGURE_ENABLE=python PYTHON_USES= python PYTHON_USE= python=flavors,optsuffix RUBY_CONFIGURE_ENABLE= ruby RUBY_USE= RUBY=yes .include .if ${PORT_OPTIONS:MPERL} SHEBANG_FILES= examples/rrdcached/rrdcached-size.pl PORTEXAMPLES+= 4charts.pl bigtops.pl minmax.pl perftest.pl \ piped-demo.pl shared-demo.pl stripes.pl \ rrdcached/RRDCached.pm rrdcached/rrdcached-size.pl .endif .if ${PORT_OPTIONS:MPYTHON} SHEBANG_FILES+= examples/stripes.py PORTEXAMPLES+= stripes.py .endif post-extract: @${REINPLACE_CMD} -E 's|(^rrdcached_LDADD = librrd_th.la)|\1 $$\(ALL_LIBS\)|' \ ${WRKSRC}/src/Makefile.in @${REINPLACE_CMD} -E 's|(^rrdtool_LDADD = librrd.la)|\1 $$\(ALL_LIBS\)|' \ ${WRKSRC}/src/Makefile.in post-extract-EXAMPLES-off: @${REINPLACE_CMD} -e '/^SUBDIRS = /s| examples | |' \ ${WRKSRC}/Makefile.in post-install-EXAMPLES-on: .if !defined(BATCH) @${ECHO_MSG} "" @${ECHO_MSG} "############################################################################" @${ECHO_MSG} "# See ${EXAMPLESDIR} for some demonstration code #" @${ECHO_MSG} "############################################################################" .endif post-install-PERL-on: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/RRDs/RRDs.so post-install-PERL-off: ${RM} ${STAGEDIR}${EXAMPLESDIR}/*.pl ${RM} -r ${STAGEDIR}${EXAMPLESDIR}/rrdcached post-install-PYTHON-on: ${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/rrdtool.so post-install-PYTHON-off: ${RM} ${STAGEDIR}${EXAMPLESDIR}/stripes.py post-install-RUBY-on: ${STRIP_CMD} ${STAGEDIR}${RUBY_SITEARCHLIBDIR}/RRD.so .include Index: head/databases/rrdtool/files/patch-8829fa7.c =================================================================== --- head/databases/rrdtool/files/patch-8829fa7.c (nonexistent) +++ head/databases/rrdtool/files/patch-8829fa7.c (revision 538811) @@ -0,0 +1,35 @@ +From 8829fa758f3e585f20094cff69b32489f4cce3e7 Mon Sep 17 00:00:00 2001 +From: Niclas Zeising +Date: Sun, 14 Jun 2020 11:31:33 +0200 +Subject: [PATCH] rrd_open: Ignore EINVAL from posix_fallocate() + +ZFS on FreeBSD (at least) does not support posix_fallocate(), +returning EINVAL instead. Ignore this error and continue normally. +Without this change, it is not possible to resize rrd files on ZFS. + +This fixes #1082 + +Signed-off-by: Niclas Zeising +--- + src/rrd_open.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/rrd_open.c b/src/rrd_open.c +index d8005fe4..00dfb8ca 100644 +--- src/rrd_open.c ++++ src/rrd_open.c +@@ -363,7 +363,13 @@ rrd_file_t *rrd_open( + */ + int fret = + posix_fallocate(rrd_simple_file->fd, 0, newfile_size); +- if (fret) { ++ /* ZFS (on FreeBSD) does not support posix_fallocate(), always returning ++ * EINVAL. Ignore this error and continue anyway. ++ * Without this, resize isn't possible on ZFS filesystems. ++ */ ++ if (fret == EINVAL) { ++ /* DO NOTHING */ ++ } else if (fret) { + rrd_set_error("posix_fallocate '%s': %s", file_name, + rrd_strerror(fret)); + goto out_close; Property changes on: head/databases/rrdtool/files/patch-8829fa7.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property