From 1a139c3c1b9504e03e393d0a72042c0a2972ea280f38a7254642daacdca08a60 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Fri, 28 Aug 2020 10:05:24 +0000 Subject: [PATCH] Accepting request 829828 from home:fbui:branches:network:vpn - Modernize openvpn.service * /var/run has been obsoleted since a long time. * on reload, send HUP signal directly rather than relying on killproc to look for the main process. - Explicitly requires sysvinit-tools as some of the tools shipped by this package are used in various places regardless of whether openvpn is built for systemd or non systemd systems. For the context: sysvinit-tools was pulled in by systemd since 2014 but it's no longer the case so better to be safe than sorry. OBS-URL: https://build.opensuse.org/request/show/829828 OBS-URL: https://build.opensuse.org/package/show/network:vpn/openvpn?expand=0&rev=152 --- openvpn.changes | 18 ++++++++++++++++++ openvpn.service | 6 +++--- openvpn.spec | 1 + 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/openvpn.changes b/openvpn.changes index acd6c54..1b82b04 100644 --- a/openvpn.changes +++ b/openvpn.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Wed Aug 26 17:12:44 UTC 2020 - Franck Bui + +- Modernize openvpn.service + * /var/run has been obsoleted since a long time. + * on reload, send HUP signal directly rather than relying on + killproc to look for the main process. + +------------------------------------------------------------------- +Wed Aug 26 17:00:43 UTC 2020 - Franck Bui + +- Explicitly requires sysvinit-tools as some of the tools shipped by + this package are used in various places regardless of whether + openvpn is built for systemd or non systemd systems. + + For the context: sysvinit-tools was pulled in by systemd since 2014 + but it's no longer the case so better to be safe than sorry. + ------------------------------------------------------------------- Wed Mar 4 07:30:38 UTC 2020 - Fabian Vogt diff --git a/openvpn.service b/openvpn.service index 247909a..895ebcb 100644 --- a/openvpn.service +++ b/openvpn.service @@ -6,10 +6,10 @@ PartOf=openvpn.target [Service] Type=notify PrivateTmp=true -PIDFile=/var/run/openvpn/%i.pid -ExecStart=/usr/sbin/openvpn --daemon openvpn@%i --suppress-timestamps --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf +PIDFile=/run/openvpn/%i.pid +ExecStart=/usr/sbin/openvpn --daemon openvpn@%i --suppress-timestamps --writepid /run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf # boo#1142830: "reload" does not work if openvpn drops root privileges after startup. -ExecReload=/sbin/killproc -p /var/run/openvpn/%i.pid -HUP /usr/sbin/openvpn +ExecReload=/usr/bin/kill -HUP $MAINPID [Install] WantedBy=multi-user.target openvpn.target diff --git a/openvpn.spec b/openvpn.spec index 2a42951..ab9e2f1 100644 --- a/openvpn.spec +++ b/openvpn.spec @@ -62,6 +62,7 @@ BuildRequires: pkcs11-helper-devel >= 1.11 BuildRequires: xz Requires: iproute2 Requires: pkcs11-helper >= 1.11 +Requires: sysvinit-tools %if %{with_systemd} BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(systemd)