]> git.proxmox.com Git - mirror_zfs-debian.git/blob - rpm/generic/zfs-kmod.spec.in
Imported Upstream version 0.6.5.6
[mirror_zfs-debian.git] / rpm / generic / zfs-kmod.spec.in
1 %define module @PACKAGE@
2
3 %if !%{defined ksrc}
4 %if 0%{?rhel}%{?fedora}
5 %define ksrc ${kernel_version##*___}
6 %else
7 %define ksrc "$( \
8 if [ -e "/usr/src/linux-${kernel_version%%___*}" ]; then \
9 echo "/usr/src/linux-${kernel_version%%___*}"; \
10 elif [ -e "/lib/modules/${kernel_version%%___*}/source" ]; then \
11 echo "/lib/modules/${kernel_version%%___*}/source"; \
12 else \
13 echo "/lib/modules/${kernel_version%%___*}/build"; \
14 fi)"
15 %endif
16 %endif
17
18 %if !%{defined kobj}
19 %if 0%{?rhel}%{?fedora}
20 %define kobj ${kernel_version##*___}
21 %else
22 %define kobj "$( \
23 if [ -e "/usr/src/linux-${kernel_version%%___*}" ]; then \
24 echo "/usr/src/linux-${kernel_version%%___*}"; \
25 else \
26 echo "/lib/modules/${kernel_version%%___*}/build"; \
27 fi)"
28 %endif
29 %endif
30
31 #define repo rpmfusion
32 #define repo chaos
33
34 # (un)define the next line to either build for the newest or all current kernels
35 %define buildforkernels newest
36 #define buildforkernels current
37 #define buildforkernels akmod
38
39 %bcond_with debug
40 %bcond_with debug_dmu_tx
41
42
43 Name: %{module}-kmod
44
45 Version: @VERSION@
46 Release: @RELEASE@%{?dist}
47 Summary: Kernel module(s)
48
49 Group: System Environment/Kernel
50 License: @ZFS_META_LICENSE@
51 URL: http://zfsonlinux.org/
52 Source0: %{module}-%{version}.tar.gz
53 Source10: kmodtool
54 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id} -u -n)
55
56 # The developments headers will conflict with the dkms packages.
57 Conflicts: %{module}-dkms
58
59 %if %{defined repo}
60
61 # Building for a repository use the proper build-sysbuild package
62 # to determine which kernel-devel packages should be installed.
63 BuildRequires: %{_bindir}/kmodtool
64 %{!?kernels:BuildRequires: buildsys-build-%{repo}-kerneldevpkgs-%{?buildforkernels:%{buildforkernels}}%{!?buildforkernels:current}-%{_target_cpu}}
65
66 %else
67
68 # Building local packages attempt to to use the installed kernel.
69 %{?rhel:BuildRequires: kernel-devel}
70 %{?fedora:BuildRequires: kernel-devel}
71 %{?suse_version:BuildRequires: kernel-source}
72
73 %if !%{defined kernels} && !%{defined build_src_rpm}
74 %if 0%{?rhel}%{?fedora}%{?suse_version}
75 %define kernels %(ls -1 /usr/src/kernels)
76 %else
77 %define kernels %(ls -1 /lib/modules)
78 %endif
79 %endif
80 %endif
81
82 %if 0%{?rhel}%{?fedora}%{?suse_version}
83 BuildRequires: kmod-spl-devel = %{version}
84 %global KmodsRequires kmod-spl
85 %global KmodsDevelRequires kmod-spl-devel
86 %global KmodsMetaRequires spl-kmod
87 %endif
88
89 %if 0%{?fedora} >= 17
90 %define prefix /usr
91 %endif
92
93 # Kmodtool does its magic here. A patched version of kmodtool is shipped
94 # with the source rpm until kmod development packages are supported upstream.
95 # https://bugzilla.rpmfusion.org/show_bug.cgi?id=2714
96 %{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) }
97
98
99 %description
100 This package contains the ZFS kernel modules.
101
102 %prep
103 # Error out if there was something wrong with kmodtool.
104 %{?kmodtool_check}
105
106 # Print kmodtool output for debugging purposes:
107 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
108
109 %if %{with debug}
110 %define debug --enable-debug
111 %else
112 %define debug --disable-debug
113 %endif
114
115 %if %{with debug_dmu_tx}
116 %define debug_dmu_tx --enable-debug-dmu-tx
117 %else
118 %define debug_dmu_tx --disable-debug-dmu-tx
119 %endif
120
121 #
122 # Allow the overriding of spl locations
123 #
124 %if %{defined require_splver}
125 %define splver %{require_splver}
126 %else
127 %define splver %{version}
128 %endif
129
130 %if %{defined require_spldir}
131 %define spldir %{require_spldir}
132 %else
133 %define spldir %{_usrsrc}/spl-%{splver}
134 %endif
135
136 %if %{defined require_splobj}
137 %define splobj %{require_splobj}
138 %else
139 %define splobj %{spldir}/${kernel_version%%___*}
140 %endif
141
142
143 # Leverage VPATH from configure to avoid making multiple copies.
144 %define _configure ../%{module}-%{version}/configure
145
146 %setup -q -c -T -a 0
147
148 for kernel_version in %{?kernel_versions}; do
149 %{__mkdir} _kmod_build_${kernel_version%%___*}
150 done
151
152 %build
153 for kernel_version in %{?kernel_versions}; do
154 cd _kmod_build_${kernel_version%%___*}
155 %configure \
156 --with-config=kernel \
157 --with-linux=%{ksrc} \
158 --with-linux-obj=%{kobj} \
159 --with-spl="%{spldir}" \
160 --with-spl-obj="%{splobj}" \
161 %{debug} \
162 %{debug_dmu_tx}
163 make %{?_smp_mflags}
164 cd ..
165 done
166
167
168 %install
169 rm -rf ${RPM_BUILD_ROOT}
170
171 # Relies on the kernel 'modules_install' make target.
172 for kernel_version in %{?kernel_versions}; do
173 cd _kmod_build_${kernel_version%%___*}
174 make install \
175 DESTDIR=${RPM_BUILD_ROOT} \
176 %{?prefix:INSTALL_MOD_PATH=%{?prefix}} \
177 INSTALL_MOD_DIR=%{kmodinstdir_postfix}
178 cd ..
179 done
180 # find-debuginfo.sh only considers executables
181 chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/*
182 %{?akmod_install}
183
184
185 %clean
186 rm -rf $RPM_BUILD_ROOT
187
188 %changelog
189 * Tue Mar 22 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.6-1
190 - Remove artificial architecture restrictions in packaging
191 - Add support for s390[x] zfsonlinux/zfs#4425
192 - Handle negative dentries in case insensitive filesystem zfsonlinux/zfs#4243
193 - Fix casesensitivity=insensitive deadlock zfsonlinux/zfs#4136
194 - Correctly parse zdb -R flag arguments zfsonlinux/zfs#4304
195 - Fix lock order inversion with zvol_open() zfsonlinux/zfs#3681
196 - Add support for asynchronous zvol minor operations zfsonlinux/zfs#2217
197 - Make zvol minor functionality more robust zfsonlinux/zfs#4344
198 - Prevent zpool_find_vdev() from truncating vdev path zfsonlinux/zfs#4312
199 - Add -gLP to zpool subcommands for alt vdev names zfsonlinux/zfs#4341
200 - Fix zpool list -v output for spares and log devices zfsonlinux/zfs#4313
201 * Wed Mar 9 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.5-1
202 - Linux 4.5 compatibility zfsonlinux/zfs#4228
203 - Create working debuginfo packages on Red Hat zfsonlinux/zfs#4224
204 - Make arc_summary.py and dbufstat.py compatible with python3
205 - musl libc compatibility for option parsing zfsonlinux/zfs#4222
206 - Prevent arc_c collapse and possible panic zfsonlinux/zfs#3904
207 - Prevent duplicated xattr between SA and dir zfsonlinux/zfs#4153
208 - Fix zsb->z_hold_mtx deadlock zfsonlinux/zfs#4106
209 - Prevent SA header corruption zfsonlinux/zfs#4150
210 * Fri Jan 8 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.4-1
211 - Linux 4.4 compat
212 - Assorted stability fixes
213 - Fixes for NFS-exported snapshots
214 - Fix kernel warning in unlock_new_inode() and deadlock
215 - Fix overflow in P2ROUNDUP_TYPED macro
216 - Fix write performance issue due to bad zfs_dirty_data_max calculation
217 - Fix builtin kernel builds
218 - Fix deadlock during direct memory reclaim
219 * Tue Oct 13 2015 Ned Bass <bass6@llnl.gov> - 0.6.5.3-1
220 - Don't import all visible pools in zfs-import init script zfsonlinux/zfs#3777
221 - Fix use-after-free in vdev_disk_physio_completion zfsonlinux/zfs#3920
222 - Fix avl_is_empty(&dn->dn_dbufs) assertion zfsonlinux/zfs#3865
223 * Wed Sep 30 2015 Ned Bass <bass6@llnl.gov> - 0.6.5.2-1
224 - Init script fixes zfsonlinux/zfs#3816
225 - Fix uioskip crash when skip to end zfsonlinux/zfs#3806 zfsonlinux/zfs#3850
226 - Userspace can trigger an assertion zfsonlinux/zfs#3792
227 - Fix quota userused underflow bug zfsonlinux/zfs#3789
228 - Fix performance regression from unwanted synchronous I/O zfsonlinux/zfs#3780
229 - Fix deadlock during ARC reclaim zfsonlinux/zfs#3808 zfsonlinux/zfs#3834
230 - Fix deadlock with zfs receive and clamscan zfsonlinux/zfs#3719
231 - Allow NFS activity to defer snapshot unmounts zfsonlinux/zfs#3794
232 - Linux 4.3 compatibility zfsonlinux/zfs#3799
233 - Zed reload fixes zfsonlinux/zfs#3773
234 - Fix PAX Patch/Grsec SLAB_USERCOPY panic zfsonlinux/zfs#3796
235 - Always remove during dkms uninstall/update zfsonlinux/spl#476
236 * Sat Sep 19 2015 Ned Bass <bass6@llnl.gov> - 0.6.5.1-1
237 - Fix zvol corruption with TRIM/discard zfsonlinux/zfs#3798
238 - Fix NULL as mount(2) syscall data parameter zfsonlinux/zfs#3804
239 - Fix xattr=sa dataset property not honored zfsonlinux/zfs#3787
240 * Fri Sep 11 2015 Brian Behlendorf <behlendorf1@llnl.gov> - 0.6.5-1
241 - Released 0.6.5-1, detailed release notes are available at:
242 - https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.6.5
243 * Wed Apr 8 2015 Brian Behlendorf <behlendorf1@llnl.gov> - 0.6.4-1
244 - Released 0.6.4-1
245 * Thu Jun 12 2014 Brian Behlendorf <behlendorf1@llnl.gov> - 0.6.3-1
246 - Released 0.6.3-1
247 * Wed Aug 21 2013 Brian Behlendorf <behlendorf1@llnl.gov> - 0.6.2-1
248 - Released 0.6.2-1
249 * Fri Mar 22 2013 Brian Behlendorf <behlendorf1@llnl.gov> - 0.6.1-1
250 - First official stable release.