X-Git-Url: http://git.pld-linux.org/?p=packages%2Fzfs.git;a=blobdiff_plain;f=zfs.spec;h=3034720fed79ca3301cfdbc1a50e4e86ffc18322;hp=c87afb321eb1893a1243a7825bf282367e6d7541;hb=597c77d;hpb=48f0bf0d77f0159959b0d92fdde3a7a836738af1 diff --git a/zfs.spec b/zfs.spec index c87afb3..3034720 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 @@ -31,32 +33,53 @@ exit 1 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.7.5 +Version: 0.8.4 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: 51c5dbef614120029491534375a5dd43 -Patch0: %{pname}-link.patch -Patch1: x32.patch -Patch2: xattr-in-glibc.patch -Patch3: randstruct.patch -URL: http://zfsonlinux.org/ +Source0: https://github.com/openzfs/zfs/releases/download/zfs-%{version}/%{pname}-%{version}.tar.gz +# Source0-md5: f0c203c59c4fcd44187a64758707469f +Patch0: x32.patch +Patch1: am.patch +Patch2: %{pname}-sh.patch +Patch3: link.patch +Patch4: kernel-5.8.patch +URL: https://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 @@ -132,10 +155,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. @@ -167,6 +217,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},\ @@ -178,20 +229,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)\ @@ -225,6 +278,15 @@ p=`pwd`\ %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 + +%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python2(\s|$),#!%{__python}\1,' \ + cmd/arc_summary/arc_summary2 + +%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \ + cmd/arc_summary/arc_summary3 \ + cmd/arcstat/arcstat \ + cmd/dbufstat/dbufstat %build %{__libtoolize} @@ -237,14 +299,29 @@ p=`pwd`\ %if %{with userspace} %configure \ --disable-silent-rules \ + --enable-systemd \ --with-config="user" \ --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 @@ -253,6 +330,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} @@ -260,9 +339,33 @@ 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* @@ -278,19 +381,19 @@ 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) %{_bindir}/zvol_wait %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 @@ -308,14 +411,18 @@ rm -rf $RPM_BUILD_ROOT %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.service %{systemdunitdir}/zfs-import.target %{systemdunitdir}/zfs-import-cache.service %{systemdunitdir}/zfs-import-scan.service %{systemdunitdir}/zfs-mount.service %{systemdunitdir}/zfs-share.service +%{systemdunitdir}/zfs-volume-wait.service +%{systemdunitdir}/zfs-volumes.target %{systemdunitdir}/zfs-zed.service %attr(755,root,root) /lib/udev/vdev_id %attr(755,root,root) /lib/udev/zvol_id @@ -329,15 +436,10 @@ rm -rf $RPM_BUILD_ROOT %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}/man1/zvol_wait.1* +%{_mandir}/man5/spl-module-parameters.5* %{_mandir}/man5/vdev_id.conf.5* %{_mandir}/man5/zfs-events.5* %{_mandir}/man5/zfs-module-parameters.5* @@ -348,6 +450,8 @@ 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* @@ -401,9 +505,27 @@ rm -rf $RPM_BUILD_ROOT %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} @@ -411,6 +533,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