All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Randy MacLeod" <randy.macleod@windriver.com>
To: <mthompson@dustyrobotics.com>, <yocto@lists.yoctoproject.org>
Subject: Re: [yocto] Yocto recipe for Tailscale #yocto #golang
Date: Mon, 21 Sep 2020 13:30:23 -0400	[thread overview]
Message-ID: <9378dde9-ebda-d6db-df7d-74d1a18c5253@windriver.com> (raw)
In-Reply-To: <30569.1600549122972037103@lists.yoctoproject.org>

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

On 2020-09-19 4:58 p.m., Mike Thompson via lists.yoctoproject.org wrote:
>
> I seemed to have resolved all my issues getting a Yocto Bitbake recipe 
> for the Tailscale client and CLI utility.
>
> For future reference and in case it helps others, below is my Bitbake 
> recipe:
>
Hi Mike,

Could you send your tailscale recipe to meta-openembedded/meta-networking?
     Email: OpenEmbedded Development mailing list 
<openembedded-devel@lists.openembedded.org>
     Instructions: 
https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded

It looks like all the work is done aside from an email!

../Randy


> ------------------------------------------------
>
> # tailscale_1.0.5.bb
>
> SUMMARY = "Tailscale client and daemon for Linux"
>
> HOMEPAGE = "github.com/tailscale/tailscale"
>
> SECTION = "net"
>
> LICENSE = "CLOSED"
>
> LIC_FILES_CHKSUM = 
> "file://src/${GO_IMPORT}/LICENSE;md5=d995c1c44529856a0f35a5ad43e51cc5"
>
> SRC_URI = "git://github.com/tailscale/tailscale.git;nobranch=1;tag=v${PV}"
>
> inherit go-mod systemd
>
> GO_IMPORT = "tailscale.com"
>
> GO_WORKDIR = "${GO_IMPORT}"
>
> GO_INSTALL = "${GO_IMPORT}/cmd/tailscale ${GO_IMPORT}/cmd/tailscaled"
>
> FILES_${PN} += "${systemd_unitdir}/*"
>
> do_install() {
>
>     install -d ${D}/${bindir}
>
>     install -d ${D}/${sbindir}
>
>     install ${B}/bin/tailscale ${D}/${bindir}/tailscale
>
>     install ${B}/bin/tailscaled ${D}/${sbindir}/tailscaled
>
>     if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 
> 'false', d)}; then
>
>         install -d ${D}${sysconfdir}/default/
>
>         install -m 0644 
> ${WORKDIR}/build/src/${GO_IMPORT}/cmd/tailscaled/tailscaled.defaults 
> ${D}${sysconfdir}/default/tailscaled
>
>         install -d ${D}${systemd_unitdir}/system
>
>         install -m 0644 
> ${WORKDIR}/build/src/${GO_IMPORT}/cmd/tailscaled/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"
>
> ------------------------------------------------
>
> When installed on my target system, systemd reports the following for 
> the tailscaled daemon:
> ------------------------------------------------
> [[0;1;32m●[[0m tailscaled.service - Tailscale node agent
>      Loaded: loaded (/lib/systemd/system/tailscaled.service; enabled; 
> vendor preset: enabled)
>      Active: [[0;1;32mactive (running)[[0m since Sat 2020-09-19 
> 20:46:02 UTC; 4min 44s ago
>        Docs: https://tailscale.com/kb/
>    Main PID: 252 (tailscaled)
>       Tasks: 13 (limit: 19081)
>      Memory: 56.5M
>      CGroup: /system.slice/tailscaled.service
>              └─252 /usr/sbin/tailscaled 
> --state=/var/lib/tailscale/tailscaled.state --socket=/run/tailscale/tai
> lscaled.sock --port 41641
> Sep 19 20:48:03 amber tailscaled[252]: 7.2M/39.1M control: 
> cancelMapSafely: synced=false
> Sep 19 20:48:03 amber tailscaled[252]: 7.2M/39.1M control: 
> cancelMapSafely: wrote to channel
> Sep 19 20:48:03 amber tailscaled[252]: 7.2M/39.1M control: mapRoutine: 
> new map needed while idle.
> Sep 19 20:48:03 amber tailscaled[252]: 7.2M/39.1M control: mapRoutine: 
> state:url-visit-required
> Sep 19 20:48:03 amber tailscaled[252]: 7.3M/39.1M 
> LinkChange(isExpensive=false); needsRebind=false
> Sep 19 20:48:03 amber tailscaled[252]: 7.3M/39.1M magicsock: starting 
> endpoint update (link-change-minor)
> Sep 19 20:48:03 amber tailscaled[252]: 7.6M/39.1M 
> LinkChange(isExpensive=false); needsRebind=false
> Sep 19 20:48:03 amber tailscaled[252]: 7.6M/39.1M magicsock: starting 
> endpoint update (link-change-minor)
> Sep 19 20:48:03 amber tailscaled[252]: 7.5M/39.1M 
> LinkChange(isExpensive=false); needsRebind=false
> Sep 19 20:48:03 amber tailscaled[252]: 7.2M/39.1M magicsock: starting 
> endpoint update (link-change-minor)
>
> ------------------------------------------------
>
> And ifconfig reports the following:
> ------------------------------------------------
>
> # ifconfig
>
> tailscale0 Link encap:UNSPEC HWaddr 
> 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
>
>           inet6 addr: fe80::7f12:8835:cc06:b3e7/64 Scope:Link
>
>           UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1280  Metric:1
>
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>
>           TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
>
>           collisions:0 txqueuelen:500
>
>           RX bytes:0 (0.0 B) TX bytes:825 (825.0 B)
>
> ------------------------------------------------
>
> Thank you to Khem for the tip on looking into "inherit go-mod" and 
> patience while I sorted through this.
> Mike Thompson
>
> 
>

-- 
# Randy MacLeod
# Wind River Linux


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

  reply	other threads:[~2020-09-21 17:31 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           ` Randy MacLeod [this message]
2020-09-23  4:49             ` Mike Thompson
2020-10-13 18:51               ` Mike Thompson
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=9378dde9-ebda-d6db-df7d-74d1a18c5253@windriver.com \
    --to=randy.macleod@windriver.com \
    --cc=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.