+++ /dev/null
---- fio-1.41.6/crc/crc32c-intel.c 2010-07-09 13:48:14.000000000 +0200
-+++ fio-1.41.4/crc/crc32c-intel.c 2010-06-24 10:39:02.000000000 +0200
-@@ -74,30 +74,37 @@
- return crc;
- }
-
--static void do_cpuid(unsigned int *eax, unsigned int *ebx, unsigned int *ecx,
-- unsigned int *edx)
-+static void sig_ill(int sig)
- {
-- int id = *eax;
--
-- asm("movl %4, %%eax;"
-- "cpuid;"
-- "movl %%eax, %0;"
-- "movl %%ebx, %1;"
-- "movl %%ecx, %2;"
-- "movl %%edx, %3;"
-- : "=r" (*eax), "=r" (*ebx), "=r" (*ecx), "=r" (*edx)
-- : "r" (id)
-- : "eax", "ebx", "ecx", "edx");
- }
-
--int crc32c_intel_works(void)
-+static void crc32c_test(void)
- {
-- unsigned int eax, ebx, ecx, edx;
-+ unsigned char buf[4] = { 1, 2, 3, 4 };
-+ struct sigaction act;
-+
-+ /*
-+ * Check if hw accelerated crc32c is available
-+ */
-+ memset(&act, 0, sizeof(act));
-+ act.sa_handler = sig_ill;
-+ act.sa_flags = SA_RESETHAND;
-+ sigaction(SIGILL, &act, NULL);
-
-- eax = 1;
-+ (void) crc32c_intel(buf, sizeof(buf));
-+}
-
-- do_cpuid(&eax, &ebx, &ecx, &edx);
-- return (ecx & (1 << 20)) != 0;
-+int crc32c_intel_works(void)
-+{
-+ if (!fork()) {
-+ crc32c_test();
-+ exit(0);
-+ } else {
-+ int status;
-+
-+ wait(&status);
-+ return !WIFSIGNALED(status);
-+ }
- }
-
- #endif /* ARCH_HAVE_SSE */
+# TODO: HDFS (--enable-libhdfs, requires also java), guasi, fusion-aw (nvm-primitives)
+#
+# Conditional build:
+%bcond_without ceph # RDB (CephFS) support
+%bcond_without glusterfs # GFAPI support
+%bcond_without gtk # GTK+ based GUI (gfio)
+%bcond_without numa # NUMA support
+#
Summary: I/O tool for benchmark and stress/hardware verification
Summary(pl.UTF-8): Narzędzie do mierzenia wydajności I/O i sprawdzania sprawności sprzętu
Name: fio
-Version: 2.0.3
+Version: 2.2.7
Release: 1
License: GPL v2+
-Group: Applications
+Group: Applications/System
Source0: http://brick.kernel.dk/snaps/%{name}-%{version}.tar.bz2
-# Source0-md5: e3b878ab0a4cba072d99e222d86287ed
-Patch0: %{name}-makefile.patch
-Patch1: %{name}-crc32c-intel.patch
+# Source0-md5: 0c30299c4e37cd3ae9657c2e4a363092
URL: http://git.kernel.dk/?p=fio.git;a=summary
+BuildRequires: bison
+%{?with_ceph:BuildRequires: ceph-devel}
+BuildRequires: flex
+%{?with_glusterfs:BuildRequires: glusterfs-devel}
BuildRequires: libaio-devel
+BuildRequires: libibverbs-devel
+BuildRequires: librdmacm-devel
+BuildRequires: numactl-devel
+BuildRequires: sed >= 4.0
+BuildRequires: zlib-devel
+%if %{with gtk}
+BuildRequires: cairo-devel
+BuildRequires: glib2-devel >= 2.0
+BuildRequires: gtk+2-devel >= 2:2.18.0
+BuildRequires: pkgconfig
+%endif
+# x86 features detection relies on cpuid
+ExcludeArch: i386 i486
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
rodzaje informacji o wydajności I/O. Obsługuje Linuksa, FreeBSD i
OpenSolarisa.
+%package -n gfio
+Summary: GTK+ based graphical front-end for fio
+Summary(pl.UTF-8): Oparty na GTK+ graficzny interfejs do fio
+Group: X11/Applications
+Requires: %{name} = %{version}-%{release}
+
+%description -n gfio
+gfio is a GTK+ based graphical front-end for fio. It is often
+installed on the testers workstation whereas fio would be installed on
+the server.
+
+%description -n gfio -l pl.UTF-8
+gfio to oparty na GTK+ graficzny interfejs do fio. Zwykle jest
+instalowany na komputerze testerów, podczas gdy fio jest zainstalowany
+na serwerze.
+
%prep
%setup -q
-%patch0 -p1
-%patch1 -p1
+
+%{__sed} -i -e '1s,/usr/bin/env bash,/bin/bash,' tools/genfio
+%{__sed} -i -e '1s,/usr/bin/env python,/usr/bin/python,' tools/plot/fio2gnuplot
%build
+./configure \
+ --cc="%{__cc}" \
+ --extra-cflags="%{rpmcflags} %{rpmcppflags}" \
+ %{!?with_glusterfs:--enable-gfapi} \
+ %{?with_gtk:--enable-gfio} \
+ %{!?with_numa:--disable-numa} \
+ %{!?with_ceph:--disable-rdb} \
+
%{__make} \
- CC="%{__cc}" \
- OPTFLAGS="%{rpmcflags} %{rpmcppflags}" \
LDFLAGS="%{rpmldflags}" \
V=1
%files
%defattr(644,root,root,755)
-%doc HOWTO README
-%doc examples
-%attr(755,root,root) %{_bindir}/*
-%{_mandir}/man1/fio*.1*
+%doc HOWTO MORAL-LICENSE README REPORTING-BUGS SERVER-TODO examples
+%attr(755,root,root) %{_bindir}/fio
+%attr(755,root,root) %{_bindir}/fio-btrace2fio
+%attr(755,root,root) %{_bindir}/fio-dedupe
+%attr(755,root,root) %{_bindir}/fio-genzipf
+%attr(755,root,root) %{_bindir}/fio2gnuplot
+%attr(755,root,root) %{_bindir}/fio_generate_plots
+%attr(755,root,root) %{_bindir}/genfio
+%{_datadir}/fio
+%{_mandir}/man1/fio.1*
+%{_mandir}/man1/fio2gnuplot.1*
+%{_mandir}/man1/fio_generate_plots.1*
+
+%if %{with gtk}
+%files -n gfio
+%defattr(644,root,root,755)
+%doc GFIO-TODO
+%attr(755,root,root) %{_bindir}/gfio
+%endif