From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Yocto recipe for Tailscale #yocto #golang To: yocto@lists.yoctoproject.org From: "Mike Thompson" X-Originating-Location: San Carlos, California, US (73.222.39.199) X-Originating-Platform: Linux Chrome 85 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Thu, 17 Sep 2020 22:43:45 -0700 Message-ID: Content-Type: multipart/alternative; boundary="skgIuUZxRQoWrfoZZUrS" --skgIuUZxRQoWrfoZZUrS Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Does anyone know if there is an existing bitbake recipe for building the Ta= ilscale client daemon and CLI tool from the following source?=C2=A0 A searc= h on Google yielded no obvious links. https://github.com/tailscale/tailscale The Tailscale client for Linux looks to be built using the Go language whi= ch is a complete unknown to me. I've built very simple recipes before for b= asic Makefile and Automake built software, but I suppose Go brings a new se= t of challenges. If an existing recipe is not available, any words of wisdom before I get s= tarted on this? Thanks, Mike Thompson --skgIuUZxRQoWrfoZZUrS Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Does anyone know if there is an existing bitbake recipe for building the= Tailscale client daemon and CLI tool from the following source?  A se= arch on Google yielded no obvious links.

https://github.com/tailscale/tailscale

The Tailscale client for Linux looks to be built using the Go language = which is a complete unknown to me. I've built very simple recipes before fo= r basic Makefile and Automake built software, but I suppose Go brings a new= set of challenges.

If an existing recipe is not available, any words of wisdom before I ge= t started on this?

Thanks,

Mike Thompson

 

--skgIuUZxRQoWrfoZZUrS-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from wp323.webpack.hosteurope.de (wp323.webpack.hosteurope.de [80.237.133.92]) by mx.groups.io with SMTP id smtpd.web11.7011.1600410413084063560 for ; Thu, 17 Sep 2020 23:26:54 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: delisys.ch, ip: 80.237.133.92, mailfrom: n.jeker@delisys.ch) Received: from 22.71.14.46.static.wline.lns.sme.cust.swisscom.ch ([46.14.71.22] helo=linuxpower); authenticated by wp323.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1kJ9r8-0002IP-0x; Fri, 18 Sep 2020 08:26:50 +0200 Message-ID: <554d231986639cbe9b6a77c36b41a9947e0458a3.camel@delisys.ch> Subject: Re: [yocto] Yocto recipe for Tailscale #yocto #golang From: "Nicolas Jeker" To: mthompson@dustyrobotics.com, yocto@lists.yoctoproject.org Date: Fri, 18 Sep 2020 08:26:49 +0200 In-Reply-To: References: User-Agent: Evolution 3.36.5 MIME-Version: 1.0 X-bounce-key: webpack.hosteurope.de;n.jeker@delisys.ch;1600410413;7d3087fe; X-HE-SMSGID: 1kJ9r8-0002IP-0x Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Hi Mike, On Thu, 2020-09-17 at 22:43 -0700, Mike Thompson via lists.yoctoproject.org wrote: > Does anyone know if there is an existing bitbake recipe for building > the Tailscale client daemon and CLI tool from the following source? > A search on Google yielded no obvious links. > > https://github.com/tailscale/tailscale I usually search on the OpenEmbedded layer index: http://layers.openembedded.org/layerindex/branch/master/recipes/?q=tailscale Seems like you are right, there seems to be no recipe available. Be aware that not all recipes/layers are listed there, but the majority are. > > The Tailscale client for Linux looks to be built using the Go > language which is a complete unknown to me. I've built very simple > recipes before for basic Makefile and Automake built software, but I > suppose Go brings a new set of challenges. > > If an existing recipe is not available, any words of wisdom before I > get started on this? I never used Go in the Yocto/OpenEmbedded environment, but I'm sure somebody else who has more experience will be able to help. To get started with writing a new recipe I usually get my inspiration from similar recipes (similar language, build system, dependencies, etc.). > Thanks, > > Mike Thompson From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: Yocto recipe for Tailscale #yocto #golang To: yocto@lists.yoctoproject.org From: "Mike Thompson" X-Originating-Location: US (157.22.13.92) X-Originating-Platform: Linux Chrome 85 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Fri, 18 Sep 2020 16:46:59 -0700 References: <554d231986639cbe9b6a77c36b41a9947e0458a3.camel@delisys.ch> In-Reply-To: <554d231986639cbe9b6a77c36b41a9947e0458a3.camel@delisys.ch> Message-ID: <23477.1600472819113950080@lists.yoctoproject.org> Content-Type: multipart/alternative; boundary="Kcm5Ci6tgi0zMJSa3WpN" --Kcm5Ci6tgi0zMJSa3WpN Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable OK, I'm making some progress a Bitbake recipe for the Tailscale client buil= t using Go from various samples I found in the OpenEmbedded layers. However, I'm running into import issues during compilation and I'm hoping = a person familiar with Go might be able to provide some hints. From what I = can tell, Go packages to are allowed to declare that they must be imported = using a specific name ( https://golang.org/cmd/go/#hdr-Import_path_checking= ) and it seems that declaration is included in the Tailscale source code. Is there a way to craft the Bitbake recipe to honor that requirement for t= he Tailscale Go source code? Currently, my Bitbake recipe for Tailscale looks as shown below. tailscale_1.0.5.bb ----------------------------------------------------------------- SUMMARY =3D "Tailscale client and daemon for Linux" HOMEPAGE =3D "github.com/tailscale/tailscale" LICENSE =3D "DWTFYW" LIC_FILES_CHKSUM =3D "file://src/${GO_IMPORT}/LICENSE;md5=3Dd995c1c4452985= 6a0f35a5ad43e51cc5" GO_IMPORT =3D "github.com/tailscale/tailscale" SRC_URI =3D "git://${GO_IMPORT};nobranch=3D1;tag=3Dv${PV}" inherit go GO_INSTALL =3D "${GO_IMPORT}/cmd/tailscale" RDEPENDS_${PN}-dev +=3D "bash" ----------------------------------------------------------------- The Bitbake output with the import error is below: ----------------------------------------------------------------- $ bitbake tailscale ... NOTE: Executing Tasks ERROR: tailscale-1.0.5-r0 do_compile: Execution of '/home/mike/Development= /markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5= -r0/temp/run.do_compile.10615' failed with exit code 1: can't load package: package github.com/tailscale/tailscale/cmd/tailscale: = code in directory /home/mike/Development/markbot_linux/build_markbot/tmp/wo= rk/corei7-64-dusty-linux/tailscale/1.0.5-r0/build/src/github.com/tailscale/= tailscale/cmd/tailscale expects import "tailscale.com/cmd/tailscale" can't load package: package .: no Go files in /home/mike/Development/markb= ot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/bu= ild WARNING: exit code 1 from a shell command. ERROR: Logfile of failure stored in: /home/mike/Development/markbot_linux/= build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/temp/log.do= _compile.10615 Log data follows: | DEBUG: Executing shell function do_compile | can't load package: package github.com/tailscale/tailscale/cmd/tailscale= : code in directory /home/mike/Development/markbot_linux/build_markbot/tmp/= work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build/src/github.com/tailscal= e/tailscale/cmd/tailscale expects import "tailscale.com/cmd/tailscale" | can't load package: package .: no Go files in /home/mike/Development/mar= kbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/= build | WARNING: exit code 1 from a shell command. | ERROR: Execution of '/home/mike/Development/markbot_linux/build_markbot/= tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/temp/run.do_compile.10615= ' failed with exit code 1: | can't load package: package github.com/tailscale/tailscale/cmd/tailscale= : code in directory /home/mike/Development/markbot_linux/build_markbot/tmp/= work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build/src/github.com/tailscal= e/tailscale/cmd/tailscale expects import "tailscale.com/cmd/tailscale" | can't load package: package .: no Go files in /home/mike/Development/mar= kbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/= build | WARNING: exit code 1 from a shell command. | ERROR: Task (/home/mike/Development/markbot_linux/sources/meta-markbot/rec= ipes-tailscale/tailscale/tailscale_1.0.5.bb:do_compile) failed with exit co= de '1' NOTE: Tasks Summary: Attempted 2253 tasks of which 2245 didn't need to be = rerun and 1 failed. ----------------------------------------------------------------- Thanks, Mike Thompson --Kcm5Ci6tgi0zMJSa3WpN Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
OK, I'm making some progress a Bitbake recipe for the Tailscale client= built using Go from various samples I found in the OpenEmbedded layers.
 
