summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2013-03-03 20:17:37 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2013-03-03 20:17:37 +0000
commitbeb53419b1e41bdcc6c15631cf8ee97b504b5c47 (patch)
tree99c2d7ff7d6f44354164a3cf4435376ba46770f3 /gnome-base/orbit
parentamd64 stable (diff)
downloadgentoo-2-beb53419b1e41bdcc6c15631cf8ee97b504b5c47.tar.gz
gentoo-2-beb53419b1e41bdcc6c15631cf8ee97b504b5c47.tar.bz2
gentoo-2-beb53419b1e41bdcc6c15631cf8ee97b504b5c47.zip
Add pic USE flag to fix libbonobo build failure on hardened systems (bug #312161, thanks to arackhaen and Magnus Granberg).
(Portage version: 2.2.0_alpha164/cvs/Linux x86_64, signed Manifest commit with key CF0ADD61)
Diffstat (limited to 'gnome-base/orbit')
-rw-r--r--gnome-base/orbit/ChangeLog7
-rw-r--r--gnome-base/orbit/files/orbit-2.14.19-fPIC.patch46
-rw-r--r--gnome-base/orbit/metadata.xml4
-rw-r--r--gnome-base/orbit/orbit-2.14.19-r2.ebuild11
4 files changed, 64 insertions, 4 deletions
diff --git a/gnome-base/orbit/ChangeLog b/gnome-base/orbit/ChangeLog
index d4f28930d8b1..1b1b590b3751 100644
--- a/gnome-base/orbit/ChangeLog
+++ b/gnome-base/orbit/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for gnome-base/orbit
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-base/orbit/ChangeLog,v 1.187 2013/02/13 02:13:22 tetromino Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-base/orbit/ChangeLog,v 1.188 2013/03/03 20:17:37 tetromino Exp $
+
+ 03 Mar 2013; Alexandre Rostovtsev <tetromino@gentoo.org>
+ orbit-2.14.19-r2.ebuild, +files/orbit-2.14.19-fPIC.patch, metadata.xml:
+ Add pic USE flag to fix libbonobo build failure on hardened systems (bug
+ #312161, thanks to arackhaen and Magnus Granberg).
13 Feb 2013; Alexandre Rostovtsev <tetromino@gentoo.org>
files/orbit-2.14.19-link_protocol_is_local.patch:
diff --git a/gnome-base/orbit/files/orbit-2.14.19-fPIC.patch b/gnome-base/orbit/files/orbit-2.14.19-fPIC.patch
new file mode 100644
index 000000000000..394919f98568
--- /dev/null
+++ b/gnome-base/orbit/files/orbit-2.14.19-fPIC.patch
@@ -0,0 +1,46 @@
+From 31236105deaa4b50a70aa256819bfc4790f705d8 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Sun, 3 Mar 2013 13:29:24 -0500
+Subject: [PATCH] Add an option to build libname-server-2.a's objects as PIC
+
+Needed for Gentoo hardened, see https://bugs.gentoo.org/show_bug.cgi?id=312161
+---
+ configure.in | 9 +++++++++
+ src/services/name/Makefile.am | 1 +
+ 2 files changed, 10 insertions(+)
+
+diff --git a/configure.in b/configure.in
+index 0879051..38b7b8b 100644
+--- a/configure.in
++++ b/configure.in
+@@ -118,6 +118,15 @@ if test z$enable_purify = zyes; then
+ AC_DEFINE(ORBIT_PURIFY, 1, [defined if purify is enabled])
+ fi
+
++AC_ARG_ENABLE([libname-server-pic],
++ [AS_HELP_STRING([--enable-libname-server-pic], [force libname-server-2.a to be built as PIC])])
++if test x$enable_libname_server_pic = xyes; then
++ LIBNAME_SERVER_PIC=$lt_prog_compiler_pic
++else
++ LIBNAME_SERVER_PIC=
++fi
++AC_SUBST(LIBNAME_SERVER_PIC)
++
+ AC_MSG_CHECKING(which idl compiler to use)
+ IDL_COMPILER="\$(top_builddir)/src/idl-compiler/orbit-idl-2\$(EXEEXT)"
+ AC_ARG_WITH(idl-compiler,
+diff --git a/src/services/name/Makefile.am b/src/services/name/Makefile.am
+index 7212557..21b7365 100644
+--- a/src/services/name/Makefile.am
++++ b/src/services/name/Makefile.am
+@@ -65,6 +65,7 @@ name_client_2_LDADD = $(LDADDS)
+ libname_server_2_a_SOURCES = orbit-name-server.c CosNaming-skels.c \
+ name-support.c name-support.h
+ libname_server_2_a_DEPENDENCIES = $(DEPS) CosNaming.h
++libname_server_2_a_CFLAGS = $(INCLUDES) $(LIBNAME_SERVER_PIC)
+
+ orbit_name_server_2_SOURCES = boot.c
+ orbit_name_server_2_LDFLAGS = $(FLAGS)
+--
+1.8.1.5
+
diff --git a/gnome-base/orbit/metadata.xml b/gnome-base/orbit/metadata.xml
index da6fd63d0085..2965e3cff492 100644
--- a/gnome-base/orbit/metadata.xml
+++ b/gnome-base/orbit/metadata.xml
@@ -2,4 +2,8 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>gnome</herd>
+<use>
+ <flag name="pic">Force libname-server-2 to be built as PIC; needed on
+ hardened systems</flag>
+</use>
</pkgmetadata>
diff --git a/gnome-base/orbit/orbit-2.14.19-r2.ebuild b/gnome-base/orbit/orbit-2.14.19-r2.ebuild
index 92b498ec6b8d..85c65ecc7ffb 100644
--- a/gnome-base/orbit/orbit-2.14.19-r2.ebuild
+++ b/gnome-base/orbit/orbit-2.14.19-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-base/orbit/orbit-2.14.19-r2.ebuild,v 1.1 2013/02/12 06:53:58 tetromino Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-base/orbit/orbit-2.14.19-r2.ebuild,v 1.2 2013/03/03 20:17:37 tetromino Exp $
EAPI="5"
GCONF_DEBUG="yes"
@@ -16,7 +16,7 @@ HOMEPAGE="http://projects.gnome.org/ORBit2/"
LICENSE="GPL-2 LGPL-2"
SLOT="2"
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
-IUSE="static-libs test"
+IUSE="pic static-libs test"
REQUIRED_USE="test? ( debug )"
RDEPEND=">=dev-libs/glib-2.8:2
@@ -46,6 +46,9 @@ src_prepare() {
# https://bugzilla.gnome.org/show_bug.cgi?id=693636
epatch "${FILESDIR}/${PN}-2.14.19-link_protocol_is_local.patch"
+ # Build libname-server-2.a with -fPIC on hardened, bug #312161
+ epatch "${FILESDIR}/${PN}-2.14.19-fPIC.patch"
+
eautoreconf
gnome2_src_prepare
}
@@ -64,7 +67,9 @@ src_configure() {
[ -x /usr/bin/orbit-idl-2 ] || die "Please emerge ~${CATEGORY}/${P} on the host system first"
G2CONF="${G2CONF} --with-idl-compiler=/usr/bin/orbit-idl-2"
fi
- gnome2_src_configure $(use_enable static-libs static)
+ gnome2_src_configure \
+ $(use_enable pic libname-server-pic) \
+ $(use_enable static-libs static)
}
src_compile() {