summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2014-06-25 17:53:59 +0000
committerMike Frysinger <vapier@gentoo.org>2014-06-25 17:53:59 +0000
commitff06ab1bbf80c099f46648006a0ca769fdbf4428 (patch)
tree4fa67e049ebc8bf0d42e7a552e51cfd4bf34d04f /sys-block
parentFix test disabling in live ebuild (diff)
downloadgentoo-2-ff06ab1bbf80c099f46648006a0ca769fdbf4428.tar.gz
gentoo-2-ff06ab1bbf80c099f46648006a0ca769fdbf4428.tar.bz2
gentoo-2-ff06ab1bbf80c099f46648006a0ca769fdbf4428.zip
Add fix from upstream for json int parsing.
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Diffstat (limited to 'sys-block')
-rw-r--r--sys-block/fio/ChangeLog8
-rw-r--r--sys-block/fio/files/fio-2.1.10-json.patch32
-rw-r--r--sys-block/fio/fio-2.1.10-r1.ebuild81
3 files changed, 120 insertions, 1 deletions
diff --git a/sys-block/fio/ChangeLog b/sys-block/fio/ChangeLog
index bae732dd0443..3e7d5d1950ae 100644
--- a/sys-block/fio/ChangeLog
+++ b/sys-block/fio/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-block/fio
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-block/fio/ChangeLog,v 1.47 2014/06/25 17:48:42 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-block/fio/ChangeLog,v 1.48 2014/06/25 17:53:59 vapier Exp $
+
+*fio-2.1.10-r1 (25 Jun 2014)
+
+ 25 Jun 2014; Mike Frysinger <vapier@gentoo.org> +files/fio-2.1.10-json.patch,
+ +fio-2.1.10-r1.ebuild:
+ Add fix from upstream for json int parsing.
25 Jun 2014; Mike Frysinger <vapier@gentoo.org> fio-2.1.10.ebuild:
Add arm love.
diff --git a/sys-block/fio/files/fio-2.1.10-json.patch b/sys-block/fio/files/fio-2.1.10-json.patch
new file mode 100644
index 000000000000..526be9b76228
--- /dev/null
+++ b/sys-block/fio/files/fio-2.1.10-json.patch
@@ -0,0 +1,32 @@
+From a606a802173272002e37be6475802be8c37481d6 Mon Sep 17 00:00:00 2001
+From: Puthikorn Voravootivat <puthik@chromium.org>
+Date: Tue, 24 Jun 2014 15:59:53 -0700
+Subject: [PATCH] Cast input argument for json_object_add_value_int to long
+ long
+
+The latency related (and some other) variables type is uint32_t
+but the JSON integer type is long long. So we need to cast
+the numbers to long long type to make JSON output correctly.
+
+Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org>
+Signed-off-by: Jens Axboe <axboe@fb.com>
+---
+ json.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/json.h b/json.h
+index 081afd6..962c11c 100644
+--- a/json.h
++++ b/json.h
+@@ -52,7 +52,7 @@ void json_free_object(struct json_object *obj);
+
+ int json_object_add_value_type(struct json_object *obj, const char *name, int type, ...);
+ #define json_object_add_value_int(obj, name, val) \
+- json_object_add_value_type((obj), name, JSON_TYPE_INTEGER, (val))
++ json_object_add_value_type((obj), name, JSON_TYPE_INTEGER, (long long) (val))
+ #define json_object_add_value_float(obj, name, val) \
+ json_object_add_value_type((obj), name, JSON_TYPE_FLOAT, (val))
+ #define json_object_add_value_string(obj, name, val) \
+--
+2.0.0
+
diff --git a/sys-block/fio/fio-2.1.10-r1.ebuild b/sys-block/fio/fio-2.1.10-r1.ebuild
new file mode 100644
index 000000000000..34d755cbff15
--- /dev/null
+++ b/sys-block/fio/fio-2.1.10-r1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-block/fio/fio-2.1.10-r1.ebuild,v 1.1 2014/06/25 17:53:59 vapier Exp $
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+inherit eutils python-r1 toolchain-funcs
+
+MY_PV="${PV/_rc/-rc}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Jens Axboe's Flexible IO tester"
+HOMEPAGE="http://brick.kernel.dk/snaps/"
+SRC_URI="http://brick.kernel.dk/snaps/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86"
+IUSE="aio gnuplot gtk numa zlib"
+
+DEPEND="aio? ( dev-libs/libaio )
+ gtk? (
+ dev-libs/glib:2
+ x11-libs/gtk+:2
+ )
+ numa? ( sys-process/numactl )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ gnuplot? (
+ sci-visualization/gnuplot
+ ${PYTHON_DEPS}
+ )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ sed -i '/^DEBUGFLAGS/s, -D_FORTIFY_SOURCE=2,,g' Makefile || die
+ epatch "${FILESDIR}"/${P}-json.patch
+ epatch_user
+
+ # Many checks don't have configure flags.
+ sed -i \
+ -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
+ -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:" \
+ configure || die
+}
+
+src_configure() {
+ # not a real configure script
+ ./configure \
+ --extra-cflags="${CFLAGS} ${CPPFLAGS}" \
+ --cc="$(tc-getCC)" \
+ $(usex gtk '--enable-gfio' '') \
+ $(usex numa '' '--disable-numa') \
+ || die 'configure failed'
+}
+
+src_compile() {
+ emake V=1 OPTFLAGS=
+}
+
+src_install() {
+ emake install DESTDIR="${D}" prefix="${EPREFIX}/usr" mandir="${EPREFIX}/usr/share/man"
+
+ if use gnuplot ; then
+ python_replicate_script "${ED}/usr/bin/fio2gnuplot"
+ else
+ rm "${ED}"/usr/bin/{fio2gnuplot,fio_generate_plots} || die
+ rm "${ED}"/usr/share/man/man1/{fio2gnuplot,fio_generate_plots}.1 || die
+ rm "${ED}"/usr/share/fio/*.gpm || die
+ rmdir "${ED}"/usr/share/fio/ 2>/dev/null
+ 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/*
+}