However, I'm running into import issues during compilation and I'm ho= ping a person familiar with Go might be able to provide some hints. From what I can tell, Go packages to are a= llowed to declare that they must be= imported using a specific name = ;and it seems that declaration is included in the Tailscale source code.
 
Is= there a way to craft the Bitbake recipe to honor that requirement for the = Tailscale Go source code?
 
Currently, my Bitbake recipe for Tailscale looks as shown below. = ; 
 
tailscale_1.0.5.bb
-----------------------------------------------------------------
SUMMARY =3D "Tailscale client and daemon for Linux"
HOMEPAGE =3D "github.com/tailscale/tailscale"
LICENSE =3D "DWTFYW"
LIC_FILES_CHKSUM =3D "file://src/${GO_IMPORT}/LICENSE;md5=3Dd995c1c44= 529856a0f35a5ad43e51cc5"
 
GO_IMPORT =3D "github.com/tailscale/tailscale"
SRC_URI =3D "git://${GO_IMPORT};nobranch=3D1;tag=3Dv${PV}"
 
inherit go
 
GO_INSTALL =3D "${GO_IMPORT}/cmd/tailscale"
 
RDEPENDS_${PN}-dev +=3D "bash"
-----------------------------------------------------------------
 
The Bitbake output with the import error is below:
 
-------------------------------------= ----------------------------
$ bitbake tailscale
...
NOTE: Executing Tasks
ERROR: tailscale-1.0.5-r0 do_compile:= Execution of '/home/mike/Development/markbot_linux/build_markbot/tmp/work/= corei7-64-dusty-linux/tailscale/1.0.5-r0/temp/run.do_compile.10615' failed = with exit code 1:
can't load package: package github.co= m/tailscale/tailscale/cmd/tailscale: code in directory /home/mike/Developme= nt/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0= .5-r0/build/src/github.com/tailscale/tailscale/cmd/tailscale expects import= "tailscale.com/cmd/tailscale"
can't load package: package .: no Go = files in /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7= -64-dusty-linux/tailscale/1.0.5-r0/build
WARNING: exit code 1 from a shell com= mand.
 
