]> git.proxmox.com Git - mirror_zfs-debian.git/blob - rpm/redhat/zfs.spec.in
Imported Upstream version 0.6.5.5
[mirror_zfs-debian.git] / rpm / redhat / zfs.spec.in
1 %global _sbindir /sbin
2 %global _libdir /%{_lib}
3
4 # Set the default udev directory based on distribution.
5 %if %{undefined _udevdir}
6 %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || 0%{?centos} >= 7
7 %global _udevdir %{_prefix}/lib/udev
8 %else
9 %global _udevdir /lib/udev
10 %endif
11 %endif
12
13 # Set the default udevrule directory based on distribution.
14 %if %{undefined _udevruledir}
15 %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || 0%{?centos} >= 7
16 %global _udevruledir %{_prefix}/lib/udev/rules.d
17 %else
18 %global _udevruledir /lib/udev/rules.d
19 %endif
20 %endif
21
22 # Set the default dracut directory based on distribution.
23 %if %{undefined _dracutdir}
24 %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 || 0%{?centos} >= 7
25 %global _dracutdir %{_prefix}/lib/dracut
26 %else
27 %global _dracutdir %{_prefix}/share/dracut
28 %endif
29 %endif
30
31 # Set the default _initconfdir when undefined.
32 %if %{undefined _initconfdir}
33 %global _initconfdir /etc/sysconfig
34 %endif
35
36 %bcond_with debug
37 %bcond_with blkid
38 %bcond_with systemd
39
40 # Generic enable switch for systemd
41 %if %{with systemd}
42 %define _systemd 1
43 %endif
44
45 # RHEL >= 7 comes with systemd
46 %if 0%{?rhel} >= 7
47 %define _systemd 1
48 %endif
49
50 # Fedora >= 15 comes with systemd, but only >= 18 has
51 # the proper macros
52 %if 0%{?fedora} >= 18
53 %define _systemd 1
54 %endif
55
56 # opensuse >= 12.1 comes with systemd, but only >= 13.1
57 # has the proper macros
58 %if 0%{?suse_version} >= 1310
59 %define _systemd 1
60 %endif
61
62 Name: @PACKAGE@
63 Version: @VERSION@
64 Release: @RELEASE@%{?dist}
65 Summary: Commands to control the kernel modules and libraries
66
67 Group: System Environment/Kernel
68 License: @ZFS_META_LICENSE@
69 URL: http://zfsonlinux.org/
70 Source0: %{name}-%{version}.tar.gz
71 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
72 ExclusiveArch: i386 i686 x86_64
73
74 # May build but untested on ppc/ppc64
75 ExcludeArch: ppc ppc64
76
77 Requires: spl = %{version}
78 Requires: libzpool2 = %{version}
79 Requires: libnvpair1 = %{version}
80 Requires: libuutil1 = %{version}
81 Requires: libzfs2 = %{version}
82 Requires: %{name}-kmod = %{version}
83 Provides: %{name}-kmod-common = %{version}
84
85 # zfs-fuse provides the same commands and man pages that ZoL does. Renaming
86 # those on either side would conflict with all available documentation.
87 Conflicts: zfs-fuse
88
89 %if 0%{?rhel}%{?fedora}%{?suse_version}
90 BuildRequires: zlib-devel
91 BuildRequires: libuuid-devel
92 %if %{with blkid}
93 BuildRequires: libblkid-devel
94 %endif
95 %endif
96 %if 0%{?_systemd}
97 Requires(post): systemd
98 Requires(preun): systemd
99 Requires(postun): systemd
100 BuildRequires: systemd
101 %endif
102
103 %description
104 This package contains the ZFS command line utilities.
105
106 %package -n libzpool2
107 Summary: Native ZFS pool library for Linux
108 Group: System Environment/Kernel
109
110 %description -n libzpool2
111 This package contains the zpool library, which provides support
112 for managing zpools
113
114 %post -n libzpool2 -p /sbin/ldconfig
115 %postun -n libzpool2 -p /sbin/ldconfig
116
117 %package -n libnvpair1
118 Summary: Solaris name-value library for Linux
119 Group: System Environment/Kernel
120
121 %description -n libnvpair1
122 This package contains routines for packing and unpacking name-value
123 pairs. This functionality is used to portably transport data across
124 process boundaries, between kernel and user space, and can be used
125 to write self describing data structures on disk.
126
127 %post -n libnvpair1 -p /sbin/ldconfig
128 %postun -n libnvpair1 -p /sbin/ldconfig
129
130 %package -n libuutil1
131 Summary: Solaris userland utility library for Linux
132 Group: System Environment/Kernel
133
134 %description -n libuutil1
135 This library provides a variety of compatibility functions for ZFS on Linux:
136 * libspl: The Solaris Porting Layer userland library, which provides APIs
137 that make it possible to run Solaris user code in a Linux environment
138 with relatively minimal modification.
139 * libavl: The Adelson-Velskii Landis balanced binary tree manipulation
140 library.
141 * libefi: The Extensible Firmware Interface library for GUID disk
142 partitioning.
143 * libshare: NFS, SMB, and iSCSI service integration for ZFS.
144
145 %post -n libuutil1 -p /sbin/ldconfig
146 %postun -n libuutil1 -p /sbin/ldconfig
147
148 %package -n libzfs2
149 Summary: Native ZFS filesystem library for Linux
150 Group: System Environment/Kernel
151
152 %description -n libzfs2
153 This package provides support for managing ZFS filesystems
154
155 %post -n libzfs2 -p /sbin/ldconfig
156 %postun -n libzfs2 -p /sbin/ldconfig
157
158 %package -n libzfs2-devel
159 Summary: Development headers
160 Group: System Environment/Kernel
161 Requires: libzfs2 = %{version}
162 Requires: libzpool2 = %{version}
163 Requires: libnvpair1 = %{version}
164 Requires: libuutil1 = %{version}
165 Provides: libzpool2-devel
166 Provides: libnvpair1-devel
167 Provides: libuutil1-devel
168 Obsoletes: zfs-devel
169
170 %description -n libzfs2-devel
171 This package contains the header files needed for building additional
172 applications against the ZFS libraries.
173
174 %package test
175 Summary: Test infrastructure
176 Group: System Environment/Kernel
177 Requires: %{name}%{?_isa} = %{version}-%{release}
178 Requires: parted
179 Requires: lsscsi
180 Requires: mdadm
181 Requires: bc
182
183 %description test
184 This package contains test infrastructure and support scripts for
185 validating the file system.
186
187 %package dracut
188 Summary: Dracut module
189 Group: System Environment/Kernel
190 Requires: %{name}%{?_isa} = %{version}-%{release}
191 Requires: dracut
192
193 %description dracut
194 This package contains a dracut module used to construct an initramfs
195 image which is ZFS aware.
196
197 %if 0%{?_initramfs}
198 %package initramfs
199 Summary: Initramfs module
200 Group: System Environment/Kernel
201 Requires: %{name}%{?_isa} = %{version}-%{release}
202 Requires: %{name} = %{version}-%{release}
203 Requires: initramfs-tools
204
205 %description initramfs
206 This package contains a initramfs module used to construct an initramfs
207 image which is ZFS aware.
208 %endif
209
210 %prep
211 %if %{with debug}
212 %define debug --enable-debug
213 %else
214 %define debug --disable-debug
215 %endif
216 %if %{with blkid}
217 %define blkid --with-blkid
218 %else
219 %define blkid --without-blkid
220 %endif
221 %if 0%{?_systemd}
222 %define systemd --enable-systemd --with-systemdunitdir=%{_unitdir} --with-systemdpresetdir=%{_presetdir} --disable-sysvinit
223 %else
224 %define systemd --enable-sysvinit --disable-systemd
225 %endif
226
227 %setup -q
228
229 %build
230 %configure \
231 --with-config=user \
232 --with-udevdir=%{_udevdir} \
233 --with-udevruledir=%{_udevruledir} \
234 --with-dracutdir=%{_dracutdir} \
235 --disable-static \
236 %{debug} \
237 %{blkid} \
238 %{systemd}
239 make %{?_smp_mflags}
240
241 %install
242 %{__rm} -rf $RPM_BUILD_ROOT
243 make install DESTDIR=%{?buildroot}
244 find %{?buildroot}%{_libdir} -name '*.la' -exec rm -f {} \;
245
246 %post
247 %if 0%{?_systemd}
248 %systemd_post zfs.target
249 %else
250 if [ -x /sbin/chkconfig ]; then
251 /sbin/chkconfig --add zfs-import
252 /sbin/chkconfig --add zfs-mount
253 /sbin/chkconfig --add zfs-share
254 /sbin/chkconfig --add zfs-zed
255 fi
256 %endif
257 exit 0
258
259 %preun
260 %if 0%{?_systemd}
261 %systemd_preun zfs.target
262 %else
263 if [ $1 -eq 0 ] && [ -x /sbin/chkconfig ]; then
264 /sbin/chkconfig --del zfs-import
265 /sbin/chkconfig --del zfs-mount
266 /sbin/chkconfig --del zfs-share
267 /sbin/chkconfig --del zfs-zed
268 fi
269 %endif
270 exit 0
271
272 %postun
273 %if 0%{?_systemd}
274 %systemd_postun zfs.target
275 %endif
276
277 %files
278 %{_sbindir}/*
279 %{_bindir}/*
280 %{_libexecdir}/%{name}
281 %{_mandir}/man1/*
282 %{_mandir}/man5/*
283 %{_mandir}/man8/*
284 %{_udevdir}/vdev_id
285 %{_udevdir}/zvol_id
286 %{_udevdir}/rules.d/*
287 %if 0%{?_systemd}
288 /usr/lib/modules-load.d/*
289 %{_unitdir}/*
290 %{_presetdir}/*
291 %else
292 %config(noreplace) %{_sysconfdir}/init.d/*
293 %config(noreplace) %{_initconfdir}/zfs
294 %endif
295 %config(noreplace) %{_sysconfdir}/%{name}
296
297 %files -n libzpool2
298 %{_libdir}/libzpool.so.*
299
300 %files -n libnvpair1
301 %{_libdir}/libnvpair.so.*
302
303 %files -n libuutil1
304 %{_libdir}/libuutil.so.*
305
306 %files -n libzfs2
307 %{_libdir}/libzfs*.so.*
308
309 %files -n libzfs2-devel
310 %{_datadir}/pkgconfig/libzfs.pc
311 %{_datadir}/pkgconfig/libzfs_core.pc
312 %{_libdir}/*.so
313 %{_includedir}/*
314 %doc AUTHORS COPYRIGHT DISCLAIMER
315 %doc OPENSOLARIS.LICENSE README.markdown
316
317 %files test
318 %{_datadir}/%{name}
319
320 %files dracut
321 %doc contrib/dracut/README.dracut.markdown
322 %{_dracutdir}/modules.d/*
323
324 %if 0%{?_initramfs}
325 %files initramfs
326 %doc contrib/initramfs/README.initramfs.markdown
327 /usr/share/initramfs-tools/*
328 %else
329 # Since we're not building the initramfs package,
330 # ignore those files.
331 %exclude /usr/share/initramfs-tools
332 %endif
333
334 %changelog
335 * Wed Mar 9 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.5-1
336 - Linux 4.5 compatibility zfsonlinux/zfs#4228
337 - Create working debuginfo packages on Red Hat zfsonlinux/zfs#4224
338 - Make arc_summary.py and dbufstat.py compatible with python3
339 - musl libc compatibility for option parsing zfsonlinux/zfs#4222
340 - Prevent arc_c collapse and possible panic zfsonlinux/zfs#3904
341 - Prevent duplicated xattr between SA and dir zfsonlinux/zfs#4153
342 - Fix zsb->z_hold_mtx deadlock zfsonlinux/zfs#4106
343 - Prevent SA header corruption zfsonlinux/zfs#4150
344 * Fri Jan 8 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.4-1
345 - Linux 4.4 compat
346 - Assorted stability fixes
347 - Fixes for NFS-exported snapshots
348 - Fix kernel warning in unlock_new_inode() and deadlock
349 - Fix overflow in P2ROUNDUP_TYPED macro
350 - Fix write performance issue due to bad zfs_dirty_data_max calculation
351 - Fix builtin kernel builds
352 - Fix deadlock during direct memory reclaim
353 * Tue Oct 13 2015 Ned Bass <bass6@llnl.gov> - 0.6.5.3-1
354 - Don't import all visible pools in zfs-import init script zfsonlinux/zfs#3777
355 - Fix use-after-free in vdev_disk_physio_completion zfsonlinux/zfs#3920
356 - Fix avl_is_empty(&dn->dn_dbufs) assertion zfsonlinux/zfs#3865
357 * Wed Sep 30 2015 Ned Bass <bass6@llnl.gov> - 0.6.5.2-1
358 - Init script fixes zfsonlinux/zfs#3816
359 - Fix uioskip crash when skip to end zfsonlinux/zfs#3806 zfsonlinux/zfs#3850
360 - Userspace can trigger an assertion zfsonlinux/zfs#3792
361 - Fix quota userused underflow bug zfsonlinux/zfs#3789
362 - Fix performance regression from unwanted synchronous I/O zfsonlinux/zfs#3780
363 - Fix deadlock during ARC reclaim zfsonlinux/zfs#3808 zfsonlinux/zfs#3834
364 - Fix deadlock with zfs receive and clamscan zfsonlinux/zfs#3719
365 - Allow NFS activity to defer snapshot unmounts zfsonlinux/zfs#3794
366 - Linux 4.3 compatibility zfsonlinux/zfs#3799
367 - Zed reload fixes zfsonlinux/zfs#3773
368 - Fix PAX Patch/Grsec SLAB_USERCOPY panic zfsonlinux/zfs#3796
369 - Always remove during dkms uninstall/update zfsonlinux/spl#476
370 * Sat Sep 19 2015 Ned Bass <bass6@llnl.gov> - 0.6.5.1-1
371 - Fix zvol corruption with TRIM/discard zfsonlinux/zfs#3798
372 - Fix NULL as mount(2) syscall data parameter zfsonlinux/zfs#3804
373 - Fix xattr=sa dataset property not honored zfsonlinux/zfs#3787
374 * Fri Sep 11 2015 Brian Behlendorf <behlendorf1@llnl.gov> - 0.6.5-1
375 - Released 0.6.5-1, detailed release notes are available at:
376 - https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.6.5
377 * Wed Apr 8 2015 Brian Behlendorf <behlendorf1@llnl.gov> - 0.6.4-1
378 - Released 0.6.4-1
379 * Thu Jun 12 2014 Brian Behlendorf <behlendorf1@llnl.gov> - 0.6.3-1
380 - Released 0.6.3-1
381 * Wed Aug 21 2013 Brian Behlendorf <behlendorf1@llnl.gov> - 0.6.2-1
382 - Released 0.6.2-1
383 * Fri Mar 22 2013 Brian Behlendorf <behlendorf1@llnl.gov> - 0.6.1-1
384 - First official stable release.