X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=zfs.spec;h=d02ac9c87b88be6ff41d36b4530c804297a0abde;hb=56fca1f;hp=6023f9f92bfac875211ae06593d6e4e65f4a9113;hpb=97dbbf935884469407ec9f96494551595eac5c89;p=packages%2Fzfs.git diff --git a/zfs.spec b/zfs.spec index 6023f9f..d02ac9c 100644 --- a/zfs.spec +++ b/zfs.spec @@ -8,6 +8,8 @@ # Conditional build: %bcond_without kernel # don't build kernel modules %bcond_without userspace # don't build userspace programs +%bcond_without python2 # CPython 2.x module +%bcond_without python3 # CPython 3.x module %bcond_with verbose # verbose build (V=1) # # The goal here is to have main, userspace, package built once with @@ -26,35 +28,59 @@ exit 1 %define _duplicate_files_terminate_build 0 -%define rel 2 +%define _rc rc4 +%define rel 0.%{_rc}.2 %define pname zfs Summary: Native Linux port of the ZFS filesystem Summary(pl.UTF-8): Natywny linuksowy port systemu plików ZFS Name: %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel} -Version: 0.6.5.8 +Version: 0.8.0 Release: %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}} -License: CDDL (ZFS), GPL v2+ (ZPIOS) +License: CDDL Group: Applications/System -Source0: https://github.com/zfsonlinux/zfs/releases/download/zfs-%{version}/%{pname}-%{version}.tar.gz -# Source0-md5: ffc51dcf5260d3c7e747fe78f8ae307c -Patch0: %{pname}-link.patch -Patch1: x32.patch +#Source0: https://github.com/zfsonlinux/zfs/releases/download/zfs-%{version}/%{pname}-%{version}.tar.gz +Source0: https://github.com/zfsonlinux/zfs/archive/zfs-%{version}-%{_rc}/%{pname}-%{version}-%{_rc}.tar.gz +# Source0-md5: 9630df590251ad13a347b10fd46c0922 +Patch0: x32.patch +Patch1: am.patch +Patch2: highmem.patch +Patch3: zfs-sh.patch URL: http://zfsonlinux.org/ BuildRequires: autoconf >= 2.50 BuildRequires: automake BuildRequires: libtool -BuildRequires: rpmbuild(macros) >= 1.701 +BuildRequires: rpmbuild(macros) >= 1.714 %if %{with kernel} %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2} -%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-spl-devel >= 0.6.3} %endif %if %{with userspace} +# only for mmap_libaio test command +#BuildRequires: libaio-devel BuildRequires: libblkid-devel BuildRequires: libselinux-devel +# if xdr gets removed from glibc +#BuildRequires: libtirpc-devel BuildRequires: libuuid-devel +BuildRequires: openssl-devel +BuildRequires: pkgconfig +BuildRequires: udev-devel BuildRequires: zlib-devel +%if %{with python2} +BuildRequires: python-cffi +BuildRequires: python-modules >= 1:2.6 +BuildRequires: python-setuptools +%endif +%if %{with python3} +BuildRequires: python3-cffi +BuildRequires: python3-modules >= 1:3.4 +BuildRequires: python3-setuptools +%endif +%if %{with python2} || %{with python3} +BuildRequires: rpm-pythonprov +%endif %endif Requires: %{pname}-libs = %{version}-%{release} +Obsoletes: spl < 0.7.9-2 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define dracutlibdir %{_prefix}/lib/dracut @@ -130,10 +156,37 @@ ZFS support for Dracut. %description -n dracut-zfs -l pl.UTF-8 Obsługa ZFS-a dla Dracuta. +%package -n python-pyzfs +Summary: Python 2 wrapper for libzfs_core C library +Summary(pl.UTF-8): Interfejs Pythona 2 do biblioteki C libzfs_core +License: Apache v2.0 +Group: Libraries/Python +Requires: %{pname}-libs = %{version}-%{release} + +%description -n python-pyzfs +Python 2 wrapper for libzfs_core C library. + +%description -n python-pyzfs -l pl.UTF-8 +Interfejs Pythona 2 do biblioteki C libzfs_core. + +%package -n python3-pyzfs +Summary: Python 3 wrapper for libzfs_core C library +Summary(pl.UTF-8): Interfejs Pythona 3 do biblioteki C libzfs_core +License: Apache v2.0 +Group: Libraries/Python +Requires: %{pname}-libs = %{version}-%{release} + +%description -n python3-pyzfs +Python 3 wrapper for libzfs_core C library. + +%description -n python3-pyzfs -l pl.UTF-8 +Interfejs Pythona 3 do biblioteki C libzfs_core. + %package -n kernel-zfs-common-devel Summary: ZFS Linux kernel headers Summary(pl.UTF-8): ZFS - pliki nagłówkowe jądra Linuksa Group: Development/Building +Obsoletes: kernel-spl-common-devel < 0.7.9-2 %description -n kernel-zfs-common-devel ZFS Linux kernel headers common for all PLD kernel versions. @@ -165,6 +218,7 @@ Release: %{rel}@%{_kernel_ver_str}\ Group: Development/Building\ Requires: kernel%{_alt_kernel}-headers\ Requires: kernel-zfs-common-devel\ +Obsoletes: kernel-spl-devel < 0.7.9-2\ \ %description -n kernel%{_alt_kernel}-zfs-devel\ ZFS Linux kernel headers configured for PLD kernel%{_alt_kernel},\ @@ -176,18 +230,22 @@ pakietu kernel%{_alt_kernel} w wersji %{_kernel_ver}.\ \ %files -n kernel%{_alt_kernel}-zfs\ %defattr(644,root,root,755)\ +%dir /lib/modules/%{_kernel_ver}/misc/lua\ +/lib/modules/%{_kernel_ver}/misc/lua/zlua.ko*\ %dir /lib/modules/%{_kernel_ver}/misc/avl\ /lib/modules/%{_kernel_ver}/misc/avl/zavl.ko*\ +%dir /lib/modules/%{_kernel_ver}/misc/icp\ +/lib/modules/%{_kernel_ver}/misc/icp/icp.ko*\ %dir /lib/modules/%{_kernel_ver}/misc/nvpair\ /lib/modules/%{_kernel_ver}/misc/nvpair/znvpair.ko*\ +%dir /lib/modules/%{_kernel_ver}/misc/spl\ +/lib/modules/%{_kernel_ver}/misc/spl/spl.ko*\ %dir /lib/modules/%{_kernel_ver}/misc/unicode\ /lib/modules/%{_kernel_ver}/misc/unicode/zunicode.ko*\ %dir /lib/modules/%{_kernel_ver}/misc/zcommon\ /lib/modules/%{_kernel_ver}/misc/zcommon/zcommon.ko*\ %dir /lib/modules/%{_kernel_ver}/misc/zfs\ /lib/modules/%{_kernel_ver}/misc/zfs/zfs.ko*\ -%dir /lib/modules/%{_kernel_ver}/misc/zpios\ -/lib/modules/%{_kernel_ver}/misc/zpios/zpios.ko*\ \ %files -n kernel%{_alt_kernel}-zfs-devel\ %defattr(644,root,root,755)\ @@ -216,9 +274,11 @@ p=`pwd`\ %{?with_kernel:%{expand:%create_kernel_packages}} %prep -%setup -q -n %{pname}-%{version} +%setup -q -n %{pname}-zfs-%{version}-%{_rc} %patch0 -p1 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build %{__libtoolize} @@ -235,10 +295,24 @@ p=`pwd`\ --with-linux=%{_kernelsrcdir} \ --with-systemdunitdir=%{systemdunitdir} \ --with-systemdpresetdir=/etc/systemd/system-preset \ + --with-systemdmodulesloaddir=/etc/modules-load.d \ + --with-systemdgeneratordir=/lib/systemd/system-generators \ --with-udevdir=/lib/udev %{__make} \ %{?with_verbose:V=1} + +%if %{with python2} +cd contrib/pyzfs +%py_build +cd ../.. +%endif + +%if %{with python3} +cd contrib/pyzfs +%py3_build +cd ../.. +%endif %endif %install @@ -247,6 +321,8 @@ rm -rf $RPM_BUILD_ROOT %if %{with kernel} install -d $RPM_BUILD_ROOT cp -a installed/* $RPM_BUILD_ROOT +# Drop unneeded spl compat links +%{__rm} -r $RPM_BUILD_ROOT/usr/src/spl-%{version} %endif %if %{with userspace} @@ -254,8 +330,37 @@ cp -a installed/* $RPM_BUILD_ROOT DESTDIR=$RPM_BUILD_ROOT \ DEFAULT_INIT_DIR=/etc/rc.d/init.d +%if %{with python2} +%{__rm} -rf $RPM_BUILD_ROOT%{py_sitescriptdir} +cd contrib/pyzfs +%py_install + +%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} +%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} + +%py_postclean +cd ../.. +%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/libzfs_core/test +%endif + +%if %{with python3} +%{__rm} -rf $RPM_BUILD_ROOT{%{py3_sitescriptdir},/usr/local/share/python3*} +cd contrib/pyzfs +%py3_install +cd ../.. +%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/libzfs_core/test +%endif + install -d $RPM_BUILD_ROOT%{_pkgconfigdir} %{__mv} $RPM_BUILD_ROOT%{_npkgconfigdir}/* $RPM_BUILD_ROOT%{_pkgconfigdir} + +# Debian specific stuff +%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/initramfs-tools + +# Package these? These are integration tests of the implementation. +%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/zfs/{zfs-tests,test-runner,runfiles} +%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{raidz_test,test-runner}.1* +%{__rm} $RPM_BUILD_ROOT%{_bindir}/raidz_test %endif %clean @@ -267,18 +372,18 @@ rm -rf $RPM_BUILD_ROOT %if %{with userspace} %files %defattr(644,root,root,755) -%doc AUTHORS COPYRIGHT DISCLAIMER OPENSOLARIS.LICENSE README.markdown +%doc AUTHORS COPYRIGHT LICENSE NEWS NOTICE README.md %attr(755,root,root) /sbin/mount.zfs -%attr(755,root,root) %{_bindir}/arc_summary.py -%attr(755,root,root) %{_bindir}/arcstat.py -%attr(755,root,root) %{_bindir}/dbufstat.py +%attr(755,root,root) %{_bindir}/arc_summary +%attr(755,root,root) %{_bindir}/arcstat +%attr(755,root,root) %{_bindir}/dbufstat +%attr(755,root,root) %{_bindir}/zgenhostid %attr(755,root,root) %{_sbindir}/fsck.zfs %attr(755,root,root) %{_sbindir}/zdb %attr(755,root,root) %{_sbindir}/zed %attr(755,root,root) %{_sbindir}/zfs %attr(755,root,root) %{_sbindir}/zhack %attr(755,root,root) %{_sbindir}/zinject -%attr(755,root,root) %{_sbindir}/zpios %attr(755,root,root) %{_sbindir}/zpool %attr(755,root,root) %{_sbindir}/zstreamdump %attr(755,root,root) %{_sbindir}/ztest @@ -288,15 +393,19 @@ rm -rf $RPM_BUILD_ROOT %dir %{_sysconfdir}/zfs/zed.d %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zfs/zed.d/*.sh %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zfs/zed.d/zed.rc +%dir %{_sysconfdir}/zfs/zpool.d +%attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zfs/zpool.d/* %attr(754,root,root) /etc/rc.d/init.d/zfs-import %attr(754,root,root) /etc/rc.d/init.d/zfs-mount %attr(754,root,root) /etc/rc.d/init.d/zfs-share %attr(754,root,root) /etc/rc.d/init.d/zfs-zed %config(noreplace) %verify(not md5 mtime size) /etc/default/zfs /etc/zfs/zfs-functions -/usr/lib/modules-load.d/zfs.conf +%config(noreplace) %verify(not md5 mtime size) /etc/modules-load.d/zfs.conf /etc/systemd/system-preset/50-zfs.preset +/lib/systemd/system-generators/zfs-mount-generator %{systemdunitdir}/zfs.target +%{systemdunitdir}/zfs-import.target %{systemdunitdir}/zfs-import-cache.service %{systemdunitdir}/zfs-import-scan.service %{systemdunitdir}/zfs-mount.service @@ -307,20 +416,16 @@ rm -rf $RPM_BUILD_ROOT /lib/udev/rules.d/60-zvol.rules /lib/udev/rules.d/69-vdev.rules /lib/udev/rules.d/90-zfs.rules -%dir %{_libdir}/zfs -%dir %{_libdir}/zfs/zed.d -%attr(755,root,root) %{_libdir}/zfs/zed.d/*.sh +%dir %{_libexecdir}/zfs +%dir %{_libexecdir}/zfs/zed.d +%attr(755,root,root) %{_libexecdir}/zfs/zed.d/*.sh +%dir %{_libexecdir}/zfs/zpool.d +%attr(755,root,root) %{_libexecdir}/zfs/zpool.d/* %dir %{_datadir}/zfs %attr(755,root,root) %{_datadir}/zfs/*.sh -%dir %{_datadir}/zfs/zpios-profile -%attr(755,root,root) %{_datadir}/zfs/zpios-profile/*.sh -%dir %{_datadir}/zfs/zpios-test -%attr(755,root,root) %{_datadir}/zfs/zpios-test/*.sh -%dir %{_datadir}/zfs/zpool-config -%attr(755,root,root) %{_datadir}/zfs/zpool-config/*.sh %{_mandir}/man1/zhack.1* -%{_mandir}/man1/zpios.1* %{_mandir}/man1/ztest.1* +%{_mandir}/man5/spl-module-parameters.5* %{_mandir}/man5/vdev_id.conf.5* %{_mandir}/man5/zfs-events.5* %{_mandir}/man5/zfs-module-parameters.5* @@ -331,6 +436,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man8/zdb.8* %{_mandir}/man8/zed.8* %{_mandir}/man8/zfs.8* +%{_mandir}/man8/zfs-mount-generator.8* +%{_mandir}/man8/zfs-program.8* +%{_mandir}/man8/zgenhostid.8* %{_mandir}/man8/zinject.8* %{_mandir}/man8/zpool.8* %{_mandir}/man8/zstreamdump.8* @@ -376,12 +484,34 @@ rm -rf $RPM_BUILD_ROOT %files -n dracut-zfs %defattr(644,root,root,755) %doc contrib/dracut/README.dracut.markdown +%dir %{dracutlibdir}/modules.d/02zfsexpandknowledge +%attr(755,root,root) %{dracutlibdir}/modules.d/02zfsexpandknowledge/module-setup.sh %dir %{dracutlibdir}/modules.d/90zfs %attr(755,root,root) %{dracutlibdir}/modules.d/90zfs/export-zfs.sh %attr(755,root,root) %{dracutlibdir}/modules.d/90zfs/module-setup.sh %attr(755,root,root) %{dracutlibdir}/modules.d/90zfs/mount-zfs.sh %attr(755,root,root) %{dracutlibdir}/modules.d/90zfs/parse-zfs.sh +%attr(755,root,root) %{dracutlibdir}/modules.d/90zfs/zfs-env-bootfs.service +%attr(755,root,root) %{dracutlibdir}/modules.d/90zfs/zfs-generator.sh %attr(755,root,root) %{dracutlibdir}/modules.d/90zfs/zfs-lib.sh +%attr(755,root,root) %{dracutlibdir}/modules.d/90zfs/zfs-load-key.sh +%attr(755,root,root) %{dracutlibdir}/modules.d/90zfs/zfs-needshutdown.sh + +%if %{with python2} +%files -n python-pyzfs +%defattr(644,root,root,755) +%doc contrib/pyzfs/README +%{py_sitescriptdir}/libzfs_core +%{py_sitescriptdir}/pyzfs-*-py*.egg-info +%endif + +%if %{with python3} +%files -n python3-pyzfs +%defattr(644,root,root,755) +%doc contrib/pyzfs/README +%{py3_sitescriptdir}/libzfs_core +%{py3_sitescriptdir}/pyzfs-*-py*.egg-info +%endif %endif %if %{with kernel} @@ -389,6 +519,6 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %dir /usr/src/zfs-%{version} /usr/src/zfs-%{version}/include -/usr/src/zfs-%{version}/zfs.release.in -/usr/src/zfs-%{version}/zfs_config.h.in +/usr/src/zfs-%{version}/zfs.release +/usr/src/zfs-%{version}/zfs_config.h %endif