summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-12-12 17:47:28 +0000
committerMike Frysinger <vapier@gentoo.org>2011-12-12 17:47:28 +0000
commitea30b8aefde5436f72d31f2c1fbb9d00a00ca2eb (patch)
tree2e148c8872b320f30205390af3130b7bcabfeb91 /sys-libs
parentRemove miss-named beta0. Add beta1 with better name (presented as downgrade). (diff)
downloadgentoo-2-ea30b8aefde5436f72d31f2c1fbb9d00a00ca2eb.tar.gz
gentoo-2-ea30b8aefde5436f72d31f2c1fbb9d00a00ca2eb.tar.bz2
gentoo-2-ea30b8aefde5436f72d31f2c1fbb9d00a00ca2eb.zip
Run scanelf on systems when upgrading to look for old __guard symbols #394453 by morlix.
(Portage version: 2.2.0_alpha79/cvs/Linux x86_64)
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/glibc/ChangeLog7
-rw-r--r--sys-libs/glibc/files/eblits/pkg_setup.eblit22
-rw-r--r--sys-libs/glibc/files/eblits/src_compile.eblit6
-rw-r--r--sys-libs/glibc/files/eblits/src_unpack.eblit18
4 files changed, 30 insertions, 23 deletions
diff --git a/sys-libs/glibc/ChangeLog b/sys-libs/glibc/ChangeLog
index aec8fa556231..a1a2e06dd5f9 100644
--- a/sys-libs/glibc/ChangeLog
+++ b/sys-libs/glibc/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-libs/glibc
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.805 2011/12/12 17:33:10 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.806 2011/12/12 17:47:28 vapier Exp $
+
+ 12 Dec 2011; Mike Frysinger <vapier@gentoo.org> files/eblits/pkg_setup.eblit,
+ files/eblits/src_compile.eblit, files/eblits/src_unpack.eblit:
+ Run scanelf on systems when upgrading to look for old __guard symbols #394453
+ by morlix.
12 Dec 2011; Mike Frysinger <vapier@gentoo.org>
files/eblits/src_compile.eblit, files/eblits/src_install.eblit:
diff --git a/sys-libs/glibc/files/eblits/pkg_setup.eblit b/sys-libs/glibc/files/eblits/pkg_setup.eblit
index 806ad86de892..31a38f437716 100644
--- a/sys-libs/glibc/files/eblits/pkg_setup.eblit
+++ b/sys-libs/glibc/files/eblits/pkg_setup.eblit
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_setup.eblit,v 1.7 2011/11/16 16:07:46 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_setup.eblit,v 1.8 2011/12/12 17:47:28 vapier Exp $
glibc_compile_test() {
local ret save_cflags=${CFLAGS}
@@ -95,4 +95,24 @@ eblit-glibc-pkg_setup() {
use hardened && ! gcc-specs-pie && \
ewarn "PIE hardening not applied, as your compiler doesn't default to PIE"
+
+ # Make sure host system is up to date #394453
+ if has_version '<sys-libs/glibc-2.15' ; then
+ ebegin "Scanning system for __guard to see if you need to rebuild first ..."
+ local files=$(
+ scanelf -qys__guard -F'#s%F' \
+ "${ROOT}"/*bin/ \
+ "${ROOT}"/lib* \
+ "${ROOT}"/usr/*bin/ \
+ "${ROOT}"/usr/lib* | \
+ grep -v '^/lib.*/libc-2.*.so$'
+ )
+ [[ -z ${files} ]]
+ if ! eend $? ; then
+ eerror "Your system still has old SSP __guard symbols. You need to"
+ eerror "rebuild all the packages that provide these files first:"
+ eerror "${files}"
+ die "old __guard detected"
+ fi
+ fi
}
diff --git a/sys-libs/glibc/files/eblits/src_compile.eblit b/sys-libs/glibc/files/eblits/src_compile.eblit
index b11639148c72..6a77650fcf41 100644
--- a/sys-libs/glibc/files/eblits/src_compile.eblit
+++ b/sys-libs/glibc/files/eblits/src_compile.eblit
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_compile.eblit,v 1.20 2011/12/12 17:33:10 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_compile.eblit,v 1.21 2011/12/12 17:47:28 vapier Exp $
glibc_do_configure() {
local myconf
@@ -21,10 +21,8 @@ glibc_do_configure() {
use nls || myconf="${myconf} --disable-nls"
myconf="${myconf} $(use_enable hardened stackguard-randomization)"
- if [[ $(<"${T}"/.ssp.compat) == "yes" ]] ; then
+ if has_version '<sys-libs/glibc-2.13' ; then
myconf="${myconf} --enable-old-ssp-compat"
- else
- myconf="${myconf} --disable-old-ssp-compat"
fi
use glibc-omitfp && myconf="${myconf} --enable-omitfp"
diff --git a/sys-libs/glibc/files/eblits/src_unpack.eblit b/sys-libs/glibc/files/eblits/src_unpack.eblit
index c22c25ca7fa3..cc683cd23031 100644
--- a/sys-libs/glibc/files/eblits/src_unpack.eblit
+++ b/sys-libs/glibc/files/eblits/src_unpack.eblit
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_unpack.eblit,v 1.13 2011/08/23 18:37:57 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_unpack.eblit,v 1.14 2011/12/12 17:47:28 vapier Exp $
int_to_KV() {
local version=$1 major minor micro
@@ -163,22 +163,6 @@ eblit-glibc-src_unpack() {
toolchain-glibc_src_unpack
- # Backwards SSP support
- cd "${S}"
-# For now, we force everyone to have the extra symbols
-# einfon "Scanning system for __guard to see if we need SSP compat ... "
-# if [[ -n $(scanelf -qyls__guard -F'#s%F' | grep -v '^/lib.*/libc-2.*.so$') ]] ; then
- echo "yes" > "${T}"/.ssp.compat
-# else
-# # ok, a quick scan didnt find it, so lets do a deep scan ...
-# if [[ -n $(scanelf -qyRlps__guard -F'#s%F' | grep -v '^/lib.*/libc-2.*.so$') ]] ; then
-# echo "yes" > "${T}"/.ssp.compat
-# else
-# echo "no" > "${T}"/.ssp.compat
-# fi
-# fi
-# cat "${T}"/.ssp.compat
-
# Glibc is stupid sometimes, and doesn't realize that with a
# static C-Only gcc, -lgcc_eh doesn't exist.
# http://sources.redhat.com/ml/libc-alpha/2003-09/msg00100.html