mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-24 11:37:20 -08:00
net-vpn/tailscale: add 1.104.5
Closes: https://bugs.gentoo.org/970212 Closes: https://bugs.gentoo.org/985229 Closes: https://bugs.gentoo.org/973372 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
This commit is contained in:
@@ -1,2 +1,4 @@
|
||||
DIST tailscale-1.104.4-vendor.tar.xz 62243420 BLAKE2B 1d16b47bde7694380928c15c98aed3bbf67ad1728470900ea3a37e24236089aafe6a3bfd0b5c07de43b0392346803a8aa47fc78ed0e86f6aad571dc0a94cc3a0 SHA512 f20aefc2110d2c3820b42d65d9a8a794c505fb58f3c175fd87f5bbd7b4514bf6f271d0fa94a8f721aae4bc6d212af4514816878f8e602f15d6b4cd4cafdf1f7a
|
||||
DIST tailscale-1.104.4.tar.gz 5854559 BLAKE2B 4b5f3e5c813b93b8b3f25f9b94650f5293326ff469752e4c424e98a1d857bc1d7713b89d93ee78bc02b7e312b837170299cd2fa9eae0f97b15f9c2151508d578 SHA512 3210900fbec35af8ee20897a1a8439df64f7bd20f4818906b19911e9f092fed7e2e6f6fe74da636506a68a1f12e7bbfa533f4d9a35f5a66ffdb0cc1b742a67ea
|
||||
DIST tailscale-1.104.5-vendor.tar.xz 62257296 BLAKE2B 0cb775e84ada47c2ea0cfc1a2ed102bee5100d01dbb200f042685d4a37ee4925e4220ea3ae70a1133a0d667e9ae9d49eb949bb6e33cdf86f8727c4348cd524f7 SHA512 4be4879c44e001bb044c1458a05480614da50f0889b52c6229110247a84c78be271264be3e21bbb2515ca01b439b4090c1d13ae6d07a040c984dc66e517a5e68
|
||||
DIST tailscale-1.104.5.tar.gz 5868273 BLAKE2B bc8932a84015524d5be383988ba68f0c3bdf9b1b58908cb6885eb7549cbfa64947ea73761c6ecd97d3f22c56f52d2836dfb85b2b41fd9cc624b087430c114a70 SHA512 7ec6fcb9fc099db49c0067c1579acd67260e916fe1a55a7df0a14a8052c6bb4e14416c58ed6104bb5257662a74a078f8434e74ca1dab2bf2c063db46dda0049a
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 2020-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
name="tailscaled"
|
||||
description="Tailscale node agent"
|
||||
command=/usr/sbin/tailscaled
|
||||
command_args="--state=/var/lib/tailscale/tailscaled.state --socket=/run/tailscale/tailscaled.sock --port=${tailscaled_port:-41641} ${tailscaled_args}"
|
||||
supervisor=supervise-daemon
|
||||
retry="${retry:-SIGTERM/30/SIGKILL/5}"
|
||||
|
||||
depend() {
|
||||
use net dns logger
|
||||
after firewall
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath -d -m 0755 /run/tailscale
|
||||
checkpath -d -m 0750 /var/lib/tailscale
|
||||
}
|
||||
|
||||
stop_post() {
|
||||
# Restore DNS configuration, routes and firewall rules, as upstream's
|
||||
# systemd unit does, so a stopped tailscaled doesn't leave the system
|
||||
# with a broken resolver.
|
||||
ebegin "Cleaning up tailscale system state"
|
||||
${command} --cleanup
|
||||
eend $?
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
# Copyright 2020-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit go-module linux-info shell-completion systemd sysroot tmpfiles
|
||||
|
||||
# They should be updated on every bump.
|
||||
VERSION_GIT_HASH=73a48057aaf5f60e4f770b398e9b7af576b01dbe
|
||||
VERSION_MINOR=$(ver_cut 2)
|
||||
VERSION_SHORT=${PV}
|
||||
VERSION_LONG=${PV}-t${VERSION_GIT_HASH::9}
|
||||
|
||||
DESCRIPTION="Tailscale vpn client"
|
||||
HOMEPAGE="https://tailscale.com"
|
||||
SRC_URI="https://github.com/tailscale/tailscale/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
SRC_URI+=" https://github.com/gentoo-golang-dist/${PN}/releases/download/v${PV}/${P}-vendor.tar.xz"
|
||||
|
||||
LICENSE="MIT"
|
||||
# Dependent licenses
|
||||
LICENSE+=" Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
|
||||
RESTRICT="test"
|
||||
|
||||
CONFIG_CHECK="~TUN"
|
||||
|
||||
RDEPEND="|| ( net-firewall/iptables net-firewall/nftables )"
|
||||
BDEPEND=">=dev-lang/go-1.27.3"
|
||||
|
||||
src_compile() {
|
||||
# This translates the build command from upstream's build_dist.sh to an
|
||||
# ebuild equivalent.
|
||||
local go_ldflags=(
|
||||
-X tailscale.com/version.longStamp=${VERSION_LONG}
|
||||
-X tailscale.com/version.shortStamp=${VERSION_SHORT}
|
||||
-X tailscale.com/version.gitCommitStamp=${VERSION_GIT_HASH}
|
||||
)
|
||||
# ts_omit_clientupdate: don't let tailscaled replace the binaries
|
||||
# installed by portage with upstream's tarball, bug #970212
|
||||
ego build -tags xversion,ts_omit_clientupdate -ldflags "${go_ldflags[*]}" -o bin/ ./cmd/tailscale ./cmd/tailscaled
|
||||
|
||||
einfo "generating shell completion files"
|
||||
sysroot_try_run_prefixed ./bin/tailscale completion bash > ${PN}.bash || die
|
||||
sysroot_try_run_prefixed ./bin/tailscale completion zsh > ${PN}.zsh || die
|
||||
sysroot_try_run_prefixed ./bin/tailscale completion fish > ${PN}.fish || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dosbin bin/tailscaled
|
||||
dobin bin/tailscale
|
||||
|
||||
systemd_dounit cmd/tailscaled/{tailscaled.service,tailscale-online.target,tailscale-wait-online.service}
|
||||
insinto /etc/default
|
||||
newins cmd/tailscaled/tailscaled.defaults tailscaled
|
||||
keepdir /var/lib/${PN}
|
||||
fperms 0750 /var/lib/${PN}
|
||||
|
||||
newtmpfiles "${FILESDIR}/${PN}.tmpfiles" ${PN}.conf
|
||||
|
||||
newinitd "${FILESDIR}/${PN}d-r1.initd" ${PN}
|
||||
newconfd "${FILESDIR}/${PN}d.confd" ${PN}
|
||||
|
||||
[[ -s ${PN}.bash ]] && newbashcomp ${PN}.bash ${PN}
|
||||
[[ -s ${PN}.zsh ]] && newzshcomp ${PN}.zsh _${PN}
|
||||
[[ -s ${PN}.fish ]] && dofishcomp ${PN}.fish
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
tmpfiles_process ${PN}.conf
|
||||
}
|
||||
Reference in New Issue
Block a user