aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/platform
Commit message (Collapse)AuthorAgeFilesLines
* Add cargo-deny to mach-tidy to check license compliance. (#32465)Jonathan Schwender2024-06-121-0/+11
| | | | | | | | | | | | | | | | | | | | | | | * Use cargo-deny to check license compliance. All licenses should be MPL-2.0 or weaker. * Run cargo-deny check licenses in mach tidy * fmt * Fix inverted boolean * Move cargo deny to tidy.py * Add quotes around license in error message * Integrate `cargo-deny` into tidy fully * Fix script tests --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Fix mach bootstrap --skip-platform (#32341)Delan Azabani2024-05-221-1/+2
|
* Skip installing 'clang' if 'clang' binary already exists (#32242)Diego Pino2024-05-081-0/+5
| | | | | | | | | | | Simply installing 'clang' installs the default version of Clang for Linux. For instance, the command: 'apt install clang' installs 'clang-14' in Ubuntu 22.04. It might be possible that a more recent version of clang is already installed in the system. For instance, package 'clang-17'. In the case a 'clang' binary is already installed in the system, skip the installation of 'clang'.
* servoshell: Upgrade `egui` and many other dependencies (#31278)Magnus Larsen2024-05-021-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | * servoshell: Upgrade `egui` and many other dependencies This upgrades: - `core-graphics` - `core-text` - `egui` and friends - `font-kit` - `glow` and friends - `harfbuzz-sys` - `jni` - `nix` - `raqote` - `raw-window-handle` - `winit` * Downgrade jni until we can properly upgrade * Update some test results It's unclear why these are now passing, but they are. --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* bootstrap: Add a `--skip-platform` option (#32176)Martin Robinson2024-04-291-2/+4
| | | | This allows installign `taplo` and `crown` when you are installing dependencies manually.
* Run platform_bootstrap first (#31840)Samson2024-04-292-5/+7
|
* bootstrap: Make unknown distro instructions more helpful (#31750)Martin Robinson2024-03-191-2/+3
| | | | | It doesn't make sense to ask everyone to file a bug if their distribution is unsupported. We have manual build instructions for some distributions and we can add instructions for more easily.
* Add gstreamer plugins good/ugly for better codec support (#31687)Delan Azabani2024-03-151-3/+5
| | | | | * NixOS: add gst-plugins-{good,ugly} for better codec support * Add gstreamer plugins good/ugly to all other package lists
* install libudev-dev required by gamepad API (#31376)Mukilan Thiyagarajan2024-02-191-1/+1
| | | | | | | | | | | | | | Ubuntu 20.04 does not have libudev-dev causing build failure when compiling libudev-sys, which is in-turn needed by gilrs-core. Similarly, nix build also needs the udev C library. On Ubuntu 22.04, we don't see the build failures since the build dependency 'libgstreamer-plugins-base-1.0-dev' transitively pulls in libudev-dev. Fixes #31373 Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* bootstrap: More resiliently install Deiban-like platform dependencies (#31281)Martin Robinson2024-02-072-10/+12
| | | | | | | | 1. First check to see if a package is available before trying to install it. This means that we always do our best to install everything, but don't fail if we cannot. 2. Install crown and taplo first. This means that if the platform-specific bits fail, we still install Servo-specific dependencies.
* Remove duplicate pkg in APT_PKGS (#31280)atbrakhi2024-02-071-1/+0
| | | | We have `libgstreamer-plugins-base1.0-dev` twice in APT_PKGS, looks like a duplicate, this PR removes the duplicated pkg.
* Fix ./mach bootstrap failure in debian (#31276)atbrakhi2024-02-071-1/+7
| | | | Do not install `libgstreamer-plugins-good1.0-dev` on debian, install only on ubuntu.
* Fix bugs in `mach test-tidy` (#31232)Mukilan Thiyagarajan2024-01-311-3/+1
| | | | | | | | | | | | | | | | | * mach: test-tidy should return 1 for failure Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * fix lint issues Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * mach: tidy should allow spec links with trailing text Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Update build script to support asahi linux (#31207)arrynfr2024-01-281-1/+2
|
* tests: Add GStreamer library directory to DYLD_LIBRARY_PATH (#31163)Martin Robinson2024-01-244-12/+0
| | | | | | | This fixes an issue where the dylib for harfbuzz cannot be found when running unit tests on some systems, because unit tests don't get their rpaths adjusted during build. This is quite likely an issue with dylib dependency management. We just need a bit more exploration of how this is traditionally handled.
* build: Only set PATH for GStreamer (#31078)Martin Robinson2024-01-172-51/+18
| | | | The documentation claims that this is the only environment variable that needs to be set before build.
* crown: Add a cargo config.toml file (#31090)Martin Robinson2024-01-151-6/+1
| | | | | This makes it more foolproof to install crown from inside the Servo directory, because the root Servo config.toml overrides the rustc to use crown (an obvious circular dependency).
* Fix the build on Ubuntu 20.04 (#31019)Martin Robinson2024-01-072-27/+1
| | | | | | | | Ubuntu 20.04 doesn't have a new enough version of GStreamer, so automatically disable media when running on that platform. This also cleans up the media detection a bit, putting the result in a `enable-media` variable and moving some of the logic into the build scripts themselves rather than the platform module.
* bootstrap: Adding more output when installing dependencies (#31003)Martin Robinson2024-01-051-4/+4
| | | | | | | It's often the case (especially with the taplo installation and on Windows) that bootstrap is doing lots of stuff in the background for a long amount of time. Without output it's hard to tell what exactly is going on. This change adds more output to this process as well as removing some Pythong 2.x era code.
* Upgrade media / GStreamer / GLib (#30750)Martin Robinson2024-01-053-26/+21
| | | | | | | | | | | | | | | | | | - Upgrade the version of GStreamer for Windows This upgrades the Windows build to use the most recent version of GStreamer. This is necessary to upgrade our GStreamer dependency. - Stop shipping GStreamer binaries on Linux The binary bundle of GStreamer that we package is not used to compile -- only to run layout tests. It's too old for the APIs that we are using (as evidenced by needed 1.18 for WebRTC) and nowadays Linux distributions carry a new version so it's unecessary for our build machines. No longer using this binary bundle will allow us to upgrade our GStreamer dependency -- which now has stricter checks that we are using at least version 1.18. - Upgrade media to use newer versions of GStreamer / GLib dependencies
* Download Windows GStreamer dependencies from GitHub (#30973)Martin Robinson2024-01-031-1/+1
| | | | This works around issues where the server is rejecting our requests and should be more reliable.
* Compile Servo with the latest version of rust stable (#30831)Martin Robinson2023-12-062-14/+0
| | | | | | | | | | | | | | | | This completes the transition to compiling Servo with rust stable. Some nightly-only features are still used when compiling the `script` and `crown` crates, as well as for some style unit tests. These will likely break with newer compiler versions, but `crown` can be disabled for them conditionally. This is just the first step. This has some caveats: 1. We need to disable setting up the special linker on Linux. The -Z option isn't supported with stable rust so using this is out -- meanwhile we can't be sure that lld is installed on most systems. 2. `cargo fmt` still uses some unstable options, so we need to rely on the unstable toolchain just for running `fmt`. The idea is to fix this gradually.
* Replace script_plugins with a clippy like rustc driver (named crown) (#30508)Samson2023-12-011-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove script_plugins * Use crown instead of script_plugins * crown_is_not_used * Use crown in command base * bootstrap crown * tidy happy * disable sccache * Bring crown in tree * Install crown from tree * fix windows ci * fix warning * fix mac libscript_plugins.dylib is not available anymore * Update components/script/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> * Update for nightly-2023-03-18 Mostly just based off https://github.com/servo/servo/pull/30630 * Always install crown it's slow only when there is new version * Run crown test with `mach test-unit` * Small fixups; better trace_in_no_trace tests * Better doc * crown in config.toml * Fix tidy for real * no sccache on rustc_wrapper * document rustc overrides * fixup of compiletest * Make a few minor comment adjustments * Fix a typo in python/servo/platform/base.py Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com> * Proper test types * Ignore tidy on crown/tests --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* bootstrap: Alphabetize and add 'm4' Ubuntu dependency (#30727)Martin Robinson2023-11-131-9/+10
| | | It looks like `m4` is now required for builds on Debian-like systems.
* Remove some stray references to OpenSSL (#30710)Martin Robinson2023-11-091-2/+0
| | | These were left over from the change to use rustls.
* Add support for EndeavourOS (#30513)bc-universe2023-10-061-0/+1
|
* Bootstrap pkg-config and cmake on MacOS (#30497)Martin Robinson2023-10-051-1/+13
| | | | | | | These need to be installed in order to build so we can install them via Homebrew. Do this by simply restoring the Homebrew bootstrapping logic we had in place previously. Fixes #27171.
* fix WebGPU runtime dependencies on linux (#30407)Delan Azabani2023-09-221-4/+24
|
* Enforce formatting of TOML files (#30128)Samson2023-09-191-1/+14
| | | | | | | | | * Fmt all toml files * bootstrap taplo * enforce toml formatting with taplo * Install taplo in CI using cargo-install action
* Add TUXEDO OS to mach bootstrap (#30363)Carlos Bentzen2023-09-151-1/+1
| | | Signed-off-by: Carlos Bentzen <cadubentzen@gmail.com>
* Use MozTools 4 and update mozjs (#30326)Samson2023-09-112-5/+5
| | | | | | | | | | | | | | | | | | | * Update mozjs * moztools4 in bootstrap * no autoconf * tidy * switch to servo-build-deps * update mozjs for real * glue mozjs * fmt * move to servo/mozjs
* Add Raspbian GNU/Linux distro for mach bootstrap (#30223)Manuel Rego Casasnovas2023-08-281-1/+2
|
* Get LLVM from chocolatey (#30140)Martin Robinson2023-08-211-1/+0
| | | | | | | | | | | | LLVM is the largest package that we get from servo-build-deps, so installing it via chocolatey should reduce the amount of data that we transfer from that source. In addition, it's one less dependency that we have to manage. It also seems that installing LLVM to the default location with choco means that we no longer have to set the LIBCLANG_PATH environment variable for bindgen. Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Use system lld on NixOS instead of rust-lld (#30123)Mukilan Thiyagarajan2023-08-182-1/+15
| | | | | | | | | | | | | | | | The -Zgcc-ld=lld flag makes rust use the rust-lld linker that is distributed as part of rust toolchain. However, this flag doesn't work on nixos correctly as 1) rust-lld needs to be patched to have the correct rpath to find libz.so 2) the bin/gcc-ld/ld.lld wrapper which calls rust-lld also needs to be patched to use the correct dynamic loader 3) rust-lld doesn't respect NIX_LDFLAGS which contains the additional search path derived from buildInputs. The system linkers on nixos are wrapped so that NIX_LDFLAGS is added as the rpath to the final binary. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Switch to rustls and webpki-roots (#30025)Martin Robinson2023-08-082-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change replaces OpenSSL with rustls and also the manually curated CA certs file with webpki-roots (effectively the same thing, but as a crate). Generally speaking the design of the network stack is the same. Changes: - Code around certificate overrides needed to be refactored to work with rustls so the various thread-safe list of certificates is refactored into `CertificateErrorOverrideManager` - hyper-rustls takes care of setting ALPN protocols for HTTP requests, so for WebSockets this is moved to the WebSocket code. - The safe set of cypher suites is chosen, which seem to correspond to the "Modern" configuration from [1]. This can be adjusted later. - Instead of passing a string of PEM CA certificates around, an enum is used that includes parsed Certificates (or the default which reads them from webpki-roots). - Code for starting up an SSL server for testing is cleaned up a little, due to the fact that the certificates need to be overriden explicitly now. This is due to the fact that the `webpki` crate is more stringent with self-signed certificates than SSL (CA certificates cannot used as end-entity certificates). [2] 1. https://wiki.mozilla.org/Security/Server_Side_TLS 2. https://github.com/briansmith/webpki/issues/114 Fixes #7888. Fixes #13749. Fixes #26835. Fixes #29291.
* Remove lzma path workaround for MacOS (#30053)Martin Robinson2023-08-011-15/+3
| | | | | Now that the new version of GStreamer fixes this issue, we can remove the workarounds for this problem as well as all of the homebrew bootstrapping logic.
* `mach bootstrap` should also bootstrap GStreamer on Windows (#30018)Martin Robinson2023-07-211-1/+2
| | | Fixes #30007.
* Remove UWP / Hololens supportMartin Robinson2023-07-052-10/+3
|
* Windows bootstrap supportMartin Robinson2023-07-034-50/+56
|
* Implement `./mach bootstrap` for MacOSMartin Robinson2023-06-221-0/+15
|
* recognize artix as valid distribution65432023-06-011-0/+1
|
* Remove more Python 2 compatibility codeMartin Robinson2023-05-291-3/+2
| | | | | | - os.environ is always `str` in Python 3. - The only string type is `str` so we can stop using `six.str_types`. - `iteritems()` isn't necessary because dicts have the `items()` method.
* Implement `bootstrap-gstreamer` for all platformsMartin Robinson2023-05-255-61/+301
| | | | | | | | | | | | | | | | | | This change makes it so that the Platform classes can now handle installing GStreamer dependencies and properly setting up the environment including when cross-compiling. For Windows and Linux is now installed into `target/dependencies/gstreamer` when not installed system-wide. In addition: 1. Creating and moving existing environment path append helpers to `util.py`. 2. Combining the `set_run_env` and `build_dev` functions and moving some outside code into them so that it can be shared. Now code that used to call `set_run_env` calls `build_dev` and then `os.environ.update(...)`. 3. Adding Python typing information in many places. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Start organizing platform-specific Python codeMartin Robinson2023-05-195-0/+403
This starts to split platform-specific Python code into its own module, which should help to tidy up our mach commands and make things more reusable.