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
42 %define systemd_svcs zfs
-import
-cache.service zfs
-import
-scan.service zfs
-mount.service zfs
-share.service zfs
-zed.service zfs.target
45 # RHEL >= 7 comes with systemd
50 # Fedora >= 15 comes with systemd, but only >= 18 has
56 # opensuse >= 12.1 comes with systemd, but only >= 13.1
57 # has the proper macros
58 %if 0%{?suse_version} >= 1310
64 Release: @RELEASE@
%{?dist}
65 Summary: Commands to control the kernel modules and libraries
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 Requires: spl
= %{version}
73 Requires: libzpool2
= %{version}
74 Requires: libnvpair1
= %{version}
75 Requires: libuutil1
= %{version}
76 Requires: libzfs2
= %{version}
77 Requires: %{name}-kmod = %{version}
78 Provides: %{name}-kmod-common = %{version}
80 # zfs-fuse provides the same commands and man pages that ZoL does. Renaming
81 # those on either side would conflict with all available documentation.
84 %if 0%{?rhel}%{?fedora}%{?suse_version}
85 BuildRequires
: zlib
-devel
86 BuildRequires
: libuuid
-devel
87 BuildRequires
: libblkid
-devel
88 BuildRequires
: libudev
-devel
89 BuildRequires
: libattr
-devel
92 Requires(post
): systemd
93 Requires(preun
): systemd
94 Requires(postun
): systemd
95 BuildRequires
: systemd
98 # The zpool iostat/status -c scripts call some utilities like lsblk and iostat
103 This package contains the ZFS
command line utilities.
105 %package -n libzpool2
106 Summary: Native ZFS pool library
for Linux
107 Group: System Environment
/Kernel
109 %description -n libzpool2
110 This package contains the zpool library
, which provides support
113 %post -n libzpool2
-p
/sbin
/ldconfig
114 %postun -n libzpool2
-p
/sbin
/ldconfig
116 %package -n libnvpair1
117 Summary: Solaris name
-value library
for Linux
118 Group: System Environment
/Kernel
120 %description -n libnvpair1
121 This package contains routines
for packing and unpacking name
-value
122 pairs. This functionality is used to portably transport data across
123 process boundaries
, between kernel and user space
, and can be used
124 to write self describing data structures on disk.
126 %post -n libnvpair1
-p
/sbin
/ldconfig
127 %postun -n libnvpair1
-p
/sbin
/ldconfig
129 %package -n libuutil1
130 Summary: Solaris userland utility library
for Linux
131 Group: System Environment
/Kernel
133 %description -n libuutil1
134 This library provides a variety of compatibility functions
for ZFS on Linux
:
135 * libspl
: The Solaris Porting Layer userland library
, which provides APIs
136 that
make it possible to run Solaris user code
in a Linux environment
137 with relatively minimal modification.
138 * libavl
: The Adelson
-Velskii Landis balanced binary tree manipulation
140 * libefi
: The Extensible Firmware Interface library
for GUID disk
142 * libshare
: NFS
, SMB
, and iSCSI service integration
for ZFS.
144 %post -n libuutil1
-p
/sbin
/ldconfig
145 %postun -n libuutil1
-p
/sbin
/ldconfig
148 Summary: Native ZFS filesystem library
for Linux
149 Group: System Environment
/Kernel
151 %description -n libzfs2
152 This package provides support
for managing ZFS filesystems
154 %post -n libzfs2
-p
/sbin
/ldconfig
155 %postun -n libzfs2
-p
/sbin
/ldconfig
157 %package -n libzfs2
-devel
158 Summary: Development headers
159 Group: System Environment
/Kernel
160 Requires: libzfs2
= %{version}
161 Requires: libzpool2
= %{version}
162 Requires: libnvpair1
= %{version}
163 Requires: libuutil1
= %{version}
164 Provides: libzpool2
-devel
165 Provides: libnvpair1
-devel
166 Provides: libuutil1
-devel
169 %description -n libzfs2
-devel
170 This package contains the header files needed
for building additional
171 applications against the ZFS libraries.
174 Summary: Test infrastructure
175 Group: System Environment
/Kernel
176 Requires: %{name}%{?_isa} = %{version}-%{release}
188 This package contains
test infrastructure and support scripts
for
189 validating the file system.
192 Summary: Dracut module
193 Group: System Environment
/Kernel
194 Requires: %{name}%{?_isa} = %{version}-%{release}
198 This package contains a dracut module used to construct an initramfs
199 image which is ZFS aware.
203 Summary: Initramfs module
204 Group: System Environment
/Kernel
205 Requires: %{name}%{?_isa} = %{version}-%{release}
206 Requires: %{name} = %{version}-%{release}
207 Requires: initramfs
-tools
209 %description initramfs
210 This package contains a initramfs module used to construct an initramfs
211 image which is ZFS aware.
216 %define debug
--enable-debug
218 %define debug
--disable
-debug
221 %define systemd
--enable-systemd
--with
-systemdunitdir
=%{_unitdir} --with-systemdpresetdir=%{_presetdir} --disable
-sysvinit
223 %define systemd
--enable-sysvinit
--disable
-systemd
231 --with
-udevdir
=%{_udevdir} \
232 --with
-udevruledir
=%{_udevruledir} \
233 --with
-dracutdir
=%{_dracutdir} \
240 %{__rm} -rf $RPM_BUILD_ROOT
241 make install DESTDIR
=%{?buildroot}
242 find
%{?buildroot}%{_libdir} -name '*.la' -exec rm -f {} \
;
246 %systemd_post %{systemd_svcs}
248 if [ -x
/sbin
/chkconfig
]; then
249 /sbin
/chkconfig
--add zfs
-import
250 /sbin
/chkconfig
--add zfs
-mount
251 /sbin
/chkconfig
--add zfs
-share
252 /sbin
/chkconfig
--add zfs
-zed
259 %systemd_preun %{systemd_svcs}
261 if [ "$
1"
= "
0"
] && [ -x
/sbin
/chkconfig
]; then
262 /sbin
/chkconfig
--del zfs
-import
263 /sbin
/chkconfig
--del zfs
-mount
264 /sbin
/chkconfig
--del zfs
-share
265 /sbin
/chkconfig
--del zfs
-zed
272 %systemd_postun %{systemd_svcs}
278 %{_libexecdir}/%{name}
284 %{_udevdir}/rules.d
/*
286 /usr
/lib
/modules
-load.d
/*
290 %config(noreplace
) %{_sysconfdir}/init.d
/*
291 %config(noreplace
) %{_initconfdir}/zfs
293 %config(noreplace
) %{_sysconfdir}/%{name}
294 %attr(440, root
, root
) %config(noreplace
) %{_sysconfdir}/sudoers.d
/*
297 %{_libdir}/libzpool.so.
*
300 %{_libdir}/libnvpair.so.
*
303 %{_libdir}/libuutil.so.
*
306 %{_libdir}/libzfs
*.so.
*
308 %files -n libzfs2
-devel
309 %{_datadir}/pkgconfig
/libzfs.pc
310 %{_datadir}/pkgconfig
/libzfs_core.pc
313 %doc AUTHORS COPYRIGHT DISCLAIMER
314 %doc OPENSOLARIS.LICENSE README.markdown
320 %doc contrib
/dracut
/README.dracut.markdown
321 %{_dracutdir}/modules.d
/*
325 %doc contrib
/initramfs
/README.initramfs.markdown
326 /usr
/share
/initramfs
-tools
/*
328 # Since we're not building the initramfs package,
329 # ignore those files.
330 %exclude /usr
/share
/initramfs
-tools
334 * Wed Oct
18 2017 Tony Hutter
<hutter2@llnl.gov
> - 0.7.3-1
335 - Released
0.7.3-1, detailed release notes are available at
:
336 - https
://github.com
/zfsonlinux
/zfs
/releases
/tag
/zfs
-0.7.3
337 * Fri Sep
22 2017 Tony Hutter
<hutter2@llnl.gov
> - 0.7.2-1
338 - Released
0.7.2-1, detailed release notes are available at
:
339 - https
://github.com
/zfsonlinux
/zfs
/releases
/tag
/zfs
-0.7.2
340 * Tue Aug
8 2017 Tony Hutter
<hutter2@llnl.gov
> - 0.7.1-1
341 - Released
0.7.1-1, detailed release notes are available at
:
342 - https
://github.com
/zfsonlinux
/zfs
/releases
/tag
/zfs
-0.7.1
343 * Wed Jul
26 2017 Brian Behlendorf
<behlendorf1@llnl.gov
> - 0.7.0-1
344 - Released
0.7.0-1, detailed release notes are available at
:
345 - https
://github.com
/zfsonlinux
/zfs
/releases
/tag
/zfs
-0.7.0