2 %global _libdir
/%{_lib}
4 %global _udevdir
%{_prefix}/lib
/udev
5 %global _dracutdir
%{_prefix}/lib
/dracut
7 %global _udevdir
/lib
/udev
8 %global _dracutdir
%{_prefix}/share
/dracut
15 # Generic enable switch for systemd
20 # RHEL >= 7 comes with systemd
25 # Fedora >= 15 comes with systemd, but only >= 18 has
31 # opensuse >= 12.1 comes with systemd, but only >= 13.1
32 # has the proper macros
33 %if 0%{?suse_version} >= 1310
39 Release: @RELEASE@
%{?dist}
40 Summary: Commands to control the kernel modules and libraries
42 Group: System Environment
/Kernel
43 License: @ZFS_META_LICENSE@
44 URL: http
://zfsonlinux.org
/
45 Source0: %{name}-%{version}.tar.gz
46 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n
)
47 ExclusiveArch: i386 i686 x86_64
49 # May build but untested on ppc/ppc64
50 ExcludeArch: ppc ppc64
52 Requires: spl
= %{version}
53 Requires: libzpool2
= %{version}
54 Requires: libnvpair1
= %{version}
55 Requires: libuutil1
= %{version}
56 Requires: libzfs2
= %{version}
57 Requires: %{name}-kmod = %{version}
58 Provides: %{name}-kmod-common = %{version}
60 # zfs-fuse provides the same commands and man pages that ZoL does. Renaming
61 # those on either side would conflict with all available documentation.
64 %if 0%{?rhel}%{?fedora}%{?suse_version}
65 BuildRequires
: zlib
-devel
66 BuildRequires
: libuuid
-devel
68 BuildRequires
: libblkid
-devel
72 Requires(post
): systemd
73 Requires(preun
): systemd
74 Requires(postun
): systemd
75 BuildRequires
: systemd
79 This package contains the ZFS
command line utilities.
82 Summary: Native ZFS pool library
for Linux
83 Group: System Environment
/Kernel
85 %description -n libzpool2
86 This package contains the zpool library
, which provides support
89 %post-n libzpool2
-p
/sbin
/ldconfig
90 %postun -n libzpool2
-p
/sbin
/ldconfig
92 %package -n libnvpair1
93 Summary: Solaris name
-value library
for Linux
94 Group: System Environment
/Kernel
96 %description -n libnvpair1
97 This package contains routines
for packing and unpacking name
-value
98 pairs. This functionality is used to portably transport data across
99 process boundaries
, between kernel and user space
, and can be used
100 to write self describing data structures on disk.
102 %post-n libnvpair1
-p
/sbin
/ldconfig
103 %postun -n libnvpair1
-p
/sbin
/ldconfig
105 %package -n libuutil1
106 Summary: Solaris userland utility library
for Linux
107 Group: System Environment
/Kernel
109 %description -n libuutil1
110 This library provides a variety of compatibility functions
for ZFS on Linux
:
111 * libspl
: The Solaris Porting Layer userland library
, which provides APIs
112 that
make it possible to run Solaris user code
in a Linux environment
113 with relatively minimal modification.
114 * libavl
: The Adelson
-Velskii Landis balanced binary tree manipulation
116 * libefi
: The Extensible Firmware Interface library
for GUID disk
118 * libshare
: NFS
, SMB
, and iSCSI service integration
for ZFS.
120 %post-n libuutil1
-p
/sbin
/ldconfig
121 %postun -n libuutil1
-p
/sbin
/ldconfig
124 Summary: Native ZFS filesystem library
for Linux
125 Group: System Environment
/Kernel
127 %description -n libzfs2
128 This package provides support
for managing ZFS filesystems
130 %post-n libzfs2
-p
/sbin
/ldconfig
131 %postun -n libzfs2
-p
/sbin
/ldconfig
133 %package -n libzfs2
-devel
134 Summary: Development headers
135 Group: System Environment
/Kernel
136 Requires: libzfs2
= %{version}
137 Requires: libzpool2
= %{version}
138 Requires: libnvpair1
= %{version}
139 Requires: libuutil1
= %{version}
140 Provides: libzpool2
-devel
141 Provides: libnvpair1
-devel
142 Provides: libuutil1
-devel
145 %description -n libzfs2
-devel
146 This package contains the header files needed
for building additional
147 applications against the ZFS libraries.
150 Summary: Test infrastructure
151 Group: System Environment
/Kernel
152 Requires: %{name}%{?_isa} = %{version}-%{release}
159 This package contains
test infrastructure and support scripts
for
160 validating the file system.
163 Summary: Dracut module
164 Group: System Environment
/Kernel
165 Requires: %{name}%{?_isa} = %{version}-%{release}
169 This package contains a dracut module used to construct an initramfs
170 image which is ZFS aware.
174 %define debug
--enable-debug
176 %define debug
--disable
-debug
179 %define blkid
--with
-blkid
181 %define blkid
--without
-blkid
184 %define systemd
--enable-systemd
--with
-systemdunitdir
=%{_unitdir} --with-systemdpresetdir=%{_presetdir} --disable
-sysvinit
186 %define systemd
--enable-sysvinit
--disable
-systemd
194 --with
-udevdir
=%{_udevdir} \
195 --with
-dracutdir
=%{_dracutdir} \
203 %{__rm} -rf $RPM_BUILD_ROOT
204 make install DESTDIR
=%{?buildroot}
205 find
%{?buildroot}%{_libdir} -name '*.la' -exec rm -f {} \
;
209 %systemd_post zfs.target
211 [ -x
/sbin
/chkconfig
] && /sbin
/chkconfig
--add zfs
217 %systemd_preun zfs.target
219 if [ $
1 -eq
0 ] ; then
220 [ -x
/sbin
/chkconfig
] && /sbin
/chkconfig
--del zfs
227 %systemd_postun zfs.target
233 %{_libexecdir}/%{name}
239 %{_udevdir}/rules.d
/*
240 %config(noreplace
) %{_sysconfdir}/%{name}
242 /usr
/lib
/modules
-load.d
/*
246 %{_sysconfdir}/init.d
/*
250 %{_libdir}/libzpool.so.
*
253 %{_libdir}/libnvpair.so.
*
256 %{_libdir}/libuutil.so.
*
259 %{_libdir}/libzfs
*.so.
*
261 %files -n libzfs2
-devel
264 %doc AUTHORS COPYRIGHT DISCLAIMER
265 %doc OPENSOLARIS.LICENSE README.markdown
271 %doc dracut
/README.dracut.markdown
272 %{_dracutdir}/modules.d
/*
275 * Wed Aug
21 2013 Brian Behlendorf
<behlendorf1@llnl.gov
> - 0.6.2-1
277 * Fri Mar
22 2013 Brian Behlendorf
<behlendorf1@llnl.gov
> - 0.6.1-1
278 - First official stable release.