Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 618722 - net-vpn/openvpn-2.4.2 - incorrect installation of systemd units and tmpfiles.d config
Summary: net-vpn/openvpn-2.4.2 - incorrect installation of systemd units and tmpfiles....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2017-05-17 08:21 UTC by Alexander Tsoy
Modified: 2017-05-28 22:40 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
openvpn-2.4.2:20170517-072707.log.gz (openvpn-2.4.2:20170517-072707.log.gz,19.75 KB, application/gzip)
2017-05-17 08:21 UTC, Alexander Tsoy
Details
openvpn-9999 patch (openvpn.patch,883 bytes, patch)
2017-05-17 08:22 UTC, Alexander Tsoy
Details | Diff
0001-net-vpn-openvpn-fix-installation-of-systemd-units-an.patch (0001-net-vpn-openvpn-fix-installation-of-systemd-units-an.patch,2.42 KB, patch)
2017-05-17 08:50 UTC, Alexander Tsoy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Tsoy 2017-05-17 08:21:09 UTC
Created attachment 472898 [details]
openvpn-2.4.2:20170517-072707.log.gz

$ qlist openvpn | grep tmpfile
/usr/lib/tmpfiles.d/openvpn.conf
/usr/lib64/tmpfiles.d/openvpn.conf

$ qlist openvpn | grep systemd
/usr/lib/systemd/system/openvpn-server@.service
/usr/lib/systemd/system/openvpn-client@.service
/usr/lib64/systemd/system/openvpn-server@.service
/usr/lib64/systemd/system/openvpn-client@.service

$ cat /usr/lib/tmpfiles.d/openvpn.conf
D /var/run/openvpn 0710 root openvpn -

$ cat /usr/lib64/tmpfiles.d/openvpn.conf
d /run/openvpn-client 0710 root root -
d /run/openvpn-server 0710 root root -
Comment 1 Alexander Tsoy 2017-05-17 08:22:16 UTC
Created attachment 472900 [details, diff]
openvpn-9999 patch

Patch for 2.4.2 and 9999
Comment 2 Alexander Tsoy 2017-05-17 08:49:03 UTC
To clarify this a bit: openvpn currently doesn't start with systemd due to missing /run/openvpn-{client,server} directories.
Comment 3 Alexander Tsoy 2017-05-17 08:50:44 UTC
Created attachment 472906 [details, diff]
0001-net-vpn-openvpn-fix-installation-of-systemd-units-an.patch

Proper git patch. Just in the case you prefer that.
Comment 4 Alexander Tsoy 2017-05-17 08:57:32 UTC
(In reply to Alexander Tsoy from comment #2)
> To clarify this a bit: openvpn currently doesn't start with systemd due to
> missing /run/openvpn-{client,server} directories.

More specifically, it fails to start only in server mode due to --status option:

$ grep ExecStart /usr/lib/systemd/system/openvpn-server@.service 
ExecStart=/usr/sbin/openvpn --status %t/openvpn-server/status-%i.log --status-version 2 --suppress-timestamps --config %i.conf
Comment 5 lou 2017-05-18 14:23:19 UTC
I'm running into a similar problem with 2.4.2, but I'm not using systemd...

[ebuild   R    ] net-vpn/openvpn-2.4.2::gentoo  USE="examples lzo pam plugins ssl -down-root -inotify -iproute2 (-libressl) -lz4 -mbedtls -pkcs11 (-polarssl) (-selinux) -static -systemd {-test}" 0 KiB

When trying to start...

/etc/init.d/openvpn start
 * Caching service dependencies ...                                                                                                   [ ok ]
 * Starting openvpn ...
 * start-stop-daemon: failed to start `/usr/sbin/openvpn'
 * Check your logs to see why startup failed                                                                                          [ !! ]
 * ERROR: openvpn failed to start

Nothing in my logs. Rolling back for now.
Comment 6 Manuel Rüger (RETIRED) gentoo-dev 2017-05-28 22:40:05 UTC
Thanks, applied as 

commit a85313eceb8e3e8d4031051c0d35336e41f42d7d (HEAD -> master, origin/master, origin/HEAD)
Author: Alexander Tsoy <alexander@tsoy.me>
Date:   Wed May 17 11:13:29 2017 +0300

    net-vpn/openvpn: fix installation of systemd units and tmpfiles
    
    Bug: https://bugs.gentoo.org/618722