Date   

Re: #yocto systemd not able to start sshd after a reboot #yocto

Zoran
 

There was a sshd.socket file in /lib/systemd/system which had the following line in it.
Interesting... Pushed/forced me to think.

There is no formal dependency between sshd.service and sshd.socket!

[vuser@fedora32-ssd systemd]$ systemctl list-dependencies sshd.service
| grep ssh
sshd.service
● ├─sshd-keygen.target
● │ ├─sshd-keygen@ecdsa.service
● │ ├─sshd-keygen@ed25519.service
● │ └─sshd-keygen@rsa.service
[vuser@fedora32-ssd systemd]$ systemctl list-dependencies sshd.service
| grep socket
● ├─lvm2-lvmetad.socket
● ├─lvm2-lvmpolld.socket
[vuser@fedora32-ssd systemd]$ systemctl list-dependencies sshd.socket
| grep sshd
sshd.socket

Strange... Isn't it?!

Zoran
_______

On Sat, Sep 19, 2020 at 3:37 PM <srijan.nandi@gmail.com> wrote:

Hello All,

I finally got it to work!!!

There was a sshd.socket file in /lib/systemd/system which had the following line in it.

Conflicts=sshd.service

I remove it and added the following two lines:

After=network.target
Before=sshd.service

And that did the trick. Now sshd service starts on every boot.

Thanks,
-=Srijan Nandi


Re: [meta-mingw][PATCH] Override SDK_VENDOR

Joshua Watt
 



On Mon, Sep 21, 2020, 8:12 AM Samuli Piippo <samuli.piippo@...> wrote:

On Mon, 21 Sep 2020 at 15:53, Joshua Watt <JPEWhacker@...> wrote:
On Fri, Sep 18, 2020 at 7:30 AM Samuli Piippo <samuli.piippo@...> wrote:
>
> Set SDK_VENDOR to '-w64', which makes the host triplet match what GCC
> expect to find when using mingw32-w64. This enables features that are
> not functional in the classic mingw32, but have been implemented in the
> mingw32-w64.

Does this enable it for the i686 toolchain also? Does that make sense?

This enables it for both x86_64-mingw32 and i686-mingw32 targets and it makes sense
since it's not about the target bitness but the mingw implementation. w64 has support
for both targets and provides improved support over the original mingw32.

Thanks. I figured that was the case. This is testing on the AB.

 
>
> Disable 32bit libs from the runtime component when compiling for 64bit,
> which were enabled as a side effect of the GCC config change.
>
> Signed-off-by: Samuli Piippo <samuli.piippo@...>
> ---
>  conf/machine-sdk/include/mingw32-common.inc                    | 3 +++
>  .../mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb             | 2 ++
>  2 files changed, 5 insertions(+)
>
> diff --git a/conf/machine-sdk/include/mingw32-common.inc b/conf/machine-sdk/include/mingw32-common.inc
> index 9011ded..bc6c91e 100644
> --- a/conf/machine-sdk/include/mingw32-common.inc
> +++ b/conf/machine-sdk/include/mingw32-common.inc
> @@ -1,4 +1,7 @@
>  SDK_OS = "mingw32"
> +SDK_VENDOR_mingw32 = "-w64"
> +SDK_VENDOR_sdkmingw32 = "-w64"
> +
>  NATIVESDKLIBC = "libc-mingw"
>
>  PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc_mingw32 = "nativesdk-mingw-w64-runtime"
> diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
> index cf39c6a..9f79ffe 100644
> --- a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
> +++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
> @@ -19,6 +19,8 @@ PROVIDES += "virtual/nativesdk-libintl"
>
>  TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
>
> +EXTRA_OECONF_x86-64 = "--disable-lib32"
> +
>  do_configure() {
>      oe_runconf
>  }
> --
> 2.17.1
>




Re: [meta-mingw][PATCH] Override SDK_VENDOR

Samuli Piippo
 


On Mon, 21 Sep 2020 at 15:53, Joshua Watt <JPEWhacker@...> wrote:
On Fri, Sep 18, 2020 at 7:30 AM Samuli Piippo <samuli.piippo@...> wrote:
>
> Set SDK_VENDOR to '-w64', which makes the host triplet match what GCC
> expect to find when using mingw32-w64. This enables features that are
> not functional in the classic mingw32, but have been implemented in the
> mingw32-w64.