ERROR: Logfile of failure stored in: = /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty= -linux/tailscale/1.0.5-r0/temp/log.do_compile.10615
Log data follows:
| DEBUG: Executing shell function do_= compile
| can't load package: package github.= com/tailscale/tailscale/cmd/tailscale: code in directory /home/mike/Develop= ment/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1= .0.5-r0/build/src/github.com/tailscale/tailscale/cmd/tailscale expects impo= rt "tailscale.com/cmd/tailscale"
| can't load package: package .: no G= o files in /home/mike/Development/markbot_linux/build_markbot/tmp/work/core= i7-64-dusty-linux/tailscale/1.0.5-r0/build
| WARNING: exit code 1 from a shell c= ommand.
| ERROR: Execution of '/home/mike/Dev= elopment/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailsca= le/1.0.5-r0/temp/run.do_compile.10615' failed with exit code 1:
| can't load package: package github.= com/tailscale/tailscale/cmd/tailscale: code in directory /home/mike/Develop= ment/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1= .0.5-r0/build/src/github.com/tailscale/tailscale/cmd/tailscale expects impo= rt "tailscale.com/cmd/tailscale"
| can't load package: package .: no G= o files in /home/mike/Development/markbot_linux/build_markbot/tmp/work/core= i7-64-dusty-linux/tailscale/1.0.5-r0/build
| WARNING: exit code 1 from a shell c= ommand.
ERROR: Task (/home/mike/Development/m= arkbot_linux/sources/meta-markbot/recipes-tailscale/tailscale/tailscale_1.0= .5.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2253 t= asks of which 2245 didn't need to be rerun and 1 failed.
-----------------------------------------------------------------
 
Thanks,
 
Mike Thompson
 
--Kcm5Ci6tgi0zMJSa3WpN-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by mx.groups.io with SMTP id smtpd.web12.6357.1600495456969399431 for ; Fri, 18 Sep 2020 23:04:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20161025 header.b=frgFVEwc; spf=pass (domain: gmail.com, ip: 209.85.215.170, mailfrom: raj.khem@gmail.com) Received: by mail-pg1-f170.google.com with SMTP id k14so4728394pgi.9 for ; Fri, 18 Sep 2020 23:04:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:organization:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ZSjez374oo4fNdmHL2jNLKNpYSeDEfrar5aXtEGNjDw=; b=frgFVEwcGGPecOSF4mcBgOfd55aIuoffPpZJ1m7tLFV+4Ld5jpmIwySbgIcnMmj2aD W/0e/zBQMUhhYY9brZL7hXdJJfkCoOvHIaTZSLQBWrRzBlz4bHsWCsOqM+ohYhBjmp9n 6wBuxsEw1Daqf8zEmGN+LnD43Bg7ECojh10YweJifrdfhxVLCt2wWtxhqb5rzJ8G8pkN E6lyVYLeEMlQuXt93EPwwvecREW24eHYfaT/dQwl/d2IjQe+vCzskciMvnccMHyk+XcV Jqxsui7/oIGpotp7i7C8HP2+qQlEBX7JaUloQLdcfqBG/jo3xTqAy8x9fkXZ5U152Xa5 rODg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=ZSjez374oo4fNdmHL2jNLKNpYSeDEfrar5aXtEGNjDw=; b=FV8ZnemigbDhbUrBHtJevsTC+QWiOG6Wc+CYXBUmq/cxw76cMHLnegc8Omqy2U2QoM vB9ElSDilQL2jR4nw6Jef9iLQs6HTvaLJy/xnsF91/g3qwg6nyGxKi7z9SbytrwY6vGr 2dDibMSHEiCcWZ96dYHR6jX7KCFYmlMT1YBbyyQb1e04a/i7QMGCJ8p682TBuj7YGyVf sEg/7/5PIzHkmiSRs27+CNX2feLEUZlAt+JwbeigYL5GojQNYN81kZ5pAxr/P1FjpjsD PfRZLE1HxlPmXE1LCvW7jlOrytNjwFguZMZYqXeWmB/wl8D4vO7G+KCa9b2IzSlq+Bwx OCug== X-Gm-Message-State: AOAM530uTGVf4VKaBgcaQlAvzb1nAM8+0gsQpZkeS12XovY1F3sMAYdU CjmpLSTCKE3I+FVBErSsuCy5STYHLua7jg== X-Google-Smtp-Source: ABdhPJw/Ga+NbNL+3Hd/YU/vdEQ2AhFpPUX3XyH3DrUrlM+mq6JHm1sFjLeqdt1oShEzUGhj36Fumw== X-Received: by 2002:a63:f70e:: with SMTP id x14mr29502605pgh.407.1600495455804; Fri, 18 Sep 2020 23:04:15 -0700 (PDT) Return-Path: Received: from ?IPv6:2601:646:9200:4e0:8d7e:79c0:27e5:7d4? ([2601:646:9200:4e0:8d7e:79c0:27e5:7d4]) by smtp.gmail.com with ESMTPSA id h1sm4461112pji.52.2020.09.18.23.04.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Sep 2020 23:04:15 -0700 (PDT) Subject: Re: [yocto] Yocto recipe for Tailscale #yocto #golang To: mthompson@dustyrobotics.com, yocto@lists.yoctoproject.org References: <554d231986639cbe9b6a77c36b41a9947e0458a3.camel@delisys.ch> <23477.1600472819113950080@lists.yoctoproject.org> From: "Khem Raj" Organization: HIMVIS LLC Message-ID: <8132db85-5881-636e-c091-d84c47efe4fe@gmail.com> Date: Fri, 18 Sep 2020 23:04:14 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <23477.1600472819113950080@lists.yoctoproject.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit On 9/18/20 4:46 PM, Mike Thompson via lists.yoctoproject.org wrote: > OK, I'm making some progress a Bitbake recipe for the Tailscale client > built using Go from various samples I found in the OpenEmbedded layers. > However, I'm running into import issues during compilation and I'm > hoping a person familiar with Go might be able to provide some hints. > From what I can tell, Go packages to are allowed to declare that they > must be imported using a specific name >  and it seems that > declaration is included in the Tailscale source code. > Is there a way to craft the Bitbake recipe to honor that requirement for > the Tailscale Go source code? > Currently, my Bitbake recipe for Tailscale looks as shown below. > tailscale_1.0.5.bb > ----------------------------------------------------------------- > SUMMARY = "Tailscale client and daemon for Linux" > HOMEPAGE = "github.com/tailscale/tailscale" > LICENSE = "DWTFYW" > LIC_FILES_CHKSUM = > "file://src/${GO_IMPORT}/LICENSE;md5=d995c1c44529856a0f35a5ad43e51cc5" > GO_IMPORT = "github.com/tailscale/tailscale" > SRC_URI = "git://${GO_IMPORT};nobranch=1;tag=v${PV}" > inherit go > GO_INSTALL = "${GO_IMPORT}/cmd/tailscale" > RDEPENDS_${PN}-dev += "bash" > ----------------------------------------------------------------- > The Bitbake output with the import error is below: > ----------------------------------------------------------------- > $ bitbake tailscale > ... > NOTE: Executing Tasks > ERROR: tailscale-1.0.5-r0 do_compile: Execution of > '/home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/temp/run.do_compile.10615' > failed with exit code 1: > can't load package: package > github.com/tailscale/tailscale/cmd/tailscale: code in directory > /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build/src/github.com/tailscale/tailscale/cmd/tailscale > expects import "tailscale.com/cmd/tailscale" > can't load package: package .: no Go files in > /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build > WARNING: exit code 1 from a shell command. > ERROR: Logfile of failure stored in: > /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/temp/log.do_compile.10615 > Log data follows: > | DEBUG: Executing shell function do_compile > | can't load package: package > github.com/tailscale/tailscale/cmd/tailscale: code in directory > /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build/src/github.com/tailscale/tailscale/cmd/tailscale > expects import "tailscale.com/cmd/tailscale" > | can't load package: package .: no Go files in > /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build > | WARNING: exit code 1 from a shell command. > | ERROR: Execution of > '/home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/temp/run.do_compile.10615' > failed with exit code 1: > | can't load package: package > github.com/tailscale/tailscale/cmd/tailscale: code in directory > /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build/src/github.com/tailscale/tailscale/cmd/tailscale > expects import "tailscale.com/cmd/tailscale" > | can't load package: package .: no Go files in > /home/mike/Development/markbot_linux/build_markbot/tmp/work/corei7-64-dusty-linux/tailscale/1.0.5-r0/build > | WARNING: exit code 1 from a shell command. > | > ERROR: Task > (/home/mike/Development/markbot_linux/sources/meta-markbot/recipes-tailscale/tailscale/tailscale_1.0.5.bb:do_compile) > failed with exit code '1' > NOTE: Tasks Summary: Attempted 2253 tasks of which 2245 didn't need to > be rerun and 1 failed. > ----------------------------------------------------------------- > Thanks, > Mike Thompson perhaps you need to inherit go-mod as well, if its using modules. > > > > From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: Yocto recipe for Tailscale #yocto #golang To: yocto@lists.yoctoproject.org From: "Mike Thompson" X-Originating-Location: San Carlos, California, US (73.222.39.199) X-Originating-Platform: Linux Chrome 85 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Sat, 19 Sep 2020 03:13:36 -0700 References: <8132db85-5881-636e-c091-d84c47efe4fe@gmail.com> In-Reply-To: <8132db85-5881-636e-c091-d84c47efe4fe@gmail.com> Message-ID: <1315.1600510416708828939@lists.yoctoproject.org> Content-Type: multipart/alternative; boundary="XjhiMQM1PzqtbOidRn6b" --XjhiMQM1PzqtbOidRn6b Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Inheriting from go-mod didn't make any difference that I could tell. This is what I have so far for the Tailscale recipe.=C2=A0 I'm resolving d= ependencies with individual Bitbake files that pull in each dependency as I= find them. --------------------------------------------- # tailscale_1.0.5.bb SUMMARY =3D "Tailscale client and daemon for Linux" HOMEPAGE =3D "github.com/tailscale/tailscale" LICENSE =3D "CLOSED" LIC_FILES_CHKSUM =3D "file://src/${GO_IMPORT}/LICENSE;md5=3Dd995c1c4452985= 6a0f35a5ad43e51cc5" SRC_URI =3D "git://github.com/tailscale/tailscale.git;nobranch=3D1;tag=3Dv= ${PV}" DEPENDS +=3D "github.com-apenwarr-fixconsole \ github.com-coreos-go-iptable \ github.com-godbus-dbus \ github.com-golang-groupcache \ github.com-jsimonetti-rtnetlink \ github.com-klauspost-compress \ github.com-mdlayher-netlink \ github.com-pborman-getopt \ github.com-peterbourgon-ff \ github.com-tailscale-wireguard-go \ github.com-tcnksm-go-httpstat \ github.com-toqueteos-webbrowser \ golang.org-x \ go4.org-mem \ inet.af-netaddr \ rsc.io-goversion \ " inherit go inherit go-mod GO_IMPORT =3D "tailscale.com" GO_INSTALL =3D "${GO_IMPORT}/cmd/tailscale" RDEPENDS_${PN}-dev +=3D "bash" --------------------------------------------- Unfortunately, the golang.org-x.bb recipe is turning into an endless sourc= e of dependencies during do_compile stage.=C2=A0 I feel I must be on the wr= ong track. Is there a way to package up the following so that just what is needed by = Tailscale is included, but dependencies not needed by Tailscale are ignored= ? --------------------------------------------- # golang.org-x.bb DESCRIPTION =3D "Go X libraries" SRC_URI =3D "\ git://github.com/golang/mod.git;protocol=3Dhttps;name=3Dmod;destsuffix=3D$= {PN}-${PV}/src/golang.org/x/mod \ git://github.com/golang/net.git;protocol=3Dhttps;name=3Dnet;destsuffix=3D$= {PN}-${PV}/src/golang.org/x/net \ git://github.com/golang/sys.git;protocol=3Dhttps;name=3Dsys;destsuffix=3D$= {PN}-${PV}/src/golang.org/x/sys \ git://github.com/golang/text.git;protocol=3Dhttps;name=3Dtext;destsuffix= =3D${PN}-${PV}/src/golang.org/x/text \ git://github.com/golang/time.git;protocol=3Dhttps;name=3Dtime;destsuffix= =3D${PN}-${PV}/src/golang.org/x/time \ git://github.com/golang/sync.git;protocol=3Dhttps;name=3Dsync;destsuffix= =3D${PN}-${PV}/src/golang.org/x/sync \ git://github.com/golang/tools.git;protocol=3Dhttps;name=3Dtools;destsuffix= = =3D${PN}-${PV}/src/golang.org/x/tools \ git://github.com/golang/build.git;protocol=3Dhttps;name=3Dbuild;destsuffix= = =3D${PN}-${PV}/src/golang.org/x/build \ git://github.com/golang/oauth2.git;protocol=3Dhttps;name=3Doauth2;destsuff= ix=3D${PN}-${PV}/src/golang.org/x/oauth2 \ git://github.com/golang/crypto.git;protocol=3Dhttps;name=3Dcrypto;destsuff= ix=3D${PN}-${PV}/src/golang.org/x/crypto \ git://github.com/golang/xerrors.git;protocol=3Dhttps;name=3Dxerrors;destsu= ffix=3D${PN}-${PV}/src/golang.org/x/xerrors \ " SRCREV_FORMAT =3D "golang" SRCREV_mod =3D "${AUTOREV}" SRCREV_net =3D "${AUTOREV}" SRCREV_sys =3D "${AUTOREV}" SRCREV_text =3D "${AUTOREV}" SRCREV_time =3D "${AUTOREV}" SRCREV_sync =3D "${AUTOREV}" SRCREV_tools =3D "${AUTOREV}" SRCREV_build =3D "${AUTOREV}" SRCREV_oauth2 =3D "${AUTOREV}" SRCREV_crypto =3D "${AUTOREV}" SRCREV_xerrors =3D "${AUTOREV}" LICENSE =3D "MIT" LIC_FILES_CHKSUM =3D "file://${COMMON_LICENSE_DIR}/MIT;md5=3D0835ade698e0b= cf8506ecda2f7b4f302" inherit go GO_IMPORT =3D "golang.org/x" --------------------------------------------- Thanks, Mike Thompson --XjhiMQM1PzqtbOidRn6b Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Inheriting from go-mod didn't make any difference that I could tell.

 

This is what I have so far for the Tailscale recipe.  I'm resolvin= g dependencies with individual Bitbake files that pull in each dependency a= s I find them.

 

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

# tailscale_1.0.5.bb

SUMMARY =3D "Tailscale client and daemon for Linux"

HOMEPAGE =3D "github.com/tailscale/tailscale"

 

LICENSE =3D "CLOSED"

LIC_FILES_CHKSUM =3D "file://src/${GO_IMPORT}/LICENSE;md5=3Dd995c1c4452= 9856a0f35a5ad43e51cc5"

 

SRC_URI =3D "git://github.com/tailscale/tailscale.git;nobranch=3D1;tag= =3Dv${PV}"

 

DEPENDS +=3D "github.com-apenwarr-fixconsole \

            github.com-coreos-go-iptable = \

            github.com-godbus-dbus \

            github.com-golang-groupcache = \

            github.com-jsimonetti-rtnetli= nk \

            github.com-klauspost-compress= \

            github.com-mdlayher-netlink \=

            github.com-pborman-getopt \

            github.com-peterbourgon-ff \<= /p>

            github.com-tailscale-wireguar= d-go \

            github.com-tcnksm-go-httpstat= \

            github.com-toqueteos-webbrows= er \

            golang.org-x \

            go4.org-mem \

            inet.af-netaddr \

            rsc.io-goversion \

           "

 

inherit go

inherit go-mod

GO_IMPORT =3D "tailscale.com"

GO_INSTALL =3D "${GO_IMPORT}/cmd/tailscale"

 

RDEPENDS_${PN}-dev +=3D "bash"

---------------------------------------= ------

Unfortunately, the golang.org-x.bb recipe is turning into an endless = source of dependencies during do_compile stage.  I feel I must be on t= he wrong track.
 
Is there a way to package up the following so that just what is neede= d by Tailscale is included, but dependencies not needed by Tailscale are ig= nored?
 
---------------------------------------------
# golang.org-x.bb
DESCRIPTION =3D "Go X libraries"
 
SRC_URI =3D "\
         git://github.com/golang/mod.git;pro= tocol=3Dhttps;name=3Dmod;destsuffix=3D${PN}-${PV}/src/golang.org/x/mod \
         git://github.com/golang/net.git;pro= tocol=3Dhttps;name=3Dnet;destsuffix=3D${PN}-${PV}/src/golang.org/x/net \
         git://github.com/golang/sys.git;pro= tocol=3Dhttps;name=3Dsys;destsuffix=3D${PN}-${PV}/src/golang.org/x/sys \
         git://github.com/golang/text.git;pr= otocol=3Dhttps;name=3Dtext;destsuffix=3D${PN}-${PV}/src/golang.org/x/text \=
         git://github.com/golang/time.git;pr= otocol=3Dhttps;name=3Dtime;destsuffix=3D${PN}-${PV}/src/golang.org/x/time \=
         git://github.com/golang/sync.git;pr= otocol=3Dhttps;name=3Dsync;destsuffix=3D${PN}-${PV}/src/golang.org/x/sync \=
         git://github.com/golang/tools.git;p= rotocol=3Dhttps;name=3Dtools;destsuffix=3D${PN}-${PV}/src/golang.org/x/tool= s \
         git://github.com/golang/build.git;p= rotocol=3Dhttps;name=3Dbuild;destsuffix=3D${PN}-${PV}/src/golang.org/x/buil= d \
         git://github.com/golang/oauth2.git;= protocol=3Dhttps;name=3Doauth2;destsuffix=3D${PN}-${PV}/src/golang.org/x/oa= uth2 \
         git://github.com/golang/crypto.git;= protocol=3Dhttps;name=3Dcrypto;destsuffix=3D${PN}-${PV}/src/golang.org/x/cr= ypto \
         git://github.com/golang/xerrors.git= ;protocol=3Dhttps;name=3Dxerrors;destsuffix=3D${PN}-${PV}/src/golang.org/x/= xerrors \
         "
SRCREV_FORMAT =3D "golang"
SRCREV_mod =3D "${AUTOREV}"
SRCREV_net =3D "${AUTOREV}"
SRCREV_sys =3D "${AUTOREV}"
SRCREV_text =3D "${AUTOREV}"
SRCREV_time =3D "${AUTOREV}"
SRCREV_sync =3D "${AUTOREV}"
SRCREV_tools =3D "${AUTOREV}"
SRCREV_build =3D "${AUTOREV}"
SRCREV_oauth2 =3D "${AUTOREV}"
SRCREV_crypto =3D "${AUTOREV}"
SRCREV_xerrors =3D "${AUTOREV}"
 
LICENSE =3D "MIT"
LIC_FILES_CHKSUM =3D "file://${COMMON_LICENSE_DIR}/MIT;md5=3D0835ade6= 98e0bcf8506ecda2f7b4f302"
 
inherit go
GO_IMPORT =3D "golang.org/x"
---------------------------------------------
 
Thanks,
 
Mike Thompson
--XjhiMQM1PzqtbOidRn6b-- From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: Yocto recipe for Tailscale #yocto #golang To: yocto@lists.yoctoproject.org From: "Mike Thompson" X-Originating-Location: San Carlos, California, US (73.222.39.199) X-Originating-Platform: Linux Chrome 85 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Sat, 19 Sep 2020 13:58:42 -0700 References: <1315.1600510416708828939@lists.yoctoproject.org> In-Reply-To: <1315.1600510416708828939@lists.yoctoproject.org> Message-ID: <30569.1600549122972037103@lists.yoctoproject.org> Content-Type: multipart/alternative; boundary="PzBmTMYhp3mqAI8iLd1E" --PzBmTMYhp3mqAI8iLd1E Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 reci= pe: ------------------------------------------------ # tailscale_1.0.5.bb SUMMARY =3D "Tailscale client and daemon for Linux" HOMEPAGE =3D "github.com/tailscale/tailscale" SECTION =3D "net" LICENSE =3D "CLOSED" LIC_FILES_CHKSUM =3D "file://src/${GO_IMPORT}/LICENSE;md5=3Dd995c1c4452985= 6a0f35a5ad43e51cc5" SRC_URI =3D "git://github.com/tailscale/tailscale.git;nobranch=3D1;tag=3Dv= ${PV}" inherit go-mod systemd GO_IMPORT =3D "tailscale.com" GO_WORKDIR =3D "${GO_IMPORT}" GO_INSTALL =3D "${GO_IMPORT}/cmd/tailscale ${GO_IMPORT}/cmd/tailscaled" FILES_${PN} +=3D "${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/tailscale= d.defaults ${D}${sysconfdir}/default/tailscaled install -d ${D}${systemd_unitdir}/system install -m 0644 ${WORKDIR}/build/src/${GO_IMPORT}/cmd/tailscaled/tailscale= d.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}/syste= md/system/multi-user.target.wants/tailscaled.service fi } SYSTEMD_PACKAGES =3D "${PN}" SYSTEMD_SERVICE_${PN} =3D "tailscaled.service" SYSTEMD_AUTO_ENABLE =3D "enable" ------------------------------------------------ When installed on my target system, systemd reports the following for the = tailscaled daemon: ------------------------------------------------ [[0;1;32m=E2=97=8F[[0m tailscaled.service - Tailscale node agent Loaded: loaded (/lib/systemd/system/tailscaled.service; enabled; vendor pr= eset: enabled) Active: [[0;1;32mactive (running)[[0m since Sat 2020-09-19 20:46:02 UTC; 4= min 44s ago Docs: https://tailscale.com/kb/ Main PID: 252 (tailscaled) Tasks: 13 (limit: 19081) Memory: 56.5M CGroup: /system.slice/tailscaled.service =E2=94=94=E2=94=80252 /usr/sbin/tailscaled --state=3D/var/lib/tailscale/ta= ilscaled.state --socket=3D/run/tailscale/tai lscaled.sock --port 41641 Sep 19 20:48:03 amber tailscaled[252]: 7.2M/39.1M control: cancelMapSafely= : synced=3Dfalse 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: sta= te:url-visit-required Sep 19 20:48:03 amber tailscaled[252]: 7.3M/39.1M LinkChange(isExpensive= =3Dfalse); needsRebind=3Dfalse Sep 19 20:48:03 amber tailscaled[252]: 7.3M/39.1M magicsock: starting endp= oint update (link-change-minor) Sep 19 20:48:03 amber tailscaled[252]: 7.6M/39.1M LinkChange(isExpensive= =3Dfalse); needsRebind=3Dfalse Sep 19 20:48:03 amber tailscaled[252]: 7.6M/39.1M magicsock: starting endp= oint update (link-change-minor) Sep 19 20:48:03 amber tailscaled[252]: 7.5M/39.1M LinkChange(isExpensive= =3Dfalse); needsRebind=3Dfalse Sep 19 20:48:03 amber tailscaled[252]: 7.2M/39.1M magicsock: starting endp= oint update (link-change-minor) ------------------------------------------------ And ifconfig reports the following: ------------------------------------------------ # ifconfig tailscale0 Link encap:UNSPEC=C2=A0 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=C2=A0 MTU:1280=C2=A0 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)=C2=A0 TX bytes:825 (825.0 B) ------------------------------------------------ Thank you to Khem for the tip on looking into "inherit go-mod" and patienc= e while I sorted through this. Mike Thompson --PzBmTMYhp3mqAI8iLd1E Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

I seemed to have resolved all my issues getting a Yocto Bitbake recipe f= or the Tailscale client and CLI utility.

For future reference and in case it helps others, below is my Bitbake r= ecipe:

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

# tailscale_1.0.5.bb

SUMMARY =3D "Tailscale client and daemon for Linux"

HOMEPAGE =3D "github.com/tailscale/tailscale"

SECTION =3D "net"

 

LICENSE =3D "CLOSED"

LIC_FILES_CHKSUM =3D "file://src/${GO_IMPORT}/LICENSE;md5=3Dd995c1c4452= 9856a0f35a5ad43e51cc5"

 

SRC_URI =3D "git://github.com/tailscale/tailscale.git;nobranch=3D1;tag= =3Dv${PV}"

 

inherit go-mod systemd

 

GO_IMPORT =3D "tailscale.com"

GO_WORKDIR =3D "${GO_IMPORT}"

GO_INSTALL =3D "${GO_IMPORT}/cmd/tailscale ${GO_IMPORT}/cmd/tailscaled"=

 

FILES_${PN} +=3D "${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', 'tr= ue', 'false', d)}; then

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

        install -m 0644 ${WORKDIR}/build/src/${GO_I= MPORT}/cmd/tailscaled/tailscaled.defaults ${D}${sysconfdir}/default/tailsca= led

 

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

        install -m 0644 ${WORKDIR}/build/src/${GO_I= MPORT}/cmd/tailscaled/tailscaled.service ${D}${systemd_unitdir}/system/tail= scaled.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 =3D "${PN}"

SYSTEMD_SERVICE_${PN} =3D "tailscaled.service"

SYSTEMD_AUTO_ENABLE =3D "enable"

---------------------------------------= ---------

 
When installed on my target system, systemd reports the following for= the tailscaled daemon:
------------------------------------------------
[[0;1;32m=E2=97=8F[[0m tailscaled.service - Tailscale node agent
     Loaded: loaded (/lib/systemd/system/tailscaled.se= rvice; enabled; vendor preset: enabled)
     Active: [[0;1;32mactive (running)[[0m since Sat 2= 020-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
             =E2=94=94=E2=94=80252= /usr/sbin/tailscaled --state=3D/var/lib/tailscale/tailscaled.state --socke= t=3D/run/tailscale/tai
lscaled.sock --port 41641
 
Sep 19 20:48:03 amber tailscaled[252]: 7.2M/39.1M control: cancelMapS= afely: synced=3Dfalse
Sep 19 20:48:03 amber tailscaled[252]: 7.2M/39.1M control: cancelMapS= afely: 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(isExpens= ive=3Dfalse); needsRebind=3Dfalse
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(isExpens= ive=3Dfalse); needsRebind=3Dfalse
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(isExpens= ive=3Dfalse); needsRebind=3Dfalse
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  HWad= dr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  

          inet= 6 addr: fe80::7f12:8835:cc06:b3e7/64 Scope:Link

          UP P= OINTOPOINT RUNNING NOARP MULTICAST  MTU:1280  Metric:1

          RX p= ackets:0 errors:0 dropped:0 overruns:0 frame:0

          TX p= ackets:14 errors:0 dropped:0 overruns:0 carrier:0

          coll= isions:0 txqueuelen:500 

          RX b= ytes:0 (0.0 B)  TX bytes:825 (825.0 B)

---------------------------------------= ---------

Thank you to Khem for the tip on looking into "inherit go-mod" and pa= tience while I sorted through this.
 
Mike Thompson
 
--PzBmTMYhp3mqAI8iLd1E-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail5.wrs.com (mail5.wrs.com [192.103.53.11]) by mx.groups.io with SMTP id smtpd.web11.46994.1600709469795413348 for ; Mon, 21 Sep 2020 10:31:10 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: windriver.com, ip: 192.103.53.11, mailfrom: randy.macleod@windriver.com) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id 08LHUDmA028723 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 21 Sep 2020 10:30:39 -0700 Received: from [172.25.44.2] (172.25.44.2) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.3.487.0; Mon, 21 Sep 2020 10:30:25 -0700 Subject: Re: [yocto] Yocto recipe for Tailscale #yocto #golang To: , References: <1315.1600510416708828939@lists.yoctoproject.org> <30569.1600549122972037103@lists.yoctoproject.org> From: "Randy MacLeod" Message-ID: <9378dde9-ebda-d6db-df7d-74d1a18c5253@windriver.com> Date: Mon, 21 Sep 2020 13:30:23 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <30569.1600549122972037103@lists.yoctoproject.org> X-Originating-IP: [172.25.44.2] Content-Type: multipart/alternative; boundary="------------6C982475F7C0A8663132A7A3" Content-Language: en-CA --------------6C982475F7C0A8663132A7A3 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mail5.wrs.com id 08LHUDmA028723 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= =20 > for the Tailscale client and CLI utility. > > For future reference and in case it helps others, below is my Bitbake=20 > recipe: > Hi Mike, Could you send your tailscale recipe to meta-openembedded/meta-networking? =C2=A0=C2=A0=C2=A0 Email: OpenEmbedded Development mailing list=20 =C2=A0=C2=A0=C2=A0 Instructions:=20 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 =3D "Tailscale client and daemon for Linux" > > HOMEPAGE =3D "github.com/tailscale/tailscale" > > SECTION =3D "net" > > LICENSE =3D "CLOSED" > > LIC_FILES_CHKSUM =3D=20 > "file://src/${GO_IMPORT}/LICENSE;md5=3Dd995c1c44529856a0f35a5ad43e51cc5" > > SRC_URI =3D "git://github.com/tailscale/tailscale.git;nobranch=3D1;tag= =3Dv${PV}" > > inherit go-mod systemd > > GO_IMPORT =3D "tailscale.com" > > GO_WORKDIR =3D "${GO_IMPORT}" > > GO_INSTALL =3D "${GO_IMPORT}/cmd/tailscale ${GO_IMPORT}/cmd/tailscaled" > > FILES_${PN} +=3D "${systemd_unitdir}/*" > > do_install() { > > =C2=A0 =C2=A0 install -d ${D}/${bindir} > > =C2=A0 =C2=A0 install -d ${D}/${sbindir} > > =C2=A0 =C2=A0 install ${B}/bin/tailscale ${D}/${bindir}/tailscale > > =C2=A0 =C2=A0 install ${B}/bin/tailscaled ${D}/${sbindir}/tailscaled > > =C2=A0 =C2=A0 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'tru= e',=20 > 'false', d)}; then > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 install -d ${D}${sysconfdir}/default/ > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 install -m 0644=20 > ${WORKDIR}/build/src/${GO_IMPORT}/cmd/tailscaled/tailscaled.defaults=20 > ${D}${sysconfdir}/default/tailscaled > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 install -d ${D}${systemd_unitdir}/system > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 install -m 0644=20 > ${WORKDIR}/build/src/${GO_IMPORT}/cmd/tailscaled/tailscaled.service=20 > ${D}${systemd_unitdir}/system/tailscaled.service > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 install -d=20 > ${D}${sysconfdir}/systemd/system/multi-user.target.wants/ > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 ln -s ${systemd_unitdir}/system/tailscaled.s= ervice=20 > ${D}${sysconfdir}/systemd/system/multi-user.target.wants/tailscaled.serv= ice > > =C2=A0 =C2=A0 fi > > } > > SYSTEMD_PACKAGES =3D "${PN}" > > SYSTEMD_SERVICE_${PN} =3D "tailscaled.service" > > SYSTEMD_AUTO_ENABLE =3D "enable" > > ------------------------------------------------ > > When installed on my target system, systemd reports the following for=20 > the tailscaled daemon: > ------------------------------------------------ > [[0;1;32m=E2=97=8F[[0m tailscaled.service - Tailscale node agent > =C2=A0 =C2=A0 =C2=A0Loaded: loaded (/lib/systemd/system/tailscaled.servi= ce; enabled;=20 > vendor preset: enabled) > =C2=A0 =C2=A0 =C2=A0Active: [[0;1;32mactive (running)[[0m since Sat 2020= -09-19=20 > 20:46:02 UTC; 4min 44s ago > =C2=A0 =C2=A0 =C2=A0 =C2=A0Docs: https://tailscale.com/kb/ > =C2=A0 =C2=A0Main PID: 252 (tailscaled) > =C2=A0 =C2=A0 =C2=A0 Tasks: 13 (limit: 19081) > =C2=A0 =C2=A0 =C2=A0Memory: 56.5M > =C2=A0 =C2=A0 =C2=A0CGroup: /system.slice/tailscaled.service > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=E2=94=94=E2=94=80252 /u= sr/sbin/tailscaled=20 > --state=3D/var/lib/tailscale/tailscaled.state --socket=3D/run/tailscale/= tai > lscaled.sock --port 41641 > Sep 19 20:48:03 amber tailscaled[252]: 7.2M/39.1M control:=20 > cancelMapSafely: synced=3Dfalse > Sep 19 20:48:03 amber tailscaled[252]: 7.2M/39.1M control:=20 > cancelMapSafely: wrote to channel > Sep 19 20:48:03 amber tailscaled[252]: 7.2M/39.1M control: mapRoutine:= =20 > new map needed while idle. > Sep 19 20:48:03 amber tailscaled[252]: 7.2M/39.1M control: mapRoutine:= =20 > state:url-visit-required > Sep 19 20:48:03 amber tailscaled[252]: 7.3M/39.1M=20 > LinkChange(isExpensive=3Dfalse); needsRebind=3Dfalse > Sep 19 20:48:03 amber tailscaled[252]: 7.3M/39.1M magicsock: starting=20 > endpoint update (link-change-minor) > Sep 19 20:48:03 amber tailscaled[252]: 7.6M/39.1M=20 > LinkChange(isExpensive=3Dfalse); needsRebind=3Dfalse > Sep 19 20:48:03 amber tailscaled[252]: 7.6M/39.1M magicsock: starting=20 > endpoint update (link-change-minor) > Sep 19 20:48:03 amber tailscaled[252]: 7.5M/39.1M=20 > LinkChange(isExpensive=3Dfalse); needsRebind=3Dfalse > Sep 19 20:48:03 amber tailscaled[252]: 7.2M/39.1M magicsock: starting=20 > endpoint update (link-change-minor) > > ------------------------------------------------ > > And ifconfig reports the following: > ------------------------------------------------ > > # ifconfig > > tailscale0 Link encap:UNSPEC HWaddr=20 > 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 inet6 addr: fe80::7f12:8835:cc06:b3e7= /64 Scope:Link > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 UP POINTOPOINT RUNNING NOARP MULTICAS= T=C2=A0 MTU:1280=C2=A0 Metric:1 > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 RX packets:0 errors:0 dropped:0 overr= uns:0 frame:0 > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 TX packets:14 errors:0 dropped:0 over= runs:0 carrier:0 > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 collisions:0 txqueuelen:500 > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 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=20 > patience while I sorted through this. > Mike Thompson > >=20 > --=20 # Randy MacLeod # Wind River Linux --------------6C982475F7C0A8663132A7A3 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mail5.wrs.com id 08LHUDmA028723
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?
=C2=A0=C2=A0=C2=A0 Email: OpenEmbedded Development mailing list <openembedded-devel@lists.openembedded.org><= /a>
=C2=A0=C2=A0=C2=A0 Instructions:
https://www.openembedded.or= g/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 =3D "Tailscale client and daemon for Linux"

HOMEPAGE =3D "github.com/tailscale/tailscale"

SECTION =3D "net"

=C2=A0

LICENSE =3D "CLOSED"

LIC_FILES_CHKSUM =3D "file://src/${GO_IMPORT}/L= ICENSE;md5=3Dd995c1c44529856a0f35a5ad43e51cc5"

=C2=A0

SRC_URI =3D "git://github.com/tailscale/tailscale.git;nobranch=3D1;tag=3Dv${PV= }"

=C2=A0

inherit go-mod systemd

=C2=A0

GO_IMPORT =3D "tailscale.com"

GO_WORKDIR =3D "${GO_IMPORT}"

GO_INSTALL =3D "${GO_IMPORT}/cmd/tailscale ${GO_IMPORT}/cmd/tailscaled"

=C2=A0

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

=C2=A0

do_install() {

=C2=A0 =C2=A0 install -d ${D}/${bindir}

=C2=A0 =C2=A0 install -d ${D}/${sbindir}

=C2=A0 =C2=A0 install ${B}/bin/tailscale ${D}/${bindir}/tailscale=

=C2=A0 =C2=A0 install ${B}/bin/tailscaled ${D}/${sbindir}/tailsca= led

=C2=A0

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

=C2=A0 =C2=A0 =C2=A0 =C2=A0 install -d ${D}${sysconfdir}/default/=

=C2=A0 =C2=A0 =C2=A0 =C2=A0 install -m 0644 ${WORKDIR}/build/src/${GO_IMPORT}/cmd/tailscaled/tailscaled.defaul= ts ${D}${sysconfdir}/default/tailscaled

=C2=A0

=C2=A0 =C2=A0 =C2=A0 =C2=A0 install -d ${D}${systemd_unitdir}/sys= tem

=C2=A0 =C2=A0 =C2=A0 =C2=A0 install -m 0644 ${WORKDIR}/build/src/${GO_IMPORT}/cmd/tailscaled/tailscaled.servic= e ${D}${systemd_unitdir}/system/tailscaled.service

=C2=A0

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

=C2=A0 =C2=A0 =C2=A0 =C2=A0 ln -s ${systemd_unitdir}/system/tails= caled.service ${D}${sysconfdir}/systemd/system/multi-user.target.wants/tailscaled.servic= e

=C2=A0 =C2=A0 fi

}

=C2=A0

SYSTEMD_PACKAGES =3D "${PN}"

SYSTEMD_SERVICE_${PN} =3D "tailscaled.service"

SYSTEMD_AUTO_ENABLE =3D "enable"

-------------------------------= -----------------

=C2=A0
When installed on my target system, systemd reports the following for the tailscaled daemon:
------------------------------------------------
[[0;1;32m=E2=97=8F[[0m tailscaled.service - Tailscale node ag= ent
=C2=A0 =C2=A0 =C2=A0Loaded: loaded (/lib/systemd/system/tailscaled.service; enabled; vendor preset: enabled)
=C2=A0 =C2=A0 =C2=A0Active: [[0;1;32mactive (running)[[0m sin= ce Sat 2020-09-19 20:46:02 UTC; 4min 44s ago
=C2=A0 =C2=A0 =C2=A0 =C2=A0Docs: https://tailscale.com/kb/
=C2=A0 =C2=A0Main PID: 252 (tailscaled)
=C2=A0 =C2=A0 =C2=A0 Tasks: 13 (limit: 19081)
=C2=A0 =C2=A0 =C2=A0Memory: 56.5M
=C2=A0 =C2=A0 =C2=A0CGroup: /system.slice/tailscaled.service<= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=E2=94=94=E2= =94=80252 /usr/sbin/tailscaled --state=3D/var/lib/tailscale/tailscaled.state --socket=3D/run/tailscale/tai
lscaled.sock --port 41641
=C2=A0
Sep 19 20:48:03 amber tailscaled[252]: 7.2M/39.1M control: cancelMapSafely: synced=3Dfalse
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=3Dfalse); needsRebind=3Dfalse
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=3Dfalse); needsRebind=3Dfalse
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=3Dfalse); needsRebind=3Dfalse
Sep 19 20:48:03 amber tailscaled[252]: 7.2M/39.1M magicsock: starting endpoint update (link-change-minor)

-------------------------------= -----------------

=C2=A0
And ifconfig reports the following:
------------------------------------------------

# ifconfig

tailscale0 Link encap:UNSPEC=C2= = =A0 HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00=C2=A0=C2= =A0

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= = =A0 inet6 addr: fe80::7f12:8835:cc06:b3e7/64 Scope:Link

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= = =A0 UP POINTOPOINT RUNNING NOARP MULTICAST=C2=A0 MTU:1280=C2=A0 Metric:1

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= = =A0 RX packets:0 errors:0 dropped:0 overruns:0 frame:0

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= = =A0 TX packets:14 errors:0 dropped:0 overruns:0 carrier:0

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= = =A0 collisions:0 txqueuelen:500=C2=A0

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= = =A0 RX bytes:0 (0.0 B)=C2=A0 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.
=C2=A0
Mike Thompson
=C2=A0




--=20
# Randy MacLeod
# Wind River Linux
--------------6C982475F7C0A8663132A7A3-- From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: Yocto recipe for Tailscale #yocto #golang To: yocto@lists.yoctoproject.org From: "Mike Thompson" X-Originating-Location: Salt Lake City, Utah, US (65.158.4.11) X-Originating-Platform: Linux Chrome 85 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Tue, 22 Sep 2020 21:49:03 -0700 References: <9378dde9-ebda-d6db-df7d-74d1a18c5253@windriver.com> In-Reply-To: <9378dde9-ebda-d6db-df7d-74d1a18c5253@windriver.com> Message-ID: <15104.1600836543637853360@lists.yoctoproject.org> Content-Type: multipart/alternative; boundary="dL1t0m9CpogYqyz3gRDr" --dL1t0m9CpogYqyz3gRDr Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Mon, Sep 21, 2020 at 10:31 AM, Randy MacLeod wrote: >=20 >=20 >=20 > Could you send your tailscale recipe to meta-openembedded/meta-networkin= g? >=20 > Email: OpenEmbedded Development mailing list ( > openembedded-devel@... ) > Instructions: https://www.openembedded.org/wiki/How_to_submit_a_patch_to= _OpenEmbedded >=20 >=20 >=20 >=20 > It looks like all the work is done aside from an email! >=20 >=20 Sure.=C2=A0 I'm traveling right now, but I'll look to do this in the next = week or two. Mike Thompson --dL1t0m9CpogYqyz3gRDr Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Mon, Sep 21, 2020 at 10:31 AM, Randy MacLeod wrote:

Could you send your tailscale recipe to meta-openembedded/meta-networki= ng?
    Email: OpenEmbedded Development mailing list <openembedded-devel@...>=
    Instructions: https://www.openembedded.o= rg/wiki/How_to_submit_a_patch_to_OpenEmbedded

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

Sure.  I'm traveling right now, but I'll look to do this in the ne= xt week or two.

Mike Thompson

--dL1t0m9CpogYqyz3gRDr-- From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: Yocto recipe for Tailscale #yocto #golang To: yocto@lists.yoctoproject.org From: "Mike Thompson" X-Originating-Location: Palo Alto, California, US (157.22.13.92) X-Originating-Platform: Windows Chrome 85 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Tue, 13 Oct 2020 11:51:13 -0700 References: <15104.1600836543637853360@lists.yoctoproject.org> In-Reply-To: <15104.1600836543637853360@lists.yoctoproject.org> Message-ID: <11004.1602615073598026525@lists.yoctoproject.org> Content-Type: multipart/alternative; boundary="rTg3AYQJ74YCdITiP59w" --rTg3AYQJ74YCdITiP59w Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable A follow up on a Yocto recipe for building a Tailscale package for others w= ho have an interest in this. Although the final recipe I created appears to successfully build the Tail= scale utility and daemon without warnings or errors, the resulting 'tailsca= led' daemon crashes when used. Investigating this issue further I discovered that Tailscale maintains the= ir own GoLang repository ( https://github.com/tailscale/go/tree/build-56db7= 6510f9640d2ad652f206ae6e41c1a5d63ca ) with changes needed to support Tailsc= ale. I suspect, but haven't proven, using the standard Yocto supported vers= ions of GoLang to build Tailscale results in the crashes I see.=C2=A0 Unfor= tunately, I don't have enough of an understanding of GoLang to determine ho= w to build Tailscale with the unique version of GoLang maintained by the Ta= ilscale folks.. Instead of resolving this build issue, I instead created a Yocto recipe th= at utilizes the released binaries from Tailscale ( https://pkgs.tailscale.c= om/stable/#static ) to create a Yocto package.=C2=A0 This isn't ideal as I = would much rather build from source, but solves my short term needs.=C2=A0 = This alternate recipe to build a Yocto package from binaries is included be= low. ------------------------------------------------------------------------ tailscale_1.0.5.bb SUMMARY =3D "Tailscale client and daemon for Linux from Tailscale pre-buil= t binaries" HOMEPAGE =3D "github.com/tailscale/tailscale" SECTION =3D "net" LICENSE =3D "CLOSED" COMPATIBLE_HOST =3D "x86_64.*-linux" # Archive URL: #=C2=A0 =C2=A0https://pkgs.tailscale.com/stable/tailscale_1.0.5_amd64.tgz # # Archive contents: #=C2=A0 =C2=A0tailscale_1.0.5_amd64/systemd #=C2=A0 =C2=A0tailscale_1.0.5_amd64/systemd/tailscaled.service #=C2=A0 =C2=A0tailscale_1.0.5_amd64/systemd/tailscaled.defaults #=C2=A0 =C2=A0tailscale_1.0.5_amd64/tailscaled #=C2=A0 =C2=A0tailscale_1.0.5_amd64/tailscale # # Set SRC_URI subdir to ${P} so that files are unpacked into ${S} SRC_URI =3D "https://pkgs.tailscale.com/stable/${BPN}_${PV}_amd64.tgz;subd= ir=3D${P}" SRC_URI[md5sum] =3D "fad1e5317ec567b77c3a0b53b8b976cf" SRC_URI[sha256sum] =3D "ecfcda12068d6ecb2be72eba5572ab09406643bcc73c0cd482= ae88060720c430" inherit systemd FILES_${PN} +=3D "${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}${s= ysconfdir}/default/tailscaled install -d ${D}${systemd_unitdir}/system install -m 0644 ${S}/${PN}_${PV}_amd64/systemd/tailscaled.service ${D}${sy= stemd_unitdir}/system/tailscaled.service install -d ${D}${sysconfdir}/systemd/system/multi-user.target.wants/ ln -s ${systemd_unitdir}/system/tailscaled.service ${D}${sysconfdir}/syste= md/system/multi-user.target.wants/tailscaled.service fi } SYSTEMD_PACKAGES =3D "${PN}" SYSTEMD_SERVICE_${PN} =3D "tailscaled.service" SYSTEMD_AUTO_ENABLE =3D "enable" ------------------------------------------------------------------------ Mike Thompson --rTg3AYQJ74YCdITiP59w Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

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

Although the final recipe I created appears to successfully build the T= ailscale utility and daemon without warnings or errors, the resulting 'tail= scaled' daemon crashes when used.

Investigating this issue further I discovered that Tailscale maintains = their own GoLang re= pository with changes needed to support Tailscale. I suspect, but haven= 't proven, using the standard Yocto supported versions of GoLang to build T= ailscale results in the crashes I see.  Unfortunately, I don't have en= ough 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 to cr= eate a Yocto package.  This isn't ideal as I would much rather build f= rom 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 =3D "Tailscale client and daemon for Linux from Tailscale pre-b= uilt binaries"

HOMEPAGE =3D "github.com/tailscale/tailscale"

SECTION =3D "net"

LICENSE =3D "CLOSED"

 

COMPATIBLE_HOST =3D "x86_64.*-linux"

 

# Archive URL:

#   https://pkgs.tailscale.com/stable/tailscale_1.0.5_amd64.t= gz

#

# 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 =3D "https://pkgs.tailscale.com/stable/${BPN}_${PV}_amd64.tgz;s= ubdir=3D${P}"

SRC_URI[md5sum] =3D "fad1e5317ec567b77c3a0b53b8b976cf"

SRC_URI[sha256sum] =3D "ecfcda12068d6ecb2be72eba5572ab09406643bcc73c0cd= 482ae88060720c430"

 

inherit systemd

 

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

 

do_install() {

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

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

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

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

 

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

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

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

 

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

        install -m 0644 ${S}/${PN}_${PV}_amd64/syst= emd/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 =3D "${PN}"

SYSTEMD_SERVICE_${PN} =3D "tailscaled.service"

 

SYSTEMD_AUTO_ENABLE =3D "enable"

-----------------------------------------------------------------------= -

 

Mike Thompson

--rTg3AYQJ74YCdITiP59w-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by mx.groups.io with SMTP id smtpd.web12.4007.1602618134811890064 for ; Tue, 13 Oct 2020 12:42:15 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tLcwcsor; spf=pass (domain: gmail.com, ip: 209.85.222.169, mailfrom: raj.khem@gmail.com) Received: by mail-qk1-f169.google.com with SMTP id c2so828512qkf.10 for ; Tue, 13 Oct 2020 12:42:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WR8N1dRwcwP/d2d/yd9TnCET3GO7+o9L9igByg44vGc=; b=tLcwcsor5oubeu8Qa7Kgzev3kB9fDvMyWpAE0tQgWSCozSpknKM0RcVUQ621HmrR2a FY/agCj6QHO08S9w7IgbyLt+koTzgSgj2usUDmoqh5VRSqz8kQm5oXZbF4m6tcFlgUEo k6uK+5c44A0agNiukIY0n4As/baNtPwdqAiTmOkTjyL9kXlyhIgrTiwTc7Ty3UrIIvXM JPhZ8ez9IFjCK53Jg1XGU3tdQ0LRmKeXsIdSaQMHL8OaOCYy2NeljwnI2xY1OkQwrDng 7n5mZuR9ISJMwCxMQLkRaM1ZUwNaslaKkt/3AvGPyUKYlpfm2rTxIqw2QfL3mqFKAy26 iUEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WR8N1dRwcwP/d2d/yd9TnCET3GO7+o9L9igByg44vGc=; b=IfDAOp6p+QSptkL3Lu5OrimeupBYWECXq3FzV4SdkbEgwZ7GCK6NcaDOsbXMZDDShH /BcbEH4IDwWJsd8e+aU1HvrOuvxypTvCAe/DuBUoBGCZCBNa6qhp5Ok+BqpXQRBbPkU2 AGNs+Fl7VJbuttVQaPMPlwPBr31pqPplEqh34n46kFAQeDKQ+oNzBLciVG86Q7UJEx48 PFy8U5R6x8DSFVWCI4N9JEtJRrhGTF/l8Dvdh50lpYFLmFtZrOb7N1ePw7AqXkEnFoNr G+Yvc3HSTrIcm/l4cDWeYWLeN3otK9jfObThHkLReBnq3j7w8V+9YJZljopgSpLHAXkx 5JPA== X-Gm-Message-State: AOAM531VlsACJP/shvbvpspYzZ359wTRlm/e+1Au0DS1av7GLgBHOcME IUY//ULFuWDoalh0Z8MZ1VO9WwzU4Tjso2jJCoI= X-Google-Smtp-Source: ABdhPJxVguYo/aeW6HgXCN1nJsBeVvlmJ3lIazlEu6KFbo9hVmp4MGnBuITfOLw/D9Em2xuAvQzBPmTt45aYfzdvwwU= X-Received: by 2002:a37:a751:: with SMTP id q78mr1588562qke.337.1602618133845; Tue, 13 Oct 2020 12:42:13 -0700 (PDT) MIME-Version: 1.0 References: <15104.1600836543637853360@lists.yoctoproject.org> <11004.1602615073598026525@lists.yoctoproject.org> In-Reply-To: <11004.1602615073598026525@lists.yoctoproject.org> From: "Khem Raj" Date: Tue, 13 Oct 2020 12:42:02 -0700 Message-ID: Subject: Re: [yocto] Yocto recipe for Tailscale #yocto #golang To: mthompson@dustyrobotics.com Cc: yocto@lists.yoctoproject.org Content-Type: multipart/alternative; boundary="00000000000094193005b1929c8e" --00000000000094193005b1929c8e Content-Type: text/plain; charset="UTF-8" This is not ideal to capture compiler for your app it should be written portably my guess is that app has issues with using golang properly Do you know what changes they made to compiler and which version is it locked to On Tue, Oct 13, 2020 at 11:51 AM Mike Thompson via lists.yoctoproject.org wrote: > 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 > > 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 > 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 > > > > --00000000000094193005b1929c8e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

This is not ideal to capture compiler for = your app it should be written portably my guess is that app has issues with= using golang properly=C2=A0

Do you know what changes they made to compiler and which version is it= locked to=C2=A0

On Tue, Oct 13, 2020 at 11= :51 AM Mike Thompson via lists.yo= ctoproject.org <mthompson=3Ddustyrobotics.com@lists.yoctoproject.org> wrote:=

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

Although the final recipe I created appears to successfully build the T= ailscale 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 re= pository with changes needed to support Tailscale. I suspect, but haven= 't proven, using the standard Yocto supported versions of GoLang to bui= ld Tailscale results in the crashes I see.=C2=A0 Unfortunately, I don't= have enough of an understanding of GoLang to determine how to build Tailsc= ale 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 to cr= eate a Yocto package.=C2=A0 This isn't ideal as I would much rather bui= ld from source, but solves my short term needs.=C2=A0 This alternate recipe= to build a Yocto package from binaries is included below.

-----------------------------------------------------------------------= -

tailscale_1.0.5= .bb

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

HOMEPAGE =3D "github.com/tailscale/tailscale"

SECTION =3D "net"

LICENSE =3D "CLOSED"

=C2=A0

COMPATIBLE_HOST =3D "x86_64.*-linux"

=C2=A0

# Archive URL:

#=C2=A0 =C2=A0https://pkgs.tailscale.com/stable/tailscal= e_1.0.5_amd64.tgz

#

# Archive contents:

#=C2=A0 =C2=A0tailscale_1.0.5_amd64/systemd

#=C2=A0 =C2=A0tailscale_1.0.5_amd64/systemd/tailscaled.service

#=C2=A0 =C2=A0tailscale_1.0.5_amd64/systemd/tailscaled.defaults

#=C2=A0 =C2=A0tailscale_1.0.5_amd64/tailscaled

#=C2=A0 =C2=A0tailscale_1.0.5_amd64/tailscale

#

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

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

SRC_URI[md5sum] =3D "fad1e5317ec567b77c3a0b53b8b976cf"

SRC_URI[sha256sum] =3D "ecfcda12068d6ecb2be72eba5572ab09406643bcc7= 3c0cd482ae88060720c430"

=C2=A0

inherit systemd

=C2=A0

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

=C2=A0

do_install() {

=C2=A0 =C2=A0 install -d ${D}/${bindir}

=C2=A0 =C2=A0 install -d ${D}/${sbindir}

=C2=A0 =C2=A0 install ${S}/${PN}_${PV}_amd64/tailscale ${D}/${bindir}/t= ailscale

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

=C2=A0

=C2=A0 =C2=A0 if ${@bb.utils.contains('DISTRO_FEATURES', 's= ystemd', 'true', 'false', d)}; then

=C2=A0 =C2=A0 =C2=A0 =C2=A0 install -d ${D}${sysconfdir}/default/

=C2=A0 =C2=A0 =C2=A0 =C2=A0 install -m 0644 ${S}/${PN}_${PV}_amd64/syst= emd/tailscaled.defaults ${D}${sysconfdir}/default/tailscaled

=C2=A0

=C2=A0 =C2=A0 =C2=A0 =C2=A0 install -d ${D}${systemd_unitdir}/system

=C2=A0 =C2=A0 =C2=A0 =C2=A0 install -m 0644 ${S}/${PN}_${PV}_amd64/syst= emd/tailscaled.service ${D}${systemd_unitdir}/system/tailscaled.service

=C2=A0

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

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

=C2=A0 =C2=A0 fi

}

=C2=A0

SYSTEMD_PACKAGES =3D "${PN}"

SYSTEMD_SERVICE_${PN} =3D "tailscaled.service"

=C2=A0

SYSTEMD_AUTO_ENABLE =3D "enable"

-----------------------------------------------------------------------= -

=C2=A0

Mike Thompson




--00000000000094193005b1929c8e--