Allow building without nbd, rbd or rados
Building with `--without=nbd` (or similar for rbd, rados) will disable the nbd, rbd or rados engines respectively.
This commit is contained in:
parent
beba725cbc
commit
c6e3dd59ea
34
fio.spec
34
fio.spec
@ -1,6 +1,6 @@
|
|||||||
Name: fio
|
Name: fio
|
||||||
Version: 3.32
|
Version: 3.32
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Multithreaded IO generation tool
|
Summary: Multithreaded IO generation tool
|
||||||
|
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
@ -9,13 +9,18 @@ Source0: http://brick.kernel.dk/snaps/%{name}-%{version}.tar.bz2
|
|||||||
Source1: https://brick.kernel.dk/snaps/%{name}-%{version}.tar.bz2.asc
|
Source1: https://brick.kernel.dk/snaps/%{name}-%{version}.tar.bz2.asc
|
||||||
Source2: https://git.kernel.org/pub/scm/docs/kernel/pgpkeys.git/plain/keys/F7D358FB2971E0A6.asc
|
Source2: https://git.kernel.org/pub/scm/docs/kernel/pgpkeys.git/plain/keys/F7D358FB2971E0A6.asc
|
||||||
|
|
||||||
|
%bcond nbd 1
|
||||||
|
%bcond rbd 1
|
||||||
|
%bcond rados 1
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: gnupg2
|
BuildRequires: gnupg2
|
||||||
BuildRequires: libaio-devel
|
BuildRequires: libaio-devel
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
|
%if %{with nbd}
|
||||||
BuildRequires: libnbd-devel
|
BuildRequires: libnbd-devel
|
||||||
|
%endif
|
||||||
BuildRequires: libcurl-devel
|
BuildRequires: libcurl-devel
|
||||||
BuildRequires: openssl-devel
|
BuildRequires: openssl-devel
|
||||||
%ifarch x86_64 ppc64le
|
%ifarch x86_64 ppc64le
|
||||||
@ -24,8 +29,10 @@ BuildRequires: libpmemblk-devel
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifnarch %{arm} %{ix86} ppc64le
|
%ifnarch %{arm} %{ix86} ppc64le
|
||||||
|
%if %{with rbd}
|
||||||
BuildRequires: librbd1-devel
|
BuildRequires: librbd1-devel
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
%ifnarch %{arm}
|
%ifnarch %{arm}
|
||||||
BuildRequires: numactl-devel
|
BuildRequires: numactl-devel
|
||||||
@ -42,16 +49,22 @@ BuildRequires: make
|
|||||||
# or if the dependencies are too onerous.
|
# or if the dependencies are too onerous.
|
||||||
Recommends: %{name}-engine-libaio
|
Recommends: %{name}-engine-libaio
|
||||||
Recommends: %{name}-engine-http
|
Recommends: %{name}-engine-http
|
||||||
|
%if %{with nbd}
|
||||||
Recommends: %{name}-engine-nbd
|
Recommends: %{name}-engine-nbd
|
||||||
|
%endif
|
||||||
%ifarch x86-64 ppc64le
|
%ifarch x86-64 ppc64le
|
||||||
Recommends: %{name}-engine-dev-dax
|
Recommends: %{name}-engine-dev-dax
|
||||||
Recommends: %{name}-engine-pmemblk
|
Recommends: %{name}-engine-pmemblk
|
||||||
Recommends: %{name}-engine-libpmem
|
Recommends: %{name}-engine-libpmem
|
||||||
%endif
|
%endif
|
||||||
%ifnarch %{arm} %{ix86} ppc64le
|
%ifnarch %{arm} %{ix86} ppc64le
|
||||||
|
%if %{with rados}
|
||||||
Recommends: %{name}-engine-rados
|
Recommends: %{name}-engine-rados
|
||||||
|
%endif
|
||||||
|
%if %{with rbd}
|
||||||
Recommends: %{name}-engine-rbd
|
Recommends: %{name}-engine-rbd
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%ifnarch %{arm}
|
%ifnarch %{arm}
|
||||||
Recommends: %{name}-engine-rdma
|
Recommends: %{name}-engine-rdma
|
||||||
%endif
|
%endif
|
||||||
@ -78,12 +91,14 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
|||||||
%description engine-http
|
%description engine-http
|
||||||
HTTP engine for %{name}.
|
HTTP engine for %{name}.
|
||||||
|
|
||||||
|
%if %{with nbd}
|
||||||
%package engine-nbd
|
%package engine-nbd
|
||||||
Summary: Network Block Device engine for %{name}.
|
Summary: Network Block Device engine for %{name}.
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description engine-nbd
|
%description engine-nbd
|
||||||
Network Block Device (NBD) engine for %{name}.
|
Network Block Device (NBD) engine for %{name}.
|
||||||
|
%endif
|
||||||
|
|
||||||
%ifarch x86_64 ppc64le
|
%ifarch x86_64 ppc64le
|
||||||
%package engine-dev-dax
|
%package engine-dev-dax
|
||||||
@ -119,13 +134,16 @@ on a persistent memory device through the PMDK libpmem library.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifnarch %{arm} %{ix86} ppc64le
|
%ifnarch %{arm} %{ix86} ppc64le
|
||||||
|
%if %{with rados}
|
||||||
%package engine-rados
|
%package engine-rados
|
||||||
Summary: Rados engine for %{name}.
|
Summary: Rados engine for %{name}.
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description engine-rados
|
%description engine-rados
|
||||||
Rados engine for %{name}.
|
Rados engine for %{name}.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with rbd}
|
||||||
%package engine-rbd
|
%package engine-rbd
|
||||||
Summary: Rados Block Device engine for %{name}.
|
Summary: Rados Block Device engine for %{name}.
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
@ -133,6 +151,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
|||||||
%description engine-rbd
|
%description engine-rbd
|
||||||
Rados Block Device (RBD) engine for %{name}.
|
Rados Block Device (RBD) engine for %{name}.
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
%ifnarch %{arm}
|
%ifnarch %{arm}
|
||||||
%package engine-rdma
|
%package engine-rdma
|
||||||
@ -158,7 +177,11 @@ pathfix.py -i %{__python3} -pn \
|
|||||||
sed -e 's,/usr/local/lib/,%{_libdir}/,g' -i os/os-linux.h
|
sed -e 's,/usr/local/lib/,%{_libdir}/,g' -i os/os-linux.h
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if %{with nbd}
|
||||||
./configure --disable-optimizations --enable-libnbd --dynamic-libengines
|
./configure --disable-optimizations --enable-libnbd --dynamic-libengines
|
||||||
|
%else
|
||||||
|
./configure --disable-optimizations --dynamic-libengines
|
||||||
|
%endif
|
||||||
EXTFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" make V=1 %{?_smp_mflags}
|
EXTFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" make V=1 %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -190,8 +213,10 @@ make install prefix=%{_prefix} mandir=%{_mandir} libdir=%{_libdir}/fio DESTDIR=$
|
|||||||
%{_libdir}/fio/fio-libpmem.so
|
%{_libdir}/fio/fio-libpmem.so
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{with nbd}
|
||||||
%files engine-nbd
|
%files engine-nbd
|
||||||
%{_libdir}/fio/fio-nbd.so
|
%{_libdir}/fio/fio-nbd.so
|
||||||
|
%endif
|
||||||
|
|
||||||
%ifarch x86_64 ppc64le
|
%ifarch x86_64 ppc64le
|
||||||
%files engine-pmemblk
|
%files engine-pmemblk
|
||||||
@ -199,12 +224,16 @@ make install prefix=%{_prefix} mandir=%{_mandir} libdir=%{_libdir}/fio DESTDIR=$
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifnarch %{arm} %{ix86} ppc64le
|
%ifnarch %{arm} %{ix86} ppc64le
|
||||||
|
%if %{with rados}
|
||||||
%files engine-rados
|
%files engine-rados
|
||||||
%{_libdir}/fio/fio-rados.so
|
%{_libdir}/fio/fio-rados.so
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with rbd}
|
||||||
%files engine-rbd
|
%files engine-rbd
|
||||||
%{_libdir}/fio/fio-rbd.so
|
%{_libdir}/fio/fio-rbd.so
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
%ifnarch %{arm}
|
%ifnarch %{arm}
|
||||||
%files engine-rdma
|
%files engine-rdma
|
||||||
@ -212,6 +241,9 @@ make install prefix=%{_prefix} mandir=%{_mandir} libdir=%{_libdir}/fio DESTDIR=$
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Sep 07 2022 Amit Shah <amitshah@fedoraproject.org> - 3.32-2
|
||||||
|
- Allow building without nbd, rbd, rados support
|
||||||
|
|
||||||
* Wed Sep 07 2022 Davide Cavalca <dcavalca@fedoraproject.org> - 3.32-1
|
* Wed Sep 07 2022 Davide Cavalca <dcavalca@fedoraproject.org> - 3.32-1
|
||||||
- New upstream version (RHBZ#2033897)
|
- New upstream version (RHBZ#2033897)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user