summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Malm <gengor@gentoo.org>2008-11-02 22:24:23 +0000
committerGordon Malm <gengor@gentoo.org>2008-11-02 22:24:23 +0000
commit44f54b6c023fd8541f025adf6d4c362420713571 (patch)
tree4ad8cafda410c9b1a7e30b63b95be1e7e6ad9cdd /sys-devel
parentRestrict dependency on Qt to >=Qt-4.4 since the source code uses Qt-4.4 methods. (diff)
downloadgentoo-2-44f54b6c023fd8541f025adf6d4c362420713571.tar.gz
gentoo-2-44f54b6c023fd8541f025adf6d4c362420713571.tar.bz2
gentoo-2-44f54b6c023fd8541f025adf6d4c362420713571.zip
Add "hardened" USE flag, fixing bugs #120001, #167844 and probably more.
(Portage version: 2.1.4.5)
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/distcc/ChangeLog6
-rw-r--r--sys-devel/distcc/distcc-2.18.3-r10.ebuild7
-rw-r--r--sys-devel/distcc/distcc-2.18.3-r13.ebuild9
-rw-r--r--sys-devel/distcc/distcc-3.0-r3.ebuild7
-rw-r--r--sys-devel/distcc/files/distcc-hardened.patch24
5 files changed, 45 insertions, 8 deletions
diff --git a/sys-devel/distcc/ChangeLog b/sys-devel/distcc/ChangeLog
index 808f577b5517..76dee61a59ca 100644
--- a/sys-devel/distcc/ChangeLog
+++ b/sys-devel/distcc/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-devel/distcc
# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/ChangeLog,v 1.179 2008/10/27 21:29:44 matsuu Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/ChangeLog,v 1.180 2008/11/02 22:24:23 gengor Exp $
+
+ 02 Nov 2008; Gordon Malm <gengor@gentoo.org> +files/distcc-hardened.patch,
+ distcc-2.18.3-r10.ebuild, distcc-2.18.3-r13.ebuild, distcc-3.0-r3.ebuild:
+ Add "hardened" USE flag, fixing bugs #120001, #167844 and probably more.
27 Oct 2008; MATSUU Takuto <matsuu@gentoo.org>
+files/distcc-3.0-xinetd.patch, files/3.0/distcc-config,
diff --git a/sys-devel/distcc/distcc-2.18.3-r10.ebuild b/sys-devel/distcc/distcc-2.18.3-r10.ebuild
index f2a287893183..48f13f2636b0 100644
--- a/sys-devel/distcc/distcc-2.18.3-r10.ebuild
+++ b/sys-devel/distcc/distcc-2.18.3-r10.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/distcc-2.18.3-r10.ebuild,v 1.10 2008/10/27 21:37:06 matsuu Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/distcc-2.18.3-r10.ebuild,v 1.11 2008/11/02 22:24:23 gengor Exp $
# If you change this in any way please email lisa@gentoo.org and make an
# entry in the ChangeLog (this means you spanky :P). (2004-04-11) Lisa Seelye
@@ -16,7 +16,7 @@ SRC_URI="http://distcc.samba.org/ftp/distcc/distcc-${PV}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd"
-IUSE="gnome gtk selinux ipv6"
+IUSE="gnome gtk hardened selinux ipv6"
DEPEND=">=sys-devel/gcc-config-1.3.1
userland_GNU? ( sys-apps/shadow )
@@ -47,6 +47,9 @@ src_unpack() {
# See bug #75420 for more multilib stuff
epatch "${FILESDIR}/distcc-gentoo-multilib-r1.patch"
einfo "Please report to bug #75420 success or failure of this patch."
+
+ # Bugs #120001, #167844 and probably more. See patch for description.
+ use hardened && epatch "${FILESDIR}/distcc-hardened.patch"
}
src_compile() {
diff --git a/sys-devel/distcc/distcc-2.18.3-r13.ebuild b/sys-devel/distcc/distcc-2.18.3-r13.ebuild
index e6f84736290e..160e941c3729 100644
--- a/sys-devel/distcc/distcc-2.18.3-r13.ebuild
+++ b/sys-devel/distcc/distcc-2.18.3-r13.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/distcc-2.18.3-r13.ebuild,v 1.2 2008/08/17 03:24:18 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/distcc-2.18.3-r13.ebuild,v 1.3 2008/11/02 22:24:23 gengor Exp $
# If you change this in any way please email lisa@gentoo.org and make an
# entry in the ChangeLog (this means you spanky :P). (2004-04-11) Lisa Seelye
@@ -17,7 +17,7 @@ SRC_URI="http://distcc.samba.org/ftp/distcc/distcc-${PV}.tar.bz2
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
-IUSE="avahi gnome gtk selinux ipv6"
+IUSE="avahi gnome gtk hardened selinux ipv6"
COMMON_DEP="dev-libs/popt
avahi? ( >=net-dns/avahi-0.6.5 )"
@@ -64,7 +64,7 @@ src_unpack() {
epatch "${FILESDIR}/distcc-freedesktop.patch"
epatch "${FILESDIR}/distcc-create-dir.patch"
- epatch "${FILESDIR}"/${PN}-march-native.patch
+ epatch "${FILESDIR}/${PN}-march-native.patch"
rm -v popt/*.c || die
if use avahi; then
@@ -72,6 +72,9 @@ src_unpack() {
epatch "${FILESDIR}/${PN}-avahi-configure.patch"
fi
+ # Bugs #120001, #167844 and probably more. See patch for description.
+ use hardened && epatch "${FILESDIR}/distcc-hardened.patch"
+
eautoreconf
}
diff --git a/sys-devel/distcc/distcc-3.0-r3.ebuild b/sys-devel/distcc/distcc-3.0-r3.ebuild
index 36a10ae0c6a8..029d11693a99 100644
--- a/sys-devel/distcc/distcc-3.0-r3.ebuild
+++ b/sys-devel/distcc/distcc-3.0-r3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/distcc-3.0-r3.ebuild,v 1.3 2008/10/27 21:37:06 matsuu Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/distcc-3.0-r3.ebuild,v 1.4 2008/11/02 22:24:23 gengor Exp $
inherit eutils fdo-mime flag-o-matic multilib toolchain-funcs
@@ -11,7 +11,7 @@ SRC_URI="http://distcc.googlecode.com/files/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
-IUSE="avahi gnome gtk ipv6 selinux xinetd"
+IUSE="avahi gnome gtk hardened ipv6 selinux xinetd"
RESTRICT="test"
@@ -51,6 +51,9 @@ src_unpack() {
epatch "${FILESDIR}/${P}-svn617.patch"
epatch "${FILESDIR}/${P}-xinetd.patch"
sed -i -e "/PATH/s:\$distcc_location:${DCCC_PATH}:" pump.in || die
+
+ # Bugs #120001, #167844 and probably more. See patch for description.
+ use hardened && epatch "${FILESDIR}/distcc-hardened.patch"
}
src_compile() {
diff --git a/sys-devel/distcc/files/distcc-hardened.patch b/sys-devel/distcc/files/distcc-hardened.patch
new file mode 100644
index 000000000000..69b3a6516936
--- /dev/null
+++ b/sys-devel/distcc/files/distcc-hardened.patch
@@ -0,0 +1,24 @@
+From: Gordon Malm <gengor@gentoo.org>
+
+Make distcc client pass -D__KERNEL__ macro. Hardened GCC uses this
+macro to determine if code intended to be run in-kernel is being compiled.
+If the code is kernel code, certain compile flags are not applied.
+
+When using distcc to build kernel code (modules, etc.) without this patch,
+the distccd host doesn't get passed -D__KERNEL__. Consequently, gcc on
+the distccd host applies all kinds of flags that it shouldn't.
+
+--- distcc-2.18.3/src/strip.c
++++ distcc-2.18.3-hardened/src/strip.c
+@@ -73,7 +73,10 @@ int dcc_strip_local_args(char **from, ch
+ /* skip through argv, copying all arguments but skipping ones that
+ * ought to be omitted */
+ for (from_i = to_i = 0; from[from_i]; from_i++) {
+- if (str_equal("-D", from[from_i])
++ if (str_equal("-D__KERNEL__", from[from_i])) {
++ to[to_i++] = from[from_i];
++ }
++ else if (str_equal("-D", from[from_i])
+ || str_equal("-I", from[from_i])
+ || str_equal("-U", from[from_i])
+ || str_equal("-L", from[from_i])