public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alexandre Restovtsev" <tetromino@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gnome:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/
Date: Thu, 27 Oct 2011 02:44:40 +0000 (UTC)	[thread overview]
Message-ID: <edb312863255b2e4ee69a1f0818d83aa83fa8987.tetromino@gentoo> (raw)

commit:     edb312863255b2e4ee69a1f0818d83aa83fa8987
Author:     Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 27 02:42:42 2011 +0000
Commit:     Alexandre Restovtsev <tetromino <AT> gmail <DOT> com>
CommitDate: Thu Oct 27 02:42:42 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=edb31286

net-misc/networkmanager: force building against libnl:1.1

Build against libnl:1.1. Otherwise, networkmanager[wimax] will link to
libnl-3.so and to libiWmxSdk from wimax-1.5.2 which links to libnl.so,
and explode at runtime due to symbol collisions.

---
 .../networkmanager-0.9.1.90-force-libnl1.1.patch   |   33 ++++++++++
 .../networkmanager-0.9.1.90-libnl-check-1.patch    |   67 --------------------
 .../networkmanager-0.9.1.90-libnl-check-2.patch    |   26 --------
 .../networkmanager-0.9.1.90-libnl-check-3.patch    |   31 ---------
 ...r2.ebuild => networkmanager-0.9.1.90-r3.ebuild} |    8 ++-
 5 files changed, 38 insertions(+), 127 deletions(-)

diff --git a/net-misc/networkmanager/files/networkmanager-0.9.1.90-force-libnl1.1.patch b/net-misc/networkmanager/files/networkmanager-0.9.1.90-force-libnl1.1.patch
new file mode 100644
index 0000000..e4da7b3
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-0.9.1.90-force-libnl1.1.patch
@@ -0,0 +1,33 @@
+Build against libnl:1.1 only. Otherwise, networkmanager will link to
+libnl-3.so and to libiWmxSdk (from wimax-1.5.2) which links to libnl.so,
+and then explode spectacularly at runtime due to symbol collisions.
+
+diff --git a/configure.ac b/configure.ac
+index 117dd91..b8b11de 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -323,24 +323,6 @@ if (test "${have_libnl1}" = "yes"); then
+ 	have_libnl="yes"
+ fi
+ 
+-PKG_CHECK_MODULES(LIBNL2, libnl-2.0, [have_libnl2=yes], [have_libnl2=no])
+-if (test "${have_libnl2}" = "yes"); then
+-	AC_DEFINE(HAVE_LIBNL2, 1, [Define if you require specific libnl-2 support])
+-	LIBNL_CFLAGS="$LIBNL2_CFLAGS"
+-	LIBNL_LIBS="$LIBNL2_LIBS"
+-	libnl_version="2"
+-	have_libnl="yes"
+-fi
+-
+-PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl2=yes], [have_libnl2=no])
+-if (test "${have_libnl2}" = "yes"); then
+-	AC_DEFINE(HAVE_LIBNL3, 1, [Define if you require specific libnl-3 support])
+-	LIBNL_CFLAGS="$LIBNL3_CFLAGS"
+-	LIBNL_LIBS="$LIBNL3_LIBS"
+-	libnl_version="3"
+-	have_libnl="yes"
+-fi
+-
+ if (test "${have_libnl}" = "no"); then
+ 	AC_MSG_ERROR([libnl development header are required])
+ fi

