Open a3s7p opened 11 months ago
Indeed, what our current tree does is not that useful.
I think the upstream source should never(!) install this file - if and where this gets installed is a distribution specific thing, so our installer should go, and it should be moved to the ebuild
, depending on options set there (or always, if useful for Gentoo).
That also sounds reasonable.
I figured if there is an installer supplied by upstream then you would prefer that package maintainers use it. When the set of installed files is changed, the changes also get propagated to every distro mostly "for free". Ultimately I can't object to it being a distro-specific matter though.
If this is the definitive upstream position on the matter, then this issue can be closed and we will instead change the ebuild in Gentoo to install the file itself while referring to this issue.
"Upstream" tends to have different opinions on systemd, alas. So we need to discuss this and come to a joint decision (and then patch distro/systemd/Makefile* accordingly). So let's keep this issue open for now.
Describe the bug
The
distro/systemd/tmpfiles-openvpn.conf
tmpfiles config only gets installed if systemd support is enabled by./configure --enable-systemd
, despite there being distros which have a working tmpfiles provider but do not use systemd as the init system.Enabling systemd support is not the correct solution, as this also installs the unit files and adds code through the
ENABLE_SYSTEMD
define, neither of which is desired on systems which do not use actually systemd as the init system.Therefore, the coupling of tmpfiles support to systemd support is incorrect.
To Reproduce
On Gentoo with
USE=-systemd
, for example OpenRC:Expected behavior
There is a way to install the tmpfiles config for use by any tmpfiles provider without enabling systemd support.
Version information:
Additional context
Installing the
net-vpn/openvpn-2.6.8
package on Gentoo with OpenRC produces the following output:On further investigation, this happens because the package for openvpn calls
systemd-tmpfiles --create openvpn.conf
as a post-installation step, but theopenvpn.conf
tmpfiles config is not installed on the system because systemd support is disabled by-systemd
USE flag since OpenRC is used as the init system.In Gentoo, the
systemd-tmpfiles
binary is provided by thesys-apps/systemd-utils
package.This package is depended upon by a few other crucial bits and it is therefore always installed on a Gentoo OpenRC system.
I suspect Alpine and other non-systemd distros also run into this.
I do not think this is a distro issue since the underlying assumption of the OpenVPN build scripts that a full systemd installation is the only possible tmpfiles provider does not hold true.
In this case we do not need the unit files or code for systemd since the init system is OpenRC but we do support and would like to have the tmpfiles config.
So ideally, these should be decoupled from each other, with
--enable-systemd
implying--enable-tmpfiles
but--enable-tmpfiles
being available independently of--enable-systemd
and disabled by default.I am happy to submit a patch if there is consensus that this is the correct approach.