]> git.proxmox.com Git - mirror_zfs-debian.git/blame - rpm/redhat/zfs.spec.in
Imported Upstream version 0.6.5.4
[mirror_zfs-debian.git] / rpm / redhat / zfs.spec.in
CommitLineData
ea04106b
AX
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
e10b0808
AX
31# Set the default _initconfdir when undefined.
32%if %{undefined _initconfdir}
33%global _initconfdir /etc/sysconfig
34%endif
35
ea04106b
AX
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
62Name: @PACKAGE@
63Version: @VERSION@
64Release: @RELEASE@%{?dist}
65Summary: Commands to control the kernel modules and libraries
66
67Group: System Environment/Kernel
68License: @ZFS_META_LICENSE@
69URL: http://zfsonlinux.org/
70Source0: %{name}-%{version}.tar.gz
71BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
72ExclusiveArch: i386 i686 x86_64
73
74# May build but untested on ppc/ppc64
75ExcludeArch: ppc ppc64
76
77Requires: spl = %{version}
78Requires: libzpool2 = %{version}
79Requires: libnvpair1 = %{version}
80Requires: libuutil1 = %{version}
81Requires: libzfs2 = %{version}
82Requires: %{name}-kmod = %{version}
83Provides: %{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.
87Conflicts: zfs-fuse
88
89%if 0%{?rhel}%{?fedora}%{?suse_version}
90BuildRequires: zlib-devel
91BuildRequires: libuuid-devel
92%if %{with blkid}
93BuildRequires: libblkid-devel
94%endif
95%endif
96%if 0%{?_systemd}
97Requires(post): systemd
98Requires(preun): systemd
99Requires(postun): systemd
100BuildRequires: systemd
101%endif
102
103%description
104This package contains the ZFS command line utilities.
105
106%package -n libzpool2
107Summary: Native ZFS pool library for Linux
108Group: System Environment/Kernel
109
110%description -n libzpool2
111This package contains the zpool library, which provides support
112for managing zpools
113
114%post -n libzpool2 -p /sbin/ldconfig
115%postun -n libzpool2 -p /sbin/ldconfig
116
117%package -n libnvpair1
118Summary: Solaris name-value library for Linux
119Group: System Environment/Kernel
120
121%description -n libnvpair1
122This package contains routines for packing and unpacking name-value
123pairs. This functionality is used to portably transport data across
124process boundaries, between kernel and user space, and can be used
125to 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
131Summary: Solaris userland utility library for Linux
132Group: System Environment/Kernel
133
134%description -n libuutil1
135This 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
149Summary: Native ZFS filesystem library for Linux
150Group: System Environment/Kernel
151
152%description -n libzfs2
153This 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
159Summary: Development headers
160Group: System Environment/Kernel
161Requires: libzfs2 = %{version}
162Requires: libzpool2 = %{version}
163Requires: libnvpair1 = %{version}
164Requires: libuutil1 = %{version}
165Provides: libzpool2-devel
166Provides: libnvpair1-devel
167Provides: libuutil1-devel
168Obsoletes: zfs-devel
169
170%description -n libzfs2-devel
171This package contains the header files needed for building additional
172applications against the ZFS libraries.
173
174%package test
175Summary: Test infrastructure
176Group: System Environment/Kernel
177Requires: %{name}%{?_isa} = %{version}-%{release}
178Requires: parted
179Requires: lsscsi
180Requires: mdadm
181Requires: bc
182
183%description test
184This package contains test infrastructure and support scripts for
185validating the file system.
186
187%package dracut
188Summary: Dracut module
189Group: System Environment/Kernel
190Requires: %{name}%{?_isa} = %{version}-%{release}
191Requires: dracut
192
193%description dracut
194This package contains a dracut module used to construct an initramfs
195image which is ZFS aware.
196
e10b0808
AX
197%if 0%{?_initramfs}
198%package initramfs
199Summary: Initramfs module
200Group: System Environment/Kernel
201Requires: %{name}%{?_isa} = %{version}-%{release}
202Requires: %{name} = %{version}-%{release}
203Requires: initramfs-tools
204
205%description initramfs
206This package contains a initramfs module used to construct an initramfs
207image which is ZFS aware.
208%endif
209
ea04106b
AX
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}
239make %{?_smp_mflags}
240
241%install
242%{__rm} -rf $RPM_BUILD_ROOT
243make install DESTDIR=%{?buildroot}
244find %{?buildroot}%{_libdir} -name '*.la' -exec rm -f {} \;
245
246%post
247%if 0%{?_systemd}
248%systemd_post zfs.target
249%else
e10b0808
AX
250if [ -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
255fi
ea04106b
AX
256%endif
257exit 0
258
259%preun
260%if 0%{?_systemd}
261%systemd_preun zfs.target
262%else
e10b0808
AX
263if [ $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
ea04106b
AX
268fi
269%endif
270exit 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/*
ea04106b
AX
287%if 0%{?_systemd}
288/usr/lib/modules-load.d/*
289%{_unitdir}/*
290%{_presetdir}/*
291%else
e10b0808
AX
292%config(noreplace) %{_sysconfdir}/init.d/*
293%config(noreplace) %{_initconfdir}/zfs
ea04106b 294%endif
e10b0808 295%config(noreplace) %{_sysconfdir}/%{name}
ea04106b
AX
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
e10b0808 321%doc contrib/dracut/README.dracut.markdown
ea04106b
AX
322%{_dracutdir}/modules.d/*
323
e10b0808
AX
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
ea04106b 334%changelog
94a40997
AX
335* Fri Jan 8 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.4-1
336- Linux 4.4 compat
337- Assorted stability fixes
338- Fixes for NFS-exported snapshots
339- Fix kernel warning in unlock_new_inode() and deadlock
340- Fix overflow in P2ROUNDUP_TYPED macro
341- Fix write performance issue due to bad zfs_dirty_data_max calculation
342- Fix builtin kernel builds
343- Fix deadlock during direct memory reclaim
e10b0808
AX
344* Tue Oct 13 2015 Ned Bass <bass6@llnl.gov> - 0.6.5.3-1
345- Don't import all visible pools in zfs-import init script zfsonlinux/zfs#3777
346- Fix use-after-free in vdev_disk_physio_completion zfsonlinux/zfs#3920
347- Fix avl_is_empty(&dn->dn_dbufs) assertion zfsonlinux/zfs#3865
348* Wed Sep 30 2015 Ned Bass <bass6@llnl.gov> - 0.6.5.2-1
349- Init script fixes zfsonlinux/zfs#3816
350- Fix uioskip crash when skip to end zfsonlinux/zfs#3806 zfsonlinux/zfs#3850
351- Userspace can trigger an assertion zfsonlinux/zfs#3792
352- Fix quota userused underflow bug zfsonlinux/zfs#3789
353- Fix performance regression from unwanted synchronous I/O zfsonlinux/zfs#3780
354- Fix deadlock during ARC reclaim zfsonlinux/zfs#3808 zfsonlinux/zfs#3834
355- Fix deadlock with zfs receive and clamscan zfsonlinux/zfs#3719
356- Allow NFS activity to defer snapshot unmounts zfsonlinux/zfs#3794
357- Linux 4.3 compatibility zfsonlinux/zfs#3799
358- Zed reload fixes zfsonlinux/zfs#3773
359- Fix PAX Patch/Grsec SLAB_USERCOPY panic zfsonlinux/zfs#3796
360- Always remove during dkms uninstall/update zfsonlinux/spl#476
361* Sat Sep 19 2015 Ned Bass <bass6@llnl.gov> - 0.6.5.1-1
362- Fix zvol corruption with TRIM/discard zfsonlinux/zfs#3798
363- Fix NULL as mount(2) syscall data parameter zfsonlinux/zfs#3804
364- Fix xattr=sa dataset property not honored zfsonlinux/zfs#3787
365* Fri Sep 11 2015 Brian Behlendorf <behlendorf1@llnl.gov> - 0.6.5-1
366- Released 0.6.5-1, detailed release notes are available at:
367- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.6.5
ea04106b
AX
368* Wed Apr 8 2015 Brian Behlendorf <behlendorf1@llnl.gov> - 0.6.4-1
369- Released 0.6.4-1
370* Thu Jun 12 2014 Brian Behlendorf <behlendorf1@llnl.gov> - 0.6.3-1
371- Released 0.6.3-1
372* Wed Aug 21 2013 Brian Behlendorf <behlendorf1@llnl.gov> - 0.6.2-1
373- Released 0.6.2-1
374* Fri Mar 22 2013 Brian Behlendorf <behlendorf1@llnl.gov> - 0.6.1-1
375- First official stable release.