Does this enable it for the i686 toolchain also? Does that make sense?

This enables it for both x86_64-mingw32 and i686-mingw32 targets and it makes sense
since it's not about the target bitness but the mingw implementation. w64 has support
for both targets and provides improved support over the original mingw32.
 
>
> Disable 32bit libs from the runtime component when compiling for 64bit,
> which were enabled as a side effect of the GCC config change.
>
> Signed-off-by: Samuli Piippo <samuli.piippo@...>
> ---
>  conf/machine-sdk/include/mingw32-common.inc                    | 3 +++
>  .../mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb             | 2 ++
>  2 files changed, 5 insertions(+)
>
> diff --git a/conf/machine-sdk/include/mingw32-common.inc b/conf/machine-sdk/include/mingw32-common.inc
> index 9011ded..bc6c91e 100644
> --- a/conf/machine-sdk/include/mingw32-common.inc
> +++ b/conf/machine-sdk/include/mingw32-common.inc
> @@ -1,4 +1,7 @@
>  SDK_OS = "mingw32"
> +SDK_VENDOR_mingw32 = "-w64"
> +SDK_VENDOR_sdkmingw32 = "-w64"
> +
>  NATIVESDKLIBC = "libc-mingw"
>
>  PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc_mingw32 = "nativesdk-mingw-w64-runtime"
> diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
> index cf39c6a..9f79ffe 100644
> --- a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
> +++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
> @@ -19,6 +19,8 @@ PROVIDES += "virtual/nativesdk-libintl"
>
>  TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
>
> +EXTRA_OECONF_x86-64 = "--disable-lib32"
> +
>  do_configure() {
>      oe_runconf
>  }
> --
> 2.17.1
>




Re: [meta-mingw][PATCH] Override SDK_VENDOR

Joshua Watt
 

On Fri, Sep 18, 2020 at 7:30 AM Samuli Piippo <samuli.piippo@qt.io> wrote:

Set SDK_VENDOR to '-w64', which makes the host triplet match what GCC
expect to find when using mingw32-w64. This enables features that are
not functional in the classic mingw32, but have been implemented in the
mingw32-w64.
Does this enable it for the i686 toolchain also? Does that make sense?


Disable 32bit libs from the runtime component when compiling for 64bit,
which were enabled as a side effect of the GCC config change.

Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
---
conf/machine-sdk/include/mingw32-common.inc | 3 +++
.../mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb | 2 ++
2 files changed, 5 insertions(+)

diff --git a/conf/machine-sdk/include/mingw32-common.inc b/conf/machine-sdk/include/mingw32-common.inc
index 9011ded..bc6c91e 100644
--- a/conf/machine-sdk/include/mingw32-common.inc
+++ b/conf/machine-sdk/include/mingw32-common.inc
@@ -1,4 +1,7 @@
SDK_OS = "mingw32"
+SDK_VENDOR_mingw32 = "-w64"
+SDK_VENDOR_sdkmingw32 = "-w64"
+
NATIVESDKLIBC = "libc-mingw"

PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc_mingw32 = "nativesdk-mingw-w64-runtime"
diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
index cf39c6a..9f79ffe 100644
--- a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
+++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_7.0.0.bb
@@ -19,6 +19,8 @@ PROVIDES += "virtual/nativesdk-libintl"

TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"

+EXTRA_OECONF_x86-64 = "--disable-lib32"
+
do_configure() {
oe_runconf
}
--
2.17.1


Re: #yocto systemd not able to start sshd after a reboot #yocto

srijan.nandi@...
 

Seems that some leftovers from System V still reside in YOCTO... Correct???

Not sure about that. 

The problem I faced was because there was a sshd.socket that had the following line in it. The sshd.socket comes with openssh. 

Conflicts=sshd.service

So I had two options. either to add the ExecStartPre in the sshd.service file or to remove the Conflicts line in sshd.socket. 

I choose to remove the Conflicts line and add the following in the sshd.socket file.

After=network.target
Before=sshd.service

