2 %global _libdir
/%{_lib}
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
9 %global _udevdir
/lib
/udev
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
18 %global _udevruledir
/lib
/udev
/rules.d
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
27 %global _dracutdir
%{_prefix}/share
/dracut
31 # Set the default _initconfdir when undefined.
32 %if %{undefined _initconfdir}
33 %global _initconfdir
/etc
/sysconfig
39 # Generic enable switch for systemd
44 # RHEL >= 7 comes with systemd
49 # Fedora >= 15 comes with systemd, but only >= 18 has
55 # opensuse >= 12.1 comes with systemd, but only >= 13.1
56 # has the proper macros
57 %if 0%{?suse_version} >= 1310
63 Release: @RELEASE@
%{?dist}
64 Summary: Commands to control the kernel modules and libraries
66 Group: System Environment
/Kernel
67 License: @ZFS_META_LICENSE@
68 URL: http
://zfsonlinux.org
/
69 Source0: %{name}-%{version}.tar.gz
70 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n
)
71 Requires: spl
= %{version}
72 Requires: libzpool2
= %{version}
73 Requires: libnvpair1
= %{version}
74 Requires: libuutil1
= %{version}
75 Requires: libzfs2
= %{version}
76 Requires: %{name}-kmod = %{version}
77 Provides: %{name}-kmod-common = %{version}
79 # zfs-fuse provides the same commands and man pages that ZoL does. Renaming
80 # those on either side would conflict with all available documentation.
83 %if 0%{?rhel}%{?fedora}%{?suse_version}
84 BuildRequires
: zlib
-devel
85 BuildRequires
: libuuid
-devel
86 BuildRequires
: libblkid
-devel
87 BuildRequires
: libudev
-devel
88 BuildRequires
: libattr
-devel
91 Requires(post
): systemd
92 Requires(preun
): systemd
93 Requires(postun
): systemd
94 BuildRequires
: systemd
98 This package contains the ZFS
command line utilities.
100 %package -n libzpool2
101 Summary: Native ZFS pool library
for Linux
102 Group: System Environment
/Kernel
104 %description -n libzpool2
105 This package contains the zpool library
, which provides support
108 %post -n libzpool2
-p
/sbin
/ldconfig
109 %postun -n libzpool2
-p
/sbin
/ldconfig
111 %package -n libnvpair1
112 Summary: Solaris name
-value library
for Linux
113 Group: System Environment
/Kernel
115 %description -n libnvpair1
116 This package contains routines
for packing and unpacking name
-value
117 pairs. This functionality is used to portably transport data across
118 process boundaries
, between kernel and user space
, and can be used
119 to write self describing data structures on disk.
121 %post -n libnvpair1
-p
/sbin
/ldconfig
122 %postun -n libnvpair1
-p
/sbin
/ldconfig
124 %package -n libuutil1
125 Summary: Solaris userland utility library
for Linux
126 Group: System Environment
/Kernel
128 %description -n libuutil1
129 This library provides a variety of compatibility functions
for ZFS on Linux
:
130 * libspl
: The Solaris Porting Layer userland library
, which provides APIs
131 that
make it possible to run Solaris user code
in a Linux environment
132 with relatively minimal modification.
133 * libavl
: The Adelson
-Velskii Landis balanced binary tree manipulation
135 * libefi
: The Extensible Firmware Interface library
for GUID disk
137 * libshare
: NFS
, SMB
, and iSCSI service integration
for ZFS.
139 %post -n libuutil1
-p
/sbin
/ldconfig
140 %postun -n libuutil1
-p
/sbin
/ldconfig
143 Summary: Native ZFS filesystem library
for Linux
144 Group: System Environment
/Kernel
146 %description -n libzfs2
147 This package provides support
for managing ZFS filesystems
149 %post -n libzfs2
-p
/sbin
/ldconfig
150 %postun -n libzfs2
-p
/sbin
/ldconfig
152 %package -n libzfs2
-devel
153 Summary: Development headers
154 Group: System Environment
/Kernel
155 Requires: libzfs2
= %{version}
156 Requires: libzpool2
= %{version}
157 Requires: libnvpair1
= %{version}
158 Requires: libuutil1
= %{version}
159 Provides: libzpool2
-devel
160 Provides: libnvpair1
-devel
161 Provides: libuutil1
-devel
164 %description -n libzfs2
-devel
165 This package contains the header files needed
for building additional
166 applications against the ZFS libraries.
169 Summary: Test infrastructure
170 Group: System Environment
/Kernel
171 Requires: %{name}%{?_isa} = %{version}-%{release}
179 This package contains
test infrastructure and support scripts
for
180 validating the file system.
183 Summary: Dracut module
184 Group: System Environment
/Kernel
185 Requires: %{name}%{?_isa} = %{version}-%{release}
189 This package contains a dracut module used to construct an initramfs
190 image which is ZFS aware.
194 Summary: Initramfs module
195 Group: System Environment
/Kernel
196 Requires: %{name}%{?_isa} = %{version}-%{release}
197 Requires: %{name} = %{version}-%{release}
198 Requires: initramfs
-tools
200 %description initramfs
201 This package contains a initramfs module used to construct an initramfs
202 image which is ZFS aware.
207 %define debug
--enable-debug
209 %define debug
--disable
-debug
212 %define systemd
--enable-systemd
--with
-systemdunitdir
=%{_unitdir} --with-systemdpresetdir=%{_presetdir} --disable
-sysvinit
214 %define systemd
--enable-sysvinit
--disable
-systemd
222 --with
-udevdir
=%{_udevdir} \
223 --with
-udevruledir
=%{_udevruledir} \
224 --with
-dracutdir
=%{_dracutdir} \
231 %{__rm} -rf $RPM_BUILD_ROOT
232 make install DESTDIR
=%{?buildroot}
233 find
%{?buildroot}%{_libdir} -name '*.la' -exec rm -f {} \
;
237 %systemd_post zfs.target
239 if [ -x
/sbin
/chkconfig
]; then
240 /sbin
/chkconfig
--add zfs
-import
241 /sbin
/chkconfig
--add zfs
-mount
242 /sbin
/chkconfig
--add zfs
-share
243 /sbin
/chkconfig
--add zfs
-zed
250 %systemd_preun zfs.target
252 if [ $
1 -eq
0 ] && [ -x
/sbin
/chkconfig
]; then
253 /sbin
/chkconfig
--del zfs
-import
254 /sbin
/chkconfig
--del zfs
-mount
255 /sbin
/chkconfig
--del zfs
-share
256 /sbin
/chkconfig
--del zfs
-zed
263 %systemd_postun zfs.target
269 %{_libexecdir}/%{name}
275 %{_udevdir}/rules.d
/*
277 /usr
/lib
/modules
-load.d
/*
281 %config(noreplace
) %{_sysconfdir}/init.d
/*
282 %config(noreplace
) %{_initconfdir}/zfs
284 %config(noreplace
) %{_sysconfdir}/%{name}
287 %{_libdir}/libzpool.so.
*
290 %{_libdir}/libnvpair.so.
*
293 %{_libdir}/libuutil.so.
*
296 %{_libdir}/libzfs
*.so.
*
298 %files -n libzfs2
-devel
299 %{_datadir}/pkgconfig
/libzfs.pc
300 %{_datadir}/pkgconfig
/libzfs_core.pc
303 %doc AUTHORS COPYRIGHT DISCLAIMER
304 %doc OPENSOLARIS.LICENSE README.markdown
310 %doc contrib
/dracut
/README.dracut.markdown
311 %{_dracutdir}/modules.d
/*
315 %doc contrib
/initramfs
/README.initramfs.markdown
316 /usr
/share
/initramfs
-tools
/*
318 # Since we're not building the initramfs package,
319 # ignore those files.
320 %exclude /usr
/share
/initramfs
-tools
324 * Fri Sep
11 2015 Brian Behlendorf
<behlendorf1@llnl.gov
> - 0.6.5-1
325 - Released
0.6.5-1, detailed release notes are available at
:
326 - https
://github.com
/zfsonlinux
/zfs
/releases
/tag
/zfs
-0.6.5
327 * Wed Apr
8 2015 Brian Behlendorf
<behlendorf1@llnl.gov
> - 0.6.4-1
329 * Thu Jun
12 2014 Brian Behlendorf
<behlendorf1@llnl.gov
> - 0.6.3-1
331 * Wed Aug
21 2013 Brian Behlendorf
<behlendorf1@llnl.gov
> - 0.6.2-1
333 * Fri Mar
22 2013 Brian Behlendorf
<behlendorf1@llnl.gov
> - 0.6.1-1
334 - First official stable release.