[packages/zfs-fuse] - updated to 0.7.2.2; python3,tirpc patches from Fedora, opt,format,common,xattr with my build updat

qboosh qboosh at pld-linux.org
Fri Dec 29 19:53:24 CET 2023


commit e83c3d87ebf864f488924fdcefd5fe804dd332b4
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Dec 29 19:54:07 2023 +0100

    - updated to 0.7.2.2; python3,tirpc patches from Fedora, opt,format,common,xattr with my build updates

 zfs-fuse-common.patch       | 115 ++++++++++++++++++++++++++++++++++++++++++++
 zfs-fuse-format.patch       |  52 ++++++++++++++++++++
 zfs-fuse-libzfs_build.patch |  10 ----
 zfs-fuse-opt.patch          |  36 ++++++++++++++
 zfs-fuse-python3.patch      |  30 ++++++++++++
 zfs-fuse-tirpc.patch        |  78 ++++++++++++++++++++++++++++++
 zfs-fuse-xattr.patch        |  11 +++++
 zfs-fuse-ztest_path.patch   |  23 ++++-----
 zfs-fuse.spec               |  75 ++++++++++++++++++++++-------
 9 files changed, 390 insertions(+), 40 deletions(-)
---
diff --git a/zfs-fuse.spec b/zfs-fuse.spec
index 5a50e72..fd7e495 100644
--- a/zfs-fuse.spec
+++ b/zfs-fuse.spec
@@ -1,18 +1,29 @@
+# TODO: systemd units, scrub script
 Summary:	ZFS Filesystem for FUSE/Linux
 Summary(pl.UTF-8):	System plików ZFS dla Linuksa z FUSE
 Name:		zfs-fuse
-Version:	0.5.0
-Release:	2
-License:	CCDL 1.0
-Group:		Applications/Emulators
-Source0:	http://download.berlios.de/zfs-fuse/%{name}-%{version}.tar.bz2
-# Source0-md5:	46d6bd429d6d9ddd57e078f5f22fa1cd
+Version:	0.7.2.2
+Release:	1
+License:	CCDL v1.0
+Group:		Applications/File
+#Source0Download: https://github.com/gordan-bobic/zfs-fuse/releases
+Source0:	https://github.com/gordan-bobic/zfs-fuse/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	8590a93698ada698586cf3215f3be7e6
 Source1:	%{name}.init
 Patch0:		%{name}-ztest_path.patch
-Patch1:		%{name}-libzfs_build.patch
-URL:		http://www.wizy.org/wiki/ZFS_on_FUSE
+Patch1:		%{name}-opt.patch
+Patch2:		%{name}-python3.patch
+Patch3:		%{name}-tirpc.patch
+Patch4:		%{name}-format.patch
+Patch5:		%{name}-common.patch
+Patch6:		%{name}-xattr.patch
+URL:		https://github.com/gordan-bobic/zfs-fuse
+# also (but no tags)
+#URL:		https://github.com/zfs-fuse/zfs-fuse
+BuildRequires:	glibc-devel >= 6:2.3.4
 BuildRequires:	libaio-devel
-BuildRequires:	libfuse-devel
+BuildRequires:	libfuse-devel >= 2.6.0
+BuildRequires:	libtirpc-devel
 BuildRequires:	rpmbuild(macros) >= 1.337
 BuildRequires:	scons
 BuildRequires:	zlib-devel
@@ -73,25 +84,39 @@ korporacyjnych. Oto lista możliwości:
 %setup -q
 %patch0 -p1
 %patch1 -p1
-sed -i -e 's#-Werror##g' src/SConstruct
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
 
 %build
 cd src
+CC="%{__cc}" \
+CFLAGS="%{rpmcflags} -DNDEBUG" \
 %scons \
-	%{!?debug:dist=1} \
-	CCFLAGS="%{rpmcflags}" \
-	CC="%{__cc}"
+	%{!?debug:dist=1}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 cd src
+CC="%{__cc}" \
+CFLAGS="%{rpmcflags} -DNDEBUG" \
 %scons install \
-	install_dir=$RPM_BUILD_ROOT%{_bindir}
+	cfg_dir=$RPM_BUILD_ROOT%{_sysconfdir}/zfs-fuse \
+	install_dir=$RPM_BUILD_ROOT%{_bindir} \
+	man_dir=$RPM_BUILD_ROOT%{_mandir}/man8
+cd ..
 
 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/zfs-fuse
 