Thanks and Regards,
-=Srijan Nandi


Re: wvdial & wvstream Error

Martin Jansa
 

Are you trying to use it with openssl-1.0.*? Either use openssl-1.1 or revert the changes from https://github.com/apenwarr/wvstreams/pull/2/commits.


On Mon, Sep 21, 2020 at 10:55 AM Zoltan Kerenyi Nagy <kerenyi.nagy.zoltan@...> wrote:
Hi,

I was messing around with wvdial & wvstream for a while. Now the patches are at the correct locations, but still there is a compile error:

Here is the error log:


Could you please point me the error? I suppose, its gonna be a Layer 8 error :-)

Thanks guys!

Zolee




wvdial & wvstream Error

Zoltan Kerenyi Nagy
 

Hi,

I was messing around with wvdial & wvstream for a while. Now the patches are at the correct locations, but still there is a compile error:

Here is the error log:


Could you please point me the error? I suppose, its gonna be a Layer 8 error :-)

Thanks guys!

Zolee


preistall package when use a package manager

Matteo Facchinetti
 

Hi,

I need to preinstall a package in a specific directory in my target image.

In detail I use RPM package manager and I like to include RPM packages in my target to provide a way to install services only when used.
This is useful when you don't have an internet connection.

Is there a way to do this?
Opinions are welcome. 

Regards,
Matteo
Sirius Electronic Systems


[meta-mingw][PATCHv2] ninja: configure for mingw platform

Samuli Piippo
 

Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
---
recipes-core/images/core-image-mingw-sdktest.bb | 1 +
recipes-devtools/ninja/ninja_%.bbappend | 8 ++++++++
2 files changed, 9 insertions(+)
create mode 100644 recipes-devtools/ninja/ninja_%.bbappend

diff --git a/recipes-core/images/core-image-mingw-sdktest.bb b/recipes-core/images/core-image-mingw-sdktest.bb
index 6215aef..9060c3d 100644
--- a/recipes-core/images/core-image-mingw-sdktest.bb
+++ b/recipes-core/images/core-image-mingw-sdktest.bb
@@ -10,6 +10,7 @@ TOOLCHAIN_HOST_TASK += "\
nativesdk-dbus \
nativesdk-dtc \
nativesdk-libarchive \
+ nativesdk-ninja \
nativesdk-swig \
nativesdk-wayland \
"
diff --git a/recipes-devtools/ninja/ninja_%.bbappend b/recipes-devtools/ninja/ninja_%.bbappend
new file mode 100644
index 0000000..e7ddb4d
--- /dev/null
+++ b/recipes-devtools/ninja/ninja_%.bbappend
@@ -0,0 +1,8 @@
+do_compile_mingw32() {
+ python3 ./configure.py --platform mingw
+ ninja
+}
+
+do_install_mingw32() {
+ install -D -m 0755 ${S}/ninja.exe ${D}${bindir}/ninja.exe
+}
--
2.17.1


Can't found the zip.h during bitbake #yocto #devtool

Jaymin Dabhi
 

Team,

