summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Kowalik <xarthisius@gentoo.org>2010-10-05 08:27:06 +0000
committerKacper Kowalik <xarthisius@gentoo.org>2010-10-05 08:27:06 +0000
commitc5e91376a9b62f2fb18f4aa2f9d9d59cff545b16 (patch)
tree6a0d34cd18d3c789a8db7796d4a925b7784ac312 /sci-biology/mothur
parentRespect LDFLAGS. Bug #337184 (diff)
downloadhistorical-c5e91376a9b62f2fb18f4aa2f9d9d59cff545b16.tar.gz
historical-c5e91376a9b62f2fb18f4aa2f9d9d59cff545b16.tar.bz2
historical-c5e91376a9b62f2fb18f4aa2f9d9d59cff545b16.zip
Fix buffer overflows and building with --as-needed wrt bug 339753. Thanks to Diego for the report. Correct dependencies. Drop old.
Package-Manager: portage-2.2_rc88/cvs/Linux x86_64
Diffstat (limited to 'sci-biology/mothur')
-rw-r--r--sci-biology/mothur/ChangeLog10
-rw-r--r--sci-biology/mothur/Manifest8
-rw-r--r--sci-biology/mothur/files/mothur-1.13.0-makefile.patch43
-rw-r--r--sci-biology/mothur/files/mothur-1.13.0-overflows.patch82
-rw-r--r--sci-biology/mothur/mothur-1.13.0-r1.ebuild43
-rw-r--r--sci-biology/mothur/mothur-1.13.0.ebuild36
-rw-r--r--sci-biology/mothur/mothur-1.7.2-r1.ebuild30
7 files changed, 181 insertions, 71 deletions
diff --git a/sci-biology/mothur/ChangeLog b/sci-biology/mothur/ChangeLog
index aa5507440a3a..ca6cbe7cce71 100644
--- a/sci-biology/mothur/ChangeLog
+++ b/sci-biology/mothur/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sci-biology/mothur
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-biology/mothur/ChangeLog,v 1.7 2010/09/26 02:30:24 weaver Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/mothur/ChangeLog,v 1.8 2010/10/05 08:27:06 xarthisius Exp $
+
+*mothur-1.13.0-r1 (05 Oct 2010)
+
+ 05 Oct 2010; Kacper Kowalik <xarthisius@gentoo.org>
+ -mothur-1.7.2-r1.ebuild, -mothur-1.13.0.ebuild, +mothur-1.13.0-r1.ebuild,
+ +files/mothur-1.13.0-makefile.patch, +files/mothur-1.13.0-overflows.patch:
+ Fix buffer overflows and building with --as-needed wrt bug 339753. Thanks
+ to Diego for the report. Correct dependencies. Drop old.
*mothur-1.13.0 (26 Sep 2010)
diff --git a/sci-biology/mothur/Manifest b/sci-biology/mothur/Manifest
index 20493db4b5c3..41456dfca193 100644
--- a/sci-biology/mothur/Manifest
+++ b/sci-biology/mothur/Manifest
@@ -1,8 +1,8 @@
+AUX mothur-1.13.0-makefile.patch 867 RMD160 21257fb1bae7ea270611a52ac6def9362ecb17b2 SHA1 426befa9c289306ac3028def58abb3f93c4e0267 SHA256 7eebb85b1a7ebb69e99d326f99e89a2e2103b7448a03e9f9c3158c76c263844a
+AUX mothur-1.13.0-overflows.patch 2685 RMD160 89435a883e53b8a1d5d235a8f7dd732de88a84c8 SHA1 0affe3a51e3adc2e059fb2cbc39c3c8d23b3854d SHA256 caa6044398ebf6342ceb5e064cb7a5576b7d493b63329fb730f60d1a4fbdb558
DIST mothur-1.13.0.zip 871838 RMD160 abe39f6e2185e1e6dcf0e64485da1c806bc58e16 SHA1 59c158477b8715a0e09c6ef45b1ae4e5f5829c1e SHA256 4fe62fcd9b8cc893aecce145ea851581d33f9c835d9dcd6405d9c80acf02ac77
DIST mothur-1.6.0.zip 465292 RMD160 d4aeea76dfeba93d7d3524a54c307f12e87b5b26 SHA1 0e952079893a93892f4a84d548534598feba59da SHA256 75583a204d199ddcf9b845fc0adbaf240d7b1f08584fed5e6465982f68ffe121
-DIST mothur-1.7.2.zip 547035 RMD160 6368dc45ebd9df4a40d90d45dec16f8b36727ae1 SHA1 031e522118d23f259fcbefde70b4c2369caad67f SHA256 5347e3093a7c1ac1aec85db8e79640edb8c34b4c1b2f5ee5e9791ea7097db295
-EBUILD mothur-1.13.0.ebuild 962 RMD160 699a684558d63cc7183e298cecfafb6799d168b6 SHA1 c4f0bba8544b82c0db19a49bee9686855f908b16 SHA256 ceb30b8800b4da111172b05466b9318e64a47f1cb09f3d2b9ba5033c301645c0
+EBUILD mothur-1.13.0-r1.ebuild 930 RMD160 99c1ae55e55e825e262919f4e542376cd8ae8f67 SHA1 a7927c8f5bf70b4f760ba9ede4d0e5af955c9cd2 SHA256 a4ea0649d18c17807a4dbf3f1226ba82e60a7d2bb5ba54f64c44ddc36940b026
EBUILD mothur-1.6.0.ebuild 716 RMD160 6ca48f5fddae07fb3af31555fdb70c15d45871a0 SHA1 3094c119b60a19586ce5a9803ebf9d062cc143dc SHA256 82592ef7f15b963f43598c534b339b11052215d32a94bf5d9e8970902afe8e98
-EBUILD mothur-1.7.2-r1.ebuild 687 RMD160 e9fcaa1c282d2dd2cb8187d0557c1a266addf214 SHA1 207eccc82e0e617ad79d7ea78d304eb8d56480db SHA256 5167361be77fa6ba4c91db2e39d90cb05b7ce534b9a0d9cd47a788fb409a88f3
-MISC ChangeLog 1258 RMD160 a308808817224610a641cd2492577b6f6f5cee6d SHA1 1d027de076ff021bfcdf98912ac03351cbdd6203 SHA256 be1a721dbcee90083ff2fe1ee3ffa9cd9a72b79075c335b32654d424e99781fe
+MISC ChangeLog 1638 RMD160 5090365fb789221d67fb7bbf7a1c05c6680deb70 SHA1 1c681a6c3e588ce72d279bdf458082164a7a6f43 SHA256 4865140f8505fa384cba3f800f81891f9471aa8d840c5cd962e5f401b7af0dfa
MISC metadata.xml 259 RMD160 d9d81b67d635fabd81aef8ae0edf971211ae9072 SHA1 8e32f751c67ff891fa35405a2cf6fb33752d6eb1 SHA256 541c3fbcf299d9a8ccf4132ee61f9e53a5d737cefdaa6fdc77764d8d4c7f3110
diff --git a/sci-biology/mothur/files/mothur-1.13.0-makefile.patch b/sci-biology/mothur/files/mothur-1.13.0-makefile.patch
new file mode 100644
index 000000000000..6b2f0f1bd201
--- /dev/null
+++ b/sci-biology/mothur/files/mothur-1.13.0-makefile.patch
@@ -0,0 +1,43 @@
+Fix build with --as-needed, respect CXX, CXXFLAGS
+
+http://www.mothur.org/forum/viewtopic.php?f=4&t=590
+http://bugs.gentoo.org/show_bug.cgi?id=339753
+
+--- makefile
++++ makefile
+@@ -11,7 +11,7 @@
+
+ # Optimize to level 3:
+
+-CXXFLAGS += -O3
++#CXXFLAGS += -O3
+
+ MOTHUR_FILES = "\"Enter_your_default_path_here\""
+
+@@ -49,7 +49,7 @@
+
+ ifeq ($(strip $(USEREADLINE)),yes)
+ CXXFLAGS += -DUSE_READLINE
+- LDFLAGS += \
++ LIBS = \
+ -lreadline\
+ -lncurses
+ endif
+@@ -57,7 +57,7 @@
+ USEMPI ?= no
+
+ ifeq ($(strip $(USEMPI)),yes)
+- CXX = mpic++
++# CXX = mpic++
+ CXXFLAGS += -DUSE_MPI
+ endif
+
+@@ -74,7 +74,7 @@
+ OBJECTS=$(patsubst %.cpp,%.o,$(wildcard *.cpp))
+
+ mothur : $(OBJECTS)
+- $(CXX) $(LDFLAGS) $(TARGET_ARCH) -o $@ $(OBJECTS)
++ $(CXX) $(LDFLAGS) $(TARGET_ARCH) -o $@ $(OBJECTS) $(LIBS)
+
+ install : mothur
+ cp mothur ../Release/mothur
diff --git a/sci-biology/mothur/files/mothur-1.13.0-overflows.patch b/sci-biology/mothur/files/mothur-1.13.0-overflows.patch
new file mode 100644
index 000000000000..0cd9d7f3a47e
--- /dev/null
+++ b/sci-biology/mothur/files/mothur-1.13.0-overflows.patch
@@ -0,0 +1,82 @@
+Fix buffer overflows
+
+http://www.mothur.org/forum/viewtopic.php?f=4&t=591
+
+--- Mothur.source/filterseqscommand.cpp
++++ Mothur.source/filterseqscommand.cpp
+@@ -305,8 +305,8 @@
+
+ //wait on chidren
+ for(int i = 1; i < processors; i++) {
+- char buf[4];
+- MPI_Recv(buf, 4, MPI_CHAR, i, tag, MPI_COMM_WORLD, &status);
++ char buf[5];
++ MPI_Recv(buf, 5, MPI_CHAR, i, tag, MPI_COMM_WORLD, &status);
+ }
+
+ }else { //you are a child process
+@@ -326,11 +326,11 @@
+
+ if (m->control_pressed) { MPI_File_close(&inMPI); MPI_File_close(&outMPI); return 0; }
+
+- char buf[4];
++ char buf[5];
+ strcpy(buf, "done");
+
+ //tell parent you are done.
+- MPI_Send(buf, 4, MPI_CHAR, 0, tag, MPI_COMM_WORLD);
++ MPI_Send(buf, 5, MPI_CHAR, 0, tag, MPI_COMM_WORLD);
+ }
+
+ MPI_File_close(&outMPI);
+--- Mothur.source/distancecommand.cpp
++++ Mothur.source/distancecommand.cpp
+@@ -271,8 +271,8 @@
+ for(int i = 1; i < processors; i++) {
+ if (m->control_pressed) { MPI_File_close(&outMPI); delete distCalculator; return 0; }
+
+- char buf[4];
+- MPI_Recv(buf, 4, MPI_CHAR, i, tag, MPI_COMM_WORLD, &status);
++ char buf[5];
++ MPI_Recv(buf, 5, MPI_CHAR, i, tag, MPI_COMM_WORLD, &status);
+ }
+ }else { //you are a child process
+ //do your part
+@@ -280,10 +280,10 @@
+
+ if (m->control_pressed) { MPI_File_close(&outMPI); delete distCalculator; return 0; }
+
+- char buf[4];
++ char buf[5];
+ strcpy(buf, "done");
+ //tell parent you are done.
+- MPI_Send(buf, 4, MPI_CHAR, 0, tag, MPI_COMM_WORLD);
++ MPI_Send(buf, 5, MPI_CHAR, 0, tag, MPI_COMM_WORLD);
+ }
+
+ MPI_File_close(&outMPI);
+--- Mothur.source/chimeracheckcommand.cpp
++++ Mothur.source/chimeracheckcommand.cpp
+@@ -269,8 +269,8 @@
+
+ //wait on chidren
+ for(int j = 1; j < processors; j++) {
+- char buf[4];
+- MPI_Recv(buf, 4, MPI_CHAR, j, tag, MPI_COMM_WORLD, &status);
++ char buf[5];
++ MPI_Recv(buf, 5, MPI_CHAR, j, tag, MPI_COMM_WORLD, &status);
+ }
+ }else{ //you are a child process
+ MPI_Recv(&numSeqs, 1, MPI_INT, 0, tag, MPI_COMM_WORLD, &status);
+@@ -288,9 +288,9 @@
+ if (m->control_pressed) { MPI_File_close(&inMPI); MPI_File_close(&outMPI); for (int j = 0; j < outputNames.size(); j++) { remove(outputNames[j].c_str()); } delete chimera; return 0; }
+
+ //tell parent you are done.
+- char buf[4];
++ char buf[5];
+ strcpy(buf, "done");
+- MPI_Send(buf, 4, MPI_CHAR, 0, tag, MPI_COMM_WORLD);
++ MPI_Send(buf, 5, MPI_CHAR, 0, tag, MPI_COMM_WORLD);
+ }
+
+ //close files
diff --git a/sci-biology/mothur/mothur-1.13.0-r1.ebuild b/sci-biology/mothur/mothur-1.13.0-r1.ebuild
new file mode 100644
index 000000000000..afe819b495f6
--- /dev/null
+++ b/sci-biology/mothur/mothur-1.13.0-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/mothur/mothur-1.13.0-r1.ebuild,v 1.1 2010/10/05 08:27:06 xarthisius Exp $
+
+EAPI="2"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A suite of algorithms for ecological bioinformatics"
+HOMEPAGE="http://schloss.micro.umass.edu/wiki/Main_Page"
+SRC_URI="mirror://gentoo/${P}.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="mpi +readline"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+RDEPEND="mpi? ( virtual/mpi )"
+
+S=${WORKDIR}/Mothur.source
+
+pkg_setup() {
+ use mpi && CXX=mpicxx || CXX=$(tc-getCXX)
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-makefile.patch \
+ "${FILESDIR}"/${P}-overflows.patch
+}
+
+use_yn() {
+ useq $1 && echo "yes" || echo "no"
+}
+
+src_compile() {
+ emake USEMPI=$(use_yn mpi) USEREADLINE=$(use_yn readline) || die
+}
+
+src_install() {
+ dobin mothur || die
+}
diff --git a/sci-biology/mothur/mothur-1.13.0.ebuild b/sci-biology/mothur/mothur-1.13.0.ebuild
deleted file mode 100644
index 392961eb18b6..000000000000
--- a/sci-biology/mothur/mothur-1.13.0.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-biology/mothur/mothur-1.13.0.ebuild,v 1.1 2010/09/26 02:30:24 weaver Exp $
-
-EAPI="2"
-
-inherit toolchain-funcs flag-o-matic
-
-DESCRIPTION="A suite of algorithms for ecological bioinformatics"
-HOMEPAGE="http://schloss.micro.umass.edu/wiki/Main_Page"
-SRC_URI="mirror://gentoo/${P}.zip"
-
-LICENSE="GPL-3"
-SLOT="0"
-IUSE="mpi +readline"
-KEYWORDS="~amd64 ~x86"
-
-DEPEND="app-arch/unzip
- mpi? ( virtual/mpi )"
-RDEPEND=""
-
-S="${WORKDIR}/Mothur.source"
-
-src_prepare() {
- filter-ldflags -Wl,--as-needed
- sed -i -e 's/CC_OPTIONS =/CC_OPTIONS = ${CXXFLAGS} /' \
- -e '/USEMPI ?=/ d' -e '/USEREADLINE ?=/ d' \
- -e 's|CC = g++|CC = '$(tc-getCXX)'|' "${S}/makefile" || die
-
- use mpi && sed -i '1 a USEMPI = yes' "${S}/makefile"
- use readline && sed -i '1 a USEREADLINE = yes' "${S}/makefile"
-}
-
-src_install() {
- dobin mothur || die
-}
diff --git a/sci-biology/mothur/mothur-1.7.2-r1.ebuild b/sci-biology/mothur/mothur-1.7.2-r1.ebuild
deleted file mode 100644
index 79e5c5168da5..000000000000
--- a/sci-biology/mothur/mothur-1.7.2-r1.ebuild
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-biology/mothur/mothur-1.7.2-r1.ebuild,v 1.1 2010/08/27 09:28:47 xarthisius Exp $
-
-EAPI="2"
-
-inherit toolchain-funcs
-
-DESCRIPTION="A suite of algorithms for ecological bioinformatics"
-HOMEPAGE="http://schloss.micro.umass.edu/wiki/Main_Page"
-SRC_URI="mirror://gentoo/${P}.zip"
-
-LICENSE="GPL-3"
-SLOT="0"
-IUSE=""
-KEYWORDS="~amd64 ~x86"
-
-DEPEND="app-arch/unzip"
-RDEPEND=""
-
-S=${WORKDIR}/Mothur.source
-
-src_compile() {
- emake CC_OPTIONS="${CXXFLAGS}" CC="$(tc-getCXX)" \
- LNK_OPTIONS="${LDFLAGS}" || die
-}
-
-src_install() {
- dobin mothur || die
-}