summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Piasek <dagger@gentoo.org>2009-08-24 14:11:40 +0000
committerRobert Piasek <dagger@gentoo.org>2009-08-24 14:11:40 +0000
commit4f3e43414f6d738f800090299b4e31930ba158f1 (patch)
treebfe6e74e77ac26c105c5e2793c1242fc726d372d /net-misc/networkmanager-openvpn
parent* bump (diff)
downloadhistorical-4f3e43414f6d738f800090299b4e31930ba158f1.tar.gz
historical-4f3e43414f6d738f800090299b4e31930ba158f1.tar.bz2
historical-4f3e43414f6d738f800090299b4e31930ba158f1.zip
Fixes bug #282428. Thanks for patrakov@gmail.com for providing link
to upstream patch Package-Manager: portage-2.1.6.13/cvs/Linux x86_64
Diffstat (limited to 'net-misc/networkmanager-openvpn')
-rw-r--r--net-misc/networkmanager-openvpn/ChangeLog12
-rw-r--r--net-misc/networkmanager-openvpn/Manifest7
-rw-r--r--net-misc/networkmanager-openvpn/files/networkmanager-openvpn-0.7.1-glibc2.10.fix.patch119
-rw-r--r--net-misc/networkmanager-openvpn/networkmanager-openvpn-0.7.0.ebuild49
-rw-r--r--net-misc/networkmanager-openvpn/networkmanager-openvpn-0.7.1-r1.ebuild (renamed from net-misc/networkmanager-openvpn/networkmanager-openvpn-0.7.1.ebuild)8
5 files changed, 140 insertions, 55 deletions
diff --git a/net-misc/networkmanager-openvpn/ChangeLog b/net-misc/networkmanager-openvpn/ChangeLog
index f804ec4e8775..788335ea774b 100644
--- a/net-misc/networkmanager-openvpn/ChangeLog
+++ b/net-misc/networkmanager-openvpn/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for net-misc/networkmanager-openvpn
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager-openvpn/ChangeLog,v 1.6 2009/04/22 14:22:08 rbu Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager-openvpn/ChangeLog,v 1.7 2009/08/24 14:11:40 dagger Exp $
+
+*networkmanager-openvpn-0.7.1-r1 (24 Aug 2009)
+
+ 24 Aug 2009; Robert Piasek <dagger@gentoo.org>
+ -networkmanager-openvpn-0.7.0.ebuild,
+ -networkmanager-openvpn-0.7.1.ebuild,
+ +networkmanager-openvpn-0.7.1-r1.ebuild,
+ +files/networkmanager-openvpn-0.7.1-glibc2.10.fix.patch:
+ Fixes bug #282428. Thanks for patrakov@gmail.com for providing link
+ to upstream patch
*networkmanager-openvpn-0.7.1 (22 Apr 2009)
diff --git a/net-misc/networkmanager-openvpn/Manifest b/net-misc/networkmanager-openvpn/Manifest
index aea5ccf749e2..1f6731fabac7 100644
--- a/net-misc/networkmanager-openvpn/Manifest
+++ b/net-misc/networkmanager-openvpn/Manifest
@@ -1,9 +1,8 @@
AUX networkmanager-openvpn-0.3.2_p20070621-service-name.patch 612 RMD160 43736ae448fceebf03511b5c9c94c7ea898d8538 SHA1 b91e195d70383036fb79c59ff99f4fe7fbd2861a SHA256 dd615118e9a2fea251a759a6e49cbaf8da611598e18fd9ab3144f374474252b3
+AUX networkmanager-openvpn-0.7.1-glibc2.10.fix.patch 3585 RMD160 510a11d6642f95c2aae2f96deaea60a0325863ad SHA1 3a35211f309c8ece2565dc106d73041e47e98395 SHA256 5bee6702d64b4d881b2eac720a82bde799b41d2e034840fa5d77943df5b57e4a
DIST NetworkManager-openvpn-0.3.2_p20070621.tar.gz 467416 RMD160 8077b3b629e1c003d5ea78ad7c3aa17d4d6a1f15 SHA1 0c9d1ee1db9608ff2fcfc3ae2e1ce3847deb7789 SHA256 e6552cd2180698e304f4a3e0f5db0d945f896931433febac3d88e6e8be2dd22c
-DIST NetworkManager-openvpn-0.7.0.tar.bz2 374615 RMD160 4a4c474ed83c9d0a44cb34d47c9a0a6a29f3e81f SHA1 673acad8a3e1e6225636d4b1027caf227b095d7b SHA256 1dd819c52d3da6be8af0d934763ef77dcac3f48eadcb523348b215b521b477c9
DIST NetworkManager-openvpn-0.7.1.tar.bz2 381840 RMD160 fc0e8d82d9cc20b4c326685f3b1c817c814b99a4 SHA1 73c4e37b0d130b6c08ff814bde2fa63f7cc63c0a SHA256 7c6a7b9b8c6ccf3e2fbf2431b9fb2035f99e1d78065f3344f667e2f108f38d5b
EBUILD networkmanager-openvpn-0.3.2_p20070621.ebuild 1643 RMD160 9e052e7242b196ef1ca59d53ce6d0e94926b07cd SHA1 d2fb7746f4dde6c38430256ca5e600141ce6ab5a SHA256 7007c4c8186937fabd850ffc98f2c28b102aaa9bdcaa4fa0cb46f6712f057240
-EBUILD networkmanager-openvpn-0.7.0.ebuild 1238 RMD160 0b457f5c91a66c40827167d761c63e8ff7159bed SHA1 dd1ceedb5bd6ff860c3b43271d1fe2f2b8cea3c4 SHA256 c723e51231e8f820352ec8a6b2c1ac2909142032ad23ef85f28b6b2b6bea96b9
-EBUILD networkmanager-openvpn-0.7.1.ebuild 1218 RMD160 a65e21bab6d770c91b9bbd769d2bce1b42712ee6 SHA1 77f5dc973e29a10db4e0e9e33f81fb7c70eddba3 SHA256 bfadb26e0e432311ffc33d7d1ea4024393e3c799fe5e4a0cb2d25b256f9992cf
-MISC ChangeLog 1388 RMD160 9a098787b296ab318031e525895829a0806aac2b SHA1 24b082066322b81d5a961caef7cbca06c9682115 SHA256 b6b10845d23f990f22e69ea6fbb3419cca8a6ca0164689bbf2d0c80c29effba2
+EBUILD networkmanager-openvpn-0.7.1-r1.ebuild 1312 RMD160 ddce877c25b652819327405ec930fbf31ff9bfd3 SHA1 73eaa7f827ba89be16f0f5116a8729591b1daca7 SHA256 f108f887c2b2a75b67e80a65897306a3eaeb5157303242a25f05b8e000d7b1fd
+MISC ChangeLog 1761 RMD160 654fb65797b1ba52755a6c7a897cb16977ecc12a SHA1 fb86fdc9dc185e8dbaf69d39850d5a4a37fa6d5e SHA256 5a1cb35823ac652d2296278ce7ead0b6943b28f164e3aee3b1bc08fdc3beb04b
MISC metadata.xml 433 RMD160 e9e8fd01933937c5b44b95a6493d157383dbfc10 SHA1 7c918a851bf18a0b097c1a096e146555a09c6777 SHA256 8850ffbd1950026ac490ef6947412bc9de0d1270f892139779b0b66e35f585a2
diff --git a/net-misc/networkmanager-openvpn/files/networkmanager-openvpn-0.7.1-glibc2.10.fix.patch b/net-misc/networkmanager-openvpn/files/networkmanager-openvpn-0.7.1-glibc2.10.fix.patch
new file mode 100644
index 000000000000..f630476a1648
--- /dev/null
+++ b/net-misc/networkmanager-openvpn/files/networkmanager-openvpn-0.7.1-glibc2.10.fix.patch
@@ -0,0 +1,119 @@
+From 27192957d887915a23f186a34c3bb85af3faba3a Mon Sep 17 00:00:00 2001
+From: Dan Williams <dcbw@redhat.com>
+Date: Tue, 14 Jul 2009 10:51:33 +0000
+Subject: don't use sscanf
+
+besides the fact that for some reason sscanf wasn't working, it's evil
+and confusing, and we don't even need to use it. Also add the ability
+to set OPENVPN_DEBUG to get more info out of openvpn.
+---
+diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
+index 346df20..6cde642 100644
+--- a/src/nm-openvpn-service.c
++++ b/src/nm-openvpn-service.c
+@@ -287,6 +287,35 @@ ovpn_quote_string (const char *unquoted)
+ return quoted;
+ }
+
++/* sscanf is evil, and since we can't use glib regexp stuff since it's still
++ * too new for some distros, do a simple match here.
++ */
++static char *
++get_detail (const char *input, const char *prefix)
++{
++ char *ret = NULL;
++ guint32 i = 0;
++ const char *p, *start;
++
++ g_return_val_if_fail (prefix != NULL, NULL);
++
++ if (!g_str_has_prefix (input, prefix))
++ return NULL;
++
++ /* Grab characters until the next ' */
++ p = start = input + strlen (prefix);
++ while (*p) {
++ if (*p == '\'') {
++ ret = g_malloc0 (i + 1);
++ strncpy (ret, start, i);
++ break;
++ }
++ p++, i++;
++ }
++
++ return ret;
++}
++
+ static gboolean
+ handle_management_socket (NMVPNPlugin *plugin,
+ GIOChannel *source,
+@@ -295,7 +324,7 @@ handle_management_socket (NMVPNPlugin *plugin,
+ {
+ NMOpenvpnPluginIOData *io_data = NM_OPENVPN_PLUGIN_GET_PRIVATE (plugin)->io_data;
+ gboolean again = TRUE;
+- char *str = NULL, *auth, *buf;
++ char *str = NULL, *auth = NULL, *buf;
+ gsize written;
+
+ if (!(condition & G_IO_IN))
+@@ -307,7 +336,8 @@ handle_management_socket (NMVPNPlugin *plugin,
+ if (strlen (str) < 1)
+ goto out;
+
+- if (sscanf (str, ">PASSWORD:Need '%a[^']'", &auth) > 0) {
++ auth = get_detail (str, ">PASSWORD:Need '");
++ if (auth) {
+ if (strcmp (auth, "Auth") == 0) {
+ if (io_data->username != NULL && io_data->password != NULL) {
+ char *quser, *qpass;
+@@ -351,8 +381,11 @@ handle_management_socket (NMVPNPlugin *plugin,
+ *out_failure = NM_VPN_PLUGIN_FAILURE_CONNECT_FAILED;
+ again = FALSE;
+ }
+- free (auth);
+- } else if (sscanf (str, ">PASSWORD:Verification Failed: '%a[^']'", &auth) > 0) {
++ g_free (auth);
++ }
++
++ auth = get_detail (str, ">PASSWORD:Verification Failed: '");
++ if (auth) {
+ if (!strcmp (auth, "Auth"))
+ nm_warning ("Password verification failed");
+ else if (!strcmp (auth, "Private Key"))
+@@ -360,7 +393,7 @@ handle_management_socket (NMVPNPlugin *plugin,
+ else
+ nm_warning ("Unknown verification failed: %s", auth);
+
+- free (auth);
++ g_free (auth);
+
+ if (out_failure)
+ *out_failure = NM_VPN_PLUGIN_FAILURE_LOGIN_FAILED;
+@@ -688,6 +721,7 @@ nm_openvpn_start_openvpn_binary (NMOpenvpnPlugin *plugin,
+ add_openvpn_arg (args, "--auth");
+ add_openvpn_arg (args, auth);
+ }
++ add_openvpn_arg (args, "--auth-nocache");
+
+ /* TA */
+ tmp = nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_TA);
+@@ -700,9 +734,14 @@ nm_openvpn_start_openvpn_binary (NMOpenvpnPlugin *plugin,
+ add_openvpn_arg (args, tmp);
+ }
+
+- /* Syslog */
+- add_openvpn_arg (args, "--syslog");
+- add_openvpn_arg (args, "nm-openvpn");
++ if (getenv ("OPENVPN_DEBUG")) {
++ add_openvpn_arg (args, "--verb");
++ add_openvpn_arg (args, "10");
++ } else {
++ /* Syslog */
++ add_openvpn_arg (args, "--syslog");
++ add_openvpn_arg (args, "nm-openvpn");
++ }
+
+ /* Punch script security in the face; this option was added to OpenVPN 2.1-rc9
+ * and defaults to disallowing any scripts, a behavior change from previous
+--
+cgit v0.8.2
diff --git a/net-misc/networkmanager-openvpn/networkmanager-openvpn-0.7.0.ebuild b/net-misc/networkmanager-openvpn/networkmanager-openvpn-0.7.0.ebuild
deleted file mode 100644
index 43601f41de1c..000000000000
--- a/net-misc/networkmanager-openvpn/networkmanager-openvpn-0.7.0.ebuild
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager-openvpn/networkmanager-openvpn-0.7.0.ebuild,v 1.2 2009/04/22 14:22:08 rbu Exp $
-
-inherit eutils versionator
-
-# NetworkManager likes itself with capital letters
-MY_P=${P/networkmanager/NetworkManager}
-MYPV_MINOR=$(get_version_component_range 1-2)
-
-DESCRIPTION="NetworkManager OpenVPN plugin."
-HOMEPAGE="http://www.gnome.org/projects/NetworkManager/"
-SRC_URI="mirror://gnome/sources/NetworkManager-openvpn/0.7/${MY_P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~arm ~amd64 ~ppc ~x86"
-IUSE="gnome"
-
-RDEPEND="
- =net-misc/networkmanager-${MYPV_MINOR}*
- >=net-misc/openvpn-2.1_rc9
- gnome? (
- >=gnome-base/gconf-2.20
- >=gnome-base/gnome-keyring-2.20
- >=gnome-base/libglade-2
- >=gnome-base/libgnomeui-2.20
- >=x11-libs/gtk+-2.10
- )"
-
-DEPEND="${RDEPEND}
- dev-util/intltool
- dev-util/pkgconfig"
-
-S=${WORKDIR}/${MY_P}
-
-src_compile() {
- ECONF="--disable-more-warnings \
- $(use_with gnome)"
-
- econf ${ECONF}
- emake || die "emake failed"
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die "emake install failed"
-
- dodoc AUTHORS ChangeLog NEWS README || die "dodoc failed"
-}
diff --git a/net-misc/networkmanager-openvpn/networkmanager-openvpn-0.7.1.ebuild b/net-misc/networkmanager-openvpn/networkmanager-openvpn-0.7.1-r1.ebuild
index 7be965128572..309acbead37b 100644
--- a/net-misc/networkmanager-openvpn/networkmanager-openvpn-0.7.1.ebuild
+++ b/net-misc/networkmanager-openvpn/networkmanager-openvpn-0.7.1-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/networkmanager-openvpn/networkmanager-openvpn-0.7.1.ebuild,v 1.1 2009/04/22 14:22:08 rbu Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager-openvpn/networkmanager-openvpn-0.7.1-r1.ebuild,v 1.1 2009/08/24 14:11:40 dagger Exp $
EAPI=2
inherit eutils versionator
@@ -35,6 +35,12 @@ DEPEND="${RDEPEND}
S=${WORKDIR}/${MY_P}
+src_prepare() {
+
+ # fixes bug #282428
+ epatch "${FILESDIR}"/${P}-glibc2.10.fix.patch
+}
+
src_configure() {
ECONF="--disable-more-warnings \
$(use_with gnome)"