1 %define module @PACKAGE@
5 # (un)define the next line to either build for the newest or all current kernels
6 %define buildforkernels newest
7 #define buildforkernels current
8 #define buildforkernels akmod
12 %bcond_with debug_kmem
13 %bcond_with debug_kmem_tracking
14 %bcond_with atomic_spinlocks
20 Release: @RELEASE@
%{?dist}
21 Summary: Kernel module
(s
)
23 Group: System Environment
/Kernel
25 URL: http
://zfsonlinux.org
/
26 Source0: %{module}-%{version}.tar.gz
28 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id} -u
-n
)
30 # The developments headers will conflict with the dkms packages.
31 Conflicts: %{module}-dkms
35 # Building for a repository use the proper build-sysbuild package
36 # to determine which kernel-devel packages should be installed.
37 BuildRequires
: %{_bindir}/kmodtool
38 %{!?kernels:BuildRequires: buildsys-build-%{repo}-kerneldevpkgs-%{?buildforkernels:%{buildforkernels}}%{!?buildforkernels:current}-%{_target_cpu}}
42 # Building local packages attempt to to use the installed kernel.
43 %{?rhel:BuildRequires: kernel-devel}
44 %{?fedora:BuildRequires: kernel-devel}
45 %{?suse_version:BuildRequires: kernel-source}
47 %if !%{defined kernels} && !%{defined build_src_rpm}
48 %if 0%{?rhel}%{?fedora}%{?suse_version}
49 %define kernels %
(ls
-1 /usr
/src
/kernels
)
51 %define kernels %
(ls
-1 /lib
/modules
)
60 # Kmodtool does its magic here. A patched version of kmodtool is shipped
61 # because the latest versions may not be available for your distribution.
62 # https://bugzilla.rpmfusion.org/show_bug.cgi?id=2714
63 %{expand:%(bash %{SOURCE10} --target %{_target_cpu} %{?repo:--repo %{?repo}} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} --devel %{?prefix:--prefix "%{?prefix}"} %{?kernels:--for-kernels "%{?kernels}"} %{?kernelbuildroot:--buildroot "%{?kernelbuildroot}"} 2>/dev/null) }
67 This package contains the kernel modules required to emulate
68 several interfaces provided by the Solaris kernel.
71 # Error out if there was something wrong with kmodtool.
74 # Print kmodtool output for debugging purposes:
75 bash
%{SOURCE10} --target %{_target_cpu} %{?repo:--repo %{?repo}} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} --devel %{?prefix:--prefix "%{?prefix}"} %{?kernels:--for-kernels "%{?kernels}"} %{?kernelbuildroot:--buildroot "%{?kernelbuildroot}"} 2>/dev
/null
78 %define debug
--enable-debug
80 %define debug
--disable
-debug
84 %define debug_log
--enable-debug
-log
86 %define debug_log
--disable
-debug
-log
89 %if %{with debug_kmem}
90 %define debug_kmem
--enable-debug
-kmem
92 %define debug_kmem
--disable
-debug
-kmem
95 %if %{with debug_kmem_tracking}
96 %define debug_kmem_tracking
--enable-debug
-kmem
-tracking
98 %define debug_kmem_tracking
--disable
-debug
-kmem
-tracking
101 %if %{with atomic_spinlocks}
102 %define atomic_spinlocks
--enable-atomic
-spinlocks
104 %define atomic_spinlocks
--disable
-atomic
-spinlocks
107 # Leverage VPATH from configure to avoid making multiple copies.
108 %define _configure ..
/%{module}-%{version}/configure
112 for kernel_version
in %{?kernel_versions}; do
113 %{__mkdir} _kmod_build_${kernel_version%%___*}
117 for kernel_version
in %{?kernel_versions}; do
118 cd _kmod_build_$
{kernel_version%
%___*}
120 --with
-config
=kernel \
121 %if 0%{?rhel}%{?fedora}
122 --with
-linux
="$
{kernel_version
##*___}" \
123 --with
-linux
-obj
="$
{kernel_version
##*___}" \
126 if [ -e "
/lib
/modules
/$
{kernel_version%
%___*}/source"
]; then \
127 echo "
/lib
/modules
/$
{kernel_version%
%___*}/source"
; \
129 echo "
/lib
/modules
/$
{kernel_version%
%___*}/build"
; \
131 --with
-linux
-obj
="
/lib
/modules
/$
{kernel_version%
%___*}/build" \
136 %{debug_kmem_tracking} \
144 rm -rf $
{RPM_BUILD_ROOT
}
146 # Relies on the kernel 'modules_install' make target.
147 for kernel_version
in %{?kernel_versions}; do
148 cd _kmod_build_$
{kernel_version%
%___*}
150 DESTDIR
=$
{RPM_BUILD_ROOT
} \
151 %{?prefix:INSTALL_MOD_PATH=%{?prefix}} \
152 INSTALL_MOD_DIR
=%{kmodinstdir_postfix}
156 # find-debuginfo.sh only considers executables
157 chmod u
+x $
{RPM_BUILD_ROOT
}%{kmodinstdir_prefix}/*/extra
/*/*/*
162 rm -rf $RPM_BUILD_ROOT
165 * Fri Sep
9 2016 Ned Bass
<bass6@llnl.gov
> - 0.6.5.8-1
166 - Fix HAVE_MUTEX_OWNER
test for kernels prior to
4.6 zfsonlinux
/spl
#566
167 - Add handling
for kernel
4.7's CONFIG_TRIM_UNUSED_KSYMS zfsonlinux
/spl
#565
168 - Linux
4.8 compat
: rw_semaphore atomic_long_t count zfsonlinux
/spl
#563
169 - Implement a proper rw_tryupgrade zfsonlinux
/spl
#554
170 - Add rw_tryupgrade
() zfsonlinux
/spl
#534 zfsonlinux/zfs#4388
171 - Fix taskq_wait_outstanding re
-evaluate tq_next_id zfsonlinux
/spl
#553
172 - Fix race between taskq_destroy and dynamic spawning thread zfsonlinux
/spl
#553 zfsonlinux/spl#550
173 - Use kernel provided mutex owner zfsonlinux
/spl
#553 zfsonlinux/spl#550
174 - Add isa_defs
for MIPS zfsonlinux
/spl
#558
175 - Linux
4.7 compat
: inode_lock
() and friends zfsonlinux
/spl
#549
176 - Fix
: handle NULL
case in spl_kmem_free_track
() zfsonlinux
/spl
#567
177 * Thu May
12 2016 Ned Bass
<bass6@llnl.gov
> - 0.6.5.7-1
178 - Fix PPC build failure zfsonlinux
/spl
#516
179 * Tue Mar
22 2016 Ned Bass
<bass6@llnl.gov
> - 0.6.5.6-1
180 - Remove artificial architecture restrictions
in packaging
181 - Add support
for s390
[x
] zfsonlinux
/spl
#537
182 * Wed Mar
9 2016 Ned Bass
<bass6@llnl.gov
> - 0.6.5.5-1
183 - Linux
4.5 compatibility zfsonlinux
/spl
#524
184 - Create working debuginfo packages on Red Hat zfsonlinux
/zfs
#4224
185 - Allow copy
-builtin to run multiple
times zfsonlinux
/spl
#526
186 - Use safer flags
for in-kernel memory allocations zfsonlinux
/spl
#523
187 - Fix potential deadlock
in cv_wait
() zfsonlinux
/zfs
#4106
188 - Fix livelock
in shrinker zfsonlinux
/zfs
#3936
189 * Fri Jan
8 2016 Ned Bass
<bass6@llnl.gov
> - 0.6.5.4-1
190 - Build fixes on SPARC and some kernels
191 - Fix taskq dynamic spawning deadlock
192 - Fix
builtin kernel builds
193 - Fix crash due to overflow
in P2ROUNDUP macro
194 - Fix deadlock during direct memory reclaim
195 * Tue Oct
13 2015 Ned Bass
<bass6@llnl.gov
> - 0.6.5.3-1
196 - Fix CPU hotplug zfsonlinux
/spl
#482
197 - Disable dynamic taskqs by default to avoid deadlock zfsonlinux
/spl
#484
198 * Tue Sep
29 2015 Ned Bass
<bass6@llnl.gov
> - 0.6.5.2-1
200 - Fix PAX
Patch/Grsec SLAB_USERCOPY panic zfsonlinux
/zfs
#3796
201 - Always remove during dkms uninstall
/update zfsonlinux
/spl
#476
202 * Thu Sep
19 2015 Ned Bass
<bass6@llnl.gov
> - 0.6.5.1-1
203 - Released
0.6.5.1-1, no changes from spl
-0.6.5
204 * Thu Sep
10 2015 Brian Behlendorf
<behlendorf1@llnl.gov
> - 0.6.5-1
205 - Released
0.6.5-1, detailed release notes are available at
:
206 - https
://github.com
/zfsonlinux
/zfs
/releases
/tag
/zfs
-0.6.5
207 * Wed Apr
8 2015 Brian Behlendorf
<behlendorf1@llnl.gov
> - 0.6.4-1
209 * Thu Jun
12 2014 Brian Behlendorf
<behlendorf1@llnl.gov
> - 0.6.3-1
211 * Wed Aug
21 2013 Brian Behlendorf
<behlendorf1@llnl.gov
> - 0.6.2-1
213 * Fri Mar
22 2013 Brian Behlendorf
<behlendorf1@llnl.gov
> - 0.6.1-1
214 - First official stable release.