From 4198d1a6e2242e84d9d0bc4f7b53fc055b22fc49 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 13 Apr 2026 15:13:35 +0200 Subject: [PATCH] overlay app-emulation/amazon-ssm-agent: Port to Gentoo go eclasses, fix cross-compiling Signed-off-by: Krzesimir Nowak --- .../amazon-ssm-agent-3.3.2299.0.ebuild | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/amazon-ssm-agent/amazon-ssm-agent-3.3.2299.0.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/amazon-ssm-agent/amazon-ssm-agent-3.3.2299.0.ebuild index 3aec6c416f..69ebd9d4f3 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/amazon-ssm-agent/amazon-ssm-agent-3.3.2299.0.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/amazon-ssm-agent/amazon-ssm-agent-3.3.2299.0.ebuild @@ -1,31 +1,27 @@ # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -COREOS_GO_PACKAGE="${GITHUB_URI}" +inherit go-env go-module sysroot systemd -inherit coreos-go-depend golang-vcs-snapshot systemd - -EGO_PN="github.com/aws/${PN}" DESCRIPTION="AWS Systems Manager Agent" HOMEPAGE="https://github.com/aws/amazon-ssm-agent" +SRC_URI="https://github.com/aws/amazon-ssm-agent/archive/${PV}.tar.gz -> ${P}.tar.gz" + LICENSE="Apache-2.0" -SRC_URI="https://${EGO_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz ${EGO_VENDOR_URI}" SLOT="0" KEYWORDS="amd64 arm64" -S="${WORKDIR}/${PN}-${PV}/src/${EGO_PN}" - src_prepare() { default - ln -s ${PWD}/vendor/src/* ${PWD}/vendor/ + # Drop clearing of GOARCH and GOOS - it causes go run to + # create a binary for CBUILD, but then go run also invokes the + # binary using qemu-CHOST, because we use -exec flag when + # cross-compiling + sed -i -e 's/GOARCH= GOOS= go run/go run/' makefile || die } src_compile() { - go_export - - # set agent release version - BRAZIL_PACKAGE_VERSION=${PV} ${EGO} run ./agent/version/versiongenerator/version-gen.go # build all the tools if [[ "${ARCH}" == "arm64" ]]; then emake build-arm64