summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2013-09-29 00:55:52 +0000
committerMike Frysinger <vapier@gentoo.org>2013-09-29 00:55:52 +0000
commit8703c0aca203b33c73c7bbb44a95165d2666f6a4 (patch)
treefdd24621b8b97277afd1a52bac66ce832550343f /sys-apps/busybox
parentupdate live ebuild (diff)
downloadgentoo-2-8703c0aca203b33c73c7bbb44a95165d2666f6a4.tar.gz
gentoo-2-8703c0aca203b33c73c7bbb44a95165d2666f6a4.tar.bz2
gentoo-2-8703c0aca203b33c73c7bbb44a95165d2666f6a4.zip
Fix static linking against selinux #484560 by thaehaid.
(Portage version: 2.2.0/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)
Diffstat (limited to 'sys-apps/busybox')
-rw-r--r--sys-apps/busybox/ChangeLog7
-rw-r--r--sys-apps/busybox/busybox-1.21.1.ebuild4
-rw-r--r--sys-apps/busybox/files/busybox-1.21.1-trylink-only-prefix-libs-with-l.patch51
3 files changed, 59 insertions, 3 deletions
diff --git a/sys-apps/busybox/ChangeLog b/sys-apps/busybox/ChangeLog
index 1ce4ce643ec3..077c2af3f630 100644
--- a/sys-apps/busybox/ChangeLog
+++ b/sys-apps/busybox/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-apps/busybox
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.361 2013/09/14 10:38:45 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.362 2013/09/29 00:55:52 vapier Exp $
+
+ 29 Sep 2013; Mike Frysinger <vapier@gentoo.org>
+ +files/busybox-1.21.1-trylink-only-prefix-libs-with-l.patch,
+ busybox-1.21.1.ebuild:
+ Fix static linking against selinux #484560 by thaehaid.
14 Sep 2013; Agostino Sarubbo <ago@gentoo.org> busybox-1.21.0.ebuild:
Stable for sh, wrt bug #461372
diff --git a/sys-apps/busybox/busybox-1.21.1.ebuild b/sys-apps/busybox/busybox-1.21.1.ebuild
index 8dc9e05eb334..74b793173e20 100644
--- a/sys-apps/busybox/busybox-1.21.1.ebuild
+++ b/sys-apps/busybox/busybox-1.21.1.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/sys-apps/busybox/busybox-1.21.1.ebuild,v 1.1 2013/08/17 17:55:02 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.21.1.ebuild,v 1.2 2013/09/29 00:55:52 vapier Exp $
# See `man savedconfig.eclass` for info on how to use USE=savedconfig.
@@ -66,7 +66,7 @@ src_prepare() {
# patches go here!
epatch "${FILESDIR}"/${PN}-1.19.0-bb.patch
- #epatch "${FILESDIR}"/${P}-*.patch
+ epatch "${FILESDIR}"/${P}-*.patch
cp "${FILESDIR}"/ginit.c init/ || die
# flag cleanup
diff --git a/sys-apps/busybox/files/busybox-1.21.1-trylink-only-prefix-libs-with-l.patch b/sys-apps/busybox/files/busybox-1.21.1-trylink-only-prefix-libs-with-l.patch
new file mode 100644
index 000000000000..bbd9e554c241
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.21.1-trylink-only-prefix-libs-with-l.patch
@@ -0,0 +1,51 @@
+https://bugs.gentoo.org/484560
+
+From 3eab2b7675fc7e2889cd69285a2a31980a4bf504 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Thu, 12 Sep 2013 00:29:40 -0400
+Subject: [PATCH] trylink: only prefix libs with -l
+
+If our pkg-config queries pass back a flag like -pthread, the trylink
+script will expand that to -l-pthread. So change trylink to only add
+the -l prefix to a value that doesn't have a - prefix already.
+
+Reported-by: thaehaid@incognitomail.org
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ scripts/trylink | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/scripts/trylink b/scripts/trylink
+index a8b0b2e..e471699 100755
+--- a/scripts/trylink
++++ b/scripts/trylink
+@@ -117,7 +117,7 @@ LDLIBS=`echo "$LDLIBS" | xargs -n1 | sort | uniq | xargs`
+ # First link with all libs. If it fails, bail out
+ echo "Trying libraries: $LDLIBS"
+ # "lib1 lib2 lib3" -> "-llib1 -llib2 -llib3"
+-l_list=`echo "$LDLIBS" | sed -e 's/ / -l/g' -e 's/^/-l/' -e 's/^-l$//'`
++l_list=`echo " $LDLIBS " | sed -e 's: \([^- ][^ ]*\): -l\1:g'`
+ test "x$l_list" != "x" && l_list="$START_GROUP $l_list $END_GROUP"
+ try $CC $CFLAGS $LDFLAGS \
+ -o $EXE \
+@@ -141,7 +141,7 @@ while test "$LDLIBS"; do
+ for one in $LDLIBS; do
+ without_one=`echo " $LDLIBS " | sed "s/ $one / /g" | xargs`
+ # "lib1 lib2 lib3" -> "-llib1 -llib2 -llib3"
+- l_list=`echo "$without_one" | sed -e 's/ / -l/g' -e 's/^/-l/' -e 's/^-l$//'`
++ l_list=`echo " $without_one " | sed -e 's: \([^- ][^ ]*\): -l\1:g'`
+ test x"$l_list" != x"" && l_list="$START_GROUP $l_list $END_GROUP"
+ $debug && echo "Trying -l options: '$l_list'"
+ try $CC $CFLAGS $LDFLAGS \
+@@ -172,7 +172,7 @@ done
+
+ # Make the binary with final, minimal list of libs
+ echo "Final link with: ${LDLIBS:-<none>}"
+-l_list=`echo "$LDLIBS" | sed -e 's/ / -l/g' -e 's/^/-l/' -e 's/^-l$//'`
++l_list=`echo " $LDLIBS " | sed -e 's: \([^- ][^ ]*\): -l\1:g'`
+ test "x$l_list" != "x" && l_list="$START_GROUP $l_list $END_GROUP"
+ # --verbose gives us gobs of info to stdout (e.g. linker script used)
+ if ! test -f busybox_ldscript; then
+--
+1.8.3.2
+