diff --git a/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-1.patch b/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-1.patch
deleted file mode 100644
index 1c6785b..0000000
--- a/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-1.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-commit 6764711cc910d557b75b632d8c83a2d302e32051
-Author: Thomas Graf <tgraf@redhat.com>
-Date:   Fri Sep 23 12:52:39 2011 +0200
-
-    configure: Only check for older libnl versions if newer is unavailable
-    
-    More recent libnl versions can be installed in parallel. Therefore it is
-    possible for more than one libnl check to pass successful. The way
-    the #ifdefs are done this results in code for multiple libnl versions
-    to be included.
-    
-    Signed-off-by: Thomas Graf <tgraf@redhat.com>
-
-diff --git a/configure.ac b/configure.ac
-index 117dd91..57e3aea 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -314,24 +314,6 @@ fi
- AC_DEFINE_UNQUOTED(NO_CONSOLEKIT, $no_ck, [Define to disable use of ConsoleKit])
- 
- have_libnl="no"
--PKG_CHECK_MODULES(LIBNL1, libnl-1 >= 1.0-pre8, [have_libnl1=yes], [have_libnl1=no])
--if (test "${have_libnl1}" = "yes"); then
--	AC_DEFINE(HAVE_LIBNL1, 1, [Define if you require libnl-1 legacy support])
--	LIBNL_CFLAGS="$LIBNL1_CFLAGS"
--	LIBNL_LIBS="$LIBNL1_LIBS"
--	libnl_version="1"
--	have_libnl="yes"
--fi
--
--PKG_CHECK_MODULES(LIBNL2, libnl-2.0, [have_libnl2=yes], [have_libnl2=no])
--if (test "${have_libnl2}" = "yes"); then
--	AC_DEFINE(HAVE_LIBNL2, 1, [Define if you require specific libnl-2 support])
--	LIBNL_CFLAGS="$LIBNL2_CFLAGS"
--	LIBNL_LIBS="$LIBNL2_LIBS"
--	libnl_version="2"
--	have_libnl="yes"
--fi
--
- PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl2=yes], [have_libnl2=no])
- if (test "${have_libnl2}" = "yes"); then
- 	AC_DEFINE(HAVE_LIBNL3, 1, [Define if you require specific libnl-3 support])
-@@ -339,6 +321,24 @@ if (test "${have_libnl2}" = "yes"); then
- 	LIBNL_LIBS="$LIBNL3_LIBS"
- 	libnl_version="3"
- 	have_libnl="yes"
-+else
-+	PKG_CHECK_MODULES(LIBNL2, libnl-2.0, [have_libnl2=yes], [have_libnl2=no])
-+	if (test "${have_libnl2}" = "yes"); then
-+		AC_DEFINE(HAVE_LIBNL2, 1, [Define if you require specific libnl-2 support])
-+		LIBNL_CFLAGS="$LIBNL2_CFLAGS"
-+		LIBNL_LIBS="$LIBNL2_LIBS"
-+		libnl_version="2"
-+		have_libnl="yes"
-+	else
-+		PKG_CHECK_MODULES(LIBNL1, libnl-1 >= 1.0-pre8, [have_libnl1=yes], [have_libnl1=no])
-+		if (test "${have_libnl1}" = "yes"); then
-+			AC_DEFINE(HAVE_LIBNL1, 1, [Define if you require libnl-1 legacy support])
-+			LIBNL_CFLAGS="$LIBNL1_CFLAGS"
-+			LIBNL_LIBS="$LIBNL1_LIBS"
-+			libnl_version="1"
-+			have_libnl="yes"
-+		fi
-+	fi
- fi
- 
- if (test "${have_libnl}" = "no"); then

diff --git a/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-2.patch b/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-2.patch
deleted file mode 100644
index 06cfc57..0000000
--- a/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-2.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-commit fcc128516e3c3d81773fbdee76d684ad93cb5071
-Author: Thomas Graf <tgraf@redhat.com>
-Date:   Fri Sep 23 12:58:54 2011 +0200
-
-    configure: Fix typo in libnl3 check
-    
-    Check for libnl3 sets $have_libnl2 variable instead of $have_libnl3. Mostly a
-    cosmetic fix since the only usage also has the typo in it.
-    
-    Signed-off-by: Thomas Graf <tgraf@redhat.com>
-
-diff --git a/configure.ac b/configure.ac
-index 57e3aea..8b6782a 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -314,8 +314,8 @@ fi
- AC_DEFINE_UNQUOTED(NO_CONSOLEKIT, $no_ck, [Define to disable use of ConsoleKit])
- 
- have_libnl="no"
--PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl2=yes], [have_libnl2=no])
--if (test "${have_libnl2}" = "yes"); then
-+PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl3=yes], [have_libnl3=no])
-+if (test "${have_libnl3}" = "yes"); then
- 	AC_DEFINE(HAVE_LIBNL3, 1, [Define if you require specific libnl-3 support])
- 	LIBNL_CFLAGS="$LIBNL3_CFLAGS"
- 	LIBNL_LIBS="$LIBNL3_LIBS"