I need to include zip.h header file in one of my C code (#include <zip.h>).
I have created a .bb file and added following command for compilation:
${CC} -Wall -I/usr/include/libxml2 -o my_code my_code.c -lxml2 -lzip -lz
But, during bitbake it says:

| In file included from fota_update.c:1:0:
| fota_update.h:5:17: fatal error: zip.h: No such file or directory
|  #include <zip.h>
|                  ^
| compilation terminated.
Using the same compilation command, I am able to compile the code on my PC. But, can't compile with Yocto.

I have tried with lzip and zip packages by adding into local.conf, but didn't work.

Which zip package I need to use for including the zip.h header file?


[meta-zephyr][PATCH] README.txt: update doc

Naveen Saini
 

Add python dependencies.

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
---
README.txt | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/README.txt b/README.txt
index 208843b..be1ea39 100644
--- a/README.txt
+++ b/README.txt
@@ -8,11 +8,17 @@ https://wiki.yoctoproject.org/wiki/TipsAndTricks/BuildingZephyrImages
Prerequisites:
==============

-Yocto distro (master)"
+This layer depends on:
+ Yocto distro (master)
+ git://git.yoctoproject.org/poky
+ Python layer (meta-openembedded/meta-python)
+ git://git.openembedded.org/meta-openembedded

Modify local conf by adding:
DISTRO="zephyr"

+Add "meta-openembedded/meta-oe" to BBLAYERS
+Add "meta-openembedded/meta-python" to BBLAYERS
Add "meta-zephyr" to BBLAYERS

Building and Running Zephyr Samples
--
2.27.0


[meta-zephyr][PATCH] zephyr-kernel: Add python dependencies

Naveen Saini
 

From: Jon Mason <jdmason@kudzu.us>

Zephyr refuses to compile due to missing python dependencies.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
---
recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc | 2 ++
1 file changed, 2 insertions(+)

diff --git a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
index d7147d5..2090092 100644
--- a/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
+++ b/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc
@@ -2,6 +2,7 @@

ZEPHYR_INHERIT_CLASSES += "zephyr cmake"
inherit ${ZEPHYR_INHERIT_CLASSES}
+inherit python3native

# There shouldn't be a manifest for zephyr kernels since there is no root
# filesystem.
@@ -20,6 +21,7 @@ export ZEPHYR_BASE="${S}"
# We always need a toolchain to cross-compile.
INHIBIT_DEFAULT_DEPS = "1"
DEPENDS += "gcc-cross-${TARGET_ARCH} libgcc ${TOOLCHAIN_TARGET_TASK} gperf-native"
+DEPENDS += " python3-pyelftools-native python3-pyyaml-native python3-pykwalify-native"
CROSS_COMPILE = "${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}"

DEPENDS_append_qemuall = " qemu-native qemu-helper-native"
--
2.27.0


Re: Yocto recipe for Tailscale #yocto #golang

Mike Thompson
 

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:

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

# 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
 


Re: #yocto systemd not able to start sshd after a reboot #yocto

Zoran
 

Interesting... Here is what I have on Fedora32:

[root@fedora32-ssd system]# pwd
/lib/systemd/system
[root@fedora32-ssd system]# cat /lib/systemd/system/sshd.service
[Unit]
Description=OpenSSH server daemon
Documentation=man:sshd(8) man:sshd_config(5)
After=network.target sshd-keygen.target
Wants=sshd-keygen.target

[Service]
Type=notify
EnvironmentFile=-/etc/sysconfig/sshd-permitrootlogin
EnvironmentFile=-/etc/sysconfig/sshd
ExecStart=/usr/sbin/sshd -D $OPTIONS $PERMITROOTLOGIN
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartSec=42s

[Install]
WantedBy=multi-user.target

Seems that some leftovers from System V still reside in YOCTO... Correct???

Best Regards,
Zoran
_______


On Sat, Sep 19, 2020 at 3:37 PM <srijan.nandi@...> wrote:
Hello All,

I finally got it to work!!!

There was a sshd.socket file in /lib/systemd/system which had the following line in it.

Conflicts=sshd.service

I remove it and added the following two lines:

After=network.target
Before=sshd.service

And that did the trick. Now sshd service starts on every boot.

Thanks,
-=Srijan Nandi



Re: [meta-mingw][PATCH] ninja: configure for mingw platform

Joshua Watt
 



On Fri, Sep 18, 2020, 7:30 AM Samuli Piippo <samuli.piippo@...> wrote:
Signed-off-by: Samuli Piippo <samuli.piippo@...>

Thanks! Can you add this to core-image-mingw-sdktest to test it doesn't regress? Bonus points for writing a runtime test for it if there isn't one already

---
 recipes-devtools/ninja/ninja_%.bbappend | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 recipes-devtools/ninja/ninja_%.bbappend

diff --git a/recipes-devtools/ninja/ninja_%.bbappend b/recipes-devtools/ninja/ninja_%.bbappend
new file mode 100644
index 0000000..e7ddb4d
--- /dev/null
+++ b/recipes-devtools/ninja/ninja_%.bbappend
@@ -0,0 +1,8 @@
+do_compile_mingw32() {
+        python3 ./configure.py --platform mingw
+        ninja
+}
+
+do_install_mingw32() {
+        install -D -m 0755  ${S}/ninja.exe ${D}${bindir}/ninja.exe
+}
--
2.17.1


Re: #yocto systemd not able to start sshd after a reboot #yocto

srijan.nandi@...
 

Hello All,

I finally got it to work!!!

There was a sshd.socket file in /lib/systemd/system which had the following line in it.

Conflicts=sshd.service

I remove it and added the following two lines:

After=network.target
Before=sshd.service

And that did the trick. Now sshd service starts on every boot.

Thanks,
-=Srijan Nandi


Re: Yocto recipe for Tailscale #yocto #golang

Mike Thompson
 

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 resolving dependencies with individual Bitbake files that pull in each dependency as I find them.

 

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

# tailscale_1.0.5.bb

SUMMARY = "Tailscale client and daemon for Linux"

HOMEPAGE = "github.com/tailscale/tailscale"

 

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}"

 

