Open LinuxMeow opened 1 year ago
Installing cloudflared on Gentoo Linux works as intended and expected, especially on systemd installation.
cloudflared
Gentoo Linux
systemd
However there is a problem with open-rc version of Gentoo Linux.
open-rc
It incorrectly detects init system as SysV which causes
SysV
doas cloudflared --config ~/.cloudflared.config.yaml service install
to fail cause it is trying to execute service command instead of rc-service.
service
rc-service
To Reproduce Steps to reproduce the behavior:
doas cloudflared --config ~/.cloudflared/config.yaml service install
sudo
doas
$PATH
If it's an issue with Cloudflare Tunnel:
Irrelevant (correctly configured)
Cloudflare detects proper open-rc init system and tries to execute rc-service command accordingly instead of service.
Environment and versions
It doesn't affect the function of the tunnel itself, and it is also possible to manually install service without cloudflared command.
Close # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 EGIT_REPO_URI="https://github.com/cloudflare/${PN}.git" inherit git-r3 go-module systemd DESCRIPTION="Argo Tunnel client" HOMEPAGE="https://github.com/cloudflare/cloudflared" SRC_URI="" LICENSE="Cloudflare" SLOT="0" KEYWORDS="" RESTRICT="test" # needs net RDEPEND="acct-user/cloudflared" DOCS=( {CHANGES,README}.md RELEASE_NOTES ) src_unpack() { git-r3_src_unpack } src_prepare() { default DATE="$(date -u '+%Y-%m-%d-%H%M UTC')" sed -i -e "s/\${VERSION}/${PV}/" \ -e "s/\${DATE}/${DATE}/" cloudflared_man_template \ || die "sed failed for cloudflared_man_template" } src_compile() { DATE="$(date -u '+%Y-%m-%d-%H%M UTC')" LDFLAGS="-X main.Version=${PV} -X \"main.BuildTime=${DATE}\"" go build -v -mod=vendor -ldflags="${LDFLAGS}" ./cmd/cloudflared || die "build failed" } src_test() { go test -v -mod=vendor -work ./... || die "test failed" } src_install() { einstalldocs newman cloudflared_man_template cloudflared.1 dobin cloudflared insinto /etc/cloudflared doins "${FILESDIR}"/config.yml newinitd "${FILESDIR}"/cloudflared.initd cloudflared newconfd "${FILESDIR}"/cloudflared.confd cloudflared systemd_dounit "${FILESDIR}"/cloudflared.service }
Relevant to questioned info about version in previous step.
Package is compiled under Gentoo Linux version 9999 (or latest version).
Only relevant for documenting the package version, not relevant in the actual issue caused.
Thanks for this @LinuxMeow ! Unfortunately, I dont see this as something we'll be getting to anytime soon. Do you want to help with this?
Describe the bug
This is not an affecting issue for the functionality nor it is high priority issue or anything I just thought of adding it as suggestion here.
Installing
cloudflared
onGentoo Linux
works as intended and expected, especially onsystemd
installation.However there is a problem with
open-rc
version ofGentoo Linux
.It incorrectly detects init system as
SysV
which causesto fail cause it is trying to execute
service
command instead ofrc-service
.To Reproduce Steps to reproduce the behavior:
doas cloudflared --config ~/.cloudflared/config.yaml service install
(orsudo
instead ofdoas
)service
command not in$PATH
If it's an issue with Cloudflare Tunnel:
Irrelevant (correctly configured)
Irrelevant (correctly configured)
Expected behavior
Cloudflared service install detects open-rc init
Cloudflare detects proper
open-rc
init system and tries to executerc-service
command accordingly instead ofservice
.Environment and versions
Logs and errors
Errors as described previously.
It doesn't affect the function of the tunnel itself, and it is also possible to manually install service without
cloudflared
command.Additional info
Ebuild file config for compilation
Relevant to questioned info about version in previous step.
Package is compiled under
Gentoo Linux
version 9999 (or latest version).Only relevant for documenting the package version, not relevant in the actual issue caused.