From 00a3267224785fd2736e6a2ef7f5addd8fc982c5 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 6 Feb 2026 17:00:11 +0100 Subject: [PATCH] overlay coreos/config: Fix agent binaries locations Signed-off-by: Krzesimir Nowak --- .../coreos/config/env/app-containers/incus | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/config/env/app-containers/incus b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/app-containers/incus index 667637407e..ea65a61db0 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos/config/env/app-containers/incus +++ b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/app-containers/incus @@ -1,3 +1,21 @@ -cros_pre_src_compile_pkgconfig() { - export PKG_CONFIG="$(tc-getPKG_CONFIG)" +# https://codeberg.org/gentoo/gentoo/pulls/36 +cros_post_src_compile_move_agent_binaries() { + local bindir="_dist/bin" + local host_arch=$(go-env_goarch "${CBUILD}") + if [[ "${GOARCH}" = "${host_arch}" ]]; then + # nothing to fix + return 0 + fi + local correct_bindir="_dist/bin/linux_${GOARCH}" + mv '_dist/bin/incus-agent.'* "${correct_bindir}" || die +} + +# https://codeberg.org/gentoo/gentoo/pulls/36 +cros_post_src_install_move_agent_binaries() { + if use amd64; then + # nothing to fix + return 0 + fi + dodir '/usr/libexec/incus/agents' + mv "${ED}/usr/libexec/incus/incus-agent."* "${ED}/usr/libexec/incus/agents" || die }