[packages/zfs] - updated to 2.3.1, fix libzfs headers functionality

qboosh qboosh at pld-linux.org
Tue Apr 15 21:31:47 CEST 2025


commit e5e1cd390672c53ada07d441c5c5957fa47682fe
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Apr 15 21:24:15 2025 +0200

    - updated to 2.3.1, fix libzfs headers functionality

 dequeue_signal.patch | 130 ---------------------------------------------------
 pld.patch            |  21 +++++----
 zfs.spec             |  20 ++++----
 3 files changed, 23 insertions(+), 148 deletions(-)
---
diff --git a/zfs.spec b/zfs.spec
index 74158ae..fbd2cbc 100644
--- a/zfs.spec
+++ b/zfs.spec
@@ -24,20 +24,19 @@ exit 1
 
 %define		_duplicate_files_terminate_build	0
 
-%define	rel	4
+%define	rel	1
 %define	pname	zfs
 Summary:	Native Linux port of the ZFS filesystem
 Summary(pl.UTF-8):	Natywny linuksowy port systemu plików ZFS
 Name:		%{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
-Version:	2.2.7
+Version:	2.3.1
 Release:	%{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
 License:	CDDL
 Group:		Applications/System
 Source0:	https://github.com/openzfs/zfs/releases/download/zfs-%{version}/%{pname}-%{version}.tar.gz
-# Source0-md5:	25d3e7afe00e04abe2c795cf644070af
+# Source0-md5:	1d8fef7fce8556cd1d4eb0a6dafcbaa8
 Patch0:		initdir.patch
 Patch1:		pld.patch
-Patch2:		dequeue_signal.patch
 URL:		https://zfsonlinux.org/
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake
@@ -265,7 +264,6 @@ p=`pwd`\
 %setup -q -n %{pname}-%{version}
 %patch -P 0 -p1
 %patch -P 1 -p1
-%patch -P 2 -p1
 
 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \
 	cmd/arc_summary
@@ -328,6 +326,11 @@ cp -a installed/* $RPM_BUILD_ROOT
 	DESTDIR=$RPM_BUILD_ROOT \
 	DEFAULT_INIT_DIR=/etc/rc.d/init.d
 
+# these headers are used as <sys/abd_os.h> and <sys/abd_impl_os.h> from /usr/include/libzfs/sys/abd{,_impl}.h resp.
+# they don't refer to any functions in libzpool
+%{__mv} $RPM_BUILD_ROOT%{_includedir}/libzpool/abd*_os.h $RPM_BUILD_ROOT%{_includedir}/libzfs/sys
+rmdir $RPM_BUILD_ROOT%{_includedir}/libzpool
+
 %if %{with python3}
 cd contrib/pyzfs
 %py3_install
@@ -496,6 +499,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man8/zpool-checkpoint.8*
 %{_mandir}/man8/zpool-clear.8*
 %{_mandir}/man8/zpool-create.8*
+%{_mandir}/man8/zpool-ddtprune.8*
 %{_mandir}/man8/zpool-destroy.8*
 %{_mandir}/man8/zpool-detach.8*
 %{_mandir}/man8/zpool-events.8*
@@ -509,6 +513,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man8/zpool-list.8*
 %{_mandir}/man8/zpool-offline.8*
 %{_mandir}/man8/zpool-online.8*
+%{_mandir}/man8/zpool-prefetch.8*
 %{_mandir}/man8/zpool-reguid.8*
 %{_mandir}/man8/zpool-remove.8*
 %{_mandir}/man8/zpool-reopen.8*
@@ -533,13 +538,13 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/libuutil.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libuutil.so.3
 %attr(755,root,root) %{_libdir}/libzfs.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libzfs.so.4
+%attr(755,root,root) %ghost %{_libdir}/libzfs.so.6
 %attr(755,root,root) %{_libdir}/libzfs_core.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libzfs_core.so.3
 %attr(755,root,root) %{_libdir}/libzfsbootenv.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libzfsbootenv.so.1
 %attr(755,root,root) %{_libdir}/libzpool.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libzpool.so.5
+%attr(755,root,root) %ghost %{_libdir}/libzpool.so.6
 
 %files devel
 %defattr(644,root,root,755)
@@ -557,7 +562,6 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libzpool.la
 %{_includedir}/libspl
 %{_includedir}/libzfs
-%{_includedir}/libzpool
 %{_pkgconfigdir}/libzfs.pc
 %{_pkgconfigdir}/libzfs_core.pc
 %{_pkgconfigdir}/libzfsbootenv.pc
diff --git a/dequeue_signal.patch b/dequeue_signal.patch
deleted file mode 100644
index 78c2bce..0000000
--- a/dequeue_signal.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From 21cba06befe98abe99c07b5827ca364836bcd17d Mon Sep 17 00:00:00 2001
-From: Rob Norris <robn at despairlabs.com>
-Date: Mon, 21 Oct 2024 13:50:13 +1100
-Subject: [PATCH] config: fix dequeue_signal check for kernels <4.20
-
-Before 4.20, kernel_siginfo_t was just called siginfo_t. This was
-causing the kthread_dequeue_signal_3arg_task check, which uses
-kernel_siginfo_t, to fail on older kernels.
-
-In d6b8c17f1, we started checking for the "new" three-arg
-dequeue_signal() by testing for the "old" version. Because that test is
-explicitly using kernel_siginfo_t, it would fail, leading to the build
-trying to use the new three-arg version, which would then not compile.
-
-This commit fixes that by avoiding checking for the old 3-arg
-dequeue_signal entirely. Instead, we check for the new one, as well as
-the 4-arg form, and we use the old form as a fallback. This way, we
-never have to test for it explicitly, and once we're building
-HAVE_SIGINFO will make sure we get the right kernel_siginfo_t for it, so
-everything works out nice.
-
-Original-patch-by: Finix <yancw at info2soft.com>
-Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
-Signed-off-by: Rob Norris <robn at despairlabs.com>
-Closes #16666
----
- config/kernel-kthread.m4         | 37 +++++++++++++++++++-------------
- module/os/linux/spl/spl-thread.c |  6 +++---
- 2 files changed, 25 insertions(+), 18 deletions(-)
-
-diff --git a/config/kernel-kthread.m4 b/config/kernel-kthread.m4
-index 4d580efead6b..607953146323 100644
---- a/config/kernel-kthread.m4
-+++ b/config/kernel-kthread.m4
-@@ -17,14 +17,21 @@ AC_DEFUN([ZFS_AC_KERNEL_KTHREAD_COMPLETE_AND_EXIT], [
- 
- AC_DEFUN([ZFS_AC_KERNEL_KTHREAD_DEQUEUE_SIGNAL], [
- 	dnl #
--	dnl # 5.17 API: enum pid_type * as new 4th dequeue_signal() argument,
--	dnl # 5768d8906bc23d512b1a736c1e198aa833a6daa4 ("signal: Requeue signals in the appropriate queue")
-+	dnl # prehistory:
-+	dnl #     int dequeue_signal(struct task_struct *task, sigset_t *mask,
-+	dnl #         siginfo_t *info)
- 	dnl #
--	dnl # int dequeue_signal(struct task_struct *task, sigset_t *mask, kernel_siginfo_t *info);
--	dnl # int dequeue_signal(struct task_struct *task, sigset_t *mask, kernel_siginfo_t *info, enum pid_type *type);
-+	dnl # 4.20: kernel_siginfo_t introduced, replaces siginfo_t
-+	dnl #     int dequeue_signal(struct task_struct *task, sigset_t *mask,
-+	dnl           kernel_siginfo_t *info)
- 	dnl #
--	dnl # 6.12 API: first arg struct_task* removed
--	dnl # int dequeue_signal(sigset_t *mask, kernel_siginfo_t *info, enum pid_type *type);
-+	dnl # 5.17: enum pid_type introduced as 4th arg
-+	dnl #     int dequeue_signal(struct task_struct *task, sigset_t *mask,
-+	dnl #         kernel_siginfo_t *info, enum pid_type *type)
-+	dnl #
-+	dnl # 6.12: first arg struct_task* removed
-+	dnl #     int dequeue_signal(sigset_t *mask, kernel_siginfo_t *info,
-+	dnl #         enum pid_type *type)
- 	dnl #
- 	AC_MSG_CHECKING([whether dequeue_signal() takes 4 arguments])
- 	ZFS_LINUX_TEST_RESULT([kthread_dequeue_signal_4arg], [
-@@ -33,11 +40,11 @@ AC_DEFUN([ZFS_AC_KERNEL_KTHREAD_DEQUEUE_SIGNAL], [
- 		    [dequeue_signal() takes 4 arguments])
- 	], [
- 		AC_MSG_RESULT(no)
--		AC_MSG_CHECKING([whether dequeue_signal() a task argument])
--		ZFS_LINUX_TEST_RESULT([kthread_dequeue_signal_3arg_task], [
-+		AC_MSG_CHECKING([whether 3-arg dequeue_signal() takes a type argument])
-+		ZFS_LINUX_TEST_RESULT([kthread_dequeue_signal_3arg_type], [
- 			AC_MSG_RESULT(yes)
--			AC_DEFINE(HAVE_DEQUEUE_SIGNAL_3ARG_TASK, 1,
--			    [dequeue_signal() takes a task argument])
-+			AC_DEFINE(HAVE_DEQUEUE_SIGNAL_3ARG_TYPE, 1,
-+			    [3-arg dequeue_signal() takes a type argument])
- 		], [
- 			AC_MSG_RESULT(no)
- 		])
-@@ -56,27 +63,27 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_KTHREAD_COMPLETE_AND_EXIT], [
- ])
- 
- AC_DEFUN([ZFS_AC_KERNEL_SRC_KTHREAD_DEQUEUE_SIGNAL], [
--	ZFS_LINUX_TEST_SRC([kthread_dequeue_signal_3arg_task], [
-+	ZFS_LINUX_TEST_SRC([kthread_dequeue_signal_4arg], [
- 		#include <linux/sched/signal.h>
- 	], [
- 		struct task_struct *task = NULL;
- 		sigset_t *mask = NULL;
- 		kernel_siginfo_t *info = NULL;
-+		enum pid_type *type = NULL;
- 		int error __attribute__ ((unused));
- 
--		error = dequeue_signal(task, mask, info);
-+		error = dequeue_signal(task, mask, info, type);
- 	])
- 
--	ZFS_LINUX_TEST_SRC([kthread_dequeue_signal_4arg], [
-+	ZFS_LINUX_TEST_SRC([kthread_dequeue_signal_3arg_type], [
- 		#include <linux/sched/signal.h>
- 	], [
--		struct task_struct *task = NULL;
- 		sigset_t *mask = NULL;
- 		kernel_siginfo_t *info = NULL;
- 		enum pid_type *type = NULL;
- 		int error __attribute__ ((unused));
- 
--		error = dequeue_signal(task, mask, info, type);
-+		error = dequeue_signal(mask, info, type);
- 	])
- ])
- 
-diff --git a/module/os/linux/spl/spl-thread.c b/module/os/linux/spl/spl-thread.c
-index 7f74d44f91ff..7b0ce30c7884 100644
---- a/module/os/linux/spl/spl-thread.c
-+++ b/module/os/linux/spl/spl-thread.c
-@@ -171,11 +171,11 @@ issig(void)
- #if defined(HAVE_DEQUEUE_SIGNAL_4ARG)
- 	enum pid_type __type;
- 	if (dequeue_signal(current, &set, &__info, &__type) != 0) {
--#elif defined(HAVE_DEQUEUE_SIGNAL_3ARG_TASK)
--	if (dequeue_signal(current, &set, &__info) != 0) {
--#else
-+#elif defined(HAVE_DEQUEUE_SIGNAL_3ARG_TYPE)
- 	enum pid_type __type;
- 	if (dequeue_signal(&set, &__info, &__type) != 0) {
-+#else
-+	if (dequeue_signal(current, &set, &__info) != 0) {
- #endif
- 		spin_unlock_irq(&current->sighand->siglock);
- 		kernel_signal_stop();
diff --git a/pld.patch b/pld.patch
index 6a6f820..eb042be 100644
--- a/pld.patch
+++ b/pld.patch
@@ -1,10 +1,11 @@
---- zfs-2.2.3/config/zfs-build.m4.orig	2024-02-22 18:27:01.262129327 +0100
-+++ zfs-2.2.3/config/zfs-build.m4	2024-03-05 09:42:48.042560357 +0100
-@@ -627,6 +627,7 @@
- 		debian)     bashcompletiondir=/usr/share/bash-completion/completions   ;;
- 		freebsd)    bashcompletiondir=$sysconfdir/bash_completion.d;;
- 		gentoo)     bashcompletiondir=/usr/share/bash-completion/completions   ;;
-+		pld)        bashcompletiondir=/usr/share/bash-completion/completions   ;;
- 		*)          bashcompletiondir=/etc/bash_completion.d   ;;
- 	esac
- 	AC_MSG_RESULT([$bashcompletiondir])
+--- zfs-2.3.1/config/zfs-build.m4.orig	2025-04-15 17:48:26.176529494 +0200
++++ zfs-2.3.1/config/zfs-build.m4	2025-04-15 18:15:07.527854229 +0200
+@@ -629,7 +629,7 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
+ 
+ 	AC_MSG_CHECKING([default bash completion directory])
+ 	case "$VENDOR" in
+-		alpine|arch|artix|debian|gentoo|ubuntu)
++		alpine|arch|artix|debian|gentoo|ubuntu|pld)
+ 			bashcompletiondir=/usr/share/bash-completion/completions
+ 			;;
+ 		freebsd)
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list