-
Notifications
You must be signed in to change notification settings - Fork 871
feat(freebsd): add support for freebsd #5340
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
Conversation
Coder fails to build [1] on FreeBSD: transport_unix.go:52:10: cannot use t (variable of type *unixTransport) as type transport in return statement: *unixTransport does not implement transport (missing SendNullByte method) Update godbus dependency to latest, post upstream PR #332 [2] via #237 Fixes: #4516 [1] #4516 [2] godbus/dbus#332 [3] godbus/dbus#237
coder currently wants GNU getopt for reasons: # BSD getopt (which is installed by default on Macs) is not supported. Although getopt is notoriously non-portable and behaviour differs across implementations and operating systems, in leui of a discussion to remove this specific implementation requirement... Add a GETOPT environment variable in lib.sh and build_go.sh to allow specifying getopt location, leaving the current value 'getopt' as the default.
Some operating systems and user environments may have or allow for installation of multiple go versions. In the cases where these environments are not isolated (jails, containers, etc), a `go` command, either by way of symlink pointing to a desired go installation or default version, may not exist, be installed, or may change targets over time. As an example, FreeBSD Ports & Packages allows the concurrent installation of multiple golang versions, with go commands being suffixed with a version string (eg: go119). In order to deterministiscally build packages on these systems, particularly in the case of "official" packaging systems @ downstreams, it is necessary to be able to explicitly specify what language versions is used, rather than have them be autodetected, where PATH ordering can matter and interfere or where the default binary name can change over time according to user preference. Accordingly, allow specifying `go` command location via a GOCMD environment variable in build_go.sh. See Also: golang/go#28043
I was in ports Makefile not bash mode.
`./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
`./scripts/build_go.sh --os freebsd` fails to build with the following (unique) errors: cli/schedule.go:223:19: undefined: tz.TimezoneIANA cli/util.go:116:17: undefined: tz.TimezoneIANA coderd/util/tz currently contains per-OS implementions (one file per supported OS), but is missing a tz_freebsd.go. Follow the existing pattern by creating a tz_freebsd.go from tz_linux.go. FreeBSD supports standard IANA zoneinfo (and /etc/localtime), so no other changes are required. Fixes: #4516
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
44d7430
to
63de73a
Compare
@ghuntley Looks like
Please update termios dependency to that commit or later, which should address the failure. |
This Pull Request is becoming stale. In order to minimize WIP, prevent merge conflicts and keep the tracker readable, I'm going close to this PR in 3 days if there isn't more activity. |
sudo un-stale |
This Pull Request is becoming stale. In order to minimize WIP, prevent merge conflicts and keep the tracker readable, I'm going close to this PR in 3 days if there isn't more activity. |
@ghuntley unstale, anything else you need from me to merge PR? |
Related: