-
Notifications
You must be signed in to change notification settings - Fork 420
termios: Support FreeBSD #2544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sure looks good to me. If you can make cirrus CI
work it would be nice to have freebsd CI back. Help wanted :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.go
is acp
ofpkg/termios/termios_darwin.go
, with the addition of thego:build freebsd
/+build freebsd
lines.termios_bsd.go
and conditionally building.pkg/termios/var_freebsd.go
has a lot of duplication withpkg/termios/var_unix.go
as well.var_unix.go
and intovar_linux.go
andvar_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.