commit:     17b9dab6d7d190b40a4cd0b6f01c190d6a84a698
Author:     Petru Ciobanu <scantlight <AT> gmail <DOT> com>
AuthorDate: Sun Oct 17 00:16:52 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct 20 03:26:11 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17b9dab6

net-vpn/openfortivpn: Substitute BINDIR and SYSCONFDIR in systemd unit file

Those variables needs to be replaced with real location that contains
the expected executable and configuration.

Bug: https://bugs.gentoo.org/766357

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Petru Ciobanu <scantlight <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/systemd_substitute_bin_and_sysconfig_dirs.patch   | 13 +++++++++++++
 net-vpn/openfortivpn/openfortivpn-1.17.1.ebuild             |  4 ++++
 2 files changed, 17 insertions(+)

diff --git 
a/net-vpn/openfortivpn/files/systemd_substitute_bin_and_sysconfig_dirs.patch 
b/net-vpn/openfortivpn/files/systemd_substitute_bin_and_sysconfig_dirs.patch
new file mode 100644
index 00000000000..4cfe57c4654
--- /dev/null
+++ b/net-vpn/openfortivpn/files/systemd_substitute_bin_and_sysconfig_dirs.patch
@@ -0,0 +1,13 @@
+diff --git a/lib/systemd/system/[email protected] 
b/lib/systemd/system/[email protected]
+index 6c30230..3ff3d7c 100644
+--- a/lib/systemd/system/[email protected]
++++ b/lib/systemd/system/[email protected]
+@@ -6,7 +6,7 @@ Documentation=man:openfortivpn(1)
+ [Service]
+ Type=simple
+ PrivateTmp=true
+-ExecStart=@BINDIR@/openfortivpn -c @SYSCONFDIR@/openfortivpn/%I.conf
++ExecStart=/usr/bin/openfortivpn -c /etc/openfortivpn/%I.conf
+ OOMScoreAdjust=-100
+ 
+ [Install]

diff --git a/net-vpn/openfortivpn/openfortivpn-1.17.1.ebuild 
b/net-vpn/openfortivpn/openfortivpn-1.17.1.ebuild
index 0c64cdfd137..634f0884bc8 100644
--- a/net-vpn/openfortivpn/openfortivpn-1.17.1.ebuild
+++ b/net-vpn/openfortivpn/openfortivpn-1.17.1.ebuild
@@ -21,6 +21,10 @@ RDEPEND="${DEPEND}"
 
 CONFIG_CHECK="~PPP ~PPP_ASYNC"
 
+PATCHES=(
+       "${FILESDIR}/systemd_substitute_bin_and_sysconfig_dirs.patch"
+)
+
 src_prepare() {
        default
 

Reply via email to