diff options
-rw-r--r-- | meta-networking/recipes-connectivity/openconnect/openconnect/0001-trojans-tncc-wrapper.py-convert-to-python3.patch | 71 | ||||
-rw-r--r-- | meta-networking/recipes-connectivity/openconnect/openconnect_8.10.bb (renamed from meta-networking/recipes-connectivity/openconnect/openconnect_8.03.bb) | 9 |
2 files changed, 6 insertions, 74 deletions
diff --git a/meta-networking/recipes-connectivity/openconnect/openconnect/0001-trojans-tncc-wrapper.py-convert-to-python3.patch b/meta-networking/recipes-connectivity/openconnect/openconnect/0001-trojans-tncc-wrapper.py-convert-to-python3.patch deleted file mode 100644 index 623ec101d3..0000000000 --- a/meta-networking/recipes-connectivity/openconnect/openconnect/0001-trojans-tncc-wrapper.py-convert-to-python3.patch +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | From de78bcac5e1fd13de0371c8e14b062b8786ade56 Mon Sep 17 00:00:00 2001 | ||
2 | From: Max Krummenacher <max.krummenacher@toradex.com> | ||
3 | Date: Sun, 2 Feb 2020 15:53:05 +0000 | ||
4 | Subject: [PATCH] trojans/tncc-wrapper.py: convert to python3 | ||
5 | |||
6 | Use 2to3 to convert the script to python3. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> | ||
11 | --- | ||
12 | trojans/tncc-wrapper.py | 14 +++++++------- | ||
13 | 1 file changed, 7 insertions(+), 7 deletions(-) | ||
14 | |||
15 | diff --git a/trojans/tncc-wrapper.py b/trojans/tncc-wrapper.py | ||
16 | index 0d4587bf..1a9a1f4d 100755 | ||
17 | --- a/trojans/tncc-wrapper.py | ||
18 | +++ b/trojans/tncc-wrapper.py | ||
19 | @@ -1,4 +1,4 @@ | ||
20 | -#!/usr/bin/python2 | ||
21 | +#!/usr/bin/python3 | ||
22 | |||
23 | # Lifted from Russ Dill's juniper-vpn-wrap.py, thus: | ||
24 | # | ||
25 | @@ -18,19 +18,19 @@ | ||
26 | |||
27 | import subprocess | ||
28 | import mechanize | ||
29 | -import cookielib | ||
30 | +import http.cookiejar | ||
31 | import getpass | ||
32 | import sys | ||
33 | import os | ||
34 | import zipfile | ||
35 | -import urllib | ||
36 | +import urllib.request, urllib.parse, urllib.error | ||
37 | import socket | ||
38 | import ssl | ||
39 | import errno | ||
40 | import argparse | ||
41 | import atexit | ||
42 | import signal | ||
43 | -import ConfigParser | ||
44 | +import configparser | ||
45 | import time | ||
46 | import binascii | ||
47 | import hmac | ||
48 | @@ -39,7 +39,7 @@ import hashlib | ||
49 | def mkdir_p(path): | ||
50 | try: | ||
51 | os.mkdir(path) | ||
52 | - except OSError, exc: | ||
53 | + except OSError as exc: | ||
54 | if exc.errno == errno.EEXIST and os.path.isdir(path): | ||
55 | pass | ||
56 | else: | ||
57 | @@ -64,9 +64,9 @@ class Tncc: | ||
58 | if zipfile.ZipFile(self.tncc_jar, 'r').testzip() is not None: | ||
59 | raise Exception() | ||
60 | except: | ||
61 | - print 'Downloading tncc.jar...' | ||
62 | + print('Downloading tncc.jar...') | ||
63 | mkdir_p(os.path.expanduser('~/.juniper_networks')) | ||
64 | - urllib.urlretrieve('https://' + self.vpn_host | ||
65 | + urllib.request.urlretrieve('https://' + self.vpn_host | ||
66 | + '/dana-cached/hc/tncc.jar', self.tncc_jar) | ||
67 | |||
68 | with zipfile.ZipFile(self.tncc_jar, 'r') as jar: | ||
69 | -- | ||
70 | 2.20.1 | ||
71 | |||
diff --git a/meta-networking/recipes-connectivity/openconnect/openconnect_8.03.bb b/meta-networking/recipes-connectivity/openconnect/openconnect_8.10.bb index 597c1920cf..a486cf0e05 100644 --- a/meta-networking/recipes-connectivity/openconnect/openconnect_8.03.bb +++ b/meta-networking/recipes-connectivity/openconnect/openconnect_8.10.bb | |||
@@ -4,9 +4,8 @@ LIC_FILES_CHKSUM = "file://COPYING.LGPL;md5=243b725d71bb5df4a1e5920b344b86ad" | |||
4 | 4 | ||
5 | SRC_URI = " \ | 5 | SRC_URI = " \ |
6 | git://git.infradead.org/users/dwmw2/openconnect.git \ | 6 | git://git.infradead.org/users/dwmw2/openconnect.git \ |
7 | file://0001-trojans-tncc-wrapper.py-convert-to-python3.patch \ | ||
8 | " | 7 | " |
9 | SRCREV = "ea73851969ae7a6ea54fdd2d2b8c94776af24b2a" | 8 | SRCREV = "9d287e40c57233190a51b6434ba7345370e36f38" |
10 | 9 | ||
11 | DEPENDS = "vpnc libxml2 krb5 gettext-native" | 10 | DEPENDS = "vpnc libxml2 krb5 gettext-native" |
12 | RDEPENDS_${PN} = "bash python3-core vpnc-script" | 11 | RDEPENDS_${PN} = "bash python3-core vpnc-script" |
@@ -23,7 +22,11 @@ PACKAGECONFIG[pcsc-lite] = "--with-libpcsclite,--without-libpcsclite,pcsc-lite," | |||
23 | 22 | ||
24 | S = "${WORKDIR}/git" | 23 | S = "${WORKDIR}/git" |
25 | 24 | ||
26 | inherit autotools pkgconfig | 25 | inherit autotools pkgconfig bash-completion |
27 | 26 | ||
28 | EXTRA_OECONF += "--with-vpnc-script=${sysconfdir}/vpnc/vpnc-script \ | 27 | EXTRA_OECONF += "--with-vpnc-script=${sysconfdir}/vpnc/vpnc-script \ |
29 | --disable-static" | 28 | --disable-static" |
29 | |||
30 | do_install_append() { | ||
31 | rm ${D}/usr/libexec/openconnect/hipreport-android.sh | ||
32 | } | ||