Skip to content

Add the shellhub-agent recipe compatible with kirkstone LTS release of yocto#78

Closed
prashantdivate wants to merge 2 commits into
shellhub-io:masterfrom
prashantdivate:kirkstone
Closed

Add the shellhub-agent recipe compatible with kirkstone LTS release of yocto#78
prashantdivate wants to merge 2 commits into
shellhub-io:masterfrom
prashantdivate:kirkstone

Conversation

@prashantdivate
Copy link
Copy Markdown

shellhub: add initial recipe for Kirkstone compatibility

Introduce a new recipe for ShellHub to provide compatibility with the
Yocto Project Kirkstone release. There was previously no supported
recipe for this branch in the meta-shellhub layer.

  • Backport/adapt build dependencies for the Kirkstone toolchain.
  • Verify basic runtime functionality on kirkstone-based images.

Signed-off-by: Prashant Divate

@prashantdivate
Copy link
Copy Markdown
Author

Hi! I realized I targeted the master branch by mistake. Since this is for the Kirkstone LTS release, could you please create a Kirkstone branch in this repository? Once that branch exists, I will retarget this PR to it so it doesn't merge into master. Thank you!

@otavio
Copy link
Copy Markdown
Member

otavio commented May 21, 2026

Our understanding is that it works directly in that branch. https://github.com/shellhub-io/meta-shellhub/blob/scarthgap/conf/layer.conf

I know we could improve the README to make this clearer, but the Scarfthgap supports the Kirkstone version. You could give this a try.

@otavio otavio closed this May 21, 2026
@prashantdivate
Copy link
Copy Markdown
Author

@otavio as I already tried the scarthgap branch shellhub recipe version. Recent versions will not be compatible with kirkstone release due to dependency mismatch of upstream go package versions.

FYI,

ERROR: shellhub-agent-0.18.3-r0 do_compile: ExecutionError('/home/prashant/MadOS/mados-combo/build/tmp/work/armv8a-poky-linux/shellhub-agent/0.18.3-r0/temp/run.do_compile.3713579', 1, None, None)
ERROR: Logfile of failure stored in: /home/prashant/MadOS/mados-combo/build/tmp/work/armv8a-poky-linux/shellhub-agent/0.18.3-r0/temp/log.do_compile.3713579
Log data follows:
| DEBUG: Executing shell function do_compile
| go: errors parsing go.mod:
| /home/prashant/MadOS/mados-combo/build/tmp/work/armv8a-poky-linux/shellhub-agent/0.18.3-r0/build/src/github.com/shellhub-io/shellhub/agent/go.mod:3: invalid go version '1.22.4': must match format 1.23
| go: errors parsing go.mod:
| /home/prashant/MadOS/mados-combo/build/tmp/work/armv8a-poky-linux/shellhub-agent/0.18.3-r0/build/src/github.com/shellhub-io/shellhub/agent/go.mod:3: invalid go version '1.22.4': must match format 1.23
| WARNING: /home/prashant/MadOS/mados-combo/build/tmp/work/armv8a-poky-linux/shellhub-agent/0.18.3-r0/temp/run.do_compile.3713579:175 exit 1 from 'aarch64-poky-linux-go install -p 20 -v -ldflags="-r /usr/lib/go/pkg/linux_arm64_dynlink -X main.AgentVersion=v0.18.3 -extldflags ' -march=armv8-a+crc+crypto -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/prashant/MadOS/mados-combo/build/tmp/work/armv8a-poky-linux/shellhub-agent/0.18.3-r0/recipe-sysroot -Wl,-rpath-link=/home/prashant/MadOS/mados-combo/build/tmp/work/armv8a-poky-linux/shellhub-agent/0.18.3-r0/recipe-sysroot/usr/lib/go/pkg/linux_arm64_dynlink -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=/home/prashant/MadOS/mados-combo/build/tmp/work/armv8a-poky-linux/shellhub-agent/0.18.3-r0=/usr/src/debug/shellhub-agent/0.18.3-r0 -fdebug-prefix-map=/home/prashant/MadOS/mados-combo/build/tmp/work/armv8a-poky-linux/shellhub-agent/0.18.3-r0=/usr/src/debug/shellhub-agent/0.18.3-r0 -fdebug-prefix-map=/home/prashant/MadOS/mados-combo/build/tmp/work/armv8a-poky-linux/shellhub-agent/0.18.3-r0/recipe-sysroot= -fdebug-prefix-map=/home/prashant/MadOS/mados-combo/build/tmp/work/armv8a-poky-linux/shellhub-agent/0.18.3-r0/recipe-sysroot-native= -Wl,-z,relro,-z,now'" -trimpath -modcacherw -buildmode=pie go_list_packages'
| WARNING: Backtrace (BB generated script):
| #1: go_do_compile, /home/prashant/MadOS/mados-combo/build/tmp/work/armv8a-poky-linux/shellhub-agent/0.18.3-r0/temp/run.do_compile.3713579, line 175
| #2: do_compile, /home/prashant/MadOS/mados-combo/build/tmp/work/armv8a-poky-linux/shellhub-agent/0.18.3-r0/temp/run.do_compile.3713579, line 164
| #3: main, /home/prashant/MadOS/mados-combo/build/tmp/work/armv8a-poky-linux/shellhub-agent/0.18.3-r0/temp/run.do_compile.3713579, line 186
ERROR: Task (/home/prashant/MadOS/mados-combo/mad-core/meta-mad-core/recipes-core/shellhub/shellhub-agent_0.18.3.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1163 tasks of which 1153 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 2 seconds

Thats why I raised this PR because v0.11.0: was practical ShellHub Agent target for stock Yocto Kirkstone / Go 1.17

@otavio
Copy link
Copy Markdown
Member

otavio commented May 22, 2026

I would rather prefer to do the backport of the Go toolchain to this layer in this branch, so we can make it compatible. We already have the infrastructure to allow the build of newer Go toolchain in place, so the backport should be trivial. Would you mind to take a look at this and do the backports to the referred branches?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants