All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mike Thompson" <mthompson@dustyrobotics.com>
To: yocto@lists.yoctoproject.org
Subject: Re: Yocto recipe for Tailscale #yocto #golang
Date: Tue, 13 Oct 2020 11:51:13 -0700	[thread overview]
Message-ID: <11004.1602615073598026525@lists.yoctoproject.org> (raw)
In-Reply-To: <15104.1600836543637853360@lists.yoctoproject.org>

[-- Attachment #1: Type: text/plain, Size: 3261 bytes --]

A follow up on a Yocto recipe for building a Tailscale package for others who have an interest in this.

Although the final recipe I created appears to successfully build the Tailscale utility and daemon without warnings or errors, the resulting 'tailscaled' daemon crashes when used.

Investigating this issue further I discovered that Tailscale maintains their own GoLang repository ( https://github.com/tailscale/go/tree/build-56db76510f9640d2ad652f206ae6e41c1a5d63ca ) with changes needed to support Tailscale. I suspect, but haven't proven, using the standard Yocto supported versions of GoLang to build Tailscale results in the crashes I see.  Unfortunately, I don't have enough of an understanding of GoLang to determine how to build Tailscale with the unique version of GoLang maintained by the Tailscale folks..

Instead of resolving this build issue, I instead created a Yocto recipe that utilizes the released binaries from Tailscale ( https://pkgs.tailscale.com/stable/#static ) to create a Yocto package.  This isn't ideal as I would much rather build from source, but solves my short term needs.  This alternate recipe to build a Yocto package from binaries is included below.

------------------------------------------------------------------------

tailscale_1.0.5.bb

SUMMARY = "Tailscale client and daemon for Linux from Tailscale pre-built binaries"

HOMEPAGE = "github.com/tailscale/tailscale"

SECTION = "net"

LICENSE = "CLOSED"

COMPATIBLE_HOST = "x86_64.*-linux"

# Archive URL:

#   https://pkgs.tailscale.com/stable/tailscale_1.0.5_amd64.tgz

#

# Archive contents:

#   tailscale_1.0.5_amd64/systemd

#   tailscale_1.0.5_amd64/systemd/tailscaled.service

#   tailscale_1.0.5_amd64/systemd/tailscaled.defaults

#   tailscale_1.0.5_amd64/tailscaled

#   tailscale_1.0.5_amd64/tailscale

#

# Set SRC_URI subdir to ${P} so that files are unpacked into ${S}

SRC_URI = "https://pkgs.tailscale.com/stable/${BPN}_${PV}_amd64.tgz;subdir=${P}"

SRC_URI[md5sum] = "fad1e5317ec567b77c3a0b53b8b976cf"

SRC_URI[sha256sum] = "ecfcda12068d6ecb2be72eba5572ab09406643bcc73c0cd482ae88060720c430"

inherit systemd

FILES_${PN} += "${systemd_unitdir}/*"

do_install() {

install -d ${D}/${bindir}

install -d ${D}/${sbindir}

install ${S}/${PN}_${PV}_amd64/tailscale ${D}/${bindir}/tailscale

install ${S}/${PN}_${PV}_amd64/tailscaled ${D}/${sbindir}/tailscaled

if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then

install -d ${D}${sysconfdir}/default/

install -m 0644 ${S}/${PN}_${PV}_amd64/systemd/tailscaled.defaults ${D}${sysconfdir}/default/tailscaled

install -d ${D}${systemd_unitdir}/system

install -m 0644 ${S}/${PN}_${PV}_amd64/systemd/tailscaled.service ${D}${systemd_unitdir}/system/tailscaled.service

install -d ${D}${sysconfdir}/systemd/system/multi-user.target.wants/

ln -s ${systemd_unitdir}/system/tailscaled.service ${D}${sysconfdir}/systemd/system/multi-user.target.wants/tailscaled.service

fi

}

SYSTEMD_PACKAGES = "${PN}"

SYSTEMD_SERVICE_${PN} = "tailscaled.service"

SYSTEMD_AUTO_ENABLE = "enable"

------------------------------------------------------------------------

Mike Thompson

[-- Attachment #2: Type: text/html, Size: 4064 bytes --]

  reply	other threads:[~2020-10-13 18:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18  5:43 Yocto recipe for Tailscale #yocto #golang Mike Thompson
2020-09-18  6:26 ` [yocto] " Nicolas Jeker
2020-09-18 23:46   ` Mike Thompson
2020-09-19  6:04     ` [yocto] " Khem Raj
2020-09-19 10:13       ` Mike Thompson
2020-09-19 20:58         ` Mike Thompson
2020-09-21 17:30           ` [yocto] " Randy MacLeod
2020-09-23  4:49             ` Mike Thompson
2020-10-13 18:51               ` Mike Thompson [this message]
2020-10-13 19:42                 ` [yocto] " Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11004.1602615073598026525@lists.yoctoproject.org \
    --to=mthompson@dustyrobotics.com \
    --cc=yocto@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.