diff --git a/filesystems/openzfs/Makefile b/filesystems/openzfs/Makefile index 0e37ec1de063..f0ff998915bd 100644 --- a/filesystems/openzfs/Makefile +++ b/filesystems/openzfs/Makefile @@ -1,75 +1,76 @@ PORTNAME= openzfs PORTVERSION= 2.4.0 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= filesystems sysutils MASTER_SITES= https://github.com/openzfs/zfs/releases/download/zfs-${PORTVERSION}/ DISTNAME= zfs-${DISTVERSION} MAINTAINER= mm@FreeBSD.org COMMENT= OpenZFS userland for FreeBSD WWW= https://github.com/openzfs/zfs LICENSE= CDDL BROKEN_riscv64= fails to compile: btree_test.c:462:49: result of comparison of constant -1 with expression of type 'char' is always true BUILD_DEPENDS= ksh93:shells/ksh93 RUN_DEPENDS= openzfs-kmod>=0:filesystems/openzfs-kmod USES+= cpe libtool gettext-runtime gmake python:build shebangfix ssl SHEBANG_GLOB= *.ksh *.ksh.in *.kshlib *.py.in SHEBANG_FILES= tests/zfs-tests/tests/functional/trim/trim.cfg \ cmd/zarcstat.in \ cmd/dbufstat.in \ cmd/zilstat.in \ cmd/zarcsummary GNU_CONFIGURE= yes GNU_CONFIGURE_MANPREFIX=${PREFIX}/share CONFIGURE_ARGS= MAKE=gmake --prefix=${PREFIX} --with-config="user" OPTIONS_DEFINE= DEBUG PYTHON TESTS PYTHON_DESC= Build the pyzfs library, zarcsummary, zarcstat, and dbufstat utilities TESTS_DESC= Install the ZFS Test Suite OPTIONS_SUB= yes USE_LDCONFIG= yes .include .if ${PORT_OPTIONS:MDEBUG} CONFIGURE_ARGS+= --enable-debug --enable-debuginfo .endif .if ${PORT_OPTIONS:MPYTHON} CONFIGURE_ARGS+= --with-python=${PYTHON_VER} --enable-pyzfs BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}packaging>0:devel/py-packaging@${PY_FLAVOR} BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}cffi>0:devel/py-cffi@${PY_FLAVOR} RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}cffi>0:devel/py-cffi@${PY_FLAVOR} RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}sysctl>0:devel/py-sysctl@${PY_FLAVOR} .else CONFIGURE_ARGS+= --without-python PYTHON_NO_DEPENDS=yes .endif .include post-extract: # Change certain shebangs into something that shebang fix understands cd ${WRKSRC} && ${SED} -i '' '1s:@PYTHON_SHEBANG@:python3:' \ tests/test-runner/bin/zts-report.py.in \ tests/test-runner/bin/test-runner.py.in \ cmd/zarcstat.in \ cmd/dbufstat.in \ cmd/zilstat.in post-patch: .if ${ARCH} == i386 ${REINPLACE_CMD} \ -e 's,-c -o lib/libspl/libspl_la-atomic.lo,-Wno-error=atomic-alignment -c -o lib/libspl/libspl_la-atomic.lo,' \ -e 's,-c -o module/icp/algs/sha2/libicp_la-sha256_impl.lo,-Wno-unused-function -c -o module/icp/algs/sha2/libicp_la-sha256_impl.lo,' \ -e 's,-c -o module/icp/algs/sha2/libicp_la-sha512_impl.lo,-Wno-unused-function -c -o module/icp/algs/sha2/libicp_la-sha512_impl.lo,' \ ${WRKSRC}/Makefile.in .endif .include diff --git a/filesystems/openzfs/files/patch-cmd_zfs_zfs__main.c b/filesystems/openzfs/files/patch-cmd_zfs_zfs__main.c index c0028d254a4d..3a0537b2c44a 100644 --- a/filesystems/openzfs/files/patch-cmd_zfs_zfs__main.c +++ b/filesystems/openzfs/files/patch-cmd_zfs_zfs__main.c @@ -1,31 +1,31 @@ ---- cmd/zfs/zfs_main.c.orig 2025-12-18 18:41:34.311311571 +0100 -+++ cmd/zfs/zfs_main.c 2025-12-29 11:32:45.050147000 +0100 -@@ -6884,17 +6884,28 @@ +--- cmd/zfs/zfs_main.c.orig 2025-12-18 17:41:34 UTC ++++ cmd/zfs/zfs_main.c +@@ -6884,17 +6884,28 @@ print_holds(boolean_t scripted, int nwidth, int tagwid if (scripted) { if (parsable) { +#if defined(__FreeBSD__) && defined(__i386__) + (void) printf("%s\t%s\t%d\n", zname, + tagname, time); +#else (void) printf("%s\t%s\t%lld\n", zname, tagname, (long long)time); +#endif } else { (void) printf("%s\t%s\t%s\n", zname, tagname, tsbuf); } } else { if (parsable) { +#if defined(__FreeBSD__) && defined(__i386__) + (void) printf("%-*s %-*s %d\n", + nwidth, zname, tagwidth, + tagname, time); +#else (void) printf("%-*s %-*s %lld\n", nwidth, zname, tagwidth, tagname, (long long)time); +#endif } else { (void) printf("%-*s %-*s %s\n", nwidth, zname, tagwidth, diff --git a/filesystems/openzfs/files/patch-module_nvpair_nvpair.c b/filesystems/openzfs/files/patch-module_nvpair_nvpair.c new file mode 100644 index 000000000000..aa86845fe14a --- /dev/null +++ b/filesystems/openzfs/files/patch-module_nvpair_nvpair.c @@ -0,0 +1,30 @@ +--- module/nvpair/nvpair.c.orig 2025-12-18 18:01:01 UTC ++++ module/nvpair/nvpair.c +@@ -3246,7 +3246,8 @@ nvs_xdr_nvl_fini(nvstream_t *nvs) + * xdrproc_t-compatible callbacks for xdr_array() + */ + +-#if defined(_KERNEL) && defined(__linux__) /* Linux kernel */ ++#if (defined(__FreeBSD_version) && __FreeBSD_version >= 1600010) || \ ++ defined(_KERNEL) && defined(__linux__) /* Linux kernel */ + + #define NVS_BUILD_XDRPROC_T(type) \ + static bool_t \ +@@ -3255,7 +3256,7 @@ nvs_xdr_nvp_##type(XDR *xdrs, void *ptr) \ + return (xdr_##type(xdrs, ptr)); \ + } + +-#elif !defined(_KERNEL) && defined(XDR_CONTROL) /* tirpc */ ++#elif !defined(_KERNEL) && defined(XDR_CONTROL) /* tirpc, FreeBSD < 16 */ + + #define NVS_BUILD_XDRPROC_T(type) \ + static bool_t \ +@@ -3271,7 +3272,7 @@ nvs_xdr_nvp_##type(XDR *xdrs, ...) \ + return (xdr_##type(xdrs, ptr)); \ + } + +-#else /* FreeBSD, sunrpc */ ++#else /* FreeBSD kernel < 16, sunrpc */ + + #define NVS_BUILD_XDRPROC_T(type) \ + static bool_t \