FS#43278 - [openvpn] Use systemd units provided by upstream

Attached to Project: Arch Linux
Opened by Daniel M. Capella (polyzen) - Wednesday, 31 December 2014, 01:15 GMT
Last edited by Christian Hesse (eworm) - Wednesday, 17 August 2016, 16:44 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Christian Hesse (eworm)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:
Upstream provides systemd units[1] in the source tarball.[2] Please use these.

[1]https://github.com/OpenVPN/openvpn/commit/3341a98c2852d1d0c1eafdc70a3bdb218ec29049
[2]https://github.com/OpenVPN/openvpn/commit/6ece60c6dc7a3cda58f4dfea4e6cd3016023234f
This task depends upon

Closed by  Christian Hesse (eworm)
Wednesday, 17 August 2016, 16:44 GMT
Reason for closing:  Implemented
Additional comments about closing:  openvpn@.service from openvpn 2.3.11-3 starts after network-online.target
Comment by Leonard de Ruijter (leonard) - Friday, 19 June 2015, 20:26 GMT
This will probably fix a bug i'm having with the current systemd unit. Since it doesn't check whether the network is online, it currently fails in one of my client configurations. It seem to start earlier than systemd-resolved, meaning that it can't resolve the host name of my openvpn server. Please include the new upstream units asap.
Comment by Kai Hendry (hendry) - Thursday, 06 August 2015, 15:21 GMT
I can confirm there is a bug with the current service file. https://github.com/systemd/systemd/issues/870

The upstream one works better, though I removed the client dir as to match Archlinux's structure:
http://s.natalian.org/2015-08-06/openvpn@.service
http://s.natalian.org/2015-08-06/openvpn.conf <-- /usr/lib/tmpfiles.d/openvpn.conf to create /var/run/openvpn !
Comment by Kyle (2bluesc) - Wednesday, 21 October 2015, 19:34 GMT
My VPNs fail until the network is up as well. Depending on network-online.target would be idea.
Comment by Christian Hesse (eworm) - Wednesday, 17 August 2016, 16:42 GMT
I will not change the package to use upstream unit files. That would break every single existing configuration.

I updated our unit file, though. It now starts after network-online.target, but does not pull it as a dependency.
You have two options now:

1. Any other unit depends on network-online.target and pulls it in.
2. You enable it yourself. As network-online.target does not have an install section you need to do this manually:

mkdir /etc/systemd/system/openvpn@.service.wants
ln -s /usr/lib/systemd/system/network-online.target /etc/systemd/system/openvpn@.service.wants/network-online.target

Loading...