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
97 # The zpool iostat/status -c scripts call some utilities like lsblk and iostat
102 This package contains the ZFS
command line utilities.
104 %package -n libzpool2
105 Summary: Native ZFS pool library
for Linux
106 Group: System Environment
/Kernel
108 %description -n libzpool2
109 This package contains the zpool library
, which provides support
112 %post -n libzpool2
-p
/sbin
/ldconfig
113 %postun -n libzpool2
-p
/sbin
/ldconfig
115 %package -n libnvpair1
116 Summary: Solaris name
-value library
for Linux
117 Group: System Environment
/Kernel
119 %description -n libnvpair1
120 This package contains routines
for packing and unpacking name
-value
121 pairs. This functionality is used to portably transport data across
122 process boundaries
, between kernel and user space
, and can be used
123 to write self describing data structures on disk.
125 %post -n libnvpair1
-p
/sbin
/ldconfig
126 %postun -n libnvpair1
-p
/sbin
/ldconfig
128 %package -n libuutil1
129 Summary: Solaris userland utility library
for Linux
130 Group: System Environment
/Kernel
132 %description -n libuutil1
133 This library provides a variety of compatibility functions
for ZFS on Linux
:
134 * libspl
: The Solaris Porting Layer userland library
, which provides APIs
135 that
make it possible to run Solaris user code
in a Linux environment
136 with relatively minimal modification.
137 * libavl
: The Adelson
-Velskii Landis balanced binary tree manipulation
139 * libefi
: The Extensible Firmware Interface library
for GUID disk
141 * libshare
: NFS
, SMB
, and iSCSI service integration
for ZFS.
143 %post -n libuutil1
-p
/sbin
/ldconfig
144 %postun -n libuutil1
-p
/sbin
/ldconfig
147 Summary: Native ZFS filesystem library
for Linux
148 Group: System Environment
/Kernel
150 %description -n libzfs2
151 This package provides support
for managing ZFS filesystems
153 %post -n libzfs2
-p
/sbin
/ldconfig
154 %postun -n libzfs2
-p
/sbin
/ldconfig
156 %package -n libzfs2
-devel
157 Summary: Development headers
158 Group: System Environment
/Kernel
159 Requires: libzfs2
= %{version}
160 Requires: libzpool2
= %{version}
161 Requires: libnvpair1
= %{version}
162 Requires: libuutil1
= %{version}
163 Provides: libzpool2
-devel
164 Provides: libnvpair1
-devel
165 Provides: libuutil1
-devel
168 %description -n libzfs2
-devel
169 This package contains the header files needed
for building additional
170 applications against the ZFS libraries.
173 Summary: Test infrastructure
174 Group: System Environment
/Kernel
175 Requires: %{name}%{?_isa} = %{version}-%{release}
189 This package contains
test infrastructure and support scripts
for
190 validating the file system.
193 Summary: Dracut module
194 Group: System Environment
/Kernel
195 Requires: %{name}%{?_isa} = %{version}-%{release}
199 This package contains a dracut module used to construct an initramfs
200 image which is ZFS aware.
204 Summary: Initramfs module
205 Group: System Environment
/Kernel
206 Requires: %{name}%{?_isa} = %{version}-%{release}
207 Requires: %{name} = %{version}-%{release}
208 Requires: initramfs
-tools
210 %description initramfs
211 This package contains a initramfs module used to construct an initramfs
212 image which is ZFS aware.
217 %define debug
--enable-debug
219 %define debug
--disable
-debug
222 %define systemd
--enable-systemd
--with
-systemdunitdir
=%{_unitdir} --with-systemdpresetdir=%{_presetdir} --disable
-sysvinit
223 %define systemd_svcs zfs
-import
-cache.service zfs
-import
-scan.service zfs
-mount.service zfs
-share.service zfs
-zed.service zfs.target
225 %define systemd
--enable-sysvinit
--disable
-systemd
233 --with
-udevdir
=%{_udevdir} \
234 --with
-udevruledir
=%{_udevruledir} \
235 --with
-dracutdir
=%{_dracutdir} \
242 %{__rm} -rf $RPM_BUILD_ROOT
243 make install DESTDIR
=%{?buildroot}
244 find
%{?buildroot}%{_libdir} -name '*.la' -exec rm -f {} \
;
248 %systemd_post %{systemd_svcs}
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
261 %systemd_preun %{systemd_svcs}
263 if [ "$
1"
= "
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
274 %systemd_postun %{systemd_svcs}
280 %{_libexecdir}/%{name}
286 %{_udevdir}/rules.d
/*
288 /usr
/lib
/modules
-load.d
/*
292 %config(noreplace
) %{_sysconfdir}/init.d
/*
293 %config(noreplace
) %{_initconfdir}/zfs
295 %config(noreplace
) %{_sysconfdir}/%{name}
296 %attr(440, root
, root
) %config(noreplace
) %{_sysconfdir}/sudoers.d
/*
299 %{_libdir}/libzpool.so.
*
302 %{_libdir}/libnvpair.so.
*
305 %{_libdir}/libuutil.so.
*
308 %{_libdir}/libzfs
*.so.
*
310 %files -n libzfs2
-devel
311 %{_datadir}/pkgconfig
/libzfs.pc
312 %{_datadir}/pkgconfig
/libzfs_core.pc
315 %doc AUTHORS COPYRIGHT DISCLAIMER
316 %doc OPENSOLARIS.LICENSE README.markdown
322 %doc contrib
/dracut
/README.dracut.markdown
323 %{_dracutdir}/modules.d
/*
327 %doc contrib
/initramfs
/README.initramfs.markdown
328 /usr
/share
/initramfs
-tools
/*
330 # Since we're not building the initramfs package,
331 # ignore those files.
332 %exclude /usr
/share
/initramfs
-tools
336 * Wed Oct
18 2017 Tony Hutter
<hutter2@llnl.gov
> - 0.7.3-1
337 - Released
0.7.3-1, detailed release notes are available at
:
338 - https
://github.com
/zfsonlinux
/zfs
/releases
/tag
/zfs
-0.7.3
339 * Fri Sep
22 2017 Tony Hutter
<hutter2@llnl.gov
> - 0.7.2-1
340 - Released
0.7.2-1, detailed release notes are available at
:
341 - https
://github.com
/zfsonlinux
/zfs
/releases
/tag
/zfs
-0.7.2
342 * Tue Aug
8 2017 Tony Hutter
<hutter2@llnl.gov
> - 0.7.1-1
343 - Released
0.7.1-1, detailed release notes are available at
:
344 - https
://github.com
/zfsonlinux
/zfs
/releases
/tag
/zfs
-0.7.1
345 * Wed Jul
26 2017 Brian Behlendorf
<behlendorf1@llnl.gov
> - 0.7.0-1
346 - Released
0.7.0-1, detailed release notes are available at
:
347 - https
://github.com
/zfsonlinux
/zfs
/releases
/tag
/zfs
-0.7.0