diff options
| -rw-r--r-- | meta-networking/recipes-connectivity/tailscale/tailscale_1.84.3.bb | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/meta-networking/recipes-connectivity/tailscale/tailscale_1.84.3.bb b/meta-networking/recipes-connectivity/tailscale/tailscale_1.84.3.bb index 25b54ae93a..33ae1925d5 100644 --- a/meta-networking/recipes-connectivity/tailscale/tailscale_1.84.3.bb +++ b/meta-networking/recipes-connectivity/tailscale/tailscale_1.84.3.bb | |||
| @@ -22,7 +22,9 @@ GO_LINKSHARED = "" | |||
| 22 | GOBUILDFLAGS:prepend = "-tags=${@','.join(d.getVar('PACKAGECONFIG_CONFARGS').split())} " | 22 | GOBUILDFLAGS:prepend = "-tags=${@','.join(d.getVar('PACKAGECONFIG_CONFARGS').split())} " |
| 23 | GO_EXTRA_LDFLAGS = "-X tailscale.com/version.longStamp=${PV}-${SRCREV_SHORT} -X tailscale.com/version.shortStamp=${PV}" | 23 | GO_EXTRA_LDFLAGS = "-X tailscale.com/version.longStamp=${PV}-${SRCREV_SHORT} -X tailscale.com/version.shortStamp=${PV}" |
| 24 | 24 | ||
| 25 | inherit go-mod update-rc.d | 25 | inherit go-mod \ |
| 26 | ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'update-rc.d', '', d)} \ | ||
| 27 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} | ||
| 26 | 28 | ||
| 27 | PACKAGECONFIG ??= "aws bird capture cli kube ssh tap wakeonlan" | 29 | PACKAGECONFIG ??= "aws bird capture cli kube ssh tap wakeonlan" |
| 28 | PACKAGECONFIG[aws] = "ts_aws,ts_omit_aws" | 30 | PACKAGECONFIG[aws] = "ts_aws,ts_omit_aws" |
| @@ -39,6 +41,9 @@ INITSCRIPT_PACKAGES = "${PN}d" | |||
| 39 | INITSCRIPT_NAME:${PN}d = "tailscaled" | 41 | INITSCRIPT_NAME:${PN}d = "tailscaled" |
| 40 | INITSCRIPT_PARAMS:${PN}d = "defaults 91 9" | 42 | INITSCRIPT_PARAMS:${PN}d = "defaults 91 9" |
| 41 | 43 | ||
| 44 | SYSTEMD_PACKAGES = "${BPN}d" | ||
| 45 | SYSTEMD_SERVICE:${BPN}d = "${BPN}d.service" | ||
| 46 | |||
| 42 | # override do_install, since it installs in bin instead of sbin | 47 | # override do_install, since it installs in bin instead of sbin |
| 43 | do_install() { | 48 | do_install() { |
| 44 | install -d ${D}/${sbindir} | 49 | install -d ${D}/${sbindir} |
| @@ -49,22 +54,34 @@ do_install() { | |||
| 49 | ln -sr ${D}${sbindir}/tailscaled ${D}${bindir}/tailscale | 54 | ln -sr ${D}${sbindir}/tailscaled ${D}${bindir}/tailscale |
| 50 | fi | 55 | fi |
| 51 | 56 | ||
| 52 | install -d ${D}${sysconfdir}/default | ||
| 53 | install -m 644 ${UNPACKDIR}/default ${D}${sysconfdir}/default/${BPN}d | ||
| 54 | |||
| 55 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | 57 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
| 56 | install -d ${D}${sysconfdir}/init.d | 58 | install -d ${D}${sysconfdir}/init.d |
| 57 | install -m 0755 ${UNPACKDIR}/tailscaled.init ${D}${sysconfdir}/init.d/tailscaled | 59 | install -m 0755 ${UNPACKDIR}/tailscaled.init ${D}${sysconfdir}/init.d/tailscaled |
| 60 | install -d ${D}${sysconfdir}/default | ||
| 61 | install -m 644 ${UNPACKDIR}/default ${D}${sysconfdir}/default/${BPN}d | ||
| 58 | fi | 62 | fi |
| 63 | |||
| 64 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
| 65 | install -d ${D}${systemd_system_unitdir} | ||
| 66 | install -m 644 ${B}/src/tailscale.com/cmd/tailscaled/tailscaled.service ${D}${systemd_system_unitdir}/${BPN}d.service | ||
| 67 | install -d ${D}${sysconfdir}/default | ||
| 68 | install -m 644 ${B}/src/tailscale.com/cmd/tailscaled/tailscaled.defaults ${D}${sysconfdir}/default/${BPN}d | ||
| 69 | fi | ||
| 70 | |||
| 59 | } | 71 | } |
| 60 | 72 | ||
| 61 | PACKAGES =+ "${PN}d" | 73 | PACKAGES =+ "${PN}d" |
| 62 | 74 | ||
| 63 | # mark these as src, since there are bash script etc in there and QA will complain otherwise | 75 | # mark these as src, since there are bash script etc in there and QA will complain otherwise |
| 64 | FILES:${PN}-src += "${libdir}/go/src" | 76 | FILES:${PN}-src += "${libdir}/go/src" |
| 65 | FILES:${PN}d = "${sysconfdir}" | 77 | FILES:${PN}d = "${sysconfdir} ${systemd_system_unitdir}" |
| 66 | 78 | ||
| 67 | RDEPENDS:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'completion', 'bash-completion', '', d)}" | 79 | RDEPENDS:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'completion', 'bash-completion', '', d)}" |
| 68 | RDEPENDS:${PN}d = "iptables" | 80 | RDEPENDS:${PN}d = "iptables" |
| 69 | 81 | ||
| 70 | RRECOMMENDS:${PN}d = "kernel-module-wireguard" | 82 | RRECOMMENDS:${PN}d = "\ |
| 83 | kernel-module-wireguard \ | ||
| 84 | kernel-module-tun \ | ||
| 85 | kernel-module-xt-mark \ | ||
| 86 | kernel-module-xt-tcpudp \ | ||
| 87 | kernel-module-xt-masquerade" | ||
