From 5654ae0877a025b09fe1e642eb48da392e9b9db6 Mon Sep 17 00:00:00 2001 From: Tony Vroon Date: Tue, 15 Nov 2016 16:42:33 +0000 Subject: app-admin/mongo-tools: Build PIE (Position Independent Executables) to avoid text relocations. Patch by "runtarod" closes bug #582854. Package-Manager: portage-2.3.0 --- .../mongo-tools/files/mongo-tools-3.2.10-pie.patch | 12 +++++ app-admin/mongo-tools/mongo-tools-3.2.10-r1.ebuild | 58 ++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 app-admin/mongo-tools/files/mongo-tools-3.2.10-pie.patch create mode 100644 app-admin/mongo-tools/mongo-tools-3.2.10-r1.ebuild (limited to 'app-admin/mongo-tools') diff --git a/app-admin/mongo-tools/files/mongo-tools-3.2.10-pie.patch b/app-admin/mongo-tools/files/mongo-tools-3.2.10-pie.patch new file mode 100644 index 000000000000..6a80d75b2cb9 --- /dev/null +++ b/app-admin/mongo-tools/files/mongo-tools-3.2.10-pie.patch @@ -0,0 +1,12 @@ +diff -uNr mongo-tools-r3.2.10.ORIG/build.sh mongo-tools-r3.2.10/build.sh +--- mongo-tools-r3.2.10.ORIG/build.sh 2016-11-15 16:15:09.487441283 +0000 ++++ mongo-tools-r3.2.10/build.sh 2016-11-15 16:15:23.127235064 +0000 +@@ -22,7 +22,7 @@ + + for i in bsondump mongostat mongofiles mongoexport mongoimport mongorestore mongodump mongotop mongooplog; do + echo "Building ${i}..." +- go build -o "bin/$i" -tags "$tags" "$i/main/$i.go" ++ go build -buildmode=pie -o "bin/$i" -tags "$tags" "$i/main/$i.go" + ./bin/$i --version + done + diff --git a/app-admin/mongo-tools/mongo-tools-3.2.10-r1.ebuild b/app-admin/mongo-tools/mongo-tools-3.2.10-r1.ebuild new file mode 100644 index 000000000000..0e5c5ccf2c02 --- /dev/null +++ b/app-admin/mongo-tools/mongo-tools-3.2.10-r1.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils + +MY_PV=${PV/_rc/-rc} +MY_P=${PN}-r${MY_PV} + +DESCRIPTION="A high-performance, open source, schema-free document-oriented database" +HOMEPAGE="http://www.mongodb.org" +SRC_URI="https://github.com/mongodb/mongo-tools/archive/r${MY_PV}.tar.gz -> mongo-tools-${MY_PV}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="sasl ssl" + +# Maintainer note: +# openssl DEPEND constraint, see: +# https://github.com/mongodb/mongo-tools/issues/11 + +RDEPEND="!