DEPENDS += "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 = "tailscale.com"

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

 

RDEPENDS_${PN}-dev += "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 the wrong 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 = "Go X libraries"
 
SRC_URI = "\
         git://github.com/golang/mod.git;protocol=https;name=mod;destsuffix=${PN}-${PV}/src/golang.org/x/mod \
         git://github.com/golang/net.git;protocol=https;name=net;destsuffix=${PN}-${PV}/src/golang.org/x/net \
         git://github.com/golang/sys.git;protocol=https;name=sys;destsuffix=${PN}-${PV}/src/golang.org/x/sys \
         git://github.com/golang/text.git;protocol=https;name=text;destsuffix=${PN}-${PV}/src/golang.org/x/text \
         git://github.com/golang/time.git;protocol=https;name=time;destsuffix=${PN}-${PV}/src/golang.org/x/time \
         git://github.com/golang/sync.git;protocol=https;name=sync;destsuffix=${PN}-${PV}/src/golang.org/x/sync \
         git://github.com/golang/tools.git;protocol=https;name=tools;destsuffix=${PN}-${PV}/src/golang.org/x/tools \
         git://github.com/golang/build.git;protocol=https;name=build;destsuffix=${PN}-${PV}/src/golang.org/x/build \
         git://github.com/golang/oauth2.git;protocol=https;name=oauth2;destsuffix=${PN}-${PV}/src/golang.org/x/oauth2 \
         git://github.com/golang/crypto.git;protocol=https;name=crypto;destsuffix=${PN}-${PV}/src/golang.org/x/crypto \
         git://github.com/golang/xerrors.git;protocol=https;name=xerrors;destsuffix=${PN}-${PV}/src/golang.org/x/xerrors \
         "
SRCREV_FORMAT = "golang"
SRCREV_mod = "${AUTOREV}"
SRCREV_net = "${AUTOREV}"
SRCREV_sys = "${AUTOREV}"
SRCREV_text = "${AUTOREV}"
SRCREV_time = "${AUTOREV}"
SRCREV_sync = "${AUTOREV}"
SRCREV_tools = "${AUTOREV}"
SRCREV_build = "${AUTOREV}"
SRCREV_oauth2 = "${AUTOREV}"
SRCREV_crypto = "${AUTOREV}"
SRCREV_xerrors = "${AUTOREV}"
 
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
 
inherit go
GO_IMPORT = "golang.org/x"
---------------------------------------------
 
Thanks,
 
Mike Thompson


Re: Yocto recipe for Tailscale #yocto #golang

Khem Raj
 

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 <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 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.


Re: #yocto systemd not able to start sshd after a reboot #yocto

Zoran
 

Hello Srijan,

Did you recap/look into this sshd.service file?
https://lists.yoctoproject.org/g/yocto/message/49993

Zoran
_______

On Fri, Sep 18, 2020 at 8:07 PM <srijan.nandi@gmail.com> wrote:

Hello Khem,

With the above sshd.service file the sshd daemon fails to start. It gives an error "(code=exited, status=203/EXEC)".

Cannot figure out as to why the systemd for sshd fails to work, while the other systemd files are working perfectly fine.

-=Srijan Nandi


Re: Yocto recipe for Tailscale #yocto #golang

Mike Thompson
 

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
 

3161 - 3180 of 53895