summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2009-03-01 00:15:24 +0000
committerPatrick Lauer <patrick@gentoo.org>2009-03-01 00:15:24 +0000
commit8cf763181ca1dcd3208b5958d07d6631379abd7a (patch)
tree57c7a0ffdaeefd45662c14e230e0dc7e0dc78e06 /app-benchmarks/filebench
parentInitial commit (diff)
downloadgentoo-2-8cf763181ca1dcd3208b5958d07d6631379abd7a.tar.gz
gentoo-2-8cf763181ca1dcd3208b5958d07d6631379abd7a.tar.bz2
gentoo-2-8cf763181ca1dcd3208b5958d07d6631379abd7a.zip
Initial import from sunrise. Fixes #218223. Ebuild by Cheng Renquan.
(Portage version: 2.2_rc23/cvs/Linux x86_64)
Diffstat (limited to 'app-benchmarks/filebench')
-rw-r--r--app-benchmarks/filebench/ChangeLog10
-rw-r--r--app-benchmarks/filebench/filebench-1.2.4.ebuild37
-rw-r--r--app-benchmarks/filebench/files/linux-port.patch369
-rw-r--r--app-benchmarks/filebench/metadata.xml5
4 files changed, 421 insertions, 0 deletions
diff --git a/app-benchmarks/filebench/ChangeLog b/app-benchmarks/filebench/ChangeLog
new file mode 100644
index 000000000000..a7c3148346ae
--- /dev/null
+++ b/app-benchmarks/filebench/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for app-benchmarks/filebench
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/filebench/ChangeLog,v 1.1 2009/03/01 00:15:23 patrick Exp $
+
+*filebench-1.2.4 (01 Mar 2009)
+
+ 01 Mar 2009; Patrick Lauer <patrick@gentoo.org> +files/linux-port.patch,
+ +metadata.xml, +filebench-1.2.4.ebuild:
+ Initial import from sunrise. Fixes #218223. Ebuild by Cheng Renquan.
+
diff --git a/app-benchmarks/filebench/filebench-1.2.4.ebuild b/app-benchmarks/filebench/filebench-1.2.4.ebuild
new file mode 100644
index 000000000000..c579dfaa5f25
--- /dev/null
+++ b/app-benchmarks/filebench/filebench-1.2.4.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/filebench/filebench-1.2.4.ebuild,v 1.1 2009/03/01 00:15:23 patrick Exp $
+
+inherit eutils autotools
+
+DESCRIPTION="Filebench - A Model Based File System Workload Generator"
+HOMEPAGE="http://sourceforge.net/projects/filebench/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="CDDL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-libs/libaio
+ sys-devel/flex
+ sys-devel/bison"
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/linux-port.patch"
+ eautoreconf
+}
+
+src_compile() {
+ econf
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Install failed"
+
+ dodoc README AUTHORS docs/README.benchpoint
+}
diff --git a/app-benchmarks/filebench/files/linux-port.patch b/app-benchmarks/filebench/files/linux-port.patch
new file mode 100644
index 000000000000..c0608128d558
--- /dev/null
+++ b/app-benchmarks/filebench/files/linux-port.patch
@@ -0,0 +1,369 @@
+Index: filebench-1.2.4/filebench/flowop_library.c
+===================================================================
+--- filebench-1.2.4.orig/filebench/flowop_library.c
++++ filebench-1.2.4/filebench/flowop_library.c
+@@ -789,6 +789,7 @@ flowoplib_aiowait(threadflow_t *threadfl
+ for (ncompleted = 0, inprogress = 0,
+ aio = flowop->fo_thread->tf_aiolist;
+ ncompleted < todo, aio != NULL; aio = aio->al_next) {
++ int result;
+
+ result = aio_error64(&aio->al_aiocb);
+
+Index: filebench-1.2.4/filebench/fileset.c
+===================================================================
+--- filebench-1.2.4.orig/filebench/fileset.c
++++ filebench-1.2.4/filebench/fileset.c
+@@ -32,8 +32,9 @@
+ #include <math.h>
+ #include <libgen.h>
+ #include <sys/mman.h>
+-#include "fileset.h"
++
+ #include "filebench.h"
++#include "fileset.h"
+ #include "gamma_dist.h"
+
+ /*
+@@ -631,9 +632,9 @@ fileset_create(fileset_t *fileset)
+ /* we are re-using */
+ reusing = 1;
+ filebench_log(LOG_VERBOSE,
+- "Re-using %s %s on %s file system.",
++ "Re-using %s %s.",
+ fileset_entity_name(fileset),
+- fileset_name, sb.st_fstype);
++ fileset_name);
+ }
+ }
+ (void) mkdir(path, 0755);
+Index: filebench-1.2.4/filebench/filebench.h
+===================================================================
+--- filebench-1.2.4.orig/filebench/filebench.h
++++ filebench-1.2.4/filebench/filebench.h
+@@ -32,6 +32,15 @@
+
+ #include <stdio.h>
+ #include <string.h>
++#include <errno.h>
++
++#ifndef HAVE_BOOLEAN_T
++typedef enum { B_FALSE, B_TRUE } boolean_t;
++#endif
++
++#ifndef HAVE_U_LONGLONG_T
++typedef unsigned long long u_longlong_t;
++#endif
+
+ #include "vars.h"
+ #include "misc.h"
+Index: filebench-1.2.4/filebench/eventgen.c
+===================================================================
+--- filebench-1.2.4.orig/filebench/eventgen.c
++++ filebench-1.2.4/filebench/eventgen.c
+@@ -40,9 +40,10 @@
+ */
+
+ #include <sys/time.h>
++
++#include "filebench.h"
+ #include "vars.h"
+ #include "eventgen.h"
+-#include "filebench.h"
+ #include "flowop.h"
+ #include "ipc.h"
+
+Index: filebench-1.2.4/filebench/procflow.c
+===================================================================
+--- filebench-1.2.4.orig/filebench/procflow.c
++++ filebench-1.2.4/filebench/procflow.c
+@@ -30,8 +30,8 @@
+ #include <sys/stat.h>
+ #include <sys/wait.h>
+
+-#include "procflow.h"
+ #include "filebench.h"
++#include "procflow.h"
+ #include "flowop.h"
+ #include "ipc.h"
+
+@@ -162,7 +162,7 @@ procflow_createproc(procflow_t *procflow
+ }
+
+ #else
+- if (execl(execname, procname, "-a", procname, "-i",
++ if (execlp(execname, procname, "-a", procname, "-i",
+ instance, "-s", shmaddr, "-m", shmpath, NULL) < 0) {
+ filebench_log(LOG_ERROR,
+ "procflow exec proc failed: %s",
+Index: filebench-1.2.4/filebench/threadflow.c
+===================================================================
+--- filebench-1.2.4.orig/filebench/threadflow.c
++++ filebench-1.2.4/filebench/threadflow.c
+@@ -31,8 +31,9 @@
+ #include <sys/lwp.h>
+ #endif
+ #include <signal.h>
+-#include "threadflow.h"
++
+ #include "filebench.h"
++#include "threadflow.h"
+ #include "flowop.h"
+ #include "ipc.h"
+
+Index: filebench-1.2.4/filebench/utils.c
+===================================================================
+--- filebench-1.2.4.orig/filebench/utils.c
++++ filebench-1.2.4/filebench/utils.c
+@@ -34,6 +34,8 @@
+ #ifdef HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
++
++#include "filebench.h"
+ #include "utils.h"
+ #include "parsertypes.h"
+
+Index: filebench-1.2.4/filebench/vars.c
+===================================================================
+--- filebench-1.2.4.orig/filebench/vars.c
++++ filebench-1.2.4/filebench/vars.c
+@@ -30,12 +30,12 @@
+ #include <string.h>
+ #include <errno.h>
+
++#include "filebench.h"
+ #include "vars.h"
+ #include "misc.h"
+ #include "utils.h"
+ #include "stats.h"
+ #include "eventgen.h"
+-#include "filebench.h"
+ #include "fb_random.h"
+
+ static var_t *var_find_dynamic(char *name);
+Index: filebench-1.2.4/filebench/parser_gram.y
+===================================================================
+--- filebench-1.2.4.orig/filebench/parser_gram.y
++++ filebench-1.2.4/filebench/parser_gram.y
+@@ -46,8 +46,9 @@
+ #ifdef HAVE_LIBTECLA
+ #include <libtecla.h>
+ #endif
+-#include "parsertypes.h"
++
+ #include "filebench.h"
++#include "parsertypes.h"
+ #include "utils.h"
+ #include "stats.h"
+ #include "vars.h"
+@@ -2642,7 +2643,7 @@ parser_help(cmd_t *cmd)
+ } else {
+ filebench_log(LOG_INFO,
+ "load <personality> (ls "
+- "/usr/benchmarks/filebench/workloads for list)");
++ FILEBENCHDIR "/workloads for list)");
+ }
+ }
+
+Index: filebench-1.2.4/filebench/parser_lex.l
+===================================================================
+--- filebench-1.2.4.orig/filebench/parser_lex.l
++++ filebench-1.2.4/filebench/parser_lex.l
+@@ -38,9 +38,10 @@
+ #ifdef HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
++
++#include "filebench.h"
+ #include "parsertypes.h"
+ #include "utils.h"
+-#include "filebench.h"
+
+ #include "parser_gram.h"
+
+Index: filebench-1.2.4/filebench/Makefile.am
+===================================================================
+--- filebench-1.2.4.orig/filebench/Makefile.am
++++ filebench-1.2.4/filebench/Makefile.am
+@@ -7,19 +7,19 @@
+ #
+
+ bin_PROGRAMS = go_filebench
+-filebench_SOURCES = gamma_dist.c misc.c procflow.c threadflow.c \
++go_filebench_SOURCES = gamma_dist.c misc.c procflow.c threadflow.c \
+ utils.c flowop.c flowop_library.c ipc.c \
+ vars.c stats.c eventgen.c fileset.c fb_random.c \
+ parser_gram.y parser_lex.l
+-filebenchdir = $(datadir)/filebench
+-INCLUDES = -I../intl -DFILEBENCHDIR=\"$(prefix)/filebench\"
++INCLUDES = -I../intl -DFILEBENCHDIR=\"$(FILEBENCHDIR)\"
+
+ MV=@MV@
+ LEX=@LEX@
+ YACC=@YACC@
+-LFLAGS = @LFLAGS@
+-YFLAGS = @YFLAGS@
++AM_LFLAGS = @LFLAGS@
++AM_YFLAGS = @YFLAGS@
+ DEFS = -D_REENTRANT @DEFINES@
++LIBS = @LDLIBS@
+ BUILD = @BUILD@
+
+ parser_lex.c: parser_lex.l parser_gram.h Makefile
+Index: filebench-1.2.4/configure.in
+===================================================================
+--- filebench-1.2.4.orig/configure.in
++++ filebench-1.2.4/configure.in
+@@ -73,8 +73,8 @@ case "$host_os$host_cpu" in
+ YFLAGS="-d"
+ AC_DEFINE(HAVE_OFF64_T, 1,
+ [ Define if we can use 64 bit files ])
+- FILEBENCHDIR=${prefix}/filebench
+- FILEBENCHBIN=${prefix}/bin
++ FILEBENCHDIR=${datadir}/filebench
++ FILEBENCHBIN=${bindir}
+ ;;
+ esac
+
+@@ -324,6 +324,6 @@ AC_SUBST(SRCDIR)
+ AC_SUBST(FILEBENCHDIR)
+ AC_SUBST(FILEBENCHBIN)
+
+-AC_CONFIG_FILES([Makefile filebench/Makefile fastsu/Makefile workloads/Makefile workloads/build/Makefile scripts/Makefile benchpoint/Makefile benchpoint/bin/Makefile benchpoint/config/Makefile benchpoint/functions/Makefile benchpoint/profiles/Makefile])
++AC_CONFIG_FILES([Makefile filebench/Makefile fastsu/Makefile workloads/Makefile workloads/build/Makefile scripts/Makefile benchpoint/Makefile benchpoint/bin/Makefile benchpoint/config/Makefile benchpoint/functions/Makefile benchpoint/profiles/Makefile bin/Makefile])
+
+ AC_OUTPUT
+Index: filebench-1.2.4/fastsu/fastsu.c
+===================================================================
+--- filebench-1.2.4.orig/fastsu/fastsu.c
++++ filebench-1.2.4/fastsu/fastsu.c
+@@ -1,23 +1,26 @@
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <strings.h>
++#include <string.h>
+
+-void
++int
+ main(int argc, char *argv[], char *envp[])
+ {
+ char *shell;
+ char cmd[2048];
+
+- *cmd = NULL;
++ *cmd = '\0';
+ shell=getenv("SHELL");
+- *(argv++);
++ argv++;
+ argc--;
+ while(argc-- != 0) {
+ (void) strcat(cmd,*argv);
+ (void) strcat(cmd," ");
+- *(argv++);
++ argv++;
+ }
+
+ execlp(shell, shell, "-c", cmd, (char *) 0);
++
++ /* control should not reach here */
++ return -1;
+ }
+Index: filebench-1.2.4/benchpoint/config/Makefile.am
+===================================================================
+--- filebench-1.2.4.orig/benchpoint/config/Makefile.am
++++ filebench-1.2.4/benchpoint/config/Makefile.am
+@@ -6,8 +6,7 @@
+ # See the file LICENSING in this distribution for details.
+ #
+
+-filebenchdir = $(prefix)/filebench
+-configdir = $(filebenchdir)/config
++configdir = ${FILEBENCHDIR}/config
+
+ config_DATA = *.conf
+
+Index: filebench-1.2.4/benchpoint/profiles/Makefile.am
+===================================================================
+--- filebench-1.2.4.orig/benchpoint/profiles/Makefile.am
++++ filebench-1.2.4/benchpoint/profiles/Makefile.am
+@@ -6,8 +6,7 @@
+ # See the file LICENSING in this distribution for details.
+ #
+
+-filebenchdir = $(prefix)/filebench
+-configdir = $(filebenchdir)/config
++configdir = ${FILEBENCHDIR}/config
+
+ config_DATA = *.prof
+
+Index: filebench-1.2.4/bin/Makefile.am
+===================================================================
+--- filebench-1.2.4.orig/bin/Makefile.am
++++ filebench-1.2.4/bin/Makefile.am
+@@ -6,8 +6,5 @@
+ # See the file LICENSING in this distribution for details.
+ #
+
+-filebenchdir = $(prefix)/filebench
+-scriptsdir = $(filebenchdir)/bin
+-
+-scripts_SCRIPTS = filebench
++bin_SCRIPTS = filebench
+
+Index: filebench-1.2.4/benchpoint/functions/Makefile.am
+===================================================================
+--- filebench-1.2.4.orig/benchpoint/functions/Makefile.am
++++ filebench-1.2.4/benchpoint/functions/Makefile.am
+@@ -6,8 +6,7 @@
+ # See the file LICENSING in this distribution for details.
+ #
+
+-filebenchdir = $(prefix)/filebench
+-configdir = $(filebenchdir)/config
++configdir = ${FILEBENCHDIR}/config
+
+ config_SCRIPTS = *.func
+
+Index: filebench-1.2.4/scripts/Makefile.am
+===================================================================
+--- filebench-1.2.4.orig/scripts/Makefile.am
++++ filebench-1.2.4/scripts/Makefile.am
+@@ -6,8 +6,7 @@
+ # See the file LICENSING in this distribution for details.
+ #
+
+-filebenchdir = $(prefix)/filebench
+-scriptsdir = $(filebenchdir)/scripts
++scriptsdir = ${FILEBENCHDIR}/scripts
+
+ scripts_SCRIPTS = filebench_compare filebench_summary filebench_plot fs_flush
+
+Index: filebench-1.2.4/workloads/Makefile.am
+===================================================================
+--- filebench-1.2.4.orig/workloads/Makefile.am
++++ filebench-1.2.4/workloads/Makefile.am
+@@ -6,8 +6,6 @@
+ # See the file LICENSING in this distribution for details.
+ #
+
+-filebenchdir = $(datadir)/filebench
+-
+ SUBDIRS = build
+
+ pkg: filebench
+Index: filebench-1.2.4/workloads/build/Makefile.am
+===================================================================
+--- filebench-1.2.4.orig/workloads/build/Makefile.am
++++ filebench-1.2.4/workloads/build/Makefile.am
+@@ -6,8 +6,7 @@
+ # See the file LICENSING in this distribution for details.
+ #
+
+-filebenchdir = $(prefix)/filebench
+-workloadsdir = $(filebenchdir)/workloads
++workloadsdir = ${FILEBENCHDIR}/workloads
+
+ workloads_DATA = BUILD \
+ bringover.f \
diff --git a/app-benchmarks/filebench/metadata.xml b/app-benchmarks/filebench/metadata.xml
new file mode 100644
index 000000000000..6101430644f2
--- /dev/null
+++ b/app-benchmarks/filebench/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>benchmarks</herd>
+</pkgmetadata>