[packages/zfs] - don't try to be smarter than the upstream - no Werror for kernel modules, rel 2

baggins baggins at pld-linux.org
Sat Sep 24 08:16:10 CEST 2022


commit 924fd3f4e8e8936f1a86d217028403fc07407928
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Sep 24 08:13:39 2022 +0200

    - don't try to be smarter than the upstream - no Werror for kernel modules, rel 2
    
    -Werror breaks build with 4.9
    
    ./include/linux/mmzone.h: In function ‘__nr_to_section’:
    ./include/linux/mmzone.h:1132:13: warning: the comparison will always evaluate as ‘true’ for the address of ‘mem_section’ will never be NULL [-Waddress]
     1132 |         if (!mem_section[SECTION_NR_TO_ROOT(nr)])
          |             ^
    ./include/linux/mmzone.h:1127:27: note: ‘mem_section’ declared here
     1127 | extern struct mem_section mem_section[NR_SECTION_ROOTS][SECTIONS_PER_ROOT];
          |                           ^~~~~~~~~~~

 no-Werror.patch | 11 +++++++++++
 zfs.spec        |  4 +++-
 2 files changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/zfs.spec b/zfs.spec
index fe52acc..5989a28 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:	a1efd694cfa22522c51400b2e8731f25
 Patch0:		initdir.patch
 Patch1:		am.patch
+Patch2:		no-Werror.patch
 URL:		https://zfsonlinux.org/
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake
@@ -285,6 +286,7 @@ p=`pwd`\
 %setup -q -n %{pname}-%{version}
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python2(\s|$),#!%{__python}\1,' \
       cmd/arc_summary/arc_summary2
diff --git a/no-Werror.patch b/no-Werror.patch
new file mode 100644
index 0000000..1d0f326
--- /dev/null
+++ b/no-Werror.patch
@@ -0,0 +1,11 @@
+--- zfs-2.1.5/config/kernel.m4~	2022-06-22 18:55:53.000000000 +0200
++++ zfs-2.1.5/config/kernel.m4	2022-09-24 08:10:59.050219049 +0200
+@@ -581,7 +581,7 @@
+ # Example command line to manually build source
+ # make modules -C $LINUX_OBJ $ARCH_UM M=$PWD/build/$1
+ 
+-ccflags-y := -Werror $FRAME_LARGER_THAN
++ccflags-y := $FRAME_LARGER_THAN
+ _ACEOF
+ 
+ 	dnl # Additional custom CFLAGS as requested.
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list