summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Piasek <dagger@gentoo.org>2009-08-14 10:25:03 +0000
committerRobert Piasek <dagger@gentoo.org>2009-08-14 10:25:03 +0000
commit3e49b4c8d9e7c4dab1efcb366ffedc25ca6ce74c (patch)
treeff0683c71f11ef6b4e219433e930b55312a87e4b /net-misc
parentFix documentationan install (diff)
downloadgentoo-2-3e49b4c8d9e7c4dab1efcb366ffedc25ca6ce74c.tar.gz
gentoo-2-3e49b4c8d9e7c4dab1efcb366ffedc25ca6ce74c.tar.bz2
gentoo-2-3e49b4c8d9e7c4dab1efcb366ffedc25ca6ce74c.zip
Backported upstream patch. Fixes bug 281099
(Portage version: 2.1.6.13/cvs/Linux x86_64)
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/cnetworkmanager/ChangeLog10
-rw-r--r--net-misc/cnetworkmanager/cnetworkmanager-0.21-r1.ebuild (renamed from net-misc/cnetworkmanager/cnetworkmanager-0.21.ebuild)7
-rw-r--r--net-misc/cnetworkmanager/files/cnetworkmanager-0.21-wepwapfix.patch86
3 files changed, 101 insertions, 2 deletions
diff --git a/net-misc/cnetworkmanager/ChangeLog b/net-misc/cnetworkmanager/ChangeLog
index 7038908698c3..5a0da598366f 100644
--- a/net-misc/cnetworkmanager/ChangeLog
+++ b/net-misc/cnetworkmanager/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-misc/cnetworkmanager
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/cnetworkmanager/ChangeLog,v 1.1 2009/08/11 09:16:52 dagger Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/cnetworkmanager/ChangeLog,v 1.2 2009/08/14 10:25:02 dagger Exp $
+
+*cnetworkmanager-0.21-r1 (14 Aug 2009)
+
+ 14 Aug 2009; Robert Piasek <dagger@gentoo.org>
+ -cnetworkmanager-0.21.ebuild, +cnetworkmanager-0.21-r1.ebuild,
+ +files/cnetworkmanager-0.21-wepwapfix.patch:
+ fixes bug #281099. Big thank you to gbin@gootz.net for pointing it out
+ and providing patch.
*cnetworkmanager-0.21 (11 Aug 2009)
diff --git a/net-misc/cnetworkmanager/cnetworkmanager-0.21.ebuild b/net-misc/cnetworkmanager/cnetworkmanager-0.21-r1.ebuild
index 9c32cdf7f262..be7c10af3530 100644
--- a/net-misc/cnetworkmanager/cnetworkmanager-0.21.ebuild
+++ b/net-misc/cnetworkmanager/cnetworkmanager-0.21-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/cnetworkmanager/cnetworkmanager-0.21.ebuild,v 1.1 2009/08/11 09:16:52 dagger Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/cnetworkmanager/cnetworkmanager-0.21-r1.ebuild,v 1.1 2009/08/14 10:25:02 dagger Exp $
EAPI=2
@@ -20,3 +20,8 @@ RDEPEND=">=dev-lang/python-2.5
>=net-misc/networkmanager-0.7.0"
DEPEND="${RDEPEND}
dev-util/pkgconfig"
+
+src_prepare() {
+ # Fixes bug 281099
+ epatch "${FILESDIR}"/${P}-wepwapfix.patch
+}
diff --git a/net-misc/cnetworkmanager/files/cnetworkmanager-0.21-wepwapfix.patch b/net-misc/cnetworkmanager/files/cnetworkmanager-0.21-wepwapfix.patch
new file mode 100644
index 000000000000..45c7870d2719
--- /dev/null
+++ b/net-misc/cnetworkmanager/files/cnetworkmanager-0.21-wepwapfix.patch
@@ -0,0 +1,86 @@
+From: Martin Vidner <martin@vidner.net>
+Date: Thu, 13 Aug 2009 21:31:51 +0000 (+0200)
+Subject: Fixed the --wep-* and --wpa-* options (Gentoo#281099).
+X-Git-Url: http://repo.or.cz/w/cnetworkmanager.git?a=commitdiff_plain
+
+Fixed the --wep-* and --wpa-* options (Gentoo#281099).
+
+The constructors had wrong super calls, duh.
+And there was a typo in "ccmp".
+http://bugs.gentoo.org/show_bug.cgi?id=281099
+---
+
+diff --git a/Makefile b/Makefile
+index 0ba0c93..5900426 100644
+--- a/Makefile
++++ b/Makefile
+@@ -7,7 +7,7 @@ check: check-nonm
+
+ check-nonm:
+ for T in `find . -name \*.py | xargs grep -l '>>>'`; do python $$T; done
+- for T in test/test01*.py; do $$T; done
++ for T in test/test01*.py; do PYTHONPATH=. $$T; done
+
+ install:
+ $(SETUP) install
+diff --git a/networkmanager/applet/settings.py b/networkmanager/applet/settings.py
+index bc22291..5ceacba 100644
+--- a/networkmanager/applet/settings.py
++++ b/networkmanager/applet/settings.py
+@@ -104,7 +104,7 @@ class Wep(WiFi):
+ def __init__(self, ssid, key, hashed_key=""):
+ "One of key, hashed_key must be present"
+
+- super(WiFi, self).__init__(ssid)
++ super(Wep, self).__init__(ssid)
+ self["802-11-wireless"]["security"] = "802-11-wireless-security"
+ self["802-11-wireless-security"] = {}
+ self["802-11-wireless-security"]["key-mgmt"] = "none"
+@@ -126,10 +126,10 @@ class WpaPsk(WiFi):
+ def __init__(self, ssid, key, hashed_key=""):
+ "One of key, hashed_key must be present"
+
+- super(WiFi, self).__init__(ssid)
++ super(WpaPsk, self).__init__(ssid)
+ self["802-11-wireless"]["security"] = "802-11-wireless-security"
+ self["802-11-wireless-security"] = {}
+- self["802-11-wireless-security"]["group"] = ["tkip", "cselfp"]
++ self["802-11-wireless-security"]["group"] = ["tkip", "ccmp"]
+ self["802-11-wireless-security"]["pairwise"] = ["tkip", "ccmp"]
+ self["802-11-wireless-security"]["key-mgmt"] = "wpa-psk"
+ if hashed_key == "":
+diff --git a/test/test01-nofail.py b/test/test01-nofail.py
+index c4ca60c..a908e5d 100755
+--- a/test/test01-nofail.py
++++ b/test/test01-nofail.py
+@@ -4,6 +4,8 @@ import subprocess
+ import sys
+ import unittest
+
++import networkmanager.applet.settings as settings
++
+ class NoFail(unittest.TestCase):
+ def callIt(self, params):
+ cmd = sys.path[0] + '/../cnetworkmanager'
+@@ -19,5 +21,21 @@ class NoFail(unittest.TestCase):
+ def testHelp(self):
+ self.callIt("--help")
+
++class SettingsFactory(unittest.TestCase):
++ def testWiFi(self):
++ ssid = "foo"
++ c = settings.WiFi(ssid)
++
++ def testWep(self):
++ ssid = "foo"
++ c1 = settings.Wep(ssid, "wep_pass")
++ c2 = settings.Wep(ssid, "", "ffffffffffffffffffffffffff")
++
++ def testWpa(self):
++ ssid = "foo"
++ c1 = settings.WpaPsk(ssid, "wep_pass")
++ c2 = settings.WpaPsk(ssid, "", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
++
++
+ if __name__ == '__main__':
+ unittest.main()