net-misc/openvpn: Revision bump, pull in upstrea patches to fix 100% cpu issue
authorPatrick McLean <chutzpah@gentoo.org>
Sat, 10 Dec 2016 23:53:25 +0000 (15:53 -0800)
committerPatrick McLean <chutzpah@gentoo.org>
Sat, 10 Dec 2016 23:53:25 +0000 (15:53 -0800)
Gentoo-Bug: 601646

Package-Manager: portage-2.3.3

net-misc/openvpn/files/openvpn-2.4_rc1-arm-inotify-only-in-server-mode.patch [new file with mode: 0644]
net-misc/openvpn/files/openvpn-2.4_rc1-fix-async-push.patch [new file with mode: 0644]
net-misc/openvpn/openvpn-2.4_rc1-r2.ebuild [moved from net-misc/openvpn/openvpn-2.4_rc1-r1.ebuild with 97% similarity]

diff --git a/net-misc/openvpn/files/openvpn-2.4_rc1-arm-inotify-only-in-server-mode.patch b/net-misc/openvpn/files/openvpn-2.4_rc1-arm-inotify-only-in-server-mode.patch
new file mode 100644 (file)
index 0000000..94d80b6
--- /dev/null
@@ -0,0 +1,30 @@
+commit 7084a3993fa35c6fb71abe8aac7b30f442205e2a
+Author: Lev Stipakov <lstipakov@gmail.com>
+Date:   Wed Dec 7 01:45:51 2016 +0200
+
+    Arm inotify only in server mode
+    
+    Async-push is a server side feature and inotify_fd is
+    initialized in server mode.
+    
+    Trac: #786
+    Signed-off-by: Lev Stipakov <lstipakov@gmail.com>
+    Acked-by: David Sommerseth <davids@openvpn.net>
+    Message-Id: <1481067951-28917-1-git-send-email-lstipakov@gmail.com>
+    URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg13415.html
+    Signed-off-by: David Sommerseth <davids@openvpn.net>
+
+diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c
+index b50a2e0..4502e10 100644
+--- a/src/openvpn/forward.c
++++ b/src/openvpn/forward.c
+@@ -1578,7 +1578,8 @@ io_wait_dowork (struct context *c, const unsigned int flags)
+ 
+ #ifdef ENABLE_ASYNC_PUSH
+   /* arm inotify watcher */
+-  event_ctl (c->c2.event_set, c->c2.inotify_fd, EVENT_READ, (void*)&file_shift);
++  if (c->options.mode == MODE_SERVER)
++    event_ctl (c->c2.event_set, c->c2.inotify_fd, EVENT_READ, (void*)&file_shift);
+ #endif
+ 
+   /*
diff --git a/net-misc/openvpn/files/openvpn-2.4_rc1-fix-async-push.patch b/net-misc/openvpn/files/openvpn-2.4_rc1-fix-async-push.patch
new file mode 100644 (file)
index 0000000..93b9045
--- /dev/null
@@ -0,0 +1,32 @@
+commit e62eccf025aa60ec268787d2aa4a46310ed1cd60
+Author: David Sommerseth <davids@openvpn.net>
+Date:   Tue Dec 6 23:10:51 2016 +0100
+
+    Fix wrong configure.ac parsing of --enable-async-push
+    
+    AC_ARG_ENABLE() was used wrong, which led enable_async_push to
+    always be set, regardless if --enable-async-push or --disable-async-push
+    was used.
+    
+    Also spotted the exact same patch when writing this commit message as
+    GitHub PR#70.
+    
+    Trac: #786
+    Signed-off-by: David Sommerseth <davids@openvpn.net>
+    Acked-by: Lev Stipakov <lstipakov@gmail.com>
+    Message-Id: <1481062251-18349-1-git-send-email-davids@openvpn.net>
+    URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg13411.html
+
+diff --git a/configure.ac b/configure.ac
+index f4073d0..27bdcc3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -267,7 +267,7 @@ AC_ARG_ENABLE(
+ AC_ARG_ENABLE(
+       [async-push],
+       [AS_HELP_STRING([--enable-async-push], [enable async-push support @<:@default=no@:>@])],
+-      [enable_async_push="yes"],
++      ,
+       [enable_async_push="no"]
+ )
+ 
similarity index 97%
rename from net-misc/openvpn/openvpn-2.4_rc1-r1.ebuild
rename to net-misc/openvpn/openvpn-2.4_rc1-r2.ebuild
index fb7d30df88715dd034a5140cbd8350333ad54637..2b6db91b84081b35ae94de6beea1318febc50355 100644 (file)
@@ -54,6 +54,8 @@ CONFIG_CHECK="~TUN"
 
 PATCHES=(
        "${FILESDIR}/${PN}-external-cmocka.patch"
+       "${FILESDIR}/${P}-arm-inotify-only-in-server-mode.patch"
+       "${FILESDIR}/${P}-fix-async-push.patch"
 )
 
 pkg_setup()  {