[packages/zfs] extend libfetch test to detect incompatible implementation; rel 2

atler atler at pld-linux.org
Mon Aug 31 14:52:49 CEST 2026


commit fe4596f0b70cb870939c438d67ab732a9468a57f
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Aug 31 14:48:04 2026 +0200

    extend libfetch test to detect incompatible implementation; rel 2
    
    fetchGetURL in libfetch from FreeBSD returns FILE* and that's what zfs
    expects. fetchGetURL in libfetch from NetBSD (used in PLD) returns
    fetchIO*. this incompatibility is not caught though and unfortunately
    it's not possible to select libfetch implementation explicitly.

 libfetch.patch | 11 +++++++++++
 zfs.spec       |  4 +++-
 2 files changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/zfs.spec b/zfs.spec
index 3baf8da..3bf25da 100644
--- a/zfs.spec
+++ b/zfs.spec
@@ -24,7 +24,7 @@ exit 1
 
 %define		_duplicate_files_terminate_build	0
 
-%define	rel	1
+%define	rel	2
 %define	pname	zfs
 Summary:	Native Linux port of the ZFS filesystem
 Summary(pl.UTF-8):	Natywny linuksowy port systemu plików ZFS
@@ -37,6 +37,7 @@ Source0:	https://github.com/openzfs/zfs/releases/download/zfs-%{version}/%{pname
 # Source0-md5:	ad45f983104387b94f7b232e5ec51243
 Patch0:		initdir.patch
 Patch1:		pld.patch
+Patch2:		libfetch.patch
 URL:		https://zfsonlinux.org/
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake
@@ -265,6 +266,7 @@ p=`pwd`\
 %setup -q -n %{pname}-%{version}
 %patch -P0 -p1
 %patch -P1 -p1
+%patch -P2 -p1
 
 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \
 	cmd/zarcsummary
diff --git a/libfetch.patch b/libfetch.patch
new file mode 100644
index 0000000..3328df3
--- /dev/null
+++ b/libfetch.patch
@@ -0,0 +1,11 @@
+--- zfs-2.4.4/config/user-libfetch.m4.orig	2026-08-21 22:46:48.810974565 +0200
++++ zfs-2.4.4/config/user-libfetch.m4	2026-08-31 14:46:12.176909894 +0200
+@@ -29,7 +29,7 @@
+ 		#include <sys/param.h>
+ 		#include <stdio.h>
+ 		#include <fetch.h>
+-	]], [fetchGetURL("", "");])], [
++	]], [FILE *f = fetchGetURL("", "");])], [
+ 		have_libfetch=1
+ 		LIBFETCH_IS_FETCH=1
+ 		LIBFETCH_DYNAMIC=1
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/zfs.git/commitdiff/fe4596f0b70cb870939c438d67ab732a9468a57f



More information about the pld-cvs-commit mailing list