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 ExclusiveArch: i386 i686 x86_64
73 # May build but untested on ppc/ppc64
74 ExcludeArch: ppc ppc64
76 Requires: spl
= %{version}
77 Requires: libzpool2
= %{version}
78 Requires: libnvpair1
= %{version}
79 Requires: libuutil1
= %{version}
80 Requires: libzfs2
= %{version}
81 Requires: %{name}-kmod = %{version}
82 Provides: %{name}-kmod-common = %{version}
84 # zfs-fuse provides the same commands and man pages that ZoL does. Renaming
85 # those on either side would conflict with all available documentation.
88 %if 0%{?rhel}%{?fedora}%{?suse_version}
89 BuildRequires
: zlib
-devel
90 BuildRequires
: libuuid
-devel
91 BuildRequires
: libblkid
-devel
94 Requires(post
): systemd
95 Requires(preun
): systemd
96 Requires(postun
): systemd
97 BuildRequires
: systemd
101 This package contains the ZFS
command line utilities.
103 %package -n libzpool2
104 Summary: Native ZFS pool library
for Linux
105 Group: System Environment
/Kernel
107 %description -n libzpool2
108 This package contains the zpool library
, which provides support
111 %post -n libzpool2
-p
/sbin
/ldconfig
112 %postun -n libzpool2
-p
/sbin
/ldconfig
114 %package -n libnvpair1
115 Summary: Solaris name
-value library
for Linux
116 Group: System Environment
/Kernel
118 %description -n libnvpair1
119 This package contains routines
for packing and unpacking name
-value
120 pairs. This functionality is used to portably transport data across
121 process boundaries
, between kernel and user space
, and can be used
122 to write self describing data structures on disk.
124 %post -n libnvpair1
-p
/sbin
/ldconfig
125 %postun -n libnvpair1
-p
/sbin
/ldconfig
127 %package -n libuutil1
128 Summary: Solaris userland utility library
for Linux
129 Group: System Environment
/Kernel
131 %description -n libuutil1
132 This library provides a variety of compatibility functions
for ZFS on Linux
:
133 * libspl
: The Solaris Porting Layer userland library
, which provides APIs
134 that
make it possible to run Solaris user code
in a Linux environment
135 with relatively minimal modification.
136 * libavl
: The Adelson
-Velskii Landis balanced binary tree manipulation
138 * libefi
: The Extensible Firmware Interface library
for GUID disk
140 * libshare
: NFS
, SMB
, and iSCSI service integration
for ZFS.
142 %post -n libuutil1
-p
/sbin
/ldconfig
143 %postun -n libuutil1
-p
/sbin
/ldconfig
146 Summary: Native ZFS filesystem library
for Linux
147 Group: System Environment
/Kernel
149 %description -n libzfs2
150 This package provides support
for managing ZFS filesystems
152 %post -n libzfs2
-p
/sbin
/ldconfig
153 %postun -n libzfs2
-p
/sbin
/ldconfig
155 %package -n libzfs2
-devel
156 Summary: Development headers
157 Group: System Environment
/Kernel
158 Requires: libzfs2
= %{version}
159 Requires: libzpool2
= %{version}
160 Requires: libnvpair1
= %{version}
161 Requires: libuutil1
= %{version}
162 Provides: libzpool2
-devel
163 Provides: libnvpair1
-devel
164 Provides: libuutil1
-devel
167 %description -n libzfs2
-devel
168 This package contains the header files needed
for building additional
169 applications against the ZFS libraries.
172 Summary: Test infrastructure
173 Group: System Environment
/Kernel
174 Requires: %{name}%{?_isa} = %{version}-%{release}
181 This package contains
test infrastructure and support scripts
for
182 validating the file system.
185 Summary: Dracut module
186 Group: System Environment
/Kernel
187 Requires: %{name}%{?_isa} = %{version}-%{release}
191 This package contains a dracut module used to construct an initramfs
192 image which is ZFS aware.
196 Summary: Initramfs module
197 Group: System Environment
/Kernel
198 Requires: %{name}%{?_isa} = %{version}-%{release}
199 Requires: %{name} = %{version}-%{release}
200 Requires: initramfs
-tools
202 %description initramfs
203 This package contains a initramfs module used to construct an initramfs
204 image which is ZFS aware.
209 %define debug
--enable-debug
211 %define debug
--disable
-debug
214 %define systemd
--enable-systemd
--with
-systemdunitdir
=%{_unitdir} --with-systemdpresetdir=%{_presetdir} --disable
-sysvinit
216 %define systemd
--enable-sysvinit
--disable
-systemd
224 --with
-udevdir
=%{_udevdir} \
225 --with
-udevruledir
=%{_udevruledir} \
226 --with
-dracutdir
=%{_dracutdir} \
233 %{__rm} -rf $RPM_BUILD_ROOT
234 make install DESTDIR
=%{?buildroot}
235 find
%{?buildroot}%{_libdir} -name '*.la' -exec rm -f {} \
;
239 %systemd_post zfs.target
241 if [ -x
/sbin
/chkconfig
]; then
242 /sbin
/chkconfig
--add zfs
-import
243 /sbin
/chkconfig
--add zfs
-mount
244 /sbin
/chkconfig
--add zfs
-share
245 /sbin
/chkconfig
--add zfs
-zed
252 %systemd_preun zfs.target
254 if [ $
1 -eq
0 ] && [ -x
/sbin
/chkconfig
]; then
255 /sbin
/chkconfig
--del zfs
-import
256 /sbin
/chkconfig
--del zfs
-mount
257 /sbin
/chkconfig
--del zfs
-share
258 /sbin
/chkconfig
--del zfs
-zed
265 %systemd_postun zfs.target
271 %{_libexecdir}/%{name}
277 %{_udevdir}/rules.d
/*
279 /usr
/lib
/modules
-load.d
/*
283 %config(noreplace
) %{_sysconfdir}/init.d
/*
284 %config(noreplace
) %{_initconfdir}/zfs
286 %config(noreplace
) %{_sysconfdir}/%{name}
289 %{_libdir}/libzpool.so.
*
292 %{_libdir}/libnvpair.so.
*
295 %{_libdir}/libuutil.so.
*
298 %{_libdir}/libzfs
*.so.
*
300 %files -n libzfs2
-devel
301 %{_datadir}/pkgconfig
/libzfs.pc
302 %{_datadir}/pkgconfig
/libzfs_core.pc
305 %doc AUTHORS COPYRIGHT DISCLAIMER
306 %doc OPENSOLARIS.LICENSE README.markdown
312 %doc contrib
/dracut
/README.dracut.markdown
313 %{_dracutdir}/modules.d
/*
317 %doc contrib
/initramfs
/README.initramfs.markdown
318 /usr
/share
/initramfs
-tools
/*
320 # Since we're not building the initramfs package,
321 # ignore those files.
322 %exclude /usr
/share
/initramfs
-tools
326 * Fri Sep
11 2015 Brian Behlendorf
<behlendorf1@llnl.gov
> - 0.6.5-1
327 - Released
0.6.5-1, detailed release notes are available at
:
328 - https
://github.com
/zfsonlinux
/zfs
/releases
/tag
/zfs
-0.6.5
329 * Wed Apr
8 2015 Brian Behlendorf
<behlendorf1@llnl.gov
> - 0.6.4-1
331 * Thu Jun
12 2014 Brian Behlendorf
<behlendorf1@llnl.gov
> - 0.6.3-1
333 * Wed Aug
21 2013 Brian Behlendorf
<behlendorf1@llnl.gov
> - 0.6.2-1
335 * Fri Mar
22 2013 Brian Behlendorf
<behlendorf1@llnl.gov
> - 0.6.1-1
336 - First official stable release.