1 # TODO: PLDify init script
4 %bcond_without dist_kernel # allow non-distribution kernel
5 %bcond_without kernel # don't build kernel modules
6 %bcond_without userspace # don't build userspace programs
7 %bcond_with verbose # verbose build (V=1)
10 %undefine with_dist_kernel
12 %if "%{_alt_kernel}" != "%{nil}"
13 %undefine with_userspace
15 %if %{without userspace}
16 # nothing to be placed to debuginfo package
17 %define _enable_debug_packages 0
19 Summary: Native Linux port of the ZFS filesystem
20 Summary(pl.UTF-8): Natywny linuksowy port systemu plików ZFS
22 Name: %{pname}%{_alt_kernel}
26 License: CDDL (ZFS), GPL v2+ (ZPIOS)
27 Group: Applications/System
28 Source0: http://archive.zfsonlinux.org/downloads/zfsonlinux/zfs/%{pname}-%{version}.tar.gz
29 # Source0-md5: 5bcc32c122934d421eba68e16826637d
30 Patch0: %{name}-link.patch
31 URL: http://zfsonlinux.org/
32 BuildRequires: autoconf >= 2.50
33 BuildRequires: automake
34 BuildRequires: libtool
36 %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.26}
37 BuildRequires: kernel%{_alt_kernel}-spl-devel >= 0.6.3
38 BuildRequires: rpmbuild(macros) >= 1.379
41 BuildRequires: libblkid-devel
42 BuildRequires: libselinux-devel
43 BuildRequires: libuuid-devel
44 BuildRequires: zlib-devel
46 Requires: %{pname}-libs = %{version}-%{release}
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 %define dracutlibdir %{_prefix}/lib/dracut
52 ZFS is an advanced file system and volume manager which was originally
53 developed for Solaris and is now maintained by the Illumos community.
55 ZFS on Linux, which is also known as ZoL, is currently feature
56 complete. It includes fully functional and stable SPA, DMU, ZVOL, and
59 %description -l pl.UTF-8
60 ZFS to zaawansowany system plików i zarządca wolumenów, oryginalnie
61 stworzony dla Solarisa, obecnie utrzymywany przez społeczność Illumos.
63 ZFS dla Linuksa, znany takża jako ZoL (ZFS on Linux), jest obecnie w
64 pełni funkcjonalny. Zawiera w pełni funkcjonalne i stabilne warstwy
68 Summary: ZFS on Linux libraries
69 Summary(pl.UTF-8): Biblioteki ZFS-a dla Linuksa
72 Requires(post,postun): /sbin/ldconfig
75 ZFS on Linux libraries.
77 %description libs -l pl.UTF-8
78 Biblioteki ZFS-a dla Linuksa.
81 Summary: Header files for ZFS libraries
82 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek ZFS-a
84 Group: Development/Libraries
85 Requires: %{pname}-libs = %{version}-%{release}
86 Requires: libselinux-devel
87 Requires: libuuid-devel
91 Header files for ZFS libraries.
93 %description devel -l pl.UTF-8
94 Pliki nagłówkowe bibliotek ZFS-a.
97 Summary: Static ZFS libraries
98 Summary(pl.UTF-8): Statyczne biblioteki ZFS-a
100 Group: Development/Libraries
101 Requires: %{pname}-devel = %{version}-%{release}
104 Static ZFS libraries.
106 %description static -l pl.UTF-8
107 Statyczne biblioteki ZFS-a.
109 %package -n dracut-zfs
110 Summary: ZFS support for Dracut
111 Summary(pl.UTF-8): Obsługa ZFS-a dla Dracuta
112 Group: Applications/System
113 Requires: %{pname} = %{version}-%{release}
116 %description -n dracut-zfs
117 ZFS support for Dracut.
119 %description -n dracut-zfs -l pl.UTF-8
120 Obsługa ZFS-a dla Dracuta.
122 %package -n kernel%{_alt_kernel}-zfs
123 Summary: ZFS Linux kernel modules
124 Summary(pl.UTF-8): ZFS - moduły jądra Linuksa
125 Release: %{rel}@%{_kernel_ver_str}
127 Requires(post,postun): /sbin/depmod
128 %if %{with dist_kernel}
129 %requires_releq_kernel
130 Requires(postun): %releq_kernel
133 %description -n kernel%{_alt_kernel}-zfs
134 ZFS Linux kernel modules.
136 %description -n kernel%{_alt_kernel}-zfs -l pl.UTF-8
137 ZFS - moduły jądra Linuksa.
139 %package -n kernel%{_alt_kernel}-zfs-devel
140 Summary: ZFS Linux kernel headers
141 Summary(pl.UTF-8): ZFS - pliki nagłówkowe jądra Linuksa
142 Release: %{rel}@%{_kernel_ver_str}
143 Group: Development/Building
144 %{?with_dist_kernel:Requires: kernel%{_alt_kernel}-headers}
146 %description -n kernel%{_alt_kernel}-zfs-devel
147 ZFS Linux kernel headers configured for PLD kernel%{_alt_kernel},
148 version %{_kernel_ver}.
150 %description -n kernel%{_alt_kernel}-zfs-devel -l pl.UTF-8
151 ZFS - pliki nagłówkowe jądra Linuksa skonfigurowane dla jądra PLD z
152 pakietu kernel%{_alt_kernel} w wersji %{_kernel_ver}.
160 %{__aclocal} -I config
165 --disable-silent-rules \
166 --with-config="%{?with_kernel:%{?with_userspace:all}}%{!?with_kernel:user}%{!?with_userspace:kernel}" \
167 --with-linux=%{_kernelsrcdir} \
168 --with-systemdunitdir=%{systemdunitdir} \
169 --with-systemdpresetdir=/etc/systemd/system-preset \
170 --with-udevdir=/lib/udev
176 rm -rf $RPM_BUILD_ROOT
179 DESTDIR=$RPM_BUILD_ROOT \
180 DEFAULT_INIT_DIR=/etc/rc.d/init.d \
184 rm -rf $RPM_BUILD_ROOT
186 %post -n kernel%{_alt_kernel}-zfs
187 %depmod %{_kernel_ver}
189 %postun -n kernel%{_alt_kernel}-zfs
190 %depmod %{_kernel_ver}
192 %post libs -p /sbin/ldconfig
193 %postun libs -p /sbin/ldconfig
195 %if %{with userspace}
197 %defattr(644,root,root,755)
198 %doc AUTHORS COPYRIGHT DISCLAIMER OPENSOLARIS.LICENSE README.markdown
199 %attr(755,root,root) /sbin/mount.zfs
200 %attr(755,root,root) %{_bindir}/arcstat.py
201 %attr(755,root,root) %{_bindir}/dbufstat.py
202 %attr(755,root,root) %{_sbindir}/fsck.zfs
203 %attr(755,root,root) %{_sbindir}/zdb
204 %attr(755,root,root) %{_sbindir}/zed
205 %attr(755,root,root) %{_sbindir}/zfs
206 %attr(755,root,root) %{_sbindir}/zhack
207 %attr(755,root,root) %{_sbindir}/zinject
208 %attr(755,root,root) %{_sbindir}/zpios
209 %attr(755,root,root) %{_sbindir}/zpool
210 %attr(755,root,root) %{_sbindir}/zstreamdump
211 %attr(755,root,root) %{_sbindir}/ztest
212 %dir %{_sysconfdir}/zfs
213 # package *.example as %doc? (they cannot act as default configuration)
214 %{_sysconfdir}/zfs/vdev_id.conf.*.example
215 %dir %{_sysconfdir}/zfs/zed.d
216 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zfs/zed.d/*.sh
217 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zfs/zed.d/zed.rc
218 %attr(754,root,root) /etc/rc.d/init.d/zfs
219 /usr/lib/modules-load.d/zfs.conf
220 /etc/systemd/system-preset/50-zfs.preset
221 %{systemdunitdir}/zed.service
222 %{systemdunitdir}/zfs.target
223 %{systemdunitdir}/zfs-import-cache.service
224 %{systemdunitdir}/zfs-import-scan.service
225 %{systemdunitdir}/zfs-mount.service
226 %{systemdunitdir}/zfs-share.service
227 %attr(755,root,root) /lib/udev/vdev_id
228 %attr(755,root,root) /lib/udev/zvol_id
229 /lib/udev/rules.d/60-zvol.rules
230 /lib/udev/rules.d/69-vdev.rules
231 /lib/udev/rules.d/90-zfs.rules
233 %dir %{_libdir}/zfs/zed.d
234 %attr(755,root,root) %{_libdir}/zfs/zed.d/*.sh
236 %attr(755,root,root) %{_datadir}/zfs/*.sh
237 %dir %{_datadir}/zfs/zpios-profile
238 %attr(755,root,root) %{_datadir}/zfs/zpios-profile/*.sh
239 %dir %{_datadir}/zfs/zpios-test
240 %attr(755,root,root) %{_datadir}/zfs/zpios-test/*.sh
241 %dir %{_datadir}/zfs/zpool-config
242 %attr(755,root,root) %{_datadir}/zfs/zpool-config/*.sh
243 %{_mandir}/man1/zhack.1*
244 %{_mandir}/man1/zpios.1*
245 %{_mandir}/man1/ztest.1*
246 %{_mandir}/man5/vdev_id.conf.5*
247 %{_mandir}/man5/zfs-module-parameters.5*
248 %{_mandir}/man5/zpool-features.5*
249 %{_mandir}/man8/fsck.zfs.8*
250 %{_mandir}/man8/mount.zfs.8*
251 %{_mandir}/man8/vdev_id.8*
252 %{_mandir}/man8/zdb.8*
253 %{_mandir}/man8/zed.8*
254 %{_mandir}/man8/zfs.8*
255 %{_mandir}/man8/zinject.8*
256 %{_mandir}/man8/zpool.8*
257 %{_mandir}/man8/zstreamdump.8*
260 %defattr(644,root,root,755)
261 %attr(755,root,root) %{_libdir}/libnvpair.so.*.*.*
262 %attr(755,root,root) %ghost %{_libdir}/libnvpair.so.1
263 %attr(755,root,root) %{_libdir}/libuutil.so.*.*.*
264 %attr(755,root,root) %ghost %{_libdir}/libuutil.so.1
265 %attr(755,root,root) %{_libdir}/libzfs.so.*.*.*
266 %attr(755,root,root) %ghost %{_libdir}/libzfs.so.2
267 %attr(755,root,root) %{_libdir}/libzfs_core.so.*.*.*
268 %attr(755,root,root) %ghost %{_libdir}/libzfs_core.so.1
269 %attr(755,root,root) %{_libdir}/libzpool.so.*.*.*
270 %attr(755,root,root) %ghost %{_libdir}/libzpool.so.2
273 %defattr(644,root,root,755)
274 %attr(755,root,root) %{_libdir}/libnvpair.so
275 %attr(755,root,root) %{_libdir}/libuutil.so
276 %attr(755,root,root) %{_libdir}/libzfs.so
277 %attr(755,root,root) %{_libdir}/libzfs_core.so
278 %attr(755,root,root) %{_libdir}/libzpool.so
279 %{_libdir}/libnvpair.la
280 %{_libdir}/libuutil.la
282 %{_libdir}/libzfs_core.la
283 %{_libdir}/libzpool.la
284 %{_includedir}/libspl
285 %{_includedir}/libzfs
288 %defattr(644,root,root,755)
289 %{_libdir}/libnvpair.a
290 %{_libdir}/libuutil.a
292 %{_libdir}/libzfs_core.a
293 %{_libdir}/libzpool.a
296 %defattr(644,root,root,755)
297 %doc dracut/README.dracut.markdown
298 %dir %{dracutlibdir}/modules.d/90zfs
299 %attr(755,root,root) %{dracutlibdir}/modules.d/90zfs/module-setup.sh
300 %attr(755,root,root) %{dracutlibdir}/modules.d/90zfs/mount-zfs.sh
301 %attr(755,root,root) %{dracutlibdir}/modules.d/90zfs/parse-zfs.sh
305 %files -n kernel%{_alt_kernel}-zfs
306 %defattr(644,root,root,755)
307 %dir /lib/modules/%{_kernel_ver}/misc/avl
308 /lib/modules/%{_kernel_ver}/misc/avl/zavl.ko*
309 %dir /lib/modules/%{_kernel_ver}/misc/nvpair
310 /lib/modules/%{_kernel_ver}/misc/nvpair/znvpair.ko*
311 %dir /lib/modules/%{_kernel_ver}/misc/unicode
312 /lib/modules/%{_kernel_ver}/misc/unicode/zunicode.ko*
313 %dir /lib/modules/%{_kernel_ver}/misc/zcommon
314 /lib/modules/%{_kernel_ver}/misc/zcommon/zcommon.ko*
315 %dir /lib/modules/%{_kernel_ver}/misc/zfs
316 /lib/modules/%{_kernel_ver}/misc/zfs/zfs.ko*
317 %dir /lib/modules/%{_kernel_ver}/misc/zpios
318 /lib/modules/%{_kernel_ver}/misc/zpios/zpios.ko*
320 %files -n kernel%{_alt_kernel}-zfs-devel
321 %defattr(644,root,root,755)
322 /usr/src/zfs-%{version}