The latest version of app-containers/k3d present in portage (5.4.6) gives an error at runtime when compiled with go 1.20. I made an ebuild for version 5.4.9 which is the latest. Reproducible: Always Steps to Reproduce: 1. emerge k3d 2. k3d version Actual Results: panic: Something in this program imports go4.org/unsafe/assume-no-moving-gc to declare that it assumes a non-moving garbage collector, but your version of go4.org/unsafe/assume-no-moving-gc hasn't been updated to assert that it's safe against the go1.20 runtime. If you want to risk it, run with environment variable ASSUME_NO_MOVING_GC_UNSAFE_RISK_IT_WITH=go1.20 set. Notably, if go1.20 adds a moving garbage collector, this program is unsafe to use. goroutine 1 [running]: go4.org/unsafe/assume-no-moving-gc.init.0() /var/tmp/portage/app-containers/k3d-5.4.6/work/go-mod/go4.org/unsafe/assume-no-moving-gc@v0.0.0-20220617031537-928513b29760/untested.go:25 +0x1ba Expected Results: k3d version v5.4.6 k3s version v1.24.4-k3s1 (default)
Created attachment 859316 [details] k3d-5.4.9.ebuild updated ebuild proposal
a few notes about the ebuild I submitted: - I set the k3s default k3s version to the latest 1.24 instead of a more recent 1.26 since my company doesn't consider k8s>1.24 stable enough, but it's debatable. - The tarball contains a "vendor" dir with all the dependencies, I decided to use that instead of creating my own archive with the dependencies. I'm not a go expert so the way I achieved this might not be optimal.
Works for me with go 1.20.3 on amd64. Thanks Rodolfo! I don't know anything about go packaging, but I needed to fish out and old removed terraform<1.3 ebuild from the archive recently, for compatibility reasons. It referenced a separate -dist tarball which had also been removed, luckily I had the distfiles laying around. Seems to me the ebuild might age better if bundled deps are used. (Including potential security holes in the deps, of course.)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a78ea410d51f0a33864efed1c8588d62a314b903 commit a78ea410d51f0a33864efed1c8588d62a314b903 Author: rodolfo <rodolfo.boer@gmail.com> AuthorDate: 2023-04-25 03:28:05 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2023-04-25 03:34:28 +0000 app-containers/k3d: add 5.4.9 Closes: https://bugs.gentoo.org/903635 Signed-off-by: Zac Medico <zmedico@gentoo.org> app-containers/k3d/Manifest | 1 + app-containers/k3d/k3d-5.4.9.ebuild | 39 +++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+)
Thanks!