[main][SPECS-EXTENDED] Fixing `fio` and `nbdkit`. (#2573)

* Configuration fixes in 'ldns' and 'iio-sensor-proxy'.

* Fixing 'nbdkit'.

* Fixing 'fio'.
This commit is contained in:
Pawel Winogrodzki 2022-03-23 12:36:48 -07:00 committed by GitHub
parent b6ddd31fdc
commit a6a6c117c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 243 additions and 85 deletions

View File

@ -0,0 +1,21 @@
[PATCH 1/2] t/io_uring: link with libaio when necessary
When CONFIG_LIBAIO is enabled, we need t/io_uring to link with it.
(libaio_LIBS only affects the aio engine, AFAICT.)
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/Makefile b/Makefile
index 5d17bca..00e7953 100644
--- a/Makefile
+++ b/Makefile
@@ -99,6 +99,7 @@ endif
ifdef CONFIG_LIBAIO
libaio_SRCS = engines/libaio.c
cmdprio_SRCS = engines/cmdprio.c
+ LIBS += -laio
libaio_LIBS = -laio
ENGINES += libaio
endif

View File

@ -0,0 +1,20 @@
[PATCH 2/2] fio: use LDFLAGS when linking dynamic engines
Without this, locally defined LDFLAGS won't be applied when
linking the dynamically loaded IO engines.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/Makefile b/Makefile
index 5d17bca..00e7953 100644
@@ -294,7 +295,7 @@ define engine_template =
$(1)_OBJS := $$($(1)_SRCS:.c=.o)
$$($(1)_OBJS): CFLAGS := -fPIC $$($(1)_CFLAGS) $(CFLAGS)
engines/fio-$(1).so: $$($(1)_OBJS)
- $$(QUIET_LINK)$(CC) -shared -rdynamic -fPIC -Wl,-soname,fio-$(1).so.1 -o $$@ $$< $$($(1)_LIBS)
+ $$(QUIET_LINK)$(CC) $(LDFLAGS) -shared -rdynamic -fPIC -Wl,-soname,fio-$(1).so.1 -o $$@ $$< $$($(1)_LIBS)
ENGS_OBJS += engines/fio-$(1).so
endef
else # !CONFIG_DYNAMIC_ENGINES

View File

@ -1,5 +1,5 @@
{
"Signatures": {
"fio-3.21.tar.bz2": "a431b61d2a4a9ff9439561ee81fd2d8c1aa85b47d63b6b2d73a65d873bd3e15a"
"fio-3.29.tar.bz2": "acffb407d14e973321ada4cf234b2840a94fff7989350cfe62142daba79e6786"
}
}

View File

@ -1,27 +1,31 @@
Vendor: Microsoft Corporation
Distribution: Mariner
Name: fio
Version: 3.21
Release: 2%{?dist}
Version: 3.29
Release: 1%{?dist}
Summary: Multithreaded IO generation tool
License: GPLv2
Vendor: Microsoft Corporation
Distribution: Mariner
URL: http://git.kernel.dk/?p=fio.git;a=summary
Source: http://brick.kernel.dk/snaps/%{name}-%{version}.tar.bz2
Source0: http://brick.kernel.dk/snaps/%{name}-%{version}.tar.bz2
Patch0: fio-3.29-link-t-io_uring-with-libaio.patch
Patch1: fio-3.29-use-LDFLAGS-for-dynamic-engines.patch
BuildRequires: gcc
BuildRequires: gnupg2
BuildRequires: libaio-devel
BuildRequires: zlib-devel
BuildRequires: python3-devel
BuildRequires: libnbd-devel
BuildRequires: libcurl-devel
BuildRequires: openssl-devel
%ifarch x86_64
%ifarch x86_64 ppc64le
BuildRequires: libpmem-devel
BuildRequires: libpmemblk-devel
%endif
%ifnarch %{arm} i686
%ifnarch %{arm} %{ix86} ppc64le
BuildRequires: librbd1-devel
%endif
@ -29,6 +33,30 @@ BuildRequires: librbd1-devel
BuildRequires: numactl-devel
BuildRequires: librdmacm-devel
%endif
BuildRequires: make
# Don't create automated dependencies for the fio engines.
# https://bugzilla.redhat.com/show_bug.cgi?id=1884954
%global __provides_exclude_from ^%{_libdir}/fio/
# Main fio package has soft dependencies on all the engine
# subpackages, but allows the engines to be uninstalled if not needed
# or if the dependencies are too onerous.
Recommends: %{name}-engine-libaio
Recommends: %{name}-engine-http
Recommends: %{name}-engine-nbd
%ifarch x86-64 ppc64le
Recommends: %{name}-engine-dev-dax
Recommends: %{name}-engine-pmemblk
Recommends: %{name}-engine-libpmem
%endif
%ifnarch %{arm} %{ix86} ppc64le
Recommends: %{name}-engine-rados
Recommends: %{name}-engine-rbd
%endif
%ifnarch %{arm}
Recommends: %{name}-engine-rdma
%endif
%description
fio is an I/O tool that will spawn a number of threads or processes doing
@ -38,8 +66,87 @@ otherwise parameters given to them overriding that setting is given.
The typical use of fio is to write a job file matching the io load
one wants to simulate.
%package engine-libaio
Summary: Linux libaio engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description engine-libaio
Linux libaio engine for %{name}.
%package engine-http
Summary: HTTP engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description engine-http
HTTP engine for %{name}.
%package engine-nbd
Summary: Network Block Device engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description engine-nbd
Network Block Device (NBD) engine for %{name}.
%ifarch x86_64 ppc64le
%package engine-dev-dax
Summary: PMDK dev-dax engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description engine-dev-dax
dev-dax engine for %{name}.
Read and write using device DAX to a persistent memory device
(e.g., /dev/dax0.0) through the PMDK libpmem library.
%endif
%ifarch x86_64 ppc64le
%package engine-pmemblk
Summary: PMDK pmemblk engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description engine-pmemblk
pmemblk engine for %{name}.
Read and write using filesystem DAX to a file on a filesystem mounted with
DAX on a persistent memory device through the PMDK libpmemblk library.
%endif
%ifarch x86_64 ppc64le
%package engine-libpmem
Summary: PMDK pmemblk engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description engine-libpmem
libpmem engine for %{name}.
Read and write using mmap I/O to a file on a filesystem mounted with DAX
on a persistent memory device through the PMDK libpmem library.
%endif
%ifnarch %{arm} %{ix86} ppc64le
%package engine-rados
Summary: Rados engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description engine-rados
Rados engine for %{name}.
%package engine-rbd
Summary: Rados Block Device engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description engine-rbd
Rados Block Device (RBD) engine for %{name}.
%endif
%ifnarch %{arm}
%package engine-rdma
Summary: RDMA engine for %{name}.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description engine-rdma
RDMA engine for %{name}.
%endif
%prep
%setup -q
%autosetup -p1
pathfix.py -i %{__python3} -pn \
tools/fio_jsonplus_clat2csv \
@ -48,22 +155,68 @@ pathfix.py -i %{__python3} -pn \
tools/plot/fio2gnuplot \
t/steadystate_tests.py
# Edit /usr/local/lib path in os/os-linux.h to match Mariner conventions.
sed -e 's,/usr/local/lib/,%{_libdir}/,g' -i os/os-linux.h
%build
./configure --disable-optimizations --enable-libnbd
./configure --disable-optimizations --enable-libnbd --dynamic-libengines
EXTFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" make V=1 %{?_smp_mflags}
%install
make install prefix=%{_prefix} mandir=%{_mandir} DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
make install prefix=%{_prefix} mandir=%{_mandir} libdir=%{_libdir}/fio DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
%files
%doc README REPORTING-BUGS COPYING HOWTO examples
%doc MORAL-LICENSE GFIO-TODO SERVER-TODO STEADYSTATE-TODO
%license COPYING MORAL-LICENSE
%doc README REPORTING-BUGS HOWTO examples
%doc GFIO-TODO SERVER-TODO STEADYSTATE-TODO
%dir %{_datadir}/%{name}
%dir %{_libdir}/fio/
%{_bindir}/*
%{_mandir}/man1/*
%{_datadir}/%{name}/*
%ifarch x86_64 ppc64le
%files engine-dev-dax
%{_libdir}/fio/fio-dev-dax.so
%endif
%files engine-http
%{_libdir}/fio/fio-http.so
%files engine-libaio
%{_libdir}/fio/fio-libaio.so
%ifarch x86_64 ppc64le
%files engine-libpmem
%{_libdir}/fio/fio-libpmem.so
%endif
%files engine-nbd
%{_libdir}/fio/fio-nbd.so
%ifarch x86_64 ppc64le
%files engine-pmemblk
%{_libdir}/fio/fio-pmemblk.so
%endif
%ifnarch %{arm} %{ix86} ppc64le
%files engine-rados
%{_libdir}/fio/fio-rados.so
%files engine-rbd
%{_libdir}/fio/fio-rbd.so
%endif
%ifnarch %{arm}
%files engine-rdma
%{_libdir}/fio/fio-rdma.so
%endif
%changelog
* Tue Mar 22 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 3.29-1
- Updating to version 3.29 using Fedora 36 specs (license: MIT) as guidance.
- License verified.
* Fri Oct 15 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 3.21-2
- Initial CBL-Mariner import from Fedora 32 (license: MIT).

View File

@ -2,7 +2,7 @@ Vendor: Microsoft Corporation
Distribution: Mariner
Name: iio-sensor-proxy
Version: 3.0
Release: 3%{?dist}
Release: 4%{?dist}
Summary: IIO accelerometer sensor to input device proxy
License: GPLv3+
@ -35,9 +35,8 @@ This package contains the documentation for %{name}.
%build
%configure \
--disable-silent-rules \
--disable-gtk-doc \
--disable-gtk-tests \ # not really interested in sample progs
%{nil}
--disable-gtk-doc \
--disable-gtk-tests
%make_build
%install
@ -67,6 +66,9 @@ This package contains the documentation for %{name}.
%{_datadir}/gtk-doc/html/%{name}/
%changelog
* Tue Mar 22 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 3.0-4
- Fixing configuration step in %%build.
* Mon Mar 21 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 3.0-3
- Adding BR on '%%{_bindir}/xsltproc'.
- Disabled gtk doc generation to remove network dependency during build-time.

View File

@ -4,25 +4,18 @@ Distribution: Mariner
%bcond_without python3
%bcond_with python2
%bcond_without perl
%bcond_without ecdsa
%bcond_without eddsa
%bcond_without dane_ta
# GOST is not allowed in Fedora/RHEL due to legal reasons (not NIST ECC)
%bcond_with gost
%{?!snapshot: %global snapshot 0}
%if %{with python2} || %{with python3}
%if %{with python3}
%{?filter_setup:
%global _ldns_internal_filter /^_ldns[.]so.*/d;
%filter_from_requires %{_ldns_internal_filter}
@ -41,7 +34,7 @@ Distribution: Mariner
Summary: Low-level DNS(SEC) library with API
Name: ldns
Version: 1.7.0
Release: 30%{?dist}
Release: 31%{?dist}
License: BSD
Url: http://www.nlnetlabs.nl/%{name}/
@ -70,9 +63,6 @@ BuildRequires: doxygen
# for snapshots only
# BuildRequires: libtool, autoconf, automake
%if %{with python2}
BuildRequires: python2-devel, swig
%endif
%if %{with python3}
BuildRequires: python3-devel, swig
%endif
@ -106,17 +96,6 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
Collection of tools to get, check or alter DNS(SEC) data.
%if %{with python2}
%package -n python2-ldns
Summary: Python2 extensions for ldns
Requires: %{name}%{?_isa} = %{version}-%{release}
%{?python_provide:%python_provide python2-ldns}
%description -n python2-ldns
Python2 extensions for ldns
%endif
%if %{with python3}
%package -n python3-ldns
Summary: Python3 extensions for ldns
@ -176,10 +155,6 @@ popd
mv %{pkgname} %{pkgname}_python3
%endif
%if %{with python2}
cp -a %{pkgname}_python3 %{pkgname}_python2
%endif # with python2
%build
CFLAGS="%{optflags} -fPIC"
@ -209,15 +184,6 @@ export CFLAGS CXXFLAGS LDFLAGS
%global disable_dane_ta --disable-dane-ta-usage
%endif
%global common_args \\\
--disable-rpath \\\
%{enable_gost} %{enable_ecdsa} %{enable_eddsa} %{?disable_dane_ta} \\\
--with-ca-file=/etc/pki/tls/certs/ca-bundle.trust.crt \\\
--with-ca-path=/etc/pki/tls/certs/ \\\
--with-trust-anchor=%{_sharedstatedir}/unbound/root.key \\\
--disable-static \\\
%if 0%{with python3}
pushd %{pkgname}_python3
%else
@ -225,7 +191,11 @@ pushd %{pkgname}
%endif # with python3
%configure \
%{common_args} \
--disable-rpath \
%{enable_gost} %{enable_ecdsa} %{enable_eddsa} %{?disable_dane_ta} \
--with-ca-file=/etc/pki/tls/certs/ca-bundle.trust.crt \
--with-ca-path=/etc/pki/tls/certs/ \
--disable-static \
--with-examples \
--with-drill \
%if %{with python3}
@ -248,18 +218,6 @@ make %{?_smp_mflags} doc
sed -i "s~$RPM_LD_FLAGS~~" packaging/ldns-config
popd
%if %{with python2}
pushd %{pkgname}_python2
%configure \
%{common_args} \
--with-pyldns PYTHON=%{__python2}
make %{?_smp_mflags}
popd
%endif
%install
rm -rf %{buildroot}
@ -287,13 +245,6 @@ install -D -m644 packaging/libldns.pc %{buildroot}%{_libdir}/pkgconfig/ldns.pc
%endif
popd
%if %{with python2}
pushd %{pkgname}_python2
make DESTDIR=%{buildroot} INSTALL="%{__install} -p" install-pyldns install-pyldnsx
rm -rf %{buildroot}%{_libdir}/*.la %{buildroot}%{python2_sitearch}/*.la
popd
%endif
# don't package xml files
rm doc/*.xml
# don't package building script for install-doc in doc section
@ -325,13 +276,6 @@ rm -rf doc/man
%{_includedir}/ldns/*.h
%{_mandir}/man3/*.3.gz
%if %{with python2}
%files -n python2-ldns
%doc %{pkgname}_python2/contrib/python/Changelog README.ldnsx
%license LICENSE.ldnsx
%{python2_sitearch}/*
%endif
%if %{with python3}
%files -n python3-ldns
%doc %{pkgname}_python3/contrib/python/Changelog README.ldnsx
@ -350,6 +294,12 @@ rm -rf doc/man
%doc doc
%changelog
* Tue Mar 22 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.7.0-31
- Fixing configuration step in %%build.
- Removing content related to Python 2 builds.
- Removed config option to trust "*unbound/root.key".
- License verified.
* Fri Oct 15 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.7.0-30
- Initial CBL-Mariner import from Fedora 32 (license: MIT).

View File

@ -1,3 +1,5 @@
%bcond_with ruby
Vendor: Microsoft Corporation
Distribution: Mariner
%global _hardened_build 1
@ -37,7 +39,7 @@ ExclusiveArch: x86_64
Name: nbdkit
Version: 1.20.7
Release: 3%{?dist}
Release: 4%{?dist}
Summary: NBD server
License: BSD
@ -75,7 +77,9 @@ BuildRequires: python3-devel
# http://caml.inria.fr/mantis/view.php?id=6693
BuildRequires: ocaml >= 4.02.2
%endif
%if %{with ruby}
BuildRequires: ruby-devel
%endif
BuildRequires: tcl-devel
BuildRequires: lua-devel
@ -359,7 +363,7 @@ Requires: %{name}-server%{?_isa} = %{version}-%{release}
%description python-plugin
This package lets you write Python 3 plugins for %{name}.
%if %{with ruby}
%package ruby-plugin
Summary: Ruby plugin for %{name}
License: BSD
@ -369,6 +373,7 @@ Requires: %{name}-server%{?_isa} = %{version}-%{release}
%description ruby-plugin
This package lets you write Ruby plugins for %{name}.
%endif
%package ssh-plugin
@ -600,6 +605,9 @@ autoreconf -i
PYTHON=%{_bindir}/python3 \
--disable-static \
--disable-golang \
%if !%{with ruby}
--disable-ruby \
%endif
%if 0%{?have_ocaml}
--enable-ocaml \
%else
@ -815,12 +823,13 @@ make %{?_smp_mflags} check || {
%{_libdir}/%{name}/plugins/nbdkit-python-plugin.so
%{_mandir}/man3/nbdkit-python-plugin.3*
%if %{with ruby}
%files ruby-plugin
%doc README
%license LICENSE
%{_libdir}/%{name}/plugins/nbdkit-ruby-plugin.so
%{_mandir}/man3/nbdkit-ruby-plugin.3*
%endif
%files ssh-plugin
@ -960,6 +969,9 @@ make %{?_smp_mflags} check || {
%changelog
* Tue Mar 22 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.20.7-4
- Disabling plug-in for Ruby due to building issues.
* Fri Jan 21 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.20.7-3
- Removing in-spec verification of source tarballs.
- License verified.

View File

@ -3638,8 +3638,8 @@
"type": "other",
"other": {
"name": "fio",
"version": "3.21",
"downloadUrl": "http://brick.kernel.dk/snaps/fio-3.21.tar.bz2"
"version": "3.29",
"downloadUrl": "http://brick.kernel.dk/snaps/fio-3.29.tar.bz2"
}
}
},