summaryrefslogtreecommitdiff
path: root/sys-block/fio
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-09-10 04:21:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-09-10 04:21:55 +0100
commit677b7ba5c317778df2ad7e70df94b9b7eec4adbc (patch)
tree6c418a1546fff5becab5d8b9ed6803323e7f316e /sys-block/fio
parentfbda87924e6faa7a1919f1a2b4182490bde5ec5c (diff)
gentoo resync : 10.09.2021
Diffstat (limited to 'sys-block/fio')
-rw-r--r--sys-block/fio/Manifest4
-rw-r--r--sys-block/fio/files/fio-2.2.13-libmtd.patch5
-rw-r--r--sys-block/fio/files/fio-3.27-drop-raw.patch118
-rw-r--r--sys-block/fio/fio-3.27-r1.ebuild155
4 files changed, 278 insertions, 4 deletions
diff --git a/sys-block/fio/Manifest b/sys-block/fio/Manifest
index 9ce6b8a3322f..a840596a38a7 100644
--- a/sys-block/fio/Manifest
+++ b/sys-block/fio/Manifest
@@ -1,4 +1,6 @@
-AUX fio-2.2.13-libmtd.patch 398 BLAKE2B b1519ed240879f1260e3f5859c9cada3f41161457b7e06e5e764ac3a6656c3a6439fb5f0380cf90bbd6f2133f25e80419e108d725ea4672adfdd976bee94846f SHA512 18792d4ea3dbc2664d9e24541a07d82a50cd60bb7ff2d14bcdadd2207341c003ad2d298d99d65fd72c88813073b17d03a710a50db4df52ee72d49d9e9bcfe400
+AUX fio-2.2.13-libmtd.patch 238 BLAKE2B da7843b4cb2b0fda12c2e950d4b51df661f229eb01b16b5a9d2a5d5e59b15f6c25d9865e607be8e1a86329964e2eb116ce0d1855dd1a80c156650db1ad5a3690 SHA512 66c905a79a78baaea0864d4fbf2432edfb2d98f2262ad638431d591154b1f8214dbc2ae6fed9cddd3cb4684932c830cc7402dc0a4c6b429dd955bb1a1f929f1a
+AUX fio-3.27-drop-raw.patch 3315 BLAKE2B 93cfc730e2feceae2cc20c76b93a4e1da2a6b0c8a3b3ba3231208d0074612a9a4e5836108aedb9dff03db61977c354a2fe1b2bf35c4e975b6e302a0357b78852 SHA512 67589a42e65be3821aac5043b910d589f735abb98d8b107ca9fc020d9c10b4c20f82b2e3dc9622d1f8b8ead5b69cc459470136c2d942a5690c7fdefebf57ecee
DIST fio-3.27.tar.bz2 960330 BLAKE2B 7e7e01a5c1d6af13a6f87139e7738646cbc8f45ebc370d0c45b9efe1f93778613d374daafc6df459f988f27f2be54ff636235e1e5a92a4a6ecf9a60ed573d170 SHA512 9c5f2ab0c9ac24ab78dbc74fb6c5acd60f8189fdc618f4280992141b6c0abe1c235c373fee18ad0c803e7fb25d480f45aec56dc3be2e0d26d181b3418b179f99
+EBUILD fio-3.27-r1.ebuild 4354 BLAKE2B ea0784ca49ebb52cfa41337014f068ce55345dfd75fa0a9621fc2871d70958441c877e2ce23c46e61fcdf3f4cfce2eb205695048dd8987a18a445703434c1061 SHA512 831c2bd615d2586e5896a7ba26282c055ca2469d8c152fedac665559c60785f3258637ff094118f3d4f3fceb75d46275f046b0f89e6b2852b72a7a22fd299331
EBUILD fio-3.27.ebuild 4248 BLAKE2B 3ce690dfcc7de7f55325128cd8e51d04b80226e8cdcf3811739b5dc4098b26894b4be622d45d05dc3966bb07e0692ff565699b44592e4cbf44ee134c3541bea4 SHA512 6202649f094e30df45cd9e40080c6dede7bf9ea59e69d91fb236c504c045c6e74f357569b2579d048a8f50b759ab26cdf545229c328607c5d89a416a9b1d792e
MISC metadata.xml 1172 BLAKE2B e35bbaaa15c8cd095791a4a23a7344314a015ea42bb864b11bb165d340585ee667f969426282465b834a7d092ab6885736e55ec8d4fe950001fbb6336fdfdc14 SHA512 defbc7f932a5ab83b67da58a601ef62784b27f2268f8a8dd5057c02fb441b164bd0945217fa52a0e06803c74b5168dda3b4668de52f593d5cade428bd2f79e86
diff --git a/sys-block/fio/files/fio-2.2.13-libmtd.patch b/sys-block/fio/files/fio-2.2.13-libmtd.patch
index 7ab9a96c25e3..9581def526e1 100644
--- a/sys-block/fio/files/fio-2.2.13-libmtd.patch
+++ b/sys-block/fio/files/fio-2.2.13-libmtd.patch
@@ -1,6 +1,5 @@
-diff -Nuar --exclude config.log fio-2.2.13/oslib/libmtd.h fio-2.2.13.new/oslib/libmtd.h
---- fio-2.2.13/oslib/libmtd.h 2016-01-26 18:02:07.000000000 -0800
-+++ fio-2.2.13.new/oslib/libmtd.h 2016-02-03 08:10:19.104693006 -0800
+--- fio-2.2.13/oslib/libmtd.h
++++ fio-2.2.13.new/oslib/libmtd.h
@@ -29,6 +29,8 @@
extern "C" {
#endif
diff --git a/sys-block/fio/files/fio-3.27-drop-raw.patch b/sys-block/fio/files/fio-3.27-drop-raw.patch
new file mode 100644
index 000000000000..1c9f8671d12e
--- /dev/null
+++ b/sys-block/fio/files/fio-3.27-drop-raw.patch
@@ -0,0 +1,118 @@
+https://github.com/axboe/fio/commit/382975557e632efb506836bc1709789e615c9094.patch
+
+Fixes build with >=sys-kernel/linux-headers-5.14.
+
+From: Eric Sandeen <esandeen@redhat.com>
+Date: Tue, 3 Aug 2021 10:23:35 -0700
+Subject: [PATCH] fio: remove raw device support
+
+As of Linux kernel commit 603e4922f1c ("remove the raw driver"),
+linux/raw.h is gone, and raw device support no longer exists.
+Because of this, fio can no longer build against the current Linux
+kernel headers.
+
+So, remove raw device support from fio as well.
+
+Signed-off-by: Eric Sandeen <sandeen@redhat.com>
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+--- a/diskutil.c
++++ b/diskutil.c
+@@ -166,14 +166,10 @@ static int get_device_numbers(char *file_name, int *maj, int *min)
+ if (S_ISBLK(st.st_mode)) {
+ majdev = major(st.st_rdev);
+ mindev = minor(st.st_rdev);
+- } else if (S_ISCHR(st.st_mode)) {
+- majdev = major(st.st_rdev);
+- mindev = minor(st.st_rdev);
+- if (fio_lookup_raw(st.st_rdev, &majdev, &mindev))
+- return -1;
+- } else if (S_ISFIFO(st.st_mode))
++ } else if (S_ISCHR(st.st_mode) ||
++ S_ISFIFO(st.st_mode)) {
+ return -1;
+- else {
++ } else {
+ majdev = major(st.st_dev);
+ mindev = minor(st.st_dev);
+ }
+--- a/fio.1
++++ b/fio.1
+@@ -1700,9 +1700,7 @@ Sets size to something really large and waits for ENOSPC (no space left on
+ device) or EDQUOT (disk quota exceeded)
+ as the terminating condition. Only makes sense with sequential
+ write. For a read workload, the mount point will be filled first then I/O
+-started on the result. This option doesn't make sense if operating on a raw
+-device node, since the size of that is already known by the file system.
+-Additionally, writing beyond end-of-device will not return ENOSPC there.
++started on the result.
+ .SS "I/O engine"
+ .TP
+ .BI ioengine \fR=\fPstr
+--- a/os/os-linux.h
++++ b/os/os-linux.h
+@@ -14,7 +14,6 @@
+ #include <errno.h>
+ #include <sched.h>
+ #include <linux/unistd.h>
+-#include <linux/raw.h>
+ #include <linux/major.h>
+ #include <linux/fs.h>
+ #include <scsi/sg.h>
+@@ -41,7 +40,6 @@
+ #define FIO_HAVE_IOSCHED_SWITCH
+ #define FIO_HAVE_ODIRECT
+ #define FIO_HAVE_HUGETLB
+-#define FIO_HAVE_RAWBIND
+ #define FIO_HAVE_BLKTRACE
+ #define FIO_HAVE_CL_SIZE
+ #define FIO_HAVE_CGROUPS
+@@ -178,36 +176,6 @@ static inline unsigned long long os_phys_mem(void)
+ return (unsigned long long) pages * (unsigned long long) pagesize;
+ }
+
+-static inline int fio_lookup_raw(dev_t dev, int *majdev, int *mindev)
+-{
+- struct raw_config_request rq;
+- int fd;
+-
+- if (major(dev) != RAW_MAJOR)
+- return 1;
+-
+- /*
+- * we should be able to find /dev/rawctl or /dev/raw/rawctl
+- */
+- fd = open("/dev/rawctl", O_RDONLY);
+- if (fd < 0) {
+- fd = open("/dev/raw/rawctl", O_RDONLY);
+- if (fd < 0)
+- return 1;
+- }
+-
+- rq.raw_minor = minor(dev);
+- if (ioctl(fd, RAW_GETBIND, &rq) < 0) {
+- close(fd);
+- return 1;
+- }
+-
+- close(fd);
+- *majdev = rq.block_major;
+- *mindev = rq.block_minor;
+- return 0;
+-}
+-
+ #ifdef O_NOATIME
+ #define FIO_O_NOATIME O_NOATIME
+ #else
+--- a/os/os.h
++++ b/os/os.h
+@@ -157,10 +157,6 @@ extern int fio_cpus_split(os_cpu_mask_t *mask, unsigned int cpu);
+ #define OS_RAND_MAX RAND_MAX
+ #endif
+
+-#ifndef FIO_HAVE_RAWBIND
+-#define fio_lookup_raw(dev, majdev, mindev) 1
+-#endif
+-
+ #ifndef FIO_PREFERRED_ENGINE
+ #define FIO_PREFERRED_ENGINE "psync"
+ #endif
diff --git a/sys-block/fio/fio-3.27-r1.ebuild b/sys-block/fio/fio-3.27-r1.ebuild
new file mode 100644
index 000000000000..21af46927775
--- /dev/null
+++ b/sys-block/fio/fio-3.27-r1.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit python-r1 toolchain-funcs
+
+MY_PV="${PV/_rc/-rc}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Jens Axboe's Flexible IO tester"
+HOMEPAGE="https://brick.kernel.dk/snaps/"
+SRC_URI="https://brick.kernel.dk/snaps/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86"
+IUSE="aio curl glusterfs gnuplot gtk io-uring numa python rbd rdma static tcmalloc test zbc zlib"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
+ gnuplot? ( python )
+ io-uring? ( aio )"
+RESTRICT="!test? ( test )"
+
+BDEPEND="virtual/pkgconfig"
+
+# GTK+:2 does not offer static libaries.
+LIB_DEPEND="aio? ( dev-libs/libaio[static-libs(+)] )
+ curl? (
+ net-misc/curl:=[static-libs(+)]
+ dev-libs/openssl:0=[static-libs(+)]
+ )
+ glusterfs? ( sys-cluster/glusterfs[static-libs(+)] )
+ gtk? ( dev-libs/glib:2[static-libs(+)] )
+ io-uring? ( sys-libs/liburing:=[static-libs(+)] )
+ numa? ( sys-process/numactl[static-libs(+)] )
+ rbd? ( sys-cluster/ceph[static-libs(+)] )
+ rdma? (
+ sys-fabric/libibverbs[static-libs(+)]
+ sys-fabric/librdmacm[static-libs(+)]
+ )
+ tcmalloc? ( dev-util/google-perftools:=[static-libs(+)] )
+ zbc? ( >=sys-block/libzbc-5 )
+ zlib? ( sys-libs/zlib[static-libs(+)] )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ gtk? ( x11-libs/gtk+:2 )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ test? ( dev-util/cunit )"
+RDEPEND+="
+ python? (
+ ${PYTHON_DEPS}
+ $(python_gen_any_dep 'dev-python/pandas[${PYTHON_USEDEP}]')
+ )
+ gnuplot? ( sci-visualization/gnuplot )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/fio-2.2.13-libmtd.patch
+ # Upstream patch, should be able to drop in the next release
+ "${FILESDIR}"/fio-3.27-drop-raw.patch
+)
+
+python_check_deps() {
+ has_version "dev-python/pandas[${PYTHON_USEDEP}]"
+}
+
+src_prepare() {
+ default
+
+ sed -i '/^DEBUGFLAGS/s: -D_FORTIFY_SOURCE=2::g' Makefile || die
+
+ # Many checks don't have configure flags.
+ sed -i \
+ -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
+ -e '/if compile_prog "" "-lzbc" "libzbc" *; *then/ '"s::if $(usex zbc true false) ; then:" \
+ -e '/if compile_prog "" "-lz" "zlib" *; *then/ '"s::if $(usex zlib true false) ; then:" \
+ -e '/if compile_prog "" "-laio" "libaio" *; *then/'"s::if $(usex aio true false) ; then:" \
+ -e '/if compile_prog "" "-lcunit" "CUnit" *; *then/'"s::if $(usex test true false) ; then:" \
+ configure || die
+}
+
+src_configure() {
+ chmod g-w "${T}"
+ # not a real configure script
+ # TODO: cuda
+ # TODO: libnbd - not packaged in Gentoo
+ # TODO: pmem - not packaged in Gentoo
+ set -- \
+ ./configure \
+ --disable-optimizations \
+ --extra-cflags="${CFLAGS} ${CPPFLAGS}" \
+ --cc="$(tc-getCC)" \
+ --disable-pmem \
+ $(usex curl '' '--disable-http') \
+ $(usex glusterfs '' '--disable-gfapi') \
+ $(usex gtk '--enable-gfio' '') \
+ $(usex numa '' '--disable-numa') \
+ $(usex rbd '' '--disable-rbd') \
+ $(usex rdma '' '--disable-rdma') \
+ $(usex static '--build-static' '') \
+ $(usex tcmalloc '' '--disable-tcmalloc')
+ echo "$@"
+ "$@" || die 'configure failed'
+}
+
+src_compile() {
+ emake V=1 OPTFLAGS=
+}
+
+src_install() {
+ emake install DESTDIR="${D}" prefix="${EPREFIX}/usr" mandir="${EPREFIX}/usr/share/man"
+
+ local python2_7_files=(
+ "${ED}"/usr/bin/fiologparser_hist.py
+ "${ED}"/usr/bin/fiologparser.py
+ )
+ local python_files=(
+ "${python2_7_files[@]}"
+ "${ED}"/usr/bin/fio_jsonplus_clat2csv
+ )
+ if use python ; then
+ sed -i 's:python2.7:python:g' "${python2_7_files[@]}" || die
+ python_replicate_script "${python2_7_files[@]}"
+ else
+ rm "${python_files[@]}" || die
+ fi
+
+ local gnuplot_python2_7_files=(
+ "${ED}"/usr/bin/fio2gnuplot
+ )
+ local gnuplot_files=(
+ "${gnuplot_python2_7_files[@]}"
+ "${ED}"/usr/bin/fio_generate_plots
+ "${ED}"/usr/share/man/man1/fio_generate_plots.1
+ "${ED}"/usr/share/man/man1/fio2gnuplot.1
+ "${ED}"/usr/share/fio/*.gpm
+ )
+ if use gnuplot ; then
+ sed -i 's:python2.7:python:g' "${gnuplot_python2_7_files[@]}" || die
+ python_replicate_script "${gnuplot_python2_7_files[@]}"
+ else
+ rm "${gnuplot_files[@]}" || die
+ rmdir "${ED}"/usr/share/fio/ || die
+ fi
+
+ # This tool has security/parallel issues -- it hardcodes /tmp/template.fio.
+ rm "${ED}"/usr/bin/genfio || die
+
+ dodoc README REPORTING-BUGS HOWTO
+ docinto examples
+ dodoc examples/*
+}