Skip to content

Port Servo to FreeBSD#43116

Merged
jdm merged 4 commits intoservo:mainfrom
nortti0:freebsd-upstreaming
Mar 31, 2026
Merged

Port Servo to FreeBSD#43116
jdm merged 4 commits intoservo:mainfrom
nortti0:freebsd-upstreaming

Conversation

@nortti0
Copy link
Copy Markdown

@nortti0 nortti0 commented Mar 9, 2026

Add the minimum amount of FreeBSD-specific code to Servo, where no platform-neutral fallback exists.

Testing: I've succesfully built and run Servo on FreeBSD with these changes (and some fixes to dependencies). There's no functional change to any other targets. This pull request was created with Servo running on FreeBSD.
Fixes: #11625

@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Mar 9, 2026
@nortti0
Copy link
Copy Markdown
Author

nortti0 commented Mar 9, 2026

The not-yet-merged fixes to dependencies required for Servo to actually run are servo/webrender#4880, servo/ipc-channel#444, servo/ipc-channel#445, and servo/ipc-channel#446. I have a personal branch which incorporates them, but I thought that I should submit what is upstreamable here as soon as possible.

github-merge-queue bot pushed a commit that referenced this pull request Mar 10, 2026
Juhani Krekelä added 4 commits March 11, 2026 00:25
Signed-off-by: Juhani Krekelä <juhani@krekelä.fi>
Signed-off-by: Juhani Krekelä <juhani@krekelä.fi>
This is what Firefox (see firefox/dom/base/Navigator.cpp) does.
WebKitGTK (see WebKit/Source/WebCore/platform/glib/UserAgentGlib.cpp)
similarly returns the same ("x11") on all non-macOS *nix platforms.

Signed-off-by: Juhani Krekelä <juhani@krekelä.fi>
This is enough to at least get it to build.

Signed-off-by: Juhani Krekelä <juhani@krekelä.fi>
@nortti0 nortti0 force-pushed the freebsd-upstreaming branch from 628407c to dd23928 Compare March 10, 2026 22:25
@nortti0
Copy link
Copy Markdown
Author

nortti0 commented Mar 10, 2026

Fixed the ./mach test-tidy complaints, and rebased on the current main branch, dropping the mozjs update as unnecessary since the main branch already has a newer one.

@nortti0
Copy link
Copy Markdown
Author

nortti0 commented Mar 10, 2026

Also edited the original post of this thread to remove now-obsolete comments about mozjs and mozangle, since aiui that will become the commit message.

@Narfinger
Copy link
Copy Markdown
Contributor

Narfinger commented Mar 18, 2026

In case it is unclear you need to have the signed-off on every commit you did. That is why DCO is complaining.

Also it should probably be clear that the servo team does not have CI currently for testing freebsd changes. So this could break at any moment. But I still find it worth it to have in tree.

@nortti0
Copy link
Copy Markdown
Author

nortti0 commented Mar 18, 2026

In case it is unclear you need to have the signed-off on every commit you did. That is why DCO is complaining.

I believe I have. The DCO check is buggy, and is barfing on my e-mail.

Also it should probably be clear that the servo team does not have CI currently for testing freebsd changes. So this could break at any moment. But I still find it worth it to have in tree.

Yeah, I'm not expecting this to be upstream-supported; I'd just rather have the code in the repo and submit fixes for any possible breakage, rather than needing to maintain a larger downstream fork.

What would be needed to set up a CI for FreeBSD? Aiui Github CI does not support it, so a built-in check would not be possible, but I wonder if I could run a system to provide best-effort information on whether something would break FreeBSD.

@mrobinson
Copy link
Copy Markdown
Member

I have set DCO to passing here due to the unfortunate bugs regarding non-ASCII character in email domain names

@nicoburns
Copy link
Copy Markdown
Contributor

Oh dear. That is unfortunate. I wonder if it would accept the domain name in punycode form: [email protected]

@Narfinger
Copy link
Copy Markdown
Contributor

Going to ping @delan for CI stuff. Perhaps she has an answer.

@delan
Copy link
Copy Markdown
Member

delan commented Mar 19, 2026

What would be needed to set up a CI for FreeBSD? Aiui Github CI does not support it, so a built-in check would not be possible, but I wonder if I could run a system to provide best-effort information on whether something would break FreeBSD.

based on actions/runner#385, there are some possible alternatives that can run commands in CI workflows using FreeBSD virtual machines under the hood. it’s not clear if the runner client just lacks official support for FreeBSD or if it’s actually broken on FreeBSD; if it’s the former, we may also be able to set up some self-hosted runners for FreeBSD someday if there’s enough demand for it :)

@nortti0
Copy link
Copy Markdown
Author

nortti0 commented Mar 31, 2026

Is there something I still need to do before the changes can be reviewed, or has this just ended up on the back burner?

Copy link
Copy Markdown
Member

@jdm jdm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just forgot about it. This looks fine!

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Mar 31, 2026
@jdm jdm added this pull request to the merge queue Mar 31, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Mar 31, 2026
Merged via the queue into servo:main with commit 11687b3 Mar 31, 2026
31 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Servo to compile and run on FreeBSD

7 participants