fix: enable building for openbsd, dragonfly, and solaris/illumos #1135
No reviewers
Labels
No labels
FreeBSD
Kind/Breaking
Kind/Bug
Kind/Chore
Kind/DependencyUpdate
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Windows
linux-powerpc64le
linux-riscv64
linux-s390x
run-end-to-end-tests
run-forgejo-tests
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo/runner!1135
Loading…
Reference in a new issue
No description provided.
Delete branch ":main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What it says on the tin. No idea if it actually runs; I'll find out in the near future when I source CI machines running these OSs.
Note that, for solaris/illumos, this also requires: https://github.com/moby/go-archive/pull/17
I'm not sure what to do about that; that package looks abandoned.
When you're confident that this builds, I don't mind merging it. 👍
But I'm sure you'll understand that without any CI support in this repo, regressions of this will occur in the future and it won't be known. Support will be at a "I hope it works and I'm happy to review and merge PRs to fix things" level.
I know it builds for openbsd and dragonfly. I just don't know what to do about solaris/illumos since that go-archive dependency appears unmaintained. I could use some advice on how to move forward on that front.
That's fine.
I'll note that it's straightforward to cross-compile the runner for a bunch of different targets by just setting
GOARCHandGOOSwhen invokinggo build- that's what I did downstream. So even if you don't run the test suite, you could verify that it at least builds. But it's also fine if you'd rather not do it that way; we'll discover and fix any build issues when we upgrade our runners anyway.Ah, I see, sorry I missed that comment about go-archive. My first thought is to replace it with https://github.com/mholt/archives, which is used by Forgejo and seems to be well maintained. I don't know off hand if it has any issues compiling for these platforms though. Since go-archive isn't used anywhere other than
docker_build.go, it probably isn't a difficult replacement.I'd guess that your usage of these additional platforms will be using the host executor? Another approach might be to invert the logic in these build checks and don't include Docker support for these platforms... then
go-archivewon't be referenced since it's only touched indocker_build.go.Regarding cross-compiling, that's an interesting idea. If there are any non-Free tools required for building Illumos it might be a no-go for that platform, but I assume that wouldn't be the case for the others.
Well... maybe not, but I've never actually written a line of Go in my life. 😅
Right.
Now that I look a bit closer, it seems like Docker for Solaris isn't even a thing... or for NetBSD for that matter. DragonFly is a bit unclear, but I would guess no.
So this seems like a reasonable thing to do in any case.
illumos is fully open source to my knowledge; it was forked from OpenSolaris before Oracle took over Solaris and effectively sentenced it to death by making the source code unavailable and subsequently laying off most of the development team.
5b4b2d01ab9c1cf35e07Should be ready for review. The runner now builds for every 'desktop' OS that Go supports except aix, hurd, plan9, and zos. Of those, only aix and plan9 have cross-compilation support. I don't personally care about aix or zos.