diff options
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | 0002-systemd.patch | 84 | ||||
-rw-r--r-- | PKGBUILD | 11 |
3 files changed, 5 insertions, 96 deletions
@@ -1,8 +1,8 @@ # Generated by mksrcinfo v8 -# Thu Dec 1 11:21:01 UTC 2016 +# Fri Dec 2 09:43:41 UTC 2016 pkgbase = openvpn-git pkgdesc = An easy-to-use, robust and highly configurable VPN (Virtual Private Network) - git checkout - pkgver = 2.4.beta2.r11.gce91c18 + pkgver = 2.4.rc1.r0.ge739d7f pkgrel = 1 url = http://openvpn.net/index.php/open-source.html arch = i686 @@ -22,10 +22,8 @@ pkgbase = openvpn-git conflicts = openvpn-dev source = git://git.code.sf.net/p/openvpn/openvpn source = 0001-plugin.patch - source = 0002-systemd.patch sha256sums = SKIP sha256sums = b8254067b4ef5d157d87267a76938d86f101972303c7ff20131cc9f28659a30c - sha256sums = f7784be28282ad36a7f03140d828912506dfcc0babee08551b63b67bfa0074ea pkgname = openvpn-git diff --git a/0002-systemd.patch b/0002-systemd.patch deleted file mode 100644 index 210b305ab421..000000000000 --- a/0002-systemd.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff --git a/distro/systemd/openvpn-client@.service b/distro/systemd/openvpn-client@.service -index 18b84dd..5618af3 100644 ---- a/distro/systemd/openvpn-client@.service -+++ b/distro/systemd/openvpn-client@.service -@@ -7,11 +7,11 @@ Documentation=https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage - Documentation=https://community.openvpn.net/openvpn/wiki/HOWTO - - [Service] -+Type=notify - PrivateTmp=true - RuntimeDirectory=openvpn-client - RuntimeDirectoryMode=0710 - WorkingDirectory=/etc/openvpn/client --ExecStartPre=/bin/sh -c 'grep -q -E ^daemon %i.conf || exit 0 && /usr/bin/echo "OpenVPN configuration cannot contain --daemon when being managed by systemd" ; exit 1' - ExecStart=/usr/sbin/openvpn --suppress-timestamps --nobind --config %i.conf - CapabilityBoundingSet=CAP_IPC_LOCK CAP_NET_ADMIN CAP_NET_RAW CAP_SETGID CAP_SETUID CAP_SYS_CHROOT CAP_DAC_OVERRIDE - LimitNPROC=10 -diff --git a/distro/systemd/openvpn-server@.service b/distro/systemd/openvpn-server@.service -index a2b7b52..b9b4dba 100644 ---- a/distro/systemd/openvpn-server@.service -+++ b/distro/systemd/openvpn-server@.service -@@ -7,11 +7,11 @@ Documentation=https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage - Documentation=https://community.openvpn.net/openvpn/wiki/HOWTO - - [Service] -+Type=notify - PrivateTmp=true - RuntimeDirectory=openvpn-server - RuntimeDirectoryMode=0710 - WorkingDirectory=/etc/openvpn/server --ExecStartPre=/bin/sh -c 'grep -q -E ^daemon %i.conf || exit 0 && /usr/bin/echo "OpenVPN configuration cannot contain --daemon when being managed by systemd" ; exit 1' - ExecStart=/usr/sbin/openvpn --status %t/openvpn-server/status-%i.log --status-version 2 --suppress-timestamps --config %i.conf - CapabilityBoundingSet=CAP_IPC_LOCK CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_SETGID CAP_SETUID CAP_SYS_CHROOT CAP_DAC_OVERRIDE - LimitNPROC=10 -diff --git a/src/openvpn/init.c b/src/openvpn/init.c -index 2ccbab2..7ab5c52 100644 ---- a/src/openvpn/init.c -+++ b/src/openvpn/init.c -@@ -926,6 +926,13 @@ bool - possibly_become_daemon (const struct options *options) - { - bool ret = false; -+ -+#ifdef ENABLE_SYSTEMD -+ /* return without forking if we are running from systemd */ -+ if (sd_notify(0, "READY=0") > 0) -+ return ret; -+#endif -+ - if (options->daemon) - { - ASSERT (!options->inetd); -@@ -1251,10 +1258,16 @@ initialization_sequence_completed (struct context *c, const unsigned int flags) - show_adapters (M_INFO|M_NOPREFIX); - msg (M_INFO, "%s With Errors ( see http://openvpn.net/faq.html#dhcpclientserv )", message); - #else -+#ifdef ENABLE_SYSTEMD -+ sd_notifyf(0, "STATUS=Failed to start up: %s With Errors\nERRNO=1", message); -+#endif /* HAVE_SYSTEMD_SD_DAEMON_H */ - msg (M_INFO, "%s With Errors", message); - #endif - } - else -+#ifdef ENABLE_SYSTEMD -+ sd_notifyf(0, "READY=1\nSTATUS=%s\nMAINPID=%lu", message, (unsigned long) getpid()); -+#endif - msg (M_INFO, "%s", message); - - /* Flag that we initialized */ -diff --git a/src/openvpn/init.h b/src/openvpn/init.h -index 524bc64..0518b06 100644 ---- a/src/openvpn/init.h -+++ b/src/openvpn/init.h -@@ -27,6 +27,10 @@ - - #include "openvpn.h" - -+#ifdef ENABLE_SYSTEMD -+#include <systemd/sd-daemon.h> -+#endif -+ - /* - * Baseline maximum number of events - * to wait for. @@ -1,7 +1,7 @@ # Maintainer: Christian Hesse <mail@eworm.de> pkgname=openvpn-git -pkgver=2.4.beta2.r11.gce91c18 +pkgver=2.4.rc1.r0.ge739d7f pkgrel=1 pkgdesc='An easy-to-use, robust and highly configurable VPN (Virtual Private Network) - git checkout' arch=(i686 x86_64) @@ -14,11 +14,9 @@ provides=('openvpn=2.4.0' 'openvpn-dev') license=('custom') # for 2.3.x release branch use: git://git.code.sf.net/p/openvpn/openvpn#branch=release/2.3 source=('git://git.code.sf.net/p/openvpn/openvpn' - '0001-plugin.patch' - '0002-systemd.patch') + '0001-plugin.patch') sha256sums=('SKIP' - 'b8254067b4ef5d157d87267a76938d86f101972303c7ff20131cc9f28659a30c' - 'f7784be28282ad36a7f03140d828912506dfcc0babee08551b63b67bfa0074ea') + 'b8254067b4ef5d157d87267a76938d86f101972303c7ff20131cc9f28659a30c') pkgver() { cd openvpn/ @@ -40,9 +38,6 @@ prepare() { # plugin path patch -Np1 < "${srcdir}"/0001-plugin.patch - - # modifications to upstream systemd integration - patch -Np1 < "${srcdir}"/0002-systemd.patch } build() { |