+install -d $RPM_BUILD_ROOT%{systemdunitdir}
+cp -p zfs-fuse*.service $RPM_BUILD_ROOT%{systemdunitdir}
+
+# TODO: zfs-fuse.modules-load zfs-fuse.scrub zfs-fuse.sysconfig zfsrc
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -107,6 +132,22 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc BUGS CHANGES HACKING INSTALL LICENSE README STATUS TESTING TODO
-%attr(754,root,root) /etc/rc.d/init.d/%{name}
-%attr(755,root,root) %{_bindir}/*
+%doc BUGS CHANGES LICENSE README README.NFS STATUS TESTING TODO
+%attr(755,root,root) %{_bindir}/mount.zfs
+%attr(755,root,root) %{_bindir}/zdb
+%attr(755,root,root) %{_bindir}/zfs
+%attr(755,root,root) %{_bindir}/zfs-fuse
+%attr(755,root,root) %{_bindir}/zpool
+%attr(755,root,root) %{_bindir}/zstreamdump
+%attr(755,root,root) %{_bindir}/ztest
+#%{systemdunitdir}/zfs-fuse.service
+#%{systemdunitdir}/zfs-fuse-oom.service
+#%{systemdunitdir}/zfs-fuse-pid.service
+%attr(754,root,root) /etc/rc.d/init.d/zfs-fuse
+%dir %{_sysconfdir}/zfs-fuse
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zfs-fuse/zfs_pool_alert
+%{_mandir}/man8/zdb.8*
+%{_mandir}/man8/zfs-fuse.8*
+%{_mandir}/man8/zfs.8*
+%{_mandir}/man8/zpool.8*
+%{_mandir}/man8/zstreamdump.8*
diff --git a/zfs-fuse-common.patch b/zfs-fuse-common.patch
new file mode 100644
index 0000000..544db36
--- /dev/null
+++ b/zfs-fuse-common.patch
@@ -0,0 +1,115 @@
+--- zfs-fuse-0.7.2.2/src/lib/libsolcompat/include/sys/utsname.h.orig	2015-11-24 17:32:31.000000000 +0100
++++ zfs-fuse-0.7.2.2/src/lib/libsolcompat/include/sys/utsname.h	2023-12-29 09:24:24.788479802 +0100
+@@ -29,7 +29,7 @@
+ 
+ #include_next <sys/utsname.h>
+ 
+-struct utsname utsname;
++extern struct utsname utsname;
+ 
+ #endif
+ 
+--- zfs-fuse-0.7.2.2/src/lib/libzfs/libzfs_zfsfuse.c.orig	2015-11-24 17:32:31.000000000 +0100
++++ zfs-fuse-0.7.2.2/src/lib/libzfs/libzfs_zfsfuse.c	2023-12-29 15:50:50.216206888 +0100
+@@ -37,8 +37,6 @@
+ 
+ #include "libzfs_impl.h"
+ 
+-int aok=0;
+-
+ int zfsfuse_open(const char *pathname, int flags)
+ {
+ 	struct sockaddr_un name;
+--- zfs-fuse-0.7.2.2/src/cmd/zpool/zpool_util.h.orig	2015-11-24 17:32:31.000000000 +0100
++++ zfs-fuse-0.7.2.2/src/cmd/zpool/zpool_util.h	2023-12-29 15:55:50.017916056 +0100
+@@ -63,7 +63,7 @@ void pool_list_free(zpool_list_t *);
+ int pool_list_count(zpool_list_t *);
+ void pool_list_remove(zpool_list_t *, zpool_handle_t *);
+ 
+-libzfs_handle_t *g_zfs;
++extern libzfs_handle_t *g_zfs;
+ 
+ #ifdef	__cplusplus
+ }
+--- zfs-fuse-0.7.2.2/src/cmd/zfs/zfs_util.h.orig	2015-11-24 17:32:31.000000000 +0100
++++ zfs-fuse-0.7.2.2/src/cmd/zfs/zfs_util.h	2023-12-29 15:56:07.287822497 +0100
+@@ -34,7 +34,7 @@ extern "C" {
+ 
+ void * safe_malloc(size_t size);
+ void nomem(void);
+-libzfs_handle_t *g_zfs;
++extern libzfs_handle_t *g_zfs;
+ 
+ #ifdef	__cplusplus
+ }
+--- zfs-fuse-0.7.2.2/src/cmd/zpool/zpool_main.c.orig	2015-11-24 17:32:31.000000000 +0100
++++ zfs-fuse-0.7.2.2/src/cmd/zpool/zpool_main.c	2023-12-29 15:58:29.293719852 +0100
+@@ -53,6 +53,8 @@
+ #include "statcommon.h"
+ #include "format.h"
+ 
++libzfs_handle_t *g_zfs;
++
+ static int zpool_do_create(int, char **);
+ static int zpool_do_destroy(int, char **);
+ 
+--- zfs-fuse-0.7.2.2/src/lib/libsolkerncompat/main.c.orig	2015-11-24 17:32:31.000000000 +0100
++++ zfs-fuse-0.7.2.2/src/lib/libsolkerncompat/main.c	2023-12-29 17:29:41.574073964 +0100
+@@ -43,6 +43,7 @@ uint64_t physmem;
+ unsigned long _pagesize;
+ unsigned int _pageshift;
+ kmem_cache_t *vnode_cache;
++struct utsname utsname;
+ extern void system_taskq_init();
+ 
+ void libsolkerncompat_init()
+--- zfs-fuse-0.7.2.2/src/zfs-fuse/zfs_vnops.c.orig	2015-11-24 17:32:31.000000000 +0100
++++ zfs-fuse-0.7.2.2/src/zfs-fuse/zfs_vnops.c	2023-12-29 17:52:41.103267080 +0100
+@@ -5130,7 +5130,6 @@ zfs_isdir()
+ /*
+  * Directory vnode operations template
+  */
+-vnodeops_t *zfs_dvnodeops;
+ const fs_operation_def_t zfs_dvnodeops_template[] = {
+ 	VOPNAME_OPEN,		{ .vop_open = zfs_open },
+ 	VOPNAME_CLOSE,		{ .vop_close = zfs_close },
+@@ -5163,7 +5162,6 @@ const fs_operation_def_t zfs_dvnodeops_t
+ /*
+  * Regular file vnode operations template
+  */
+-vnodeops_t *zfs_fvnodeops;
+ const fs_operation_def_t zfs_fvnodeops_template[] = {
+ 	VOPNAME_OPEN,		{ .vop_open = zfs_open },
+ 	VOPNAME_CLOSE,		{ .vop_close = zfs_close },
+@@ -5198,7 +5196,6 @@ const fs_operation_def_t zfs_fvnodeops_t
+ /*
+  * Symbolic link vnode operations template
+  */
+-vnodeops_t *zfs_symvnodeops;
+ const fs_operation_def_t zfs_symvnodeops_template[] = {
+ 	VOPNAME_GETATTR,	{ .vop_getattr = zfs_getattr },
+ 	VOPNAME_SETATTR,	{ .vop_setattr = zfs_setattr },
+@@ -5216,7 +5213,6 @@ const fs_operation_def_t zfs_symvnodeops
+ /*
+  * special share hidden files vnode operations template
+  */
+-vnodeops_t *zfs_sharevnodeops;
+ const fs_operation_def_t zfs_sharevnodeops_template[] = {
+ 	VOPNAME_GETATTR,	{ .vop_getattr = zfs_getattr },
+ 	VOPNAME_ACCESS,		{ .vop_access = zfs_access },
+@@ -5240,7 +5236,6 @@ const fs_operation_def_t zfs_sharevnodeo
+  *	zfs_link()	- no links into/out of attribute space
+  *	zfs_rename()	- no moves into/out of attribute space
+  */
+-vnodeops_t *zfs_xdvnodeops;
+ const fs_operation_def_t zfs_xdvnodeops_template[] = {
+ 	VOPNAME_OPEN,		{ .vop_open = zfs_open },
+ 	VOPNAME_CLOSE,		{ .vop_close = zfs_close },
+@@ -5271,7 +5266,6 @@ const fs_operation_def_t zfs_xdvnodeops_
+ /*
+  * Error vnode operations template
+  */
+-vnodeops_t *zfs_evnodeops;
+ const fs_operation_def_t zfs_evnodeops_template[] = {
+ 	VOPNAME_INACTIVE,	{ .vop_inactive = zfs_inactive },
+ 	VOPNAME_PATHCONF,	{ .vop_pathconf = zfs_pathconf },
diff --git a/zfs-fuse-format.patch b/zfs-fuse-format.patch
new file mode 100644
index 0000000..b3d336e
--- /dev/null
+++ b/zfs-fuse-format.patch
@@ -0,0 +1,52 @@
+--- zfs-fuse-0.7.2.2/src/lib/libnvpair/libnvpair.c.orig	2015-11-24 17:32:31.000000000 +0100
++++ zfs-fuse-0.7.2.2/src/lib/libnvpair/libnvpair.c	2023-12-29 08:05:16.384204117 +0100
+@@ -123,7 +123,7 @@ struct nvlist_prtctl {
+ 			(void) DFLTPRTOP(pctl, type)(pctl, \
+ 			    DFLTPRTOPARG(pctl, type), nvl, name, val); \
+ 		} \
+-		(void) fprintf(pctl->nvprt_fp, pctl->nvprt_eomfmt); \
++		(void) fputs(pctl->nvprt_eomfmt, pctl->nvprt_fp); \
+ 	}
+ 
+ #define	ARENDER(pctl, type, nvl, name, arrp, count) \
+@@ -137,7 +137,7 @@ struct nvlist_prtctl {
+ 			(void) DFLTPRTOP(pctl, type)(pctl, \
+ 			    DFLTPRTOPARG(pctl, type), nvl, name, arrp, count); \
+ 		} \
+-		(void) fprintf(pctl->nvprt_fp, pctl->nvprt_eomfmt); \
++		(void) fputs(pctl->nvprt_eomfmt, pctl->nvprt_fp); \
+ 	}
+ 
+ static void nvlist_print_with_indent(nvlist_t *, nvlist_prtctl_t);
+@@ -210,7 +210,7 @@ NVLIST_PRTFUNC(int32, int32_t, int32_t,
+ NVLIST_PRTFUNC(uint32, uint32_t, uint32_t, "0x%x")
+ NVLIST_PRTFUNC(int64, int64_t, longlong_t, "%lld")
+ NVLIST_PRTFUNC(uint64, uint64_t, u_longlong_t, "0x%llx")
+-NVLIST_PRTFUNC(double, double, double, "0x%llf")
++NVLIST_PRTFUNC(double, double, double, "0x%lf")
+ NVLIST_PRTFUNC(string, char *, char *, "%s")
+ NVLIST_PRTFUNC(hrtime, hrtime_t, hrtime_t, "0x%llx")
+ 
+@@ -235,7 +235,7 @@ nvaprint_##type_and_variant(nvlist_prtct
+ 				(void) fprintf(fp, "[%d]: ", i); \
+ 		} \
+ 		if (i != 0) \
+-			(void) fprintf(fp, pctl->nvprt_btwnarrfmt); \
++			(void) fputs(pctl->nvprt_btwnarrfmt, fp); \
+ 		(void) fprintf(fp, vfmt, (ptype)valuep[i]); \
+ 	} \
+ 	return (1); \
+@@ -394,11 +394,11 @@ nvlist_prtctl_dofmt(nvlist_prtctl_t pctl
+ 		break;
+ 
+ 	case NVLIST_FMT_MEMBER_POSTAMBLE:
+-		(void) fprintf(fp, pctl->nvprt_eomfmt);
++		(void) fputs(pctl->nvprt_eomfmt, fp);
+ 		break;
+ 
+ 	case NVLIST_FMT_BTWN_ARRAY:
+-		(void) fprintf(fp, pctl->nvprt_btwnarrfmt); \
++		(void) fputs(pctl->nvprt_btwnarrfmt, fp);
+ 		break;
+ 
+ 	default:
diff --git a/zfs-fuse-libzfs_build.patch b/zfs-fuse-libzfs_build.patch
deleted file mode 100644
index 163d3ce..0000000
--- a/zfs-fuse-libzfs_build.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- zfs-fuse-0.5.0/src/lib/libzfs/libzfs_pool.c	2008-09-13 01:37:59.000000000 +0000
-+++ zfs-fuse-0.5.0/src/lib/libzfs/libzfs_pool.c	2010-06-06 00:55:48.000000000 +0000
-@@ -39,6 +39,7 @@
- #include <zone.h>
- #include <sys/efi_partition.h>
- #include <sys/vtoc.h>
-+#include <sys/stat.h>
- #include <sys/zfs_ioctl.h>
- #include <sys/zio.h>
- #include <strings.h>
diff --git a/zfs-fuse-opt.patch b/zfs-fuse-opt.patch
new file mode 100644
index 0000000..fad5a39
--- /dev/null
+++ b/zfs-fuse-opt.patch
@@ -0,0 +1,36 @@
+--- zfs-fuse-0.7.2.2/src/SConstruct.orig	2023-12-26 22:12:27.436368937 +0100
++++ zfs-fuse-0.7.2.2/src/SConstruct	2023-12-28 20:29:27.337044786 +0100
+@@ -30,9 +30,9 @@ f.close()
+ 
+ env.CacheDir('/tmp/.zfs-fuse.scons')
+ env['CC'] = os.environ.setdefault("CC","gcc")
+-env['CCFLAGS'] = os.environ.setdefault("CFLAGS","")
++env['CCFLAGS'] = Split(os.environ.setdefault("CFLAGS",""))
+ env['LINKFLAGS'] = Split('-pipe -Wall')
+-env.Append(CCFLAGS = Split('-pipe -Wall -std=c99 -Wno-switch -Wno-unused -Wno-missing-braces -Wno-parentheses -Wno-uninitialized -Wcast-align -fno-strict-aliasing -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DTEXT_DOMAIN=\\"zfs-fuse\\" -O2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector -fstrict-volatile-bitfields --param=ssp-buffer-size=4 '))
++env.Append(CCFLAGS = Split('-pipe -Wall -std=c99 -Wno-switch -Wno-unused -Wno-missing-braces -Wno-parentheses -Wno-uninitialized -Wcast-align -fno-strict-aliasing -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DTEXT_DOMAIN=\\"zfs-fuse\\" -Wp,-D_FORTIFY_SOURCE=2 -fstrict-volatile-bitfields'))
+ 
+ if osname == "Linux":
+   env.Append(CPPFLAGS = " -DLINUX_AIO")
+@@ -41,8 +41,7 @@ debug = int(ARGUMENTS.get('debug', '0'))
+ optim = ARGUMENTS.get('optim', '-O2')
+ 
+ if not debug:
+-	env.Append(LINKFLAGS = ['-s'])
+-	env.Append(CCFLAGS = ['-s', optim, '-DNDEBUG'])
++	env.Append(CCFLAGS = [optim, '-DNDEBUG'])
+ else:
+ 	env.Append(LINKFLAGS = ['-ggdb'])
+ 	env.Append(CCFLAGS = ['-ggdb'])
+@@ -91,11 +90,6 @@ if myarch == 'sparc64':
+ 
+ env['ARCH'] = ARGUMENTS.get('target', myarch)
+ 
+-if env['ARCH'] == 'i386' and myarch == 'amd64':
+-	env.Append(CCFLAGS = '-m32')
+-	env.Append(ASFLAGS = '-m32')
+-	env.Append(LINKFLAGS = '-m32')
+-
+ Export('env')
+ 
+ SConscript('lib/libavl/SConscript')
diff --git a/zfs-fuse-python3.patch b/zfs-fuse-python3.patch
new file mode 100644
index 0000000..da4ed2b
--- /dev/null
+++ b/zfs-fuse-python3.patch
@@ -0,0 +1,30 @@
+diff -up zfs-fuse-0.7.2.2/src/SConstruct.py3 zfs-fuse-0.7.2.2/src/SConstruct
+--- zfs-fuse-0.7.2.2/src/SConstruct.py3	2018-01-17 11:02:43.616124442 +0100
++++ zfs-fuse-0.7.2.2/src/SConstruct	2018-01-17 11:04:22.826712411 +0100
+@@ -57,7 +57,7 @@ else:
+ if not (('-DDEBUG' in env['CCFLAGS']) or 
+ 		('-DNDEBUG' in env['CCFLAGS'])):
+ 	print
+-	print "Misconfigured debug level: Neither DEBUG or NDEBUG appears to have been defined: %s" % env['CCFLAGS']
++	print("Misconfigured debug level: Neither DEBUG or NDEBUG appears to have been defined: %s" % env['CCFLAGS'])
+ 	sys.exit(1)
+ 
+ env['CPPPATH'] = []
+@@ -82,7 +82,7 @@ myarch = getarch(arch)
+ 
+ if not myarch:
+ 	print
+-	print 'Sorry, only the x86, amd64 and sparc64 hardware architectures are supported'
++	print('Sorry, only the x86, amd64 and sparc64 hardware architectures are supported')
+ 	sys.exit(1)
+ 
+ if myarch == 'sparc64':
+@@ -131,7 +131,7 @@ env.Install(man_dir, '../doc/zstreamdump
+ env.Install(man_dir, '../doc/zfs-fuse.8')
+ 
+ if "tags" in sys.argv:
+-    print "updating tags..."
++    print("updating tags...")
+     os.system("ctags --extra=+f `find -name '*.c'` `find -name '*.h'`")
+ 
+ env.Alias('install', [install_dir, man_dir, cfg_dir])
diff --git a/zfs-fuse-tirpc.patch b/zfs-fuse-tirpc.patch
new file mode 100644
index 0000000..541e201
--- /dev/null
+++ b/zfs-fuse-tirpc.patch
@@ -0,0 +1,78 @@
+--- zfs-fuse-0.7.2.2/src/SConstruct.orig	2023-12-28 20:58:46.824179492 +0100
++++ zfs-fuse-0.7.2.2/src/SConstruct	2023-12-28 21:27:57.391362523 +0100
+@@ -31,11 +31,11 @@ f.close()
+ env.CacheDir('/tmp/.zfs-fuse.scons')
+ env['CC'] = os.environ.setdefault("CC","gcc")
+ env['CCFLAGS'] = Split(os.environ.setdefault("CFLAGS",""))
+-env['LINKFLAGS'] = Split('-pipe -Wall')
++env['LINKFLAGS'] = Split('-pipe -Wall -ltirpc')
+ env.Append(CCFLAGS = Split('-pipe -Wall -std=c99 -Wno-switch -Wno-unused -Wno-missing-braces -Wno-parentheses -Wno-uninitialized -Wcast-align -fno-strict-aliasing -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DTEXT_DOMAIN=\\"zfs-fuse\\" -Wp,-D_FORTIFY_SOURCE=2 -fstrict-volatile-bitfields'))
+ 
+ if osname == "Linux":
+-  env.Append(CPPFLAGS = " -DLINUX_AIO")
++  env.Append(CPPFLAGS = " -DLINUX_AIO -I/usr/include/tirpc")
+ 
+ debug = int(ARGUMENTS.get('debug', '0'))
+ optim = ARGUMENTS.get('optim', '-O2')
+--- zfs-fuse-0.7.2.2/src/cmd/zfs/zfs_main.c	2015-11-24 10:32:31.000000000 -0600
++++ zfs-fuse-0.7.2.2.good/src/cmd/zfs/zfs_main.c	2019-02-21 13:38:11.861699917 -0600
+@@ -47,6 +47,7 @@
+ #include <sys/fs/zfs.h>
+ #include <sys/types.h>
+ #include <time.h>
++#include <sys/sysmacros.h>
+ 
+ #include <libzfs.h>
+ #include <libuutil.h>
+--- zfs-fuse-0.7.2.2/src/lib/libnvpair/nvpair.c	2015-11-24 10:32:31.000000000 -0600
++++ zfs-fuse-0.7.2.2.good/src/lib/libnvpair/nvpair.c	2019-02-21 13:25:47.483941076 -0600
+@@ -31,7 +31,7 @@
+ #include <sys/nvpair.h>
+ #include <sys/nvpair_impl.h>
+ #include <rpc/types.h>
+-#include <rpc/xdr.h>
++#include "../libsolcompat/include/rpc/xdr.h"
+ 
+ #if defined(_KERNEL) && !defined(_BOOT)
+ #include <sys/varargs.h>
+--- zfs-fuse-0.7.2.2/src/lib/libsolcompat/getmntany.c	2015-11-24 10:32:31.000000000 -0600
++++ zfs-fuse-0.7.2.2.good/src/lib/libsolcompat/getmntany.c	2019-02-21 13:34:53.530041172 -0600
+@@ -36,6 +36,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
++#include <sys/sysmacros.h>
+ 
+ #define BUFSIZE (MNT_LINE_MAX + 2)
+ 
+--- zfs-fuse-0.7.2.2/src/lib/libsolkerncompat/vfs.c	2015-11-24 10:32:31.000000000 -0600
++++ zfs-fuse-0.7.2.2.good/src/lib/libsolkerncompat/vfs.c	2019-02-21 13:39:41.902544986 -0600
+@@ -38,6 +38,7 @@
+ #include <errno.h>
+ #include <pthread.h>
+ #include <unistd.h>
++#include <stddef.h>
+ 
+ struct vfs st_rootvfs = {};
+ 
+--- zfs-fuse-0.7.2.2/src/lib/libsolkerncompat/vnode.c	2015-11-24 10:32:31.000000000 -0600
++++ zfs-fuse-0.7.2.2.good/src/lib/libsolkerncompat/vnode.c	2019-02-21 13:44:47.662018866 -0600
+@@ -52,6 +52,8 @@
+ #include <sys/pathname.h>
+ #include <fs/fs_subr.h>
+ 
++#include <sys/sysmacros.h>
++
+ #include <stdio.h>
+ #include <fcntl.h>
+ #include <string.h>
+--- zfs-fuse-0.7.2.2/src/zfs-fuse/zfs_operations.c	2015-11-24 10:32:31.000000000 -0600
++++ zfs-fuse-0.7.2.2.good/src/zfs-fuse/zfs_operations.c	2019-02-21 13:49:44.500513196 -0600
+@@ -35,6 +35,7 @@
+ #include <sys/zfs_znode.h>
+ #include <sys/mode.h>
+ #include <attr/xattr.h>
++#include <attr/attributes.h>
+ #include <sys/fcntl.h>
+ #include <sys/sa.h>
+ 
diff --git a/zfs-fuse-xattr.patch b/zfs-fuse-xattr.patch
new file mode 100644
index 0000000..7274a3e
--- /dev/null
+++ b/zfs-fuse-xattr.patch
@@ -0,0 +1,11 @@
+--- zfs-fuse-0.7.2.2/src/zfs-fuse/zfs_operations.c.orig	2023-12-29 15:58:42.733647041 +0100
++++ zfs-fuse-0.7.2.2/src/zfs-fuse/zfs_operations.c	2023-12-29 16:25:28.658280334 +0100
+@@ -34,7 +34,7 @@
+ #include <sys/zfs_vfsops.h>
+ #include <sys/zfs_znode.h>
+ #include <sys/mode.h>
+-#include <attr/xattr.h>
++#include <sys/xattr.h>
+ #include <attr/attributes.h>
+ #include <sys/fcntl.h>
+ #include <sys/sa.h>
diff --git a/zfs-fuse-ztest_path.patch b/zfs-fuse-ztest_path.patch
index c2548b8..53405eb 100644
--- a/zfs-fuse-ztest_path.patch
+++ b/zfs-fuse-ztest_path.patch
@@ -7,17 +7,14 @@
 -nice -n 20 ./ztest -V $* && echo Test successful
 +nice -n 20 /usr/bin/ztest -V $* && echo Test successful
  echo "End date: `date`"
---- zfs-fuse-0.5.0/src/cmd/ztest/ztest.c	2008-09-13 03:37:59.000000000 +0200
-+++ zfs-fuse-0.5.0.new/src/cmd/ztest/ztest.c	2008-09-16 15:03:03.109323191 +0200
-@@ -2847,10 +2847,9 @@
- 	char zbuf[1024];
- 	FILE *fp;
+--- zfs-fuse-0.7.2.2/src/cmd/ztest/ztest.c.orig	2023-12-26 11:32:02.694533631 +0100
++++ zfs-fuse-0.7.2.2/src/cmd/ztest/ztest.c	2023-12-26 19:50:19.919233129 +0100
+@@ -4737,7 +4737,7 @@ ztest_run_zdb(char *pool)
+ 	FILE *fp;	
  
--	/* zfs-fuse: ztest is never installed, so zdb should be in ../zdb/ */
- 	/* LINTED */
- 	(void) sprintf(zdb,
--	    "../zdb/zdb -bc%s%s -U /tmp/zpool.cache -O %s %s",
-+	    "/usr/bin/zdb -bc%s%s -U /tmp/zpool.cache -O %s %s",
- 	    zopt_verbose >= 3 ? "s" : "",
- 	    zopt_verbose >= 4 ? "v" : "",
- 	    ztest_random(2) == 0 ? "pre" : "post", pool);
+  	(void) sprintf(zdb,
+-	    "../zdb/zdb -bc%s%s -U %s  %s",
++	    "/usr/bin/zdb -bc%s%s -U %s  %s",
+   	    zopt_verbose >= 3 ? "s" : "",
+   	    zopt_verbose >= 4 ? "v" : "",
+ 	    spa_config_path,
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list