Repository navigation
termios: Support FreeBSD - #2544
Conversation
8381d55 to
da6a6f6
Compare
Codecov ReportBase: 73.66% // Head: 73.66% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2544 +/- ##
=======================================
Coverage 73.66% 73.66%
=======================================
Files 405 405
Lines 41231 41234 +3
=======================================
+ Hits 30374 30377 +3
Misses 10857 10857
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
da6a6f6 to
bad98d7
Compare
rminnich
left a comment
There was a problem hiding this comment.
This sure looks good to me. If you can make cirrus CI
work it would be nice to have freebsd CI back. Help wanted :-)
rminnich
left a comment
There was a problem hiding this comment.
from what I've seen, ttyio is always going to be a maze, I think this is about as good a job as can be done. Thanks again.
b057145 to
6650f20
Compare
Signed-off-by: Pat Maddox <pat@ratiopbc.com>
6650f20 to
f9608f7
Compare
|
Removed unnecessary build line from |
Cool! Happy to do it. Would you like to see it as part of this PR, or a separate one? Edit: Based on the number of failures, it should probably be a separate PR. I suspect there will be a lot of stub implementations on FreeBSD that serve as a TODO list for full support. |
|
yeah, let's do a separate PR, and thanks in advance for the issues we are certain to see :-) I will help whereever I can. |
`./scripts/build_go.sh --os freebsd` fails to build with the following (unique) errors: termios/sgtty_unix.go:13:20: undefined: unix.TCGETS termios/termios.go:33:10: undefined: TTYIO termios/termios.go:39:9: undefined: MakeRaw termios/var_unix.go:42:38: undefined: syscall.IUTF8 termios/var_unix.go:50:37: undefined: syscall.OFILL termios/var_unix.go:51:37: undefined: syscall.OFDEL This was resolved upstream in u-root/u-root/pull/2544 [1] via tailscale/tailscale/pull/6155 [2] in u-root/u-root/commit/18fd0ce36 [3] Update termios (u-root) dependency to a commit just past that change. [1] u-root/u-root#2544 [2] tailscale/tailscale#6155 [3] u-root/u-root@18fd0ce36 Fixes: #4516
This sets some variables necessary to support Tailscale's built-in sshd server on FreeBSD (tailscale/tailscale#6155).
I could use some help finishing this off. Current issues that I think are worth addressing:
pkg/termios/termios_freebsd.gois acpofpkg/termios/termios_darwin.go, with the addition of thego:build freebsd/+build freebsdlines.termios_bsd.goand conditionally building.pkg/termios/var_freebsd.gohas a lot of duplication withpkg/termios/var_unix.goas well.var_unix.goand intovar_linux.goandvar_darwin.go.From what I can tell, CI doesn't currently verify FreeBSD.
#2421 says:
GitHub actions doesn't officially support FreeBSD as far as I know. The method I'm aware of requires you to run a FreeBSD VM inside of a MacOS instance. That's pretty janky.
Cirrus CI runs directly on FreeBSD machines, so it should probably be re-instated for FreeBSD verification.
I am willing to assist (re-)configuring FreeBSD CI on Cirrus.