forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app-benchmarks/bonnie++: eapi bump, fix #309319, #431684, #515334
Also get rid if unnecessary DEPEND and RDEPEND since this package has no external dependencies. Remove src_compile phase that was added per gentoo#9073 14 years ago. It's not reproducible anymore. The 'changelog.txt' file is a symlink to 'debian/changelog'. Install the actual changelog instead of the symlink. Install everything under bin/ as opposed to sbin/ since this is not a system application. Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=9073 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=309319 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=431684 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=515334 Package-Manager: portage-2.2.26
- Loading branch information
Showing
2 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright 1999-2016 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Id$ | ||
|
||
EAPI="6" | ||
|
||
DESCRIPTION="Hard drive bottleneck testing benchmark suite" | ||
HOMEPAGE="http://www.coker.com.au/bonnie++/" | ||
SRC_URI="http://www.coker.com.au/bonnie++/experimental/${P}.tgz" | ||
|
||
LICENSE="GPL-2" | ||
SLOT="0" | ||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" | ||
IUSE="debug" | ||
|
||
S="${WORKDIR}/${P}.1" | ||
|
||
PATCHES=( | ||
"${FILESDIR}/${PN}-1.96-compile-flags.patch" #426788 | ||
"${FILESDIR}"/${P}-zcav-array-indexing-fix.patch #309319 | ||
) | ||
|
||
DOCS=( README.txt README-2.00 debian/changelog credits.txt ) | ||
HTML_DOCS=( readme.html ) | ||
|
||
src_configure() { | ||
econf \ | ||
$(usex debug "--enable-debug" "") \ | ||
--disable-stripping | ||
} | ||
|
||
src_install() { | ||
dobin bonnie++ zcav bon_csv2html bon_csv2txt | ||
sed -i -e \ | ||
"s:/usr/share/doc/bonnie++:${EPREFIX}/usr/share/doc/${PF}/html:g" \ | ||
bonnie++.8 || die #431684 | ||
doman bon_csv2html.1 bon_csv2txt.1 bonnie++.8 zcav.8 | ||
einstalldocs | ||
} |
35 changes: 35 additions & 0 deletions
35
app-benchmarks/bonnie++/files/bonnie++-1.97-zcav-array-indexing-fix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
From: Göktürk Yüksek <[email protected]> | ||
Subject: [PATCH] Fix array indexing in Zcav::Read when max_loop > 1 and start_offset > 0 | ||
|
||
In method Zcav::Read, the variable 'i' holds the block index. It is | ||
also used as an index to arrays of measurement values (read times and | ||
block counts) when (max_loops > 0). However, the blocks array and | ||
measurements arrays will be out of sync if some initial blocks are to | ||
be skipped (by having start_offset > 0). Using the same index value | ||
for arrays of different sizes causes segfaults. Fix it by substracting | ||
the start_offset properly when accessing the measurements arrays. | ||
|
||
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=309319 | ||
|
||
--- a/zcav_io.cpp | ||
+++ b/zcav_io.cpp | ||
@@ -108,7 +108,7 @@ | ||
double total_read_time = 0.0; | ||
bool nextLoop = false; | ||
for( ; !nextLoop && (!max_size || i < max_size) | ||
- && (loops == 0 || (m_times[i] && m_times[i][0] != -1.0)) | ||
+ && (loops == 0 || (m_times[i - start_offset] && m_times[i - start_offset][0] != -1.0)) | ||
&& (!max_size || i < max_size); i++) | ||
{ | ||
double read_time = access_data(i ? skip_rate - 1 : 0); | ||
@@ -135,8 +135,8 @@ | ||
m_times.push_back(new double[max_loops]); | ||
m_count.push_back(0); | ||
} | ||
- m_times[i][loops] = read_time; | ||
- m_count[i]++; | ||
+ m_times[i - start_offset][loops] = read_time; | ||
+ m_count[i - start_offset]++; | ||
} | ||
} // end loop for reading blocks | ||
|