diff --git a/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-3.patch b/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-3.patch
deleted file mode 100644
index c439701..0000000
--- a/net-misc/networkmanager/files/networkmanager-0.9.1.90-libnl-check-3.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-commit 61099e30f6814f9f4428f5be682aeb1d5cff33f2
-Author: Thomas Graf <tgraf@redhat.com>
-Date:   Fri Sep 23 13:43:01 2011 +0200
-
-    configure: Check for libnl-route-3 package
-    
-    NM not only depends on libnl but also on libnl-route. Therefore check for the
-    corresponding pkg-config file and use its CFLAGS and LIBS. Otherwise fall
-    back to using libnl-2 or libnl-1.
-    
-    Signed-off-by: Thomas Graf <tgraf@redhat.com>
-
-diff --git a/configure.ac b/configure.ac
-index 8b6782a..932164b 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -315,10 +315,11 @@ AC_DEFINE_UNQUOTED(NO_CONSOLEKIT, $no_ck, [Define to disable use of ConsoleKit])
- 
- have_libnl="no"
- PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [have_libnl3=yes], [have_libnl3=no])
--if (test "${have_libnl3}" = "yes"); then
-+PKG_CHECK_MODULES(LIBNL_ROUTE3, libnl-route-3.0, [have_libnl_route3=yes], [have_libnl_route3=no])
-+if (test "${have_libnl3}" = "yes" -a "${have_libnl_route3}" = "yes"); then
- 	AC_DEFINE(HAVE_LIBNL3, 1, [Define if you require specific libnl-3 support])
--	LIBNL_CFLAGS="$LIBNL3_CFLAGS"
--	LIBNL_LIBS="$LIBNL3_LIBS"
-+	LIBNL_CFLAGS="$LIBNL3_CFLAGS $LIBNL_ROUTE3_CFLAGS"
-+	LIBNL_LIBS="$LIBNL3_LIBS $LIBNL_ROUTE3_LIBS"
- 	libnl_version="3"
- 	have_libnl="yes"
- else

diff --git a/net-misc/networkmanager/networkmanager-0.9.1.90-r2.ebuild b/net-misc/networkmanager/networkmanager-0.9.1.90-r3.ebuild
similarity index 94%
rename from net-misc/networkmanager/networkmanager-0.9.1.90-r2.ebuild
rename to net-misc/networkmanager/networkmanager-0.9.1.90-r3.ebuild
index 1568963..496b53b 100644
--- a/net-misc/networkmanager/networkmanager-0.9.1.90-r2.ebuild
+++ b/net-misc/networkmanager/networkmanager-0.9.1.90-r3.ebuild
@@ -22,6 +22,8 @@ REQUIRED_USE="
 
 # gobject-introspection-0.10.3 is needed due to gnome bug 642300
 # wpa_supplicant-0.7.3-r3 is needed due to bug 359271
+# libnl:1.1 is needed for linking to net-wireless/wimax libraries
+# XXX: on bump, check that net-wireless/wimax is still using libnl:1.1 !
 # TODO: Qt support?
 COMMON_DEPEND=">=sys-apps/dbus-1.2
 	>=dev-libs/dbus-glib-0.75
@@ -29,7 +31,7 @@ COMMON_DEPEND=">=sys-apps/dbus-1.2
 	|| ( >=sys-fs/udev-171[gudev] >=sys-fs/udev-147[extras] )
 	>=dev-libs/glib-2.26
 	>=sys-auth/polkit-0.97
-	dev-libs/libnl:3
+	dev-libs/libnl:1.1
 	>=net-wireless/wpa_supplicant-0.7.3-r3[dbus]
 	bluetooth? ( >=net-wireless/bluez-4.82 )
 	avahi? ( net-dns/avahi[autoipd] )
@@ -91,8 +93,8 @@ pkg_setup() {
 src_prepare() {
 	# Don't build tests
 	epatch "${FILESDIR}/${PN}-0.9_rc3-fix-tests.patch"
-	# Fix libnl detection, will be in next release
-	epatch "${FILESDIR}/${P}-libnl-check-"{1,2,3}.patch
+	# Build against libnl:1.1 for net-wireless/wimax-1.5.2 compatibility
+	epatch "${FILESDIR}/${P}-force-libnl1.1.patch"
 	# Fix <linux/if.h> & <net/if.h> conflict, in next release (bug #388609)
 	epatch "${FILESDIR}/${P}-if.h.patch"
 	# Fix rfkill handling, will be in next release



             reply	other threads:[~2011-10-27  2:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-27  2:44 Alexandre Restovtsev [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-10-25 21:07 [gentoo-commits] proj/gnome:master commit in: net-misc/networkmanager/, net-misc/networkmanager/files/ Gilles Dartiguelongue
2014-04-24 22:35 Gilles Dartiguelongue
2011-10-26 23:49 Alexandre Restovtsev
2011-10-23 23:19 Alexandre Restovtsev
2011-02-28  7:48 Nirbheek Chauhan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=edb312863255b2e4ee69a1f0818d83aa83fa8987.tetromino@gentoo \
    --to=tetromino@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox